From 064ae479a770bf434958d673baf6f7530f642697 Mon Sep 17 00:00:00 2001 From: Brian Date: Fri, 23 Feb 2007 13:40:13 -0700 Subject: Update DRI drivers for new glsl compiler. Mostly: - update #includes - update STATE_* token code --- src/mesa/drivers/dri/i915/i915_context.c | 2 +- src/mesa/drivers/dri/i915/i915_fragprog.c | 6 ++---- src/mesa/drivers/dri/i915/i915_program.c | 12 ++++++------ src/mesa/drivers/dri/i915/i915_state.c | 2 +- src/mesa/drivers/dri/i915/i915_vtbl.c | 2 +- 5 files changed, 11 insertions(+), 13 deletions(-) (limited to 'src/mesa/drivers/dri/i915') diff --git a/src/mesa/drivers/dri/i915/i915_context.c b/src/mesa/drivers/dri/i915/i915_context.c index e58c9498ce0..4ab9d2686cb 100644 --- a/src/mesa/drivers/dri/i915/i915_context.c +++ b/src/mesa/drivers/dri/i915/i915_context.c @@ -167,7 +167,7 @@ GLboolean i915CreateContext( const __GLcontextModes *mesaVis, I915_MAX_TEX_INSN); ctx->Const.FragmentProgram.MaxNativeTexIndirections = I915_MAX_TEX_INDIRECT; ctx->Const.FragmentProgram.MaxNativeAddressRegs = 0; /* I don't think we have one */ - ctx->_MaintainTexEnvProgram = GL_TRUE; + ctx->FragmentProgram._MaintainTexEnvProgram = GL_TRUE; driInitExtensions( ctx, i915_extensions, GL_FALSE ); diff --git a/src/mesa/drivers/dri/i915/i915_fragprog.c b/src/mesa/drivers/dri/i915/i915_fragprog.c index ef14f3eef7c..a28c8bb6fc2 100644 --- a/src/mesa/drivers/dri/i915/i915_fragprog.c +++ b/src/mesa/drivers/dri/i915/i915_fragprog.c @@ -37,7 +37,8 @@ #include "i915_context.h" #include "i915_program.h" -#include "program_instruction.h" +#include "prog_instruction.h" +#include "prog_parameter.h" #include "program.h" #include "programopt.h" @@ -782,9 +783,6 @@ static void fixup_depth_write( struct i915_fragment_program *p ) } -#define FRAG_BIT_TEX(n) (FRAG_BIT_TEX0 << (n)) - - static void check_wpos( struct i915_fragment_program *p ) { GLuint inputs = p->FragProg.Base.InputsRead; diff --git a/src/mesa/drivers/dri/i915/i915_program.c b/src/mesa/drivers/dri/i915/i915_program.c index 9c13290d118..68491124449 100644 --- a/src/mesa/drivers/dri/i915/i915_program.c +++ b/src/mesa/drivers/dri/i915/i915_program.c @@ -430,17 +430,17 @@ void i915_fini_program( struct i915_fragment_program *p ) if (p->error) { p->FragProg.Base.NumNativeInstructions = 0; - p->FragProg.NumNativeAluInstructions = 0; - p->FragProg.NumNativeTexInstructions = 0; - p->FragProg.NumNativeTexIndirections = 0; + p->FragProg.Base.NumNativeAluInstructions = 0; + p->FragProg.Base.NumNativeTexInstructions = 0; + p->FragProg.Base.NumNativeTexIndirections = 0; } else { p->FragProg.Base.NumNativeInstructions = (p->nr_alu_insn + p->nr_tex_insn + p->nr_decl_insn); - p->FragProg.NumNativeAluInstructions = p->nr_alu_insn; - p->FragProg.NumNativeTexInstructions = p->nr_tex_insn; - p->FragProg.NumNativeTexIndirections = p->nr_tex_indirect; + p->FragProg.Base.NumNativeAluInstructions = p->nr_alu_insn; + p->FragProg.Base.NumNativeTexInstructions = p->nr_tex_insn; + p->FragProg.Base.NumNativeTexIndirections = p->nr_tex_indirect; } p->declarations[0] |= program_size + decl_size - 2; diff --git a/src/mesa/drivers/dri/i915/i915_state.c b/src/mesa/drivers/dri/i915/i915_state.c index fd11e10652e..56922893366 100644 --- a/src/mesa/drivers/dri/i915/i915_state.c +++ b/src/mesa/drivers/dri/i915/i915_state.c @@ -531,7 +531,7 @@ void i915_update_fog( GLcontext *ctx ) GLboolean enabled; GLboolean try_pixel_fog; - if (ctx->FragmentProgram._Active) { + if (ctx->FragmentProgram._Enabled) { /* Pull in static fog state from program */ mode = ctx->FragmentProgram._Current->FogOption; diff --git a/src/mesa/drivers/dri/i915/i915_vtbl.c b/src/mesa/drivers/dri/i915/i915_vtbl.c index 7924754c82c..82a421b961c 100644 --- a/src/mesa/drivers/dri/i915/i915_vtbl.c +++ b/src/mesa/drivers/dri/i915/i915_vtbl.c @@ -49,7 +49,7 @@ static void i915_render_start( intelContextPtr intel ) if (ctx->FragmentProgram._Current) i915ValidateFragmentProgram( i915 ); else { - assert(!ctx->_MaintainTexEnvProgram); + assert(!ctx->FragmentProgram._MaintainTexEnvProgram); i915ValidateTextureProgram( i915 ); } } -- cgit v1.2.3