mesa: Remove ARB_draw_buffers extension enable flag
authorIan Romanick <ian.d.romanick@intel.com>
Sun, 2 Oct 2011 22:22:18 +0000 (15:22 -0700)
committerIan Romanick <ian.d.romanick@intel.com>
Tue, 4 Oct 2011 19:25:58 +0000 (12:25 -0700)
All drivers in Mesa have supported this extension for eons.  This
extension is an optional features in desktop OpenGL (via
GL_ARB_draw_buffers) and OpenGL ES 2.x (via GL_NV_draw_buffers).

The extension is not usable in OpenGL ES 1.x.  There is no
glDrawBuffers* entry point in OpenGL ES 1.x contexts, and glGet*v
generate errors when MAX_DRAW_BUFFERS or DRAW_BUFFERi is queried.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
src/glsl/standalone_scaffolding.cpp
src/mesa/drivers/dri/intel/intel_extensions_es.c
src/mesa/drivers/dri/swrast/swrast.c
src/mesa/main/extensions.c
src/mesa/main/mtypes.h
src/mesa/main/version.c
src/mesa/state_tracker/st_extensions.c

index 72aa1e428b40e1bfe23666b8eccc03b5c1adc2e3..5cc6c98799b0ac3e7cdfdd909e3b3e81e3217a22 100644 (file)
@@ -67,7 +67,6 @@ void initialize_context_to_defaults(struct gl_context *ctx, gl_api api)
    ctx->Extensions.dummy_false = false;
    ctx->Extensions.dummy_true = true;
    ctx->Extensions.ARB_ES2_compatibility = true;
-   ctx->Extensions.ARB_draw_buffers = true;
    ctx->Extensions.ARB_draw_instanced = true;
    ctx->Extensions.ARB_fragment_coord_conventions = true;
    ctx->Extensions.EXT_texture_array = true;
index e60cfc3e4a18d9ec8c56ed4b7497dc739460914e..c3f5ee379e3aaf4324432625e84f8344863ad458 100644 (file)
@@ -32,7 +32,6 @@
 
 static const char *common_extensions[] = {
    /* Used by mesa internally (cf all_mesa_extensions in ../common/utils.c) */
-   "GL_ARB_draw_buffers",
    "GL_ARB_transpose_matrix",
    "GL_ARB_window_pos",
    "GL_EXT_blend_func_separate",
index 8665ad099e20df74dce6f15da7b1aefcc6e29e59..d2c74b91dd10896e16e7554f0ed45fd38f550fd5 100644 (file)
@@ -577,7 +577,6 @@ swrast_init_driver_functions(struct dd_function_table *driver)
 
 static const char *es2_extensions[] = {
    /* Used by mesa internally (cf all_mesa_extensions in ../common/utils.c) */
-   "GL_ARB_draw_buffers",
    "GL_ARB_transpose_matrix",
    "GL_ARB_window_pos",
    "GL_EXT_blend_func_separate",
index fc543f99ad1dfa159243e5374712b5b66861c34a..52b928e419869f97c8370f65ecb4305ca2592092 100644 (file)
@@ -85,7 +85,7 @@ static const struct extension extension_table[] = {
    { "GL_ARB_depth_buffer_float",                  o(ARB_depth_buffer_float),                  GL,             2008 },
    { "GL_ARB_depth_clamp",                         o(ARB_depth_clamp),                         GL,             2003 },
    { "GL_ARB_depth_texture",                       o(ARB_depth_texture),                       GL,             2001 },
-   { "GL_ARB_draw_buffers",                        o(ARB_draw_buffers),                        GL,             2002 },
+   { "GL_ARB_draw_buffers",                        o(dummy_true),                              GL,             2002 },
    { "GL_ARB_draw_buffers_blend",                  o(ARB_draw_buffers_blend),                  GL,             2009 },
    { "GL_ARB_draw_elements_base_vertex",           o(ARB_draw_elements_base_vertex),           GL,             2009 },
    { "GL_ARB_draw_instanced",                      o(ARB_draw_instanced),                      GL,             2008 },
@@ -263,7 +263,7 @@ static const struct extension extension_table[] = {
    { "GL_APPLE_packed_pixels",                     o(APPLE_packed_pixels),                     GL,             2002 },
    { "GL_APPLE_vertex_array_object",               o(APPLE_vertex_array_object),               GL,             2002 },
    { "GL_ATI_blend_equation_separate",             o(EXT_blend_equation_separate),             GL,             2003 },
-   { "GL_ATI_draw_buffers",                        o(ARB_draw_buffers),                        GL,             2002 },
+   { "GL_ATI_draw_buffers",                        o(dummy_true),                              GL,             2002 },
    { "GL_ATI_envmap_bumpmap",                      o(ATI_envmap_bumpmap),                      GL,             2001 },
    { "GL_ATI_fragment_shader",                     o(ATI_fragment_shader),                     GL,             2001 },
    { "GL_ATI_separate_stencil",                    o(ATI_separate_stencil),                    GL,             2006 },
@@ -284,7 +284,7 @@ static const struct extension extension_table[] = {
    { "GL_NV_blend_square",                         o(NV_blend_square),                         GL,             1999 },
    { "GL_NV_conditional_render",                   o(NV_conditional_render),                   GL,             2008 },
    { "GL_NV_depth_clamp",                          o(ARB_depth_clamp),                         GL,             2001 },
-   { "GL_NV_draw_buffers",                         o(ARB_draw_buffers),                                   ES2, 2011 },
+   { "GL_NV_draw_buffers",                         o(dummy_true),                                         ES2, 2011 },
    { "GL_NV_fbo_color_attachments",                o(EXT_framebuffer_object),                             ES2, 2010 },
    { "GL_NV_fragment_program",                     o(NV_fragment_program),                     GL,             2001 },
    { "GL_NV_fragment_program_option",              o(NV_fragment_program_option),              GL,             2005 },
@@ -343,7 +343,6 @@ name_to_offset(const char* name)
  */
 static const size_t default_extensions[] = {
    o(ARB_copy_buffer),
-   o(ARB_draw_buffers),
    o(ARB_transpose_matrix),
    o(ARB_window_pos),
 
@@ -378,7 +377,6 @@ _mesa_enable_sw_extensions(struct gl_context *ctx)
    /*ctx->Extensions.ARB_copy_buffer = GL_TRUE;*/
    ctx->Extensions.ARB_depth_clamp = GL_TRUE;
    ctx->Extensions.ARB_depth_texture = GL_TRUE;
-   /*ctx->Extensions.ARB_draw_buffers = GL_TRUE;*/
    ctx->Extensions.ARB_draw_elements_base_vertex = GL_TRUE;
    ctx->Extensions.ARB_draw_instanced = GL_TRUE;
    ctx->Extensions.ARB_explicit_attrib_location = GL_TRUE;
@@ -577,7 +575,6 @@ _mesa_enable_1_5_extensions(struct gl_context *ctx)
 void
 _mesa_enable_2_0_extensions(struct gl_context *ctx)
 {
-   /*ctx->Extensions.ARB_draw_buffers = GL_TRUE;*/
 #if FEATURE_ARB_fragment_shader
    ctx->Extensions.ARB_fragment_shader = GL_TRUE;
 #endif
index 8c39717c6e304d6fa2a8cc3091a6cafc3b6f9b4d..b29cdedab45fdcac41b3f8dff71968ea5cbdadb9 100644 (file)
@@ -2749,7 +2749,6 @@ struct gl_extensions
    GLboolean ARB_depth_buffer_float;
    GLboolean ARB_depth_clamp;
    GLboolean ARB_depth_texture;
-   GLboolean ARB_draw_buffers;
    GLboolean ARB_draw_buffers_blend;
    GLboolean ARB_draw_elements_base_vertex;
    GLboolean ARB_draw_instanced;
index a996c145b88553afcca0aa9c7c0cd5f3c61b5102..17c0600593788af8ae6a2beec6ce403c4efa4c29 100644 (file)
@@ -104,7 +104,6 @@ compute_version(struct gl_context *ctx)
                               ctx->Extensions.ARB_occlusion_query &&
                               ctx->Extensions.EXT_shadow_funcs);
    const GLboolean ver_2_0 = (ver_1_5 &&
-                              ctx->Extensions.ARB_draw_buffers &&
                               ctx->Extensions.ARB_point_sprite &&
                               ctx->Extensions.ARB_shader_objects &&
                               ctx->Extensions.ARB_vertex_shader &&
index 8865440d9c63e5712d28a6774d91fd2f56e3a46c..6707fcae122ec3259846c2a4b31afa89d7d753c1 100644 (file)
@@ -307,10 +307,6 @@ void st_init_extensions(struct st_context *st)
    /*
     * Extensions that depend on the driver/hardware:
     */
-   if (screen->get_param(screen, PIPE_CAP_MAX_RENDER_TARGETS) > 0) {
-      ctx->Extensions.ARB_draw_buffers = GL_TRUE;
-   }
-
    if (screen->get_param(screen, PIPE_CAP_TEXTURE_SWIZZLE) > 0) {
       ctx->Extensions.EXT_texture_swizzle = GL_TRUE;
    }