anv/formats: Nicely handle unknown VkFormat enums
authorJason Ekstrand <jason.ekstrand@intel.com>
Thu, 27 Jul 2017 22:04:25 +0000 (15:04 -0700)
committerJason Ekstrand <jason.ekstrand@intel.com>
Thu, 31 Aug 2017 21:31:42 +0000 (14:31 -0700)
commit242211933a06826961709c2689a1d30f735ab7b9
treedea5c33c3434245dfdd2ad1b27551addd04d9dbc
parent2d93b462b4d978b0da417b35a7470e336bc4e783
anv/formats: Nicely handle unknown VkFormat enums

This fixes some crashes in the dEQP-VK.memory.requirements.core.* tests.
I'm not sure whether or not passing out-of-bound formats into the query
is supposed to be allowed but there's no harm in protecting ourselves
from it.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Bugzilla: https://bugs.freedesktop.org/101956
Cc: mesa-stable@lists.freedesktop.org
src/intel/vulkan/anv_formats.c