summaryrefslogtreecommitdiffstats
path: root/src/mesa/main
diff options
context:
space:
mode:
authorIan Romanick <[email protected]>2013-11-13 13:30:37 -0800
committerIan Romanick <[email protected]>2014-01-27 14:21:43 -0700
commita6729731af700d5a44525d583a83619b5e454084 (patch)
treeec7fae97313c9f0e70369f5e0ab469c695e1f904 /src/mesa/main
parent71cc510ef6be9792a0c1356a4412c30a6ca23119 (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')
-rw-r--r--src/mesa/main/extensions.c3
-rw-r--r--src/mesa/main/fbobject.c34
-rw-r--r--src/mesa/main/get.c1
-rw-r--r--src/mesa/main/get_hash_params.py2
-rw-r--r--src/mesa/main/mtypes.h1
5 files changed, 5 insertions, 36 deletions
diff --git a/src/mesa/main/extensions.c b/src/mesa/main/extensions.c
index 0676f1e3df0..c42d177d573 100644
--- a/src/mesa/main/extensions.c
+++ b/src/mesa/main/extensions.c
@@ -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;
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;
diff --git a/src/mesa/main/get.c b/src/mesa/main/get.c
index 16dce5b6578..3603ca985b1 100644
--- a/src/mesa/main/get.c
+++ b/src/mesa/main/get.c
@@ -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);
diff --git a/src/mesa/main/get_hash_params.py b/src/mesa/main/get_hash_params.py
index b45e1430bac..eb420b68a8a 100644
--- a/src/mesa/main/get_hash_params.py
+++ b/src/mesa/main/get_hash_params.py
@@ -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" ],
diff --git a/src/mesa/main/mtypes.h b/src/mesa/main/mtypes.h
index 9ab2de02663..c4f22bce3f0 100644
--- a/src/mesa/main/mtypes.h
+++ b/src/mesa/main/mtypes.h
@@ -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;