hk: Hash the multiview mask for both vertex and fragment stages
Some checks failed
macOS-CI / macOS-CI (dri) (push) Has been cancelled
macOS-CI / macOS-CI (xlib) (push) Has been cancelled

We were only accounting for the multiview mask when the fragment stage
was present causing wrong cached shaders to be possibly used.

This fixes
"dEQP-VK.renderpasses.dynamic_rendering.primary_cmd_buff.*_multiview"
failures.

Signed-off-by: Mary Guillemard <mary@mary.zone>
Cc: mesa-stable
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39238>
This commit is contained in:
Mary Guillemard 2026-01-09 16:09:10 +01:00 committed by Marge Bot
parent f677b3eb48
commit 9a6c57b5c7

View file

@ -280,7 +280,10 @@ hk_hash_graphics_state(struct vk_physical_device *device,
struct hk_fs_key key;
hk_populate_fs_key(&key, state);
_mesa_blake3_update(&blake3_ctx, &key, sizeof(key));
}
if (state &&
(stages & (VK_SHADER_STAGE_VERTEX_BIT | VK_SHADER_STAGE_FRAGMENT_BIT))) {
const bool is_multiview = state->rp->view_mask != 0;
_mesa_blake3_update(&blake3_ctx, &is_multiview, sizeof(is_multiview));
}