CS_ProjDecalResolve_Scalarized took, for a quad lane in the loop that failed
the decal's box test, the registers the pass's head wrote (0, cz, cx, cy, a
half of the decal's dword 0xd0 + P) as its texture coordinate for the coarse
derivatives. Those are world positions, not coordinates: at render widths
that are not a multiple of 128 (3440 x 1440 native, 2288 x 960 under DLSS
quality at 3440) the ground showed black 8 x 8 tiles. Now such a lane gives
the coordinate projected at its own position for this decal, as
c4183d3cbee28e8e (the vectorized resolve) already does.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Ported from cool_fox 9a6c829d6 (VIctory 4243a96a, da82e444).
- d16 typed accesses through a view the program picks from the view heap:
the host marks typed buffer views of UINT/SINT formats in the table of
strides (VIEW_INTEGER, VIEW_SIGNED in bits 31/30, larp-gpu
descriptor/host.rs view_kind), and lower.rs integer_view reads the marks:
d16 stores zero-/sign-extend each 16-bit channel and d16 loads keep the
low 16 bits, instead of converting halves (the face network keeps its
tensors in R16G16B16A16_UINT / R16_UINT views). halves.rs's unsigned-twin
path for fixed table places is unchanged and taken first. Every reader of
the stride masks the marks off (VIEW_STRIDE_BITS): slot_stride, and the
four replacement shaders that read t255 directly.
- format_load: UNORM/SNORM codes of up to 16 bits give the float nearest
their quotient (norm_quotient, exact_norm) instead of the host's division,
which the RX 7900 XT does one ulp off (8-bit code 3 one ulp high; 16-bit
257 truncated back to 256); the ends stay exactly 1.0 and -1.0.
- Tests (emit/buffer_tests.rs): the quotient method against the exact
nearest float for every code of widths 2-16 (CPU), and synthetic programs
run on the host GPU and WARP: normalized ends, nearest quotients,
truncation back to the code, d16 data of heap-picked UINT/SINT/FLOAT
views; larp-gpu: the marks in the table of strides.
Every shader is translated anew (lower.rs and shader.rs are hashed).
Keep upstream HDR10 presentation while selecting correctly sized shader replacements.
The masked FP16 wave-sum work overlaps PR #23 and its larp-linux ports.