lvp: properly ignore sampler write for immutable sampler
authorYiwei Zhang <zzyiwei@chromium.org>
Sun, 1 Jan 2023 01:07:19 +0000 (17:07 -0800)
committerEric Engestrom <eric@engestrom.ch>
Wed, 11 Jan 2023 17:44:20 +0000 (17:44 +0000)
commit685718bcbe3b3008abfb29e228b9fb54f6fbccc6
tree6bed01a40d2689aa8bef049ec4e95a2e1e7e70e7
parent7b74a905e0f60157c6d5a69f989b20c47a6b1901
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>
(cherry picked from commit 9a104f6348d9f86825f0d9ace1886b7f26277845)
.pick_status.json
src/gallium/frontends/lavapipe/lvp_execute.c