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> (cherry picked from commit23a96b1537
) Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33113>
This commit is contained in:

committed by
Dylan Baker

parent
1eb956e7f9
commit
b1d574c8f3
@@ -1414,7 +1414,7 @@
|
||||
"description": "lavapipe: Check the pool type in handle_reset_query_pool",
|
||||
"nominated": true,
|
||||
"nomination_type": 2,
|
||||
"resolution": 0,
|
||||
"resolution": 1,
|
||||
"main_sha": null,
|
||||
"because_sha": "897ccbd180ae2e0e6a60173e0511bc25a4f5a118",
|
||||
"notes": null
|
||||
|
@@ -2955,6 +2955,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