Mesa (master): nir: sanitize work group intrinsics to always be 32-bit.

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Fri Dec 27 03:43:15 UTC 2019


Module: Mesa
Branch: master
Commit: 41c77dbc1ecbd48347cdd2459485416948c562c2
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=41c77dbc1ecbd48347cdd2459485416948c562c2

Author: Dave Airlie <airlied at redhat.com>
Date:   Thu Dec 12 09:39:21 2019 +1000

nir: sanitize work group intrinsics to always be 32-bit.

This saves handling them in the backend later.

Reviewed-by: Karol Herbst <kherbst at redhat.com>

---

 src/compiler/nir/nir_lower_system_values.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/src/compiler/nir/nir_lower_system_values.c b/src/compiler/nir/nir_lower_system_values.c
index 0ff73c9e265..b99ae406ce4 100644
--- a/src/compiler/nir/nir_lower_system_values.c
+++ b/src/compiler/nir/nir_lower_system_values.c
@@ -222,6 +222,10 @@ lower_system_value_instr(nir_builder *b, nir_instr *instr, void *_state)
          return NULL;
       }
 
+   case nir_intrinsic_load_num_work_groups:
+   case nir_intrinsic_load_work_group_id:
+      return sanitize_32bit_sysval(b, intrin);
+
    case nir_intrinsic_load_deref: {
       nir_deref_instr *deref = nir_src_as_deref(intrin->src[0]);
       if (deref->mode != nir_var_system_value)




More information about the mesa-commit mailing list