fix(agc): typed image heaps on devices without nullDescriptor #2015
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/2015"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from boykopovar/AnyPS5. Originally posted by arvindfroi on 2026-10-09T05:07:37Z.
What
The typed descriptor heaps (
dccfa08d) write a null descriptor for a null guest image, soVulkanDevicerequiredVK_EXT_robustness2'snullDescriptor. MoltenVK has the extension but not the feature (KhronosGroup/MoltenVK#2650). On macOS no Vulkan device opens (shader runtime requires nullDescriptor), and every GPU test is skipped. jamesst20 reported this in #1.nullDescriptoris enabled when the device has it. Nothing changes on such a device: no placeholders are made, and a null image is still a null descriptor.PlaceholderImagesat setup: one image per typed image heap, 1×1 and cleared to zero, with the heap's dimension, sample count, numeric class (float, uint, sint or depth) and access (sampled, storage or atomic). A null guest image binds its heap's placeholder.ShaderDeviceProfileno longer requiresnullDescriptor.TechnicalDebt.mdlists where a placeholder differs from a null descriptor: writes to a null storage image are kept, and depth comparisons compare against 0.agc_placeholder_images(no GPU needed) maps every image resource through the recompiler'sDescriptorBindingForImageand checks the placeholder of each of the 56 heaps against it, so the two cannot drift apart.#293 binds a 1×1 zero texture for an all-zero sampled descriptor, written before the typed heaps. This PR only covers devices without
nullDescriptor; on other devices it keeps main's null descriptors.Tested
macOS 27.0, Apple M3 Pro, Homebrew's MoltenVK 1.4.2 and Vulkan loader 1.4.363.0.
maindoes not build on macOS yet, so I tested this commit onmainmerged locally with the arm64 macOS libraries (mugurc/AnyPS5#3). I resolved that merge's conflicts for the test only; they are not part of this PR.agc_*tests were skipped withshader runtime requires nullDescriptor.--timeout 30, withoutagc_driver_lds_atomics64and the flip/display tests: 208 pass, 25 skip and 15 fail. None of the failures involves null images:buffer_unaligned_base), Float64 (interpolation_f16), and vertex-stage subgroups (exec_host_lanes,ngg_vertex_wave_info);fma(l, r, 0)turning -0.0 into +0.0 (sdwa_float_selectors,f32_denormal_flush,f32_output_modifier,packed_alu);lds_src2), and the descriptor and interlock limits already known on macOS (many_buffers,pixel_interlock);prepared_shadersand its 3 variants, which need multisampled storage. A separate PR fixes the test.agc_driver_typed_heapsreads a null image and expects zeros. It passes through a placeholder.agc_placeholder_imagesandagc_shader_device_profilepass.nullDescriptortakes the same path as before.Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed in TechnicalDebt.mdfiles or images added to the repository (attach them to this PR)🤖 Generated with Claude Code
Imported from boykopovar/AnyPS5. Originally posted by Zheorgyan on 2026-10-09T09:47:04Z.
tested on an M1 Pro, x86-64 under Rosetta, MoltenVK from Vulkan SDK 1.4.363.0, on
macos-portmerged withmain, this PR, #2016 and #2099.agc_driver_typed_heaps,agc_placeholder_imagesandagc_shader_device_profilepass, and the wholeagc_*set gives 213 pass, 25 skip, 12 fail. the failures are the 11 from your list plusvop1_float_unary, which #1571 fixes, none involves null imagesImported from boykopovar/AnyPS5. Originally posted by popcoder565 on 2026-10-09T15:23:53Z.
Native Windows run, since no Windows results were posted. Setup: Windows 10 (19045), RTX 3060 Laptop (NVIDIA 616.92), MinGW-w64 GCC 15.2.0 (WinLibs r7), Release. Head
17713d1c, merged ontomaind70b8998in one build with 33 other AGC/shader PRs that had no Windows run.agc_placeholder_images,agc_shader_device_profile. None of them reported skipping a case.PATHsetup.No title was run.
🤖 Addressed by Claude Code
Imported from boykopovar/AnyPS5. Originally posted by Mouhand-Kaddo on 2026-10-10T10:11:57Z.
Additional platform validation on standalone PR head
b288aa84eca4ebfce7000f741e32b7d65c865e34:Linux: passed — Arch Linux in WSL2 (kernel 6.6.87.2), GCC 16.2.1 20260810; CMake 4.3.1 / Ninja.
Release /
BUILD_TESTING=ON: built the selected test targets; 3 CTest cases, 0 failures, 0 CTest skips.Tests:
agc_shader_device_profile,agc_placeholder_images,agc_driver_typed_heaps.Reproduce after building the test targets:
ctest --test-dir <build> --verbose --no-tests=error --timeout 30 -R "^agc_(placeholder_images|shader_device_profile|driver_typed_heaps)$".Vulkan: Mesa lavapipe 26.2.4 software Vulkan; no native Linux GPU/retail-title validation.
Integration limitation: a local merge against main
948a526c2has source conflicts; these results validate the standalone PR head, not a resolved merge.Imported from boykopovar/AnyPS5. Originally posted by adriadam10 on 2026-10-11T08:45:05Z.
Rebased onto current
main(mechanical conflicts inlibSceAgcDriver/CMakeLists.txttest list,VulkanDevice.cppandTechnicalDebt.md; no logic changes).Checked on Linux (RADV): build + ctest of
libSceAgcDriver,libSceAgc,libkernel,libSceRtcall green (409 tests), includingagc_placeholder_images,agc_shader_device_profileandagc_driver_typed_heaps. Without the change the new test does not build. The placeholder path itself is covered by the macOS/MoltenVK, Windows and WSL runs above in the thread; merging once CI is green.