diff options
author | Brian Paul <brianp@vmware.com> | 2010-09-21 18:13:02 -0600 |
---|---|---|
committer | Brian Paul <brianp@vmware.com> | 2010-09-21 18:13:04 -0600 |
commit | e7087175f8a04f777403366fb34b58edd00f4d60 (patch) | |
tree | a6720bb374844ccd8c7eb790f33e0ebda6cdc324 /src/mesa/drivers/dri/i965/brw_context.c | |
parent | 3642ca2f66efa8e078062f566b8f9975928d9f44 (diff) |
mesa: don't advertise bogus GL_ARB_shading_language_120 extension
Instead of using the invalid GL_ARB_shading_language_120 extension to
determine the GLSL version, use a new ctx->Const.GLSLVersion field.
Updated the intel and r600 drivers, but untested.
See fd.o bug 29910
NOTE: This is a candidate for the 7.9 branch (but let's wait and see if
there's any regressions).
Diffstat (limited to 'src/mesa/drivers/dri/i965/brw_context.c')
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_context.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_context.c b/src/mesa/drivers/dri/i965/brw_context.c index d08538ec20..49be289750 100644 --- a/src/mesa/drivers/dri/i965/brw_context.c +++ b/src/mesa/drivers/dri/i965/brw_context.c @@ -42,6 +42,12 @@ #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 ***************************************/ @@ -88,6 +94,8 @@ 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 */ @@ -152,6 +160,8 @@ 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; |