nir: Populate some places where existing system values were missing
authorJesse Natalie <jenatali@microsoft.com>
Fri, 29 May 2020 18:09:37 +0000 (11:09 -0700)
committerMarge Bot <eric+marge@anholt.net>
Fri, 21 Aug 2020 22:07:05 +0000 (22:07 +0000)
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5891>

src/compiler/nir/nir.c
src/compiler/shader_enums.c

index 2fe9c6e295cce65b9a4bde2a2652da74ef5a1284..40c3949058594d52d7927c515c8b06b94acc85a1 100644 (file)
@@ -2220,6 +2220,10 @@ nir_system_value_from_intrinsic(nir_intrinsic_op intrin)
       return SYSTEM_VALUE_LOCAL_GROUP_SIZE;
    case nir_intrinsic_load_global_invocation_id:
       return SYSTEM_VALUE_GLOBAL_INVOCATION_ID;
+   case nir_intrinsic_load_global_invocation_index:
+      return SYSTEM_VALUE_GLOBAL_INVOCATION_INDEX;
+   case nir_intrinsic_load_work_dim:
+      return SYSTEM_VALUE_WORK_DIM;
    case nir_intrinsic_load_user_data_amd:
       return SYSTEM_VALUE_USER_DATA_AMD;
    default:
index be382f5535dc4a0d1b41e7025b005812b5dad215..a89b51383723b146d8f6e1f9c961fc7bbe9fa2a7 100644 (file)
@@ -241,13 +241,17 @@ gl_system_value_name(gl_system_value sysval)
      ENUM(SYSTEM_VALUE_PRIMITIVE_ID),
      ENUM(SYSTEM_VALUE_TESS_LEVEL_OUTER),
      ENUM(SYSTEM_VALUE_TESS_LEVEL_INNER),
+     ENUM(SYSTEM_VALUE_TESS_LEVEL_OUTER_DEFAULT),
+     ENUM(SYSTEM_VALUE_TESS_LEVEL_INNER_DEFAULT),
      ENUM(SYSTEM_VALUE_LOCAL_INVOCATION_ID),
      ENUM(SYSTEM_VALUE_LOCAL_INVOCATION_INDEX),
      ENUM(SYSTEM_VALUE_GLOBAL_INVOCATION_ID),
+     ENUM(SYSTEM_VALUE_GLOBAL_INVOCATION_INDEX),
      ENUM(SYSTEM_VALUE_WORK_GROUP_ID),
      ENUM(SYSTEM_VALUE_NUM_WORK_GROUPS),
      ENUM(SYSTEM_VALUE_LOCAL_GROUP_SIZE),
      ENUM(SYSTEM_VALUE_GLOBAL_GROUP_SIZE),
+     ENUM(SYSTEM_VALUE_USER_DATA_AMD),
      ENUM(SYSTEM_VALUE_WORK_DIM),
      ENUM(SYSTEM_VALUE_DEVICE_INDEX),
      ENUM(SYSTEM_VALUE_VIEW_INDEX),