Fix create_instance_layer_name_abuse test
When attempting to create an instance with an unsupported
layer, it is expected that the instance creation fails
with the VK_ERROR_LAYER_NOT_PRESENT error.
Tests: dEQP-VK.api.device_init.create_instance_layer_name_abuse.basic
Bug: b/148240133
Change-Id: Ifcb957d4ecc19643c3810a5cb60ced01da4d6e00
Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/68408
Kokoro-Result: kokoro <noreply+kokoro@google.com>
Presubmit-Ready: Alexis Hétu <sugoi@google.com>
Reviewed-by: Antonio Maiorano <amaiorano@google.com>
Tested-by: Alexis Hétu <sugoi@google.com>
Commit-Queue: Alexis Hétu <sugoi@google.com>
diff --git a/src/Vulkan/libVulkan.cpp b/src/Vulkan/libVulkan.cpp
index 8e866d0..65103ca 100644
--- a/src/Vulkan/libVulkan.cpp
+++ b/src/Vulkan/libVulkan.cpp
@@ -517,7 +517,8 @@
if(pCreateInfo->enabledLayerCount != 0)
{
- UNIMPLEMENTED("b/148240133: pCreateInfo->enabledLayerCount != 0"); // FIXME(b/148240133)
+ // Creating instances with unsupported layers should fail and SwiftShader doesn't support any layer
+ return VK_ERROR_LAYER_NOT_PRESENT;
}
for(uint32_t i = 0; i < pCreateInfo->enabledExtensionCount; ++i)