diff options
Diffstat (limited to 'src/compiler/glsl')
-rw-r--r-- | src/compiler/glsl/glsl_parser_extras.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/compiler/glsl/glsl_parser_extras.cpp b/src/compiler/glsl/glsl_parser_extras.cpp index fb64350ed39..463cb9730ea 100644 --- a/src/compiler/glsl/glsl_parser_extras.cpp +++ b/src/compiler/glsl/glsl_parser_extras.cpp @@ -1683,6 +1683,14 @@ set_shader_inout_layout(struct gl_shader *shader, if (state->out_qualifier->max_vertices-> process_qualifier_constant(state, "max_vertices", &qual_max_vertices, true)) { + + if (qual_max_vertices > state->Const.MaxGeometryOutputVertices) { + YYLTYPE loc = state->out_qualifier->max_vertices->get_location(); + _mesa_glsl_error(&loc, state, + "maximum output vertices (%d) exceeds " + "GL_MAX_GEOMETRY_OUTPUT_VERTICES", + qual_max_vertices); + } shader->Geom.VerticesOut = qual_max_vertices; } } |