Repository navigation
Conversation
Bring the direct DXIL pixel-shader lowering into parity with the HLSL recompiler's live-lane handling for helper lanes under s_wqm: - lanes.rs: add Lw::is_pixel (reused in ballot and rla) and Lw::live_lanes (WaveActiveBallot(true), selecting the active half in wave32-in-64 mode). Update Lw::first_lane so pixel shaders intersect EXEC with live lanes before firstbitlow when any live lane is set, falling back to the raw mask otherwise (parity with first_lane_live). - lower.rs: add Lw::ps_mask_live_scc and mask only the SCC zero-check (leaving the destination register unmasked) for pixel-shader ENC_SOP2 s_and_b32 / s_andn2_b32 / s_and_b64 / s_andn2_b64 instructions that reference VCC (106) or EXEC (126) (parity with mask_live, extended to 64-bit masks). - lanes.rs (ps_ballot_tests): add DXC-validated disassembly tests with non-mask and compute negative controls plus a two-triangle edge GPU test covering v_readfirstlane, helper-only s_andn2 SCC, unmasked destination preservation, and the 6-pass march loop shape. Part of xcl-dev#675 Part of xcl-dev#1401 Part of xcl-dev#1833 Assisted-by: Google Antigravity (Gemini 4 Neon)
|
Verification on RTX 3060 Ti (Windows 11), branch merged with current
Thanks! |
|
Correction: the PR test translates its AMD RDNA4 run of the native ( Diff applied on
No other test changes result on either card. Not tested: the D3D12 debug-layer tests ( |
|
|
…ev#2446, xcl-dev#2503 Integrates direct DXIL graphics shader flags (xcl-dev#2451), PS live-lane v_readfirstlane/SCC (xcl-dev#2501), MSG_GS_DONE emit/cut (xcl-dev#2485), VS/PS scalar reload CSE (xcl-dev#2446), and per-lane V_CMP EXEC masking (xcl-dev#2503). Assisted-by: Antigravity (Gemini 4 Neon)
|
RX 6800M focused validation on exact PR head
The fixture does not print its selected adapter or report the driver's physical pixel-shader wave width. The AI use: Codex (exact model name not exposed to me) with a Luna subagent prepared and ran the test and drafted this report; I checked the exact head and log before posting. |
Bring the direct DXIL pixel-shader lowering into parity with the HLSL recompiler's live-lane handling for helper lanes under
s_wqm(v_readfirstlaneandVCC/EXEClane-maskSCCchecks). Part of #675. Part of #1401. Part of #1833.What is in it
crates/xcl/src/gpu/dxil/lanes.rs:Lw::is_pixel(reused inballotandrla) andLw::live_lanes, which emitsWaveActiveBallot(true)and selects the active half in wave32-in-64 mode (matching HLSLballot(true)).Lw::first_laneso pixel shaders intersect(lo, hi)withlive_lanes()beforefirstbitlowwhen any live lane bit is set, falling back to raw(lo, hi)when only helper lanes are set (parity with HLSLfirst_lane_live; non-pixel stages unchanged).crates/xcl/src/gpu/dxil/lower.rs:Lw::ps_mask_live_sccmatching pixel-shaderENC_SOP2s_and_b32,s_andn2_b32,s_and_b64, ands_andn2_b64instructions withVCC(106) orEXEC(126) asSSRC0,SSRC1, orSDST.Lw::saluandLw::salu64to mask only theSCCzero-check bylive_lanes()whenps_mask_live_sccholds, leaving the destination register write (write32/write64) unmasked (parity with HLSLmask_live, extended to 64-bit masks).crates/xcl/src/gpu/dxil/lanes.rs(ps_ballot_tests):direct_ps_readfirstlane_filters_exec_by_live_lanes: pure-CPU DXC 1.9 validation and disassembly check for wave32/wave64 PS plus compute negative control.direct_ps_mask_and_scc_counts_live_lanes_only: pure-CPU DXC 1.9 validation and disassembly check for wave32/wave64 PSs_and/s_andn2touchingVCC/EXEC(includingSDST=NULL) plus non-mask PS and compute negative controls.gpu_direct_ps_readfirstlane_and_mask_live_on_triangle_edges: draws two triangles sharing a diagonal (32x32) on wave32 (and wave64 when supported) verifyingv_readfirstlaneselects a live lane (2.0), helper-onlys_andn2setsSCC == 0while preserving helper bits in the destination and live-lanes_andsetsSCC == 1, and a 6-pass march loop exits at6.0on all1024/1024pixels (cleanly skipped on WARP/CI without wave32).Tested
dxil.dll1.9.2609.5, release build.lanes.rs/lower.rsfix (onorigin/maine0d93c8): both new pure-CPU/DXC tests failed (0 passed, 2 failed).cargo test --release -p xcl --lib -- gpu::dxil::lanes::ps_ballot_tests:: --nocapture:7 passed, 0 failed, 0 ignored(0.43 s,0skipped;1024/1024pixels passed for bothwave64 = falseandwave64 = true).XCL_ADAPTER=warp:7 passed, 0 failed, 0 ignored(0.05 s; all 5 pure-CPU/DXC tests passed with0skips; the 2 GPU edge-draw tests cleanly skipped withno wave32/no wave64).cargo test --release --workspace --no-fail-fast -- --test-threads=4 --nocapture(RTX 4060):1424 passed, 0 failed, 46 ignoredacross37test binaries (184/184gpu::dxil::*passed;29pre-existingSKIPPEDGPU/environment checks:21no wave64,3per-lane wave32 refused,3no D3D12 debug layer,1no heap windows,1cannot disable driver cache;0skipped inps_ballot_tests).Regression run
main:
PR:
Not tested
d3d12SDKLayers.dll.AI use
is_pixel/live_lanes/first_laneinlanes.rsandps_mask_live_sccinlower.rs, wrote the DXC-validated and GPU edge tests, ran the test and smoke suites, and drafted this PR description.