i965: Correct build_lighting in i965 driver according to
[mesa.git] / src / mesa / drivers / dri / i965 / intel_context.c
index 10eb9a2e28da04a6fd6b85898f54df7efe3f596e..1fbf571184e092643820685165f6dda65c8c872b 100644 (file)
@@ -66,6 +66,7 @@
 int INTEL_DEBUG = (0);
 #endif
 
+#define need_GL_NV_point_sprite
 #define need_GL_ARB_multisample
 #define need_GL_ARB_point_parameters
 #define need_GL_ARB_texture_compression
@@ -81,6 +82,7 @@ int INTEL_DEBUG = (0);
 #define need_GL_EXT_fog_coord
 #define need_GL_EXT_multi_draw_arrays
 #define need_GL_EXT_secondary_color
+#define need_GL_EXT_point_parameters
 #include "extension_helper.h"
 
 #ifndef VERBOSE
@@ -106,20 +108,23 @@ static const GLubyte *intelGetString( GLcontext *ctx, GLenum name )
    case GL_RENDERER:
       switch (intel_context(ctx)->intelScreen->deviceID) {
       case PCI_CHIP_I965_Q:
-        chipset = "Intel(R) 965Q"; break;
+        chipset = "Intel(R) 965Q";
          break;
       case PCI_CHIP_I965_G:
       case PCI_CHIP_I965_G_1:
-        chipset = "Intel(R) 965G"; break;
+        chipset = "Intel(R) 965G";
          break;
       case PCI_CHIP_I946_GZ:
-        chipset = "Intel(R) 946GZ"; break;
+        chipset = "Intel(R) 946GZ";
          break;
       case PCI_CHIP_I965_GM:
-        chipset = "Intel(R) 965GM"; break;
+        chipset = "Intel(R) 965GM";
+         break;
+      case PCI_CHIP_I965_GME:
+        chipset = "Intel(R) 965GME/GLE";
          break;
       default:
-        chipset = "Unknown Intel Chipset"; break;
+        chipset = "Unknown Intel Chipset";
       }
 
       (void) driGetRendererString( buffer, chipset, DRIVER_VERSION, 0 );
@@ -143,6 +148,7 @@ const struct dri_extension card_extensions[] =
     { "GL_ARB_multisample",                GL_ARB_multisample_functions },
     { "GL_ARB_multitexture",               NULL },
     { "GL_ARB_point_parameters",           GL_ARB_point_parameters_functions },
+    { "GL_NV_point_sprite",                GL_NV_point_sprite_functions },
     { "GL_ARB_texture_border_clamp",       NULL },
     { "GL_ARB_texture_compression",        GL_ARB_texture_compression_functions },
     { "GL_ARB_texture_cube_map",           NULL },
@@ -155,6 +161,8 @@ const struct dri_extension card_extensions[] =
     { "GL_NV_texture_rectangle",           NULL },
     { "GL_EXT_texture_rectangle",          NULL },
     { "GL_ARB_texture_rectangle",          NULL },
+    { "GL_ARB_point_sprite",               NULL},
+    { "GL_ARB_point_parameters",          NULL }, 
     { "GL_ARB_vertex_buffer_object",       GL_ARB_vertex_buffer_object_functions },
     { "GL_ARB_vertex_program",             GL_ARB_vertex_program_functions },
     { "GL_ARB_window_pos",                 GL_ARB_window_pos_functions },
@@ -174,6 +182,7 @@ const struct dri_extension card_extensions[] =
     { "GL_EXT_texture_env_dot3",           NULL },
     { "GL_EXT_texture_filter_anisotropic", NULL },
     { "GL_EXT_texture_lod_bias",           NULL },
+    { "GL_EXT_texture_sRGB",               NULL },
     { "GL_3DFX_texture_compression_FXT1",  NULL },
     { "GL_APPLE_client_storage",           NULL },
     { "GL_MESA_pack_invert",               NULL },
@@ -567,6 +576,10 @@ GLboolean intelMakeCurrent(__DRIcontextPrivate *driContextPriv,
    if (driContextPriv) {
       struct intel_context *intel = (struct intel_context *) driContextPriv->driverPrivate;
 
+      if (intel->driReadDrawable != driReadPriv) {
+          intel->driReadDrawable = driReadPriv;
+      }
+
       if ( intel->driDrawable != driDrawPriv ) {
         /* Shouldn't the readbuffer be stored also? */
         driDrawableInitVBlank( driDrawPriv, intel->vblank_flags,