[Mesa-dev] [PATCH 27/45] mesa: remove FEATURE_EXT_framebuffer_object define.

Oliver McFadden oliver.mcfadden at linux.intel.com
Tue Sep 11 02:56:40 PDT 2012


Signed-off-by: Oliver McFadden <oliver.mcfadden at linux.intel.com>
---
 src/mesa/drivers/dri/nouveau/nouveau_fbo.c |    2 --
 src/mesa/drivers/dri/radeon/radeon_fbo.c   |    2 --
 src/mesa/main/api_exec.c                   |    6 ------
 src/mesa/main/context.c                    |    2 --
 src/mesa/main/dlist.c                      |    2 --
 src/mesa/main/extensions.c                 |    2 --
 src/mesa/main/mfeatures.h                  |    3 +--
 src/mesa/main/shared.c                     |    4 ----
 src/mesa/state_tracker/st_cb_fbo.c         |    2 --
 9 files changed, 1 insertions(+), 24 deletions(-)

diff --git a/src/mesa/drivers/dri/nouveau/nouveau_fbo.c b/src/mesa/drivers/dri/nouveau/nouveau_fbo.c
index 3be958b..c3e2341 100644
--- a/src/mesa/drivers/dri/nouveau/nouveau_fbo.c
+++ b/src/mesa/drivers/dri/nouveau/nouveau_fbo.c
@@ -301,7 +301,6 @@ nouveau_finish_render_texture(struct gl_context *ctx,
 void
 nouveau_fbo_functions_init(struct dd_function_table *functions)
 {
-#if FEATURE_EXT_framebuffer_object
 	functions->NewFramebuffer = nouveau_framebuffer_new;
 	functions->NewRenderbuffer = nouveau_renderbuffer_new;
 	functions->MapRenderbuffer = nouveau_renderbuffer_map;
@@ -310,5 +309,4 @@ nouveau_fbo_functions_init(struct dd_function_table *functions)
 	functions->FramebufferRenderbuffer = nouveau_framebuffer_renderbuffer;
 	functions->RenderTexture = nouveau_render_texture;
 	functions->FinishRenderTexture = nouveau_finish_render_texture;
-#endif
 }
diff --git a/src/mesa/drivers/dri/radeon/radeon_fbo.c b/src/mesa/drivers/dri/radeon/radeon_fbo.c
index 2267a10..2d99416 100644
--- a/src/mesa/drivers/dri/radeon/radeon_fbo.c
+++ b/src/mesa/drivers/dri/radeon/radeon_fbo.c
@@ -946,7 +946,6 @@ radeon_validate_framebuffer(struct gl_context *ctx, struct gl_framebuffer *fb)
 
 void radeon_fbo_init(struct radeon_context *radeon)
 {
-#if FEATURE_EXT_framebuffer_object
   radeon->glCtx->Driver.NewFramebuffer = radeon_new_framebuffer;
   radeon->glCtx->Driver.NewRenderbuffer = radeon_new_renderbuffer;
   radeon->glCtx->Driver.MapRenderbuffer = radeon_map_renderbuffer;
@@ -957,7 +956,6 @@ void radeon_fbo_init(struct radeon_context *radeon)
   radeon->glCtx->Driver.FinishRenderTexture = radeon_finish_render_texture;
   radeon->glCtx->Driver.ResizeBuffers = radeon_resize_buffers;
   radeon->glCtx->Driver.ValidateFramebuffer = radeon_validate_framebuffer;
-#endif
 #if FEATURE_EXT_framebuffer_blit
   radeon->glCtx->Driver.BlitFramebuffer = _mesa_meta_BlitFramebuffer;
 #endif
diff --git a/src/mesa/main/api_exec.c b/src/mesa/main/api_exec.c
index 3bb8c93..44c6580 100644
--- a/src/mesa/main/api_exec.c
+++ b/src/mesa/main/api_exec.c
@@ -60,9 +60,7 @@
 #include "get.h"
 #include "feedback.h"
 #include "fog.h"
-#if FEATURE_EXT_framebuffer_object
 #include "fbobject.h"
-#endif
 #include "framebuffer.h"
 #include "hint.h"
 #include "histogram.h"
@@ -734,7 +732,6 @@ _mesa_create_exec_table(struct gl_context *ctx)
       SET_TexBumpParameterfvATI(exec, _mesa_TexBumpParameterfvATI);
    }
 
-#if FEATURE_EXT_framebuffer_object
    SET_IsRenderbufferEXT(exec, _mesa_IsRenderbufferEXT);
    SET_BindRenderbufferEXT(exec, _mesa_BindRenderbufferEXT);
    SET_DeleteRenderbuffersEXT(exec, _mesa_DeleteRenderbuffersEXT);
@@ -754,7 +751,6 @@ _mesa_create_exec_table(struct gl_context *ctx)
    SET_FramebufferRenderbufferEXT(exec, _mesa_FramebufferRenderbufferEXT);
    SET_GetFramebufferAttachmentParameterivEXT(exec, _mesa_GetFramebufferAttachmentParameterivEXT);
    SET_GenerateMipmapEXT(exec, _mesa_GenerateMipmapEXT);
-#endif
 
 #if FEATURE_EXT_framebuffer_blit
    if (ctx->API != API_OPENGLES2) {
@@ -771,11 +767,9 @@ _mesa_create_exec_table(struct gl_context *ctx)
 #endif
 
    /* GL_MESA_texture_array / GL_EXT_texture_array */
-#if FEATURE_EXT_framebuffer_object
    if (ctx->API != API_OPENGLES2) {
       SET_FramebufferTextureLayerEXT(exec, _mesa_FramebufferTextureLayerEXT);
    }
-#endif
 
    /* GL_ATI_separate_stencil */
    if (ctx->API == API_OPENGL) {
diff --git a/src/mesa/main/context.c b/src/mesa/main/context.c
index 515e1f1..6a37099 100644
--- a/src/mesa/main/context.c
+++ b/src/mesa/main/context.c
@@ -615,10 +615,8 @@ _mesa_init_constants(struct gl_context *ctx)
    /* GL_ARB_draw_buffers */
    ctx->Const.MaxDrawBuffers = MAX_DRAW_BUFFERS;
 
-#if FEATURE_EXT_framebuffer_object
    ctx->Const.MaxColorAttachments = MAX_COLOR_ATTACHMENTS;
    ctx->Const.MaxRenderbufferSize = MAX_RENDERBUFFER_SIZE;
-#endif
 
    ctx->Const.MaxVertexTextureImageUnits = MAX_VERTEX_TEXTURE_IMAGE_UNITS;
    ctx->Const.MaxCombinedTextureImageUnits = MAX_COMBINED_TEXTURE_IMAGE_UNITS;
diff --git a/src/mesa/main/dlist.c b/src/mesa/main/dlist.c
index 1d192a7..b162f9b 100644
--- a/src/mesa/main/dlist.c
+++ b/src/mesa/main/dlist.c
@@ -46,9 +46,7 @@
 #include "dlist.h"
 #include "enums.h"
 #include "eval.h"
-#if FEATURE_EXT_framebuffer_object
 #include "fbobject.h"
-#endif
 #include "framebuffer.h"
 #include "glapi/glapi.h"
 #include "glformats.h"
diff --git a/src/mesa/main/extensions.c b/src/mesa/main/extensions.c
index 56d83acb..92cba41 100644
--- a/src/mesa/main/extensions.c
+++ b/src/mesa/main/extensions.c
@@ -458,9 +458,7 @@ _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;
-#if FEATURE_EXT_framebuffer_object
    ctx->Extensions.EXT_framebuffer_object = GL_TRUE;
-#endif
 #if FEATURE_EXT_framebuffer_blit
    ctx->Extensions.EXT_framebuffer_blit = GL_TRUE;
 #endif
diff --git a/src/mesa/main/mfeatures.h b/src/mesa/main/mfeatures.h
index e0a40a6..54446b5 100644
--- a/src/mesa/main/mfeatures.h
+++ b/src/mesa/main/mfeatures.h
@@ -87,14 +87,13 @@
 #define FEATURE_ARB_fragment_program      1
 #define FEATURE_ARB_vertex_program        1
 
-#define FEATURE_ARB_framebuffer_object    (FEATURE_GL && FEATURE_EXT_framebuffer_object)
+#define FEATURE_ARB_framebuffer_object    FEATURE_GL
 #define FEATURE_ARB_map_buffer_range      FEATURE_GL
 #define FEATURE_ARB_pixel_buffer_object   (FEATURE_GL && FEATURE_EXT_pixel_buffer_object)
 #define FEATURE_ARB_sampler_objects       FEATURE_GL
 #define FEATURE_ARB_sync                  FEATURE_GL
 
 #define FEATURE_EXT_framebuffer_blit      FEATURE_GL
-#define FEATURE_EXT_framebuffer_object    1
 #define FEATURE_EXT_pixel_buffer_object   1
 #define FEATURE_EXT_texture_sRGB          FEATURE_GL
 #define FEATURE_EXT_transform_feedback    FEATURE_GL
diff --git a/src/mesa/main/shared.c b/src/mesa/main/shared.c
index f8d6645..d1443e9 100644
--- a/src/mesa/main/shared.c
+++ b/src/mesa/main/shared.c
@@ -124,10 +124,8 @@ _mesa_alloc_shared_state(struct gl_context *ctx)
    _glthread_INIT_MUTEX(shared->TexMutex);
    shared->TextureStateStamp = 0;
 
-#if FEATURE_EXT_framebuffer_object
    shared->FrameBuffers = _mesa_NewHashTable();
    shared->RenderBuffers = _mesa_NewHashTable();
-#endif
 
    make_empty_list(& shared->SyncObjects);
 
@@ -343,12 +341,10 @@ free_shared_state(struct gl_context *ctx, struct gl_shared_state *shared)
    _mesa_HashDeleteAll(shared->BufferObjects, delete_bufferobj_cb, ctx);
    _mesa_DeleteHashTable(shared->BufferObjects);
 
-#if FEATURE_EXT_framebuffer_object
    _mesa_HashDeleteAll(shared->FrameBuffers, delete_framebuffer_cb, ctx);
    _mesa_DeleteHashTable(shared->FrameBuffers);
    _mesa_HashDeleteAll(shared->RenderBuffers, delete_renderbuffer_cb, ctx);
    _mesa_DeleteHashTable(shared->RenderBuffers);
-#endif
 
    _mesa_reference_buffer_object(ctx, &shared->NullBufferObj, NULL);
 
diff --git a/src/mesa/state_tracker/st_cb_fbo.c b/src/mesa/state_tracker/st_cb_fbo.c
index 01aba8e..c523795 100644
--- a/src/mesa/state_tracker/st_cb_fbo.c
+++ b/src/mesa/state_tracker/st_cb_fbo.c
@@ -790,7 +790,6 @@ st_UnmapRenderbuffer(struct gl_context *ctx,
 
 void st_init_fbo_functions(struct dd_function_table *functions)
 {
-#if FEATURE_EXT_framebuffer_object
    functions->NewFramebuffer = st_new_framebuffer;
    functions->NewRenderbuffer = st_new_renderbuffer;
    functions->BindFramebuffer = st_bind_framebuffer;
@@ -798,7 +797,6 @@ void st_init_fbo_functions(struct dd_function_table *functions)
    functions->RenderTexture = st_render_texture;
    functions->FinishRenderTexture = st_finish_render_texture;
    functions->ValidateFramebuffer = st_validate_framebuffer;
-#endif
 
    functions->DrawBuffers = st_DrawBuffers;
    functions->ReadBuffer = st_ReadBuffer;
-- 
1.7.8.6



More information about the mesa-dev mailing list