Repository navigation
Conversation
…ags in graphics shaders Shader::try_finish_graphics previously omitted four DXIL shader/SFI0 flag bits required by dxil.dll when the corresponding graphics features are present: - InnerCoverage (1 << 10 / SFI0 0x400) for pixel shaders with a surviving post-optimize dx.op.innerCoverage (op 92) call. - ShadingRate (1 << 24 / SFI0 0x8_0000) for vertex outputs and pixel inputs carrying SemKind::ShadingRate (not mesh primitive outputs). - DerivativesInMeshAndAmpShaders (1 << 29 / SFI0 0x100_0000) for mesh shaders with surviving post-optimize derivatives or implicit-LOD ops (unary 83..=86, sample 60, sampleBias 61, sampleCmp 64, calculateLOD 81). - 64UAVs (1 << 15 / SFI0 0x8) across vertex, pixel, and mesh stages when more than 8 static UAV bindings are declared. Scan surviving post-optimize instructions for inner coverage and mesh derivatives so eliminated calls in unreachable blocks or DCE'd derivatives do not leave spurious flags, and add DXC-validated unit tests covering each flag and its negative guards. Part of xcl-dev#1401 Part of xcl-dev#1833 Assisted-by: Google Antigravity (Gemini 4 Neon)
|
Independent AMD RDNA4 (native wave64) test report on exact head Tested
Regression run (60 s retail-title smoke, (Matched Not tested
AI use
|
|
|
|
Verification on RTX 3060 Ti (Windows 11), branch merged with current
Thanks! |
bmjask
left a comment
There was a problem hiding this comment.
No concrete source-level defect found. Post-opt scans, stage gates, and 64-UAV detection look correct; focused SFI0/metadata/container tests and current Windows CI are green, with AMD/NVIDIA evidence. Residual gap is only the disclosed absence of a live title exercising VRS, inner coverage, or mesh implicit-LOD rendering; I found no blocker.
…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)
Emit four DXIL shader-flag and
SFI0feature bits inShader::try_finish_graphicsthatdxil.dllrequires when the corresponding graphics features are used:InnerCoverage,ShadingRate,DerivativesInMeshAndAmpShaders, and64UAVs. Part of #1401. Part of #1833.What is in it
crates/xcl/src/gpu/dxil/graphics.rs(Shader::try_finish_graphics):self.bindingswithResClass::Uav) and emit64UAVs(flags |= 1 << 15,sfi0 |= 0x8) across vertex, pixel, and mesh shaders whenever more than 8 static UAVs are bound (while preservingUavsAtEveryStage1 << 16/0x4for vertex shaders with any static UAV).ShadingRate(flags |= 1 << 24,sfi0 |= 0x8_0000) whenStage::Vertexoutputs orStage::Pixelinputs containSemKind::ShadingRate(excludingStage::Meshprimitive outputs, matching DXC).optimize()instructions onStage::PixelandStage::Meshto emitInnerCoverage(flags |= 1 << 10,sfi0 |= 0x400) whendx.op.innerCoverage.(op 92) survives, andDerivativesInMeshAndAmpShaders(flags |= 1 << 29,sfi0 |= 0x100_0000) when mesh derivative or implicit-LOD ops (dx.op.unary.ops83..=86,dx.op.sample.op60,dx.op.sampleBias.op61,dx.op.sampleCmp.op64,dx.op.calculateLOD.op81) survive; eliminated calls in unreachable blocks and dead-code-eliminated derivatives do not emit spurious flags.crates/xcl/src/gpu/dxil/graphics_tests.rs:ps_inner_coverage_sets_flag_only_when_live,shading_rate_sets_flag_for_vs_and_ps_but_not_ms,ms_derivatives_and_implicit_lod_set_flag_but_explicit_lod_does_not,graphics_64_uavs_flag_tracks_static_uav_count) assertingvalidate::validate, exactSFI0values, disassembly metadata flags, and negative guards (unreachable inner coverage, mesh primitive shading rate, explicitsample_leveland DCE'd mesh derivative, 8 static UAVs, and a single UAV at registeru8).Tested
dxil.dll1.9.2609.5, release build.graphics.rsfix (onorigin/main943043e): all 4 new tests failed (0 passed, 4 failedon missingSFI0bits).cargo test --release -p xcl --lib -- gpu::dxil::graphics::tests:: --nocapture:29 passed, 0 failed, 0 ignored(0.28 s,0skipped).XCL_ADAPTER=warp:29 passed, 0 failed, 0 ignored(0.03 s;0skipped on the 4 new tests,2pre-existing draw tests skipped:no wave64).cargo test --release --workspace --no-fail-fast -- --test-threads=4 --nocapture(RTX 4060):1367 passed, 0 failed, 46 ignoredacross24test 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 ingpu::dxil::graphics::tests).Regression run
main:
PR:
Not tested
d3d12SDKLayers.dll.AI use
graphics.rs, wrote the DXC-validated tests ingraphics_tests.rs, ran the test/smoke suites, and drafted this PR description.