D3D12.X: drop conservative rasterization where the GPU has none #2038
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!2038
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-2038"
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-25 01:31 UTC · original
philip-roy-jones:d3d12x-no-conservative-raster→main· +106 −1 · 2 files · 1 commits · openOn 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
@raylitebull on GitHub · 2026-11-25 01:33 UTC · original
Code review on
e147de1:conservative_raster(checkingD3D12_FEATURE_DATA_D3D12_OPTIONS::ConservativeRasterizationTier != D3D12_CONSERVATIVE_RASTERIZATION_TIER_NOT_SUPPORTED) andpc_conservative_rasteracrosstranslated_graphics_pso_once,standin_graphics, andgraphics_psocleanly dropConservativeRasteronly on GPUs without support (e.g., RX 580) while preserving it on supported hardware.an_unknown_device_keeps_conservative_rasterizationanda_pipeline_asking_for_conservative_rasterization_buildsverify both the null-device default and live adapter PSO creation.Build and test (Windows, no GPU)is currently running;PR descriptionfailed because themainxcl-smokeblock crashed before a frame (0xc0000409/frames shown: none logged).Remaining before merge:
Build and testfinishes green and resolvePR description(a baseline comparison block from a non-crashing configuration or maintainer override on the crash-fix exception).e147de1.@philip-roy-jones on GitHub · 2026-11-25 01:54 UTC · original
Both required checks now pass on
e147de1. The PR description includes the matched 120 s retail runs on the RX 580. Main showed 3,189 frames and the PR showed 3,313, with zero crashes and device removals on both. The original default-settings crash is documented under Tested. PR description check · Windows CIThe focused tests also ran on both conservative-rasterization paths on this machine. With
XCL_ADAPTER=RX 580(Radeon RX 580, driver 31.0.21925.1001, tier 0) andXCL_ADAPTER=warp(Microsoft WARP, tier 3),xcl-gpu run cargo test --locked -p xcl --lib conservative_raster -- --nocapturereturned 2 passed, 0 failed, 0 ignored and 0 skipped per adapter. WARP kept the flag and created the pipeline.The physical NVIDIA or RDNA run is still open. If someone with either adapter can run the focused test and
cargo test --locked --workspace --no-fail-fast -- --test-threads=4one147de1and post the GPU, driver and counts, that would cover the remaining review request.OpenAI Codex, GPT-6.2 Astra at maximum reasoning effort, ran the comparison and focused tests and wrote this follow-up.
@JJAutoCompare on GitHub · 2026-11-25 02:32 UTC · original
PR #2038 — D3D12.X conservative rasterization on Intel Arc A770
Tested live PR head
e147de1ed077ea8f641689523a954f1e266ad372fromrefs/pull/2038/headonxcl-dev/xcl. The worktree was clean at build time and after the run.origin/mainwascbc296ab65a2661a61e3e2da109134bcd5319f60.git merge-tree --write-tree origin/main HEADexited 0 and produced treedc46a30f21aff4a048daa125be47996d0a41eda9.What is in it
crates/xcl/src/hle/d3d12x/real.rschecks device support before requesting conservative rasterization for affected pipeline descriptors and adds two tests.README.mddocuments the fallback.Tested
DoublePrecisionFloatShaderOps=0. The test-title runner confirmed the A770 and DXC 1.9.2609.5. The assigned DXC/DXIL directory was%LOCALAPPDATA%\XclTooling\dxc-1.9.2609\bin\x64. Rust wasrustc 1.100.0 (0ef1bc386 2026-11-09). Dev and test profiles were unoptimized with debug info and incremental compilation disabled. Build output, temporary files, XCL data and the DXIL cache were directed to the assigned L: slot.cargo build --workspaceandcargo test --workspace --no-runboth exited 0 outside the GPU lock. Both emitted the existingAtomic::fetch_updatedeprecation warnings.cargo test -p xcl --lib hle::d3d12x::real::conservative_raster_tests::an_unknown_device_keeps_conservative_rasterization -- --exact --show-outputran outside the lock. 1 passed, 0 failed, 0 ignored, 0 skip markers.cargo test -p xcl --lib hle::d3d12x::real::conservative_raster_tests::a_pipeline_asking_for_conservative_rasterization_builds -- --exact --show-outputran underInvoke-ArcTest.ps1. 1 passed, 0 failed, 0 ignored, 0 skip markers. The descriptor passed the support assertion and the A770 accepted the graphics PSO. The fallback log message did not appear.cargo test --workspace --no-fail-fast -- --test-threads=4 --show-outputran once underInvoke-ArcTest.ps1and exited 101. Across 20 test result summaries, libtest reported 1038 passed, 26 failed, 45 ignored. It emitted 26 skip markers across 16 distinct tests. The raw pass count includes tests that returned after a skip and optional sample tests that returned early. Skipped cases contribute no coverage. Both PR-specific tests also passed in this run.CreateComputePipelineStatereturned0x80070057; several of those tests exercise f64. The other four failed assertions for FMA contraction, implicit mip LOD, f16 lane preservation, and whole-wave pixel reductions. Thee2etarget had one failure:test_title_runs_and_game_folder_is_untouchedread blue where the dynamic depth bias check expected green. A main baseline would be needed to establish whether these failures are regressions.L:\XclTooling\neon-slot-1\tmp:pr2038-build.log,pr2038-targeted.log,pr2038-suite.log.Skip markers
Each entry below is from the workspace run. Some tests report a reason for each skipped case.
Not tested
XCL_SAMPLE_*inputs were unset.AI use
pr2038-suite.logand published this report.@JoaoPauluu on GitHub · 2026-11-25 02:33 UTC · original
A regression run under Wine on Linux on the retail title: no device removal, no crash, frames level with
main(1353 here, 1357 and 1365 on the twomainruns). This GPU has conservative rasterization, so the new path (and itsno conservative rasterizationlog line) is not reached here; this is a regression run only.Tested
x86_64-pc-windows-gnu.e147de1as it is (based on656c0e8) andmaincbc296a, no uncommitted changes. Retail title 1.0.2.1,scripts/linux/smoke.sh(#257) for 60 s, no input. Runs in order: main, this PR (with other PRs in between), main.Regression run
main (first run):
this PR:
The second
mainrun: 1365 frames,exit: 0x0, no device removal, no crash. Under Wine,peak commitreads 0 MB, so these blocks do not check memory.Not tested
AI use
@DavidM1911 on GitHub · 2026-11-25 04:28 UTC · original
Verification on RTX 3060 Ti (Windows 11), branch merged with current
main:cargo test -p xcl --lib: all passed, 0 failed, ~26 ignored. (Intermittent single-test flake / 0xc0000005 abort under parallel scheduling — tracked in #1978; clean on single-threaded rerun.)Thanks!
@raylitebull on GitHub · 2026-11-25 10:44 UTC · original
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.
@raylitebull on GitHub · 2026-11-25 18:28 UTC · original
Review update on
ba5a120: clean rebase (MERGEABLE/CLEAN) and both CI checks are green, with exact-head RX 580 + WARP tests and RX 580 smoke verified.Remaining before merge: Fresh NVIDIA verification on the rebased
ba5a120head (prior NVIDIA runs were one147de1).@tiagonleal on GitHub · 2026-11-25 18:58 UTC · original
Verification on NVIDIA RTX 5070 Ti (Windows 11), rebased head
ba5a1207830b11a9ae2a79c58a1d84f958ab3c11: bothconservative_rastertests pass; the workspace run has 4 DXIL fuzz failures that also fail onmainTested
ba5a1207830b11a9ae2a79c58a1d84f958ab3c11(git rev-parse HEADof a clean detached worktree, no local changes, built as is). The PR was open and the head unchanged when I started and again before writing this. The earlier NVIDIA runs in the thread were one147de1. Base for the comparison below:1a0bbe3a2ba91ea8f5b6fc29130a053868d3c9e6(the parent ofba5a120).cargo test --release --locked -p xcl --lib conservative_raster -j 8 -- --nocapture --test-threads=1: 2 passed, 0 failed, 0 ignored:a_pipeline_asking_for_conservative_rasterization_buildsandan_unknown_device_keeps_conservative_rasterization. I did not query the adapter's conservative-rasterization tier myself.cargo build --release --locked --workspace, thencargo test --release --locked --workspace --no-fail-fast -j 8 -- --test-threads=4: 1248 passed, 4 failed, 46 ignored over 23 test binaries; 24SKIPPEDlines (no wave64, no heap windows and similar); exit 101. The 4 failures are all in-p xcl --lib:gpu::dxil::fuzz_tests::fuzz_validate_and_gpu_0to_3, eachCreateComputePipelineState: Not enough memory resources are available to complete this operation. (0x8007000E)atfuzz_tests.rs:1167(seeds 70, 545, 1019, 1507).fuzz_validate_and_gpu_0alone, 3 runs with--test-threads=1: failed 3 of 3, same seed 70 and same error. On base1a0bbe3(release) it fails the same way, and onba5a120in the debug profile too. So the failure is the same with and without this PR on this machine; it looks like the one in #1905 (RTX 5060), but I have not established the cause. The run of the other three fuzz tests on base was not repeated.Not tested
xcl-smokeon this head,XCL_SAMPLE_*inputs (unset).Run and written with Claude Code (Claude Fable 5.2 and Claude Sonnet 5.5).
@ClosetPie107 on GitHub · 2026-11-25 19:54 UTC · original
Independent AMD RDNA4 / Linux (RADV, native wave64) test report for head
ba5a1207830b11a9ae2a79c58a1d84f958ab3c11(merged cleanly ontomain2898511).Hardware & environment
experimental-11.0-20261112),vkd3d-protonmasterec207194(3.2.0) +dxil-spirvb540c8a2+ relaxed-vtable patch (-Db_ndebug=true), DXVKv3.1.1-209, DXC1.9.2609.5, Rustx86_64-pc-windows-gnu(debug)Unit / GPU tests (
XCL_REQUIRE_GPU=wave64,XCL_DXC_DIR,VKD3D_CONFIG=ignore_shared_fence,--test-threads=1 --nocapture)hle::d3d12x::real::: 60 passed, 0 failed, 0 ignored (0 skipped; coversconservative_raster_testson the RX 9070)Not tested
AI use
main, ran the tests under Proton on this machine, and drafted this report.@DavidM1911 on GitHub · 2026-11-26 07:05 UTC · original
Re-verification on RTX 3060 Ti (Windows 11), new head merged with current
main:cargo test -p xcl --lib: all passed, 0 failed, 27 ignored. The earlier merge conflict is resolved.Thanks!
— Devin
@bmjask on GitHub · 2026-11-25 20:16 UTC · original · reviewed
No concrete defect found. The fallback preserves conservative rasterization on unknown/query-failure devices and drops it only for NOT_SUPPORTED, across the relevant creation paths. The focused test proves creation rather than visual output; please retain the disclosed residual risk that downgraded draws have not been visually validated, especially at nontrivial coverage edges.
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.