upleb.uk

Public git repos — served from a NIP-34 GRASP relay at git.upleb.uk

summaryrefslogtreecommitdiff
path: root/runtime/src/thread_stacks.cpp
diff options
context:
space:
mode:
authorJan Trencansky <jan.trencansky@protonmail.com>2026-11-24 18:59:42 -0500
committerJan Trencansky <jan.trencansky@protonmail.com>2026-11-24 19:54:27 -0500
commit869c88979621cacac26542a0b35b4448fde4f994 (patch)
treece03e9bb108a9b5f6557366b21f6159a99ea261c /runtime/src/thread_stacks.cpp
parent501c7d5237af5a8bf407888ad6f8f8e2fe5ff2e8 (diff)
Stage copies between the two A8_UNORM backings through a buffer
An A8_UNORM render target is a VK_FORMAT_A8_UNORM_KHR image and any other A8_UNORM texture an R8_UNORM image. CopyResource and CopyTextureRegion between the two issued vkCmdCopyImage on that pair, which Vulkan does not count as size-compatible: VUID-vkCmdCopyImage-srcImage-01548, although the bytes came out right on the drivers tried. moffington reported it in the review of #428 and Dezmonius confirmed it on native Windows with the validation layer. Such a copy now takes the replay's existing image -> transfer scratch -> image route, the one depth <-> colour copies use, with one byte per texel on both sides. Same-backing copies still copy image to image. This is the approach of Dezmonius's proof of concept, which they described on the pull request but did not publish; written here from that description. d3d12_a8_copy_test copies A8 render target -> A8 texture and back, whole (CopyResource) and a 3x3 box from a nonzero source offset to a nonzero destination offset (CopyTextureRegion), and checks every texel read back: the source bytes inside the box, the destination's own outside it. It wraps vkCreateImage and vkCmdCopyImage behind the instance-proc pointer it hands the layer and fails on any vkCmdCopyImage between VK_FORMAT_A8_UNORM_KHR and another format, so it fails without this change even where the validation layer is not installed; with LEONIDA_VK_VALIDATION=1 the layer's errors fail it too. A8 -> A8 and R8 -> R8 copies are the controls. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Diffstat (limited to 'runtime/src/thread_stacks.cpp')
0 files changed, 0 insertions, 0 deletions