vk/image: Don't double-allocate stencil buffers
If the main surface has format S8_UINT, then don't allocate the auxiliary stencil surface.
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user