mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-10 21:10:16 +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> (cherry picked from commit9b4eb81162)
This commit is contained in:
parent
b8c30ec7e0
commit
bb7baeae6c
3 changed files with 2 additions and 4 deletions
|
|
@ -4074,7 +4074,7 @@
|
|||
"description": "panvk: revised occlusion query pointer fix",
|
||||
"nominated": true,
|
||||
"nomination_type": 2,
|
||||
"resolution": 0,
|
||||
"resolution": 1,
|
||||
"main_sha": null,
|
||||
"because_sha": "24c692c981631276f3f20ff021931c665162e7e6",
|
||||
"notes": null
|
||||
|
|
|
|||
|
|
@ -1838,6 +1838,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;
|
||||
|
|
|
|||
|
|
@ -112,9 +112,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