iris: Do not fast clear depth on gen > 9 yet.

Submitted by Rafael Antognolli on April 3, 2019, 10:54 p.m.

Details

Message ID 20190403225410.21706-1-rafael.antognolli@intel.com
State New
Headers show
Series "iris: Do not fast clear depth on gen > 9 yet." ( rev: 1 ) in Mesa

Not browsing as part of any series.

Commit Message

Rafael Antognolli April 3, 2019, 10:54 p.m.
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(+)

Patch hide | download patch | download mbox

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) ||