anv/image: Scale iview extent by backing image
authorNanley Chery <nanley.g.chery@intel.com>
Mon, 4 Jan 2016 20:41:22 +0000 (12:41 -0800)
committerJason Ekstrand <jason.ekstrand@intel.com>
Wed, 27 Jan 2016 23:12:42 +0000 (15:12 -0800)
commit3f01bbe7f3e2639ca176c7873ea5e16ba16e4042
treedc9480962866778ee6a6b4e1ba3fab06d942c89e
parent010ab34839e7bf118b8f5dc974f4d348c77fbc37
anv/image: Scale iview extent by backing image

Aligns with formula's presented in Vulkan spec concerning CopyBufferToImage.
18.4 Copying Data Between Buffers and Images

This won't conflict with valid API usage, because:
1) Users are not allowed to create an uncompressed ImageView with a
compressed Image.
see: VkSpec - 11.5 Image Views - VkImageViewCreateInfo's Valid Usage box

2) If users create a differently formatted compressed ImageView with a
compressed Image, the block dimensions will still match.
see: VkSpec - 28.3.1.5 Format Compatibility Classes - Table 28.5
src/vulkan/anv_image.c
src/vulkan/anv_private.h