diff options
author | Nanley Chery <[email protected]> | 2019-10-07 15:52:21 -0700 |
---|---|---|
committer | Nanley Chery <[email protected]> | 2019-10-28 10:47:06 -0700 |
commit | fee4dbcb4ddac04c132c5f69f67b76b5ddaeb793 (patch) | |
tree | 649470079ee39c64e69263bb7106fcb3e773302e /src | |
parent | 5425fcf2cb39dc9df56593d4460b56688506c0cc (diff) |
iris: Start using blorp_can_hiz_clear_depth()
Check that the alignment requirements for HIZ_CCS are satisfied by using
this function.
Reviewed-by: Sagar Ghuge <[email protected]>
Reviewed-by: Kenneth Graunke <[email protected]>
Diffstat (limited to 'src')
-rw-r--r-- | src/gallium/drivers/iris/iris_clear.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/gallium/drivers/iris/iris_clear.c b/src/gallium/drivers/iris/iris_clear.c index 3cfe3ba5ebf..309fda66665 100644 --- a/src/gallium/drivers/iris/iris_clear.c +++ b/src/gallium/drivers/iris/iris_clear.c @@ -407,6 +407,9 @@ can_fast_clear_depth(struct iris_context *ice, float depth) { struct pipe_resource *p_res = (void *) res; + struct pipe_context *ctx = (void *) ice; + struct iris_screen *screen = (void *) ctx->screen; + const struct gen_device_info *devinfo = &screen->devinfo; if (INTEL_DEBUG & DEBUG_NO_FAST_CLEAR) return false; @@ -421,7 +424,10 @@ can_fast_clear_depth(struct iris_context *ice, if (!(res->aux.has_hiz & (1 << level))) return false; - return true; + 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); } static void |