summaryrefslogtreecommitdiffstats
path: root/src/mesa/main/texobj.c
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2009-10-02 09:55:07 -0600
committerBrian Paul <[email protected]>2009-10-02 09:57:00 -0600
commite1bddd159f364fa04ddec22f568fbfeb775d3b47 (patch)
treef1e76621ef0fb2061813a59d472e17cc6e3e4417 /src/mesa/main/texobj.c
parent85ee0ef9a72e4ffd6ed0a2442b1272a43508d257 (diff)
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.
Diffstat (limited to 'src/mesa/main/texobj.c')
-rw-r--r--src/mesa/main/texobj.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/mesa/main/texobj.c b/src/mesa/main/texobj.c
index d09c4392506..da55ac8697d 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;
}