Mesa (master): nir: gather whether a compute shader uses non-quad subgroup intrinsics
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Thu Jan 7 15:23:03 UTC 2021
Module: Mesa
Branch: master
Commit: c73c246e05f87366df3733d66c16fa3e1cf597a8
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=c73c246e05f87366df3733d66c16fa3e1cf597a8
Author: Rhys Perry <pendingchaos02 at gmail.com>
Date: Thu Dec 3 17:38:18 2020 +0000
nir: gather whether a compute shader uses non-quad subgroup intrinsics
Signed-off-by: Rhys Perry <pendingchaos02 at gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset at gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7918>
---
src/compiler/nir/nir_gather_info.c | 2 ++
src/compiler/shader_info.h | 5 +++++
2 files changed, 7 insertions(+)
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. */
More information about the mesa-commit
mailing list