diff options
author | Samuel Pitoiset <[email protected]> | 2017-03-09 10:50:14 +0100 |
---|---|---|
committer | Samuel Pitoiset <[email protected]> | 2017-03-09 11:01:37 +0100 |
commit | d54b4986946c306e7efb91cdc54227dfe3c90895 (patch) | |
tree | 609e6a65a2ae6103bc9c658addabebd70f6f464f | |
parent | 58b4ae0411c3149e865b02bc0992d4d10ae6d5a8 (diff) |
mesa/main: make use of lookup_samplerobj_locked()
There is no need to check sampler == 0 twice. This removes now
unused _mesa_lookup_samplerobj_locked().
Signed-off-by: Samuel Pitoiset <[email protected]>
Reviewed-by: Matt Turner <[email protected]>
-rw-r--r-- | src/mesa/main/samplerobj.c | 12 |
1 files changed, 1 insertions, 11 deletions
diff --git a/src/mesa/main/samplerobj.c b/src/mesa/main/samplerobj.c index 5587e9eadaa..a36563a0182 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) { @@ -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. */ |