OSDN Git Service

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)
committerEmil Velikov <emil.l.velikov@gmail.com>
Thu, 21 Jul 2016 12:46:02 +0000 (13:46 +0100)
commitb1b601fc7ceba1f76846fdf150557b90487dceb8
treeaa6a88e1a484e941ae29e0923e8d38ca5c82d16f
parent7441632753938aacec59f4ba5762db7e64e5be4b
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>
(cherry picked from commit 593731ea3cc1aa9385e43ebc18c67574f181e1c3)
[Emil Velikov: s|bpb / 8|bs|g]
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Conflicts:
src/intel/vulkan/anv_image.c
src/intel/vulkan/anv_image.c