nv50: fix bogus error message about 3d surfaces
[mesa.git] / src / gallium / drivers / nv50 / nv50_miptree.c
index fcb9ca3e7ac0caa249cf63a7c5daf8540ed25b8e..bc81604508b3a92cc62b3d2daabef0695fdd8e5a 100644 (file)
@@ -27,7 +27,6 @@
 
 #include "nv50_context.h"
 #include "nv50_resource.h"
-#include "nv50_transfer.h"
 
 static INLINE uint32_t
 nv50_tex_choose_tile_dims(unsigned nx, unsigned ny, unsigned nz)
@@ -410,7 +409,9 @@ nv50_miptree_surface_new(struct pipe_context *pipe,
       if (mt->layout_3d) {
          ns->offset += nv50_mt_zslice_offset(mt, l, z);
 
-         if (z & (NV50_TILE_SIZE_Z(mt->level[l].tile_mode) - 1))
+         /* TODO: switch to depth 1 tiles; but actually this shouldn't happen */
+         if (ns->depth > 1 &&
+             (z & (NV50_TILE_SIZE_Z(mt->level[l].tile_mode) - 1)))
             NOUVEAU_ERR("Creating unsupported 3D surface !\n");
       } else {
          ns->offset += mt->layer_stride * z;