8 Commits

Author SHA1 Message Date
bf1be4abee Merge pull request #227
Build replacement shaders for both descriptor heap sizes
2026-12-06 04:59:44 +05:30
ba86d2a9e9 Merge pull request #240
Shaders: keep d16 bits of heap-picked integer views; nearest float for normalized buffer codes
2026-12-06 04:58:47 +05:30
9c0d435c64 Build shader replacements for both descriptor heap sizes 2026-12-06 00:56:23 +02:00
38b3c2752b Merge pull request #265 2026-12-06 04:19:47 +05:30
4fc21bdbec shaders: e4a9f58e3acfcf7b, project quad lanes that miss the decal box
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>
2026-12-05 23:24:23 +01:00
dcdb19be80 shaders: rename local ByteAddressBuffer 'matrix' to 'mat_buf' for Windows SDK dxc.exe compatibility 2026-12-06 06:18:51 +08:00
7fbcda4bdb Shaders: d16 data of integer views keeps its bits; normalized buffer codes give the nearest float
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).
2026-12-05 22:58:40 +01:00
85b5b41a99 Initial import of larp source (commit 1c2a608, GPL-3.0-or-later) 2026-12-05 16:36:53 +05:30