From: Chad Versace Date: Tue, 9 Jun 2015 21:56:58 +0000 (-0700) Subject: vk/image: Teach anv_image_choose_tile_mode about WMAJOR X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=1ee2d1c3fc3a5d567847d0ffdc1d5f888df7859e;p=mesa.git vk/image: Teach anv_image_choose_tile_mode about WMAJOR --- diff --git a/src/vulkan/image.c b/src/vulkan/image.c index 2de5be93e1b..81426588945 100644 --- a/src/vulkan/image.c +++ b/src/vulkan/image.c @@ -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;