From 883f18f761b98397e19cebfed8328c1c72c40d78 Mon Sep 17 00:00:00 2001 From: Rhys Perry Date: Tue, 24 Jan 2023 14:15:26 +0000 Subject: [PATCH] radv: skip creation of null TLAS for null winsys This won't work because there are no memory types. Fixes fossilize replay with NULL winsys. Signed-off-by: Rhys Perry Reviewed-by: Friedrich Vock Reviewed-by: Konstantin Seurer Fixes: 31ca19589fe ("radv: Create a null TLAS as meta state") Part-of: --- src/amd/vulkan/radv_acceleration_structure.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/amd/vulkan/radv_acceleration_structure.c b/src/amd/vulkan/radv_acceleration_structure.c index 6e6bf7107c3..c1c43ad42f3 100644 --- a/src/amd/vulkan/radv_acceleration_structure.c +++ b/src/amd/vulkan/radv_acceleration_structure.c @@ -469,6 +469,9 @@ radix_sort_fill_buffer(VkCommandBuffer commandBuffer, VkResult radv_device_init_null_accel_struct(struct radv_device *device) { + if (device->physical_device->memory_properties.memoryTypeCount == 0) + return VK_SUCCESS; /* Exit in the case of null winsys. */ + VkDevice _device = radv_device_to_handle(device); uint32_t bvh_offset = ALIGN(sizeof(struct radv_accel_struct_header), 64);