fix up radeon span functions using latest r200 code from Brian,
[mesa.git] / src / mesa / drivers / dri / i915 / i915_context.c
index fc4dade21e44848304c704b5d9cda36b6b9f7c25..6e6af35c7602aef19ce9e3ac6b9eb750e52103e8 100644 (file)
  * Mesa's Driver Functions
  ***************************************/
 
-static const char * const card_extensions[] =
+static const struct dri_extension i915_extensions[] =
 {
-   "GL_ARB_depth_texture",           /* New: alanh 06-Jan-2005 */
-   "GL_ARB_fragment_program",
-   "GL_ARB_shadow",                  /* New: alanh 06-Jan-2005 */
-   "GL_EXT_shadow_funcs",            /* New: alanh 06-Jan-2005 */
-   "GL_SGIX_depth_texture",    /* ARB extn won't work if not enabled */
-   NULL
+    { "GL_ARB_depth_texture",              NULL },
+    { "GL_ARB_fragment_program",           NULL },
+    { "GL_ARB_shadow",                     NULL },
+    { "GL_EXT_shadow_funcs",               NULL },
+    /* ARB extn won't work if not enabled */
+    { "GL_SGIX_depth_texture",             NULL },
+    { NULL,                                NULL }
 };
 
 /* Override intel default.
@@ -72,11 +73,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);
 }
 
 
@@ -119,7 +122,7 @@ GLboolean i915CreateContext( const __GLcontextModes *mesaVis,
    intel->nr_heaps = 1;
    intel->texture_heaps[0] = 
       driCreateTextureHeap( 0, intel,
-                           intel->intelScreen->textureSize,
+                           intel->intelScreen->tex.size,
                            12,
                            I830_NR_TEX_REGIONS,
                            intel->sarea->texList,
@@ -163,7 +166,7 @@ GLboolean i915CreateContext( const __GLcontextModes *mesaVis,
    ctx->Const.MaxFragmentProgramAddressRegs = 0; /* I don't think we have one */
 
 
-   driInitExtensions( ctx, card_extensions, GL_FALSE );
+   driInitExtensions( ctx, i915_extensions, GL_FALSE );
 
 
    _tnl_init_vertices( ctx, ctx->Const.MaxArrayLockSize + 12,