D3D12.X: drop conservative rasterization where the GPU has none (amd-dev port of #2038) #2589
No reviewers
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
goal:world-load
good first issue
help wanted
invalid
keep-open
off-goal
question
stale
test-only
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/xcl-dev--xcl!2589
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/2589/head"
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?
@philip-roy-jones on GitHub · 2026-11-26 00:38 UTC · original
philip-roy-jones:d3d12x-no-conservative-raster-amd-dev→amd-dev· +109 −1 · 2 files · 1 commits · closed without mergingPort of #2038 to amd-dev.
On a GPU without conservative rasterization, D3D12 refuses every graphics pipeline that asks for it. The Radeon RX 580 (AMD Polaris, feature level 12_0) reports conservative rasterization tier 0. With the debug layer on, each refusal says
ID3D12Device::CreateRasterizerState: Device does not support Conservative Rasterization (pRasterizerDesc specifies D3D12_CONSERVATIVE_RASTERIZATION_MODE_ON)(id 647). The shaders do not matter. amd-dev passesConservativeRasterthrough unchanged, so the translated pipeline, its stand-in and the dummy fallback are all refused.On this RX 580, in a retail title run on amd-dev
04e0b95, the first such pipeline came at 79.2 s. It was refused in all three forms, and the process ended with0xc0000409about 5 s later. After the translated pipeline is refused,graphics_psohands the title's own description, console shaders included, to the driver. Windows Error Reporting has many records of this exit for this PC's XCL builds, inamdxc64.dll31.0.21925.1001 at offset0x14e8d85. Keeping console bytecode out of the driver on that path is a separate change. This PR removes the refusal itself, so those pipelines are built.XCL now reads the tier from
D3D12_OPTIONS. Where the GPU has none, it turns conservative rasterization off in the graphics descriptions it makes: the translated pipeline, the stand-in and the dummy fallback. The draws of those pipelines then cover the pixels whose centres their triangles cover, not every pixel a triangle touches, so their edges can differ from the console's. Nothing changes on a GPU that reports a tier. Feature level 12_1 requires tier 1, so only feature level 12_0 GPUs such as this one take the new path.Part of #1833. Related: #2038 (the same change for
main), #303.What is in it
crates/xcl/src/hle/d3d12x/real.rs:conservative_raster(the device's tier) andpc_conservative_raster, called next topc_topology_typefor the translated pipeline, the stand-in and the dummy fallback. It counts the pipelines it drops the flag on inxcl.log(the first five and every 1000th), so a run shows how many there were. #2038 logs it once.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
08db802, amd-devbf02341and this heade087311(cargo build --release --locked -p xcl, each from a clean checkout into its own target directory): all exit 0, no new warnings.cargo test --locked --workspace --no-runon the head: exit 0.Regression run
08db802, amd-dev basebf02341and this head, 300 s each, back to back.Not tested
AI use
claude-opus-5-5, reasoning effort max) wrote this port, its log change and the tests' adaptation to amd-dev, ran the builds, tests and title runs on the RX 580, wrote this description, and opened this PR on Philip's instruction. The original change and its tests (#2038) were also written by Claude Code with Claude Opus 5.5. Reviewed on Philip's behalf.🤖 Generated with Claude Code
@philip-roy-jones on GitHub · 2026-11-26 00:43 UTC · original
Closing this: #2038 already makes this change on main, and amd-dev takes in main regularly.
Pull request closed