Repository navigation
fix(shader): leave the workgroup memory set out of a compute module's bindings - #11951
Conversation
|
Some comparisons could not be completed because a pull request conflicts with the base branch. Review these shared files manually before concluding that there is no overlap.
|
|
Windows + NVIDIA result for head This PR's own tests: Host: Windows 11 26300, Intel i7-12700K, NVIDIA GeForce RTX 2070 SUPER (vendor 0x10de, device 0x1e84; Vulkan loader 1.4.357 from the NVIDIA driver), Khronos Validation Layers nightly 1.4.366 (b2b44c0d37) through Same focused run on
The tree also carried the open PRs #11711, #11704, #11692, #11691, #11690, #11794, #11949, all merged cleanly, so the run is a joint one; of those, #11692's new AI-assisted: yes (Claude Code), the runs and the numbers above are from this machine. |
✅ NVIDIA GPU test: passedPR head
Failing on main too (5, not counted against this PR)Validation IDs already present on main (4 IDs in 404 tests)Skipped (39)ReproduceAutomated build and test on a contributor's NVIDIA machine; it does not replace upstream CI. A new comment is posted for each new push. Full logs. |
… bindings A compute shader whose LDS does not fit the device limit keeps it in a storage buffer in descriptor set 1, binding 0. Specialization listed that variable with the module's set 0 bindings, so selecting the prepared plan failed for a shader with no guest buffers, because nothing in set 0 uses binding 0. Only the pixel function LDS set was left out before. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
22d08b6 to
40775bc
Compare
|
Rebased onto AI-assisted: yes (Claude Code) |
✅ NVIDIA GPU test: passedPR head
Unstable on main (2, these also failed in recent main runs on this machine; not counted against this PR)Failing on main too (3, not counted against this PR)Validation IDs already present on main (5 IDs in 484 tests)Skipped (45)ReproduceAutomated build and test on a contributor's NVIDIA machine; it does not replace upstream CI. A new comment is posted for each new push. Full logs. |
|
Hi BunnyFl, #6959 merged today, and this PR no longer merges cleanly with main. These conflicts overlap your changes, so they need your call:
Could you merge main into this branch and resolve them, keeping what that PR added? A merge commit is fine; no need to rebase or force-push. Once it's pushed we'll re-review the merge. |
Keeps the specialization constants boykopovar#6959 records next to this branch's compute workgroup memory exclusion. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
@oneandonlydean Merged main ( On the merge, Windows 11, WinLibs GCC 15.2.0, Release, with
|
✅ NVIDIA GPU test: passedPR head
Unstable on main (2, these also failed in recent main runs on this machine; not counted against this PR)Failing on main too (3, not counted against this PR)Validation IDs already present on main (4 IDs in 495 tests)Skipped (45)ReproduceAutomated build and test on a contributor's NVIDIA machine; it does not replace upstream CI. A new comment is posted for each new push. Full logs. |
What
A compute shader whose LDS plus 4 bytes is larger than the device's
maxWorkgroupSharedMemoryByteskeeps its LDS in a storage buffer declared in descriptor set 1, binding 0 (WorkgroupMemoryDescriptorSet).buildSpecializedModulelists the binding number of every descriptor variable that remains after specialization and left out only the pixel function LDS set (set 2), so it listed that buffer as binding 0.DescriptorBindingBuilder::Selectthen looks the module's binding numbers up in the prepared plan, which holds only set 0. When the shader has guest buffers, set 0's binding 0 (Buffers) is there and the lookup succeeds by number. When it has none, the recompile fails withspecialized module bindings disagree with the prepared plan.This leaves the variables of
WorkgroupMemoryDescriptorSetout for aGLComputeentry point, as the pixel function LDS set already is. Set 1 is alsoFragmentDescriptorSet, so pixel shaders keep listing their set 1 bindings.Tested
Windows 11 (10.0.26200), WinLibs GCC 15.2.0 r7 (MinGW-w64 UCRT), Release,
BUILD_TESTING=ON, onmain75f3702aed:agc_lds_lock_budget: a compute program with one image load, 16 dwords of LDS stored withds_write_b32and no buffers, compiled for a 64-byte shared memory limit. It checks that the program compiles, that its LDS is in device memory (workgroupMemoryDwords == 18) and that it was specialized. It passes in three runs; with onlyRecompiler.cppput back tomain's version, it fails in all three runs withspecialized module bindings disagree with the prepared plan. The 12 existing cases pass in both. The runs setANYPS5_REQUIRE_VULKAN=1,ANYPS5_NO_SHADER_CACHE=1andVK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation; the test only recompiles and creates no Vulkan device, so neither log has aVUID-line or a missing-layer message.tools/check_conventions.py --base upstream/mainpasses.Planet Zoo (PPSA18026 01.009.002), AMD Radeon RX 9070 XT (
maxComputeSharedMemorySize32768, driver 32.0.32015.7029):mainaborts before any frame withcompute shader 0xb401f08800: specialized module bindings disagree with the prepared plan: 55 and 46 s in on3fea2a937b, 49 s in on8ff4baf534. That shader uses 8192 dwords of LDS and no buffers. Its request, saved withAPS5_DUMP_SHADERS, fails the same way inagc_shader_replaywithmain'sRecompiler.cppand recompiles with this change (on62b3ba2522too), as do the other nine requests saved in that run.8ff4baf534, the title no longer aborts there. In one run it showed the Frontier logo and the EULA screen (288 presents before a timedAPS5_HANG_DUMP_SECSdump at 60 s). In two other 300 s runs its log stopped after about 80 s and 30 s, with 3 and 0 presents; that stop is not investigated here.Rebased onto
main08a10d2253(head40775bc85a).mainhad addedMeshWindowDescriptorSetto the same condition (6f79055); the rebased line keeps it next to this change's compute-onlyWorkgroupMemoryDescriptorSet. On that head, same machine and compiler (these runs did not set the Vulkan variables above):agc_lds_lock_budgetpasses in three runs; with onlyRecompiler.cppput back tomain's version it fails in all three withLDS lock budget: specialized image program without buffers: ShaderRecompiler::Recompile: specialized module bindings disagree with the prepared plan.tools/check_conventions.py --base upstream/mainpasses.disagree with the prepared planline; the run stopped at the time cap, not by itself. The same title onmain99b571f879aborted 49 s in with that error.Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file.mdfiles or images added to the repository (attach them to this PR)🤖 Generated with Claude Code