Repository navigation
D3D12.X: drop conservative rasterization where the GPU has none - #2038
philip-roy-jones wants to merge 1 commit into
Conversation
|
Code review on
Remaining before merge:
|
|
Both required checks now pass on The focused tests also ran on both conservative-rasterization paths on this machine. With The physical NVIDIA or RDNA run is still open. If someone with either adapter can run the focused test and OpenAI Codex, GPT-6.2 Astra at maximum reasoning effort, ran the comparison and focused tests and wrote this follow-up. |
PR #2038 — D3D12.X conservative rasterization on Intel Arc A770Tested live PR head What is in it
Tested
Skip markers Each entry below is from the workspace run. Some tests report a reason for each skipped case. Not tested
AI use
|
|
A regression run under Wine on Linux on the retail title: no device removal, no crash, frames level with Tested
Regression run main (first run): this PR: The second Not tested
AI use
|
|
Verification on RTX 3060 Ti (Windows 11), branch merged with current
Thanks! |
|
Update: #2038 now has AMD RX 580 + Intel Arc A770 + NVIDIA RTX 3060 / 3060 Ti verification on e147de1, and recent merges on main introduced a merge conflict (DIRTY). @philip-roy-jones — please rebase onto latest main so CI runs cleanly. |
The RX 580 (AMD Polaris) reports no conservative rasterization tier, and its driver refuses every pipeline that asks for it with E_INVALIDARG: the translated pipeline, its stand-in and the dummy fallback alike. In a retail title run on main (80f4819, with logging added), all 12 stand-ins with ConservativeRaster on were refused and all 54,193 without it were made. After the translated pipeline was refused, graphics_pso handed the title's own description, console shaders included, to the driver, and AMD's shader compiler ended the process with 0xc0000409 before the first frame (xcl-dev#303 guards that path on its own). XCL now asks D3D12_OPTIONS for the tier and turns conservative rasterization off in the descriptions it makes (translated, stand-in, fallback) where the GPU has none. Those draws then cover the pixels whose centres their triangles cover. On the RX 580 the title ran its menus for 120 s at 30 fps with default settings, with no pipeline refused. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
e147de1 to
ba5a120
Compare
On a GPU without conservative rasterization, the driver refuses every graphics pipeline that asks for it. The Radeon RX 580 (AMD Polaris) is one such GPU. It reports
D3D12_CONSERVATIVE_RASTERIZATION_TIER_NOT_SUPPORTED, and its driver returnsE_INVALIDARGfor the translated pipeline, its stand-in and the dummy fallback alike. In a diagnostic run of the retail title on main80f4819(logging added around the stand-in calls), all 12 stand-ins withConservativeRasteron were refused and all 54,193 without it were made.On this RX 580 the failure also ends the process. After the translated pipeline is refused,
graphics_psopasses the title's own description, console shaders included, to the driver, andamdxc64.dllfast-fails (0xc0000409at offset0x14e8d85, driver 31.0.21925.1001) before XCL writes its final frame count. #303 keeps console bytecode out of the driver on that path. This PR removes the refusal itself, so those pipelines are built and drawn.XCL now reads the tier from
D3D12_OPTIONS, and where the GPU has none it turns conservative rasterization off in the graphics descriptions it makes. Those draws then cover the pixels whose centres their triangles cover.Part of #1833. Related: #303.
What is in it
crates/xcl/src/hle/d3d12x/real.rs:conservative_raster(the device's tier) andpc_conservative_raster. The latter is called next topc_topology_typefor the translated pipeline, the stand-in and the dummy fallback, and logs once when it drops the flag.crates/xcl/src/hle/d3d12x/real.rs:conservative_raster_tests. An unknown device keeps the flag, and a pipeline that asks for conservative rasterization builds on the test GPU.README.md: one sentence in the GPU notes.Tested
ba5a120and main1a0bbe3. Radeon RX 580 8 GB, driver 31.0.21925.1001, Ryzen 7 7700X, 32 GB, Windows 11 Pro 26200.9974, Rust 1.100.0 MSVC, Windows SDK DXC 1.8.2502.11. Debug tests and release title runs. OptionalXCL_SAMPLE_*inputs were unset.cargo build --locked --workspace,cargo test --locked --workspace --no-runandcargo build --release --locked -p xclsucceeded.ba5a120,xcl-gpu run cargo test --locked -p xcl --lib conservative_raster -- --nocapturewithXCL_ADAPTER=RX 580andXCL_ADAPTER=warpgave 2 passed, 0 failed, 0 ignored and 0 skipped per adapter. The RX 580 dropped the flag and WARP kept it. Both built the pipeline. A separate D3D12 query reported tiers 0 and 3 respectively.xcl-gpu run cargo test --locked --workspace --no-fail-fast -- --test-threads=4withXCL_ADAPTER=RX 580exited 101 on both commits.1a0bbe3ba5a120The same 114 tests failed by name and error category on both commits. 107 reported device removal (
0x887A0005), 6 reported invalid arguments (0x80070057), and the sparse-VRAM test failed its GPU address assertion. Libtest counts a test that returns after printing SKIPPED as passed. The extra PR skip was the new GPU test reportingno GPUduring the full run. It passed separately above.RX 580 skip reasons
With default pipeline settings and the same starting cache, main fast-failed in
amdxc64.dll(0xc0000409, offset0x14e8d85) before writing its final frame count. The PR logged the downgrade and finished 60 s with 1,107 frames, 15,185 MB peak commit, 0 device removals and 0 crashes. On the original heade147de1, removing the normalization call from the focused GPU test reproducedE_INVALIDARGon this RX 580. That revision completed the previous default 60-second menu run with 1,216 frames. Original smoke outputRegression run
Both clean release builds ran the same retail title for 60 s without input on the RX 580. Each started with an empty data root and a separate copy of the same 3,300-file shader and driver cache. The executable path was the same. The paired settings were
XCL_ADAPTER=RX 580,XCL_DIRECT_DXIL=0,XCL_ASYNC_PSO=0,XCL_PSO_PRELOAD=0,XCL_DXC_THREADS=2. The default-pipeline run above exercised the downgrade. The synchronous PR run did not log it.xcl-gpu run .\scripts\smoke.ps1 -Game <retail-folder> -Xcl <release-exe> -Title Retail -Seconds 60 -OutDir <run-output>Main
1a0bbe3PR
ba5a120The earlier synchronous direct-DXIL settings (
XCL_DIRECT_DXIL=1) lost the device during the same sequence of translated compute pipeline creations on both builds. At 120 s, main exited0x887a0020at 95.084 s and the PR exited0x887a0020at 42.550 s. At 60 s both exited0x887a0020at 31.908 s and 31.817 s respectively. Each run reported one device removal and ended before writing a final frame count.Not tested
AI use
claude-opus-5-5; its reasoning-effort setting is not visible to it). It ran the title and diagnostic builds on the RX 580, found the cause, and wrote the change, the tests and the original description. Philip Roy Jones asked for this PR, and it is opened from their account.e147de1, OpenAI Codex, GPT-6.2 Astra at maximum reasoning effort, rebuilt the PR and its base, ran the matched RX 580 comparison, checked the two adapter tiers, ran the focused RX 580 and WARP tests, and updated the test evidence.🤖 Generated with Claude Code