From 6b1515cb849d29cb93e9c4be23723770e26f2409 Mon Sep 17 00:00:00 2001 From: Jesse Natalie Date: Fri, 29 May 2020 11:09:37 -0700 Subject: [PATCH] nir: Populate some places where existing system values were missing Reviewed-by: Karol Herbst Reviewed-by: Jason Ekstrand Part-of: --- src/compiler/nir/nir.c | 4 ++++ src/compiler/shader_enums.c | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/src/compiler/nir/nir.c b/src/compiler/nir/nir.c index 2fe9c6e295c..40c39490585 100644 --- a/src/compiler/nir/nir.c +++ b/src/compiler/nir/nir.c @@ -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: diff --git a/src/compiler/shader_enums.c b/src/compiler/shader_enums.c index be382f5535d..a89b5138372 100644 --- a/src/compiler/shader_enums.c +++ b/src/compiler/shader_enums.c @@ -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), -- 2.30.2