summaryrefslogtreecommitdiffstats
path: root/src/mesa/main/state.c
diff options
context:
space:
mode:
authorTimothy Arceri <[email protected]>2016-10-19 12:30:09 +1100
committerTimothy Arceri <[email protected]>2016-10-26 14:29:36 +1100
commit81faead818a0b2fde131df019f5dfb0baef49273 (patch)
tree66610c70a8ed5a963ce927729e8a56115142783d /src/mesa/main/state.c
parent0ab51f8e164b33c5e3bc6836d0574080ef9d1dd8 (diff)
mesa/i965/i915/r200: eliminate gl_vertex_program
Here we move the only field in gl_vertex_program to the ARB program fields in gl_program. Reviewed-by: Jason Ekstrand <[email protected]>
Diffstat (limited to 'src/mesa/main/state.c')
-rw-r--r--src/mesa/main/state.c26
1 files changed, 13 insertions, 13 deletions
diff --git a/src/mesa/main/state.c b/src/mesa/main/state.c
index 407ff385482..b09b3fefec8 100644
--- a/src/mesa/main/state.c
+++ b/src/mesa/main/state.c
@@ -70,7 +70,7 @@ update_program_enables(struct gl_context *ctx)
* GLSL shaders not relevant here.
*/
ctx->VertexProgram._Enabled = ctx->VertexProgram.Enabled
- && ctx->VertexProgram.Current->Base.Instructions;
+ && ctx->VertexProgram.Current->Instructions;
ctx->FragmentProgram._Enabled = ctx->FragmentProgram.Enabled
&& ctx->FragmentProgram.Current->Base.Instructions;
ctx->ATIFragmentShader._Enabled = ctx->ATIFragmentShader.Enabled
@@ -107,7 +107,7 @@ update_program(struct gl_context *ctx)
ctx->_Shader->CurrentProgram[MESA_SHADER_FRAGMENT];
const struct gl_shader_program *csProg =
ctx->_Shader->CurrentProgram[MESA_SHADER_COMPUTE];
- const struct gl_vertex_program *prevVP = ctx->VertexProgram._Current;
+ const struct gl_program *prevVP = ctx->VertexProgram._Current;
const struct gl_fragment_program *prevFP = ctx->FragmentProgram._Current;
const struct gl_program *prevGP = ctx->GeometryProgram._Current;
const struct gl_program *prevTCP = ctx->TessCtrlProgram._Current;
@@ -222,24 +222,24 @@ update_program(struct gl_context *ctx)
if (vsProg && vsProg->LinkStatus
&& vsProg->_LinkedShaders[MESA_SHADER_VERTEX]) {
/* Use GLSL vertex shader */
- _mesa_reference_vertprog(ctx, &ctx->VertexProgram._Current,
- gl_vertex_program(vsProg->_LinkedShaders[MESA_SHADER_VERTEX]->Program));
+ _mesa_reference_program(ctx, &ctx->VertexProgram._Current,
+ vsProg->_LinkedShaders[MESA_SHADER_VERTEX]->Program);
}
else if (ctx->VertexProgram._Enabled) {
/* Use user-defined vertex program */
- _mesa_reference_vertprog(ctx, &ctx->VertexProgram._Current,
- ctx->VertexProgram.Current);
+ _mesa_reference_program(ctx, &ctx->VertexProgram._Current,
+ ctx->VertexProgram.Current);
}
else if (ctx->VertexProgram._MaintainTnlProgram) {
/* Use vertex program generated from fixed-function state */
- _mesa_reference_vertprog(ctx, &ctx->VertexProgram._Current,
- _mesa_get_fixed_func_vertex_program(ctx));
- _mesa_reference_vertprog(ctx, &ctx->VertexProgram._TnlProgram,
- ctx->VertexProgram._Current);
+ _mesa_reference_program(ctx, &ctx->VertexProgram._Current,
+ _mesa_get_fixed_func_vertex_program(ctx));
+ _mesa_reference_program(ctx, &ctx->VertexProgram._TnlProgram,
+ ctx->VertexProgram._Current);
}
else {
/* no vertex program */
- _mesa_reference_vertprog(ctx, &ctx->VertexProgram._Current, NULL);
+ _mesa_reference_program(ctx, &ctx->VertexProgram._Current, NULL);
}
if (csProg && csProg->LinkStatus
@@ -290,7 +290,7 @@ update_program(struct gl_context *ctx)
new_state |= _NEW_PROGRAM;
if (ctx->Driver.BindProgram) {
ctx->Driver.BindProgram(ctx, GL_VERTEX_PROGRAM_ARB,
- (struct gl_program *) ctx->VertexProgram._Current);
+ ctx->VertexProgram._Current);
}
}
@@ -328,7 +328,7 @@ update_program_constants(struct gl_context *ctx)
if (ctx->VertexProgram._Current) {
const struct gl_program_parameter_list *params =
- ctx->VertexProgram._Current->Base.Parameters;
+ ctx->VertexProgram._Current->Parameters;
if (params && params->StateFlags & ctx->NewState) {
new_state |= _NEW_PROGRAM_CONSTANTS;
}