[vulkan] Use host-cached memory for captures

This takes simply reading the transfer buffer from about 400ms down to
about 3ms (for 1920x1080 rgba). PNG compression is now the bottleneck.
This commit is contained in:
Bill Currie 2022-03-31 21:24:29 +09:00
parent 790f62a209
commit 86e95fc1d0

View file

@ -104,7 +104,7 @@ QFV_CreateCapture (qfv_device_t *device, int numframes,
capture->memsize = numframes * image_size;
capture->memory = QFV_AllocImageMemory (device,
capture->image_set->a[0].image,
VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT,
VK_MEMORY_PROPERTY_HOST_CACHED_BIT,
capture->memsize, 0);
byte *data;
dfunc->vkMapMemory (device->dev, capture->memory, 0, capture->memsize, 0,