i965/blorp/gen8: Stop multiplying depth by 6 for cubes
authorJason Ekstrand <jason.ekstrand@intel.com>
Sat, 23 Jul 2016 02:53:59 +0000 (19:53 -0700)
committerJason Ekstrand <jason.ekstrand@intel.com>
Tue, 26 Jul 2016 14:58:44 +0000 (07:58 -0700)
intel_mipmap_tree::logical_depth0 is now in 2-D slices so there is no need
for us to multiply by 6 when we go to fill out a blorp surface state.

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

index 870b67ff0b90b128efeac0b48df8699256c018a1..ab9b7472eaf1337b0931fa5e8a9146c3f02d99e7 100644 (file)
@@ -526,9 +526,6 @@ gen8_blorp_emit_surface_states(struct brw_context *brw,
           mt->msaa_layout == INTEL_MSAA_LAYOUT_CMS) ?
          MAX2(mt->num_samples, 1) : 1;
 
-      const bool is_cube = mt->target == GL_TEXTURE_CUBE_MAP_ARRAY ||
-                           mt->target == GL_TEXTURE_CUBE_MAP;
-      const unsigned depth = (is_cube ? 6 : 1) * mt->logical_depth0;
       const unsigned layer = mt->target != GL_TEXTURE_3D ?
                                 surface->layer / layer_divider : 0;
 
@@ -537,7 +534,7 @@ gen8_blorp_emit_surface_states(struct brw_context *brw,
          .base_level = surface->level,
          .levels = mt->last_level - surface->level + 1,
          .base_array_layer = layer,
-         .array_len = depth - layer,
+         .array_len = mt->logical_depth0 - layer,
          .channel_select = {
             swizzle_to_scs(GET_SWZ(surface->swizzle, 0)),
             swizzle_to_scs(GET_SWZ(surface->swizzle, 1)),