mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-20 18:10:11 +01:00
panvk: fix a NULL pointer dereference in occlusion queries
If a meta operation (like a blit or clear) happens while occlusion
queries are active, we temporarily disable the query. Unfortunately
the code for this did not clear out the `syncobj` field. In rare
combinations of circumstances this could cause an attempt to issue
a write back of the occlusion query values, and since we've zeroed
the `ptr` field it writes to a NULL value, causing a bus fault and
device lost error.
Fixes: 61534faf4e ("panvk: Wire occlusion queries to internals")
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36525>
This commit is contained in:
parent
2d691d7dd3
commit
24c692c981
1 changed files with 3 additions and 0 deletions
|
|
@ -119,6 +119,9 @@ panvk_per_arch(cmd_meta_gfx_start)(
|
|||
save_ctx->occlusion_query = cmdbuf->state.gfx.occlusion_query;
|
||||
|
||||
/* Ensure occlusion queries are disabled */
|
||||
#if PAN_ARCH >= 10
|
||||
cmdbuf->state.gfx.occlusion_query.syncobj = 0;
|
||||
#endif
|
||||
cmdbuf->state.gfx.occlusion_query.ptr = 0;
|
||||
cmdbuf->state.gfx.occlusion_query.mode = MALI_OCCLUSION_MODE_DISABLED;
|
||||
gfx_state_set_dirty(cmdbuf, OQ);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue