From 0cb26523d31e8f2bb12395b1a5e4b7551df31e4a Mon Sep 17 00:00:00 2001 From: Chad Versace Date: Thu, 3 Sep 2015 11:03:28 -0700 Subject: [PATCH] vk/image: Add PRM reference for QPitch equation Suggested-by: Nanley Chery --- src/vulkan/anv_image.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/vulkan/anv_image.c b/src/vulkan/anv_image.c index 736a76881ff..7a37497d0cc 100644 --- a/src/vulkan/anv_image.c +++ b/src/vulkan/anv_image.c @@ -180,6 +180,10 @@ anv_image_make_surface(const struct anv_image_create_info *create_info, uint32_t h1 = align_u32(anv_minify(extent->height, 1), j); uint32_t w2 = align_u32(anv_minify(extent->width, 2), i); + /* The QPitch equation is found in the Broadwell PRM >> Volume 5: Memory + * Views >> Common Surface Formats >> Surface Layout >> 2D Surfaces >> + * Surface Arrays >> For All Surface Other Than Separate Stencil Buffer: + */ qpitch = h0 + h1 + 11 * j; mt_width = MAX(w0, w1 + w2); mt_height = array_size * qpitch; -- 2.30.2