d3d12_xs: eager blendclamp leaves R32G32B32A32_FLOAT targets alone #320
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/320"
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?
Imported from omonkeyz/xbox-emulator. Originally posted by enderrr9 on 2026-11-23T18:19:28Z.
Fixes the BLOCKERS.md entry "eager blendclamp also clamps R32G32B32A32_FLOAT (fmt 2) to +-65504 ... looks unintended".
Bug
blendclamp::small_float()listed DXGI format 2 (R32G32B32A32_FLOAT) next to the fp16 formats. So withTOMBOX_BLEND_CLAMPin eager mode, every blended fp32 target was clamped to ±65504, the fp16 range. ps mode (shader_xlat::export_kind) already leaves format 2 alone, andps_clamp_kinds_only_change_the_small_float_formatspins that.Fix
small_floatnow lists 10/34/54 (fp16) and 26 (R11G11B10), the same formats ps mode clamps. It's a one-line change.Test
New:
blendclamp_hw::warp_blendclamp_leaves_fp32_targets_above_the_fp16_range. It's a WARP test,#[ignore]d like the other blendclamp GPU tests:cargo test -p d3d12_xs --lib warp_blendclamp -- --ignored. It makes three additive draws (40000, 40000, 1) on anR32G32B32A32_FLOATtarget:0x477fe000), with clamp passes runbpp()andchannels()in the test kit learn the 16-byte format.The existing
warp_blendclamp_lazy_matches_eager_for_an_additive_chain_that_overflows_to_infandwarp_ps_clamp_matches_eager_blendclamp_for_shader_inf_and_nanstill pass.cargo test -p d3d12_xs --lib: 666 passed, 2 failed. Both failures are unrelated to this change:fixed_result_dxgix_exports_match_every_console_d3d12_xsneeds a consoled3d12_xs.dllunderD:\xbox-pc-port\games;one_megabyte_detiles_on_one_thread_in_a_few_msis a timing test that took 26 ms on this laptop in a debug build.pr_gate.py: 3 files, 0 problems.🤖 Generated with Claude Code
Imported from omonkeyz/xbox-emulator. Originally posted by omonkeyz on 2026-11-25T13:49:36Z.
Applied on main in
92c998d(cherry-picked onto the current history with your authorship kept; comment lines stripped per CONTRIBUTING). Thank you.Pull request closed