From 9a104f6348d9f86825f0d9ace1886b7f26277845 Mon Sep 17 00:00:00 2001 From: Yiwei Zhang Date: Sat, 31 Dec 2022 17:07:19 -0800 Subject: [PATCH] lvp: properly ignore sampler write for immutable sampler The issue is hidden due to a overly relaxed cts: dEQP-VK.binding_model.shader_access.primary_cmd_buf.with_push* that doesn't scrub the sampler from descriptor writes for immutable samplers. The issue is exposed via venus-lavapipe ci because venus must ignore the potentially garbled sampler. This change aligns the VK_DESCRIPTOR_TYPE_SAMPLER path with the VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER path by removing a false check against the provided sampler from push since the sampler can be null. An alternative is to also check against !binding->immutable_samplers there. Test: venus-lavapipe with venus push descriptor support cc: mesa-stable Signed-off-by: Yiwei Zhang Acked-by: Mike Blumenkrantz Part-of: --- src/gallium/frontends/lavapipe/lvp_execute.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/gallium/frontends/lavapipe/lvp_execute.c b/src/gallium/frontends/lavapipe/lvp_execute.c index 57756d8fa98..10d57c54c48 100644 --- a/src/gallium/frontends/lavapipe/lvp_execute.c +++ b/src/gallium/frontends/lavapipe/lvp_execute.c @@ -1233,8 +1233,6 @@ static void handle_descriptor(struct rendering_state *state, break; } case VK_DESCRIPTOR_TYPE_SAMPLER: - if (!descriptor->sampler) - return; fill_sampler_stage(state, dyn_info, stage, p_stage, array_idx, descriptor, binding); break; case VK_DESCRIPTOR_TYPE_SAMPLED_IMAGE: