diff options
| author | sanuk369 <224479491+quackottu@users.noreply.github.com> | 2026-11-22 11:53:58 +0530 |
|---|---|---|
| committer | sanuk369 <224479491+quackottu@users.noreply.github.com> | 2026-11-22 11:53:58 +0530 |
| commit | 7d764b9e0d1a31366738b568659d9bf044efb60e (patch) | |
| tree | 9cede113d571ef8bc60df04c2c36f67f65dab2eb /runtime/src/pe_loader.cpp | |
| parent | 43d470316ec6cbcd64002bc3792998d9f5745dac (diff) | |
uav_clear: float clears to 16-bit and 11/10-bit floats round toward zero and saturate, as D3D does
small_float rounded to nearest even and turned any too-large value into
infinity. D3D11.3 3.2.2 says float-to-float conversion rounds toward zero
and a finite value too large becomes the largest finite (only infinity
stays infinity); ClearUnorderedAccessViewFloat on WARP and on NVIDIA
gives exactly that: R16 70000 or 65520 -> 0x7bff, 1e-7 -> 0x0001,
R11G11B10 (1e6, 1e6, 1e6) -> 0xf7fdffbf, B = 1/3 -> 0x1aa. The layer wrote
infinity (which a shader then turns into NaN) and rounded up.
d3d12_uav_clear_test's conversion checks asserted the old rule for 65520
and 1e-7; they now hold the host values, with overflow, infinity and
R11G11B10 cases added.
Diffstat (limited to 'runtime/src/pe_loader.cpp')
0 files changed, 0 insertions, 0 deletions