summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/iris/iris_clear.c
diff options
context:
space:
mode:
authorKenneth Graunke <[email protected]>2019-08-28 18:05:57 -0700
committerKenneth Graunke <[email protected]>2019-08-29 11:27:16 -0700
commit30b9ed92ea423a4857023ca5e2222ae409672fa5 (patch)
tree5db70954b98ff24862d7db5d542ec8246d6d61f6 /src/gallium/drivers/iris/iris_clear.c
parent394192fcee97d4a3c882eae24530992e5206e388 (diff)
iris: Fix partial fast clear checks to account for miplevel.
We enabled fast clears at level > 0, but didn't minify the dimensions when comparing the box size, so we always thought it was a partial clear and as a result never actually enabled any. This eliminates some slow clears in Civilization VI, but they are mostly during initialization and not the main rendering. Thanks to Dan Walsh for noticing we had too many slow clears. Fixes: 393f659ed83 ("iris: Enable fast clears on other miplevels and layers than 0.") Reviewed-by: Rafael Antognolli <[email protected]>
Diffstat (limited to 'src/gallium/drivers/iris/iris_clear.c')
-rw-r--r--src/gallium/drivers/iris/iris_clear.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/gallium/drivers/iris/iris_clear.c b/src/gallium/drivers/iris/iris_clear.c
index 5b2961f8a7d..ff78352a9f2 100644
--- a/src/gallium/drivers/iris/iris_clear.c
+++ b/src/gallium/drivers/iris/iris_clear.c
@@ -80,8 +80,8 @@ can_fast_clear_color(struct iris_context *ice,
/* Check for partial clear */
if (box->x > 0 || box->y > 0 ||
- box->width < p_res->width0 ||
- box->height < p_res->height0) {
+ box->width < minify(p_res->width0, level) ||
+ box->height < minify(p_res->height0, level)) {
return false;
}