summaryrefslogtreecommitdiffstats
path: root/src/mesa/main
diff options
context:
space:
mode:
authorTimothy Arceri <[email protected]>2016-10-19 11:13:52 +1100
committerTimothy Arceri <[email protected]>2016-10-26 14:29:36 +1100
commit64d9773cfebded42691a70e3b233cadf896e53ba (patch)
tree5723116394eb77c64c8bb52459540131ec1ab38f /src/mesa/main
parent750b14ed8e6ff539f17069dec63004159575ccd8 (diff)
i965/mesa/st: eliminate gl_tess_ctrl_program
We now get all the tcs metadata from shader_info. Reviewed-by: Jason Ekstrand <[email protected]>
Diffstat (limited to 'src/mesa/main')
-rw-r--r--src/mesa/main/context.c2
-rw-r--r--src/mesa/main/mtypes.h12
-rw-r--r--src/mesa/main/state.c11
3 files changed, 7 insertions, 18 deletions
diff --git a/src/mesa/main/context.c b/src/mesa/main/context.c
index 47fd4a0919f..1e4f87d6536 100644
--- a/src/mesa/main/context.c
+++ b/src/mesa/main/context.c
@@ -1297,7 +1297,7 @@ _mesa_free_context_data( struct gl_context *ctx )
_mesa_reference_vertprog(ctx, &ctx->VertexProgram._Current, NULL);
_mesa_reference_vertprog(ctx, &ctx->VertexProgram._TnlProgram, NULL);
- _mesa_reference_tesscprog(ctx, &ctx->TessCtrlProgram._Current, NULL);
+ _mesa_reference_program(ctx, &ctx->TessCtrlProgram._Current, NULL);
_mesa_reference_tesseprog(ctx, &ctx->TessEvalProgram._Current, NULL);
_mesa_reference_geomprog(ctx, &ctx->GeometryProgram._Current, NULL);
diff --git a/src/mesa/main/mtypes.h b/src/mesa/main/mtypes.h
index c9310ef3070..9436f8e2909 100644
--- a/src/mesa/main/mtypes.h
+++ b/src/mesa/main/mtypes.h
@@ -1998,16 +1998,6 @@ struct gl_vertex_program
};
-/** Tessellation control program object */
-struct gl_tess_ctrl_program
-{
- struct gl_program Base; /**< base class */
-
- /* output layout */
- GLint VerticesOut;
-};
-
-
/** Tessellation evaluation program object */
struct gl_tess_eval_program
{
@@ -2133,7 +2123,7 @@ struct gl_vertex_program_state
struct gl_tess_ctrl_program_state
{
/** Currently bound and valid shader. */
- struct gl_tess_ctrl_program *_Current;
+ struct gl_program *_Current;
GLint patch_vertices;
GLfloat patch_default_outer_level[4];
diff --git a/src/mesa/main/state.c b/src/mesa/main/state.c
index bf6035e0142..b5207613e32 100644
--- a/src/mesa/main/state.c
+++ b/src/mesa/main/state.c
@@ -110,7 +110,7 @@ update_program(struct gl_context *ctx)
const struct gl_vertex_program *prevVP = ctx->VertexProgram._Current;
const struct gl_fragment_program *prevFP = ctx->FragmentProgram._Current;
const struct gl_geometry_program *prevGP = ctx->GeometryProgram._Current;
- const struct gl_tess_ctrl_program *prevTCP = ctx->TessCtrlProgram._Current;
+ const struct gl_program *prevTCP = ctx->TessCtrlProgram._Current;
const struct gl_tess_eval_program *prevTEP = ctx->TessEvalProgram._Current;
const struct gl_compute_program *prevCP = ctx->ComputeProgram._Current;
GLbitfield new_state = 0x0;
@@ -208,13 +208,12 @@ update_program(struct gl_context *ctx)
if (tcsProg && tcsProg->LinkStatus
&& tcsProg->_LinkedShaders[MESA_SHADER_TESS_CTRL]) {
/* Use GLSL tessellation control shader */
- _mesa_reference_tesscprog(ctx, &ctx->TessCtrlProgram._Current,
- gl_tess_ctrl_program(
- tcsProg->_LinkedShaders[MESA_SHADER_TESS_CTRL]->Program));
+ _mesa_reference_program(ctx, &ctx->TessCtrlProgram._Current,
+ tcsProg->_LinkedShaders[MESA_SHADER_TESS_CTRL]->Program);
}
else {
/* No tessellation control program */
- _mesa_reference_tesscprog(ctx, &ctx->TessCtrlProgram._Current, NULL);
+ _mesa_reference_program(ctx, &ctx->TessCtrlProgram._Current, NULL);
}
/* Examine vertex program after fragment program as
@@ -284,7 +283,7 @@ update_program(struct gl_context *ctx)
new_state |= _NEW_PROGRAM;
if (ctx->Driver.BindProgram) {
ctx->Driver.BindProgram(ctx, GL_TESS_CONTROL_PROGRAM_NV,
- (struct gl_program *) ctx->TessCtrlProgram._Current);
+ ctx->TessCtrlProgram._Current);
}
}