diff options
author | Ilia Mirkin <imirkin@alum.mit.edu> | 2014-09-24 00:58:07 -0400 |
---|---|---|
committer | Ilia Mirkin <imirkin@alum.mit.edu> | 2014-09-25 22:15:49 -0400 |
commit | 9d2e298dd4159651323cac54dbc43527e7fd6d16 (patch) | |
tree | 5759305569fcd0c6dc400d247afa96fda638b264 /src/mesa/state_tracker/st_cb_fbo.c | |
parent | fca2216cedc631eec8d41763ab20a8a404b3af91 (diff) | |
download | external_mesa3d-9d2e298dd4159651323cac54dbc43527e7fd6d16.zip external_mesa3d-9d2e298dd4159651323cac54dbc43527e7fd6d16.tar.gz external_mesa3d-9d2e298dd4159651323cac54dbc43527e7fd6d16.tar.bz2 |
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 <imirkin@alum.mit.edu>
Tested-by: Michel Dänzer <michel.daenzer@amd.com>
Acked-by: Chris Forbes <chrisf@ijw.co.nz>
Diffstat (limited to 'src/mesa/state_tracker/st_cb_fbo.c')
-rw-r--r-- | src/mesa/state_tracker/st_cb_fbo.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/mesa/state_tracker/st_cb_fbo.c b/src/mesa/state_tracker/st_cb_fbo.c index 470ab27..7b6a444 100644 --- a/src/mesa/state_tracker/st_cb_fbo.c +++ b/src/mesa/state_tracker/st_cb_fbo.c @@ -451,7 +451,8 @@ st_update_renderbuffer_surface(struct st_context *st, } /* Adjust for texture views */ - if (strb->is_rtt) { + if (strb->is_rtt && resource->array_size > 1 && + strb->Base.TexImage->TexObject->Immutable) { struct gl_texture_object *tex = strb->Base.TexImage->TexObject; first_layer += tex->MinLayer; if (!strb->rtt_layered) |