summaryrefslogtreecommitdiffstats
path: root/src/compiler/glsl
diff options
context:
space:
mode:
Diffstat (limited to 'src/compiler/glsl')
-rw-r--r--src/compiler/glsl/glsl_parser_extras.cpp3
-rw-r--r--src/compiler/glsl/glsl_parser_extras.h1
2 files changed, 3 insertions, 1 deletions
diff --git a/src/compiler/glsl/glsl_parser_extras.cpp b/src/compiler/glsl/glsl_parser_extras.cpp
index 42ba88ffb9f..6c98290292a 100644
--- a/src/compiler/glsl/glsl_parser_extras.cpp
+++ b/src/compiler/glsl/glsl_parser_extras.cpp
@@ -118,6 +118,7 @@ _mesa_glsl_parse_state::_mesa_glsl_parse_state(struct gl_context *_ctx,
this->Const.MaxVertexOutputComponents = ctx->Const.Program[MESA_SHADER_VERTEX].MaxOutputComponents;
this->Const.MaxGeometryInputComponents = ctx->Const.Program[MESA_SHADER_GEOMETRY].MaxInputComponents;
this->Const.MaxGeometryOutputComponents = ctx->Const.Program[MESA_SHADER_GEOMETRY].MaxOutputComponents;
+ this->Const.MaxGeometryShaderInvocations = ctx->Const.MaxGeometryShaderInvocations;
this->Const.MaxFragmentInputComponents = ctx->Const.Program[MESA_SHADER_FRAGMENT].MaxInputComponents;
this->Const.MaxGeometryTextureImageUnits = ctx->Const.Program[MESA_SHADER_GEOMETRY].MaxTextureImageUnits;
this->Const.MaxGeometryOutputVertices = ctx->Const.MaxGeometryOutputVertices;
@@ -1820,7 +1821,7 @@ set_shader_inout_layout(struct gl_shader *shader,
&invocations, false)) {
YYLTYPE loc = state->in_qualifier->invocations->get_location();
- if (invocations > MAX_GEOMETRY_SHADER_INVOCATIONS) {
+ if (invocations > state->Const.MaxGeometryShaderInvocations) {
_mesa_glsl_error(&loc, state,
"invocations (%d) exceeds "
"GL_MAX_GEOMETRY_SHADER_INVOCATIONS",
diff --git a/src/compiler/glsl/glsl_parser_extras.h b/src/compiler/glsl/glsl_parser_extras.h
index da44d37c15b..c80db42ea9b 100644
--- a/src/compiler/glsl/glsl_parser_extras.h
+++ b/src/compiler/glsl/glsl_parser_extras.h
@@ -493,6 +493,7 @@ struct _mesa_glsl_parse_state {
unsigned MaxVertexOutputComponents;
unsigned MaxGeometryInputComponents;
unsigned MaxGeometryOutputComponents;
+ unsigned MaxGeometryShaderInvocations;
unsigned MaxFragmentInputComponents;
unsigned MaxGeometryTextureImageUnits;
unsigned MaxGeometryOutputVertices;