[Mesa-dev] [PATCH] mesa/main: remove useless check in _mesa_IsSampler()
Samuel Pitoiset
samuel.pitoiset at gmail.com
Wed Mar 1 21:53:52 UTC 2017
_mesa_lookup_samplerobj() returns NULL if sampler is 0.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset at gmail.com>
---
src/mesa/main/samplerobj.c | 8 +-------
1 file changed, 1 insertion(+), 7 deletions(-)
diff --git a/src/mesa/main/samplerobj.c b/src/mesa/main/samplerobj.c
index 8a0835a23d..a86e1d62d8 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);
}
void
--
2.12.0
More information about the mesa-dev
mailing list