anv: Handle VK_WHOLE_SIZE properly for buffer views
authorJason Ekstrand <jason.ekstrand@intel.com>
Fri, 15 Jul 2016 04:11:14 +0000 (21:11 -0700)
committerJason Ekstrand <jason.ekstrand@intel.com>
Fri, 15 Jul 2016 22:48:21 +0000 (15:48 -0700)
commit593731ea3cc1aa9385e43ebc18c67574f181e1c3
treeba86d823242e5c7e32390e1371b95480c76da3ea
parent827405f07259424ca716dcb217ef0a813ad67963
anv: Handle VK_WHOLE_SIZE properly for buffer views

The old calculation, which used view->offset, encorporated buffer->offset
into the size calculation where it doesn't belong.  This meant that, if
buffer->offset > buffer->size, you would always get a negative size.  This
fixes 170 dEQP-VK.renderpass.attachment.* Vulkan CTS tests on Haswell.

Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Nanley Chery <nanley.g.chery@intel.com>
Cc: "12.0" <mesa-stable@lists.freedesktop.org>
src/intel/vulkan/anv_image.c