mesa: Fix MaxNumLayers for 1D array textures.
authorKenneth Graunke <kenneth@whitecape.org>
Wed, 7 May 2014 21:35:42 +0000 (14:35 -0700)
committerKenneth Graunke <kenneth@whitecape.org>
Thu, 8 May 2014 06:42:11 +0000 (23:42 -0700)
1D array targets store the number of slices in the Height field.

Cc: "10.2 10.1 10.0" <mesa-stable@lists.freedesktop.org>
Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
src/mesa/main/fbobject.c

index ca16ae1ec7e0fb11c8d74b6002b382f98ccf8345..97538bc7b293106ba38561a01b21d85fe2045029 100644 (file)
@@ -1058,6 +1058,8 @@ _mesa_test_framebuffer_completeness(struct gl_context *ctx,
       if (att->Layered) {
          if (att_tex_target == GL_TEXTURE_CUBE_MAP)
             att_layer_count = 6;
+         else if (att_tex_target == GL_TEXTURE_1D_ARRAY)
+            att_layer_count = att->Renderbuffer->Height;
          else
             att_layer_count = att->Renderbuffer->Depth;
       } else {