Skip to content

GPU tests: check fragment barycentric live-ins across flat and scratch stores - #6402

Open
kacper-serewis wants to merge 1 commit into
ItsNotRexed:mainfrom
kacper-serewis:test/store-livein-gpu
Open

kacper-serewis wants to merge 1 commit into
ItsNotRexed:mainfrom
kacper-serewis:test/store-livein-gpu

Conversation

@kacper-serewis

Copy link
Copy Markdown
Contributor

TEST-PS-STORE-LIVEIN-GPU, claimed in #6214.

Depends on: #6307

Two synthetic shaders branch past an unreachable store and directly export the incoming fragment weights. Both GPU runners reuse vs_persp and the pixel-centre perspective reference, checking all 1,158 covered pixels and all 2,938 clear pixels per draw. The PR contains only the test change. Land after #6307.

Windows, GeForce RTX 5070, NVIDIA 616.56. With identical fixtures, scripts/run_gpu_tests.py --filter ps_store_livein --require-pass failed 0/2 passing on parent 561b65a: the flat case lost both weights, the scratch case lost the first. All 1,158 covered pixels differed in each draw. At 4465319 both passed, with exact clears. All three translated modules passed spirv-val on both revisions. The existing ps_persp_bary control also passed on the fix. Five CPU perspective-oracle tests and both store live-in semantic tests passed. AI-assisted.

@thehollowedone

Copy link
Copy Markdown

Independent Windows check of c3b652fe with #6307 at 44653193 applied cleanly in a temporary checkout. Windows 11 x64, RTX 3080 Ti, MSVC 19.44, LLVM MC 23.1.6, Vulkan SDK 1.4.363.0.

Both ps_store_livein fixtures and the ps_persp_bary control passed. Each of the three draws matched all 1,158 covered pixels and 2,938 clear pixels. All four unique SPIR-V modules validated, and Vulkan core and synchronization validation reported zero errors. Synthetic inputs only. AI-assisted.

@Mortify7612

Copy link
Copy Markdown

Tested c3b652fe merged onto main 1cc6e3c1 (clean; #6307 is in as 0d9972fe) on AMD Radeon RX 9060 XT (RDNA4, GFX1200), RADV Mesa 25.0.7, Debian 12 Linux, llvm-mc 23.1.6: pass, and the new fixtures catch the bug on AMD too.

Three interleaved rounds, same test binaries, run_gpu_tests.py --filter ps_ / --filter ps_store_livein:

  • With this PR: ps_store_livein_flat, ps_store_livein_scratch and the ps_persp_bary control pass every round, perspective-correct on every covered pixel (106/116 for the ps_ filter, 10 skipped, none failed).
  • Same fixtures with tools/rdna2spirv.py from 0d9972fe^ (before Preserve flat and scratch store address live-ins in translator analysis #6307): both fail every round, 1158/1158 covered pixels off. At (5,8) flat got (0,0,0,0) and scratch got (0,0.0024,0,0.0024) against (0.003382,0.0024,0.003382,0.0024): flat loses both weights, scratch the first, as on your RTX 5070.

AI-assisted (Claude Code).

@LukeOsland1

Copy link
Copy Markdown

Tested c3b652fef4 on Windows 11 build 26300, NVIDIA RTX 4070 Ti SUPER, driver 610.88. I used the PR’s GPU runner with LLVM 23.1.6 and the MSVC-built harness from the tested sources. The Vulkan loader was restricted to the NVIDIA ICD.

With the PR alone, both pixel fixtures failed: each differed at all 1,158 covered pixels. I applied the same test-only diff to the merged dependency #6307 at 446531935 and reran --filter ps_store_livein with the same native harness. Both fixtures then passed the perspective reference on every covered pixel (2/2).

Xbox 1.0.2.1 coverage: 0 of 26,503 local shaders.rpf listings contain at least one of the following mnemonics. Static instruction counts (combining e32/e64 spellings): flat_store_dword 0, scratch_store_dword 0. The counts describe opcode presence. The GPU readback above uses the hand-written fixtures. AI-assisted with Codex.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants