summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSamuel Pitoiset <[email protected]>2017-03-01 22:53:52 +0100
committerSamuel Pitoiset <[email protected]>2017-03-06 18:01:38 +0100
commit052c81faa1147ab758dc4430e4483c7d9fc5fe25 (patch)
tree0ac8ff94825f1a9605f1d7dee5853f3176602868
parent5ae54c0cf7acfb792d2ca9b22cd5fb5ba811d32c (diff)
mesa/main: remove useless check in _mesa_IsSampler()
_mesa_lookup_samplerobj() returns NULL if sampler is 0. v2: use _mesa_lookup...(...) != NULL Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
-rw-r--r--src/mesa/main/samplerobj.c8
1 files changed, 1 insertions, 7 deletions
diff --git a/src/mesa/main/samplerobj.c b/src/mesa/main/samplerobj.c
index 8a0835a23d5..2baa016cd40 100644
--- a/src/mesa/main/samplerobj.c
+++ b/src/mesa/main/samplerobj.c
@@ -270,17 +270,11 @@ _mesa_DeleteSamplers(GLsizei count, const GLuint *samplers)
GLboolean GLAPIENTRY
_mesa_IsSampler(GLuint sampler)
{
- struct gl_sampler_object *sampObj;
GET_CURRENT_CONTEXT(ctx);
ASSERT_OUTSIDE_BEGIN_END_WITH_RETVAL(ctx, GL_FALSE);
- if (sampler == 0)
- return GL_FALSE;
-
- sampObj = _mesa_lookup_samplerobj(ctx, sampler);
-
- return sampObj != NULL;
+ return _mesa_lookup_samplerobj(ctx, sampler) != NULL;
}
void