summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRicardo Garcia <rgarcia@igalia.com>2023-02-22 13:55:17 +0100
committerPiotr Byszewski <piotr.byszewski@mobica.com>2023-03-03 17:07:34 +0000
commitc981d77b632a7e6af0b5c65abc01acdfd43664e0 (patch)
treeeacab42070ff0d8e2ff063449585f6edff313e90
parent6a7806616b7eef686fc2b334e42fb3b0eb9415fb (diff)
downloadVK-GL-CTS-c981d77b632a7e6af0b5c65abc01acdfd43664e0.tar.gz
VK-GL-CTS-c981d77b632a7e6af0b5c65abc01acdfd43664e0.tar.bz2
VK-GL-CTS-c981d77b632a7e6af0b5c65abc01acdfd43664e0.zip
Fix multiple VK_KHR_get_physical_device_properties2 issues
This commit fixes two types of issues found in several CTS tests related to PDP2. * Several CTS tests were creating unneeded Vulkan instances, and these instances were being created without any extension enabled. In turn, this means P2P2 APIs like getPhysicalDeviceFeatures2 could not be used with those instances. Despite this, some tests were calling those functions. The solution applied here is not using custom instances at all whenever possible, as most times we are only interested in custom devices, or to enable PDP2 on those instances. * In some other situations, PDP2 functions were being called in the default instance but without checking first for any extension that requires PDP2 or without directly checking for PDP2. In these cases, the solution was adding extension checks before. Affects: dEQP-VK.depth.* dEQP-VK.api.buffer_memory_requirements.* dEQP-VK.api.device_init.*priority* dEQP-VK.api.*format_properties* dEQP-VK.compute.indirect_dispatch.* dEQP-VK.fragment_shading_rate.*pixel_consistency* dEQP-VK.memory.* dEQP-VK.multiview.* dEQP-VK.pipeline.*.shader_fragment_mask.* dEQP-VK.robustness.* dEQP-VK.sparse_resources.* dEQP-VK.subgroups.subgroup_uniform_control_flow.* dEQP-VK.synchronization.global_priority_transition.* dEQP-VK.synchronization.*multi_queue* dEQP-VK.synchronization.*smoke* dEQP-VK.synchronization.timeline_semaphore.* Components: Vulkan VK-GL-CTS issue: 4293 Change-Id: Iba184a3f1ba901ce60458477a1f54772b4588bb6
-rw-r--r--external/vulkancts/modules/vulkan/amber/vktAmberDepthTests.cpp12
-rw-r--r--external/vulkancts/modules/vulkan/api/vktApiBufferMemoryRequirementsTests.cpp2
-rw-r--r--external/vulkancts/modules/vulkan/api/vktApiDeviceInitializationTests.cpp8
-rw-r--r--external/vulkancts/modules/vulkan/api/vktApiFeatureInfo.cpp9
-rw-r--r--external/vulkancts/modules/vulkan/api/vktApiVersionCheck.cpp2
-rw-r--r--external/vulkancts/modules/vulkan/compute/vktComputeIndirectComputeDispatchTests.cpp6
-rw-r--r--external/vulkancts/modules/vulkan/fragment_shading_rate/vktFragmentShadingRatePixelConsistency.cpp4
-rw-r--r--external/vulkancts/modules/vulkan/memory/vktMemoryAllocationTests.cpp30
-rw-r--r--external/vulkancts/modules/vulkan/memory/vktMemoryMappingTests.cpp2
-rw-r--r--external/vulkancts/modules/vulkan/multiview/vktMultiViewRenderTests.cpp34
-rw-r--r--external/vulkancts/modules/vulkan/pipeline/vktPipelineMultisampleShaderFragmentMaskTests.cpp2
-rw-r--r--external/vulkancts/modules/vulkan/robustness/vktRobustnessExtsTests.cpp1
-rw-r--r--external/vulkancts/modules/vulkan/sparse_resources/vktSparseResourcesBase.cpp6
-rw-r--r--external/vulkancts/modules/vulkan/subgroups/vktSubgroupUniformControlFlowTests.cpp1
-rw-r--r--external/vulkancts/modules/vulkan/synchronization/vktGlobalPriorityQueueTests.cpp1
-rw-r--r--external/vulkancts/modules/vulkan/synchronization/vktSynchronizationOperationMultiQueueTests.cpp23
-rw-r--r--external/vulkancts/modules/vulkan/synchronization/vktSynchronizationSmokeTests.cpp5
-rw-r--r--external/vulkancts/modules/vulkan/synchronization/vktSynchronizationTimelineSemaphoreTests.cpp45
18 files changed, 107 insertions, 86 deletions
diff --git a/external/vulkancts/modules/vulkan/amber/vktAmberDepthTests.cpp b/external/vulkancts/modules/vulkan/amber/vktAmberDepthTests.cpp
index 5a1f55340..77153187e 100644
--- a/external/vulkancts/modules/vulkan/amber/vktAmberDepthTests.cpp
+++ b/external/vulkancts/modules/vulkan/amber/vktAmberDepthTests.cpp
@@ -61,7 +61,7 @@ public:
TestInstance* createInstance (Context& ctx) const
{
// Create a custom device to ensure that VK_EXT_depth_range_unrestricted is not enabled
- if (!g_singletonDeviceDepthGroup)
+ if (!g_singletonDeviceDepthGroup && m_useCustomDevice)
{
const float queuePriority = 1.0f;
@@ -89,7 +89,11 @@ public:
features2.pNext = &clampParams;
- ctx.getInstanceInterface().getPhysicalDeviceFeatures2(ctx.getPhysicalDevice(), &features2);
+ const auto& vki = ctx.getInstanceInterface();
+ const auto physicalDevice = ctx.getPhysicalDevice();
+
+ ctx.requireInstanceFunctionality("VK_KHR_get_physical_device_properties2");
+ vki.getPhysicalDeviceFeatures2(physicalDevice, &features2);
const VkDeviceCreateInfo deviceCreateInfo =
{
@@ -105,7 +109,9 @@ public:
DE_NULL, // pEnabledFeatures
};
- Move<VkDevice> device = createCustomDevice(ctx.getTestContext().getCommandLine().isValidationEnabled(), ctx.getPlatformInterface(), ctx.getInstance(), ctx.getInstanceInterface(), ctx.getPhysicalDevice(), &deviceCreateInfo);
+ const bool validation = ctx.getTestContext().getCommandLine().isValidationEnabled();
+ Move<VkDevice> device = createCustomDevice(validation, ctx.getPlatformInterface(), ctx.getInstance(), vki, physicalDevice, &deviceCreateInfo);
+
g_singletonDeviceDepthGroup = de::SharedPtr<Move<VkDevice>>(new Move<VkDevice>(device));
}
return new AmberTestInstance(ctx, m_recipe, m_useCustomDevice ? g_singletonDeviceDepthGroup->get() : nullptr);
diff --git a/external/vulkancts/modules/vulkan/api/vktApiBufferMemoryRequirementsTests.cpp b/external/vulkancts/modules/vulkan/api/vktApiBufferMemoryRequirementsTests.cpp
index b78e4bb61..525dfd33f 100644
--- a/external/vulkancts/modules/vulkan/api/vktApiBufferMemoryRequirementsTests.cpp
+++ b/external/vulkancts/modules/vulkan/api/vktApiBufferMemoryRequirementsTests.cpp
@@ -375,6 +375,8 @@ void MemoryRequirementsTest::checkSupport (Context& context) const
const VkPhysicalDevice physDevice = context.getPhysicalDevice();
auto& log = context.getTestContext().getLog();
+ context.requireInstanceFunctionality("VK_KHR_get_physical_device_properties2");
+
if (m_testConfig.useMethod2)
context.requireDeviceFunctionality("VK_KHR_get_memory_requirements2");
diff --git a/external/vulkancts/modules/vulkan/api/vktApiDeviceInitializationTests.cpp b/external/vulkancts/modules/vulkan/api/vktApiDeviceInitializationTests.cpp
index a16786348..b03b30729 100644
--- a/external/vulkancts/modules/vulkan/api/vktApiDeviceInitializationTests.cpp
+++ b/external/vulkancts/modules/vulkan/api/vktApiDeviceInitializationTests.cpp
@@ -984,8 +984,8 @@ tcu::TestStatus createDeviceWithGlobalPriorityTest (Context& context, bool useKh
{
tcu::TestLog& log = context.getTestContext().getLog();
const PlatformInterface& platformInterface = context.getPlatformInterface();
- const CustomInstance instance (createCustomInstanceFromContext(context));
- const InstanceDriver& instanceDriver (instance.getDriver());
+ const auto& instanceDriver = context.getInstanceInterface();
+ const auto instance = context.getInstance();
const VkPhysicalDevice physicalDevice = chooseDevice(instanceDriver, instance, context.getTestContext().getCommandLine());
const vector<float> queuePriorities (1, 1.0f);
const VkQueueGlobalPriorityEXT globalPriorities[] = { VK_QUEUE_GLOBAL_PRIORITY_LOW_EXT, VK_QUEUE_GLOBAL_PRIORITY_MEDIUM_EXT, VK_QUEUE_GLOBAL_PRIORITY_HIGH_EXT, VK_QUEUE_GLOBAL_PRIORITY_REALTIME_EXT };
@@ -1191,8 +1191,8 @@ tcu::TestStatus createDeviceWithQueriedGlobalPriorityTest (Context& context, boo
{
tcu::TestLog& log = context.getTestContext().getLog();
const PlatformInterface& platformInterface = context.getPlatformInterface();
- const CustomInstance instance (createCustomInstanceFromContext(context));
- const InstanceDriver& instanceDriver (instance.getDriver());
+ const auto& instanceDriver = context.getInstanceInterface();
+ const auto instance = context.getInstance();
const VkPhysicalDevice physicalDevice = chooseDevice(instanceDriver, instance, context.getTestContext().getCommandLine());
const VkQueueGlobalPriorityEXT globalPriorities[] = { VK_QUEUE_GLOBAL_PRIORITY_LOW_EXT, VK_QUEUE_GLOBAL_PRIORITY_MEDIUM_EXT, VK_QUEUE_GLOBAL_PRIORITY_HIGH_EXT, VK_QUEUE_GLOBAL_PRIORITY_REALTIME_EXT };
const vector<float> queuePriorities (1, 1.0f);
diff --git a/external/vulkancts/modules/vulkan/api/vktApiFeatureInfo.cpp b/external/vulkancts/modules/vulkan/api/vktApiFeatureInfo.cpp
index b3b5d2a0a..e9588d204 100644
--- a/external/vulkancts/modules/vulkan/api/vktApiFeatureInfo.cpp
+++ b/external/vulkancts/modules/vulkan/api/vktApiFeatureInfo.cpp
@@ -3514,13 +3514,8 @@ VkFormatFeatureFlags getRequiredOptimalExtendedTilingFeatures (Context& context,
if ( de::contains(DE_ARRAY_BEGIN(s_requiredSampledImageFilterCubicFormats), DE_ARRAY_END(s_requiredSampledImageFilterCubicFormats), format) )
flags |= VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_CUBIC_BIT_EXT;
- VkPhysicalDeviceFeatures2 coreFeatures;
- deMemset(&coreFeatures, 0, sizeof(coreFeatures));
-
- coreFeatures.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FEATURES_2;
- coreFeatures.pNext = DE_NULL;
- context.getInstanceInterface().getPhysicalDeviceFeatures2(context.getPhysicalDevice(), &coreFeatures);
- if ( coreFeatures.features.textureCompressionETC2 && de::contains(DE_ARRAY_BEGIN(s_requiredSampledImageFilterCubicFormatsETC2), DE_ARRAY_END(s_requiredSampledImageFilterCubicFormatsETC2), format) )
+ const auto& coreFeatures = context.getDeviceFeatures();
+ if ( coreFeatures.textureCompressionETC2 && de::contains(DE_ARRAY_BEGIN(s_requiredSampledImageFilterCubicFormatsETC2), DE_ARRAY_END(s_requiredSampledImageFilterCubicFormatsETC2), format) )
flags |= VK_FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_CUBIC_BIT_EXT;
}
diff --git a/external/vulkancts/modules/vulkan/api/vktApiVersionCheck.cpp b/external/vulkancts/modules/vulkan/api/vktApiVersionCheck.cpp
index 5f6d884f4..9490c914b 100644
--- a/external/vulkancts/modules/vulkan/api/vktApiVersionCheck.cpp
+++ b/external/vulkancts/modules/vulkan/api/vktApiVersionCheck.cpp
@@ -170,7 +170,7 @@ public:
log << tcu::TestLog::Message << mixupResult << tcu::TestLog::EndMessage;
}
- // Check function entry points of disabled extesions
+ // Check function entry points of disabled extensions
{
FunctionInfosList extFunctions = FunctionInfosList();
extFunctions.push_back(FunctionInfo("vkTrimCommandPoolKHR", FUNCTIONORIGIN_DEVICE));
diff --git a/external/vulkancts/modules/vulkan/compute/vktComputeIndirectComputeDispatchTests.cpp b/external/vulkancts/modules/vulkan/compute/vktComputeIndirectComputeDispatchTests.cpp
index aaada3b7d..0f7b7fa5f 100644
--- a/external/vulkancts/modules/vulkan/compute/vktComputeIndirectComputeDispatchTests.cpp
+++ b/external/vulkancts/modules/vulkan/compute/vktComputeIndirectComputeDispatchTests.cpp
@@ -287,7 +287,9 @@ protected:
const std::string m_name;
vk::VkDevice m_device;
+#ifdef CTS_USES_VULKANSC
const CustomInstance m_customInstance;
+#endif // CTS_USES_VULKANSC
vk::Move<vk::VkDevice> m_customDevice;
#ifndef CTS_USES_VULKANSC
de::MovePtr<vk::DeviceDriver> m_deviceDriver;
@@ -320,7 +322,9 @@ IndirectDispatchInstanceBufferUpload::IndirectDispatchInstanceBufferUpload (Cont
, m_context (context)
, m_name (name)
, m_device (context.getDevice())
+#ifdef CTS_USES_VULKANSC
, m_customInstance (createCustomInstanceFromContext(context))
+#endif // CTS_USES_VULKANSC
, m_queue (context.getUniversalQueue())
, m_queueFamilyIndex (context.getUniversalQueueFamilyIndex())
, m_bufferSize (bufferSize)
@@ -385,7 +389,7 @@ tcu::TestStatus IndirectDispatchInstanceBufferUpload::iterate (void)
m_queueFamilyIndex);
m_device = m_customDevice.get();
#ifndef CTS_USES_VULKANSC
- m_deviceDriver = de::MovePtr<vk::DeviceDriver>(new vk::DeviceDriver(m_context.getPlatformInterface(), m_customInstance, m_device));
+ m_deviceDriver = de::MovePtr<vk::DeviceDriver>(new vk::DeviceDriver(m_context.getPlatformInterface(), m_context.getInstance(), m_device));
#else
m_deviceDriver = de::MovePtr<vk::DeviceDriverSC, vk::DeinitDeviceDeleter>(new vk::DeviceDriverSC(m_context.getPlatformInterface(), m_customInstance, m_device, m_context.getTestContext().getCommandLine(), m_context.getResourceInterface(), m_context.getDeviceVulkanSC10Properties(), m_context.getDeviceProperties()), vk::DeinitDeviceDeleter(m_context.getResourceInterface().get(), m_device));
#endif // CTS_USES_VULKANSC
diff --git a/external/vulkancts/modules/vulkan/fragment_shading_rate/vktFragmentShadingRatePixelConsistency.cpp b/external/vulkancts/modules/vulkan/fragment_shading_rate/vktFragmentShadingRatePixelConsistency.cpp
index e04196e0e..49e1494ab 100644
--- a/external/vulkancts/modules/vulkan/fragment_shading_rate/vktFragmentShadingRatePixelConsistency.cpp
+++ b/external/vulkancts/modules/vulkan/fragment_shading_rate/vktFragmentShadingRatePixelConsistency.cpp
@@ -481,8 +481,8 @@ tcu::TestStatus FSRPixelConsistencyInstance::iterate (void)
{
const VkPhysicalDeviceMemoryProperties memoryProperties = vk::getPhysicalDeviceMemoryProperties(m_context.getInstanceInterface(), m_context.getPhysicalDevice());
- const CustomInstance instance (createCustomInstanceFromContext(m_context));
- const InstanceDriver& instanceDriver (instance.getDriver());
+ const VkInstance instance = m_context.getInstance();
+ const auto& instanceDriver = m_context.getInstanceInterface();
Move<VkDevice> vkd = createImageRobustnessDevice(m_context, instance, instanceDriver);
const VkDevice device = *vkd;
diff --git a/external/vulkancts/modules/vulkan/memory/vktMemoryAllocationTests.cpp b/external/vulkancts/modules/vulkan/memory/vktMemoryAllocationTests.cpp
index 5bdead1ff..71645bbf4 100644
--- a/external/vulkancts/modules/vulkan/memory/vktMemoryAllocationTests.cpp
+++ b/external/vulkancts/modules/vulkan/memory/vktMemoryAllocationTests.cpp
@@ -160,7 +160,6 @@ protected:
bool m_deviceCoherentMemSupported;
private:
- CustomInstance m_deviceGroupInstance;
vk::Move<vk::VkDevice> m_logicalDevice;
#ifndef CTS_USES_VULKANSC
de::MovePtr<vk::DeviceDriver> m_deviceDriver;
@@ -172,9 +171,9 @@ private:
void BaseAllocateTestInstance::createTestDevice (void)
{
- m_deviceGroupInstance = createCustomInstanceFromContext(m_context);
- const InstanceDriver& instanceDriver = m_deviceGroupInstance.getDriver();
- const VkPhysicalDevice physicalDevice = chooseDevice(instanceDriver, m_deviceGroupInstance, m_context.getTestContext().getCommandLine());
+ const auto& instanceDriver = m_context.getInstanceInterface();
+ const VkInstance instance = m_context.getInstance();
+ const VkPhysicalDevice physicalDevice = chooseDevice(instanceDriver, instance, m_context.getTestContext().getCommandLine());
const VkPhysicalDeviceFeatures deviceFeatures = getPhysicalDeviceFeatures(instanceDriver, physicalDevice);
const float queuePriority = 1.0f;
deUint32 queueFamilyIndex = 0;
@@ -211,7 +210,8 @@ void BaseAllocateTestInstance::createTestDevice (void)
pNext, // const void* pNext
VK_FALSE // VkBool32 deviceCoherentMemory;
};
- if (m_context.isDeviceFunctionalitySupported("VK_AMD_device_coherent_memory")) pNext = &coherentMemoryFeatures;
+ if (m_context.isDeviceFunctionalitySupported("VK_AMD_device_coherent_memory"))
+ pNext = &coherentMemoryFeatures;
#endif // CTS_USES_VULKANSC
VkPhysicalDeviceFeatures features;
@@ -225,6 +225,7 @@ void BaseAllocateTestInstance::createTestDevice (void)
};
// Check if the physical device supports the protected memory feature
+ m_context.requireInstanceFunctionality("VK_KHR_get_physical_device_properties2");
instanceDriver.getPhysicalDeviceFeatures2(physicalDevice, &features2);
protMemSupported = protectedMemoryFeature.protectedMemory;
#ifndef CTS_USES_VULKANSC
@@ -271,11 +272,11 @@ void BaseAllocateTestInstance::createTestDevice (void)
(protMemSupported || usePageable || m_deviceCoherentMemSupported) ? DE_NULL : &deviceFeatures // const VkPhysicalDeviceFeatures* pEnabledFeatures;
};
- m_logicalDevice = createCustomDevice(m_context.getTestContext().getCommandLine().isValidationEnabled(), m_context.getPlatformInterface(), m_deviceGroupInstance, instanceDriver, physicalDevice, &deviceInfo);
+ m_logicalDevice = createCustomDevice(m_context.getTestContext().getCommandLine().isValidationEnabled(), m_context.getPlatformInterface(), instance, instanceDriver, physicalDevice, &deviceInfo);
#ifndef CTS_USES_VULKANSC
- m_deviceDriver = de::MovePtr<DeviceDriver>(new DeviceDriver(m_context.getPlatformInterface(), m_deviceGroupInstance, *m_logicalDevice));
+ m_deviceDriver = de::MovePtr<DeviceDriver>(new DeviceDriver(m_context.getPlatformInterface(), instance, *m_logicalDevice));
#else
- m_deviceDriver = de::MovePtr<DeviceDriverSC, DeinitDeviceDeleter>(new DeviceDriverSC(m_context.getPlatformInterface(), m_deviceGroupInstance, *m_logicalDevice, m_context.getTestContext().getCommandLine(), m_context.getResourceInterface(), m_context.getDeviceVulkanSC10Properties(), m_context.getDeviceProperties()), vk::DeinitDeviceDeleter(m_context.getResourceInterface().get(), *m_logicalDevice));
+ m_deviceDriver = de::MovePtr<DeviceDriverSC, DeinitDeviceDeleter>(new DeviceDriverSC(m_context.getPlatformInterface(), instance, *m_logicalDevice, m_context.getTestContext().getCommandLine(), m_context.getResourceInterface(), m_context.getDeviceVulkanSC10Properties(), m_context.getDeviceProperties()), vk::DeinitDeviceDeleter(m_context.getResourceInterface().get(), *m_logicalDevice));
#endif // CTS_USES_VULKANSC
}
@@ -286,9 +287,9 @@ void BaseAllocateTestInstance::createDeviceGroup (void)
const deUint32 physDeviceIdx = cmdLine.getVKDeviceId() - 1;
const float queuePriority = 1.0f;
deUint32 queueFamilyIndex = 0;
- const std::vector<std::string> requiredExtensions (1, "VK_KHR_device_group_creation");
- m_deviceGroupInstance = createCustomInstanceWithExtensions(m_context, requiredExtensions);
- std::vector<VkPhysicalDeviceGroupProperties> devGroupProperties = enumeratePhysicalDeviceGroups(m_deviceGroupInstance.getDriver(), m_deviceGroupInstance);
+ const InstanceInterface& instanceDriver = m_context.getInstanceInterface();
+ const VkInstance instance = m_context.getInstance();
+ std::vector<VkPhysicalDeviceGroupProperties> devGroupProperties = enumeratePhysicalDeviceGroups(instanceDriver, instance);
m_numPhysDevices = devGroupProperties[devGroupIdx].physicalDeviceCount;
m_subsetAllocationAllowed = devGroupProperties[devGroupIdx].subsetAllocation;
if (m_numPhysDevices < 2)
@@ -306,7 +307,6 @@ void BaseAllocateTestInstance::createDeviceGroup (void)
devGroupProperties[devGroupIdx].physicalDevices //physicalDevices
};
- const InstanceDriver& instanceDriver = m_deviceGroupInstance.getDriver();
const VkPhysicalDeviceFeatures deviceFeatures = getPhysicalDeviceFeatures(instanceDriver, deviceGroupInfo.pPhysicalDevices[physDeviceIdx]);
const std::vector<VkQueueFamilyProperties> queueProps = getPhysicalDeviceQueueFamilyProperties(instanceDriver, devGroupProperties[devGroupIdx].physicalDevices[physDeviceIdx]);
@@ -340,11 +340,11 @@ void BaseAllocateTestInstance::createDeviceGroup (void)
&deviceFeatures, // const VkPhysicalDeviceFeatures* pEnabledFeatures;
};
- m_logicalDevice = createCustomDevice(m_context.getTestContext().getCommandLine().isValidationEnabled(), m_context.getPlatformInterface(), m_deviceGroupInstance, instanceDriver, deviceGroupInfo.pPhysicalDevices[physDeviceIdx], &deviceInfo);
+ m_logicalDevice = createCustomDevice(m_context.getTestContext().getCommandLine().isValidationEnabled(), m_context.getPlatformInterface(), instance, instanceDriver, deviceGroupInfo.pPhysicalDevices[physDeviceIdx], &deviceInfo);
#ifndef CTS_USES_VULKANSC
- m_deviceDriver = de::MovePtr<DeviceDriver>(new DeviceDriver(m_context.getPlatformInterface(), m_deviceGroupInstance, *m_logicalDevice));
+ m_deviceDriver = de::MovePtr<DeviceDriver>(new DeviceDriver(m_context.getPlatformInterface(), instance, *m_logicalDevice));
#else
- m_deviceDriver = de::MovePtr<DeviceDriverSC, DeinitDeviceDeleter>(new DeviceDriverSC(m_context.getPlatformInterface(), m_deviceGroupInstance, *m_logicalDevice, m_context.getTestContext().getCommandLine(), m_context.getResourceInterface(), m_context.getDeviceVulkanSC10Properties(), m_context.getDeviceProperties()), vk::DeinitDeviceDeleter(m_context.getResourceInterface().get(), *m_logicalDevice));
+ m_deviceDriver = de::MovePtr<DeviceDriverSC, DeinitDeviceDeleter>(new DeviceDriverSC(m_context.getPlatformInterface(), instance, *m_logicalDevice, m_context.getTestContext().getCommandLine(), m_context.getResourceInterface(), m_context.getDeviceVulkanSC10Properties(), m_context.getDeviceProperties()), vk::DeinitDeviceDeleter(m_context.getResourceInterface().get(), *m_logicalDevice));
#endif // CTS_USES_VULKANSC
m_memoryProperties = getPhysicalDeviceMemoryProperties(instanceDriver, deviceGroupInfo.pPhysicalDevices[physDeviceIdx]);
diff --git a/external/vulkancts/modules/vulkan/memory/vktMemoryMappingTests.cpp b/external/vulkancts/modules/vulkan/memory/vktMemoryMappingTests.cpp
index 379f6152c..f5e574df0 100644
--- a/external/vulkancts/modules/vulkan/memory/vktMemoryMappingTests.cpp
+++ b/external/vulkancts/modules/vulkan/memory/vktMemoryMappingTests.cpp
@@ -1784,6 +1784,8 @@ TestConfig fullMappedConfig (VkDeviceSize allocationSize,
void checkSupport (Context& context, TestConfig config)
{
+ context.requireInstanceFunctionality("VK_KHR_get_physical_device_properties2");
+
if (config.allocationKind == ALLOCATION_KIND_DEDICATED_IMAGE
|| config.allocationKind == ALLOCATION_KIND_DEDICATED_BUFFER)
{
diff --git a/external/vulkancts/modules/vulkan/multiview/vktMultiViewRenderTests.cpp b/external/vulkancts/modules/vulkan/multiview/vktMultiViewRenderTests.cpp
index d5f45b964..fad8b8094 100644
--- a/external/vulkancts/modules/vulkan/multiview/vktMultiViewRenderTests.cpp
+++ b/external/vulkancts/modules/vulkan/multiview/vktMultiViewRenderTests.cpp
@@ -314,7 +314,6 @@ protected:
void addRenderingSubpassDependencyIfRequired (deUint32 currentSubpassNdx);
#endif // CTS_USES_VULKANSC
- std::shared_ptr<CustomInstanceWrapper> m_instanceWrapper;
const TestParameters m_parameters;
const bool m_useDynamicRendering;
const int m_seed;
@@ -348,7 +347,6 @@ protected:
MultiViewRenderTestInstance::MultiViewRenderTestInstance (Context& context, const TestParameters& parameters)
: TestInstance (context)
- , m_instanceWrapper (new CustomInstanceWrapper(context))
, m_parameters (fillMissingParameters(parameters))
, m_useDynamicRendering (parameters.renderingType == RENDERING_TYPE_DYNAMIC_RENDERING)
, m_seed (context.getTestContext().getCommandLine().getBaseSeed())
@@ -639,8 +637,8 @@ TestParameters MultiViewRenderTestInstance::fillMissingParameters (const TestPar
return parameters;
else
{
- const InstanceInterface& instanceDriver = m_instanceWrapper->instance.getDriver();
- const VkPhysicalDevice physicalDevice = chooseDevice(instanceDriver, m_instanceWrapper->instance, m_context.getTestContext().getCommandLine());
+ const auto& instanceDriver = m_context.getInstanceInterface();
+ const auto physicalDevice = m_context.getPhysicalDevice();
VkPhysicalDeviceMultiviewProperties multiviewProperties =
{
@@ -726,8 +724,8 @@ void MultiViewRenderTestInstance::createVertexBuffer (void)
void MultiViewRenderTestInstance::createMultiViewDevices (void)
{
- const InstanceDriver& instanceDriver ( m_instanceWrapper->instance.getDriver() );
- const VkPhysicalDevice physicalDevice = chooseDevice(instanceDriver, m_instanceWrapper->instance, m_context.getTestContext().getCommandLine());
+ const auto& instanceDriver = m_context.getInstanceInterface();
+ const VkPhysicalDevice physicalDevice = m_context.getPhysicalDevice();
const vector<VkQueueFamilyProperties> queueFamilyProperties = getPhysicalDeviceQueueFamilyProperties(instanceDriver, physicalDevice);
for (; m_queueFamilyIndex < queueFamilyProperties.size(); ++m_queueFamilyIndex)
@@ -879,11 +877,13 @@ void MultiViewRenderTestInstance::createMultiViewDevices (void)
DE_NULL //const VkPhysicalDeviceFeatures* pEnabledFeatures;
};
- m_logicalDevice = createCustomDevice(m_context.getTestContext().getCommandLine().isValidationEnabled(), m_context.getPlatformInterface(), m_instanceWrapper->instance, instanceDriver, physicalDevice, &deviceInfo);
+ const auto instance = m_context.getInstance();
+
+ m_logicalDevice = createCustomDevice(m_context.getTestContext().getCommandLine().isValidationEnabled(), m_context.getPlatformInterface(), instance, instanceDriver, physicalDevice, &deviceInfo);
#ifndef CTS_USES_VULKANSC
- m_device = de::MovePtr<DeviceDriver>(new DeviceDriver(m_context.getPlatformInterface(), m_instanceWrapper->instance, *m_logicalDevice));
+ m_device = de::MovePtr<DeviceDriver>(new DeviceDriver(m_context.getPlatformInterface(), instance, *m_logicalDevice));
#else
- m_device = de::MovePtr<DeviceDriverSC, DeinitDeviceDeleter>(new DeviceDriverSC(m_context.getPlatformInterface(), m_instanceWrapper->instance, *m_logicalDevice, m_context.getTestContext().getCommandLine(), m_context.getResourceInterface(), m_context.getDeviceVulkanSC10Properties(), m_context.getDeviceProperties()), vk::DeinitDeviceDeleter(m_context.getResourceInterface().get(), *m_logicalDevice));
+ m_device = de::MovePtr<DeviceDriverSC, DeinitDeviceDeleter>(new DeviceDriverSC(m_context.getPlatformInterface(), instance, *m_logicalDevice, m_context.getTestContext().getCommandLine(), m_context.getResourceInterface(), m_context.getDeviceVulkanSC10Properties(), m_context.getDeviceProperties()), vk::DeinitDeviceDeleter(m_context.getResourceInterface().get(), *m_logicalDevice));
#endif // CTS_USES_VULKANSC
m_allocator = MovePtr<Allocator>(new SimpleAllocator(*m_device, *m_logicalDevice, getPhysicalDeviceMemoryProperties(instanceDriver, physicalDevice)));
m_device->getDeviceQueue (*m_logicalDevice, m_queueFamilyIndex, 0u, &m_queue);
@@ -2571,8 +2571,8 @@ protected:
MultiViewPointSizeTestInstance::MultiViewPointSizeTestInstance (Context& context, const TestParameters& parameters)
: MultiViewRenderTestInstance (context, parameters)
{
- const InstanceInterface& vki = m_instanceWrapper->instance.getDriver();
- const VkPhysicalDevice physDevice = chooseDevice(vki, m_instanceWrapper->instance, context.getTestContext().getCommandLine());
+ const auto& vki = m_context.getInstanceInterface();
+ const auto physDevice = m_context.getPhysicalDevice();
const VkPhysicalDeviceLimits limits = getPhysicalDeviceProperties(vki, physDevice).limits;
validatePointSize(limits, static_cast<deUint32>(TEST_POINT_SIZE_WIDE));
@@ -2925,8 +2925,10 @@ MultiViewQueriesTestInstance::MultiViewQueriesTestInstance (Context& context, co
, m_occlusionObjectsOffset (0)
{
// Generate the timestamp mask
- const VkPhysicalDevice physicalDevice = chooseDevice(m_instanceWrapper->instance.getDriver(), m_instanceWrapper->instance, context.getTestContext().getCommandLine());
- const std::vector<VkQueueFamilyProperties> queueProperties = vk::getPhysicalDeviceQueueFamilyProperties(m_instanceWrapper->instance.getDriver(), physicalDevice);
+ const auto& vki = m_context.getInstanceInterface();
+ const auto physicalDevice = m_context.getPhysicalDevice();
+
+ const std::vector<VkQueueFamilyProperties> queueProperties = vk::getPhysicalDeviceQueueFamilyProperties(vki, physicalDevice);
if(queueProperties[0].timestampValidBits == 0)
TCU_THROW(NotSupportedError, "Device does not support timestamp.");
@@ -3477,8 +3479,9 @@ MultiViewDepthStencilTestInstance::MultiViewDepthStencilTestInstance (Context& c
for (deUint32 ndx = 0; ndx < DE_LENGTH_OF_ARRAY(formats); ++ndx)
{
const VkFormat format = formats[ndx];
- const VkPhysicalDevice physicalDevice = chooseDevice(m_instanceWrapper->instance.getDriver(), m_instanceWrapper->instance, context.getTestContext().getCommandLine());
- const VkFormatProperties formatProperties = getPhysicalDeviceFormatProperties(m_instanceWrapper->instance.getDriver(), physicalDevice, format);
+ const auto& vki = m_context.getInstanceInterface();
+ const auto physicalDevice = m_context.getPhysicalDevice();
+ const VkFormatProperties formatProperties = getPhysicalDeviceFormatProperties(vki, physicalDevice, format);
if ((formatProperties.optimalTilingFeatures & VK_FORMAT_FEATURE_DEPTH_STENCIL_ATTACHMENT_BIT) != 0)
{
@@ -4100,6 +4103,7 @@ private:
context.requireDeviceFunctionality("VK_KHR_dynamic_rendering");
context.requireDeviceFunctionality("VK_KHR_multiview");
+
if (m_parameters.viewIndex == TEST_TYPE_DEPTH_DIFFERENT_RANGES)
context.requireDeviceFunctionality("VK_EXT_depth_range_unrestricted");
#ifdef CTS_USES_VULKANSC
diff --git a/external/vulkancts/modules/vulkan/pipeline/vktPipelineMultisampleShaderFragmentMaskTests.cpp b/external/vulkancts/modules/vulkan/pipeline/vktPipelineMultisampleShaderFragmentMaskTests.cpp
index 0426df7fe..6d68f8306 100644
--- a/external/vulkancts/modules/vulkan/pipeline/vktPipelineMultisampleShaderFragmentMaskTests.cpp
+++ b/external/vulkancts/modules/vulkan/pipeline/vktPipelineMultisampleShaderFragmentMaskTests.cpp
@@ -62,7 +62,6 @@ namespace pipeline
namespace
{
using namespace vk;
-using de::UniquePtr;
using de::MovePtr;
using de::SharedPtr;
using tcu::UVec2;
@@ -242,6 +241,7 @@ class SingletonDevice
descriptorBufferFeatures.pNext = &graphicsPipelineLibraryFeaturesEXT;
VkPhysicalDeviceFeatures2 features2 = initVulkanStructure(&descriptorBufferFeatures);
+ m_context.requireInstanceFunctionality("VK_KHR_get_physical_device_properties2");
m_context.getInstanceInterface().getPhysicalDeviceFeatures2(m_context.getPhysicalDevice(), &features2);
if (m_context.isDeviceFunctionalitySupported("VK_EXT_descriptor_buffer"))
diff --git a/external/vulkancts/modules/vulkan/robustness/vktRobustnessExtsTests.cpp b/external/vulkancts/modules/vulkan/robustness/vktRobustnessExtsTests.cpp
index cbb4e4633..8dfacbfe5 100644
--- a/external/vulkancts/modules/vulkan/robustness/vktRobustnessExtsTests.cpp
+++ b/external/vulkancts/modules/vulkan/robustness/vktRobustnessExtsTests.cpp
@@ -552,6 +552,7 @@ void RobustnessExtsTestCase::checkSupport(Context& context) const
}
#endif
+ context.requireInstanceFunctionality("VK_KHR_get_physical_device_properties2");
vki.getPhysicalDeviceFeatures2(physicalDevice, &features2);
if (formatIsR64(m_data.format))
diff --git a/external/vulkancts/modules/vulkan/sparse_resources/vktSparseResourcesBase.cpp b/external/vulkancts/modules/vulkan/sparse_resources/vktSparseResourcesBase.cpp
index bfa54e8d6..6aeec6cb1 100644
--- a/external/vulkancts/modules/vulkan/sparse_resources/vktSparseResourcesBase.cpp
+++ b/external/vulkancts/modules/vulkan/sparse_resources/vktSparseResourcesBase.cpp
@@ -81,7 +81,7 @@ void SparseResourcesBaseInstance::createDeviceSupportingQueues(const QueueRequir
// If requested, create an intance with device groups
if (m_useDeviceGroups)
{
- const std::vector<std::string> requiredExtensions(1, "VK_KHR_device_group_creation");
+ const std::vector<std::string> requiredExtensions { "VK_KHR_device_group_creation", "VK_KHR_get_physical_device_properties2" };
m_deviceGroupInstance = createCustomInstanceWithExtensions(m_context, requiredExtensions);
devGroupProperties = enumeratePhysicalDeviceGroups(m_context.getInstanceInterface(), m_deviceGroupInstance);
m_numPhysicalDevices = devGroupProperties[m_deviceGroupIdx].physicalDeviceCount;
@@ -100,6 +100,10 @@ void SparseResourcesBaseInstance::createDeviceSupportingQueues(const QueueRequir
if (!isCoreDeviceExtension(m_context.getUsedApiVersion(), "VK_KHR_device_group"))
deviceExtensions.push_back("VK_KHR_device_group");
}
+ else
+ {
+ m_context.requireInstanceFunctionality("VK_KHR_get_physical_device_properties2");
+ }
const VkInstance& instance(m_useDeviceGroups ? m_deviceGroupInstance : m_context.getInstance());
InstanceDriver instanceDriver(m_context.getPlatformInterface(), instance);
diff --git a/external/vulkancts/modules/vulkan/subgroups/vktSubgroupUniformControlFlowTests.cpp b/external/vulkancts/modules/vulkan/subgroups/vktSubgroupUniformControlFlowTests.cpp
index 8d8dcf882..8c17c5733 100644
--- a/external/vulkancts/modules/vulkan/subgroups/vktSubgroupUniformControlFlowTests.cpp
+++ b/external/vulkancts/modules/vulkan/subgroups/vktSubgroupUniformControlFlowTests.cpp
@@ -101,6 +101,7 @@ private:
void SubgroupUniformControlFlowTestCase::checkSupport(Context& ctx) const
{
// Check required extensions.
+ ctx.requireInstanceFunctionality("VK_KHR_get_physical_device_properties2");
ctx.requireDeviceFunctionality("VK_KHR_shader_subgroup_uniform_control_flow");
if (m_use_subgroup_size_control)
{
diff --git a/external/vulkancts/modules/vulkan/synchronization/vktGlobalPriorityQueueTests.cpp b/external/vulkancts/modules/vulkan/synchronization/vktGlobalPriorityQueueTests.cpp
index cb074d37f..deb0c1a78 100644
--- a/external/vulkancts/modules/vulkan/synchronization/vktGlobalPriorityQueueTests.cpp
+++ b/external/vulkancts/modules/vulkan/synchronization/vktGlobalPriorityQueueTests.cpp
@@ -519,6 +519,7 @@ void GPQCase::checkSupport (Context& context) const
const InstanceInterface& vki = context.getInstanceInterface();
const VkPhysicalDevice dev = context.getPhysicalDevice();
+ context.requireInstanceFunctionality("VK_KHR_get_physical_device_properties2");
context.requireDeviceFunctionality("VK_EXT_global_priority");
if (!m_config.selectFormat(vki, dev, { VK_FORMAT_R32_SINT, VK_FORMAT_R32_UINT, VK_FORMAT_R8_SINT, VK_FORMAT_R8_UINT }))
diff --git a/external/vulkancts/modules/vulkan/synchronization/vktSynchronizationOperationMultiQueueTests.cpp b/external/vulkancts/modules/vulkan/synchronization/vktSynchronizationOperationMultiQueueTests.cpp
index 2b9196c3a..f6678c25e 100644
--- a/external/vulkancts/modules/vulkan/synchronization/vktSynchronizationOperationMultiQueueTests.cpp
+++ b/external/vulkancts/modules/vulkan/synchronization/vktSynchronizationOperationMultiQueueTests.cpp
@@ -112,11 +112,22 @@ class MultiQueues
};
MultiQueues (Context& context, SynchronizationType type, bool timelineSemaphore)
- : m_instance (createCustomInstanceFromContext(context))
- , m_queueCount (0)
+#ifdef CTS_USES_VULKANSC
+ : m_instance (createCustomInstanceFromContext(context)),
+#else
+ :
+#endif // CTS_USES_VULKANSC
+ m_queueCount (0)
{
+#ifdef CTS_USES_VULKANSC
const InstanceInterface& instanceDriver = m_instance.getDriver();
const VkPhysicalDevice physicalDevice = chooseDevice(instanceDriver, m_instance, context.getTestContext().getCommandLine());
+ const VkInstance instance = m_instance;
+#else
+ const InstanceInterface& instanceDriver = context.getInstanceInterface();
+ const VkPhysicalDevice physicalDevice = context.getPhysicalDevice();
+ const VkInstance instance = context.getInstance();
+#endif // CTS_USES_VULKANSC
const std::vector<VkQueueFamilyProperties> queueFamilyProperties = getPhysicalDeviceQueueFamilyProperties(instanceDriver, physicalDevice);
for (deUint32 queuePropertiesNdx = 0; queuePropertiesNdx < queueFamilyProperties.size(); ++queuePropertiesNdx)
@@ -214,11 +225,11 @@ class MultiQueues
DE_NULL //const VkPhysicalDeviceFeatures* pEnabledFeatures;
};
- m_logicalDevice = createCustomDevice(context.getTestContext().getCommandLine().isValidationEnabled(), context.getPlatformInterface(), m_instance, instanceDriver, physicalDevice, &deviceInfo);
+ m_logicalDevice = createCustomDevice(context.getTestContext().getCommandLine().isValidationEnabled(), context.getPlatformInterface(), instance, instanceDriver, physicalDevice, &deviceInfo);
#ifndef CTS_USES_VULKANSC
- m_deviceDriver = de::MovePtr<DeviceDriver>(new DeviceDriver(context.getPlatformInterface(), m_instance, *m_logicalDevice));
+ m_deviceDriver = de::MovePtr<DeviceDriver>(new DeviceDriver(context.getPlatformInterface(), instance, *m_logicalDevice));
#else
- m_deviceDriver = de::MovePtr<DeviceDriverSC, DeinitDeviceDeleter>(new DeviceDriverSC(context.getPlatformInterface(), m_instance, *m_logicalDevice, context.getTestContext().getCommandLine(), context.getResourceInterface(), context.getDeviceVulkanSC10Properties(), context.getDeviceProperties()), vk::DeinitDeviceDeleter(context.getResourceInterface().get(), *m_logicalDevice));
+ m_deviceDriver = de::MovePtr<DeviceDriverSC, DeinitDeviceDeleter>(new DeviceDriverSC(context.getPlatformInterface(), instance, *m_logicalDevice, context.getTestContext().getCommandLine(), context.getResourceInterface(), context.getDeviceVulkanSC10Properties(), context.getDeviceProperties()), vk::DeinitDeviceDeleter(context.getResourceInterface().get(), *m_logicalDevice));
#endif // CTS_USES_VULKANSC
m_allocator = MovePtr<Allocator>(new SimpleAllocator(*m_deviceDriver, *m_logicalDevice, getPhysicalDeviceMemoryProperties(instanceDriver, physicalDevice)));
@@ -362,7 +373,9 @@ public:
}
private:
+#ifdef CTS_USES_VULKANSC
CustomInstance m_instance;
+#endif // CTS_USES_VULKANSC
Move<VkDevice> m_logicalDevice;
#ifndef CTS_USES_VULKANSC
de::MovePtr<vk::DeviceDriver> m_deviceDriver;
diff --git a/external/vulkancts/modules/vulkan/synchronization/vktSynchronizationSmokeTests.cpp b/external/vulkancts/modules/vulkan/synchronization/vktSynchronizationSmokeTests.cpp
index 58129e815..3d2eb6993 100644
--- a/external/vulkancts/modules/vulkan/synchronization/vktSynchronizationSmokeTests.cpp
+++ b/external/vulkancts/modules/vulkan/synchronization/vktSynchronizationSmokeTests.cpp
@@ -62,7 +62,6 @@ namespace
using std::vector;
using std::string;
using tcu::TestLog;
-using de::UniquePtr;
using de::MovePtr;
static const deUint64 DEFAULT_TIMEOUT = 2ull*1000*1000*1000; //!< 2 seconds in nanoseconds
@@ -1150,8 +1149,8 @@ tcu::TestStatus testSemaphores (Context& context, SemaphoreTestConfig config)
TestLog& log = context.getTestContext().getLog();
const PlatformInterface& platformInterface = context.getPlatformInterface();
- const CustomInstance instance (createCustomInstanceFromContext(context));
- const InstanceInterface& instanceDriver = instance.getDriver();
+ const auto instance = context.getInstance();
+ const auto& instanceDriver = context.getInstanceInterface();
const VkPhysicalDevice physicalDevice = chooseDevice(instanceDriver, instance, context.getTestContext().getCommandLine());
deUint32 queueFamilyIdx;
bool isTimelineSemaphore (config.semaphoreType == VK_SEMAPHORE_TYPE_TIMELINE);
diff --git a/external/vulkancts/modules/vulkan/synchronization/vktSynchronizationTimelineSemaphoreTests.cpp b/external/vulkancts/modules/vulkan/synchronization/vktSynchronizationTimelineSemaphoreTests.cpp
index 961a09f8d..869b20390 100644
--- a/external/vulkancts/modules/vulkan/synchronization/vktSynchronizationTimelineSemaphoreTests.cpp
+++ b/external/vulkancts/modules/vulkan/synchronization/vktSynchronizationTimelineSemaphoreTests.cpp
@@ -68,7 +68,6 @@ using namespace vk;
using tcu::TestLog;
using de::MovePtr;
using de::SharedPtr;
-using de::UniquePtr;
template<typename T>
inline SharedPtr<Move<T> > makeVkSharedPtr (Move<T> move)
@@ -1391,8 +1390,7 @@ Move<VkDevice> createTestDevice(Context& context, const VkInstance& instance, co
class SingletonDevice
{
SingletonDevice (Context& context, SynchronizationType type)
- : m_instance (createCustomInstanceFromContext(context))
- , m_logicalDevice (createTestDevice(context, m_instance, m_instance.getDriver(), type))
+ : m_logicalDevice (createTestDevice(context, context.getInstance(), context.getInstanceInterface(), type))
{
}
@@ -1407,24 +1405,11 @@ public:
return m_singletonDevice->m_logicalDevice;
}
- static vk::VkInstance getInstance()
- {
- DE_ASSERT(m_singletonDevice);
- return m_singletonDevice->m_instance;
- }
-
- static const vk::InstanceDriver& getDriver()
- {
- DE_ASSERT(m_singletonDevice);
- return m_singletonDevice->m_instance.getDriver();
- }
-
static void destroy()
{
m_singletonDevice.clear();
}
private:
- CustomInstance m_instance;
const Unique<vk::VkDevice> m_logicalDevice;
static SharedPtr<SingletonDevice> m_singletonDevice;
@@ -1455,19 +1440,21 @@ public:
, m_device (SingletonDevice::getDevice(context, type))
, m_context (context)
#ifndef CTS_USES_VULKANSC
- , m_deviceDriver (de::MovePtr<DeviceDriver>(new DeviceDriver(context.getPlatformInterface(), SingletonDevice::getInstance(), *m_device)))
+ , m_deviceDriver (de::MovePtr<DeviceDriver>(new DeviceDriver(context.getPlatformInterface(), context.getInstance(), *m_device)))
#else
- , m_deviceDriver (de::MovePtr<DeviceDriverSC, DeinitDeviceDeleter>(new DeviceDriverSC(context.getPlatformInterface(), SingletonDevice::getInstance(), *m_device, context.getTestContext().getCommandLine(), context.getResourceInterface(), m_context.getDeviceVulkanSC10Properties(), m_context.getDeviceProperties()), vk::DeinitDeviceDeleter(context.getResourceInterface().get(), *m_device)))
+ , m_deviceDriver (de::MovePtr<DeviceDriverSC, DeinitDeviceDeleter>(new DeviceDriverSC(context.getPlatformInterface(), context.getInstance(), *m_device, context.getTestContext().getCommandLine(), context.getResourceInterface(), m_context.getDeviceVulkanSC10Properties(), m_context.getDeviceProperties()), vk::DeinitDeviceDeleter(context.getResourceInterface().get(), *m_device)))
#endif // CTS_USES_VULKANSC
, m_allocator (new SimpleAllocator(*m_deviceDriver, *m_device,
- getPhysicalDeviceMemoryProperties(SingletonDevice::getDriver(),
- chooseDevice(SingletonDevice::getDriver(), SingletonDevice::getInstance(), context.getTestContext().getCommandLine()))))
+ getPhysicalDeviceMemoryProperties(context.getInstanceInterface(),
+ chooseDevice(context.getInstanceInterface(), context.getInstance(), context.getTestContext().getCommandLine()))))
, m_opContext (context, type, *m_deviceDriver, *m_device, *m_allocator, pipelineCacheData)
{
+ const auto& vki = m_context.getInstanceInterface();
+ const auto instance = m_context.getInstance();
const DeviceInterface& vk = *m_deviceDriver;
const VkDevice device = *m_device;
- const VkPhysicalDevice physicalDevice = chooseDevice(SingletonDevice::getDriver(), SingletonDevice::getInstance(), context.getTestContext().getCommandLine());
- const std::vector<VkQueueFamilyProperties> queueFamilyProperties = getPhysicalDeviceQueueFamilyProperties(SingletonDevice::getDriver(), physicalDevice);
+ const VkPhysicalDevice physicalDevice = chooseDevice(vki, instance, context.getTestContext().getCommandLine());
+ const std::vector<VkQueueFamilyProperties> queueFamilyProperties = getPhysicalDeviceQueueFamilyProperties(vki, physicalDevice);
const deUint32 universalQueueFamilyIndex = context.getUniversalQueueFamilyIndex();
de::Random rng (1234);
deUint32 lastCopyOpIdx = 0;
@@ -1887,19 +1874,21 @@ public:
, m_device (SingletonDevice::getDevice(context, type))
, m_context (context)
#ifndef CTS_USES_VULKANSC
- , m_deviceDriver(de::MovePtr<DeviceDriver>(new DeviceDriver(context.getPlatformInterface(), SingletonDevice::getInstance(), *m_device)))
+ , m_deviceDriver(de::MovePtr<DeviceDriver>(new DeviceDriver(context.getPlatformInterface(), context.getInstance(), *m_device)))
#else
- , m_deviceDriver(de::MovePtr<DeviceDriverSC, DeinitDeviceDeleter>(new DeviceDriverSC(context.getPlatformInterface(), SingletonDevice::getInstance(), *m_device, context.getTestContext().getCommandLine(), context.getResourceInterface(), m_context.getDeviceVulkanSC10Properties(), m_context.getDeviceProperties()), vk::DeinitDeviceDeleter(context.getResourceInterface().get(), *m_device)))
+ , m_deviceDriver(de::MovePtr<DeviceDriverSC, DeinitDeviceDeleter>(new DeviceDriverSC(context.getPlatformInterface(), context.getInstance(), *m_device, context.getTestContext().getCommandLine(), context.getResourceInterface(), m_context.getDeviceVulkanSC10Properties(), m_context.getDeviceProperties()), vk::DeinitDeviceDeleter(context.getResourceInterface().get(), *m_device)))
#endif // CTS_USES_VULKANSC
, m_allocator (new SimpleAllocator(*m_deviceDriver, *m_device,
- getPhysicalDeviceMemoryProperties(SingletonDevice::getDriver(),
- chooseDevice(SingletonDevice::getDriver(), SingletonDevice::getInstance(), context.getTestContext().getCommandLine()))))
+ getPhysicalDeviceMemoryProperties(context.getInstanceInterface(),
+ chooseDevice(context.getInstanceInterface(), context.getInstance(), context.getTestContext().getCommandLine()))))
, m_opContext (context, type, *m_deviceDriver, *m_device, *m_allocator, pipelineCacheData)
{
+ const auto& vki = m_context.getInstanceInterface();
+ const auto instance = m_context.getInstance();
const DeviceInterface& vk = *m_deviceDriver;
const VkDevice device = *m_device;
- const VkPhysicalDevice physicalDevice = chooseDevice(SingletonDevice::getDriver(), SingletonDevice::getInstance(), context.getTestContext().getCommandLine());
- const std::vector<VkQueueFamilyProperties> queueFamilyProperties = getPhysicalDeviceQueueFamilyProperties(SingletonDevice::getDriver(), physicalDevice);
+ const VkPhysicalDevice physicalDevice = chooseDevice(vki, instance, context.getTestContext().getCommandLine());
+ const std::vector<VkQueueFamilyProperties> queueFamilyProperties = getPhysicalDeviceQueueFamilyProperties(vki, physicalDevice);
const deUint32 universalQueueFamilyIndex = context.getUniversalQueueFamilyIndex();
de::Random rng (1234);
deUint32 lastCopyOpIdx = 0;