_mesa_lookup_samplerobj() returns NULL if sampler is 0. Signed-off-by: Samuel Pitoiset <samuel.pitoi...@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 _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev