diff options
author | Brian Paul <[email protected]> | 2005-11-12 17:53:14 +0000 |
---|---|---|
committer | Brian Paul <[email protected]> | 2005-11-12 17:53:14 +0000 |
commit | de99760bf3511d05185799c4fb4347f9e5f420f4 (patch) | |
tree | a0bda8570a2943b4c7dabc51b7a61e5c5344eded /src/mesa/shader/nvvertexec.c | |
parent | 77ee31930a1b0cc7766939415f4f04ed6a1fa4ac (diff) |
Move stuff common to vertex/fragment_program into the base class, including:
Instructions, InputsRead, OutputsWritten, and Parameters.
Also, added debug functions: _mesa_print_instruction(),
_mesa_print_program_parameters() and revamp _mesa_print_program().
Diffstat (limited to 'src/mesa/shader/nvvertexec.c')
-rw-r--r-- | src/mesa/shader/nvvertexec.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/src/mesa/shader/nvvertexec.c b/src/mesa/shader/nvvertexec.c index 5bb40d881e0..a413dcbc291 100644 --- a/src/mesa/shader/nvvertexec.c +++ b/src/mesa/shader/nvvertexec.c @@ -162,10 +162,10 @@ _mesa_init_vp_per_primitive_registers(GLcontext *ctx) } else { /* Using and ARB vertex program */ - if (ctx->VertexProgram.Current->Parameters) { + if (ctx->VertexProgram.Current->Base.Parameters) { /* Grab the state GL state and put into registers */ _mesa_load_state_parameters(ctx, - ctx->VertexProgram.Current->Parameters); + ctx->VertexProgram.Current->Base.Parameters); } } } @@ -239,7 +239,7 @@ get_register_pointer( const struct prog_src_register *source, else if (source->File == PROGRAM_ENV_PARAM) return state->Parameters[reg]; else - return state->Current->Parameters->ParameterValues[reg]; + return state->Current->Base.Parameters->ParameterValues[reg]; } else { switch (source->File) { @@ -261,7 +261,7 @@ get_register_pointer( const struct prog_src_register *source, return state->Parameters[source->Index]; case PROGRAM_STATE_VAR: ASSERT(source->Index < state->Current->Parameters->NumParameters); - return state->Current->Parameters->ParameterValues[source->Index]; + return state->Current->Base.Parameters->ParameterValues[source->Index]; default: _mesa_problem(NULL, "Bad source register file in get_register_pointer"); @@ -395,9 +395,10 @@ _mesa_exec_vertex_program(GLcontext *ctx, const struct vertex_program *program) ctx->VertexProgram.Inputs[VERT_ATTRIB_POS]); /* XXX: This could go elsewhere */ - ctx->VertexProgram.Current->OutputsWritten |= VERT_BIT_POS; + ctx->VertexProgram.Current->Base.OutputsWritten |= VERT_BIT_POS; } - for (inst = program->Instructions; ; inst++) { + + for (inst = program->Base.Instructions; ; inst++) { if (ctx->VertexProgram.CallbackEnabled && ctx->VertexProgram.Callback) { |