diff options
author | Ilia Mirkin <[email protected]> | 2014-09-24 00:58:07 -0400 |
---|---|---|
committer | Ilia Mirkin <[email protected]> | 2014-09-25 22:15:49 -0400 |
commit | 9d2e298dd4159651323cac54dbc43527e7fd6d16 (patch) | |
tree | 5759305569fcd0c6dc400d247afa96fda638b264 /src/mesa/state_tracker/st_texture.c | |
parent | fca2216cedc631eec8d41763ab20a8a404b3af91 (diff) |
mesa/st: NumLayers is only valid for array textures
For 3d textures, NumLayers is set to 1, which is not what we want. This
fixes the newly added gl-layer-render-storage test (which constructs
immutable 3d textures). Fixes regression introduced in d82bd7eb060.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=84145
Signed-off-by: Ilia Mirkin <[email protected]>
Tested-by: Michel Dänzer <[email protected]>
Acked-by: Chris Forbes <[email protected]>
Diffstat (limited to 'src/mesa/state_tracker/st_texture.c')
-rw-r--r-- | src/mesa/state_tracker/st_texture.c | 3 |
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; |