vulkan/android: Only limit advertised extensions 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:
parent
3c618d23d1
commit
342dba5102
5 changed files with 7 additions and 7 deletions
|
|
@ -1194,7 +1194,7 @@ vn_physical_device_init_supported_extensions(
|
|||
for (uint32_t i = 0; i < VK_DEVICE_EXTENSION_COUNT; i++) {
|
||||
const VkExtensionProperties *props = &vk_device_extensions[i];
|
||||
|
||||
#ifdef ANDROID
|
||||
#ifdef ANDROID_STRICT
|
||||
if (!vk_android_allowed_device_extensions.extensions[i])
|
||||
continue;
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -127,7 +127,7 @@ vk_device_init(struct vk_device *device,
|
|||
"%s not supported",
|
||||
pCreateInfo->ppEnabledExtensionNames[i]);
|
||||
|
||||
#ifdef ANDROID
|
||||
#ifdef ANDROID_STRICT
|
||||
if (!vk_android_allowed_device_extensions.extensions[idx])
|
||||
return vk_errorf(physical_device, VK_ERROR_EXTENSION_NOT_PRESENT,
|
||||
"%s not supported",
|
||||
|
|
|
|||
|
|
@ -161,7 +161,7 @@ vk_instance_init(struct vk_instance *instance,
|
|||
"%s not supported",
|
||||
pCreateInfo->ppEnabledExtensionNames[i]);
|
||||
|
||||
#ifdef ANDROID
|
||||
#ifdef ANDROID_STRICT
|
||||
if (!vk_android_allowed_instance_extensions.extensions[idx])
|
||||
return vk_errorf(instance, VK_ERROR_EXTENSION_NOT_PRESENT,
|
||||
"%s not supported",
|
||||
|
|
@ -259,7 +259,7 @@ vk_enumerate_instance_extension_properties(
|
|||
if (!supported_extensions->extensions[i])
|
||||
continue;
|
||||
|
||||
#ifdef ANDROID
|
||||
#ifdef ANDROID_STRICT
|
||||
if (!vk_android_allowed_instance_extensions.extensions[i])
|
||||
continue;
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -92,7 +92,7 @@ vk_common_EnumerateDeviceExtensionProperties(VkPhysicalDevice physicalDevice,
|
|||
if (!pdevice->supported_extensions.extensions[i])
|
||||
continue;
|
||||
|
||||
#ifdef ANDROID
|
||||
#ifdef ANDROID_STRICT
|
||||
if (!vk_android_allowed_device_extensions.extensions[i])
|
||||
continue;
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -75,7 +75,7 @@ ${extension_table('device', device_extensions)}
|
|||
struct ${driver}_physical_device;
|
||||
|
||||
%if driver == 'vk':
|
||||
#ifdef ANDROID
|
||||
#ifdef ANDROID_STRICT
|
||||
extern const struct vk_instance_extension_table vk_android_allowed_instance_extensions;
|
||||
extern const struct vk_device_extension_table vk_android_allowed_device_extensions;
|
||||
#endif
|
||||
|
|
@ -111,7 +111,7 @@ const VkExtensionProperties ${driver}_device_extensions[${driver.upper()}_DEVICE
|
|||
%endfor
|
||||
};
|
||||
|
||||
#ifdef ANDROID
|
||||
#ifdef ANDROID_STRICT
|
||||
const struct vk_instance_extension_table vk_android_allowed_instance_extensions = {
|
||||
%for ext in instance_extensions:
|
||||
.${ext.name[3:]} = ${ext.c_android_condition()},
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue