mesa: GL_EXT_framebuffer_object is not optional
Every driver left in Mesa enables this extension all the time. There's no reason to let it be optional. Signed-off-by: Ian Romanick <ian.d.romanick@intel.com> Reviewed-by: Kenneth Graunke <kenneth@whitecape.org> Reviewed-by: Brian Paul <brianp@vmware.com>
This commit is contained in:

committed by
Kenneth Graunke

parent
f4571640b8
commit
b5305a303b
@@ -3049,12 +3049,6 @@ _mesa_meta_check_generate_mipmap_fallback(struct gl_context *ctx, GLenum target,
|
||||
GLenum status;
|
||||
|
||||
/* check for fallbacks */
|
||||
if (!ctx->Extensions.EXT_framebuffer_object) {
|
||||
_mesa_perf_debug(ctx, MESA_DEBUG_SEVERITY_HIGH,
|
||||
"glGenerateMipmap() without FBOs\n");
|
||||
return GL_TRUE;
|
||||
}
|
||||
|
||||
if (target == GL_TEXTURE_3D ||
|
||||
target == GL_TEXTURE_1D_ARRAY ||
|
||||
target == GL_TEXTURE_2D_ARRAY) {
|
||||
|
@@ -67,7 +67,6 @@ intelInitExtensions(struct gl_context *ctx)
|
||||
ctx->Extensions.EXT_blend_func_separate = true;
|
||||
ctx->Extensions.EXT_blend_minmax = true;
|
||||
ctx->Extensions.EXT_framebuffer_blit = true;
|
||||
ctx->Extensions.EXT_framebuffer_object = true;
|
||||
ctx->Extensions.EXT_fog_coord = true;
|
||||
ctx->Extensions.EXT_gpu_program_parameters = true;
|
||||
ctx->Extensions.EXT_packed_depth_stencil = true;
|
||||
|
@@ -91,7 +91,6 @@ intelInitExtensions(struct gl_context *ctx)
|
||||
ctx->Extensions.EXT_blend_minmax = true;
|
||||
ctx->Extensions.EXT_draw_buffers2 = true;
|
||||
ctx->Extensions.EXT_framebuffer_blit = true;
|
||||
ctx->Extensions.EXT_framebuffer_object = true;
|
||||
ctx->Extensions.EXT_fog_coord = true;
|
||||
ctx->Extensions.EXT_framebuffer_sRGB = true;
|
||||
ctx->Extensions.EXT_gpu_program_parameters = true;
|
||||
|
@@ -200,7 +200,6 @@ nouveau_context_init(struct gl_context *ctx, struct nouveau_screen *screen,
|
||||
ctx->Extensions.EXT_blend_minmax = true;
|
||||
ctx->Extensions.EXT_fog_coord = true;
|
||||
ctx->Extensions.EXT_framebuffer_blit = true;
|
||||
ctx->Extensions.EXT_framebuffer_object = true;
|
||||
ctx->Extensions.EXT_packed_depth_stencil = true;
|
||||
ctx->Extensions.EXT_secondary_color = true;
|
||||
ctx->Extensions.EXT_texture_filter_anisotropic = true;
|
||||
|
@@ -397,7 +397,6 @@ GLboolean r200CreateContext( gl_api api,
|
||||
ctx->Extensions.NV_blend_square = true;
|
||||
ctx->Extensions.NV_texture_rectangle = true;
|
||||
ctx->Extensions.OES_EGL_image = true;
|
||||
ctx->Extensions.EXT_framebuffer_object = true;
|
||||
ctx->Extensions.ARB_occlusion_query = true;
|
||||
|
||||
if (!(rmesa->radeon.radeonScreen->chip_flags & R200_CHIPSET_YCBCR_BROKEN)) {
|
||||
|
@@ -355,7 +355,6 @@ r100CreateContext( gl_api api,
|
||||
ctx->Extensions.MESA_ycbcr_texture = true;
|
||||
ctx->Extensions.NV_blend_square = true;
|
||||
ctx->Extensions.OES_EGL_image = true;
|
||||
ctx->Extensions.EXT_framebuffer_object = true;
|
||||
ctx->Extensions.ARB_texture_cube_map = true;
|
||||
|
||||
if (rmesa->radeon.glCtx.Mesa_DXTn) {
|
||||
|
@@ -60,7 +60,6 @@ supported_buffer_bitmask(const struct gl_context *ctx,
|
||||
if (_mesa_is_user_fbo(fb)) {
|
||||
/* A user-created renderbuffer */
|
||||
GLuint i;
|
||||
ASSERT(ctx->Extensions.EXT_framebuffer_object);
|
||||
for (i = 0; i < ctx->Const.MaxColorAttachments; i++) {
|
||||
mask |= (BUFFER_BIT_COLOR0 << i);
|
||||
}
|
||||
|
@@ -171,7 +171,7 @@ static const struct extension extension_table[] = {
|
||||
{ "GL_EXT_blend_color", o(EXT_blend_color), GLL, 1995 },
|
||||
{ "GL_EXT_blend_equation_separate", o(EXT_blend_equation_separate), GL, 2003 },
|
||||
{ "GL_EXT_blend_func_separate", o(EXT_blend_func_separate), GLL, 1999 },
|
||||
{ "GL_EXT_discard_framebuffer", o(EXT_framebuffer_object), ES1 | ES2, 2009 },
|
||||
{ "GL_EXT_discard_framebuffer", o(dummy_true), ES1 | ES2, 2009 },
|
||||
{ "GL_EXT_blend_minmax", o(EXT_blend_minmax), GLL | ES1 | ES2, 1995 },
|
||||
{ "GL_EXT_blend_subtract", o(dummy_true), GLL, 1995 },
|
||||
{ "GL_EXT_compiled_vertex_array", o(dummy_true), GLL, 1996 },
|
||||
@@ -184,7 +184,7 @@ static const struct extension extension_table[] = {
|
||||
{ "GL_EXT_framebuffer_blit", o(EXT_framebuffer_blit), 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(EXT_framebuffer_object), GL, 2000 },
|
||||
{ "GL_EXT_framebuffer_object", o(dummy_true), GL, 2000 },
|
||||
{ "GL_EXT_framebuffer_sRGB", o(EXT_framebuffer_sRGB), GL, 1998 },
|
||||
{ "GL_EXT_gpu_program_parameters", o(EXT_gpu_program_parameters), GLL, 2006 },
|
||||
{ "GL_EXT_gpu_shader4", o(EXT_gpu_shader4), GL, 2006 },
|
||||
@@ -248,7 +248,7 @@ static const struct extension extension_table[] = {
|
||||
{ "GL_OES_byte_coordinates", o(dummy_true), ES1, 2002 },
|
||||
{ "GL_OES_compressed_ETC1_RGB8_texture", o(OES_compressed_ETC1_RGB8_texture), ES1 | ES2, 2005 },
|
||||
{ "GL_OES_compressed_paletted_texture", o(dummy_true), ES1, 2003 },
|
||||
{ "GL_OES_depth24", o(EXT_framebuffer_object), ES1 | ES2, 2005 },
|
||||
{ "GL_OES_depth24", o(dummy_true), ES1 | ES2, 2005 },
|
||||
{ "GL_OES_depth32", o(dummy_false), DISABLE, 2005 },
|
||||
{ "GL_OES_depth_texture", o(ARB_depth_texture), ES2, 2006 },
|
||||
{ "GL_OES_depth_texture_cube_map", o(OES_depth_texture_cube_map), ES2, 2012 },
|
||||
@@ -257,9 +257,9 @@ static const struct extension extension_table[] = {
|
||||
{ "GL_OES_EGL_image", o(OES_EGL_image), GL | ES1 | ES2, 2006 },
|
||||
{ "GL_OES_EGL_image_external", o(OES_EGL_image_external), ES1 | ES2, 2010 },
|
||||
{ "GL_OES_element_index_uint", o(dummy_true), ES1 | ES2, 2005 },
|
||||
{ "GL_OES_fbo_render_mipmap", o(EXT_framebuffer_object), ES1 | ES2, 2005 },
|
||||
{ "GL_OES_fbo_render_mipmap", o(dummy_true), ES1 | ES2, 2005 },
|
||||
{ "GL_OES_fixed_point", o(dummy_true), ES1, 2002 },
|
||||
{ "GL_OES_framebuffer_object", o(EXT_framebuffer_object), ES1, 2005 },
|
||||
{ "GL_OES_framebuffer_object", o(dummy_true), ES1, 2005 },
|
||||
{ "GL_OES_get_program_binary", o(ARB_shader_objects), ES2, 2008 },
|
||||
{ "GL_OES_mapbuffer", o(dummy_true), ES1 | ES2, 2005 },
|
||||
{ "GL_OES_matrix_get", o(dummy_true), ES1, 2004 },
|
||||
@@ -268,12 +268,12 @@ static const struct extension extension_table[] = {
|
||||
{ "GL_OES_point_sprite", o(ARB_point_sprite), ES1, 2004 },
|
||||
{ "GL_OES_query_matrix", o(dummy_true), ES1, 2003 },
|
||||
{ "GL_OES_read_format", o(dummy_true), GL | ES1, 2003 },
|
||||
{ "GL_OES_rgb8_rgba8", o(EXT_framebuffer_object), ES1 | ES2, 2005 },
|
||||
{ "GL_OES_rgb8_rgba8", o(dummy_true), ES1 | ES2, 2005 },
|
||||
{ "GL_OES_single_precision", o(dummy_true), ES1, 2003 },
|
||||
{ "GL_OES_standard_derivatives", o(OES_standard_derivatives), ES2, 2005 },
|
||||
{ "GL_OES_stencil1", o(dummy_false), DISABLE, 2005 },
|
||||
{ "GL_OES_stencil4", o(dummy_false), DISABLE, 2005 },
|
||||
{ "GL_OES_stencil8", o(EXT_framebuffer_object), ES1 | ES2, 2005 },
|
||||
{ "GL_OES_stencil8", o(dummy_true), ES1 | ES2, 2005 },
|
||||
{ "GL_OES_stencil_wrap", o(dummy_true), ES1, 2002 },
|
||||
{ "GL_OES_texture_3D", o(EXT_texture3D), ES2, 2005 },
|
||||
{ "GL_OES_texture_cube_map", o(ARB_texture_cube_map), ES1, 2007 },
|
||||
@@ -315,7 +315,7 @@ static const struct extension extension_table[] = {
|
||||
{ "GL_NV_conditional_render", o(NV_conditional_render), GL, 2008 },
|
||||
{ "GL_NV_depth_clamp", o(ARB_depth_clamp), GL, 2001 },
|
||||
{ "GL_NV_draw_buffers", o(dummy_true), ES2, 2011 },
|
||||
{ "GL_NV_fbo_color_attachments", o(EXT_framebuffer_object), ES2, 2010 },
|
||||
{ "GL_NV_fbo_color_attachments", o(dummy_true), ES2, 2010 },
|
||||
{ "GL_NV_fog_distance", o(NV_fog_distance), GLL, 2001 },
|
||||
{ "GL_NV_fragment_program_option", o(NV_fragment_program_option), GLL, 2005 },
|
||||
{ "GL_NV_light_max_exponent", o(dummy_true), GLL, 1999 },
|
||||
@@ -423,7 +423,6 @@ _mesa_enable_sw_extensions(struct gl_context *ctx)
|
||||
ctx->Extensions.EXT_depth_bounds_test = GL_TRUE;
|
||||
ctx->Extensions.EXT_draw_buffers2 = GL_TRUE;
|
||||
ctx->Extensions.EXT_fog_coord = GL_TRUE;
|
||||
ctx->Extensions.EXT_framebuffer_object = GL_TRUE;
|
||||
ctx->Extensions.EXT_framebuffer_blit = GL_TRUE;
|
||||
ctx->Extensions.EXT_packed_depth_stencil = GL_TRUE;
|
||||
ctx->Extensions.EXT_pixel_buffer_object = GL_TRUE;
|
||||
|
@@ -1909,17 +1909,10 @@ _mesa_BindFramebuffer(GLenum target, GLuint framebuffer)
|
||||
|
||||
#ifdef DEBUG
|
||||
if (ctx->Extensions.ARB_framebuffer_object) {
|
||||
ASSERT(ctx->Extensions.EXT_framebuffer_object);
|
||||
ASSERT(ctx->Extensions.EXT_framebuffer_blit);
|
||||
}
|
||||
#endif
|
||||
|
||||
if (!ctx->Extensions.EXT_framebuffer_object) {
|
||||
_mesa_error(ctx, GL_INVALID_OPERATION,
|
||||
"glBindFramebufferEXT(unsupported)");
|
||||
return;
|
||||
}
|
||||
|
||||
switch (target) {
|
||||
case GL_DRAW_FRAMEBUFFER_EXT:
|
||||
if (!ctx->Extensions.EXT_framebuffer_blit) {
|
||||
|
@@ -362,7 +362,6 @@ EXTRA_EXT(EXT_provoking_vertex);
|
||||
EXTRA_EXT(ARB_fragment_shader);
|
||||
EXTRA_EXT(ARB_fragment_program);
|
||||
EXTRA_EXT2(ARB_framebuffer_object, EXT_framebuffer_multisample);
|
||||
EXTRA_EXT(EXT_framebuffer_object);
|
||||
EXTRA_EXT(ARB_seamless_cube_map);
|
||||
EXTRA_EXT(ARB_sync);
|
||||
EXTRA_EXT(ARB_vertex_shader);
|
||||
|
@@ -107,9 +107,9 @@ descriptor=[
|
||||
[ "IMPLEMENTATION_COLOR_READ_FORMAT_OES", "LOC_CUSTOM, TYPE_INT, 0, extra_new_buffers" ],
|
||||
|
||||
# GL_EXT_framebuffer_object
|
||||
[ "FRAMEBUFFER_BINDING_EXT", "BUFFER_INT(Name), extra_EXT_framebuffer_object" ],
|
||||
[ "RENDERBUFFER_BINDING_EXT", "LOC_CUSTOM, TYPE_INT, 0, extra_EXT_framebuffer_object" ],
|
||||
[ "MAX_RENDERBUFFER_SIZE_EXT", "CONTEXT_INT(Const.MaxRenderbufferSize), extra_EXT_framebuffer_object" ],
|
||||
[ "FRAMEBUFFER_BINDING_EXT", "BUFFER_INT(Name), NO_EXTRA" ],
|
||||
[ "RENDERBUFFER_BINDING_EXT", "LOC_CUSTOM, TYPE_INT, 0, NO_EXTRA" ],
|
||||
[ "MAX_RENDERBUFFER_SIZE_EXT", "CONTEXT_INT(Const.MaxRenderbufferSize), NO_EXTRA" ],
|
||||
|
||||
# This entry isn't spec'ed for GLES 2, but is needed for Mesa's
|
||||
# GLSL:
|
||||
@@ -258,7 +258,7 @@ descriptor=[
|
||||
[ "MAX_DRAW_BUFFERS_ARB", "CONTEXT_INT(Const.MaxDrawBuffers), NO_EXTRA" ],
|
||||
|
||||
# GL_EXT_framebuffer_object / GL_NV_fbo_color_attachments
|
||||
[ "MAX_COLOR_ATTACHMENTS", "CONTEXT_INT(Const.MaxColorAttachments), extra_EXT_framebuffer_object" ],
|
||||
[ "MAX_COLOR_ATTACHMENTS", "CONTEXT_INT(Const.MaxColorAttachments), NO_EXTRA" ],
|
||||
|
||||
# GL_ARB_draw_buffers / GL_NV_draw_buffers (for ES 2.0)
|
||||
[ "DRAW_BUFFER0_ARB", "BUFFER_ENUM(ColorDrawBuffer[0]), NO_EXTRA" ],
|
||||
|
@@ -3058,7 +3058,6 @@ struct gl_extensions
|
||||
GLboolean EXT_framebuffer_blit;
|
||||
GLboolean EXT_framebuffer_multisample;
|
||||
GLboolean EXT_framebuffer_multisample_blit_scaled;
|
||||
GLboolean EXT_framebuffer_object;
|
||||
GLboolean EXT_framebuffer_sRGB;
|
||||
GLboolean EXT_gpu_program_parameters;
|
||||
GLboolean EXT_gpu_shader4;
|
||||
|
@@ -552,7 +552,6 @@ void st_init_extensions(struct st_context *st)
|
||||
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_framebuffer_object = GL_TRUE;
|
||||
ctx->Extensions.EXT_fog_coord = GL_TRUE;
|
||||
ctx->Extensions.EXT_gpu_program_parameters = GL_TRUE;
|
||||
ctx->Extensions.EXT_pixel_buffer_object = GL_TRUE;
|
||||
|
Reference in New Issue
Block a user