From a5acfdf7534eefc0aeb51fae5de6fa3fe2b76e65 Mon Sep 17 00:00:00 2001 From: Jianxun Zhang Date: Thu, 18 Sep 2025 14:56:56 -0700 Subject: [PATCH] iris: Assert no disabling aux in first query (xe2) Xe2 platforms have a different way to disable CCS compression. Suggested by Nanley Chery Signed-off-by: Jianxun Zhang Reviewed-by: Nanley Chery Part-of: --- src/gallium/drivers/iris/iris_resource.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/gallium/drivers/iris/iris_resource.c b/src/gallium/drivers/iris/iris_resource.c index e02c7379331..2c2495b880f 100644 --- a/src/gallium/drivers/iris/iris_resource.c +++ b/src/gallium/drivers/iris/iris_resource.c @@ -1672,7 +1672,8 @@ iris_flush_resource(struct pipe_context *ctx, struct pipe_resource *resource) } static void -iris_resource_disable_aux_on_first_query(struct pipe_resource *resource, +iris_resource_disable_aux_on_first_query(struct iris_screen *screen, + struct pipe_resource *resource, unsigned usage) { struct iris_resource *res = (struct iris_resource *)resource; @@ -1686,6 +1687,7 @@ iris_resource_disable_aux_on_first_query(struct pipe_resource *resource, if (!mod_with_aux && (!(usage & PIPE_HANDLE_USAGE_EXPLICIT_FLUSH) && res->aux.usage != 0) && p_atomic_read(&resource->reference.count) == 1) { + assert(screen->devinfo->ver < 20); iris_resource_disable_aux(res); } } @@ -1717,7 +1719,7 @@ iris_resource_get_param(struct pipe_screen *pscreen, bool result; unsigned handle; - iris_resource_disable_aux_on_first_query(resource, handle_usage); + iris_resource_disable_aux_on_first_query(screen, resource, handle_usage); struct iris_bo *bo = wants_cc ? res->aux.clear_color_bo : wants_aux ? res->aux.bo : res->bo; @@ -1843,7 +1845,7 @@ iris_resource_get_handle(struct pipe_screen *pscreen, bool mod_with_aux = res->mod_info && isl_drm_modifier_has_aux(res->mod_info->modifier); - iris_resource_disable_aux_on_first_query(resource, usage); + iris_resource_disable_aux_on_first_query(screen, resource, usage); assert(iris_bo_is_real(res->bo));