From da6e9fcdfd85d13ec9b565c5aab82cdab8ff2133 Mon Sep 17 00:00:00 2001 From: Jianxun Zhang Date: Fri, 26 Jul 2024 11:25:42 -0700 Subject: [PATCH] iris: Fix an assertion failure with compressed format Fixes: ext_texture_array-compressed teximage pbo -fbo -auto src/gallium/drivers/iris/iris_state.c:3142: iris_create_surface: Assertion `res->aux.usage == ISL_AUX_USAGE_NONE' failed Suggested by Nanley Chery Backport-to: 24.2 Signed-off-by: Jianxun Zhang Reviewed-by: Nanley Chery Part-of: (cherry picked from commit 6b4def143c8f676c3647ff5fd865ecb3938a7dbd) --- .pick_status.json | 2 +- src/gallium/drivers/iris/iris_state.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.pick_status.json b/.pick_status.json index 8bd75c35970..2972630f281 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -284,7 +284,7 @@ "description": "iris: Fix an assertion failure with compressed format", "nominated": true, "nomination_type": 4, - "resolution": 0, + "resolution": 1, "main_sha": null, "because_sha": null, "notes": null diff --git a/src/gallium/drivers/iris/iris_state.c b/src/gallium/drivers/iris/iris_state.c index 96613485e65..95236a79b10 100644 --- a/src/gallium/drivers/iris/iris_state.c +++ b/src/gallium/drivers/iris/iris_state.c @@ -3135,11 +3135,11 @@ iris_create_surface(struct pipe_context *ctx, * have a renderable view format. We must be attempting to upload * blocks of compressed data via an uncompressed view. * - * In this case, we can assume there are no auxiliary buffers, a single + * In this case, we can assume there are no auxiliary surfaces, a single * miplevel, and that the resource is single-sampled. Gallium may try * and create an uncompressed view with multiple layers, however. */ - assert(res->aux.usage == ISL_AUX_USAGE_NONE); + assert(res->aux.surf.size_B == 0); assert(res->surf.samples == 1); assert(view->levels == 1);