venus: properly ignore the sampler for immutable sampler

This was found while debugging venus-lavapipe ci failure. It's a real
bug though no tests have caught this yet, but fixing this would regress
venus-lavapipe non-templated push tests if without the dependent lvp
fix. The sampler in the descriptor write can be garbled if the binding
has immutable samplers.

cc: mesa-stable

Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Reviewed-by: Corentin Noël <corentin.noel@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20471>
This commit is contained in:
Yiwei Zhang 2022-12-31 17:21:53 -08:00 committed by Marge Bot
parent 9a104f6348
commit 33b778cc36

View file

@ -861,7 +861,7 @@ vn_update_descriptor_sets_parse_writes(uint32_t write_count,
switch (write->descriptorType) {
case VK_DESCRIPTOR_TYPE_SAMPLER:
imgs[j].imageView = VK_NULL_HANDLE;
break;
FALLTHROUGH;
case VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER:
if (binding->has_immutable_samplers)
imgs[j].sampler = VK_NULL_HANDLE;