if (m_options == COPY_MS_IMAGE_TO_MS_IMAGE_COMPUTE || m_options == COPY_MS_IMAGE_TO_MS_IMAGE_TRANSFER)
{
// 'queueFamilyIndex' will be updated in 'createCustomDevice()' to match the requested queue type.
- uint32_t queueFamilyIndex = 0;
+ #ifdef CTS_USES_VULKANSC
+ m_customDevice = createCustomDevice(context, m_options, m_customInstance, queueFamilyIndex);
+ #else
m_customDevice = createCustomDevice(context, m_options, queueFamilyIndex);
+ #endif // CTS_USES_VULKANSC
m_device = m_customDevice.get();
- m_deviceDriver = de::MovePtr<DeviceDriverSC, DeinitDeviceDeleter>(new DeviceDriverSC(context.getPlatformInterface(), m_customInstance, m_device, context.getTestContext().getCommandLine(), context.getResourceInterface(), context.getDeviceVulkanSC10Properties()), vk::DeinitDeviceDeleter(context.getResourceInterface().get(), m_device));
+
+ #ifndef CTS_USES_VULKANSC
+ m_deviceDriver = de::MovePtr<DeviceDriver>(new DeviceDriver(context.getPlatformInterface(), m_customInstance, m_device));
+ #else
++ m_deviceDriver = de::MovePtr<DeviceDriverSC, DeinitDeviceDeleter>(new DeviceDriverSC(context.getPlatformInterface(), m_customInstance, m_device, context.getTestContext().getCommandLine(), context.getResourceInterface(), context.getDeviceVulkanSC10Properties(), context.getDeviceProperties()), vk::DeinitDeviceDeleter(context.getResourceInterface().get(), m_device));
+ #endif // CTS_USES_VULKANSC
+
m_queue = getDeviceQueue(m_context.getDeviceInterface(), m_device, context.getUniversalQueueFamilyIndex(), 0u);
m_alternativeQueue = getDeviceQueue(m_context.getDeviceInterface(), m_device, queueFamilyIndex, 0u);
- m_alternativeQueueFamilyIndex = queueFamilyIndex;
- m_alternativeAllocator = de::MovePtr<Allocator>(new SimpleAllocator(vk, m_device, getPhysicalDeviceMemoryProperties(vki, context.getPhysicalDevice())));
- m_allocator = m_alternativeAllocator.get();
+ }
+
+ m_alternativeQueueFamilyIndex = queueFamilyIndex;
+
+ #ifndef CTS_USES_VULKANSC
+ const DeviceInterface& vk = m_context.getDeviceInterface();
+ #else
+ const DeviceInterface& vk = (DE_NULL != m_deviceDriver) ? *m_deviceDriver : m_context.getDeviceInterface();
+ #endif // CTS_USES_VULKANSC
- // Release the command buffer.
- m_cmdBuffer = Move<VkCommandBuffer>();
+ m_alternativeAllocator = de::MovePtr<Allocator>(new SimpleAllocator(vk, m_device, getPhysicalDeviceMemoryProperties(vki, context.getPhysicalDevice())));
+ m_allocator = m_alternativeAllocator.get();
- // Create a new command pool and allocate a command buffer with universal queue family index and destroy the old one.
- m_cmdPool = createCommandPool(vk, m_device, VK_COMMAND_POOL_CREATE_RESET_COMMAND_BUFFER_BIT, context.getUniversalQueueFamilyIndex());
- m_cmdBuffer = allocateCommandBuffer(vk, m_device, *m_cmdPool, VK_COMMAND_BUFFER_LEVEL_PRIMARY);
+ // Release the command buffer.
+ m_cmdBuffer = Move<VkCommandBuffer>();
- // Create a command pool and allocate a command buffer from the queue family supporting compute / transfer capabilities.
- m_alternativeCmdPool = createCommandPool(vk, m_device, VK_COMMAND_POOL_CREATE_RESET_COMMAND_BUFFER_BIT, queueFamilyIndex);
- m_alternativeCmdBuffer = allocateCommandBuffer(vk, m_device, *m_alternativeCmdPool, VK_COMMAND_BUFFER_LEVEL_PRIMARY);
- }
+ // Create a new command pool and allocate a command buffer with universal queue family index and destroy the old one.
+ m_cmdPool = createCommandPool(vk, m_device, VK_COMMAND_POOL_CREATE_RESET_COMMAND_BUFFER_BIT, context.getUniversalQueueFamilyIndex());
+ m_cmdBuffer = allocateCommandBuffer(vk, m_device, *m_cmdPool, VK_COMMAND_BUFFER_LEVEL_PRIMARY);
+
+ // Create a command pool and allocate a command buffer from the queue family supporting compute / transfer capabilities.
+ m_alternativeCmdPool = createCommandPool(vk, m_device, VK_COMMAND_POOL_CREATE_RESET_COMMAND_BUFFER_BIT, queueFamilyIndex);
+ m_alternativeCmdBuffer = allocateCommandBuffer(vk, m_device, *m_alternativeCmdPool, VK_COMMAND_BUFFER_LEVEL_PRIMARY);
Allocator& memAlloc = *m_allocator;
const VkPhysicalDevice vkPhysDevice = m_context.getPhysicalDevice();