summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.pick_status.json2
-rw-r--r--src/gallium/drivers/iris/iris_clear.c6
2 files changed, 4 insertions, 4 deletions
diff --git a/.pick_status.json b/.pick_status.json
index 32aa971e72c..ad4812f2295 100644
--- a/.pick_status.json
+++ b/.pick_status.json
@@ -8194,7 +8194,7 @@
"description": "iris: Fix a fast-clear skipping optimization",
"nominated": true,
"nomination_type": 1,
- "resolution": 0,
+ "resolution": 1,
"master_sha": null,
"because_sha": "393f659ed83abfc67d2a57ca1d962d53b22ec03f"
},
diff --git a/src/gallium/drivers/iris/iris_clear.c b/src/gallium/drivers/iris/iris_clear.c
index 6f8636c0fb5..449416a5172 100644
--- a/src/gallium/drivers/iris/iris_clear.c
+++ b/src/gallium/drivers/iris/iris_clear.c
@@ -197,8 +197,6 @@ fast_clear_color(struct iris_context *ice,
{
struct iris_batch *batch = &ice->batches[IRIS_BATCH_RENDER];
struct pipe_resource *p_res = (void *) res;
- const enum isl_aux_state aux_state =
- iris_resource_get_aux_state(res, level, box->z);
color = convert_fast_clear_color(ice, res, format, color);
@@ -277,7 +275,9 @@ fast_clear_color(struct iris_context *ice,
/* If the buffer is already in ISL_AUX_STATE_CLEAR, and the color hasn't
* changed, the clear is redundant and can be skipped.
*/
- if (!color_changed && aux_state == ISL_AUX_STATE_CLEAR)
+ const enum isl_aux_state aux_state =
+ iris_resource_get_aux_state(res, level, box->z);
+ if (!color_changed && box->depth == 1 && aux_state == ISL_AUX_STATE_CLEAR)
return;
/* Ivybrigde PRM Vol 2, Part 1, "11.7 MCS Buffer for Render Target(s)":