mesa: GL_EXT_framebuffer_blit is not optional
authorIan Romanick <ian.d.romanick@intel.com>
Wed, 13 Nov 2013 21:30:37 +0000 (13:30 -0800)
committerIan Romanick <ian.d.romanick@intel.com>
Mon, 27 Jan 2014 21:21:43 +0000 (14:21 -0700)
Every driver supports it.  All current and future Gallium drivers always
support it, and all existing classic drivers support it.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
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/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 0ffee3e4fa5f977f4d068e46c79cd00d737fa8e9..9da12dc0efc2fb3eb3fbdb4f293eb26c07825242 100644 (file)
@@ -63,7 +63,6 @@ intelInitExtensions(struct gl_context *ctx)
    ctx->Extensions.EXT_blend_equation_separate = true;
    ctx->Extensions.EXT_blend_func_separate = true;
    ctx->Extensions.EXT_blend_minmax = true;
-   ctx->Extensions.EXT_framebuffer_blit = true;
    ctx->Extensions.EXT_gpu_program_parameters = true;
    ctx->Extensions.EXT_pixel_buffer_object = true;
    ctx->Extensions.EXT_point_parameters = true;
index ab73434437fba2624e34beaa6bdc1fdedffb46cb..2b5ed0b3b82f79270ec4b39c7c632b73ecbed18c 100644 (file)
@@ -206,7 +206,6 @@ intelInitExtensions(struct gl_context *ctx)
    ctx->Extensions.EXT_blend_func_separate = true;
    ctx->Extensions.EXT_blend_minmax = true;
    ctx->Extensions.EXT_draw_buffers2 = true;
-   ctx->Extensions.EXT_framebuffer_blit = true;
    ctx->Extensions.EXT_framebuffer_sRGB = true;
    ctx->Extensions.EXT_gpu_program_parameters = true;
    ctx->Extensions.EXT_packed_float = true;
index ec474d4414c189ef216e5d7d9d94c5b0146f714a..b84205b3b1f4bda851cad91756ba77cc5fe72d0a 100644 (file)
@@ -184,7 +184,6 @@ nouveau_context_init(struct gl_context *ctx, struct nouveau_screen *screen,
        /* Enable any supported extensions. */
        ctx->Extensions.EXT_blend_color = true;
        ctx->Extensions.EXT_blend_minmax = true;
-       ctx->Extensions.EXT_framebuffer_blit = true;
        ctx->Extensions.EXT_texture_filter_anisotropic = true;
        ctx->Extensions.NV_texture_env_combine4 = true;
        ctx->Const.MaxColorAttachments = 1;
index 9878d74a745bca1c727c11ab5b3d615426685ddb..637a26332c56a242fccb485d34489c735a235686 100644 (file)
@@ -382,7 +382,6 @@ GLboolean r200CreateContext( gl_api api,
    ctx->Extensions.EXT_blend_equation_separate = true;
    ctx->Extensions.EXT_blend_func_separate = true;
    ctx->Extensions.EXT_blend_minmax = true;
-   ctx->Extensions.EXT_framebuffer_blit = true;
    ctx->Extensions.EXT_gpu_program_parameters = true;
    ctx->Extensions.EXT_point_parameters = true;
    ctx->Extensions.EXT_texture_env_dot3 = true;
index c4f37aa8b7fce2702485651d07f337563c41d2da..7d65e2eb5977cc26adddc6b211c3a3ca2552b410 100644 (file)
@@ -336,7 +336,6 @@ r100CreateContext( gl_api api,
    ctx->Extensions.ARB_texture_mirror_clamp_to_edge = true;
    ctx->Extensions.ATI_texture_env_combine3 = true;
    ctx->Extensions.ATI_texture_mirror_once = true;
-   ctx->Extensions.EXT_framebuffer_blit = true;
    ctx->Extensions.EXT_texture_env_dot3 = true;
    ctx->Extensions.EXT_texture_filter_anisotropic = true;
    ctx->Extensions.EXT_texture_mirror_clamp = true;
index 0676f1e3df045db4faa23d3edb71b27454dae327..c42d177d5739983b62211ec81fdcde0ae129ad8d 100644 (file)
@@ -195,7 +195,7 @@ static const struct extension extension_table[] = {
    { "GL_EXT_draw_instanced",                      o(ARB_draw_instanced),                      GL,             2006 },
    { "GL_EXT_draw_range_elements",                 o(dummy_true),                              GLL,            1997 },
    { "GL_EXT_fog_coord",                           o(dummy_true),                              GLL,            1999 },
-   { "GL_EXT_framebuffer_blit",                    o(EXT_framebuffer_blit),                    GL,             2005 },
+   { "GL_EXT_framebuffer_blit",                    o(dummy_true),                              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(dummy_true),                              GLL,            2000 },
@@ -436,7 +436,6 @@ _mesa_enable_sw_extensions(struct gl_context *ctx)
    ctx->Extensions.EXT_blend_minmax = GL_TRUE;
    ctx->Extensions.EXT_depth_bounds_test = GL_TRUE;
    ctx->Extensions.EXT_draw_buffers2 = GL_TRUE;
-   ctx->Extensions.EXT_framebuffer_blit = GL_TRUE;
    ctx->Extensions.EXT_pixel_buffer_object = GL_TRUE;
    ctx->Extensions.EXT_point_parameters = GL_TRUE;
    ctx->Extensions.EXT_provoking_vertex = GL_TRUE;
index 943f40bd90a66fc9c4628e913ed4314f6a1ff35a..38b2727c3bdf0ba569baa6a63a6e936803cd505d 100644 (file)
@@ -163,8 +163,7 @@ invalidate_framebuffer(struct gl_framebuffer *fb)
 static struct gl_framebuffer *
 get_framebuffer_target(struct gl_context *ctx, GLenum target)
 {
-   bool have_fb_blit = _mesa_is_gles3(ctx) ||
-      (ctx->Extensions.EXT_framebuffer_blit && _mesa_is_desktop_gl(ctx));
+   bool have_fb_blit = _mesa_is_gles3(ctx) || _mesa_is_desktop_gl(ctx);
    switch (target) {
    case GL_DRAW_FRAMEBUFFER:
       return have_fb_blit ? ctx->DrawBuffer : NULL;
@@ -2037,26 +2036,12 @@ bind_framebuffer(GLenum target, GLuint framebuffer, bool allow_user_names)
    GLboolean bindReadBuf, bindDrawBuf;
    GET_CURRENT_CONTEXT(ctx);
 
-#ifdef DEBUG
-   if (ctx->Extensions.ARB_framebuffer_object) {
-      ASSERT(ctx->Extensions.EXT_framebuffer_blit);
-   }
-#endif
-
    switch (target) {
    case GL_DRAW_FRAMEBUFFER_EXT:
-      if (!ctx->Extensions.EXT_framebuffer_blit) {
-         _mesa_error(ctx, GL_INVALID_ENUM, "glBindFramebufferEXT(target)");
-         return;
-      }
       bindDrawBuf = GL_TRUE;
       bindReadBuf = GL_FALSE;
       break;
    case GL_READ_FRAMEBUFFER_EXT:
-      if (!ctx->Extensions.EXT_framebuffer_blit) {
-         _mesa_error(ctx, GL_INVALID_ENUM, "glBindFramebufferEXT(target)");
-         return;
-      }
       bindDrawBuf = GL_FALSE;
       bindReadBuf = GL_TRUE;
       break;
@@ -2190,7 +2175,7 @@ _mesa_DeleteFramebuffers(GLsizei n, const GLuint *framebuffers)
             ASSERT(fb == &DummyFramebuffer || fb->Name == framebuffers[i]);
 
             /* check if deleting currently bound framebuffer object */
-            if (ctx->Extensions.EXT_framebuffer_blit) {
+
                /* separate draw/read binding points */
                if (fb == ctx->DrawBuffer) {
                   /* bind default */
@@ -2202,15 +2187,7 @@ _mesa_DeleteFramebuffers(GLsizei n, const GLuint *framebuffers)
                   ASSERT(fb->RefCount >= 2);
                   _mesa_BindFramebuffer(GL_READ_FRAMEBUFFER_EXT, 0);
                }
-            }
-            else {
-               /* only one binding point for read/draw buffers */
-               if (fb == ctx->DrawBuffer || fb == ctx->ReadBuffer) {
-                  /* bind default */
-                  ASSERT(fb->RefCount >= 2);
-                  _mesa_BindFramebuffer(GL_FRAMEBUFFER_EXT, 0);
-               }
-            }
+
 
            /* remove from hash table immediately, to free the ID */
            _mesa_HashRemove(ctx->Shared->FrameBuffers, framebuffers[i]);
@@ -3496,11 +3473,6 @@ _mesa_BlitFramebuffer(GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1,
       }
    }
 
-   if (!ctx->Extensions.EXT_framebuffer_blit) {
-      _mesa_error(ctx, GL_INVALID_OPERATION, "glBlitFramebufferEXT");
-      return;
-   }
-
    /* Debug code */
    if (DEBUG_BLIT) {
       const struct gl_renderbuffer *colorReadRb = readFb->_ColorReadBuffer;
index 16dce5b65787fb647b9f87060b7e21d351c86e6a..3603ca985b159bc27b2a89d60205b8fbe14d2ff3 100644 (file)
@@ -362,7 +362,6 @@ EXTRA_EXT(EXT_stencil_two_side);
 EXTRA_EXT(EXT_depth_bounds_test);
 EXTRA_EXT(ARB_depth_clamp);
 EXTRA_EXT(ATI_fragment_shader);
-EXTRA_EXT(EXT_framebuffer_blit);
 EXTRA_EXT(EXT_provoking_vertex);
 EXTRA_EXT(ARB_fragment_shader);
 EXTRA_EXT(ARB_fragment_program);
index b45e1430bacb184609f38fc9b3e420c150809c41..eb420b68a8a150d14aca4484dae328d3eb751019 100644 (file)
@@ -365,7 +365,7 @@ descriptor=[
 
 # GL_EXT_framebuffer_blit
 # NOTE: GL_DRAW_FRAMEBUFFER_BINDING_EXT == GL_FRAMEBUFFER_BINDING_EXT
-  [ "READ_FRAMEBUFFER_BINDING_EXT", "LOC_CUSTOM, TYPE_INT, 0, extra_EXT_framebuffer_blit" ],
+  [ "READ_FRAMEBUFFER_BINDING_EXT", "LOC_CUSTOM, TYPE_INT, 0, NO_EXTRA" ],
 
 # GL_EXT_gpu_shader4 / GLSL 1.30
   [ "MIN_PROGRAM_TEXEL_OFFSET", "CONTEXT_INT(Const.MinProgramTexelOffset), extra_GLSL_130_es3" ],
index 9ab2de02663a6cfbf717f07558c7797c59e594e0..c4f22bce3f01b98b85738f0ecc89902225421e86 100644 (file)
@@ -3457,7 +3457,6 @@ struct gl_extensions
    GLboolean EXT_blend_minmax;
    GLboolean EXT_depth_bounds_test;
    GLboolean EXT_draw_buffers2;
-   GLboolean EXT_framebuffer_blit;
    GLboolean EXT_framebuffer_multisample;
    GLboolean EXT_framebuffer_multisample_blit_scaled;
    GLboolean EXT_framebuffer_sRGB;
index 4ef7b289c4adf00a18a11657f90276d841ca89f3..e778f60fab8ce42a0bbb70eb0f0991259a82c783 100644 (file)
@@ -539,7 +539,6 @@ void st_init_extensions(struct st_context *st)
    ctx->Extensions.EXT_blend_color = GL_TRUE;
    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_gpu_program_parameters = GL_TRUE;
    ctx->Extensions.EXT_pixel_buffer_object = GL_TRUE;
    ctx->Extensions.EXT_point_parameters = GL_TRUE;