summaryrefslogtreecommitdiffstats
path: root/src/mesa/main/textureview.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa/main/textureview.c')
-rw-r--r--src/mesa/main/textureview.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/mesa/main/textureview.c b/src/mesa/main/textureview.c
index 5a3282a40c1..04b7d73da5c 100644
--- a/src/mesa/main/textureview.c
+++ b/src/mesa/main/textureview.c
@@ -681,6 +681,8 @@ _mesa_TextureView(GLuint texture, GLenum target, GLuint origtexture,
texObj->Immutable = GL_TRUE;
texObj->ImmutableLevels = origTexObj->ImmutableLevels;
texObj->Target = target;
+ texObj->TargetIndex = _mesa_tex_target_to_index(ctx, target);
+ assert(texObj->TargetIndex < NUM_TEXTURE_TARGETS);
if (ctx->Driver.TextureView != NULL &&
!ctx->Driver.TextureView(ctx, texObj, origTexObj)) {