From: Connor Abbott <cwabbo...@gmail.com> For SPIR-V, Khronos decided to make the SubGroup*Mask system values consist of 4 32-bit components rather than one 64-bit component. Although we'll lower away the difference in nir_lower_system_values so drivers won't have to deal with them, adding these system values makes it easier to implement the SPIRV-to-NIR bits.
Signed-off-by: Connor Abbott <cwabbo...@gmail.com> --- src/compiler/shader_enums.c | 5 +++++ src/compiler/shader_enums.h | 11 +++++++++++ 2 files changed, 16 insertions(+) diff --git a/src/compiler/shader_enums.c b/src/compiler/shader_enums.c index b2ca80b..571a43e 100644 --- a/src/compiler/shader_enums.c +++ b/src/compiler/shader_enums.c @@ -211,6 +211,11 @@ gl_system_value_name(gl_system_value sysval) ENUM(SYSTEM_VALUE_SUBGROUP_GT_MASK), ENUM(SYSTEM_VALUE_SUBGROUP_LE_MASK), ENUM(SYSTEM_VALUE_SUBGROUP_LT_MASK), + ENUM(SYSTEM_VALUE_SUBGROUP_EQ_MASK_32BIT), + ENUM(SYSTEM_VALUE_SUBGROUP_GE_MASK_32BIT), + ENUM(SYSTEM_VALUE_SUBGROUP_GT_MASK_32BIT), + ENUM(SYSTEM_VALUE_SUBGROUP_LE_MASK_32BIT), + ENUM(SYSTEM_VALUE_SUBGROUP_LT_MASK_32BIT), ENUM(SYSTEM_VALUE_VERTEX_ID), ENUM(SYSTEM_VALUE_INSTANCE_ID), ENUM(SYSTEM_VALUE_INSTANCE_INDEX), diff --git a/src/compiler/shader_enums.h b/src/compiler/shader_enums.h index 07db476..174b5ca 100644 --- a/src/compiler/shader_enums.h +++ b/src/compiler/shader_enums.h @@ -373,6 +373,17 @@ typedef enum SYSTEM_VALUE_SUBGROUP_GT_MASK, SYSTEM_VALUE_SUBGROUP_LE_MASK, SYSTEM_VALUE_SUBGROUP_LT_MASK, + + /** + * These are the same as system values above, except that they consist of 4 + * 32-bit components rather than 1 64-bit component. This matches the + * semantics of the SPIR-V KHR_shader_ballot extension. + */ + SYSTEM_VALUE_SUBGROUP_EQ_MASK_32BIT, + SYSTEM_VALUE_SUBGROUP_GE_MASK_32BIT, + SYSTEM_VALUE_SUBGROUP_GT_MASK_32BIT, + SYSTEM_VALUE_SUBGROUP_LE_MASK_32BIT, + SYSTEM_VALUE_SUBGROUP_LT_MASK_32BIT, /*@}*/ /*@}*/ -- 2.9.4 _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev