Missing from previous commit
This commit is contained in:
@@ -1383,7 +1383,7 @@ run_arb_vertex_program(GLcontext *ctx, struct tnl_pipeline_stage *stage)
|
|||||||
{
|
{
|
||||||
struct vertex_program *program = (ctx->VertexProgram._Enabled ?
|
struct vertex_program *program = (ctx->VertexProgram._Enabled ?
|
||||||
ctx->VertexProgram.Current :
|
ctx->VertexProgram.Current :
|
||||||
&ctx->_TnlProgram);
|
ctx->_TnlProgram);
|
||||||
struct vertex_buffer *VB = &TNL_CONTEXT(ctx)->vb;
|
struct vertex_buffer *VB = &TNL_CONTEXT(ctx)->vb;
|
||||||
struct arb_vp_machine *m = ARB_VP_MACHINE(stage);
|
struct arb_vp_machine *m = ARB_VP_MACHINE(stage);
|
||||||
GLuint i, j, outputs = program->OutputsWritten;
|
GLuint i, j, outputs = program->OutputsWritten;
|
||||||
@@ -1479,7 +1479,7 @@ validate_vertex_program( GLcontext *ctx, struct tnl_pipeline_stage *stage )
|
|||||||
|
|
||||||
#if TNL_FIXED_FUNCTION_PROGRAM
|
#if TNL_FIXED_FUNCTION_PROGRAM
|
||||||
if (!program) {
|
if (!program) {
|
||||||
program = &ctx->_TnlProgram;
|
program = ctx->_TnlProgram;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@@ -1098,9 +1098,13 @@ void _tnl_UpdateFixedFunctionProgram( GLcontext *ctx )
|
|||||||
if (ctx->VertexProgram._Enabled)
|
if (ctx->VertexProgram._Enabled)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
if (!ctx->_TnlProgram)
|
||||||
|
ctx->_TnlProgram = (struct vertex_program *)
|
||||||
|
ctx->Driver.NewProgram(ctx, GL_VERTEX_PROGRAM_ARB, 0);
|
||||||
|
|
||||||
memset(&p, 0, sizeof(p));
|
memset(&p, 0, sizeof(p));
|
||||||
p.ctx = ctx;
|
p.ctx = ctx;
|
||||||
p.program = &ctx->_TnlProgram;
|
p.program = ctx->_TnlProgram;
|
||||||
|
|
||||||
p.eye_position = undef;
|
p.eye_position = undef;
|
||||||
p.eye_position_normalized = undef;
|
p.eye_position_normalized = undef;
|
||||||
@@ -1122,7 +1126,7 @@ void _tnl_UpdateFixedFunctionProgram( GLcontext *ctx )
|
|||||||
p.program->Base.NumAttributes = p.program->Base.NumAddressRegs = 0;
|
p.program->Base.NumAttributes = p.program->Base.NumAddressRegs = 0;
|
||||||
if (p.program->Parameters)
|
if (p.program->Parameters)
|
||||||
_mesa_free_parameter_list(p.program->Parameters);
|
_mesa_free_parameter_list(p.program->Parameters);
|
||||||
p.program->Parameters = _mesa_new_parameter_list ();
|
p.program->Parameters = _mesa_new_parameter_list();
|
||||||
p.program->InputsRead = 0;
|
p.program->InputsRead = 0;
|
||||||
p.program->OutputsWritten = 0;
|
p.program->OutputsWritten = 0;
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user