Vulkan: Area Readback of Framebuffer Textures #108418

Merged
Jeroen Bakker merged 1 commits from Jeroen-Bakker/blender:vulkan-read-framebuffer-depth into main 2023-05-30 13:48:00 +02:00

1 Commits

Author SHA1 Message Date
Jeroen Bakker a7fd1fa809 Vulkan: Area Readback of Framebuffer Textures
This PR adds the ability to only read back an area of a framebuffer
texture. It also adds the ability to read back from the depth
attachment.

Also reduces the amount of needed memory and reduces the CPU cycles
by reading back directly into the memory provided by the user. The
previous implementation wasn't able to do so as the `VKTexture::read`
function always returned a new buffer. The introduced
`VKTexture::read_sub` works on a pre-allocated buffer.
2023-05-30 12:51:23 +02:00