lvp: avoid redundant sampler views and image views
authorYiwei Zhang <zzyiwei@chromium.org>
Mon, 9 Jan 2023 05:56:41 +0000 (21:56 -0800)
committerMarge Bot <emma+marge@anholt.net>
Tue, 10 Jan 2023 05:49:34 +0000 (05:49 +0000)
commitf1e06b46a9d8832ea258d149f79fb270383f1df5
tree595d95f2aadb074967719dbca8aa9274c2946c4c
parentf18827e0153c555d2f3897b57f8ea0349b5bb41f
lvp: avoid redundant sampler views and image views

Align the sampler view creation condition with the image and buffer
creation usage which maps to PIPE_BIND_SAMPLER_VIEW, which fixes the spam
of "Illegal sampler view creation without bind flag". Also fix the
PIPE_BIND_SHADER_IMAGE assignment for image usage bits and avoid setting
the image view struct if without PIPE_BIND_SHADER_IMAGE.

Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20580>
src/gallium/frontends/lavapipe/lvp_image.c