diff options
author | Jordan Justen <[email protected]> | 2014-01-25 12:43:26 -0800 |
---|---|---|
committer | Jordan Justen <[email protected]> | 2014-02-20 10:33:09 -0800 |
commit | d09901993539385c015c6389310c186cba9bb263 (patch) | |
tree | 45a4aa16092d320467c4e3bcbe216cad9663b6fd /src/glsl/builtin_variables.cpp | |
parent | 22388e2208a9a321240ec505f513fa5de5af8946 (diff) |
glsl: add gl_InvocationID variable for ARB_gpu_shader5
v2:
* Make gl_InvocationID a system value
Signed-off-by: Jordan Justen <[email protected]>
Reviewed-by: Paul Berry <[email protected]>
Reviewed-by: Anuj Phogat <[email protected]>
Diffstat (limited to 'src/glsl/builtin_variables.cpp')
-rw-r--r-- | src/glsl/builtin_variables.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/glsl/builtin_variables.cpp b/src/glsl/builtin_variables.cpp index 2fa509f2765..4176ae6e640 100644 --- a/src/glsl/builtin_variables.cpp +++ b/src/glsl/builtin_variables.cpp @@ -854,6 +854,8 @@ builtin_variable_generator::generate_gs_special_vars() add_output(VARYING_SLOT_LAYER, int_t, "gl_Layer"); if (state->ARB_viewport_array_enable) add_output(VARYING_SLOT_VIEWPORT, int_t, "gl_ViewportIndex"); + if (state->ARB_gpu_shader5_enable) + add_system_value(SYSTEM_VALUE_INVOCATION_ID, int_t, "gl_InvocationID"); /* Although gl_PrimitiveID appears in tessellation control and tessellation * evaluation shaders, it has a different function there than it has in |