summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRhys Perry <pendingchaos02@gmail.com>2020-12-03 17:38:18 +0000
committerMarge Bot <eric+marge@anholt.net>2021-01-07 15:01:02 +0000
commitc73c246e05f87366df3733d66c16fa3e1cf597a8 (patch)
treef4f43c24e1d4eeafd6fedc562b7f671e7e22c5cd
parent5bb94ab050247208af2afae26315bc7ecf9168c5 (diff)
nir: gather whether a compute shader uses non-quad subgroup intrinsics
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com> Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7918>
-rw-r--r--src/compiler/nir/nir_gather_info.c2
-rw-r--r--src/compiler/shader_info.h5
2 files changed, 7 insertions, 0 deletions
diff --git a/src/compiler/nir/nir_gather_info.c b/src/compiler/nir/nir_gather_info.c
index 3d55698cde1..b9fd6b6b13b 100644
--- a/src/compiler/nir/nir_gather_info.c
+++ b/src/compiler/nir/nir_gather_info.c
@@ -568,6 +568,8 @@ gather_intrinsic_info(nir_intrinsic_instr *instr, nir_shader *shader,
case nir_intrinsic_write_invocation_amd:
if (shader->info.stage == MESA_SHADER_FRAGMENT)
shader->info.fs.needs_all_helper_invocations = true;
+ if (shader->info.stage == MESA_SHADER_COMPUTE)
+ shader->info.cs.uses_wide_subgroup_intrinsics = true;
break;
case nir_intrinsic_end_primitive:
diff --git a/src/compiler/shader_info.h b/src/compiler/shader_info.h
index fb9349100f9..f890b6c028f 100644
--- a/src/compiler/shader_info.h
+++ b/src/compiler/shader_info.h
@@ -378,6 +378,11 @@ typedef struct shader_info {
* AddressingModelPhysical64: 64
*/
unsigned ptr_size;
+
+ /**
+ * Uses subgroup intrinsics which can communicate across a quad.
+ */
+ bool uses_wide_subgroup_intrinsics;
} cs;
/* Applies to both TCS and TES. */