mesa/main: make use of lookup_samplerobj_locked()
authorSamuel Pitoiset <samuel.pitoiset@gmail.com>
Thu, 9 Mar 2017 09:50:14 +0000 (10:50 +0100)
committerSamuel Pitoiset <samuel.pitoiset@gmail.com>
Thu, 9 Mar 2017 10:01:37 +0000 (11:01 +0100)
There is no need to check sampler == 0 twice. This removes now
unused _mesa_lookup_samplerobj_locked().

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Matt Turner <mattst88@gmail.com>
src/mesa/main/samplerobj.c

index 5587e9eadaab59044909ae5a65a7dfc41daed400..a36563a018249b4dfcdf1f2c9c8253659c3f9db9 100644 (file)
@@ -50,16 +50,6 @@ _mesa_lookup_samplerobj(struct gl_context *ctx, GLuint name)
          _mesa_HashLookup(ctx->Shared->SamplerObjects, name);
 }
 
-static struct gl_sampler_object *
-_mesa_lookup_samplerobj_locked(struct gl_context *ctx, GLuint name)
-{
-   if (name == 0)
-      return NULL;
-   else
-      return (struct gl_sampler_object *)
-         _mesa_HashLookupLocked(ctx->Shared->SamplerObjects, name);
-}
-
 static inline struct gl_sampler_object *
 lookup_samplerobj_locked(struct gl_context *ctx, GLuint name)
 {
@@ -230,7 +220,7 @@ _mesa_DeleteSamplers(GLsizei count, const GLuint *samplers)
       if (samplers[i]) {
          GLuint j;
          struct gl_sampler_object *sampObj =
-            _mesa_lookup_samplerobj_locked(ctx, samplers[i]);
+            lookup_samplerobj_locked(ctx, samplers[i]);
    
          if (sampObj) {
             /* If the sampler is currently bound, unbind it. */