Commit Graph

8 Commits

Author SHA1 Message Date
e6f8478e9b D3D-62: create the converter on every GPU; merge with the concurrent-queue test
The converter was made only where the GPU lacks D24_UNORM_S8_UINT (1c5463b4). 96-bit textures need it on every
GPU, so it is always created; it costs nothing until a copy uses it (lazy pipeline, lazy tracker lock).

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-22 11:26:48 +01:00
0723014a83 D3D-62: converter split test, COPY queue, footprint refusal, ctest skip
- depth24_convert_test: 96-bit texels split into rows (1 KiB range) and slices (1 MiB range).
- d3d12_rgb96_test: an upload and a readback on a COPY queue; GetCopyableFootprints refuses what creation
  refuses (as WARP); returns 77 without a Vulkan GPU or WARP so ctest skips; large timings behind LEONIDA_RGB96_LARGE.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-22 11:26:48 +01:00
4f4fc5ecce Merge pull request #1266 from Vonsek 2026-11-22 04:37:57 -05:00
1c5463b430 perf(vulkan): restore parallel prepare() with lazy depth24 lock and native-D24 skip 2026-11-22 06:31:28 -03:00
fd7761947a test(runtime): run depth24 conversion with CTest
The exhaustive compute readback was built on CI but missing from its test list. Preserve device initialization failures and let CTest distinguish an unavailable GPU from a successful comparison.
2026-11-22 10:18:08 +01:00
23962cb6d6 fix(runtime): classify D24 readback depth from its raw bits
Intel UHD 770 reports maximum depth for NaNs in the float comparison path. Check the input encoding before rounding finite values and exercise both signs of every NaN payload on the GPU.
2026-11-22 10:00:25 +01:00
0e63a76da0 D24 conversion: predication, large copies, tests, spec note (review)
- A dispatch honours conditional rendering and the layer's copies do not, so a
  SetPredication that skips copies also skipped the D24 conversion while the
  copy ran. Conditional rendering is ended around the dispatch and begun
  again; a test runs an upload and readback under a skipping predicate and
  compares with the host's unpredicated run (it fails without the fix).
- A copy larger than maxStorageBufferRange (queried; 128 MiB assumed if not)
  is split into dispatches by slices, or by rows of one slice; the descriptors
  bind 256-byte-aligned windows of both buffers. depth24_convert_test splits
  the 4096x4096 copy with a 1 MiB range and a pitched one with a 1 KiB range.
- make_pipeline destroys the layouts it made when a later step fails.
- depth24_convert_test is in the CI tool list; the docs say which GPU each test
  exercises.
- R24G8_TYPELESS with a typed D24 DSV is compared with the host. SRVs of
  R24_UNORM_X8_TYPELESS and X24_TYPELESS_G8_UINT are an empty slot in the
  layer (no format mapping; stencil-plane views refused): reported by the
  test and documented as a known gap.
- depth24.h: the D3D11.3 spec's FLOAT -> UNORM wording (3.2.3.6, 3.2.2) next to
  what WARP and AMD were measured to do; "159" is 5215.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-22 03:15:13 +01:00
33059d6b63 D24_UNORM_S8_UINT byte-exact on GPUs without D24
The layer stores D24 as D32_SFLOAT_S8_UINT where the GPU has no D24 (the
Radeon 880M, AMD generally). Footprint copies of the depth plane now convert
through a compute pass: an upload turns the 24-bit words into the nearest
floats of d / 16777215, a readback quantises floats back (float multiply by
16777215, round to nearest even, as WARP and AMD's D3D12 driver do) and writes
0 in the unspecified top byte. Clears store the float of the quantised value,
so a texture reads back as D3D's quantisation of the clear value.

- src/depth24.h, vulkan_depth24.h, depth24_convert.comp (+ compiled SPIR-V):
  reference conversion, the converter (pipeline, scratch, descriptors freed
  once the submission completes) and the shader.
- vulkan_replay.h: depth24_as_float binding flag, convert jobs prepared with the
  list and run around the copy, depth clear value.
- depth24_convert_test: all 16777216 words to float and back, 16777216 float
  patterns against the reference, a pitched copy; d3d12_depth24_compare.h:
  5215 clear values (whole-view and rectangle) against the host.
- d3d12_copy_compare.h: the D24 case now compares upload and readback with the
  host instead of only the bit-preserving copies.

Depends on #610.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-22 02:53:51 +01:00