From 4dfc3367fcbe94e5faa29a9be64a975921f75a86 Mon Sep 17 00:00:00 2001 From: Jianxun Zhang Date: Tue, 31 Jan 2023 12:25:33 -0800 Subject: [PATCH] blorp: Pass down fast clear color value (xe2) Also add a quote of Bspec for previous platforms. Signed-off-by: Jianxun Zhang Reviewed-by: Nanley Chery Part-of: --- src/intel/blorp/blorp_clear.c | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/src/intel/blorp/blorp_clear.c b/src/intel/blorp/blorp_clear.c index a2cac0b079e..124d9237248 100644 --- a/src/intel/blorp/blorp_clear.c +++ b/src/intel/blorp/blorp_clear.c @@ -413,7 +413,25 @@ blorp_fast_clear(struct blorp_batch *batch, params.x1 = x1; params.y1 = y1; - memset(¶ms.wm_inputs.clear_color, 0xff, 4*sizeof(float)); + if (batch->blorp->isl_dev->info->ver >= 20) { + /* Bspec 57340 (r59562): + * + * Overview of Fast Clear: + * Pixel shader's color output is treated as Clear Value, value + * should be a constant. + */ + memcpy(¶ms.wm_inputs.clear_color, &surf->clear_color, + 4 * sizeof(float)); + } else { + /* BSpec: 2423 (r153658): + * + * The pixel shader kernel requires no attributes, and delivers a + * value of 0xFFFFFFFF in all channels of the render target write + * message The replicated color message should be used. + */ + memset(¶ms.wm_inputs.clear_color, 0xff, 4 * sizeof(float)); + } + params.fast_clear_op = ISL_AUX_OP_FAST_CLEAR; get_fast_clear_rect(batch->blorp->isl_dev, surf->surf, surf->aux_surf,