[Mesa-dev] [PATCH 5/5] mesa: Fix the BindSampler unit limit.

Henri Verbeet hverbeet at gmail.com
Sun Jul 3 16:00:29 PDT 2011

This is included for completeness, but 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.
 src/mesa/main/samplerobj.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

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;
-   if (unit >= ctx->Const.MaxTextureImageUnits) {
+   if (unit >= ctx->Const.MaxCombinedTextureImageUnits) {
       _mesa_error(ctx, GL_INVALID_VALUE, "glBindSampler(unit %u)", unit);

More information about the mesa-dev mailing list