diff options
author | Ian Romanick <[email protected]> | 2013-11-13 13:30:37 -0800 |
---|---|---|
committer | Ian Romanick <[email protected]> | 2014-01-27 14:21:43 -0700 |
commit | a6729731af700d5a44525d583a83619b5e454084 (patch) | |
tree | ec7fae97313c9f0e70369f5e0ab469c695e1f904 /src/mesa/main/fbobject.c | |
parent | 71cc510ef6be9792a0c1356a4412c30a6ca23119 (diff) |
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 <[email protected]>
Reviewed-by: Alex Deucher <[email protected]>
Reviewed-by: Kenneth Graunke <[email protected]>
Diffstat (limited to 'src/mesa/main/fbobject.c')
-rw-r--r-- | src/mesa/main/fbobject.c | 34 |
1 files changed, 3 insertions, 31 deletions
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; |