Mesa (master): mesa: Fix the BindSampler unit limit.

Henri Verbeet hverbeet at kemper.freedesktop.org
Thu Jul 7 18:31:06 UTC 2011


Module: Mesa
Branch: master
Commit: e01e30b916dcbe01471a573ecaddb509cb9f0969
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=e01e30b916dcbe01471a573ecaddb509cb9f0969

Author: Henri Verbeet <hverbeet at gmail.com>
Date:   Mon Jul  4 00:57:43 2011 +0200

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 <hverbeet at gmail.com>
Reviewed-by: Brian Paul <brianp at vmware.com>
Reviewed-by: Ian Romanick <ian.d.romanick at intel.com>

---

 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;
    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;
    }




More information about the mesa-commit mailing list