Fix #147815: Vulkan: Performance NVIDIA

An oversight in b9dcc087a9 where textures aren't allocated correctly
leading to performance issues.

Pull Request: https://projects.blender.org/blender/blender/pulls/147959
This commit is contained in:
Jeroen Bakker
2025-10-13 09:06:11 +02:00
parent 218317b8b9
commit d510baa4b8
2 changed files with 3 additions and 3 deletions

View File

@@ -45,7 +45,7 @@ void VKMemoryPools::init_external_memory_image(VKDevice &device)
VK_IMAGE_LAYOUT_UNDEFINED};
VmaAllocationCreateInfo allocation_create_info = {};
allocation_create_info.flags = VMA_ALLOCATION_CREATE_DEDICATED_MEMORY_BIT;
allocation_create_info.usage = VMA_MEMORY_USAGE_UNKNOWN;
allocation_create_info.usage = VMA_MEMORY_USAGE_AUTO_PREFER_DEVICE;
uint32_t memory_type_index;
vmaFindMemoryTypeIndexForImageInfo(
device.mem_allocator_get(), &image_create_info, &allocation_create_info, &memory_type_index);
@@ -75,7 +75,7 @@ void VKMemoryPools::init_external_memory_pixel_buffer(VKDevice &device)
nullptr};
VmaAllocationCreateInfo allocation_create_info = {};
allocation_create_info.flags = VMA_ALLOCATION_CREATE_DEDICATED_MEMORY_BIT;
allocation_create_info.usage = VMA_MEMORY_USAGE_UNKNOWN;
allocation_create_info.usage = VMA_MEMORY_USAGE_AUTO_PREFER_DEVICE;
uint32_t memory_type_index;
vmaFindMemoryTypeIndexForBufferInfo(device.mem_allocator_get(),
&buffer_create_info,

View File

@@ -699,7 +699,7 @@ bool VKTexture::allocate()
VK_STRUCTURE_TYPE_EXTERNAL_MEMORY_IMAGE_CREATE_INFO, nullptr, 0};
VmaAllocationCreateInfo allocCreateInfo = {};
allocCreateInfo.usage = VMA_MEMORY_USAGE_UNKNOWN;
allocCreateInfo.usage = VMA_MEMORY_USAGE_AUTO_PREFER_DEVICE;
allocCreateInfo.priority = memory_priority(texture_usage);
if (bool(texture_usage & GPU_TEXTURE_USAGE_MEMORY_EXPORT)) {