summaryrefslogtreecommitdiffstats
path: root/src/mesa
diff options
context:
space:
mode:
authorTimothy Arceri <[email protected]>2016-11-22 21:14:14 +1100
committerTimothy Arceri <[email protected]>2017-01-23 14:48:04 +1100
commitcbeba6bd48da2cbe0074cc59a857e0248e94b8fe (patch)
tree124ba5e8edd930804c95ac7a1ed1d2f22356b92b /src/mesa
parent64e201ab8f08daa2c189ab615a4096daf60c27c5 (diff)
mesa/glsl/i965: set and get tes layouts directly to and from shader_info
Reviewed-by: Nicolai Hähnle <[email protected]>
Diffstat (limited to 'src/mesa')
-rw-r--r--src/mesa/drivers/dri/i965/brw_tcs.c6
-rw-r--r--src/mesa/main/shaderapi.c15
2 files changed, 7 insertions, 14 deletions
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;