i965: Set Ivybridge's is_array SURFACE_STATE bit.
authorKenneth Graunke <kenneth@whitecape.org>
Wed, 7 Dec 2011 20:34:28 +0000 (12:34 -0800)
committerKenneth Graunke <kenneth@whitecape.org>
Wed, 7 Dec 2011 22:51:12 +0000 (14:51 -0800)
Fixes piglit tests fbo-array, fbo-depth-array, fbo-generatemipmap-array,
and array-texture, as well as the array variants of my new textureSize
and texelFetch tests.

Not a candidate for 7.11 because EXT_texture_array wasn't supported.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Eric Anholt <eric@anholt.net>
src/mesa/drivers/dri/i965/gen7_wm_surface_state.c

index d20bdb5bfe300606e87b1afaff55768c0c1f4de0..0defa676bd51a21c59411ba1ef377287ed034971 100644 (file)
@@ -89,10 +89,11 @@ gen7_update_texture_surface(struct gl_context *ctx, GLuint unit)
       surf->ss0.cube_neg_z = 1;
    }
 
+   surf->ss0.is_array = depth > 1 && tObj->Target != GL_TEXTURE_3D;
+
    gen7_set_surface_tiling(surf, intelObj->mt->region->tiling);
 
    /* ss0 remaining fields:
-    * - is_array
     * - vertical_alignment
     * - horizontal_alignment
     * - vert_line_stride (exists on gen6 but we ignore it)