From 442cc7996e5bd84e13ace1003f644b92c161337a Mon Sep 17 00:00:00 2001 From: Sviatoslav Peleshko Date: Thu, 8 Aug 2024 23:41:19 +0300 Subject: [PATCH] anv: Assert ray query BO actually exists The crash will happen if the client tries to use ray queries without enabling the KHR_ray_query extension. Add an assert to be able to catch this sooner. Signed-off-by: Sviatoslav Peleshko Reviewed-by: Lionel Landwerlin Part-of: --- src/intel/vulkan/anv_cmd_buffer.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/intel/vulkan/anv_cmd_buffer.c b/src/intel/vulkan/anv_cmd_buffer.c index 57b42430f00..795cff18f9e 100644 --- a/src/intel/vulkan/anv_cmd_buffer.c +++ b/src/intel/vulkan/anv_cmd_buffer.c @@ -477,6 +477,7 @@ anv_cmd_buffer_set_ray_query_buffer(struct anv_cmd_buffer *cmd_buffer, } /* Add the HW buffer to the list of BO used. */ + assert(device->ray_query_bo); anv_reloc_list_add_bo(cmd_buffer->batch.relocs, device->ray_query_bo);