lavapipe: Check the pool type in handle_reset_query_pool
Avoids a segmentation fault when resetting acceleration structure
queries.
Fixes: 897ccbd
("lavapipe: Implement VK_KHR_acceleration_structure")
Closes: #12289
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32616>
This commit is contained in:

committed by
Marge Bot

parent
fac818bdb3
commit
23a96b1537
@@ -2954,6 +2954,10 @@ static void handle_reset_query_pool(struct vk_cmd_queue_entry *cmd,
|
||||
{
|
||||
struct vk_cmd_reset_query_pool *qcmd = &cmd->u.reset_query_pool;
|
||||
LVP_FROM_HANDLE(lvp_query_pool, pool, qcmd->query_pool);
|
||||
|
||||
if (pool->base_type >= PIPE_QUERY_TYPES)
|
||||
return;
|
||||
|
||||
for (unsigned i = qcmd->first_query; i < qcmd->first_query + qcmd->query_count; i++) {
|
||||
if (pool->queries[i]) {
|
||||
state->pctx->destroy_query(state->pctx, pool->queries[i]);
|
||||
|
Reference in New Issue
Block a user