Repository navigation
D3D12.X: drop conservative rasterization where the GPU has none - #2038
philip-roy-jones wants to merge 1 commit into
Conversation
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>
|
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! |
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
xcl-gpu run cargo test --locked -p xcl --lib conservative_raster -- --nocaptureone147de1, once withXCL_ADAPTER=RX 580and once withXCL_ADAPTER=warp. Each run returned 2 passed, 0 failed, 0 ignored and 0 skipped. A separateD3D12_OPTIONSquery reported tier 0 on the RX 580 and tier 3 on Microsoft WARP. The RX 580 dropped the flag and WARP kept it. Both created the pipeline. Removing the normalization call from the GPU test made it fail withE_INVALIDARGon the RX 580.cargo test --locked --workspace --no-fail-fast -- --test-threads=4:e147de1: 969 passed, 95 failed, 45 ignored; 60 SKIPPED.656c0e8: 967 passed, 95 failed, 45 ignored; 59 SKIPPED.SKIPPED …: no GPUfollowing earlier device removals. Both new tests ran in the focused RX 580 pass above.656c0e8exited with0xc0000409inamdxc64.dll. Its activity log recorded 191 presents before the crash. The final frame count is unavailable and peak commit was 11,429 MB. The PR head completed 60 s with 1,216 frames and 15,679 MB peak commit. It logged the conservative-raster downgrade and no graphics stand-in failure. It also completed a 120 s default run with 2,905 frames. Original smoke outputRegression run
Both release builds ran the same retail title on the RX 580 for 120 s with no input. Main can finish the comparison with synchronous pipelines. Both runs used
XCL_DIRECT_DXIL=1,XCL_ASYNC_PSO=0,XCL_PSO_PRELOAD=0andXCL_DXC_THREADS=2. Each started with an emptyXCL_DATA_ROOTand a separate copy of the same 3,300-fileXCL_DXIL_CACHEsnapshot, including driver blobs. Both used the same executable path. The earlier 60 s synchronous runs varied from 1 to 1,429 frames on main and from 289 to 820 on the PR with a shared writable cache.From each clean checkout,
cargo build --release --locked -p xcl, thenxcl-gpu run .\scripts\smoke.ps1 -Game <retail-folder> -Xcl <release-exe> -Title Retail -Seconds 120. The PR did not log a conservative-raster downgrade in this configuration. The default run above exercised it.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.🤖 Generated with Claude Code