mirror of
https://github.com/valentderah/totk-pc-recomp.git
synced 2026-11-20 12:45:57 +00:00
Let DLAA copy the camera block out of the uniform snapshot buffer
mv_pass copies the scene's camera block from the snapshot arena with vkCmdCopyBuffer, which needs VK_BUFFER_USAGE_TRANSFER_SRC_BIT on the source (VUID-vkCmdCopyBuffer-srcBuffer-00118). Reported by Lucas-blip-png in #228 and SchulzCode in #253. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
9e079622dc
commit
54337ce6a4
1 file changed
+2
-1
+2
-1
@@ -81,7 +81,8 @@ static Arena *arena_get(uint64_t need) {
|
||||
if (!a) rt_fatal("vk_usnap: out of memory");
|
||||
a->size = need < ARENA_MIN ? ARENA_MIN : (need + (1u << 20) - 1) & ~(uint64_t)((1u << 20) - 1);
|
||||
VkBufferCreateInfo bi = {.sType = VK_STRUCTURE_TYPE_BUFFER_CREATE_INFO, .size = a->size,
|
||||
.usage = VK_BUFFER_USAGE_UNIFORM_BUFFER_BIT};
|
||||
// transfer source: DLAA copies the camera block out (vk_dlaa.c mv_pass)
|
||||
.usage = VK_BUFFER_USAGE_UNIFORM_BUFFER_BIT | VK_BUFFER_USAGE_TRANSFER_SRC_BIT};
|
||||
// Device-local through the BAR when the device has it (the GPU reads constants on every draw), else host memory.
|
||||
VmaAllocationCreateInfo ai = {.usage = VMA_MEMORY_USAGE_AUTO_PREFER_DEVICE,
|
||||
.flags = VMA_ALLOCATION_CREATE_HOST_ACCESS_SEQUENTIAL_WRITE_BIT |
|
||||
|
||||
Reference in new issue
Block a user