iris: Fix resource ptr in resolve_sampler_views
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 <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7996>
(cherry picked from commit 1f7427f97216ce63308e810c79b0280a69ef43fc)
diff --git a/.pick_status.json b/.pick_status.json
index 0934995..83ab074 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 5e924ad..276ad62 100644
--- a/src/gallium/drivers/iris/iris_resolve.c
+++ b/src/gallium/drivers/iris/iris_resolve.c
@@ -94,7 +94,7 @@
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) {