From 8670fd6ac4611ca29468830a8d59d99bbe872651 Mon Sep 17 00:00:00 2001 From: Rohan Garg Date: Wed, 27 Mar 2024 10:12:05 +0100 Subject: [PATCH] iris: slow clear higher miplevels on single sampled 8bpp resources that have TILE64 This helps fix a number of piglit tests that exercise this functionality, such as: - piglit.spec.arb_texture_rg.fbo-clear-formats - piglit.spec.ext_framebuffer_object.fbo-clear-formats - piglit.spec.ext_texture_snorm.fbo-clear-formats Signed-off-by: Rohan Garg Reviewed-by: Nanley Chery Part-of: --- src/gallium/drivers/iris/iris_clear.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/gallium/drivers/iris/iris_clear.c b/src/gallium/drivers/iris/iris_clear.c index 7810920813e..f26c8dd4a01 100644 --- a/src/gallium/drivers/iris/iris_clear.c +++ b/src/gallium/drivers/iris/iris_clear.c @@ -134,6 +134,18 @@ can_fast_clear_color(struct iris_context *ice, */ if (level > 0 && util_format_get_blocksizebits(p_res->format) == 8 && p_res->width0 % 64) { + assert(res->surf.samples == 1); + return false; + } + + /* TODO: Fast clearing higher miplevels on 8 bpp single sampled TILE64 + * resources for certain widths seems broken. + */ + if (level > 0 && util_format_get_blocksizebits(p_res->format) == 8 && + res->surf.tiling == ISL_TILING_64) { + assert(res->surf.samples == 1); + perf_debug(&ice->dbg, "Slow clearing higher miplevels for single sampled " + "8 bpp resource"); return false; }