nir: Fix system_value_from_intrinsic for subgroups
authorJason Ekstrand <jason.ekstrand@intel.com>
Mon, 21 Aug 2017 23:05:20 +0000 (16:05 -0700)
committerJason Ekstrand <jason.ekstrand@intel.com>
Mon, 28 Aug 2017 15:57:52 +0000 (08:57 -0700)
A couple of the cases were backwards

Reviewed-by: Matt Turner <mattst88@gmail.com>
Cc: mesa-stable@lists.freedesktop.org
src/compiler/nir/nir.c

index e9e04896335756bf48bef6002dae4bce4ee4e107..afd4d1a723681c43282e1ed0c021cc5c3efc2b57 100644 (file)
@@ -1992,10 +1992,10 @@ nir_system_value_from_intrinsic(nir_intrinsic_op intrin)
       return SYSTEM_VALUE_HELPER_INVOCATION;
    case nir_intrinsic_load_view_index:
       return SYSTEM_VALUE_VIEW_INDEX;
-   case SYSTEM_VALUE_SUBGROUP_SIZE:
-      return nir_intrinsic_load_subgroup_size;
-   case SYSTEM_VALUE_SUBGROUP_INVOCATION:
-      return nir_intrinsic_load_subgroup_invocation;
+   case nir_intrinsic_load_subgroup_size:
+      return SYSTEM_VALUE_SUBGROUP_SIZE;
+   case nir_intrinsic_load_subgroup_invocation:
+      return SYSTEM_VALUE_SUBGROUP_INVOCATION;
    case nir_intrinsic_load_subgroup_eq_mask:
       return SYSTEM_VALUE_SUBGROUP_EQ_MASK;
    case nir_intrinsic_load_subgroup_ge_mask: