summaryrefslogtreecommitdiffstats
path: root/src/mesa/state_tracker/st_texture.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa/state_tracker/st_texture.c')
-rw-r--r--src/mesa/state_tracker/st_texture.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/mesa/state_tracker/st_texture.c b/src/mesa/state_tracker/st_texture.c
index c84aa4566b2..2cd95ecdfa4 100644
--- a/src/mesa/state_tracker/st_texture.c
+++ b/src/mesa/state_tracker/st_texture.c
@@ -263,7 +263,8 @@ st_texture_image_map(struct st_context *st, struct st_texture_image *stImage,
if (stObj->base.Immutable) {
level += stObj->base.MinLevel;
z += stObj->base.MinLayer;
- d = MIN2(d, stObj->base.NumLayers);
+ if (stObj->pt->array_size > 1)
+ d = MIN2(d, stObj->base.NumLayers);
}
z += stImage->base.Face;