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 <ian.d.romanick@intel.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
This commit is contained in:
parent
71cc510ef6
commit
a6729731af
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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" ],
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue