anv: Add valid_bufer_usage to the memory type metadata
authorJason Ekstrand <jason.ekstrand@intel.com>
Wed, 17 May 2017 18:14:06 +0000 (11:14 -0700)
committerJason Ekstrand <jason.ekstrand@intel.com>
Tue, 23 May 2017 23:46:34 +0000 (16:46 -0700)
commitf7736ccf53eaeb66c4270afe0916e2cb29ab8667
tree1c2dcca19ca729fe782126c2f4472abd015b7603
parent92325a7efc769c32e03031323e21700dc55171e4
anv: Add valid_bufer_usage to the memory type metadata

Instead of returning valid types as just a number, we now walk the list
and check the buffer's usage against the usage flags we store in the new
anv_memory_type structure.  Currently, valid_buffer_usage == ~0.

Reviewed-by: Nanley Chery <nanley.g.chery@intel.com>
Cc: "17.1" <mesa-stable@lists.freedesktop.org>
src/intel/vulkan/anv_device.c
src/intel/vulkan/anv_private.h