mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2025-05-31 08:41:11 +00:00
[vulkan] Use host-cached memory for staging buffers
It makes a significant difference to level load times (approximately halves them for demo1 and demo2). Nicely, it turns out I had implemented the rest of the staging buffer code (in particular, flushing) correctly in that it seems there's no corruption any of the data.
This commit is contained in:
parent
56715e6796
commit
6d0abd42bb
1 changed files with 1 additions and 1 deletions
|
@ -55,7 +55,7 @@ QFV_CreateStagingBuffer (qfv_device_t *device, const char *name, size_t size,
|
||||||
QFV_duSetObjectName (device, VK_OBJECT_TYPE_BUFFER, stage->buffer,
|
QFV_duSetObjectName (device, VK_OBJECT_TYPE_BUFFER, stage->buffer,
|
||||||
dsprintf (str, "staging:buffer:%s", name));
|
dsprintf (str, "staging:buffer:%s", name));
|
||||||
stage->memory = QFV_AllocBufferMemory (device, stage->buffer,
|
stage->memory = QFV_AllocBufferMemory (device, stage->buffer,
|
||||||
VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT,
|
VK_MEMORY_PROPERTY_HOST_CACHED_BIT,
|
||||||
size, 0);
|
size, 0);
|
||||||
QFV_duSetObjectName (device, VK_OBJECT_TYPE_DEVICE_MEMORY, stage->memory,
|
QFV_duSetObjectName (device, VK_OBJECT_TYPE_DEVICE_MEMORY, stage->memory,
|
||||||
dsprintf (str, "staging:memory:%s", name));
|
dsprintf (str, "staging:memory:%s", name));
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue