Don't request DebugReportRecorder with no layers
authorTony Zlatinski <tzlatinski@nvidia.com>
Wed, 10 Jun 2020 03:11:50 +0000 (22:11 -0500)
committerAlexander Galazin <Alexander.Galazin@arm.com>
Fri, 12 Jun 2020 19:44:17 +0000 (15:44 -0400)
Don't request the creation of DebugReportRecorder
when there are no layers installed.

When creating a custom instance with createCustomInstance(),
one can not expect the vkCreateDebugReportCallbackEXT to be
available when the layers are not enabled(installed) and the
VK_EXT_debug_report is not requested.

Affects: dEQP-VK.api.tooling_info.*

Components: Vulkan

VK-GL-CTS issue: 2411

Change-Id: Ib19a8b12a0562f7588b23338cb7ff4abea3da9d9

external/vulkancts/modules/vulkan/api/vktApiToolingInfoTests.cpp

index a5384f4..96d906d 100644 (file)
@@ -80,7 +80,7 @@ CustomInstance createCustomInstance (Context& context, bool allowLayers)
        }
 
        Move<VkInstance> instance = vk::createDefaultInstance(vkp, apiVersion, enabledLayersStr, enabledExtensions, DE_NULL);
-       return CustomInstance(context, instance, allowLayers, context.getTestContext().getCommandLine().printValidationErrors());
+       return CustomInstance(context, instance, !enabledLayers.empty(), context.getTestContext().getCommandLine().printValidationErrors());
 }
 
 bool checkToolsProperties (Context& context, const std::vector<VkPhysicalDeviceToolPropertiesEXT>& deviceToolPropertiesEXTArray)