Mesa (main): iris/resource: Assert that DG2 CCS buffers don't also try to set BO_ALLOC_SMEM

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Thu Jul 21 20:54:55 UTC 2022


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

Author: Jordan Justen <jordan.l.justen at intel.com>
Date:   Mon May 16 02:35:11 2022 -0700

iris/resource: Assert that DG2 CCS buffers don't also try to set BO_ALLOC_SMEM

Signed-off-by: Jordan Justen <jordan.l.justen at intel.com>
Reviewed-by: Kenneth Graunke <kenneth at whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17349>

---

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

diff --git a/src/gallium/drivers/iris/iris_resource.c b/src/gallium/drivers/iris/iris_resource.c
index 56e5a38529f..f4c8df376c0 100644
--- a/src/gallium/drivers/iris/iris_resource.c
+++ b/src/gallium/drivers/iris/iris_resource.c
@@ -471,8 +471,10 @@ iris_resource_alloc_flags(const struct iris_screen *screen,
                        PIPE_RESOURCE_FLAG_MAP_PERSISTENT))
       flags |= BO_ALLOC_SMEM;
 
-   if (screen->devinfo.verx10 >= 125 && isl_aux_usage_has_ccs(aux_usage))
+   if (screen->devinfo.verx10 >= 125 && isl_aux_usage_has_ccs(aux_usage)) {
+      assert((flags & BO_ALLOC_SMEM) == 0);
       flags |= BO_ALLOC_LMEM;
+   }
 
    if ((templ->bind & PIPE_BIND_SHARED) ||
        util_format_get_num_planes(templ->format) > 1)



More information about the mesa-commit mailing list