From: Henri Verbeet Date: Sun, 3 Jul 2011 22:57:43 +0000 (+0200) Subject: mesa: Fix the BindSampler unit limit. X-Git-Tag: mesa-8.0-rc1~2830 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=e01e30b916dcbe01471a573ecaddb509cb9f0969;p=platform%2Fupstream%2Fmesa.git mesa: Fix the BindSampler unit limit. I'm not sure about this one. The current code actually follows the spec, but considering the spec is supposed to be written against GL 3.2 I'd say the spec is broken. I filled out a spec feedback form over a month ago, but either the form is broken, or nobody cares. Signed-off-by: Henri Verbeet Reviewed-by: Brian Paul Reviewed-by: Ian Romanick --- diff --git a/src/mesa/main/samplerobj.c b/src/mesa/main/samplerobj.c index f7774fd..8f8d87b 100644 --- a/src/mesa/main/samplerobj.c +++ b/src/mesa/main/samplerobj.c @@ -251,7 +251,7 @@ _mesa_BindSampler(GLuint unit, GLuint sampler) struct gl_sampler_object *sampObj; GET_CURRENT_CONTEXT(ctx); - if (unit >= ctx->Const.MaxTextureImageUnits) { + if (unit >= ctx->Const.MaxCombinedTextureImageUnits) { _mesa_error(ctx, GL_INVALID_VALUE, "glBindSampler(unit %u)", unit); return; }