i965/miptree/isl: Stop multiplying depth by 6 for cubes
authorJason Ekstrand <jason.ekstrand@intel.com>
Wed, 20 Jul 2016 15:22:53 +0000 (08:22 -0700)
committerJason Ekstrand <jason.ekstrand@intel.com>
Tue, 26 Jul 2016 14:58:44 +0000 (07:58 -0700)
Now that the logical_depth0 field is in number of 2D slices, we don't need
to be multiplying by 6 when creating the surface.  It wasn't hurting
anything primarily because we get the actual length from the view which was
already handling it correctly.

Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com>
src/mesa/drivers/dri/i965/intel_mipmap_tree.c

index 1e03f7ef26d6aba582901d50d15bf5c1b0e29678..c8e84b71d922239bc9f28a753a8f0a8dc35000b0 100644 (file)
@@ -3102,11 +3102,6 @@ intel_miptree_get_isl_surf(struct brw_context *brw,
    if (surf->dim == ISL_SURF_DIM_3D) {
       surf->logical_level0_px.depth = mt->logical_depth0;
       surf->logical_level0_px.array_len = 1;
-   } else if (mt->target == GL_TEXTURE_CUBE_MAP ||
-              mt->target == GL_TEXTURE_CUBE_MAP_ARRAY) {
-      /* For cube maps, mt->logical_depth0 is in number of cubes */
-      surf->logical_level0_px.depth = 1;
-      surf->logical_level0_px.array_len = mt->logical_depth0 * 6;
    } else {
       surf->logical_level0_px.depth = 1;
       surf->logical_level0_px.array_len = mt->logical_depth0;