intel: Fix GL_ARB_shading_language_120 commit
authorKristian Høgsberg <krh@bitplanet.net>
Wed, 22 Sep 2010 15:01:11 +0000 (11:01 -0400)
committerKristian Høgsberg <krh@bitplanet.net>
Wed, 22 Sep 2010 15:01:45 +0000 (11:01 -0400)
Fix commit e7087175f8a04f777403366fb34b58edd00f4d60.  Move the reference to
GL_VERSION_2_1_functions to intel_extensions.c where it's available,
don't try to enable a non-existing extension and advertise 1.20 for all
intel chipsets, not just GEN4 and up.

src/mesa/drivers/dri/i965/brw_context.c
src/mesa/drivers/dri/intel/intel_extensions.c

index 49be289..4b44e2a 100644 (file)
 #include "intel_span.h"
 #include "tnl/t_pipeline.h"
 
-
-static const struct dri_extension gl_21_extension[] = {
-  {"GL_VERSION_2_1", GL_VERSION_2_1_functions },
-};
-
-
-
 /***************************************
  * Mesa's Driver Functions
  ***************************************/
@@ -94,8 +87,6 @@ GLboolean brwCreateContext( int api,
 
    TNL_CONTEXT(ctx)->Driver.RunPipeline = _tnl_run_pipeline;
 
-   ctx->Const.GLSLVersion = 120;
-
    ctx->Const.MaxDrawBuffers = BRW_MAX_DRAW_BUFFERS;
    ctx->Const.MaxTextureImageUnits = BRW_MAX_TEX_UNIT;
    ctx->Const.MaxTextureCoordUnits = 8; /* Mesa limit */
@@ -160,8 +151,6 @@ GLboolean brwCreateContext( int api,
       MIN2(ctx->Const.FragmentProgram.MaxNativeParameters,
           ctx->Const.FragmentProgram.MaxEnvParams);
 
-   driInitExtensions(ctx, gl_21_extension, GL_TRUE);
-
    if (intel->is_g4x || intel->gen >= 5) {
       brw->CMD_VF_STATISTICS = CMD_VF_STATISTICS_GM45;
       brw->CMD_PIPELINE_SELECT = CMD_PIPELINE_SELECT_GM45;
index a066b5b..4b6229f 100644 (file)
@@ -212,6 +212,9 @@ intelInitExtensions(GLcontext *ctx)
     */
    driInitExtensions(ctx, card_extensions, GL_FALSE);
 
+   _mesa_map_function_array(GL_VERSION_2_1_functions);
+   ctx->Const.GLSLVersion = 120;
+
    if (intel->gen >= 5)
       driInitExtensions(ctx, ironlake_extensions, GL_FALSE);