7 Commits

Author SHA1 Message Date
9e7720c9e7 Merge pull request #1893 from OreoFR/rt-depth-format-copy-staged
replay: copies between depth formats that differ go through transfer scratch (RT-DEPTH-FORMAT-COPY-STAGED)
2026-11-25 17:19:44 +01:00
daf31b820b replay: copies between depth formats that differ go through transfer scratch (RT-DEPTH-FORMAT-COPY-STAGED)
A CopyTextureRegion of the depth plane from a D32_SFLOAT_S8_UINT image into a
D32_SFLOAT one was replayed as vkCmdCopyImage. Vulkan requires depth/stencil
formats to match exactly (VUID-vkCmdCopyImage-srcImage-01548), and the NVIDIA
driver (RTX 4070 Laptop, 621.40) wrote past the end of the D32 image: the
world-start WRITE_INVALID device loss, with the fault at the first byte after a
2560x1440 D32_SFLOAT image (VK_EXT_device_address_binding_report) and this VUID
reported by the validation layer just before the loss.

depth_format_pair: two depth formats with the same depth encoding but not the
same VkFormat (D32 / D32S8, D16 / D16S8, X8_D24 / D24S8) take the image ->
scratch -> image path depth <-> colour and A8 copies already use; the depth
aspect has the same texel layout in a buffer on both sides.

replay_copy_offset_test: the D32S8 -> D32 and D32 -> D32S8 depth-plane copies
are staged (no vkCmdCopyImage, depth aspect, 4 bytes a texel), and D32 -> D32
keeps vkCmdCopyImage. Fails without the change (6 checks).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-25 15:48:26 +01:00
ca68cb7859 fix: stage texel-misaligned imported host texture copies 2026-11-25 14:01:35 +01:00
ddcffa634e runtime: order consecutive buffer copies on the same queue (RT-STREAM-TRANSFER-BARRIER)
Vulkan transfer writes can overlap a later read or write when D3D12 submits
plain buffer copies in sequence.

Emit the transfer memory dependency from natterman12's #354 (GPL-3.0) before
every plain buffer copy. Allow an explicit rollback for comparison, and
record the access masks in the synthetic replay fixture.

The base failed both copy-ordering assertions. The child passed both replay
fixtures, and the rollback control observed no ordering barrier.


AI-assisted (Codex and Claude Code agents).

Co-authored-by: Plaaasma <47513553+Plaaasma@users.noreply.github.com>
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-24 12:20:51 -06:00
cfb3436369 vulkan_replay: honor format alignment, block size, and depth in tile_footprint staging 2026-11-24 13:11:13 +08:00
624f42e23b Runtime: apply backing-buffer end size to rgb96 CopyTexture 2026-11-22 14:30:52 +03:00
b8bd9f20a0 Runtime: apply backing-buffer offsets to CopyResource and CopyTexture 2026-11-22 13:44:57 +03:00