Repository navigation
GPU tests: bind the --pc-tail-ubo block so 128-byte push-constant devices run the suite (2/3) - #2048
Conversation
d768139 to
dfc3c78
Compare
|
Independent Linux check of
No fixture changed verdict or skip reason when enabling the tail. All 185 modules passed |
Flyander
left a comment
There was a problem hiding this comment.
Reviewed the current harness and binding changes against the index metadata and reported GPU results. I found no blocking defect in this step. I did not run tests; the reported Linux checks are from the independent tester. This verifies the harness path, while D3D12 PSO integration remains the stated step 3.
|
Tested dfc3c78 on NVIDIA GeForce GTX 1660 (Turing, TU116, subgroup 32..32), driver 620.73.04 (proprietary, Vulkan 1.4.357), Arch Linux (kernel 6.18): pass, with and without Native build of runtime/ from this head (Ninja, RelWithDebInfo, clang 23.1.5), llvm-mc 23.1.5, SPIRV-Tools v2026.4.
Not covered here: a device with 128 bytes of push constants. AI-assisted run (Claude). Counts only, no game files involved. |
|
Tested on Windows 11 with two GPUs on one machine (runtime built from this PR's head, MSVC 14.51): no regression. RTX 4080 SUPER: 115/116. Not from this PR: |
dfc3c78 to
0ec464b
Compare
|
Tested 0ec464b on a second 128-byte device: AMD Radeon(TM) Graphics, the Ryzen 9 7900X iGPU (RDNA2, gfx1036), AMD driver 24.10.24, Windows 11, All six Vulkan harnesses (vk_harness, vk_compute_test, vk_store_test, vk_texture_test, vk_sampler_test, vk_bindless_test) rebuilt at this head and at
AI-assisted. No game files. |
|
Independent Radeon check of
AI-assisted testing with the repository’s synthetic fixtures. |
|
Tested the new harness commit Full
No fixture changed verdict or skip reason when the tail moved to the block — comparing the 185 rows pairwise, the only differences are the per-run output paths in the detail text. Skips are the usual 30 no-64-wide-compute-subgroup (12 of them gone under emulation), the 12 D3D12 fixtures another program runs, 2 The flag really changed the modules, and the bound block was exercised. For Scope: this is the forced path on a GPU with more than 128 bytes of push constants, not a device physically limited to 128, and not AMD Windows. No game files. AI-assisted verification. |
…lock for 128-byte devices A device whose maxPushConstantsSize is 128, Vulkan's minimum (AMD's Windows driver on RDNA2 iGPUs, some Intel Arc drivers), can't take the 144-byte block (152 with --mesh-compute). With --pc-tail-ubo the push-constant block keeps s0..s31 (128 bytes), and the tail that follows them by default (heap base, code base, the --mesh-compute output address) becomes %pc_tail, a uniform block at set 1, binding 0, with the same members in the same order. It is declared only when the shader reads the tail; the index records "pc_tail" and 128 push-constant bytes, and "bindings" still lists set 0 only. Without the flag nothing changes. Step 1 of the uniform-buffer tail claimed in ItsNotRexed#1902; the GPU harnesses and the D3D12 layer that bind the block follow. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…vices run the tests With LEONIDA_PC_TAIL_UBO=1, build.py and run_gpu_tests.py translate with --pc-tail-ubo, and the test programs (vk_compute_test, vk_store_test, vk_harness, vk_texture_test, vk_sampler_test, vk_bindless_test) declare and push 128 bytes and, when a stage declares set 1, bind the tail block there (runtime/test/vk_pc_tail.h: a host-visible buffer with one slot per dispatch or draw, bound as a dynamic uniform buffer). vk_harness refuses --mesh-compute with the flag (exit 77): mesh_compute_vs.py's vertex shader still reads its address from push constants. Without the variable nothing changes. Step 2 of the uniform-buffer tail claimed in ItsNotRexed#1902. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
0ec464b to
dd331fb
Compare
|
Tested
No game files. AI-assisted (Claude Code). |
|
Independent 128-byte compute check on Windows 11 with Edge’s SwiftShader (Subzero), Clang/llvm-mc 23.1.5 and Vulkan validation 1.4.363. Local stack: main With |
# Conflicts: # docs/testing.md
Claimed in the coordination issue as: new item, the uniform-buffer tail for devices with 128 bytes of push constants (#1902 (comment)). This is step 2 of 3.
Depends on: #2046 (the translator's
--pc-tail-ubo). Builds on #1873'svk_harnesspush-constant check, now merged; this branch is rebased onmainafter it (4eb6155).What and why
With
--pc-tail-ubo(step 1), translated shaders keep s0..s31 in 128 push-constant bytes and read the heap base and code base from a uniform block at set 1, binding 0. This makes the GPU test programs bind that block, so a device whosemaxPushConstantsSizeis 128 runs the tests that skip there today.runtime/test/vk_pc_tail.h(new):LEONIDA_PC_TAIL_UBO(same accepted values asLEONIDA_W64_EMULATE), a SPIR-V scan forOpDecorate … DescriptorSet 1, andPcTail: a host-visible buffer with one slot per dispatch or draw, bound as aUNIFORM_BUFFER_DYNAMICso each one selects its own tail.vk_compute_test,vk_store_test,vk_harness,vk_texture_test,vk_sampler_testandvk_bindless_test: with the variable set, declare and push 128 bytes; when a stage declares set 1, add the block to the pipeline layout (after the program's own set 0, or after an empty set 0) and bind it.vk_compute_test'sworkgroup_yzorigins, which re-push the heap base per dispatch, get one slot each.build.pyandrun_gpu_tests.pytranslate with--pc-tail-ubowhen the variable is set.vk_harnesswith--mesh-computeand the variable: exit 77.tools/mesh_compute_vs.py's vertex shader still reads the output address from push constants (follow-up). The 128-byte devices seen so far have native mesh shaders.docs/testing.md: a section for 128-byte devices.Without the variable nothing changes: the programs declare and push 144 bytes as before.
Tested
Rebased on 4eb6155 after #1873 merged, and rerun: AMD with the flag 163/180 passed, 15 skipped, the same 2 failures; NVIDIA without it 136/180 passed, 44 skipped, 0 failed (
mainadded 7 tests). The full comparison below was made just before the rebase.AI-assisted (Claude Code). Windows 11 (build 26200), MSVC 14.44, Windows SDK 10.0.26100, Python 3.14.4, llvm-mc 21.1.8 (WSL), SPIRV-Tools v2026.4.
run_gpu_tests.py, whole suite, native wave64. No game files.LEONIDA_PC_TAIL_UBOunsetLEONIDA_PC_TAIL_UBO=1maxPushConstantsSize128vk_harnesspixel, vertex, mesh and geometry tests (all butms_clip), thevk_texture_testandvk_sampler_testtexture tests, andps_tex/ps_imgatomicthroughvk_bindless_test. The compute tests passed before too (this driver tolerates the 144-byte compute range), and still pass reading the heap base from the block.d3d12_*_test, noVK_KHR_maintenance8, no 64-wide fragment subgroup.ms_clipcrashes invk_harnesseven with a valid 128-byte layout, so GPU tests: vk_harness skips a device with fewer push-constant bytes than it pushes #1873's push-constant range isn't the whole cause (see SHADER-167).ps_gather_wrapgets zeros in exactly the cases whose wrap or mirror coordinate goes intoOpSModnegative; NVIDIA passes the same module. That's this driver'sOpSMod, fixed in the translator by Translator: gather wrap/mirror use OpSRem + fix-up, not OpSMod (AMD Windows driver reads zeros) #2105.Checklist
docs/design.md, with how it was confirmed. (No translator change here; step 1 has the row.)🤖 Generated with Claude Code