From 081f617b5afebba8348c1718f70dfeb92e0f954c Mon Sep 17 00:00:00 2001 From: Chad Versace Date: Tue, 9 Jun 2015 14:03:44 -0700 Subject: [PATCH] vk/image: Stop hardcoding alignment of stencil surfaces Look up the alignment from anv_tile_info_table. --- 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 89fd1ebf270..6e123e38530 100644 --- a/src/vulkan/image.c +++ b/src/vulkan/image.c @@ -133,7 +133,7 @@ VkResult anv_image_create( if (info->has_stencil) { const struct anv_tile_info *w_info = &anv_tile_info_table[WMAJOR]; - image->stencil_offset = ALIGN_U32(image->size, 4096); + image->stencil_offset = ALIGN_U32(image->size, w_info->surface_alignment); image->stencil_stride = ALIGN_I32(image->extent.width, w_info->width); aligned_height = ALIGN_I32(image->extent.height, w_info->height); stencil_size = image->stencil_stride * aligned_height; -- 2.30.2