mesa: GL_EXT_framebuffer_object is not optional
authorIan Romanick <ian.d.romanick@intel.com>
Fri, 28 Jun 2013 01:20:26 +0000 (18:20 -0700)
committerKenneth Graunke <kenneth@whitecape.org>
Fri, 28 Jun 2013 20:35:22 +0000 (13:35 -0700)
Every driver left in Mesa enables this extension all the time.  There's
no reason to let it be optional.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Brian Paul <brianp@vmware.com>
13 files changed:
src/mesa/drivers/common/meta.c
src/mesa/drivers/dri/i915/intel_extensions.c
src/mesa/drivers/dri/i965/intel_extensions.c
src/mesa/drivers/dri/nouveau/nouveau_context.c
src/mesa/drivers/dri/r200/r200_context.c
src/mesa/drivers/dri/radeon/radeon_context.c
src/mesa/main/buffers.c
src/mesa/main/extensions.c
src/mesa/main/fbobject.c
src/mesa/main/get.c
src/mesa/main/get_hash_params.py
src/mesa/main/mtypes.h
src/mesa/state_tracker/st_extensions.c

index f7dd06aebf0e7e567af6046f7db802545420b1c6..d9bffd77c9205a44191f985a2a0a4031243669d2 100644 (file)
@@ -3049,12 +3049,6 @@ _mesa_meta_check_generate_mipmap_fallback(struct gl_context *ctx, GLenum target,
    GLenum status;
 
    /* check for fallbacks */
-   if (!ctx->Extensions.EXT_framebuffer_object) {
-      _mesa_perf_debug(ctx, MESA_DEBUG_SEVERITY_HIGH,
-                       "glGenerateMipmap() without FBOs\n");
-      return GL_TRUE;
-   }
-
    if (target == GL_TEXTURE_3D ||
        target == GL_TEXTURE_1D_ARRAY ||
        target == GL_TEXTURE_2D_ARRAY) {
index ac6aefab2f50295570a888d70b2a6151475cc1a7..eecb291cd9f4d09c96c8f9285a5c6e550e57b383 100644 (file)
@@ -67,7 +67,6 @@ intelInitExtensions(struct gl_context *ctx)
    ctx->Extensions.EXT_blend_func_separate = true;
    ctx->Extensions.EXT_blend_minmax = true;
    ctx->Extensions.EXT_framebuffer_blit = true;
-   ctx->Extensions.EXT_framebuffer_object = true;
    ctx->Extensions.EXT_fog_coord = true;
    ctx->Extensions.EXT_gpu_program_parameters = true;
    ctx->Extensions.EXT_packed_depth_stencil = true;
index d70655b3099b86c63991244076cf14f7c9d74af0..fdd05089e5682c56e14f092fbfea7bfc44d88d31 100644 (file)
@@ -91,7 +91,6 @@ intelInitExtensions(struct gl_context *ctx)
    ctx->Extensions.EXT_blend_minmax = true;
    ctx->Extensions.EXT_draw_buffers2 = true;
    ctx->Extensions.EXT_framebuffer_blit = true;
-   ctx->Extensions.EXT_framebuffer_object = true;
    ctx->Extensions.EXT_fog_coord = true;
    ctx->Extensions.EXT_framebuffer_sRGB = true;
    ctx->Extensions.EXT_gpu_program_parameters = true;
index b216c60a277f23cc2b7b0fcb87945c49a25e4a66..7f22ae2c1e13d3686a2095aecada622ac43684b4 100644 (file)
@@ -200,7 +200,6 @@ nouveau_context_init(struct gl_context *ctx, struct nouveau_screen *screen,
        ctx->Extensions.EXT_blend_minmax = true;
        ctx->Extensions.EXT_fog_coord = true;
        ctx->Extensions.EXT_framebuffer_blit = true;
-       ctx->Extensions.EXT_framebuffer_object = true;
        ctx->Extensions.EXT_packed_depth_stencil = true;
        ctx->Extensions.EXT_secondary_color = true;
        ctx->Extensions.EXT_texture_filter_anisotropic = true;
index 3484478691caa7e6e1a65e1ef296a7f53821fa02..5d2f79bab5c8078c68131f68e35e1f2c1d95c985 100644 (file)
@@ -397,7 +397,6 @@ GLboolean r200CreateContext( gl_api api,
    ctx->Extensions.NV_blend_square = true;
    ctx->Extensions.NV_texture_rectangle = true;
    ctx->Extensions.OES_EGL_image = true;
-   ctx->Extensions.EXT_framebuffer_object = true;
    ctx->Extensions.ARB_occlusion_query = true;
 
    if (!(rmesa->radeon.radeonScreen->chip_flags & R200_CHIPSET_YCBCR_BROKEN)) {
index cac4b124296d114b8f9a7037dbe656aee39beea8..fbcac6793d6e7aa90da1a0656ba73dd198e0d6f4 100644 (file)
@@ -355,7 +355,6 @@ r100CreateContext( gl_api api,
    ctx->Extensions.MESA_ycbcr_texture = true;
    ctx->Extensions.NV_blend_square = true;
    ctx->Extensions.OES_EGL_image = true;
-   ctx->Extensions.EXT_framebuffer_object = true;
    ctx->Extensions.ARB_texture_cube_map = true;
 
    if (rmesa->radeon.glCtx.Mesa_DXTn) {
index e80f0400fcd26184d0c787dbb631a024c5d7e2c0..2bdbf41be5d1a33bdf803224205394663a0be3bf 100644 (file)
@@ -60,7 +60,6 @@ supported_buffer_bitmask(const struct gl_context *ctx,
    if (_mesa_is_user_fbo(fb)) {
       /* A user-created renderbuffer */
       GLuint i;
-      ASSERT(ctx->Extensions.EXT_framebuffer_object);
       for (i = 0; i < ctx->Const.MaxColorAttachments; i++) {
          mask |= (BUFFER_BIT_COLOR0 << i);
       }
index 9c90bbe7559dc93920681d018a41b1f1e6e3ac2a..0651ba110d475fdeeeee2ae46c8333376ecec2ab 100644 (file)
@@ -171,7 +171,7 @@ static const struct extension extension_table[] = {
    { "GL_EXT_blend_color",                         o(EXT_blend_color),                         GLL,            1995 },
    { "GL_EXT_blend_equation_separate",             o(EXT_blend_equation_separate),             GL,             2003 },
    { "GL_EXT_blend_func_separate",                 o(EXT_blend_func_separate),                 GLL,            1999 },
-   { "GL_EXT_discard_framebuffer",                 o(EXT_framebuffer_object),                        ES1 | ES2, 2009 },
+   { "GL_EXT_discard_framebuffer",                 o(dummy_true),                                    ES1 | ES2, 2009 },
    { "GL_EXT_blend_minmax",                        o(EXT_blend_minmax),                        GLL | ES1 | ES2, 1995 },
    { "GL_EXT_blend_subtract",                      o(dummy_true),                              GLL,            1995 },
    { "GL_EXT_compiled_vertex_array",               o(dummy_true),                              GLL,            1996 },
@@ -184,7 +184,7 @@ static const struct extension extension_table[] = {
    { "GL_EXT_framebuffer_blit",                    o(EXT_framebuffer_blit),                    GL,             2005 },
    { "GL_EXT_framebuffer_multisample",             o(EXT_framebuffer_multisample),             GL,             2005 },
    { "GL_EXT_framebuffer_multisample_blit_scaled", o(EXT_framebuffer_multisample_blit_scaled), GL,             2011 },
-   { "GL_EXT_framebuffer_object",                  o(EXT_framebuffer_object),                  GL,             2000 },
+   { "GL_EXT_framebuffer_object",                  o(dummy_true),                              GL,             2000 },
    { "GL_EXT_framebuffer_sRGB",                    o(EXT_framebuffer_sRGB),                    GL,             1998 },
    { "GL_EXT_gpu_program_parameters",              o(EXT_gpu_program_parameters),              GLL,            2006 },
    { "GL_EXT_gpu_shader4",                         o(EXT_gpu_shader4),                         GL,             2006 },
@@ -248,7 +248,7 @@ static const struct extension extension_table[] = {
    { "GL_OES_byte_coordinates",                    o(dummy_true),                                   ES1,       2002 },
    { "GL_OES_compressed_ETC1_RGB8_texture",        o(OES_compressed_ETC1_RGB8_texture),             ES1 | ES2, 2005 },
    { "GL_OES_compressed_paletted_texture",         o(dummy_true),                                   ES1,       2003 },
-   { "GL_OES_depth24",                             o(EXT_framebuffer_object),                       ES1 | ES2, 2005 },
+   { "GL_OES_depth24",                             o(dummy_true),                                   ES1 | ES2, 2005 },
    { "GL_OES_depth32",                             o(dummy_false),                     DISABLE,                2005 },
    { "GL_OES_depth_texture",                       o(ARB_depth_texture),                                  ES2, 2006 },
    { "GL_OES_depth_texture_cube_map",              o(OES_depth_texture_cube_map),                         ES2, 2012 },
@@ -257,9 +257,9 @@ static const struct extension extension_table[] = {
    { "GL_OES_EGL_image",                           o(OES_EGL_image),                           GL | ES1 | ES2, 2006 },
    { "GL_OES_EGL_image_external",                  o(OES_EGL_image_external),                       ES1 | ES2, 2010 },
    { "GL_OES_element_index_uint",                  o(dummy_true),                                   ES1 | ES2, 2005 },
-   { "GL_OES_fbo_render_mipmap",                   o(EXT_framebuffer_object),                       ES1 | ES2, 2005 },
+   { "GL_OES_fbo_render_mipmap",                   o(dummy_true),                                   ES1 | ES2, 2005 },
    { "GL_OES_fixed_point",                         o(dummy_true),                                   ES1,       2002 },
-   { "GL_OES_framebuffer_object",                  o(EXT_framebuffer_object),                       ES1,       2005 },
+   { "GL_OES_framebuffer_object",                  o(dummy_true),                                   ES1,       2005 },
    { "GL_OES_get_program_binary",                  o(ARB_shader_objects),                                 ES2, 2008 },
    { "GL_OES_mapbuffer",                           o(dummy_true),                                   ES1 | ES2, 2005 },
    { "GL_OES_matrix_get",                          o(dummy_true),                                   ES1,       2004 },
@@ -268,12 +268,12 @@ static const struct extension extension_table[] = {
    { "GL_OES_point_sprite",                        o(ARB_point_sprite),                             ES1,       2004 },
    { "GL_OES_query_matrix",                        o(dummy_true),                                   ES1,       2003 },
    { "GL_OES_read_format",                         o(dummy_true),                              GL | ES1,       2003 },
-   { "GL_OES_rgb8_rgba8",                          o(EXT_framebuffer_object),                       ES1 | ES2, 2005 },
+   { "GL_OES_rgb8_rgba8",                          o(dummy_true),                                   ES1 | ES2, 2005 },
    { "GL_OES_single_precision",                    o(dummy_true),                                   ES1,       2003 },
    { "GL_OES_standard_derivatives",                o(OES_standard_derivatives),                           ES2, 2005 },
    { "GL_OES_stencil1",                            o(dummy_false),                     DISABLE,                2005 },
    { "GL_OES_stencil4",                            o(dummy_false),                     DISABLE,                2005 },
-   { "GL_OES_stencil8",                            o(EXT_framebuffer_object),                       ES1 | ES2, 2005 },
+   { "GL_OES_stencil8",                            o(dummy_true),                                   ES1 | ES2, 2005 },
    { "GL_OES_stencil_wrap",                        o(dummy_true),                                   ES1,       2002 },
    { "GL_OES_texture_3D",                          o(EXT_texture3D),                                      ES2, 2005 },
    { "GL_OES_texture_cube_map",                    o(ARB_texture_cube_map),                         ES1,       2007 },
@@ -315,7 +315,7 @@ static const struct extension extension_table[] = {
    { "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(dummy_true),                                         ES2, 2011 },
-   { "GL_NV_fbo_color_attachments",                o(EXT_framebuffer_object),                             ES2, 2010 },
+   { "GL_NV_fbo_color_attachments",                o(dummy_true),                                         ES2, 2010 },
    { "GL_NV_fog_distance",                         o(NV_fog_distance),                         GLL,            2001 },
    { "GL_NV_fragment_program_option",              o(NV_fragment_program_option),              GLL,            2005 },
    { "GL_NV_light_max_exponent",                   o(dummy_true),                              GLL,            1999 },
@@ -423,7 +423,6 @@ _mesa_enable_sw_extensions(struct gl_context *ctx)
    ctx->Extensions.EXT_depth_bounds_test = GL_TRUE;
    ctx->Extensions.EXT_draw_buffers2 = GL_TRUE;
    ctx->Extensions.EXT_fog_coord = GL_TRUE;
-   ctx->Extensions.EXT_framebuffer_object = GL_TRUE;
    ctx->Extensions.EXT_framebuffer_blit = GL_TRUE;
    ctx->Extensions.EXT_packed_depth_stencil = GL_TRUE;
    ctx->Extensions.EXT_pixel_buffer_object = GL_TRUE;
index ba462e9356474f268ec855e18ebf2d473ee942ae..f59fdb12d086629ff2772dd01323ff8c7d6cb0e5 100644 (file)
@@ -1909,17 +1909,10 @@ _mesa_BindFramebuffer(GLenum target, GLuint framebuffer)
 
 #ifdef DEBUG
    if (ctx->Extensions.ARB_framebuffer_object) {
-      ASSERT(ctx->Extensions.EXT_framebuffer_object);
       ASSERT(ctx->Extensions.EXT_framebuffer_blit);
    }
 #endif
 
-   if (!ctx->Extensions.EXT_framebuffer_object) {
-      _mesa_error(ctx, GL_INVALID_OPERATION,
-                  "glBindFramebufferEXT(unsupported)");
-      return;
-   }
-
    switch (target) {
    case GL_DRAW_FRAMEBUFFER_EXT:
       if (!ctx->Extensions.EXT_framebuffer_blit) {
index d31ba011ff1fde95692d8347e14e0c67aac66ecc..64deaa7d332080c2a6edcc120a4f0b4a8156bfbb 100644 (file)
@@ -362,7 +362,6 @@ EXTRA_EXT(EXT_provoking_vertex);
 EXTRA_EXT(ARB_fragment_shader);
 EXTRA_EXT(ARB_fragment_program);
 EXTRA_EXT2(ARB_framebuffer_object, EXT_framebuffer_multisample);
-EXTRA_EXT(EXT_framebuffer_object);
 EXTRA_EXT(ARB_seamless_cube_map);
 EXTRA_EXT(ARB_sync);
 EXTRA_EXT(ARB_vertex_shader);
index f47b33fcd67f227435d70f6ff10a843611f97a1c..5b5ccbbb66a1ba3dc1c6a1bb06a512010a16f9a5 100644 (file)
@@ -107,9 +107,9 @@ descriptor=[
   [ "IMPLEMENTATION_COLOR_READ_FORMAT_OES", "LOC_CUSTOM, TYPE_INT, 0, extra_new_buffers" ],
 
 # GL_EXT_framebuffer_object
-  [ "FRAMEBUFFER_BINDING_EXT", "BUFFER_INT(Name), extra_EXT_framebuffer_object" ],
-  [ "RENDERBUFFER_BINDING_EXT", "LOC_CUSTOM, TYPE_INT, 0, extra_EXT_framebuffer_object" ],
-  [ "MAX_RENDERBUFFER_SIZE_EXT", "CONTEXT_INT(Const.MaxRenderbufferSize), extra_EXT_framebuffer_object" ],
+  [ "FRAMEBUFFER_BINDING_EXT", "BUFFER_INT(Name), NO_EXTRA" ],
+  [ "RENDERBUFFER_BINDING_EXT", "LOC_CUSTOM, TYPE_INT, 0, NO_EXTRA" ],
+  [ "MAX_RENDERBUFFER_SIZE_EXT", "CONTEXT_INT(Const.MaxRenderbufferSize), NO_EXTRA" ],
 
 # This entry isn't spec'ed for GLES 2, but is needed for Mesa's
 # GLSL:
@@ -258,7 +258,7 @@ descriptor=[
   [ "MAX_DRAW_BUFFERS_ARB", "CONTEXT_INT(Const.MaxDrawBuffers), NO_EXTRA" ],
 
 # GL_EXT_framebuffer_object / GL_NV_fbo_color_attachments
-  [ "MAX_COLOR_ATTACHMENTS", "CONTEXT_INT(Const.MaxColorAttachments), extra_EXT_framebuffer_object" ],
+  [ "MAX_COLOR_ATTACHMENTS", "CONTEXT_INT(Const.MaxColorAttachments), NO_EXTRA" ],
 
 # GL_ARB_draw_buffers / GL_NV_draw_buffers (for ES 2.0)
   [ "DRAW_BUFFER0_ARB", "BUFFER_ENUM(ColorDrawBuffer[0]), NO_EXTRA" ],
index 1edc917f869d786bb8c35454222a1f46a4c05915..9a2409c77c73adfbf4cbf63772b8d907fe7fbc5d 100644 (file)
@@ -3058,7 +3058,6 @@ struct gl_extensions
    GLboolean EXT_framebuffer_blit;
    GLboolean EXT_framebuffer_multisample;
    GLboolean EXT_framebuffer_multisample_blit_scaled;
-   GLboolean EXT_framebuffer_object;
    GLboolean EXT_framebuffer_sRGB;
    GLboolean EXT_gpu_program_parameters;
    GLboolean EXT_gpu_shader4;
index 966722c0ba9bea5063d15fc891c4ab6186766ccc..d0dd2f405c638d9c681ac60cd3307908c835f096 100644 (file)
@@ -552,7 +552,6 @@ void st_init_extensions(struct st_context *st)
    ctx->Extensions.EXT_blend_func_separate = GL_TRUE;
    ctx->Extensions.EXT_blend_minmax = GL_TRUE;
    ctx->Extensions.EXT_framebuffer_blit = GL_TRUE;
-   ctx->Extensions.EXT_framebuffer_object = GL_TRUE;
    ctx->Extensions.EXT_fog_coord = GL_TRUE;
    ctx->Extensions.EXT_gpu_program_parameters = GL_TRUE;
    ctx->Extensions.EXT_pixel_buffer_object = GL_TRUE;