From df006bba0256e1d636b3fcc270db7c7b814e61d8 Mon Sep 17 00:00:00 2001 From: Jianxun Zhang Date: Fri, 18 Aug 2023 11:53:04 -0700 Subject: [PATCH] iris: Update aux state for color fast clears (xe2) The texturing and rendering preparation functions restrict fast clear support in some cases to account for limitations on prior platforms. Instead of updating those checks to avoid resolves on Xe2, we can bypass them by representing the aux state of a fast-cleared surface as compressed-no-clear. This is valid because there is no longer a bit pattern which references a clear value stored outside of the aux surface. Suggested by Nanley Chery Signed-off-by: Jianxun Zhang Reviewed-by: Nanley Chery Part-of: --- src/gallium/drivers/iris/iris_clear.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/gallium/drivers/iris/iris_clear.c b/src/gallium/drivers/iris/iris_clear.c index 6be35db8eb5..11e7a56476d 100644 --- a/src/gallium/drivers/iris/iris_clear.c +++ b/src/gallium/drivers/iris/iris_clear.c @@ -370,7 +370,9 @@ fast_clear_color(struct iris_context *ice, iris_batch_sync_region_end(batch); iris_resource_set_aux_state(ice, res, level, box->z, - box->depth, ISL_AUX_STATE_CLEAR); + box->depth, devinfo->ver < 20 ? + ISL_AUX_STATE_CLEAR : + ISL_AUX_STATE_COMPRESSED_NO_CLEAR); ice->state.dirty |= IRIS_DIRTY_RENDER_BUFFER; ice->state.stage_dirty |= IRIS_ALL_STAGE_DIRTY_BINDINGS; return;