summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/iris
diff options
context:
space:
mode:
authorTapani Pälli <[email protected]>2020-03-12 08:24:09 +0200
committerMarge Bot <[email protected]>2020-03-16 10:34:21 +0000
commitfd1436440bd84d0b48fd7282b8f012ad382483ed (patch)
tree42a66e600a947ed847ab8a3e9ccb4607a9769551 /src/gallium/drivers/iris
parentd836f3fadfbfe3dfc8bd1b60b2146f676e8ff8a1 (diff)
iris: allow compression conditionally for images on gen12
With this change, amount of resolves happening with deqp-gles31 (--deqp-case=*load_store*) drops ~50%. v2: use iris_image_view_get_format to get the format, get devinfo from context instead of passing it (Nanley) Signed-off-by: Tapani Pälli <[email protected]> Reviewed-by: Lionel Landwerlin <[email protected]> Reviewed-by: Nanley Chery <[email protected]> Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4080> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4080>
Diffstat (limited to 'src/gallium/drivers/iris')
-rw-r--r--src/gallium/drivers/iris/iris_resolve.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/gallium/drivers/iris/iris_resolve.c b/src/gallium/drivers/iris/iris_resolve.c
index cfcbcbfc31d..cbe2369c849 100644
--- a/src/gallium/drivers/iris/iris_resolve.c
+++ b/src/gallium/drivers/iris/iris_resolve.c
@@ -993,6 +993,24 @@ iris_image_view_aux_usage(struct iris_context *ice,
const struct pipe_image_view *pview,
const struct shader_info *info)
{
+ if (!info)
+ return ISL_AUX_USAGE_NONE;
+
+ struct iris_screen *screen = (void *) ice->ctx.screen;
+ const struct gen_device_info *devinfo = &screen->devinfo;
+ struct iris_resource *res = (void *) pview->resource;
+
+ enum isl_format view_format = iris_image_view_get_format(ice, pview);
+ enum isl_aux_usage aux_usage =
+ iris_resource_texture_aux_usage(ice, res, view_format);
+
+ bool uses_atomic_load_store =
+ ice->shaders.uncompiled[info->stage]->uses_atomic_load_store;
+
+ if ((devinfo->gen == 12 && aux_usage == ISL_AUX_USAGE_CCS_E) &&
+ !uses_atomic_load_store)
+ return ISL_AUX_USAGE_CCS_E;
+
return ISL_AUX_USAGE_NONE;
}