Mesa (main): mesa/dd: remove NewSamplerObject

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Mon Dec 6 06:50:58 UTC 2021


Module: Mesa
Branch: main
Commit: 86bbd14b8eafcf4c96fa29f0faecd3870388bd5d
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=86bbd14b8eafcf4c96fa29f0faecd3870388bd5d

Author: Dave Airlie <airlied at redhat.com>
Date:   Mon Dec  6 15:49:49 2021 +1000

mesa/dd: remove NewSamplerObject

This was always calling directly into the mesa version now

Reviewed-by: Timothy Arceri <tarceri at itsqueeze.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14074>

---

 src/mesa/main/dd.h                  |  7 +------
 src/mesa/main/samplerobj.c          | 14 ++------------
 src/mesa/main/samplerobj.h          |  6 ------
 src/mesa/state_tracker/st_context.c |  3 ---
 4 files changed, 3 insertions(+), 27 deletions(-)

diff --git a/src/mesa/main/dd.h b/src/mesa/main/dd.h
index a6e4dd35d0c..fd1da24a9a9 100644
--- a/src/mesa/main/dd.h
+++ b/src/mesa/main/dd.h
@@ -59,6 +59,7 @@ struct gl_shader_program;
 struct gl_texture_image;
 struct gl_texture_object;
 struct gl_memory_info;
+struct gl_sampler_object;
 struct gl_transform_feedback_object;
 struct gl_vertex_array_object;
 struct ati_fragment_shader;
@@ -982,12 +983,6 @@ struct dd_function_table {
     */
    void (*TextureBarrier)(struct gl_context *ctx);
 
-   /**
-    * \name GL_ARB_sampler_objects
-    */
-   struct gl_sampler_object * (*NewSamplerObject)(struct gl_context *ctx,
-                                                  GLuint name);
-
    /**
     * \name Return a timestamp in nanoseconds as defined by GL_ARB_timer_query.
     * This should be equivalent to glGetInteger64v(GL_TIMESTAMP);
diff --git a/src/mesa/main/samplerobj.c b/src/mesa/main/samplerobj.c
index e3c22841fca..556aab6e19c 100644
--- a/src/mesa/main/samplerobj.c
+++ b/src/mesa/main/samplerobj.c
@@ -156,10 +156,7 @@ _mesa_init_sampler_object(struct gl_sampler_object *sampObj, GLuint name)
    _mesa_init_sampler_handles(sampObj);
 }
 
-/**
- * Fallback for ctx->Driver.NewSamplerObject();
- */
-struct gl_sampler_object *
+static struct gl_sampler_object *
 _mesa_new_sampler_object(struct gl_context *ctx, GLuint name)
 {
    struct gl_sampler_object *sampObj = CALLOC_STRUCT(gl_sampler_object);
@@ -186,7 +183,7 @@ create_samplers(struct gl_context *ctx, GLsizei count, GLuint *samplers,
    for (i = 0; i < count; i++) {
       struct gl_sampler_object *sampObj;
 
-      sampObj = ctx->Driver.NewSamplerObject(ctx, samplers[i]);
+      sampObj = _mesa_new_sampler_object(ctx, samplers[i]);
       if (!sampObj) {
          _mesa_HashUnlockMutex(ctx->Shared->SamplerObjects);
          _mesa_error(ctx, GL_OUT_OF_MEMORY, "%s", caller);
@@ -1817,10 +1814,3 @@ invalid_pname:
    _mesa_error(ctx, GL_INVALID_ENUM, "glGetSamplerParameterIuiv(pname=%s)",
                _mesa_enum_to_string(pname));
 }
-
-
-void
-_mesa_init_sampler_object_functions(struct dd_function_table *driver)
-{
-   driver->NewSamplerObject = _mesa_new_sampler_object;
-}
diff --git a/src/mesa/main/samplerobj.h b/src/mesa/main/samplerobj.h
index bf014ce623e..54b5677b407 100644
--- a/src/mesa/main/samplerobj.h
+++ b/src/mesa/main/samplerobj.h
@@ -72,12 +72,6 @@ _mesa_reference_sampler_object(struct gl_context *ctx,
 extern struct gl_sampler_object *
 _mesa_lookup_samplerobj(struct gl_context *ctx, GLuint name);
 
-extern struct gl_sampler_object *
-_mesa_new_sampler_object(struct gl_context *ctx, GLuint name);
-
-extern void
-_mesa_init_sampler_object_functions(struct dd_function_table *driver);
-
 extern void
 _mesa_set_sampler_wrap(struct gl_context *ctx, struct gl_sampler_object *samp,
                        GLenum s, GLenum t, GLenum r);
diff --git a/src/mesa/state_tracker/st_context.c b/src/mesa/state_tracker/st_context.c
index 16cdac1737e..d9ec9c686a1 100644
--- a/src/mesa/state_tracker/st_context.c
+++ b/src/mesa/state_tracker/st_context.c
@@ -31,7 +31,6 @@
 #include "main/context.h"
 #include "main/debug_output.h"
 #include "main/glthread.h"
-#include "main/samplerobj.h"
 #include "main/shaderobj.h"
 #include "main/state.h"
 #include "main/version.h"
@@ -968,8 +967,6 @@ st_init_driver_functions(struct pipe_screen *screen,
                          struct dd_function_table *functions,
                          bool has_egl_image_validate)
 {
-   _mesa_init_sampler_object_functions(functions);
-
    st_init_draw_functions(screen, functions);
    st_init_blit_functions(functions);
    st_init_bufferobject_functions(screen, functions);



More information about the mesa-commit mailing list