summaryrefslogtreecommitdiffstats
path: root/src/vulkan/image.c
diff options
context:
space:
mode:
authorChad Versace <[email protected]>2015-06-09 14:03:44 -0700
committerChad Versace <[email protected]>2015-06-09 14:16:56 -0700
commit081f617b5afebba8348c1718f70dfeb92e0f954c (patch)
treecc59f93e3742df8f4fd7e68de0ece85591910c2a /src/vulkan/image.c
parente6bd568f36ca04c34fdf566a40ad939039d207a6 (diff)
vk/image: Stop hardcoding alignment of stencil surfaces
Look up the alignment from anv_tile_info_table.
Diffstat (limited to 'src/vulkan/image.c')
-rw-r--r--src/vulkan/image.c2
1 files changed, 1 insertions, 1 deletions
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;