gen8/state: Divide depth by 6 for cube maps for GEN8
authorJason Ekstrand <jason.ekstrand@intel.com>
Sat, 23 Jan 2016 00:13:36 +0000 (16:13 -0800)
committerJason Ekstrand <jason.ekstrand@intel.com>
Sat, 23 Jan 2016 00:14:54 +0000 (16:14 -0800)
For Broadwell cube maps, MinimumArrayElement is in terms of 2d slices (a
multiple of 6) but Depth is in terms of whole cubes.

src/vulkan/gen8_state.c

index 823bfa047db7ce826e4b2b67ae77f8c57da3630a..3c9d15257a38feef3364706348896b6f5ca3bcc5 100644 (file)
@@ -270,7 +270,7 @@ genX(fill_image_surface_state)(struct anv_device *device, void *state_map,
       #else
          /* Same as SURFTYPE_2D */
          template.MinimumArrayElement = range->baseArrayLayer;
-         template.Depth = range->layerCount - 1;
+         template.Depth = range->layerCount / 6 - 1;
          template.RenderTargetViewExtent = template.Depth;
       #endif
       break;