Mesa (master): iris: Make can_fast_clear_depth return constants

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Fri Jan 8 23:28:11 UTC 2021


Module: Mesa
Branch: master
Commit: b12b69b04b66d3f3cc30fcbcad8d061a92314496
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=b12b69b04b66d3f3cc30fcbcad8d061a92314496

Author: Nanley Chery <nanley.g.chery at intel.com>
Date:   Wed Nov 18 16:17:42 2020 -0800

iris: Make can_fast_clear_depth return constants

Make can_fast_clear_depth more consistent with can_fast_clear_color.

Reviewed-by: Kenneth Graunke <kenneth at whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7762>

---

 src/gallium/drivers/iris/iris_clear.c | 12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)

diff --git a/src/gallium/drivers/iris/iris_clear.c b/src/gallium/drivers/iris/iris_clear.c
index 4844f4e2e52..16deb26dc78 100644
--- a/src/gallium/drivers/iris/iris_clear.c
+++ b/src/gallium/drivers/iris/iris_clear.c
@@ -434,10 +434,14 @@ can_fast_clear_depth(struct iris_context *ice,
    if (!(res->aux.has_hiz & (1 << level)))
       return false;
 
-   return blorp_can_hiz_clear_depth(devinfo, &res->surf, res->aux.usage,
-                                    level, box->z, box->x, box->y,
-                                    box->x + box->width,
-                                    box->y + box->height);
+   if (!blorp_can_hiz_clear_depth(devinfo, &res->surf, res->aux.usage,
+                                  level, box->z, box->x, box->y,
+                                  box->x + box->width,
+                                  box->y + box->height)) {
+      return false;
+   }
+
+   return true;
 }
 
 static void



More information about the mesa-commit mailing list