From b79da470f27b35e8f0d24c5942ee6695921648c2 Mon Sep 17 00:00:00 2001 From: Jordan Justen Date: Mon, 16 May 2022 02:35:11 -0700 Subject: [PATCH] iris/resource: Assert that DG2 CCS buffers don't also try to set BO_ALLOC_SMEM Signed-off-by: Jordan Justen Reviewed-by: Kenneth Graunke Part-of: --- 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)