gallium/ddebug: new pipe for hang detection and driver state dumping (v2)
[mesa.git] / src / gallium / drivers / softpipe / sp_texture.c
index c2df71e41a520af50882868398cf7b5df33aeaac..e1ea5df24ca420a1dbe836cf8a9ae597c855c2dc 100644 (file)
@@ -68,8 +68,9 @@ softpipe_resource_layout(struct pipe_screen *screen,
       nblocksy = util_format_get_nblocksy(pt->format, height);
 
       if (pt->target == PIPE_TEXTURE_CUBE)
-         slices = 6;
-      else if (pt->target == PIPE_TEXTURE_3D)
+         assert(pt->array_size == 6);
+
+      if (pt->target == PIPE_TEXTURE_3D)
          slices = depth;
       else
          slices = pt->array_size;