From 9812fce60b6ffbcd136b66bfb609143449ad3f7c Mon Sep 17 00:00:00 2001 From: Jason Ekstrand Date: Tue, 22 Aug 2017 16:53:05 -0700 Subject: spirv: Add subgroup ballot support Reviewed-by: Iago Toral Quiroga --- src/compiler/spirv/vtn_variables.c | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'src/compiler/spirv/vtn_variables.c') diff --git a/src/compiler/spirv/vtn_variables.c b/src/compiler/spirv/vtn_variables.c index 68e1adf8152..61caaafa311 100644 --- a/src/compiler/spirv/vtn_variables.c +++ b/src/compiler/spirv/vtn_variables.c @@ -1317,6 +1317,26 @@ vtn_get_builtin_location(struct vtn_builder *b, *location = SYSTEM_VALUE_VIEW_INDEX; set_mode_system_value(b, mode); break; + case SpvBuiltInSubgroupEqMask: + *location = SYSTEM_VALUE_SUBGROUP_EQ_MASK, + set_mode_system_value(b, mode); + break; + case SpvBuiltInSubgroupGeMask: + *location = SYSTEM_VALUE_SUBGROUP_GE_MASK, + set_mode_system_value(b, mode); + break; + case SpvBuiltInSubgroupGtMask: + *location = SYSTEM_VALUE_SUBGROUP_GT_MASK, + set_mode_system_value(b, mode); + break; + case SpvBuiltInSubgroupLeMask: + *location = SYSTEM_VALUE_SUBGROUP_LE_MASK, + set_mode_system_value(b, mode); + break; + case SpvBuiltInSubgroupLtMask: + *location = SYSTEM_VALUE_SUBGROUP_LT_MASK, + set_mode_system_value(b, mode); + break; default: vtn_fail("unsupported builtin"); } -- cgit v1.2.3