aboutsummaryrefslogtreecommitdiff
path: root/mesalib/src/glsl/builtin_variables.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'mesalib/src/glsl/builtin_variables.cpp')
-rw-r--r--mesalib/src/glsl/builtin_variables.cpp22
1 files changed, 22 insertions, 0 deletions
diff --git a/mesalib/src/glsl/builtin_variables.cpp b/mesalib/src/glsl/builtin_variables.cpp
index cc423383d..4176ae6e6 100644
--- a/mesalib/src/glsl/builtin_variables.cpp
+++ b/mesalib/src/glsl/builtin_variables.cpp
@@ -711,6 +711,26 @@ builtin_variable_generator::generate_constants()
* in ast_cs_input_layout::hir().
*/
}
+
+ if (state->is_version(420, 0) ||
+ state->ARB_shader_image_load_store_enable) {
+ add_const("gl_MaxImageUnits",
+ state->Const.MaxImageUnits);
+ add_const("gl_MaxCombinedImageUnitsAndFragmentOutputs",
+ state->Const.MaxCombinedImageUnitsAndFragmentOutputs);
+ add_const("gl_MaxImageSamples",
+ state->Const.MaxImageSamples);
+ add_const("gl_MaxVertexImageUniforms",
+ state->Const.MaxVertexImageUniforms);
+ add_const("gl_MaxTessControlImageUniforms", 0);
+ add_const("gl_MaxTessEvaluationImageUniforms", 0);
+ add_const("gl_MaxGeometryImageUniforms",
+ state->Const.MaxGeometryImageUniforms);
+ add_const("gl_MaxFragmentImageUniforms",
+ state->Const.MaxFragmentImageUniforms);
+ add_const("gl_MaxCombinedImageUniforms",
+ state->Const.MaxCombinedImageUniforms);
+ }
}
@@ -834,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