Repository navigation
Recompiler: direct DXIL asks for flushed f32 denormals - #1707
MarcosMDev wants to merge 1 commit into
Conversation
, xcl-dev#1709 and update README Integrates four new rendering and direct-DXIL PRs on top of c160d86: - xcl-dev#1679: Direct DXIL geometry mode, MSAA loads, and directed f32 rounding - xcl-dev#1707: Direct DXIL entry function fp32-denorm-mode=ftz (bumped TRANSLATOR_VERSION to 6) - xcl-dev#1709: pixel shader ordered sections via rasterizer ordered views (ROVs) - xcl-dev#1705: recover poisoned report crash/write locks instead of dropping report Verified under GE-Proton11-14 + vkd3d-proton ec20719452e916b: - Release build (x86_64-pc-windows-msvc): ok (31.38s) - Proton tests (gpu::dxil::tests::, gpu_ps_ordered_section_*, ordered_section_images_*, report::tests): 9 passed, 0 failed, 0 skipped.
89bb4fb to
540d965
Compare
|
Native Windows GPU test of Tested
Not tested Retail frames, the separate guarded-value optimization mentioned in the description, or explicit RDNA2 denormal mode changes. AI use OpenAI Codex (GPT-6 family, exact variant unavailable) wrote the temporary probe, ran the tests, checked the logs, and wrote this report. |
The entry function carried no fp32-denorm-mode, which leaves f32 denormals to the driver. On an RTX 4060, removing guard selects (a local experiment) changed whether v_fmac_f32 results were flushed; with the attribute the results matched a CPU simulation and the HLSL path. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
540d965 to
21c653f
Compare
|
Verification on RTX 3060 Ti (Windows 11), branch merged with current
Thanks! |
|
Closing: this is preventive, I found no wrong result on |
Part of #1269. The direct backend's entry function carries no
fp32-denorm-mode, so the driver may flush or keep f32 denormals per operation. This asks forftz.Preventive: I found no wrong result on
mainitself. On an RTX 4060, a local pass that reads guarded values past theirselect(not part of this PR) gave wrongv_fmac_f32+v_xor_b32results in 65 of 2204 lanes without NaN, against a CPU simulation that flushes denormals. Without the pass, and on the HLSL path, 0. With this attribute, 0 of 1502 in a new random run. These lane counts were measured onc160d86, before #1693 and0b64aa0, and not repeated. Other passes that remove guards may meet the same.What is in it
gpu/dxil/module.rs: attribute group 5, on the defined (entry) functiongpu/dxil/kernel.rs:TRANSLATOR_VERSION7 (the containers change;mainhas 6)gpu/dxil/tests.rs: the disassembly has the attribute on the entry function (fails without the change)Tested
cargo test --workspace -- --test-threads=4: 960 passed, 0 failed, 43 ignored; 23 SKIPPED lines: 18 no wave64, 3 per-lane programs refused (f16 / conversions),pso_measurement_compiles_an_exact_synthetic_record(driver cache cannot be disabled, no Developer Mode),heap_window_out_of_memory_falls_back_to_the_switch_form(no heap windows)XCL_DIRECT_DXIL=all cargo test -p xcl --lib gpu:: -- --test-threads=4: 441 passed, 0 failed, 19 ignoredRegression run
Both with
XCL_DIRECT_DXIL=all, main first. main:This PR:
Not tested
s_denorm_modeis ignored today, and FSSM float modes are not consulted here.mainc160d86) had 14 direct shaders (7 PS, 7 VS), no CS.AI use