[Mesa-dev] [PATCH] iris: Do not fast clear depth on gen > 9 yet.

Rafael Antognolli rafael.antognolli at intel.com
Wed Apr 3 22:54:10 UTC 2019


Depth fast clears were unrestricted, meaning they were enabled on every
hardware generation. However, gen11+ requires some extra code to make it
work properly.
---
 src/gallium/drivers/iris/iris_clear.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/src/gallium/drivers/iris/iris_clear.c b/src/gallium/drivers/iris/iris_clear.c
index 6e0a569e7b0..2fd82c1881e 100644
--- a/src/gallium/drivers/iris/iris_clear.c
+++ b/src/gallium/drivers/iris/iris_clear.c
@@ -353,6 +353,12 @@ can_fast_clear_depth(struct iris_context *ice,
 {
    struct pipe_resource *p_res = (void *) res;
 
+   struct iris_batch *batch = &ice->batches[IRIS_BATCH_RENDER];
+   const struct gen_device_info *devinfo = &batch->screen->devinfo;
+
+   if (devinfo->gen > 9)
+      return false;
+
    /* Check for partial clears */
    if (box->x > 0 || box->y > 0 ||
        box->width < u_minify(p_res->width0, level) ||
-- 
2.20.1



More information about the mesa-dev mailing list