diff options
author | Marek Olšák <[email protected]> | 2018-08-06 08:09:12 -0400 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2018-08-23 16:56:17 -0400 |
commit | a8b71f2db86d63fb1dbc2da88b7e1e326b1b90b2 (patch) | |
tree | e8d680ca68fa0726d42a59ea9401c0d971f15a43 /src/compiler/glsl | |
parent | 45f87a48f94148b484961f18a4f1ccf86f066b1c (diff) |
mesa: add ctx->Const.MaxGeometryShaderInvocations
radeonsi wants to report a different value
Reviewed-by: Ian Romanick <[email protected]>
Tested-by: Dieter Nützel <[email protected]>
Diffstat (limited to 'src/compiler/glsl')
-rw-r--r-- | src/compiler/glsl/glsl_parser_extras.cpp | 3 | ||||
-rw-r--r-- | src/compiler/glsl/glsl_parser_extras.h | 1 |
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; |