diff options
author | Chad Versace <[email protected]> | 2015-06-09 15:01:18 -0700 |
---|---|---|
committer | Chad Versace <[email protected]> | 2015-06-09 16:39:28 -0700 |
commit | e17ed04b03e109acabe209a85c04031dbf40ad51 (patch) | |
tree | e644ad99b5c7ab78cc17d830d138674c7892c7cb | |
parent | 1ee2d1c3fc3a5d567847d0ffdc1d5f888df7859e (diff) |
vk/image: Don't double-allocate stencil buffers
If the main surface has format S8_UINT, then don't allocate the
auxiliary stencil surface.
-rw-r--r-- | src/vulkan/image.c | 2 |
1 files changed, 1 insertions, 1 deletions
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); |