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 <zzyiwei@chromium.org>
Acked-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20471>
This commit is contained in:
Yiwei Zhang 2022-12-31 17:07:19 -08:00 committed by Marge Bot
parent 531d17c334
commit 9a104f6348

View file

@ -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: