From 33b778cc36158568e308564313effb219b3adb5b Mon Sep 17 00:00:00 2001 From: Yiwei Zhang Date: Sat, 31 Dec 2022 17:21:53 -0800 Subject: [PATCH] venus: properly ignore the sampler for immutable sampler MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Reviewed-by: Corentin Noël Part-of: --- src/virtio/vulkan/vn_descriptor_set.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/virtio/vulkan/vn_descriptor_set.c b/src/virtio/vulkan/vn_descriptor_set.c index e0b11f17377..fb4c2af04b6 100644 --- a/src/virtio/vulkan/vn_descriptor_set.c +++ b/src/virtio/vulkan/vn_descriptor_set.c @@ -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;