zink: properly unbind sampler views with imported 2D resource

Fixes: 7167214cab ("zink: support crazy CL buffer-to-texture extension")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36243>
(cherry picked from commit ff1c146453)
This commit is contained in:
Karol Herbst 2025-07-20 00:02:30 +02:00 committed by Eric Engestrom
parent 63e3a021f9
commit b853132f47
2 changed files with 2 additions and 2 deletions

View file

@ -4044,7 +4044,7 @@
"description": "zink: properly unbind sampler views with imported 2D resource",
"nominated": true,
"nomination_type": 2,
"resolution": 0,
"resolution": 1,
"main_sha": null,
"because_sha": "7167214cabc33751c8672e1070bb16d491069039",
"notes": null

View file

@ -2276,7 +2276,7 @@ zink_set_sampler_views(struct pipe_context *pctx,
struct zink_resource *res = b ? zink_resource(b->base.texture) : NULL;
if (b && b->base.texture) {
if (!a || zink_resource(a->base.texture) != res) {
if (!a || zink_resource(a->base.texture) != res || a->import2d != b->import2d) {
if (a)
unbind_samplerview(ctx, shader_type, start_slot + i);
bind_samplerview_resource_stage(ctx, res, shader_type);