Mesa (main): iris: Fix assertion meant to only target the clear-color stride

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Fri Apr 29 16:59:52 UTC 2022


Module: Mesa
Branch: main
Commit: 33456ae5a48c809cee251ca6d70f2b7f5941bc87
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=33456ae5a48c809cee251ca6d70f2b7f5941bc87

Author: Jordan Justen <jordan.l.justen at intel.com>
Date:   Fri Apr 29 02:37:25 2022 -0700

iris: Fix assertion meant to only target the clear-color stride

Fixes: 2bc8c61fd00 ("iris: Return a 64B stride for clear color plane")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/6398
Signed-off-by: Jordan Justen <jordan.l.justen at intel.com>
Reviewed-by: Nanley Chery <nanley.g.chery at intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16241>

---

 src/gallium/drivers/iris/iris_resource.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/gallium/drivers/iris/iris_resource.c b/src/gallium/drivers/iris/iris_resource.c
index 4742a996a2c..c23728577ad 100644
--- a/src/gallium/drivers/iris/iris_resource.c
+++ b/src/gallium/drivers/iris/iris_resource.c
@@ -1692,7 +1692,7 @@ iris_resource_get_param(struct pipe_screen *pscreen,
        * the plane's pitch should be ignored, some kernels have been found to
        * require 64-byte alignment.
        */
-      assert(*value != 0 && *value % 64 == 0);
+      assert(*value != 0 && (!wants_cc || *value % 64 == 0));
 
       return true;
    case PIPE_RESOURCE_PARAM_OFFSET:



More information about the mesa-commit mailing list