From cbeba6bd48da2cbe0074cc59a857e0248e94b8fe Mon Sep 17 00:00:00 2001 From: Timothy Arceri Date: Tue, 22 Nov 2016 21:14:14 +1100 Subject: mesa/glsl/i965: set and get tes layouts directly to and from shader_info MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Reviewed-by: Nicolai Hähnle --- src/mesa/drivers/dri/i965/brw_tcs.c | 6 +++--- src/mesa/main/shaderapi.c | 15 ++++----------- 2 files changed, 7 insertions(+), 14 deletions(-) (limited to 'src/mesa') diff --git a/src/mesa/drivers/dri/i965/brw_tcs.c b/src/mesa/drivers/dri/i965/brw_tcs.c index cafa4b4b411..858ecf99a84 100644 --- a/src/mesa/drivers/dri/i965/brw_tcs.c +++ b/src/mesa/drivers/dri/i965/brw_tcs.c @@ -386,10 +386,10 @@ brw_tcs_precompile(struct gl_context *ctx, struct brw_program *btep; if (tes) { btep = brw_program(tes->Program); - key.tes_primitive_mode = tes->info.TessEval.PrimitiveMode; + key.tes_primitive_mode = tes->Program->info.tess.primitive_mode; key.quads_workaround = brw->gen < 9 && - tes->info.TessEval.PrimitiveMode == GL_QUADS && - tes->info.TessEval.Spacing == TESS_SPACING_EQUAL; + tes->Program->info.tess.primitive_mode == GL_QUADS && + tes->Program->info.tess.spacing == TESS_SPACING_EQUAL; } else { btep = NULL; key.tes_primitive_mode = GL_TRIANGLES; diff --git a/src/mesa/main/shaderapi.c b/src/mesa/main/shaderapi.c index 889ac0fad86..5c9b06fdc66 100644 --- a/src/mesa/main/shaderapi.c +++ b/src/mesa/main/shaderapi.c @@ -829,7 +829,7 @@ get_programiv(struct gl_context *ctx, GLuint program, GLenum pname, break; if (check_tes_query(ctx, shProg)) { *params = shProg->_LinkedShaders[MESA_SHADER_TESS_EVAL]-> - info.TessEval.PrimitiveMode; + Program->info.tess.primitive_mode; } return; case GL_TESS_GEN_SPACING: @@ -838,7 +838,7 @@ get_programiv(struct gl_context *ctx, GLuint program, GLenum pname, if (check_tes_query(ctx, shProg)) { const struct gl_linked_shader *tes = shProg->_LinkedShaders[MESA_SHADER_TESS_EVAL]; - switch (tes->info.TessEval.Spacing) { + switch (tes->Program->info.tess.spacing) { case TESS_SPACING_EQUAL: *params = GL_EQUAL; break; @@ -859,7 +859,7 @@ get_programiv(struct gl_context *ctx, GLuint program, GLenum pname, break; if (check_tes_query(ctx, shProg)) { *params = shProg->_LinkedShaders[MESA_SHADER_TESS_EVAL]-> - info.TessEval.VertexOrder; + Program->info.tess.ccw ? GL_CCW : GL_CW; } return; case GL_TESS_GEN_POINT_MODE: @@ -867,7 +867,7 @@ get_programiv(struct gl_context *ctx, GLuint program, GLenum pname, break; if (check_tes_query(ctx, shProg)) { *params = shProg->_LinkedShaders[MESA_SHADER_TESS_EVAL]-> - info.TessEval.PointMode; + Program->info.tess.point_mode ? GL_TRUE : GL_FALSE; } return; default: @@ -2202,13 +2202,6 @@ _mesa_copy_linked_program_data(const struct gl_shader_program *src, dst->info.separate_shader = src->SeparateShader; switch (dst_sh->Stage) { - case MESA_SHADER_TESS_EVAL: { - dst->info.tess.primitive_mode = dst_sh->info.TessEval.PrimitiveMode; - dst->info.tess.spacing = dst_sh->info.TessEval.Spacing; - dst->info.tess.ccw = dst_sh->info.TessEval.VertexOrder == GL_CCW; - dst->info.tess.point_mode = dst_sh->info.TessEval.PointMode; - break; - } case MESA_SHADER_GEOMETRY: { dst->info.gs.vertices_in = src->Geom.VerticesIn; dst->info.gs.vertices_out = dst_sh->info.Geom.VerticesOut; -- cgit v1.2.3