lvp: properly ignore sampler write for immutable sampler
authorYiwei Zhang <zzyiwei@chromium.org>
Sun, 1 Jan 2023 01:07:19 +0000 (17:07 -0800)
committerMarge Bot <emma+marge@anholt.net>
Tue, 3 Jan 2023 19:26:42 +0000 (19:26 +0000)
commit9a104f6348d9f86825f0d9ace1886b7f26277845
treef72bf480d273c9aed0bb7f652d99bc69e4c5ac14
parent531d17c33428c99f08c42531eaf813b24cf7967c
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>
src/gallium/frontends/lavapipe/lvp_execute.c