[Mesa-dev] [PATCH 38/47] mesa: remove FEATURE_ARB_sampler_objects define.

Oliver McFadden oliver.mcfadden at linux.intel.com
Thu Sep 13 01:19:07 PDT 2012


Signed-off-by: Oliver McFadden <oliver.mcfadden at linux.intel.com>
---
 src/mesa/main/api_exec.c  |    4 ----
 src/mesa/main/mfeatures.h |    1 -
 src/mesa/main/shared.c    |    8 --------
 src/mesa/main/texstate.c  |    2 --
 4 files changed, 0 insertions(+), 15 deletions(-)

diff --git a/src/mesa/main/api_exec.c b/src/mesa/main/api_exec.c
index 74a74fb..76028ad 100644
--- a/src/mesa/main/api_exec.c
+++ b/src/mesa/main/api_exec.c
@@ -71,9 +71,7 @@
 #include "polygon.h"
 #include "queryobj.h"
 #include "readpix.h"
-#if FEATURE_ARB_sampler_objects
 #include "samplerobj.h"
-#endif
 #include "scissor.h"
 #include "stencil.h"
 #include "texenv.h"
@@ -873,11 +871,9 @@ _mesa_create_exec_table(struct gl_context *ctx)
    SET_TextureStorage2DEXT(exec, _mesa_TextureStorage2DEXT);
    SET_TextureStorage3DEXT(exec, _mesa_TextureStorage3DEXT);
 
-#if FEATURE_ARB_sampler_objects
    if (ctx->API != API_OPENGLES2) {
       _mesa_init_sampler_object_dispatch(exec);
    }
-#endif
 
    if (_mesa_is_desktop_gl(ctx)) {
       SET_InvalidateTexSubImage(exec, _mesa_InvalidateTexSubImage);
diff --git a/src/mesa/main/mfeatures.h b/src/mesa/main/mfeatures.h
index 30411f7..e0116c6 100644
--- a/src/mesa/main/mfeatures.h
+++ b/src/mesa/main/mfeatures.h
@@ -84,7 +84,6 @@
 #define FEATURE_remap_table               0
 #endif
 
-#define FEATURE_ARB_sampler_objects       FEATURE_GL
 #define FEATURE_ARB_sync                  FEATURE_GL
 
 #define FEATURE_EXT_framebuffer_blit      FEATURE_GL
diff --git a/src/mesa/main/shared.c b/src/mesa/main/shared.c
index e4bb830..6b23a13 100644
--- a/src/mesa/main/shared.c
+++ b/src/mesa/main/shared.c
@@ -38,9 +38,7 @@
 #include "shared.h"
 #include "program/program.h"
 #include "dlist.h"
-#if FEATURE_ARB_sampler_objects
 #include "samplerobj.h"
-#endif
 #include "shaderobj.h"
 #include "syncobj.h"
 
@@ -86,10 +84,8 @@ _mesa_alloc_shared_state(struct gl_context *ctx)
 
    shared->BufferObjects = _mesa_NewHashTable();
 
-#if FEATURE_ARB_sampler_objects
    /* GL_ARB_sampler_objects */
    shared->SamplerObjects = _mesa_NewHashTable();
-#endif
 
    /* Allocate the default buffer object */
    shared->NullBufferObj = ctx->Driver.NewBufferObject(ctx, 0, 0);
@@ -269,7 +265,6 @@ delete_renderbuffer_cb(GLuint id, void *data, void *userData)
 }
 
 
-#if FEATURE_ARB_sampler_objects
 /**
  * Callback for deleting a sampler object. Called by _mesa_HashDeleteAll()
  */
@@ -280,7 +275,6 @@ delete_sampler_object_cb(GLuint id, void *data, void *userData)
    struct gl_sampler_object *sampObj = (struct gl_sampler_object *) data;
    _mesa_reference_sampler_object(ctx, &sampObj, NULL);
 }
-#endif
 
 
 /**
@@ -347,10 +341,8 @@ free_shared_state(struct gl_context *ctx, struct gl_shared_state *shared)
       }
    }
 
-#if FEATURE_ARB_sampler_objects
    _mesa_HashDeleteAll(shared->SamplerObjects, delete_sampler_object_cb, ctx);
    _mesa_DeleteHashTable(shared->SamplerObjects);
-#endif
 
    /*
     * Free texture objects (after FBOs since some textures might have
diff --git a/src/mesa/main/texstate.c b/src/mesa/main/texstate.c
index fa1fef2..1fd09e9 100644
--- a/src/mesa/main/texstate.c
+++ b/src/mesa/main/texstate.c
@@ -841,11 +841,9 @@ _mesa_free_texture_data(struct gl_context *ctx)
    /* GL_ARB_texture_buffer_object */
    _mesa_reference_buffer_object(ctx, &ctx->Texture.BufferObject, NULL);
 
-#if FEATURE_sampler_objects
    for (u = 0; u < Elements(ctx->Texture.Unit); u++) {
       _mesa_reference_sampler_object(ctx, &ctx->Texture.Unit[u].Sampler, NULL);
    }
-#endif
 }
 
 
-- 
1.7.8.6



More information about the mesa-dev mailing list