There is no need to check sampler == 0 twice. This removes now unused _mesa_lookup_samplerobj_locked().
Signed-off-by: Samuel Pitoiset <samuel.pitoi...@gmail.com> --- src/mesa/main/samplerobj.c | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/src/mesa/main/samplerobj.c b/src/mesa/main/samplerobj.c index 95d3d5933f..979edc3bc2 100644 --- a/src/mesa/main/samplerobj.c +++ b/src/mesa/main/samplerobj.c @@ -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) { @@ -231,7 +221,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. */ -- 2.12.0 _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev