diff options
author | Keith Whitwell <[email protected]> | 2005-05-09 17:59:13 +0000 |
---|---|---|
committer | Keith Whitwell <[email protected]> | 2005-05-09 17:59:13 +0000 |
commit | 435eff8b852f59e13554a57f83a48bf8035ec794 (patch) | |
tree | a77da8461d2c9e0d197c057d4027da946cc0f7ad /src/mesa/drivers | |
parent | 276330b2412910777f7016f427909085f02acbb8 (diff) |
i915 will use _TexEnvProgram (if active)
Diffstat (limited to 'src/mesa/drivers')
-rw-r--r-- | src/mesa/drivers/dri/i915/i915_context.c | 6 | ||||
-rw-r--r-- | src/mesa/drivers/dri/i915/i915_context.h | 1 | ||||
-rw-r--r-- | src/mesa/drivers/dri/i915/i915_fragprog.c | 4 | ||||
-rw-r--r-- | src/mesa/drivers/dri/i915/i915_state.c | 10 | ||||
-rw-r--r-- | src/mesa/drivers/dri/i915/i915_vtbl.c | 2 | ||||
-rw-r--r-- | src/mesa/drivers/dri/i915/intel_tris.c | 2 |
6 files changed, 12 insertions, 13 deletions
diff --git a/src/mesa/drivers/dri/i915/i915_context.c b/src/mesa/drivers/dri/i915/i915_context.c index fc4dade21e4..eb33b1f1c38 100644 --- a/src/mesa/drivers/dri/i915/i915_context.c +++ b/src/mesa/drivers/dri/i915/i915_context.c @@ -72,11 +72,13 @@ static void i915InvalidateState( GLcontext *ctx, GLuint new_state ) */ { struct i915_fragment_program *p = - (struct i915_fragment_program *)ctx->FragmentProgram.Current; - if (p->nr_params) + (struct i915_fragment_program *)ctx->FragmentProgram._Current; + if (p && p->nr_params) p->params_uptodate = 0; } + if (new_state & (_NEW_FOG|_NEW_HINT|_NEW_PROGRAM)) + i915_update_fog(ctx); } diff --git a/src/mesa/drivers/dri/i915/i915_context.h b/src/mesa/drivers/dri/i915/i915_context.h index 94262d0d9e8..80462776431 100644 --- a/src/mesa/drivers/dri/i915/i915_context.h +++ b/src/mesa/drivers/dri/i915/i915_context.h @@ -309,6 +309,7 @@ extern void i915_print_ureg( const char *msg, GLuint ureg ); */ extern void i915InitStateFunctions( struct dd_function_table *functions ); extern void i915InitState( i915ContextPtr i915 ); +extern void i915_update_fog( GLcontext *ctx ); /*====================================================================== diff --git a/src/mesa/drivers/dri/i915/i915_fragprog.c b/src/mesa/drivers/dri/i915/i915_fragprog.c index 962ff45e89a..43f03ccb854 100644 --- a/src/mesa/drivers/dri/i915/i915_fragprog.c +++ b/src/mesa/drivers/dri/i915/i915_fragprog.c @@ -245,7 +245,7 @@ do { \ */ static void upload_program( struct i915_fragment_program *p ) { - const struct fragment_program *program = p->ctx->FragmentProgram.Current; + const struct fragment_program *program = p->ctx->FragmentProgram._Current; const struct fp_instruction *inst = program->Instructions; /* _mesa_debug_fp_inst(program->Base.NumInstructions, inst); */ @@ -949,7 +949,7 @@ void i915ValidateFragmentProgram( i915ContextPtr i915 ) struct vertex_buffer *VB = &tnl->vb; struct i915_fragment_program *p = - (struct i915_fragment_program *)ctx->FragmentProgram.Current; + (struct i915_fragment_program *)ctx->FragmentProgram._Current; GLuint inputsRead = p->FragProg.InputsRead; GLuint s4 = i915->state.Ctx[I915_CTXREG_LIS4] & ~S4_VFMT_MASK; diff --git a/src/mesa/drivers/dri/i915/i915_state.c b/src/mesa/drivers/dri/i915/i915_state.c index da8e1ed81e2..00b8a12627e 100644 --- a/src/mesa/drivers/dri/i915/i915_state.c +++ b/src/mesa/drivers/dri/i915/i915_state.c @@ -521,17 +521,17 @@ static void i915ShadeModel(GLcontext *ctx, GLenum mode) /* ============================================================= * Fog */ -static void update_fog( GLcontext *ctx ) +void i915_update_fog( GLcontext *ctx ) { i915ContextPtr i915 = I915_CONTEXT(ctx); GLenum mode; GLboolean enabled; GLboolean try_pixel_fog; - if (ctx->FragmentProgram.Enabled && ctx->FragmentProgram.Current) { + if (ctx->FragmentProgram._Active) { /* Pull in static fog state from program */ - mode = ctx->FragmentProgram.Current->FogOption; + mode = ctx->FragmentProgram._Current->FogOption; enabled = (mode != GL_NONE); try_pixel_fog = 1; } @@ -623,7 +623,6 @@ static void i915Fogfv(GLcontext *ctx, GLenum pname, const GLfloat *param) case GL_FOG_MODE: case GL_FOG_START: case GL_FOG_END: - update_fog( ctx ); break; case GL_FOG_DENSITY: @@ -658,7 +657,6 @@ static void i915Hint(GLcontext *ctx, GLenum target, GLenum state) { switch (target) { case GL_FOG_HINT: - update_fog( ctx ); break; default: break; @@ -703,7 +701,6 @@ static void i915Enable(GLcontext *ctx, GLenum cap, GLboolean state) break; case GL_FRAGMENT_PROGRAM_ARB: - update_fog( ctx ); break; case GL_DITHER: @@ -743,7 +740,6 @@ static void i915Enable(GLcontext *ctx, GLenum cap, GLboolean state) break; case GL_FOG: - update_fog( ctx ); break; case GL_CULL_FACE: diff --git a/src/mesa/drivers/dri/i915/i915_vtbl.c b/src/mesa/drivers/dri/i915/i915_vtbl.c index 203e1a45909..dc3342d0d54 100644 --- a/src/mesa/drivers/dri/i915/i915_vtbl.c +++ b/src/mesa/drivers/dri/i915/i915_vtbl.c @@ -46,7 +46,7 @@ static void i915_render_start( intelContextPtr intel ) GLcontext *ctx = &intel->ctx; i915ContextPtr i915 = I915_CONTEXT(intel); - if (ctx->FragmentProgram.Enabled && ctx->FragmentProgram.Current) + if (ctx->FragmentProgram._Active) i915ValidateFragmentProgram( i915 ); else i915ValidateTextureProgram( i915 ); diff --git a/src/mesa/drivers/dri/i915/intel_tris.c b/src/mesa/drivers/dri/i915/intel_tris.c index a9c814a48c6..efdc3153d6c 100644 --- a/src/mesa/drivers/dri/i915/intel_tris.c +++ b/src/mesa/drivers/dri/i915/intel_tris.c @@ -642,7 +642,7 @@ 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; + struct fragment_program *program = ctx->FragmentProgram._Current; GLboolean have_wpos = (program && (program->InputsRead & FRAG_BIT_WPOS)); GLuint index = 0; |