From 1591e668e162daf4057a0d44df4e70f19b94fc76 Mon Sep 17 00:00:00 2001 From: Timothy Arceri Date: Thu, 30 Jun 2016 14:44:59 +1000 Subject: glsl/mesa: move duplicate shader fields into new struct gl_shader_info Reviewed-by: Iago Toral Quiroga --- src/mesa/main/api_validate.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'src/mesa/main/api_validate.c') diff --git a/src/mesa/main/api_validate.c b/src/mesa/main/api_validate.c index c0962241f84..038b5a9cd73 100644 --- a/src/mesa/main/api_validate.c +++ b/src/mesa/main/api_validate.c @@ -201,7 +201,7 @@ _mesa_valid_prim_mode(struct gl_context *ctx, GLenum mode, const char *name) if (ctx->_Shader->CurrentProgram[MESA_SHADER_GEOMETRY]) { const GLenum geom_mode = ctx->_Shader->CurrentProgram[MESA_SHADER_GEOMETRY]-> - _LinkedShaders[MESA_SHADER_GEOMETRY]->Geom.InputType; + _LinkedShaders[MESA_SHADER_GEOMETRY]->info.Geom.InputType; struct gl_shader_program *tes = ctx->_Shader->CurrentProgram[MESA_SHADER_TESS_EVAL]; GLenum mode_before_gs = mode; @@ -209,9 +209,9 @@ _mesa_valid_prim_mode(struct gl_context *ctx, GLenum mode, const char *name) if (tes) { struct gl_linked_shader *tes_sh = tes->_LinkedShaders[MESA_SHADER_TESS_EVAL]; - if (tes_sh->TessEval.PointMode) + if (tes_sh->info.TessEval.PointMode) mode_before_gs = GL_POINTS; - else if (tes_sh->TessEval.PrimitiveMode == GL_ISOLINES) + else if (tes_sh->info.TessEval.PrimitiveMode == GL_ISOLINES) mode_before_gs = GL_LINES; else /* the GL_QUADS mode generates triangles too */ @@ -308,7 +308,8 @@ _mesa_valid_prim_mode(struct gl_context *ctx, GLenum mode, const char *name) if(ctx->_Shader->CurrentProgram[MESA_SHADER_GEOMETRY]) { switch (ctx->_Shader->CurrentProgram[MESA_SHADER_GEOMETRY]-> - _LinkedShaders[MESA_SHADER_GEOMETRY]->Geom.OutputType) { + _LinkedShaders[MESA_SHADER_GEOMETRY]-> + info.Geom.OutputType) { case GL_POINTS: pass = ctx->TransformFeedback.Mode == GL_POINTS; break; @@ -327,9 +328,9 @@ _mesa_valid_prim_mode(struct gl_context *ctx, GLenum mode, const char *name) ctx->_Shader->CurrentProgram[MESA_SHADER_TESS_EVAL]; struct gl_linked_shader *tes_sh = tes->_LinkedShaders[MESA_SHADER_TESS_EVAL]; - if (tes_sh->TessEval.PointMode) + if (tes_sh->info.TessEval.PointMode) pass = ctx->TransformFeedback.Mode == GL_POINTS; - else if (tes_sh->TessEval.PrimitiveMode == GL_ISOLINES) + else if (tes_sh->info.TessEval.PrimitiveMode == GL_ISOLINES) pass = ctx->TransformFeedback.Mode == GL_LINES; else pass = ctx->TransformFeedback.Mode == GL_TRIANGLES; -- cgit v1.2.3