vk/image: Teach anv_image_choose_tile_mode about WMAJOR
authorChad Versace <chad.versace@intel.com>
Tue, 9 Jun 2015 21:56:58 +0000 (14:56 -0700)
committerChad Versace <chad.versace@intel.com>
Tue, 9 Jun 2015 23:38:55 +0000 (16:38 -0700)
src/vulkan/image.c

index 2de5be9..8142658 100644 (file)
@@ -73,9 +73,16 @@ anv_image_choose_tile_mode(const VkImageCreateInfo *vk_info,
 
    switch (vk_info->tiling) {
    case VK_IMAGE_TILING_LINEAR:
+      if (unlikely(vk_info->format == VK_FORMAT_S8_UINT)) {
+         anv_abortf("requested linear stencil buffer");
+      }
       return LINEAR;
    case VK_IMAGE_TILING_OPTIMAL:
-      return YMAJOR;
+      if (unlikely(vk_info->format == VK_FORMAT_S8_UINT)) {
+         return WMAJOR;
+      } else {
+         return YMAJOR;
+      }
    default:
       assert(!"bad VKImageTiling");
       return LINEAR;