From: Chad Versace Date: Thu, 3 Sep 2015 18:03:28 +0000 (-0700) Subject: vk/image: Add PRM reference for QPitch equation X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=0cb26523d31e8f2bb12395b1a5e4b7551df31e4a;p=mesa.git vk/image: Add PRM reference for QPitch equation Suggested-by: Nanley Chery --- 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;