Mesa (mesa_7_6_branch): mesa: fix incorrect default texture binding in unbind_texobj_from_texunits()

Brian Paul brianp at kemper.freedesktop.org
Fri Oct 2 15:58:27 UTC 2009


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

Author: Brian Paul <brianp at vmware.com>
Date:   Fri Oct  2 09:55:07 2009 -0600

mesa: fix incorrect default texture binding in unbind_texobj_from_texunits()

If we deleted a currently bound texture, we were always reverting the texture
binding to the default 1D texture rather than the proper default texture.

---

 src/mesa/main/texobj.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/src/mesa/main/texobj.c b/src/mesa/main/texobj.c
index d09c439..da55ac8 100644
--- a/src/mesa/main/texobj.c
+++ b/src/mesa/main/texobj.c
@@ -863,7 +863,7 @@ unbind_texobj_from_texunits(GLcontext *ctx, struct gl_texture_object *texObj)
       for (tex = 0; tex < NUM_TEXTURE_TARGETS; tex++) {
          if (texObj == unit->CurrentTex[tex]) {
             _mesa_reference_texobj(&unit->CurrentTex[tex],
-                                   ctx->Shared->DefaultTex[TEXTURE_1D_INDEX]);
+                                   ctx->Shared->DefaultTex[tex]);
             ASSERT(unit->CurrentTex[tex]);
             break;
          }




More information about the mesa-commit mailing list