mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-28 16:50:10 +01:00
panvk: revised occlusion query pointer fix
It turns out that the `occlusion_query.syncobj` is used to set
state that later code relies on, and setting it to NULL causes
some Vulkan CTS tests to fail. Instead, we should explicitly check
for the mode being `MALI_OCCLUSION_MODE_DISABLED` to avoid using
an invalid `ptr` field.
Fixes: 24c692c981 ("panvk: fix a NULL pointer dereference in occlusion queries")
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36794>
This commit is contained in:
parent
461e3848b9
commit
9b4eb81162
2 changed files with 1 additions and 3 deletions
|
|
@ -1916,6 +1916,7 @@ static VkResult
|
|||
prepare_oq(struct panvk_cmd_buffer *cmdbuf)
|
||||
{
|
||||
if (!gfx_state_dirty(cmdbuf, OQ) ||
|
||||
cmdbuf->state.gfx.occlusion_query.mode == MALI_OCCLUSION_MODE_DISABLED ||
|
||||
cmdbuf->state.gfx.occlusion_query.syncobj ==
|
||||
cmdbuf->state.gfx.render.oq.last)
|
||||
return VK_SUCCESS;
|
||||
|
|
|
|||
|
|
@ -123,9 +123,6 @@ 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