VK_FALSE // VkBool32 protectedMemory;
};
-
++#ifndef CTS_USES_VULKANSC
+ VkPhysicalDeviceCoherentMemoryFeaturesAMD coherentMemoryFeatures =
+ {
+ VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_COHERENT_MEMORY_FEATURES_AMD, // VkStructureType sType
+ &protectedMemoryFeature, // const void* pNext
+ VK_FALSE // VkBool32 deviceCoherentMemory;
+ };
++#endif // CTS_USES_VULKANSC
+
VkPhysicalDeviceFeatures features;
deMemset(&features, 0, sizeof(vk::VkPhysicalDeviceFeatures));
VkPhysicalDeviceFeatures2 features2 =
{
VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FEATURES_2, // VkStructureType sType
++#ifndef CTS_USES_VULKANSC
+ &coherentMemoryFeatures, // const void* pNext
++#else
+ &protectedMemoryFeature, // const void* pNext
++#endif // CTS_USES_VULKANSC
features // VkPhysicalDeviceFeatures features
};
// Check if the physical device supports the protected memory feature
- instanceDriver.getPhysicalDeviceFeatures2(m_context.getPhysicalDevice(), &features2);
+ instanceDriver.getPhysicalDeviceFeatures2(physicalDevice, &features2);
- protMemSupported = protectedMemoryFeature.protectedMemory;
+ protMemSupported = protectedMemoryFeature.protectedMemory;
++#ifndef CTS_USES_VULKANSC
+ deviceCoherentMemSupported = coherentMemoryFeatures.deviceCoherentMemory;
++#endif // CTS_USES_VULKANSC
VkDeviceQueueCreateFlags queueCreateFlags = protMemSupported ? (vk::VkDeviceQueueCreateFlags)vk::VK_DEVICE_QUEUE_CREATE_PROTECTED_BIT : 0u;
DE_NULL, // const char* const* ppEnabledLayerNames;
deUint32(deviceExtensions.size()), // uint32_t enabledExtensionCount;
(deviceExtensions.empty()) ? DE_NULL : deviceExtensions.data(), // const char* const* ppEnabledExtensionNames;
- (protMemSupported || usePageable) ? DE_NULL : &deviceFeatures // const VkPhysicalDeviceFeatures* pEnabledFeatures;
+ (protMemSupported || usePageable || deviceCoherentMemSupported) ? DE_NULL : &deviceFeatures // const VkPhysicalDeviceFeatures* pEnabledFeatures;
};
- m_logicalDevice = createCustomDevice(m_context.getTestContext().getCommandLine().isValidationEnabled(), m_context.getPlatformInterface(), instance, instanceDriver, m_context.getPhysicalDevice(), &deviceInfo);
+ m_logicalDevice = createCustomDevice(m_context.getTestContext().getCommandLine().isValidationEnabled(), m_context.getPlatformInterface(), m_deviceGroupInstance, instanceDriver, physicalDevice, &deviceInfo);
+#ifndef CTS_USES_VULKANSC
+ m_deviceDriver = de::MovePtr<DeviceDriver>(new DeviceDriver(m_context.getPlatformInterface(), m_deviceGroupInstance, *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()), vk::DeinitDeviceDeleter(m_context.getResourceInterface().get(), *m_logicalDevice));
+#endif // CTS_USES_VULKANSC
}
void BaseAllocateTestInstance::createDeviceGroup (void)