[Mesa-dev] [PATCH 10/19] st/glsl_to_tgsi: implement ARB_shader_ballot system variables
Nicolai Hähnle
nhaehnle at gmail.com
Fri Mar 31 17:14:10 UTC 2017
From: Nicolai Hähnle <nicolai.haehnle at amd.com>
---
src/mesa/state_tracker/st_glsl_to_tgsi.cpp | 16 ++++++++++++++++
1 file changed, 16 insertions(+)
diff --git a/src/mesa/state_tracker/st_glsl_to_tgsi.cpp b/src/mesa/state_tracker/st_glsl_to_tgsi.cpp
index e84c61a..8c94f05 100644
--- a/src/mesa/state_tracker/st_glsl_to_tgsi.cpp
+++ b/src/mesa/state_tracker/st_glsl_to_tgsi.cpp
@@ -5440,20 +5440,36 @@ _mesa_sysval_to_semantic(unsigned sysval)
/* Compute shader */
case SYSTEM_VALUE_LOCAL_INVOCATION_ID:
return TGSI_SEMANTIC_THREAD_ID;
case SYSTEM_VALUE_WORK_GROUP_ID:
return TGSI_SEMANTIC_BLOCK_ID;
case SYSTEM_VALUE_NUM_WORK_GROUPS:
return TGSI_SEMANTIC_GRID_SIZE;
case SYSTEM_VALUE_LOCAL_GROUP_SIZE:
return TGSI_SEMANTIC_BLOCK_SIZE;
+ /* ARB_shader_ballot */
+ case SYSTEM_VALUE_SUBGROUP_SIZE:
+ return TGSI_SEMANTIC_SUBGROUP_SIZE;
+ case SYSTEM_VALUE_SUBGROUP_INVOCATION:
+ return TGSI_SEMANTIC_SUBGROUP_INVOCATION;
+ case SYSTEM_VALUE_SUBGROUP_EQ_MASK:
+ return TGSI_SEMANTIC_SUBGROUP_EQ_MASK;
+ case SYSTEM_VALUE_SUBGROUP_GE_MASK:
+ return TGSI_SEMANTIC_SUBGROUP_GE_MASK;
+ case SYSTEM_VALUE_SUBGROUP_GT_MASK:
+ return TGSI_SEMANTIC_SUBGROUP_GT_MASK;
+ case SYSTEM_VALUE_SUBGROUP_LE_MASK:
+ return TGSI_SEMANTIC_SUBGROUP_LE_MASK;
+ case SYSTEM_VALUE_SUBGROUP_LT_MASK:
+ return TGSI_SEMANTIC_SUBGROUP_LT_MASK;
+
/* Unhandled */
case SYSTEM_VALUE_LOCAL_INVOCATION_INDEX:
case SYSTEM_VALUE_GLOBAL_INVOCATION_ID:
case SYSTEM_VALUE_VERTEX_CNT:
default:
assert(!"Unexpected SYSTEM_VALUE_ enum");
return TGSI_SEMANTIC_COUNT;
}
}
--
2.9.3
More information about the mesa-dev
mailing list