This takes in a (VkBaseInStructure *), checks for its type, casts it into the right property struct and then copies its fields over the right way to `struct vk_properties`. v2: a few fixups (zzyiwei) - add missing brackets required by clang - fix some indents - optimize to aovid deep-copying VkPhysicalDeviceProperties - update to use DETECT_OS_ANDROID as suggested - cast to avoid -Wswitch for Android struct beyond VkStructureType Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org> Tested-by: Oskar Viljasaar <oskar.viljasaar@gmail.com> Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29180>