diff options
author | Timothy Arceri <timothy.arceri@collabora.com> | 2016-06-22 12:41:28 +1000 |
---|---|---|
committer | Timothy Arceri <t_arceri@yahoo.com.au> | 2016-06-23 11:01:46 +1000 |
commit | ab99196b6bc5b0170db20db6cc3837ce7642d22a (patch) | |
tree | 0e37f19fba45438d45cad609ab4b940b0ab6b997 /src/mesa/main/api_validate.c | |
parent | 24b3be093870a9a77325ac33c8fce97fae143e8e (diff) | |
download | external_mesa3d-ab99196b6bc5b0170db20db6cc3837ce7642d22a.zip external_mesa3d-ab99196b6bc5b0170db20db6cc3837ce7642d22a.tar.gz external_mesa3d-ab99196b6bc5b0170db20db6cc3837ce7642d22a.tar.bz2 |
glsl/mesa: stop duplicating geom and tcs layout values
We already store these in gl_shader and gl_program here we
remove it from gl_shader_program and just use the values
from gl_shader.
This will allow us to keep the shader cache restore code as
simple as it can be while making it somewhat clearer where these
values originate from.
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Diffstat (limited to 'src/mesa/main/api_validate.c')
-rw-r--r-- | src/mesa/main/api_validate.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/mesa/main/api_validate.c b/src/mesa/main/api_validate.c index ab34d99..8efbf50 100644 --- a/src/mesa/main/api_validate.c +++ b/src/mesa/main/api_validate.c @@ -200,7 +200,8 @@ _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]->Geom.InputType; + ctx->_Shader->CurrentProgram[MESA_SHADER_GEOMETRY]-> + _LinkedShaders[MESA_SHADER_GEOMETRY]->Geom.InputType; struct gl_shader_program *tes = ctx->_Shader->CurrentProgram[MESA_SHADER_TESS_EVAL]; GLenum mode_before_gs = mode; @@ -305,7 +306,8 @@ _mesa_valid_prim_mode(struct gl_context *ctx, GLenum mode, const char *name) GLboolean pass = GL_TRUE; if(ctx->_Shader->CurrentProgram[MESA_SHADER_GEOMETRY]) { - switch (ctx->_Shader->CurrentProgram[MESA_SHADER_GEOMETRY]->Geom.OutputType) { + switch (ctx->_Shader->CurrentProgram[MESA_SHADER_GEOMETRY]-> + _LinkedShaders[MESA_SHADER_GEOMETRY]->Geom.OutputType) { case GL_POINTS: pass = ctx->TransformFeedback.Mode == GL_POINTS; break; |