summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChad Versace <[email protected]>2018-11-07 00:01:03 -0700
committerChia-I Wu <[email protected]>2019-03-11 10:01:33 -0700
commit3ec87d56bd75e905d7ba99f4bdbf0e6e6015dd90 (patch)
treea56946d2774959f6c048013b64a19e67318b0465
parentee835c779000134f62f2d01eba4693b6324c09e7 (diff)
turnip: Fix result of vkEnumerate*ExtensionProperties
Given an unsupported layer name, the functions must return VK_ERROR_LAYER_NOT_PRESENT.
-rw-r--r--src/freedreno/vulkan/tu_device.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/freedreno/vulkan/tu_device.c b/src/freedreno/vulkan/tu_device.c
index b3ea522bfdf..bee0a66d746 100644
--- a/src/freedreno/vulkan/tu_device.c
+++ b/src/freedreno/vulkan/tu_device.c
@@ -1176,6 +1176,10 @@ tu_EnumerateInstanceExtensionProperties(const char *pLayerName,
{
VK_OUTARRAY_MAKE(out, pProperties, pPropertyCount);
+ /* We spport no lyaers */
+ if (pLayerName)
+ return vk_error(NULL, VK_ERROR_LAYER_NOT_PRESENT);
+
for (int i = 0; i < TU_INSTANCE_EXTENSION_COUNT; i++) {
if (tu_supported_instance_extensions.extensions[i]) {
vk_outarray_append(&out, prop) { *prop = tu_instance_extensions[i]; }
@@ -1191,9 +1195,14 @@ tu_EnumerateDeviceExtensionProperties(VkPhysicalDevice physicalDevice,
uint32_t *pPropertyCount,
VkExtensionProperties *pProperties)
{
+ /* We spport no lyaers */
TU_FROM_HANDLE(tu_physical_device, device, physicalDevice);
VK_OUTARRAY_MAKE(out, pProperties, pPropertyCount);
+ /* We spport no lyaers */
+ if (pLayerName)
+ return vk_error(NULL, VK_ERROR_LAYER_NOT_PRESENT);
+
for (int i = 0; i < TU_DEVICE_EXTENSION_COUNT; i++) {
if (device->supported_extensions.extensions[i]) {
vk_outarray_append(&out, prop) { *prop = tu_device_extensions[i]; }