iris: Assert no disabling aux in first query (xe2)

Xe2 platforms have a different way to disable CCS
compression.

Suggested by Nanley Chery <nanley.g.chery@intel.com>

Signed-off-by: Jianxun Zhang <jianxun.zhang@intel.com>
Reviewed-by: Nanley Chery <nanley.g.chery@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37098>
This commit is contained in:
Jianxun Zhang 2025-09-18 14:56:56 -07:00
parent 1cbee485e7
commit a5acfdf753

View file

@ -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));