A shader whose only f64 instructions are v_add_f64, v_mul_f64, v_cvt_f64_f32 and v_cvt_f32_f64 no longer needs shaderFloat64: the SPIR-V backend emits them as exact IEEE binary64 operations on 64-bit integers (round to nearest even, denormals kept), with the same NaN rules as the native path. Any other f64 instruction still needs the device's Float64 capability.
Carry the RoundEven and unordered NOT_EQUAL fixes from #907, with
ThisIsAkill's invitation, onto the current constant-zero comparison path.
Keep TRUNC_COORD accepted for that path and retain the newer format rules.
Exercise array rounding through converted unorm sampling, where selecting
the wrong layer changes the result. Preserve zero comparisons for half-float
NaNs, signed zero, GREATER, NOT_EQUAL and TRUNC_COORD. Record the inherited
RDNA2 measurement basis and the limits of these host tests.
Co-Authored-By: Akhil Moola <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
A PS4 Pro (GCN, firmware 10.71) returns the input times 0x40c90fd5 for
every v_sin_f32 input below 0x39c00000 (1.5 x 2^-12 of a turn) and for
none at or above it, over 12,288 consecutive inputs of each sign across
that boundary and 65,536 random inputs from 2^-24 to 1 turn. The linear
band from 909281c994 ends at 2^-12, as measured on RDNA2, so PS4 guest
shaders took the driver sine or the series in [2^-12, 1.5 x 2^-12),
where the PS4 is 5 ULP away from the true sine.
PS4 guest shaders now keep the integer band of v_sin_f32 up to
0x39c00000. The half- and quarter-turn bands keep 2^-12: there the PS4
is within 6 ULP of the f32 2pi term and is not linear. PS5 shaders are
unchanged.
GcnSinNearZero runs a GCN compute kernel over PS4-measured inputs; it
fails without the change (0x39bf48b8 gives 0x3b163be8, the PS4 returns
0x3b163bed).
Co-Authored-By: Claude Opus 5.5 <[email protected]>
The 64-bit clamp output modifier compared the double with 0.0 and
1.0 and selected between it and the constant. AMD's Windows driver
32.0.32015.x crashes compiling that pattern on RDNA 4 (#7451).
Pick the result from the value's bits instead: NaN or a set sign
gives +0.0, a high word at or above 1.0's gives 1.0, and any other
value is kept. That is the same result for every input.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
ResourceTracker masks the adjust bit before deciding cubeFaceSample, so the 2D
MSAA plane read takes image_sample_a. That predicate also feeds the cube-face and
2D-array-through-3D modes, which nothing has measured with _a. An image now
records adjustedSample when any of its samples sets the bit, and those two modes
refuse it. Disk cache format 50 for the new ImageResource field.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
NativeCachePath_nid_no_patch returned a path that already started with
\.\ unchanged. Unlike \?\, a \.\ path is still parsed by Win32 and
limited to MAX_PATH, so with ANYPS5_SHADER_CACHE_DIR=\.\C:\... and a
moderately deep root (a ~140-character TEMP is enough) the versioned
cache entries crossed 260 characters and could not be written.
A \.\ path now goes through GetFullPathNameW like the others, and a
drive path in that form (\.\X:\...) becomes the equivalent \?\X:\...;
other device names are kept as they are.
Co-Authored-By: Claude Opus 5.5 <[email protected]>