From b853132f4717043e3d44ec3de9d47213a8ab46b4 Mon Sep 17 00:00:00 2001 From: Karol Herbst Date: Sun, 20 Jul 2025 00:02:30 +0200 Subject: [PATCH] zink: properly unbind sampler views with imported 2D resource Fixes: 7167214cabc ("zink: support crazy CL buffer-to-texture extension") Part-of: (cherry picked from commit ff1c146453d9f23ed5539c3df224cc37efa071b4) --- .pick_status.json | 2 +- src/gallium/drivers/zink/zink_context.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.pick_status.json b/.pick_status.json index 4f3fd927aba..6c938066dc5 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -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 diff --git a/src/gallium/drivers/zink/zink_context.c b/src/gallium/drivers/zink/zink_context.c index 986cf2f6fad..9cdd767883a 100644 --- a/src/gallium/drivers/zink/zink_context.c +++ b/src/gallium/drivers/zink/zink_context.c @@ -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);