Repository navigation
Conversation
The four debugger branches are never taken without a shader debugger (an s_nop in place), s_wait_idle has no effect, and s_endpgm_ordered_ps_done is an s_endpgm (the ordered-PS-done signal is already a no-op). Measured natively on gfx1036. GPU fixture cs_w32_sopp_misc, semantic test test_sopp_misc.py, design.md row. AI-assisted.
|
Tested
|
|
Tested fb7791a on Windows 11 with an RTX 4070 (driver 621.01). I also checked s_endpgm_ordered_ps_done in a fragment shader with VK_EXT_fragment_shader_interlock enabled. All 4096 pixels kept the color written before the instruction. Removing the instruction let the second color write run, and all 4096 pixels changed to that color. The full GPU suite had no failures in either mode (165 passed, 46 skipped by default; 196 passed, 15 skipped with wave64 emulation). Both new semantic tests passed. I reproduced all nine failures/errors from the full semantic run on the parent commit aa2988c. AI-assisted |
slopradish
left a comment
There was a problem hiding this comment.
CPU verification: checked out pull/4023/head in an isolated worktree and ran pytest -q tests/semantic/test_sopp_misc.py: 2 passed.
The change handles the remaining miscellaneous scalar opcodes (s_cbranch_cdbg*, s_wait_idle, s_endpgm_ordered_ps_done) with the same pattern as the neighbouring opcode work: translator rule, semantic fixture, semantic test, GPU fixture, checker word list, GPU runner registration and contract row all updated together. The semantic test drives the real translator rather than a private model, so the CPU path is genuinely covered.
I could not run the GPU fixture on this host; the hardware-visible behaviour is the author's measurement. No game files or keys involved.
|
Follow-up correction to my approval: a later full So the failures are order-dependent rather than introduced by this PR. I can't attribute them to the sopp_misc change, and I'm not retracting the approval — but the semantic suite has a cross-test state problem worth a separate item (similar in kind to TEST-874). My original evidence stands: |
Requested by Lucas · project thread
Claimed in the coordination issue as: EGEN-SOPP-MISC, #3796 (comment)
What and why
Six valid gfx1013 SOPP forms raised
Unsupported. I found them by translating every gfx1013 opcode form onmain. In the open PR diffs, only #2323's decoder tables name them.Change (
tools/rdna2spirv.py,normalize_sopp, called at the start offold_far_branchesat both of its call sites):s_cbranch_cdbgsys,s_cbranch_cdbguser,s_cbranch_cdbgsys_or_user,s_cbranch_cdbgsys_and_user) test the debugger-present bits. Those bits are clear when no shader debugger is attached, so the branches are never taken. Each becomes ans_nopat the same pc, so there is no branch edge and the fall-through chain is unchanged.s_wait_idlewaits for outstanding operations. It has no register or memory effect here, so it joinsNOOPS.s_endpgm_ordered_ps_doneends the program and signals the end of an ordered pixel-shader section. That signal is already a no-op here, because the fragment-shader interlock ends at shader exit. So the instruction becomess_endpgm.Measured natively on RDNA2 gfx1036 (Radeon iGPU of a Ryzen 9 9950X3D, driver 26.10.1,
tools/hw_oracleraw wave32 kernel): none of the four branches is taken, and nothing afters_endpgm_ordered_ps_doneruns. The kernel returned0x11 0x22 0x33 0x44, the fixture's first four words.New contract row in
docs/design.md.Tested
Windows 11, LLVM
llvm-mc(-mcpu=gfx1013),VK_LOADER_LAYERS_DISABLE=~implicit~, one GPU at a time,python -I scripts/run_gpu_tests.py --filter cs_w32_sopp_misc:17 34 51 68 5 6 7 8runtime/test/shaders/cs_w32_sopp_misc.asm, with the words derived in its header. It is registered incheck.py,run_gpu_tests.pyandregen_fixtures.py.tests/semantic/test_sopp_misc.pychecks the fixture words throughspirv_mini_interpon 32 lanes, thenormalize_sopprewrite, and thats_wait_idleis inNOOPS.mainthe test errors withUnsupported: s_wait_idle.s_endpgm_ordered_ps_donemade a no-op, the code after it runs. The test fails, and the Radeon run gives2989(0xbad) in out[0]. Reverted afterwards.python -m unittest discover -s tests/semantic(no new failures: the 7 failures and 3 errors it reports fail the same way onmainaa2988cc, intest_loop_ballot_barrier(emulate),test_vcmp16_opsel(spirv-val),test_cmp_class_f64(TEST-853) andtest_mutations(v_mul_legacy_f32anchor)),python tests/semantic/regen_fixtures.py --check(clean),python -I tests/test_shader_checks.py, andpytest tests/test_docs_design_rows.py tests/test_run_gpu_tests.py.AI-assisted.
Checklist
docs/design.md, with how it was confirmed.