diff --git a/src/amd/vulkan/radv_device.c b/src/amd/vulkan/radv_device.c index d6acc8aface..c24495a6a8c 100644 --- a/src/amd/vulkan/radv_device.c +++ b/src/amd/vulkan/radv_device.c @@ -276,6 +276,15 @@ radv_physical_device_init_mem_types(struct radv_physical_device *device) VK_MEMORY_PROPERTY_HOST_COHERENT_BIT, .heapIndex = visible_vram_index, }; + + device->memory_domains[type_count] = RADEON_DOMAIN_VRAM; + device->memory_flags[type_count] = RADEON_FLAG_CPU_ACCESS | RADEON_FLAG_32BIT; + device->memory_properties.memoryTypes[type_count++] = (VkMemoryType){ + .propertyFlags = VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT | + VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT | + VK_MEMORY_PROPERTY_HOST_COHERENT_BIT, + .heapIndex = visible_vram_index, + }; } if (gart_index >= 0) { @@ -286,6 +295,14 @@ radv_physical_device_init_mem_types(struct radv_physical_device *device) VK_MEMORY_PROPERTY_HOST_COHERENT_BIT | VK_MEMORY_PROPERTY_HOST_CACHED_BIT, .heapIndex = gart_index, }; + + device->memory_domains[type_count] = RADEON_DOMAIN_GTT; + device->memory_flags[type_count] = RADEON_FLAG_CPU_ACCESS | RADEON_FLAG_32BIT; + device->memory_properties.memoryTypes[type_count++] = (VkMemoryType){ + .propertyFlags = VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT | + VK_MEMORY_PROPERTY_HOST_COHERENT_BIT | VK_MEMORY_PROPERTY_HOST_CACHED_BIT, + .heapIndex = gart_index, + }; } device->memory_properties.memoryTypeCount = type_count;