From 5d24ae64c9f56e92247a4c1651dbeb42ce0161bc Mon Sep 17 00:00:00 2001 From: Nanley Chery Date: Tue, 8 Dec 2020 10:27:14 -0800 Subject: [PATCH] iris: Fix resource ptr in resolve_sampler_views MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Use the sampler view's iris_resource instead of its pipe_resource. For stencil views of a depth-stencil resource, this enables the stencil resource to cause a depth cache flush when needed. Cc: mesa-stable Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/3287 Reviewed-by: Tapani Pälli Part-of: (cherry picked from commit 1f7427f97216ce63308e810c79b0280a69ef43fc) --- .pick_status.json | 2 +- src/gallium/drivers/iris/iris_resolve.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.pick_status.json b/.pick_status.json index 0934995b86c..83ab0740916 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -58,7 +58,7 @@ "description": "iris: Fix resource ptr in resolve_sampler_views", "nominated": true, "nomination_type": 0, - "resolution": 0, + "resolution": 1, "master_sha": null, "because_sha": null }, diff --git a/src/gallium/drivers/iris/iris_resolve.c b/src/gallium/drivers/iris/iris_resolve.c index 5e924ad6249..276ad62b1dd 100644 --- a/src/gallium/drivers/iris/iris_resolve.c +++ b/src/gallium/drivers/iris/iris_resolve.c @@ -94,7 +94,7 @@ resolve_sampler_views(struct iris_context *ice, while (views) { const int i = u_bit_scan(&views); struct iris_sampler_view *isv = shs->textures[i]; - struct iris_resource *res = (void *) isv->base.texture; + struct iris_resource *res = isv->res; if (res->base.target != PIPE_BUFFER) { if (consider_framebuffer) {