mesa: add ctx->Const.MaxGeometryShaderInvocations

radeonsi wants to report a different value

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Tested-by: Dieter Nützel <Dieter@nuetzel-hh.de>
This commit is contained in:
Marek Olšák
2018-08-06 08:09:12 -04:00
parent 45f87a48f9
commit a8b71f2db8
5 changed files with 7 additions and 3 deletions

View File

@@ -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",

View File

@@ -493,6 +493,7 @@ struct _mesa_glsl_parse_state {
unsigned MaxVertexOutputComponents;
unsigned MaxGeometryInputComponents;
unsigned MaxGeometryOutputComponents;
unsigned MaxGeometryShaderInvocations;
unsigned MaxFragmentInputComponents;
unsigned MaxGeometryTextureImageUnits;
unsigned MaxGeometryOutputVertices;