From e17ed04b03e109acabe209a85c04031dbf40ad51 Mon Sep 17 00:00:00 2001 From: Chad Versace Date: Tue, 9 Jun 2015 15:01:18 -0700 Subject: [PATCH] vk/image: Don't double-allocate stencil buffers If the main surface has format S8_UINT, then don't allocate the auxiliary stencil surface. --- src/vulkan/image.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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); -- 2.30.2