From: Chad Versace Date: Tue, 9 Jun 2015 22:01:18 +0000 (-0700) Subject: vk/image: Don't double-allocate stencil buffers X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=e17ed04;p=mesa.git vk/image: Don't double-allocate stencil buffers If the main surface has format S8_UINT, then don't allocate the auxiliary stencil surface. --- diff --git a/src/vulkan/image.c b/src/vulkan/image.c index 81426588945..40d5024a0eb 100644 --- a/src/vulkan/image.c +++ b/src/vulkan/image.c @@ -142,7 +142,7 @@ VkResult anv_image_create( image->stride = 0; } - if (info->has_stencil) { + if (info->has_stencil && pCreateInfo->format != VK_FORMAT_S8_UINT) { const struct anv_tile_info *w_info = &anv_tile_info_table[WMAJOR]; image->stencil_offset = ALIGN_U32(image->size, w_info->surface_alignment); image->stencil_stride = ALIGN_I32(image->extent.width, w_info->width);