Mesa (main): iris: Enable atomic operations on compressed surfaces
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Fri Oct 1 22:29:21 UTC 2021
Module: Mesa
Branch: main
Commit: 7ddb0c9f762c800752597f6449eccc108f34ee7d
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=7ddb0c9f762c800752597f6449eccc108f34ee7d
Author: Sagar Ghuge <sagar.ghuge at intel.com>
Date: Mon Sep 20 23:12:57 2021 -0700
iris: Enable atomic operations on compressed surfaces
Let's not turn off compression for atomic operations since XeHPG
supports it.
Signed-off-by: Sagar Ghuge <sagar.ghuge at intel.com>
Reviewed-by: Tapani Pälli <tapani.palli at intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12966>
---
src/gallium/drivers/iris/iris_resolve.c | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/src/gallium/drivers/iris/iris_resolve.c b/src/gallium/drivers/iris/iris_resolve.c
index ecc0cbbe9ac..50fc9a94dfe 100644
--- a/src/gallium/drivers/iris/iris_resolve.c
+++ b/src/gallium/drivers/iris/iris_resolve.c
@@ -913,6 +913,8 @@ iris_image_view_aux_usage(struct iris_context *ice,
if (!info)
return ISL_AUX_USAGE_NONE;
+ const struct iris_screen *screen = (void *) ice->ctx.screen;
+ const struct intel_device_info *devinfo = &screen->devinfo;
struct iris_resource *res = (void *) pview->resource;
enum isl_format view_format = iris_image_view_get_format(ice, pview);
@@ -922,7 +924,11 @@ iris_image_view_aux_usage(struct iris_context *ice,
bool uses_atomic_load_store =
ice->shaders.uncompiled[info->stage]->uses_atomic_load_store;
- if (aux_usage == ISL_AUX_USAGE_GFX12_CCS_E && !uses_atomic_load_store)
+ /* On GFX12, compressed surfaces supports non-atomic operations. GFX12HP and
+ * further, add support for all the operations.
+ */
+ if (aux_usage == ISL_AUX_USAGE_GFX12_CCS_E &&
+ (devinfo->verx10 >= 125 || !uses_atomic_load_store))
return ISL_AUX_USAGE_GFX12_CCS_E;
return ISL_AUX_USAGE_NONE;
More information about the mesa-commit
mailing list