aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium
diff options
context:
space:
mode:
authorTapani Pälli <[email protected]>2020-03-06 08:59:16 +0200
committerMarge Bot <[email protected]>2020-03-16 10:34:21 +0000
commite8f0483ec408037ce7b7c6014674f13cc4461079 (patch)
tree970055366fae1b023ec101ffb91adf737618bfcb /src/gallium
parent6dd654ba419d792806366f43ba9325f52eab9488 (diff)
intel/compiler: detect if atomic load store operations are used
Patch adds a new arg and modifies existing calls from i965, anv pass NULL but iris stores this information for later use. Signed-off-by: Tapani Pälli <[email protected]> Reviewed-by: Lionel Landwerlin <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4080>
Diffstat (limited to 'src/gallium')
-rw-r--r--src/gallium/drivers/iris/iris_context.h3
-rw-r--r--src/gallium/drivers/iris/iris_program.c3
2 files changed, 5 insertions, 1 deletions
diff --git a/src/gallium/drivers/iris/iris_context.h b/src/gallium/drivers/iris/iris_context.h
index 7a16b46f52d..0963601d147 100644
--- a/src/gallium/drivers/iris/iris_context.h
+++ b/src/gallium/drivers/iris/iris_context.h
@@ -361,6 +361,9 @@ struct iris_uncompiled_shader {
bool needs_edge_flag;
+ /* Whether shader uses atomic operations. */
+ bool uses_atomic_load_store;
+
/** Constant data scraped from the shader by nir_opt_large_constants */
struct pipe_resource *const_data;
diff --git a/src/gallium/drivers/iris/iris_program.c b/src/gallium/drivers/iris/iris_program.c
index d7e470b4238..de335cd9803 100644
--- a/src/gallium/drivers/iris/iris_program.c
+++ b/src/gallium/drivers/iris/iris_program.c
@@ -2131,7 +2131,8 @@ iris_create_uncompiled_shader(struct pipe_context *ctx,
brw_preprocess_nir(screen->compiler, nir, NULL);
- NIR_PASS_V(nir, brw_nir_lower_image_load_store, devinfo);
+ NIR_PASS_V(nir, brw_nir_lower_image_load_store, devinfo,
+ &ish->uses_atomic_load_store);
NIR_PASS_V(nir, iris_lower_storage_image_derefs);
nir_sweep(nir);