anv/android: Only limit advertised Vulkan version in strict mode

Signed-off-by: Chris Spencer <spencercw@gmail.com>
Acked-by: Chia-I Wu <olvaffe@gmail.com>
Acked-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25101>
This commit is contained in:
Chris Spencer 2023-09-07 19:08:09 +01:00 committed by Marge Bot
parent 257ecaca88
commit ebc3032245
2 changed files with 4 additions and 4 deletions

View file

@ -156,7 +156,7 @@ compiler_perf_log(UNUSED void *data, UNUSED unsigned *id, const char *fmt, ...)
#define ANV_USE_WSI_PLATFORM
#endif
#ifdef ANDROID
#ifdef ANDROID_STRICT
#if ANDROID_API_LEVEL >= 33
#define ANV_API_VERSION VK_MAKE_VERSION(1, 3, VK_HEADER_VERSION)
#else

View file

@ -132,7 +132,7 @@ compiler_perf_log(UNUSED void *data, UNUSED unsigned *id, const char *fmt, ...)
#define ANV_USE_WSI_PLATFORM
#endif
#ifdef ANDROID
#ifdef ANDROID_STRICT
#define ANV_API_VERSION VK_MAKE_VERSION(1, 1, VK_HEADER_VERSION)
#else
#define ANV_API_VERSION_1_3 VK_MAKE_VERSION(1, 3, VK_HEADER_VERSION)
@ -142,7 +142,7 @@ compiler_perf_log(UNUSED void *data, UNUSED unsigned *id, const char *fmt, ...)
VkResult anv_EnumerateInstanceVersion(
uint32_t* pApiVersion)
{
#ifdef ANDROID
#ifdef ANDROID_STRICT
*pApiVersion = ANV_API_VERSION;
#else
*pApiVersion = ANV_API_VERSION_1_3;
@ -1571,7 +1571,7 @@ void anv_GetPhysicalDeviceProperties(
};
*pProperties = (VkPhysicalDeviceProperties) {
#ifdef ANDROID
#ifdef ANDROID_STRICT
.apiVersion = ANV_API_VERSION,
#else
.apiVersion = (pdevice->use_softpin || pdevice->instance->report_vk_1_3) ?