From a6729731af700d5a44525d583a83619b5e454084 Mon Sep 17 00:00:00 2001 From: Ian Romanick Date: Wed, 13 Nov 2013 13:30:37 -0800 Subject: mesa: GL_EXT_framebuffer_blit is not optional 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 Reviewed-by: Alex Deucher Reviewed-by: Kenneth Graunke --- src/mesa/main/fbobject.c | 34 +++------------------------------- 1 file changed, 3 insertions(+), 31 deletions(-) (limited to 'src/mesa/main/fbobject.c') diff --git a/src/mesa/main/fbobject.c b/src/mesa/main/fbobject.c index 943f40bd90a..38b2727c3bd 100644 --- a/src/mesa/main/fbobject.c +++ b/src/mesa/main/fbobject.c @@ -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; -- cgit v1.2.3