diff options
author | Timothy Arceri <[email protected]> | 2016-10-19 10:30:52 +1100 |
---|---|---|
committer | Timothy Arceri <[email protected]> | 2016-10-26 14:29:36 +1100 |
commit | 67c2d80a839614e4638d6cff390627122f8148ca (patch) | |
tree | fc6e4bd791478b11338cee1028bd77f0196c970c /src/mesa/main | |
parent | 65225c20c64dd5980f4e3a4eaecb9088aabea2fb (diff) |
i965/mesa/st: eliminate gl_tess_eval_program
We now get all the tes metadata from shader_info.
Reviewed-by: Jason Ekstrand <[email protected]>
Diffstat (limited to 'src/mesa/main')
-rw-r--r-- | src/mesa/main/context.c | 2 | ||||
-rw-r--r-- | src/mesa/main/mtypes.h | 17 | ||||
-rw-r--r-- | src/mesa/main/state.c | 11 |
3 files changed, 8 insertions, 22 deletions
diff --git a/src/mesa/main/context.c b/src/mesa/main/context.c index 1e4f87d6536..5f00365cd0d 100644 --- a/src/mesa/main/context.c +++ b/src/mesa/main/context.c @@ -1298,7 +1298,7 @@ _mesa_free_context_data( struct gl_context *ctx ) _mesa_reference_vertprog(ctx, &ctx->VertexProgram._TnlProgram, NULL); _mesa_reference_program(ctx, &ctx->TessCtrlProgram._Current, NULL); - _mesa_reference_tesseprog(ctx, &ctx->TessEvalProgram._Current, NULL); + _mesa_reference_program(ctx, &ctx->TessEvalProgram._Current, NULL); _mesa_reference_geomprog(ctx, &ctx->GeometryProgram._Current, NULL); _mesa_reference_fragprog(ctx, &ctx->FragmentProgram.Current, NULL); diff --git a/src/mesa/main/mtypes.h b/src/mesa/main/mtypes.h index 9436f8e2909..c0984f122b4 100644 --- a/src/mesa/main/mtypes.h +++ b/src/mesa/main/mtypes.h @@ -1998,19 +1998,6 @@ struct gl_vertex_program }; -/** Tessellation evaluation program object */ -struct gl_tess_eval_program -{ - struct gl_program Base; /**< base class */ - - /* input layout */ - GLenum PrimitiveMode; /* GL_TRIANGLES, GL_QUADS or GL_ISOLINES */ - GLenum Spacing; /* GL_EQUAL, GL_FRACTIONAL_EVEN, GL_FRACTIONAL_ODD */ - GLenum VertexOrder; /* GL_CW or GL_CCW */ - bool PointMode; -}; - - /** Geometry program object */ struct gl_geometry_program { @@ -2136,7 +2123,7 @@ struct gl_tess_ctrl_program_state struct gl_tess_eval_program_state { /** Currently bound and valid shader. */ - struct gl_tess_eval_program *_Current; + struct gl_program *_Current; }; /** @@ -2774,7 +2761,7 @@ struct gl_shader_program struct { /** * True if gl_ClipDistance is written to. Copied into - * gl_tess_eval_program by _mesa_copy_linked_program_data(). + * gl_program by _mesa_copy_linked_program_data(). */ GLuint ClipDistanceArraySize; /**< Size of the gl_ClipDistance array, or 0 if not present. */ diff --git a/src/mesa/main/state.c b/src/mesa/main/state.c index b5207613e32..10194a9f5ca 100644 --- a/src/mesa/main/state.c +++ b/src/mesa/main/state.c @@ -111,7 +111,7 @@ update_program(struct gl_context *ctx) const struct gl_fragment_program *prevFP = ctx->FragmentProgram._Current; const struct gl_geometry_program *prevGP = ctx->GeometryProgram._Current; const struct gl_program *prevTCP = ctx->TessCtrlProgram._Current; - const struct gl_tess_eval_program *prevTEP = ctx->TessEvalProgram._Current; + const struct gl_program *prevTEP = ctx->TessEvalProgram._Current; const struct gl_compute_program *prevCP = ctx->ComputeProgram._Current; GLbitfield new_state = 0x0; @@ -196,13 +196,12 @@ update_program(struct gl_context *ctx) if (tesProg && tesProg->LinkStatus && tesProg->_LinkedShaders[MESA_SHADER_TESS_EVAL]) { /* Use GLSL tessellation evaluation shader */ - _mesa_reference_tesseprog(ctx, &ctx->TessEvalProgram._Current, - gl_tess_eval_program( - tesProg->_LinkedShaders[MESA_SHADER_TESS_EVAL]->Program)); + _mesa_reference_program(ctx, &ctx->TessEvalProgram._Current, + tesProg->_LinkedShaders[MESA_SHADER_TESS_EVAL]->Program); } else { /* No tessellation evaluation program */ - _mesa_reference_tesseprog(ctx, &ctx->TessEvalProgram._Current, NULL); + _mesa_reference_program(ctx, &ctx->TessEvalProgram._Current, NULL); } if (tcsProg && tcsProg->LinkStatus @@ -275,7 +274,7 @@ update_program(struct gl_context *ctx) new_state |= _NEW_PROGRAM; if (ctx->Driver.BindProgram) { ctx->Driver.BindProgram(ctx, GL_TESS_EVALUATION_PROGRAM_NV, - (struct gl_program *) ctx->TessEvalProgram._Current); + ctx->TessEvalProgram._Current); } } |