mesa: add ARB_clear_texture.xml to file list, remove duplicate decls
[mesa.git] / src / mesa / main / version.c
index 4f83a6f887d687bb8775f6d5508ce6b97ffbf1b4..b7cc50fc146f15b5f33b053a8d090debee2ccf0a 100644 (file)
@@ -205,15 +205,11 @@ compute_version(struct gl_context *ctx)
                               ctx->Extensions.EXT_blend_color &&
                               ctx->Extensions.EXT_blend_func_separate &&
                               ctx->Extensions.EXT_blend_minmax &&
-                              ctx->Extensions.EXT_fog_coord &&
-                              ctx->Extensions.EXT_point_parameters &&
-                              ctx->Extensions.EXT_secondary_color);
+                              ctx->Extensions.EXT_point_parameters);
    const GLboolean ver_1_5 = (ver_1_4 &&
-                              ctx->Extensions.ARB_occlusion_query &&
-                              ctx->Extensions.EXT_shadow_funcs);
+                              ctx->Extensions.ARB_occlusion_query);
    const GLboolean ver_2_0 = (ver_1_5 &&
                               ctx->Extensions.ARB_point_sprite &&
-                              ctx->Extensions.ARB_shader_objects &&
                               ctx->Extensions.ARB_vertex_shader &&
                               ctx->Extensions.ARB_fragment_shader &&
                               ctx->Extensions.ARB_texture_non_power_of_two &&
@@ -228,16 +224,14 @@ compute_version(struct gl_context *ctx)
                              (ctx->Extensions.EXT_stencil_two_side
                               || ctx->Extensions.ATI_separate_stencil));
    const GLboolean ver_2_1 = (ver_2_0 &&
-                              ctx->Const.GLSLVersion >= 120 &&
                               ctx->Extensions.EXT_pixel_buffer_object &&
                               ctx->Extensions.EXT_texture_sRGB);
    const GLboolean ver_3_0 = (ver_2_1 &&
                               ctx->Const.GLSLVersion >= 130 &&
-                              ctx->Const.MaxSamples >= 4 &&
+                              (ctx->Const.MaxSamples >= 4 || ctx->Const.FakeSWMSAA) &&
                               (ctx->API == API_OPENGL_CORE ||
                                ctx->Extensions.ARB_color_buffer_float) &&
                               ctx->Extensions.ARB_depth_buffer_float &&
-                              ctx->Extensions.ARB_half_float_pixel &&
                               ctx->Extensions.ARB_half_float_vertex &&
                               ctx->Extensions.ARB_map_buffer_range &&
                               ctx->Extensions.ARB_shader_texture_lod &&
@@ -260,13 +254,12 @@ compute_version(struct gl_context *ctx)
                               ctx->Extensions.EXT_texture_snorm &&
                               ctx->Extensions.NV_primitive_restart &&
                               ctx->Extensions.NV_texture_rectangle &&
-                              ctx->Const.MaxVertexTextureImageUnits >= 16);
+                              ctx->Const.Program[MESA_SHADER_VERTEX].MaxTextureImageUnits >= 16);
    const GLboolean ver_3_2 = (ver_3_1 &&
                               ctx->Const.GLSLVersion >= 150 &&
                               ctx->Extensions.ARB_depth_clamp &&
                               ctx->Extensions.ARB_draw_elements_base_vertex &&
                               ctx->Extensions.ARB_fragment_coord_conventions &&
-                              ctx->Extensions.ARB_geometry_shader4 &&
                               ctx->Extensions.EXT_provoking_vertex &&
                               ctx->Extensions.ARB_seamless_cube_map &&
                               ctx->Extensions.ARB_sync &&
@@ -360,7 +353,6 @@ compute_version_es2(struct gl_context *ctx)
                               ctx->Extensions.EXT_blend_color &&
                               ctx->Extensions.EXT_blend_func_separate &&
                               ctx->Extensions.EXT_blend_minmax &&
-                              ctx->Extensions.ARB_shader_objects &&
                               ctx->Extensions.ARB_vertex_shader &&
                               ctx->Extensions.ARB_fragment_shader &&
                               ctx->Extensions.ARB_texture_non_power_of_two &&