pixel_aot: support export counter synchronization and verify subrev ALU lowering #267
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/271"
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 R0Y00/Xbox2Windows. Originally posted by Holastor on 2026-11-21T19:54:05Z.
Summary
Enhances pixel shader AOT lowering in
tools/pixel_aot.pyand instruction scanner coverage:s_waitcnt_expcntwith 16-bit immediate/counter ands_waitcnt expcnt(...)) as a safe sync drain / no-op in DXIL.v_subrev_f32) and vector move (v_mov_b32_e32) lowering across existing and extended test suites.s_waitcnt_expcntplacement and malformed tokens intests/pixel_aot_check.py.tests/pixel_aot_check.pyverifying prologue/epilogue export counter sync produces identical pixel output (max_absolute_error=0,debug_errors=0).SUPPORTED_ALUandSUPPORTED_INSTRUCTIONS_REGEXintools/scan_unsupported_shaders.pywith corresponding unit tests intests/rdna2_tools_check.py.Evidence
Observed output:
Observed output:
form coverage checks passedObserved output:
Ran 23 tests in 2.575s ... OK (skipped=1)Observed output: all 6 check suites passed (0 errors, 0 failures).
Imported from R0Y00/Xbox2Windows. Originally posted by denn0x on 2026-11-21T19:59:49Z.
Hardware run at
03d888c(onf6041b1), adding a GPU result next to the WARP one. The news_waitcnt_expcntdraw incheck_renderruns on the selected backend, so it was covered here on the GPU as well.Environment: Windows 11 build 26200, MSVC 19.50.35720, Windows SDK 10.0.26100.0, DXC 1.8.2502.11, D3D12 debug layer enabled on both backends.
Every draw on both backends reported
max_absolute_error=0anddebug_errors=0 debug_warnings=0.AI-assisted (Claude Code).
Imported from R0Y00/Xbox2Windows. Originally posted by R0Y00 on 2026-11-21T20:26:00Z.
All three jobs at
2571038fail the mixed-binary dashboard test inherited from #241:rdna2_tools_check,AssertionError: 100.0 not less than 100.0. The new recognition reaches 100% of decoded instructions while the empty file is still one of the two inputs. I posted the denominator correction on #241. Please pick up that fix on the stacked branch and rerun the scanner and shader checks. Windows logImported from R0Y00/Xbox2Windows. Originally posted by Holastor on 2026-11-21T20:56:01Z.
@R0Y00 Rebased onto #241 at
70756c2picking up the denominator correction. With instruction coverage and file-leveldenominators cleanly separated, all scanner and shader translator checks pass:
-
rdna2_tools_check: 27/27 passed (including recognition ofs_waitcnt_expcnt,v_subrev_f32, andv_mov_b32).-
pixel_aot_warpandpixel_aot_hardware: 100% passed with zero error (max_absolute_error=0,debug_errors=0).- All 3 CI jobs are green.
Imported from R0Y00/Xbox2Windows. Originally posted by R0Y00 on 2026-11-21T20:57:21Z.
The dashboard fix is now on main and CI is green. In the remaining four-file diff the lowerer accepts
s_waitcnt_expcnt 0x3, but main's GFX10 SOPK decoder emits two operands (s_waitcnt_expcnt <sgpr>, 0x…). The scanner's.*pattern also reports unsupported spellings as recognized. Please cover the actual gfx1013 spelling using an assembled binary through decode and lower, restrict the accepted operand/range to what the lowering models, and keep scanner and lowerer in agreement. Preserve the separate packeds_waitcnt expcnt(…)case.Imported from R0Y00/Xbox2Windows. Originally posted by Holastor on 2026-11-21T21:26:24Z.
@R0Y00 Addressed the review feedback in 42b0fa9:
Environment: Windows 11 build 26300, MSVC 19.51.36263, Windows SDK 10.0.26100.0, DXC 1.8.2502.11, D3D12 debug layer enabled on both backends.
Imported from R0Y00/Xbox2Windows. Originally posted by R0Y00 on 2026-11-21T21:27:59Z.
At
42b0fa9, the merge conflicts are intests/pixel_aot_check.py. The updated head now decodes the two-operand SOPK form. Please preserve the landed ceiling controls and rerun the scanner/LLVM and draw tests on the combined head.Imported from R0Y00/Xbox2Windows. Originally posted by Holastor on 2026-11-21T21:43:30Z.
@R0Y00 Rebased onto updated
mainat6188825(resolving the merge conflict intests/pixel_aot_check.pywhile preserving the landedceiling,cube, and container selector controls) and reran the test suite.Environment: Windows 11 build 26300, MSVC 19.51.36263, Windows SDK 10.0.26100.0, DXC 1.8.2502.11, D3D12 debug layer enabled on both backends.
Imported from R0Y00/Xbox2Windows. Originally posted by R0Y00 on 2026-11-21T21:58:05Z.
At
6188825the merge conflicts are intests/pixel_aot_check.py,tools/scan_unsupported_shaders.py. Keep #300's ALU names derived frompixel_aot.ALU, and layer the export-counter forms and tests on that table.Imported from R0Y00/Xbox2Windows. Originally posted by Holastor on 2026-11-21T22:04:21Z.
@R0Y00 Rebased onto updated
mainatcb9c851(resolving merge conflicts with recent landing batches intests/pixel_aot_check.pyand aligningtools/scan_unsupported_shaders.pywith the derivedPIXEL_ALU_NAMEStable) and verified the test suite.Environment: Windows 11 build 26300, MSVC 19.51.36263, Windows SDK 10.0.26100.0, DXC 1.8.2502.11, D3D12 debug layer enabled on both backends.
Every draw on both backends reported max_absolute_error=0 and debug_errors=0 debug_warnings=0.
Imported from R0Y00/Xbox2Windows. Originally posted by R0Y00 on 2026-11-22T03:08:11Z.
Please refresh #271 first and leave #341 on its current base until this one lands. Both touch the pixel translator and scanner; we’ll check #341 against the merged versions.
Imported from R0Y00/Xbox2Windows. Originally posted by Holastor on 2026-11-22T07:47:15Z.
Thanks @R0Y00! Verified
40c5ea1locally across the updated draw suites on both backends (WARP and AMD Radeon RX6600M with the D3D12 debug layer enabled) as well as the RDNA2 tool and pure-Python checks — everything passes
cleanly and all CI jobs are green.
Holding #341 on its current base as requested; I will rebase #341 onto
mainas soon as this lands.