Mesa (master): iris: Check if resource has stencil before returning it

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Wed May 15 04:27:07 UTC 2019


Module: Mesa
Branch: master
Commit: eca53f00aa64b5d43a5a8980593bc9c62a297c8f
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=eca53f00aa64b5d43a5a8980593bc9c62a297c8f

Author: Andrii Kryvytskyi <andrii.o.kryvytskyi at globallogic.com>
Date:   Mon May 13 15:19:03 2019 +0300

iris: Check if resource has stencil before returning it

Signed-off-by: Andrii Kryvytskyi <andrii.o.kryvytskyi at globallogic.com>
Signed-off-by: Danylo Piliaiev <danylo.piliaiev at globallogic.com>
Reviewed-by: Kenneth Graunke <kenneth at whitecape.org>

---

 src/gallium/drivers/iris/iris_resource.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/src/gallium/drivers/iris/iris_resource.c b/src/gallium/drivers/iris/iris_resource.c
index 2c0b6fc258e..3d4bfd6fd9f 100644
--- a/src/gallium/drivers/iris/iris_resource.c
+++ b/src/gallium/drivers/iris/iris_resource.c
@@ -204,7 +204,11 @@ iris_resource_get_separate_stencil(struct pipe_resource *p_res)
    /* For packed depth-stencil, we treat depth as the primary resource
     * and store S8 as the "second plane" resource.
     */
-   return p_res->next;
+   if (p_res->next && p_res->next->format == PIPE_FORMAT_S8_UINT)
+      return p_res->next;
+
+   return NULL;
+
 }
 
 static void




More information about the mesa-commit mailing list