summaryrefslogtreecommitdiff
path: root/src/mesa/drivers/dri
diff options
context:
space:
mode:
authorKeith Whitwell <keith@tungstengraphics.com>2006-10-10 08:58:43 +0000
committerKeith Whitwell <keith@tungstengraphics.com>2006-10-10 08:58:43 +0000
commitd886423b3c0b800656ba5d4c6480bba90f8e5981 (patch)
treea562460131fcd0577b7fa7ef03a74fefe2839992 /src/mesa/drivers/dri
parentfcd758868b494411247ef94e0ea7cbac3e3ed79f (diff)
Use the mesa-provided texenv program rather than rolling our own.
Turn on texture crossbar support.
Diffstat (limited to 'src/mesa/drivers/dri')
-rw-r--r--src/mesa/drivers/dri/i915/i915_context.c2
-rw-r--r--src/mesa/drivers/dri/i915/i915_fragprog.c11
-rw-r--r--src/mesa/drivers/dri/i915/i915_texprog.c5
-rw-r--r--src/mesa/drivers/dri/i915/i915_vtbl.c4
4 files changed, 21 insertions, 1 deletions
diff --git a/src/mesa/drivers/dri/i915/i915_context.c b/src/mesa/drivers/dri/i915/i915_context.c
index 8c99d0e1d6..5e4703d2b0 100644
--- a/src/mesa/drivers/dri/i915/i915_context.c
+++ b/src/mesa/drivers/dri/i915/i915_context.c
@@ -50,6 +50,7 @@ static const struct dri_extension i915_extensions[] =
{ "GL_ARB_depth_texture", NULL },
{ "GL_ARB_fragment_program", NULL },
{ "GL_ARB_shadow", NULL },
+ { "GL_ARB_texture_env_crossbar", NULL },
{ "GL_EXT_shadow_funcs", NULL },
/* ARB extn won't work if not enabled */
{ "GL_SGIX_depth_texture", NULL },
@@ -165,6 +166,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 = 1;
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 b0cc59c306..0f3e6885f3 100644
--- a/src/mesa/drivers/dri/i915/i915_fragprog.c
+++ b/src/mesa/drivers/dri/i915/i915_fragprog.c
@@ -955,6 +955,17 @@ void i915ValidateFragmentProgram( i915ContextPtr i915 )
GLuint s2 = S2_TEXCOORD_NONE;
int i, offset = 0;
+ if (i915->current_program != p)
+ {
+ if (i915->current_program) {
+ i915->current_program->on_hardware = 0;
+ i915->current_program->params_uptodate = 0;
+ }
+
+ i915->current_program = p;
+ }
+
+
/* Important:
*/
VB->AttribPtr[VERT_ATTRIB_POS] = VB->NdcPtr;
diff --git a/src/mesa/drivers/dri/i915/i915_texprog.c b/src/mesa/drivers/dri/i915/i915_texprog.c
index 4fbce34ba2..f6a8b0205a 100644
--- a/src/mesa/drivers/dri/i915/i915_texprog.c
+++ b/src/mesa/drivers/dri/i915/i915_texprog.c
@@ -591,6 +591,11 @@ void i915ValidateTextureProgram( i915ContextPtr i915 )
intel->specoffset = 0;
offset = 0;
+ if (i915->current_program) {
+ i915->current_program->on_hardware = 0;
+ i915->current_program->params_uptodate = 0;
+ }
+
if (i915->vertex_fog == I915_FOG_PIXEL) {
EMIT_ATTR( _TNL_ATTRIB_POS, EMIT_4F_VIEWPORT, S4_VFMT_XYZW, 16 );
RENDERINPUTS_CLEAR( index_bitset, _TNL_ATTRIB_FOG );
diff --git a/src/mesa/drivers/dri/i915/i915_vtbl.c b/src/mesa/drivers/dri/i915/i915_vtbl.c
index 9ec54de23c..2936a0fb72 100644
--- a/src/mesa/drivers/dri/i915/i915_vtbl.c
+++ b/src/mesa/drivers/dri/i915/i915_vtbl.c
@@ -48,8 +48,10 @@ static void i915_render_start( intelContextPtr intel )
if (ctx->FragmentProgram._Active)
i915ValidateFragmentProgram( i915 );
- else
+ else {
+ assert(!ctx->_MaintainTexEnvProgram);
i915ValidateTextureProgram( i915 );
+ }
}