summaryrefslogtreecommitdiffstats
path: root/src/mesa/main/api_validate.c
diff options
context:
space:
mode:
authorTimothy Arceri <[email protected]>2016-06-22 12:41:28 +1000
committerTimothy Arceri <[email protected]>2016-06-23 11:01:46 +1000
commitab99196b6bc5b0170db20db6cc3837ce7642d22a (patch)
tree0e37f19fba45438d45cad609ab4b940b0ab6b997 /src/mesa/main/api_validate.c
parent24b3be093870a9a77325ac33c8fce97fae143e8e (diff)
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 <[email protected]>
Diffstat (limited to 'src/mesa/main/api_validate.c')
-rw-r--r--src/mesa/main/api_validate.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/mesa/main/api_validate.c b/src/mesa/main/api_validate.c
index ab34d99834c..8efbf50c092 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;