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/drivers/dri/i915 | |
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/drivers/dri/i915')
-rw-r--r-- | src/mesa/drivers/dri/i915/i915_fragprog.c | 10 | ||||
-rw-r--r-- | src/mesa/drivers/dri/i915/intel_tris.c | 4 |
2 files changed, 7 insertions, 7 deletions
diff --git a/src/mesa/drivers/dri/i915/i915_fragprog.c b/src/mesa/drivers/dri/i915/i915_fragprog.c index 20424b1da43..a96b373a217 100644 --- a/src/mesa/drivers/dri/i915/i915_fragprog.c +++ b/src/mesa/drivers/dri/i915/i915_fragprog.c @@ -130,7 +130,7 @@ static GLuint src_vector( struct i915_fragment_program *p, case PROGRAM_STATE_VAR: case PROGRAM_NAMED_PARAM: src = i915_emit_param4fv( - p, program->Parameters->ParameterValues[source->Index] ); + p, program->Base.Parameters->ParameterValues[source->Index] ); break; default: @@ -250,7 +250,7 @@ do { \ static void upload_program( struct i915_fragment_program *p ) { const struct fragment_program *program = p->ctx->FragmentProgram._Current; - const struct prog_instruction *inst = program->Instructions; + const struct prog_instruction *inst = program->Base.Instructions; /* _mesa_debug_fp_inst(program->Base.NumInstructions, inst); */ @@ -789,7 +789,7 @@ static void fixup_depth_write( struct i915_fragment_program *p ) static void check_wpos( struct i915_fragment_program *p ) { - GLuint inputs = p->FragProg.InputsRead; + GLuint inputs = p->FragProg.Base.InputsRead; GLint i; p->wpos_tex = -1; @@ -828,7 +828,7 @@ static void track_params( struct i915_fragment_program *p ) GLint i; if (p->nr_params) - _mesa_load_state_parameters(p->ctx, p->FragProg.Parameters); + _mesa_load_state_parameters(p->ctx, p->FragProg.Base.Parameters); for (i = 0; i < p->nr_params; i++) { GLint reg = p->param[i].reg; @@ -955,7 +955,7 @@ void i915ValidateFragmentProgram( i915ContextPtr i915 ) struct i915_fragment_program *p = (struct i915_fragment_program *)ctx->FragmentProgram._Current; - GLuint inputsRead = p->FragProg.InputsRead; + const GLuint inputsRead = p->FragProg.Base.InputsRead; GLuint s4 = i915->state.Ctx[I915_CTXREG_LIS4] & ~S4_VFMT_MASK; GLuint s2 = S2_TEXCOORD_NONE; int i, offset = 0; diff --git a/src/mesa/drivers/dri/i915/intel_tris.c b/src/mesa/drivers/dri/i915/intel_tris.c index bb0a7713e60..cef6db7a195 100644 --- a/src/mesa/drivers/dri/i915/intel_tris.c +++ b/src/mesa/drivers/dri/i915/intel_tris.c @@ -642,8 +642,8 @@ void intelChooseRenderState(GLcontext *ctx) TNLcontext *tnl = TNL_CONTEXT(ctx); intelContextPtr intel = INTEL_CONTEXT(ctx); GLuint flags = ctx->_TriangleCaps; - struct fragment_program *program = ctx->FragmentProgram._Current; - GLboolean have_wpos = (program && (program->InputsRead & FRAG_BIT_WPOS)); + struct fragment_program *fprog = ctx->FragmentProgram._Current; + GLboolean have_wpos = (fprog && (fprog->Base.InputsRead & FRAG_BIT_WPOS)); GLuint index = 0; if (INTEL_DEBUG & DEBUG_STATE) |