anv: fix enumeration of properties
authorEmil Velikov <emil.velikov@collabora.com>
Thu, 6 Oct 2016 13:12:27 +0000 (14:12 +0100)
committerEmil Velikov <emil.l.velikov@gmail.com>
Wed, 23 Nov 2016 14:13:47 +0000 (14:13 +0000)
commit5cc07d854c85e30c5aa1ced626b4b6500f8cd74c
tree9c8396ab4c7b4e9215f6f02d751ab43cba9cacf1
parent0a0ce884ea7602581df703a59130402d3899c855
anv: fix enumeration of properties

Driver should enumerate only up-to min2(num_available, num_requested)
properties and return VK_INCOMPLETE if the # of requested props is
smaller than the ones available.

Presently we assert out in such cases.

Inspired by a similar fix for RADV.

v2: Use MIN2 + typed_memcpy (Jason).

Should fix: dEQP-VK.api.info.device.extensions

Cc: "13.0" <mesa-stable@lists.freedesktop.org>
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com> (v1)
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
src/intel/vulkan/anv_device.c