Repository navigation
DXIL: set DisableMathRefactoring when lowering unfused mad without FMad - #1973
Conversation
|
Full-suite run, since this PR has no test report yet. Tested exact head Tested
Not tested
AI use
|
|
Update: Rerun on the new head Passes on an RTX 3060 (Ampere). The new tests fail without the fix. One gap: The cache. This PR changes the emitted containers (entry flags bit 1) for every program with an unfused What this run adds to the RTX 5070 Ti report above:
Hardware: RTX 3060 12 GB, driver 610.88, Windows 11 Pro 26300, Rust 1.100.0 MSVC, DXC / dxil 1.9.2602.17, debug. Not tested: AMD, a release build, AI use: Claude Code (Claude Opus 5.5) ran the tests and wrote this report. |
cda8355 to
7dfa64c
Compare
|
Thanks for catching that, @fromthemoonx! Updated Verified with |
7dfa64c to
aaf2c78
Compare
|
Rebased Verified with |
|
Test report for head Tested
Not tested
AI use
|
|
Tested Clean head
$env:CARGO_TARGET_DIR = 'L:/XclTooling/pr1512-tiling-edges-fddfa267/target'
$env:CARGO_INCREMENTAL = '0'
$env:CARGO_PROFILE_DEV_DEBUG = '0'
$env:CARGO_PROFILE_TEST_DEBUG = '0'
$env:TEMP = 'L:/XclTooling/pr1973/run-aaf2c78-20261125T031023096Z/temp'
$env:TMP = $env:TEMP
$env:XCL_DXC_DIR = 'C:/Users/ljensen/AppData/Local/XclTooling/dxc-1.9.2609/bin/x64'
& 'C:/Users/ljensen/.cargo/bin/cargo.exe' +stable-x86_64-pc-windows-msvc test --locked -p xcl --lib -j 2 gpu::dxil::prelude::disable_math_refactoring_tests:: -- --nocapture --test-threads=1Result — 5 passed, 0 failed, 0 ignored, 0 skipped, 1,038 filtered out. Cargo exited 0. The five tests reached seven explicit DXIL validator calls and seven matching disassemblies, with zero validator skips.
Not tested GPU execution, driver-level contraction or numerical parity, disk-cache behavior, malformed inputs, the full suite, release builds, and retail-title smoke runs. AI use T3 Code / Codex ( |
|
Verification on RTX 3060 Ti (Windows 11), branch merged with current
Thanks! |
|
Regression run of Against the limits in CONTRIBUTING.md: 104 % of AMD Radeon RX 9070 (RDNA4, driver 32.0.32029.2010), Ryzen 7 7800X3D, 32 GB, Windows 11 build 26300, Rust 1.100.0, AI use: Claude Code (Claude Opus 5.5) built both trees and ran |
|
Thanks @Toons29 for the exact-head RX 9070 60 s Re |
Brings main to full parity with upstream/main (cdb0891), including: - World rendering & gameplay: xcl-dev#1991, xcl-dev#1988, xcl-dev#1984, xcl-dev#2028, xcl-dev#2078 - Memory / VRAM / PSO: xcl-dev#1985, xcl-dev#2157, xcl-dev#2178, xcl-dev#2195, xcl-dev#2176, xcl-dev#1996, xcl-dev#1914 - Direct DXIL & shaders: xcl-dev#2120, xcl-dev#2174, xcl-dev#2194, xcl-dev#2207, xcl-dev#1951, xcl-dev#1973, xcl-dev#2156, xcl-dev#2064 - Preserves local Linux/Wine customizations: docs/linux.md, scripts/linux/*, in-process Wine XAsync (xgameruntime/api.rs), loader watchdog bypass, and Wine MEM_WRITE_WATCH bypass on coherent UMA windows (gpu/uma.rs). Assisted-by: Antigravity (Gemini 4)
Sets the DXIL entry-point
DisableMathRefactoringflag (bit1,SFI0 = 0) when the direct DXIL translator lowers unfusedmad_nf(V_MAD_F32/V_MAC_F32), unless the optimized module still emits livedx.op.tertiary.*FMad(opcode46) calls (which DXIL validation forbids combining withDisableMathRefactoring).Part of #1269.
What is in it
crates/xcl/src/gpu/dxil/kernel.rs: bumpTRANSLATOR_VERSION(8->9; merges cleanly withmain, whereXCL_DIRECT_DXIL_SOURCE_IDfrom Recompiler: direct DXIL cache entries change when its sources do #1947 now automatically invalidates direct-DXIL disk caches ongpu/dxilsource changes).crates/xcl/src/gpu/dxil/shader.rs: addFeature::DisableMathRefactoring(metadata_bit = 1,container_bit = 0) andShader::feature_flags()+Shader::uses_fmad()soDisableMathRefactoringis omitted whenever post-optimize()IR still containsdx.op.tertiary.*opcode46(FMad).crates/xcl/src/gpu/dxil/graphics.rs: route entry-point shader flag computation throughself.feature_flags().crates/xcl/src/gpu/dxil/prelude.rs: requireFeature::DisableMathRefactoringinLw::mad_nf, and adddisable_math_refactoring_tests(5 tests covering compute/pixel unfused mad, liveFMadsuppression, plainv_add_f32, and post-DCE deadFMad).Tested
rustc 1.99.1 (58cf8f9c3 2026-10-13), DXCdxcompiler 1.8.2502.11/dxil 1.8.2502.11, rebased cleanly onto656c0e8(aaf2c78).cargo check --workspace --tests: passed.cargo test -p xcl --lib disable_math_refactoring_tests: 5 passed, 0 failed (dxil 1.8.2502.11validated).aaf2c78:@fromthemoonx(NVIDIA RTX 3060):1067 passed, 0 failed, 45 ignored,disable_math_refactoring_tests10/10.@DavidM1911(NVIDIA RTX 3060 Ti):cargo test -p xcl --libpassed,0failed.@pablogonz12(AMD RX 9070 XT, Linux/Wine/RADV):+5/5disable_math_refactoring_tests,0regressions vs base.@JJAutoCompare:disable_math_refactoring_tests5/5passed withdxil 1.9.2609.5.@Toons29(AMD Radeon RX 9070): 60 sscripts/smoke.ps1pair passed (1634vs1566frames,0device removals,0crashes).Regression run
60 s
scripts/smoke.ps1pair on exact headaaf2c788vsmain568e7db7(AMD Radeon RX 9070, driver 32.0.32029.2010, Windows 11 26300, release,XCL_NETWORK=0on a retail title), contributed by@Toons29:main:
this PR:
Not tested
AI use