{
// Creates a custom device with robust buffer access and variable pointer features.
-Move<VkDevice> createRobustBufferAccessVariablePointersDevice (Context& context, VkInstance instance, const InstanceInterface& vki )
+Move<VkDevice> createRobustBufferAccessVariablePointersDevice (Context& context)
{
auto pointerFeatures = context.getVariablePointersFeatures();
features2.features.robustBufferAccess = VK_TRUE;
features2.pNext = &pointerFeatures;
- return createRobustBufferAccessDevice(context, instance, vki, &features2);
+ return createRobustBufferAccessDevice(context, &features2);
}
// A supplementary structures that can hold information about buffer size
{
public:
AccessInstance (Context& context,
- std::shared_ptr<CustomInstanceWrapper> instanceWrapper,
Move<VkDevice> device,
#ifndef CTS_USES_VULKANSC
de::MovePtr<vk::DeviceDriver> deviceDriver,
VkDeviceSize valueSize);
protected:
- std::shared_ptr<CustomInstanceWrapper> m_instanceWrapper;
Move<VkDevice> m_device;
#ifndef CTS_USES_VULKANSC
de::MovePtr<vk::DeviceDriver> m_deviceDriver;
{
public:
ReadInstance (Context& context,
- std::shared_ptr<CustomInstanceWrapper> instanceWrapper,
Move<VkDevice> device,
#ifndef CTS_USES_VULKANSC
de::MovePtr<vk::DeviceDriver> deviceDriver,
{
public:
WriteInstance (Context& context,
- std::shared_ptr<CustomInstanceWrapper> instanceWrapper,
Move<VkDevice> device,
#ifndef CTS_USES_VULKANSC
de::MovePtr<vk::DeviceDriver> deviceDriver,
TestInstance* RobustReadTest::createInstance (Context& context) const
{
- std::shared_ptr<CustomInstanceWrapper> instanceWrapper(new CustomInstanceWrapper(context));
- auto device = createRobustBufferAccessVariablePointersDevice(context, instanceWrapper->instance, instanceWrapper->instance.getDriver());
+ auto device = createRobustBufferAccessVariablePointersDevice(context);
#ifndef CTS_USES_VULKANSC
- de::MovePtr<vk::DeviceDriver> deviceDriver = de::MovePtr<DeviceDriver>(new DeviceDriver(context.getPlatformInterface(), instanceWrapper->instance, *device));
+ de::MovePtr<vk::DeviceDriver> deviceDriver = de::MovePtr<DeviceDriver>(new DeviceDriver(context.getPlatformInterface(), context.getInstance(), *device));
#else
- de::MovePtr<vk::DeviceDriverSC, vk::DeinitDeviceDeleter> deviceDriver = de::MovePtr<DeviceDriverSC, DeinitDeviceDeleter>(new DeviceDriverSC(context.getPlatformInterface(), instanceWrapper->instance, *device, context.getTestContext().getCommandLine(), context.getResourceInterface(), context.getDeviceVulkanSC10Properties(), context.getDeviceProperties()), vk::DeinitDeviceDeleter(context.getResourceInterface().get(), *device));
+ de::MovePtr<vk::DeviceDriverSC, vk::DeinitDeviceDeleter> deviceDriver = de::MovePtr<DeviceDriverSC, DeinitDeviceDeleter>(new DeviceDriverSC(context.getPlatformInterface(), context.getInstance(), *device, context.getTestContext().getCommandLine(), context.getResourceInterface(), context.getDeviceVulkanSC10Properties(), context.getDeviceProperties()), vk::DeinitDeviceDeleter(context.getResourceInterface().get(), *device));
#endif // CTS_USES_VULKANSC
- return new ReadInstance(context, instanceWrapper, device, deviceDriver, m_shaderType, m_shaderStage, m_bufferFormat, m_readAccessRange, m_accessOutOfBackingMemory);
+ return new ReadInstance(context, device, deviceDriver, m_shaderType, m_shaderStage, m_bufferFormat, m_readAccessRange, m_accessOutOfBackingMemory);
}
void RobustReadTest::initPrograms(SourceCollections& programCollection) const
TestInstance* RobustWriteTest::createInstance (Context& context) const
{
- std::shared_ptr<CustomInstanceWrapper> instanceWrapper(new CustomInstanceWrapper(context));
- auto device = createRobustBufferAccessVariablePointersDevice(context, instanceWrapper->instance, instanceWrapper->instance.getDriver());
+ auto device = createRobustBufferAccessVariablePointersDevice(context);
#ifndef CTS_USES_VULKANSC
- de::MovePtr<vk::DeviceDriver> deviceDriver = de::MovePtr<DeviceDriver>(new DeviceDriver(context.getPlatformInterface(), instanceWrapper->instance, *device));
+ de::MovePtr<vk::DeviceDriver> deviceDriver = de::MovePtr<DeviceDriver>(new DeviceDriver(context.getPlatformInterface(), context.getInstance(), *device));
#else
- de::MovePtr<vk::DeviceDriverSC, vk::DeinitDeviceDeleter> deviceDriver = de::MovePtr<DeviceDriverSC, DeinitDeviceDeleter>(new DeviceDriverSC(context.getPlatformInterface(), instanceWrapper->instance, *device, context.getTestContext().getCommandLine(), context.getResourceInterface(), context.getDeviceVulkanSC10Properties(), context.getDeviceProperties()), vk::DeinitDeviceDeleter(context.getResourceInterface().get(), *device));
+ de::MovePtr<vk::DeviceDriverSC, vk::DeinitDeviceDeleter> deviceDriver = de::MovePtr<DeviceDriverSC, DeinitDeviceDeleter>(new DeviceDriverSC(context.getPlatformInterface(), context.getInstance(), *device, context.getTestContext().getCommandLine(), context.getResourceInterface(), context.getDeviceVulkanSC10Properties(), context.getDeviceProperties()), vk::DeinitDeviceDeleter(context.getResourceInterface().get(), *device));
#endif // CTS_USES_VULKANSC
- return new WriteInstance(context, instanceWrapper, device, deviceDriver, m_shaderType, m_shaderStage, m_bufferFormat, m_writeAccessRange, m_accessOutOfBackingMemory);
+ return new WriteInstance(context, device, deviceDriver, m_shaderType, m_shaderStage, m_bufferFormat, m_writeAccessRange, m_accessOutOfBackingMemory);
}
void RobustWriteTest::initPrograms(SourceCollections& programCollection) const
}
AccessInstance::AccessInstance (Context& context,
- std::shared_ptr<CustomInstanceWrapper> instanceWrapper,
Move<VkDevice> device,
#ifndef CTS_USES_VULKANSC
de::MovePtr<vk::DeviceDriver> deviceDriver,
VkDeviceSize outBufferAccessRange,
bool accessOutOfBackingMemory)
: vkt::TestInstance (context)
- , m_instanceWrapper (instanceWrapper)
, m_device (device)
, m_deviceDriver (deviceDriver)
, m_shaderType (shaderType)
{
tcu::TestLog& log = context.getTestContext().getLog();
const DeviceInterface& vk = *m_deviceDriver;
+ const auto& vki = context.getInstanceInterface();
+ const auto instance = context.getInstance();
const deUint32 queueFamilyIndex = context.getUniversalQueueFamilyIndex();
- const VkPhysicalDevice physicalDevice = chooseDevice(instanceWrapper->instance.getDriver(), instanceWrapper->instance, context.getTestContext().getCommandLine());
- SimpleAllocator memAlloc (vk, *m_device, getPhysicalDeviceMemoryProperties(instanceWrapper->instance.getDriver(), physicalDevice));
+ const VkPhysicalDevice physicalDevice = chooseDevice(vki, instance, context.getTestContext().getCommandLine());
+ SimpleAllocator memAlloc (vk, *m_device, getPhysicalDeviceMemoryProperties(vki, physicalDevice));
DE_ASSERT(RobustAccessWithPointersTest::s_numberOfBytesAccessed % sizeof(deUint32) == 0);
DE_ASSERT(inBufferAccessRange <= RobustAccessWithPointersTest::s_numberOfBytesAccessed);
if (m_shaderStage == VK_SHADER_STAGE_COMPUTE_BIT)
{
- m_testEnvironment = de::MovePtr<TestEnvironment>(new ComputeEnvironment(m_context, m_instanceWrapper->instance, m_instanceWrapper->instance.getDriver(), *m_device, *m_descriptorSetLayout, *m_descriptorSet));
+ m_testEnvironment = de::MovePtr<TestEnvironment>(new ComputeEnvironment(m_context, *m_deviceDriver, *m_device, *m_descriptorSetLayout, *m_descriptorSet));
}
else
{
};
m_testEnvironment = de::MovePtr<TestEnvironment>(new GraphicsEnvironment(m_context,
- m_instanceWrapper->instance,
- m_instanceWrapper->instance.getDriver(),
+ *m_deviceDriver,
*m_device,
*m_descriptorSetLayout,
*m_descriptorSet,
// BufferReadInstance
ReadInstance::ReadInstance (Context& context,
- std::shared_ptr<CustomInstanceWrapper> instanceWrapper,
Move<VkDevice> device,
#ifndef CTS_USES_VULKANSC
de::MovePtr<vk::DeviceDriver> deviceDriver,
VkDeviceSize inBufferAccessRange,
bool accessOutOfBackingMemory)
- : AccessInstance (context, instanceWrapper, device, deviceDriver, shaderType, shaderStage, bufferFormat,
+ : AccessInstance (context, device, deviceDriver, shaderType, shaderStage, bufferFormat,
BUFFER_ACCESS_TYPE_READ_FROM_STORAGE,
inBufferAccessRange, RobustAccessWithPointersTest::s_numberOfBytesAccessed,
accessOutOfBackingMemory)
// BufferWriteInstance
WriteInstance::WriteInstance (Context& context,
- std::shared_ptr<CustomInstanceWrapper> instanceWrapper,
Move<VkDevice> device,
#ifndef CTS_USES_VULKANSC
de::MovePtr<vk::DeviceDriver> deviceDriver,
VkDeviceSize writeBufferAccessRange,
bool accessOutOfBackingMemory)
- : AccessInstance (context, instanceWrapper, device, deviceDriver, shaderType, shaderStage, bufferFormat,
+ : AccessInstance (context, device, deviceDriver, shaderType, shaderStage, bufferFormat,
BUFFER_ACCESS_TYPE_WRITE_TO_STORAGE,
RobustAccessWithPointersTest::s_numberOfBytesAccessed, writeBufferAccessRange,
accessOutOfBackingMemory)
public:
Robustness1AccessInstance (TestContext& testCtx,
Context& context,
- std::shared_ptr<CustomInstanceWrapper> instanceWrapper,
T device,
DeviceDriverPtr deviceDriver,
const Robustness1TestInfo& testInfo);
virtual TestStatus iterate() override;
private:
- std::shared_ptr<CustomInstanceWrapper> m_instanceWrapper;
TestContext& m_testCtx;
T m_device;
#ifndef CTS_USES_VULKANSC
template<typename T>
Robustness1AccessInstance<T>::Robustness1AccessInstance (TestContext& testCtx,
Context& context,
- std::shared_ptr<CustomInstanceWrapper> instanceWrapper,
T device,
DeviceDriverPtr deviceDriver,
const Robustness1TestInfo& testInfo)
: vkt::TestInstance (context)
- , m_instanceWrapper (instanceWrapper)
, m_testCtx (testCtx)
, m_device (device)
, m_deviceDriver (deviceDriver)
TestInstance *Robustness1AccessTest::createInstance (Context &context) const
{
- std::shared_ptr<CustomInstanceWrapper> instanceWrapper(new CustomInstanceWrapper(context));
- Move<VkDevice> device = createRobustBufferAccessDevice(context, instanceWrapper->instance, instanceWrapper->instance.getDriver());
+ Move<VkDevice> device = createRobustBufferAccessDevice(context);
#ifndef CTS_USES_VULKANSC
- DeviceDriverPtr deviceDriver = DeviceDriverPtr (new DeviceDriver(context.getPlatformInterface(), instanceWrapper->instance, *device));
+ DeviceDriverPtr deviceDriver = DeviceDriverPtr (new DeviceDriver(context.getPlatformInterface(), context.getInstance(), *device));
#else
- DeviceDriverPtr deviceDriver = DeviceDriverPtr (new DeviceDriverSC(context.getPlatformInterface(), instanceWrapper->instance, *device, context.getTestContext().getCommandLine(), context.getResourceInterface(), context.getDeviceVulkanSC10Properties(), context.getDeviceProperties()), vk::DeinitDeviceDeleter( context.getResourceInterface().get(), *device ));
+ DeviceDriverPtr deviceDriver = DeviceDriverPtr (new DeviceDriverSC(context.getPlatformInterface(), context.getInstance(), *device, context.getTestContext().getCommandLine(), context.getResourceInterface(), context.getDeviceVulkanSC10Properties(), context.getDeviceProperties()), vk::DeinitDeviceDeleter( context.getResourceInterface().get(), *device ));
#endif // CTS_USES_VULKANSC
- return new Robustness1AccessInstance<Move<VkDevice>>(m_testCtx, context, instanceWrapper, device, deviceDriver, m_testInfo);
+ return new Robustness1AccessInstance<Move<VkDevice>>(m_testCtx, context, device, deviceDriver, m_testInfo);
}
void Robustness1AccessTest::initPrograms (SourceCollections& programCollection) const
bool readFromStorage);
protected:
+ bool is64BitsTest (void) const;
+ bool isVertexTest (void) const;
+ bool isFragmentTest (void) const;
+
static void initBufferAccessPrograms (SourceCollections& programCollection,
VkShaderStageFlags shaderStage,
ShaderType shaderType,
{
public:
BufferAccessInstance (Context& context,
- std::shared_ptr<CustomInstanceWrapper> instanceWrapper,
Move<VkDevice> device,
#ifndef CTS_USES_VULKANSC
- de::MovePtr<vk::DeviceDriver> deviceDriver,
+ de::MovePtr<vk::DeviceDriver> deviceDriver,
#else
- de::MovePtr<vk::DeviceDriverSC,vk::DeinitDeviceDeleter> deviceDriver,
+ de::MovePtr<vk::DeviceDriverSC,vk::DeinitDeviceDeleter> deviceDriver,
#endif // CTS_USES_VULKANSC
ShaderType shaderType,
VkShaderStageFlags shaderStage,
bool isOutBufferValueUnchanged (VkDeviceSize offsetInBytes, VkDeviceSize valueSize);
protected:
- std::shared_ptr<CustomInstanceWrapper> m_instanceWrapper;
Move<VkDevice> m_device;
#ifndef CTS_USES_VULKANSC
de::MovePtr<vk::DeviceDriver> m_deviceDriver;
{
public:
BufferReadInstance (Context& context,
- std::shared_ptr<CustomInstanceWrapper> instanceWrapper,
Move<VkDevice> device,
#ifndef CTS_USES_VULKANSC
de::MovePtr<vk::DeviceDriver> deviceDriver,
{
public:
BufferWriteInstance (Context& context,
- std::shared_ptr<CustomInstanceWrapper> instanceWrapper,
Move<VkDevice> device,
#ifndef CTS_USES_VULKANSC
de::MovePtr<vk::DeviceDriver> deviceDriver,
{
if (context.isDeviceFunctionalitySupported("VK_KHR_portability_subset") && !context.getDeviceFeatures().robustBufferAccess)
TCU_THROW(NotSupportedError, "VK_KHR_portability_subset: robustBufferAccess not supported by this implementation");
+
+ if (is64BitsTest())
+ context.requireDeviceCoreFeature(DEVICE_CORE_FEATURE_SHADER_INT64);
+
+ if (isVertexTest())
+ context.requireDeviceCoreFeature(DEVICE_CORE_FEATURE_VERTEX_PIPELINE_STORES_AND_ATOMICS);
+
+ if (isFragmentTest())
+ context.requireDeviceCoreFeature(DEVICE_CORE_FEATURE_FRAGMENT_STORES_AND_ATOMICS);
}
void RobustBufferAccessTest::genBufferShaderAccess (ShaderType shaderType,
<< " }\n";
}
+bool RobustBufferAccessTest::is64BitsTest (void) const
+{
+ return (m_bufferFormat == VK_FORMAT_R64_SINT || m_bufferFormat == VK_FORMAT_R64_UINT);
+}
+
+bool RobustBufferAccessTest::isVertexTest (void) const
+{
+ return ((m_shaderStage & VK_SHADER_STAGE_VERTEX_BIT) != 0u);
+}
+
+bool RobustBufferAccessTest::isFragmentTest (void) const
+{
+ return ((m_shaderStage & VK_SHADER_STAGE_FRAGMENT_BIT) != 0u);
+}
+
void RobustBufferAccessTest::initBufferAccessPrograms (SourceCollections& programCollection,
VkShaderStageFlags shaderStage,
ShaderType shaderType,
TestInstance* RobustBufferReadTest::createInstance (Context& context) const
{
- std::shared_ptr<CustomInstanceWrapper> instanceWrapper(new CustomInstanceWrapper(context));
- VkPhysicalDeviceFeatures2 features2 = initVulkanStructure();
+ const bool is64BitsTest_ = is64BitsTest();
+ const bool isVertexTest_ = isVertexTest();
+ const bool isFragmentTest_ = isFragmentTest();
+
+ VkPhysicalDeviceFeatures2 features2 = initVulkanStructure();
+
+ if (!m_testPipelineRobustness)
+ features2.features.robustBufferAccess = VK_TRUE;
+
+ if (is64BitsTest_)
+ features2.features.shaderInt64 = VK_TRUE;
+
+ if (isVertexTest_)
+ features2.features.vertexPipelineStoresAndAtomics = VK_TRUE;
+
+ if (isFragmentTest_)
+ features2.features.fragmentStoresAndAtomics = VK_TRUE;
#ifndef CTS_USES_VULKANSC
- VkPhysicalDevicePipelineRobustnessFeaturesEXT pipelineRobustnessFeatures = initVulkanStructure();
+ VkPhysicalDevicePipelineRobustnessFeaturesEXT pipelineRobustnessFeatures = initVulkanStructure();
if (m_testPipelineRobustness)
{
context.requireDeviceFunctionality("VK_EXT_pipeline_robustness");
}
#endif
- Move<VkDevice> device = createRobustBufferAccessDevice(context, instanceWrapper->instance, instanceWrapper->instance.getDriver(), m_testPipelineRobustness ? &features2 : DE_NULL);
+ const bool useFeatures2 = (m_testPipelineRobustness || is64BitsTest_ || isVertexTest_ || isFragmentTest_);
+
+ Move<VkDevice> device = createRobustBufferAccessDevice(context, (useFeatures2 ? &features2 : nullptr));
#ifndef CTS_USES_VULKANSC
- de::MovePtr<vk::DeviceDriver> deviceDriver = de::MovePtr<DeviceDriver>(new DeviceDriver(context.getPlatformInterface(), instanceWrapper->instance, *device));
+ de::MovePtr<vk::DeviceDriver> deviceDriver = de::MovePtr<DeviceDriver>(new DeviceDriver(context.getPlatformInterface(), context.getInstance(), *device));
#else
- de::MovePtr<vk::DeviceDriverSC, vk::DeinitDeviceDeleter> deviceDriver = de::MovePtr<DeviceDriverSC, DeinitDeviceDeleter>(new DeviceDriverSC(context.getPlatformInterface(), instanceWrapper->instance, *device, context.getTestContext().getCommandLine(), context.getResourceInterface(), context.getDeviceVulkanSC10Properties(), context.getDeviceProperties()), vk::DeinitDeviceDeleter( context.getResourceInterface().get(), *device ));
+ de::MovePtr<vk::DeviceDriverSC, vk::DeinitDeviceDeleter> deviceDriver = de::MovePtr<DeviceDriverSC, DeinitDeviceDeleter>(new DeviceDriverSC(context.getPlatformInterface(), context.getInstance(), *device, context.getTestContext().getCommandLine(), context.getResourceInterface(), context.getDeviceVulkanSC10Properties(), context.getDeviceProperties()), vk::DeinitDeviceDeleter( context.getResourceInterface().get(), *device ));
#endif // CTS_USES_VULKANSC
- return new BufferReadInstance(context, instanceWrapper, device, deviceDriver, m_shaderType, m_shaderStage, m_bufferFormat, m_readFromStorage, m_readAccessRange, m_accessOutOfBackingMemory, m_testPipelineRobustness);
+ return new BufferReadInstance(context, device, deviceDriver, m_shaderType, m_shaderStage, m_bufferFormat, m_readFromStorage, m_readAccessRange, m_accessOutOfBackingMemory, m_testPipelineRobustness);
}
// RobustBufferWriteTest
TestInstance* RobustBufferWriteTest::createInstance (Context& context) const
{
- std::shared_ptr<CustomInstanceWrapper> instanceWrapper(new CustomInstanceWrapper(context));
- VkPhysicalDeviceFeatures2 features2 = initVulkanStructure();
+ const bool is64BitsTest_ = is64BitsTest();
+ const bool isVertexTest_ = isVertexTest();
+ const bool isFragmentTest_ = isFragmentTest();
+
+ VkPhysicalDeviceFeatures2 features2 = initVulkanStructure();
+
+ if (is64BitsTest_)
+ features2.features.shaderInt64 = VK_TRUE;
+
+ if (isVertexTest_)
+ features2.features.vertexPipelineStoresAndAtomics = VK_TRUE;
+
+ if (isFragmentTest_)
+ features2.features.fragmentStoresAndAtomics = VK_TRUE;
#ifndef CTS_USES_VULKANSC
- VkPhysicalDevicePipelineRobustnessFeaturesEXT pipelineRobustnessFeatures = initVulkanStructure();
+ VkPhysicalDevicePipelineRobustnessFeaturesEXT pipelineRobustnessFeatures = initVulkanStructure();
if (m_testPipelineRobustness)
{
context.requireDeviceFunctionality("VK_EXT_pipeline_robustness");
}
#endif
- Move<VkDevice> device = createRobustBufferAccessDevice(context, instanceWrapper->instance, instanceWrapper->instance.getDriver(), m_testPipelineRobustness ? &features2 : DE_NULL);
+ const bool useFeatures2 = (m_testPipelineRobustness || is64BitsTest_ || isVertexTest_ || isFragmentTest_);
+
+ Move<VkDevice> device = createRobustBufferAccessDevice(context, (useFeatures2 ? &features2 : nullptr));
#ifndef CTS_USES_VULKANSC
- de::MovePtr<vk::DeviceDriver> deviceDriver = de::MovePtr<DeviceDriver>(new DeviceDriver(context.getPlatformInterface(), instanceWrapper->instance, *device));
+ de::MovePtr<vk::DeviceDriver> deviceDriver = de::MovePtr<DeviceDriver>(new DeviceDriver(context.getPlatformInterface(), context.getInstance(), *device));
#else
- de::MovePtr<vk::DeviceDriverSC, vk::DeinitDeviceDeleter> deviceDriver = de::MovePtr<DeviceDriverSC,DeinitDeviceDeleter>(new DeviceDriverSC(context.getPlatformInterface(), instanceWrapper->instance, *device, context.getTestContext().getCommandLine(), context.getResourceInterface(), context.getDeviceVulkanSC10Properties(), context.getDeviceProperties()), DeinitDeviceDeleter(context.getResourceInterface().get(), *device));
+ de::MovePtr<vk::DeviceDriverSC, vk::DeinitDeviceDeleter> deviceDriver = de::MovePtr<DeviceDriverSC,DeinitDeviceDeleter>(new DeviceDriverSC(context.getPlatformInterface(), context.getInstance(), *device, context.getTestContext().getCommandLine(), context.getResourceInterface(), context.getDeviceVulkanSC10Properties(), context.getDeviceProperties()), DeinitDeviceDeleter(context.getResourceInterface().get(), *device));
#endif // CTS_USES_VULKANSC
- return new BufferWriteInstance(context, instanceWrapper, device, deviceDriver, m_shaderType, m_shaderStage, m_bufferFormat, m_writeAccessRange, m_accessOutOfBackingMemory, m_testPipelineRobustness);
+ return new BufferWriteInstance(context, device, deviceDriver, m_shaderType, m_shaderStage, m_bufferFormat, m_writeAccessRange, m_accessOutOfBackingMemory, m_testPipelineRobustness);
}
// BufferAccessInstance
BufferAccessInstance::BufferAccessInstance (Context& context,
- std::shared_ptr<CustomInstanceWrapper> instanceWrapper,
Move<VkDevice> device,
#ifndef CTS_USES_VULKANSC
de::MovePtr<vk::DeviceDriver> deviceDriver,
bool accessOutOfBackingMemory,
bool testPipelineRobustness)
: vkt::TestInstance (context)
- , m_instanceWrapper (instanceWrapper)
, m_device (device)
, m_deviceDriver (deviceDriver)
, m_shaderType (shaderType)
, m_testPipelineRobustness (testPipelineRobustness)
{
const DeviceInterface& vk = *m_deviceDriver;
+ const auto& vki = context.getInstanceInterface();
+ const auto instance = context.getInstance();
const deUint32 queueFamilyIndex = context.getUniversalQueueFamilyIndex();
const bool isTexelAccess = !!(m_shaderType == SHADER_TYPE_TEXEL_COPY);
const bool readFromStorage = !!(m_bufferAccessType == BUFFER_ACCESS_TYPE_READ_FROM_STORAGE);
- const VkPhysicalDevice physicalDevice = chooseDevice(instanceWrapper->instance.getDriver(), instanceWrapper->instance, context.getTestContext().getCommandLine());
- SimpleAllocator memAlloc (vk, *m_device, getPhysicalDeviceMemoryProperties(instanceWrapper->instance.getDriver(), physicalDevice));
+ const VkPhysicalDevice physicalDevice = chooseDevice(vki, instance, context.getTestContext().getCommandLine());
+ SimpleAllocator memAlloc (vk, *m_device, getPhysicalDeviceMemoryProperties(vki, physicalDevice));
tcu::TestLog& log = m_context.getTestContext().getLog();
DE_ASSERT(RobustBufferAccessTest::s_numberOfBytesAccessed % sizeof(deUint32) == 0);
// Check format support
{
VkFormatFeatureFlags requiredFormatFeatures = 0;
- const VkFormatProperties formatProperties = getPhysicalDeviceFormatProperties(instanceWrapper->instance.getDriver(), physicalDevice, m_bufferFormat);
+ const VkFormatProperties formatProperties = getPhysicalDeviceFormatProperties(vki, physicalDevice, m_bufferFormat);
if (isTexelAccess)
{
if (m_shaderStage == VK_SHADER_STAGE_COMPUTE_BIT)
{
- m_testEnvironment = de::MovePtr<TestEnvironment>(new ComputeEnvironment(m_context, m_instanceWrapper->instance, m_instanceWrapper->instance.getDriver(), *m_device, *m_descriptorSetLayout, *m_descriptorSet, m_testPipelineRobustness));
+ m_testEnvironment = de::MovePtr<TestEnvironment>(new ComputeEnvironment(m_context, *m_deviceDriver, *m_device, *m_descriptorSetLayout, *m_descriptorSet, m_testPipelineRobustness));
}
else
{
};
m_testEnvironment = de::MovePtr<TestEnvironment>(new GraphicsEnvironment(m_context,
- m_instanceWrapper->instance,
- m_instanceWrapper->instance.getDriver(),
+ *m_deviceDriver,
*m_device,
*m_descriptorSetLayout,
*m_descriptorSet,
// BufferReadInstance
BufferReadInstance::BufferReadInstance (Context& context,
- std::shared_ptr<CustomInstanceWrapper> instanceWrapper,
Move<VkDevice> device,
#ifndef CTS_USES_VULKANSC
de::MovePtr<vk::DeviceDriver> deviceDriver,
bool accessOutOfBackingMemory,
bool testPipelineRobustness)
- : BufferAccessInstance (context, instanceWrapper, device, deviceDriver, shaderType, shaderStage, bufferFormat,
+ : BufferAccessInstance (context, device, deviceDriver, shaderType, shaderStage, bufferFormat,
readFromStorage ? BUFFER_ACCESS_TYPE_READ_FROM_STORAGE : BUFFER_ACCESS_TYPE_READ,
inBufferAccessRange,
RobustBufferAccessTest::s_numberOfBytesAccessed, // outBufferAccessRange
// BufferWriteInstance
BufferWriteInstance::BufferWriteInstance (Context& context,
- std::shared_ptr<CustomInstanceWrapper> instanceWrapper,
Move<VkDevice> device,
#ifndef CTS_USES_VULKANSC
de::MovePtr<vk::DeviceDriver> deviceDriver,
bool accessOutOfBackingMemory,
bool testPipelineRobustness)
- : BufferAccessInstance (context, instanceWrapper, device, deviceDriver, shaderType, shaderStage, bufferFormat,
+ : BufferAccessInstance (context, device, deviceDriver, shaderType, shaderStage, bufferFormat,
BUFFER_ACCESS_TYPE_WRITE,
RobustBufferAccessTest::s_numberOfBytesAccessed, // inBufferAccessRange
writeBufferAccessRange,
class SingletonDevice
{
SingletonDevice (Context& context)
- : m_context(context), m_instanceWrapper(new CustomInstanceWrapper(context, context.getInstanceExtensions())), m_logicalDevice()
+ : m_context(context)
+ , m_logicalDevice()
{
// Note we are already checking the needed features are available in checkSupport().
VkPhysicalDeviceRobustness2FeaturesEXT robustness2Features = initVulkanStructure();
features2.pNext = &shaderImageAtomicInt64Features;
}
- const VkPhysicalDevice physicalDevice = chooseDevice(m_instanceWrapper->instance.getDriver(), m_instanceWrapper->instance, context.getTestContext().getCommandLine());
- m_instanceWrapper->instance.getDriver().getPhysicalDeviceFeatures2(physicalDevice, &features2);
- m_logicalDevice = createRobustBufferAccessDevice(context, m_instanceWrapper->instance, m_instanceWrapper->instance.getDriver(), &features2);
+ const auto& vki = m_context.getInstanceInterface();
+ const auto instance = m_context.getInstance();
+ const auto physicalDevice = chooseDevice(vki, instance, context.getTestContext().getCommandLine());
+
+ vki.getPhysicalDeviceFeatures2(physicalDevice, &features2);
+ m_logicalDevice = createRobustBufferAccessDevice(context, &features2);
#ifndef CTS_USES_VULKANSC
- m_deviceDriver = de::MovePtr<DeviceDriver>(new DeviceDriver(context.getPlatformInterface(), m_instanceWrapper->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_instanceWrapper->instance, *m_logicalDevice, context.getTestContext().getCommandLine(), context.getResourceInterface(), m_context.getDeviceVulkanSC10Properties(), m_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(), m_context.getDeviceVulkanSC10Properties(), m_context.getDeviceProperties()), vk::DeinitDeviceDeleter(context.getResourceInterface().get(), *m_logicalDevice));
#endif // CTS_USES_VULKANSC
}
~SingletonDevice()
{
}
- static VkInstance getInstance(Context& context)
- {
- if (!m_singletonDevice)
- m_singletonDevice = SharedPtr<SingletonDevice>(new SingletonDevice(context));
- DE_ASSERT(m_singletonDevice);
- return m_singletonDevice->m_instanceWrapper->instance;
- }
- static const InstanceInterface& getInstanceInterface(Context& context)
- {
- if (!m_singletonDevice)
- m_singletonDevice = SharedPtr<SingletonDevice>(new SingletonDevice(context));
- DE_ASSERT(m_singletonDevice);
- return m_singletonDevice->m_instanceWrapper->instance.getDriver();
- }
static VkDevice getDevice(Context& context)
{
private:
const Context& m_context;
- std::shared_ptr<CustomInstanceWrapper> m_instanceWrapper;
Move<vk::VkDevice> m_logicalDevice;
#ifndef CTS_USES_VULKANSC
de::MovePtr<vk::DeviceDriver> m_deviceDriver;
}
// Returns the appropriate singleton device for the given case.
-VkInstance getInstance(Context& ctx, const CaseDef& caseDef)
-{
- if (caseDef.needsScalarBlockLayout())
- {
- if (formatIsR64(caseDef.format))
- {
- if (caseDef.testRobustness2)
- return Robustness2Int64AtomicsScalarSingleton::getInstance(ctx);
- return ImageRobustnessInt64AtomicsScalarSingleton::getInstance(ctx);
- }
-
- if (caseDef.testRobustness2)
- return Robustness2ScalarSingleton::getInstance(ctx);
- return ImageRobustnessScalarSingleton::getInstance(ctx);
- }
-
- if (formatIsR64(caseDef.format))
- {
- if (caseDef.testRobustness2)
- return Robustness2Int64AtomicsSingleton::getInstance(ctx);
- return ImageRobustnessInt64AtomicsSingleton::getInstance(ctx);
- }
-
- if (caseDef.testRobustness2)
- return Robustness2Singleton::getInstance(ctx);
- return ImageRobustnessSingleton::getInstance(ctx);
-}
-
-// Returns the appropriate singleton device driver for the given case.
-const InstanceInterface& getInstanceInterface(Context& ctx, const CaseDef& caseDef)
-{
- if (caseDef.needsScalarBlockLayout())
- {
- if (formatIsR64(caseDef.format))
- {
- if (caseDef.testRobustness2)
- return Robustness2Int64AtomicsScalarSingleton::getInstanceInterface(ctx);
- return ImageRobustnessInt64AtomicsScalarSingleton::getInstanceInterface(ctx);
- }
-
- if (caseDef.testRobustness2)
- return Robustness2ScalarSingleton::getInstanceInterface(ctx);
- return ImageRobustnessScalarSingleton::getInstanceInterface(ctx);
- }
-
- if (formatIsR64(caseDef.format))
- {
- if (caseDef.testRobustness2)
- return Robustness2Int64AtomicsSingleton::getInstanceInterface(ctx);
- return ImageRobustnessInt64AtomicsSingleton::getInstanceInterface(ctx);
- }
-
- if (caseDef.testRobustness2)
- return Robustness2Singleton::getInstanceInterface(ctx);
- return ImageRobustnessSingleton::getInstanceInterface(ctx);
-}
-
-// Returns the appropriate singleton device for the given case.
VkDevice getLogicalDevice (Context& ctx, const CaseDef& caseDef)
{
if (caseDef.needsScalarBlockLayout())
tcu::TestStatus RobustnessExtsTestInstance::iterate (void)
{
- const VkInstance instance = getInstance(m_context, m_data);
- const InstanceInterface& vki = getInstanceInterface(m_context, m_data);
+ const VkInstance instance = m_context.getInstance();
+ const InstanceInterface& vki = m_context.getInstanceInterface();
const VkDevice device = getLogicalDevice(m_context, m_data);
const vk::DeviceInterface& vk = getDeviceInterface(m_context, m_data);
const VkPhysicalDevice physicalDevice = chooseDevice(vki, instance, m_context.getTestContext().getCommandLine());
return res;
}
-Move<VkDevice> createRobustBufferAccessDevice (Context& context, VkInstance instance, const InstanceInterface& vki, const VkPhysicalDeviceFeatures2* enabledFeatures2)
+Move<VkDevice> createRobustBufferAccessDevice (Context& context, const VkPhysicalDeviceFeatures2* enabledFeatures2)
{
const float queuePriority = 1.0f;
enabledFeatures2 ? NULL : &enabledFeatures // const VkPhysicalDeviceFeatures* pEnabledFeatures;
};
- const VkPhysicalDevice physicalDevice = chooseDevice(vki, instance, context.getTestContext().getCommandLine());
+ // We are creating a custom device with a potentially large amount of extensions and features enabled, using the default device
+ // as a reference. Some implementations may only enable certain device extensions if some instance extensions are enabled, so in
+ // this case it's important to reuse the context instance when creating the device.
+ const auto& vki = context.getInstanceInterface();
+ const auto instance = context.getInstance();
+ const auto physicalDevice = chooseDevice(vki, instance, context.getTestContext().getCommandLine());
return createCustomDevice(context.getTestContext().getCommandLine().isValidationEnabled(), context.getPlatformInterface(),
instance, vki, physicalDevice, &deviceParams);
// TestEnvironment
TestEnvironment::TestEnvironment (Context& context,
- VkInstance instance,
- const InstanceInterface& instanceInterface,
+ const DeviceInterface& vk,
VkDevice device,
VkDescriptorSetLayout descriptorSetLayout,
VkDescriptorSet descriptorSet)
: m_context (context)
- , m_instance (instance)
- , m_instanceInterface (instanceInterface)
, m_device (device)
, m_descriptorSetLayout (descriptorSetLayout)
, m_descriptorSet (descriptorSet)
{
- const DeviceInterface& vk = context.getDeviceInterface();
-
// Create command pool
{
const VkCommandPoolCreateInfo commandPoolParams =
// GraphicsEnvironment
GraphicsEnvironment::GraphicsEnvironment (Context& context,
- VkInstance instance,
- const InstanceInterface& instanceInterface,
+ const DeviceInterface& vk,
VkDevice device,
VkDescriptorSetLayout descriptorSetLayout,
VkDescriptorSet descriptorSet,
const DrawConfig& drawConfig,
bool testPipelineRobustness)
- : TestEnvironment (context, instance, instanceInterface, device, descriptorSetLayout, descriptorSet)
+ : TestEnvironment (context, vk, device, descriptorSetLayout, descriptorSet)
, m_renderSize (16, 16)
, m_colorFormat (VK_FORMAT_R8G8B8A8_UNORM)
{
- const DeviceInterface& vk = context.getDeviceInterface();
+ const auto& vki = context.getInstanceInterface();
+ const auto instance = context.getInstance();
const deUint32 queueFamilyIndex = context.getUniversalQueueFamilyIndex();
const VkComponentMapping componentMappingRGBA = { VK_COMPONENT_SWIZZLE_R, VK_COMPONENT_SWIZZLE_G, VK_COMPONENT_SWIZZLE_B, VK_COMPONENT_SWIZZLE_A };
- const VkPhysicalDevice physicalDevice = chooseDevice(m_instanceInterface, instance, context.getTestContext().getCommandLine());
- SimpleAllocator memAlloc (vk, m_device, getPhysicalDeviceMemoryProperties(m_instanceInterface, physicalDevice));
+ const VkPhysicalDevice physicalDevice = chooseDevice(vki, instance, context.getTestContext().getCommandLine());
+ SimpleAllocator memAlloc (vk, m_device, getPhysicalDeviceMemoryProperties(vki, physicalDevice));
// Create color image and view
{
// ComputeEnvironment
ComputeEnvironment::ComputeEnvironment (Context& context,
- VkInstance instance,
- const InstanceInterface& instanceInterface,
+ const DeviceInterface& vk,
VkDevice device,
VkDescriptorSetLayout descriptorSetLayout,
VkDescriptorSet descriptorSet,
bool testPipelineRobustness)
- : TestEnvironment (context, instance, instanceInterface, device, descriptorSetLayout, descriptorSet)
+ : TestEnvironment (context, vk, device, descriptorSetLayout, descriptorSet)
{
- const DeviceInterface& vk = context.getDeviceInterface();
-
// Create pipeline layout
{
const VkPipelineLayoutCreateInfo pipelineLayoutParams =
#include "vkMemUtil.hpp"
#include "deUniquePtr.hpp"
#include "tcuVectorUtil.hpp"
-#include "vktCustomInstancesDevices.hpp"
namespace vkt
{
namespace robustness
{
-vk::Move<vk::VkDevice> createRobustBufferAccessDevice (Context& context, vk::VkInstance instance, const vk::InstanceInterface& vki, const vk::VkPhysicalDeviceFeatures2* enabledFeatures2 = DE_NULL);
+vk::Move<vk::VkDevice> createRobustBufferAccessDevice (Context& context, const vk::VkPhysicalDeviceFeatures2* enabledFeatures2 = DE_NULL);
bool areEqual (float a, float b);
bool isValueZero (const void* valuePtr, size_t valueSize);
bool isValueWithinBuffer (const void* buffer, vk::VkDeviceSize bufferSize, const void* valuePtr, size_t valueSizeInBytes);
{
public:
TestEnvironment (Context& context,
- vk::VkInstance instance,
- const vk::InstanceInterface& instanceInterface,
+ const vk::DeviceInterface& vk,
vk::VkDevice device,
vk::VkDescriptorSetLayout descriptorSetLayout,
vk::VkDescriptorSet descriptorSet);
protected:
Context& m_context;
- vk::VkInstance m_instance;
- const vk::InstanceInterface& m_instanceInterface;
vk::VkDevice m_device;
vk::VkDescriptorSetLayout m_descriptorSetLayout;
vk::VkDescriptorSet m_descriptorSet;
};
GraphicsEnvironment (Context& context,
- vk::VkInstance instance,
- const vk::InstanceInterface& instanceInterface,
+ const vk::DeviceInterface& vk,
vk::VkDevice device,
vk::VkDescriptorSetLayout descriptorSetLayout,
vk::VkDescriptorSet descriptorSet,
{
public:
ComputeEnvironment (Context& context,
- vk::VkInstance instance,
- const vk::InstanceInterface& instanceInterface,
+ const vk::DeviceInterface& vk,
vk::VkDevice device,
vk::VkDescriptorSetLayout descriptorSetLayout,
vk::VkDescriptorSet descriptorSet,
{
public:
VertexAccessInstance (Context& context,
- std::shared_ptr<CustomInstanceWrapper> instanceWrapper,
Move<VkDevice> device,
#ifndef CTS_USES_VULKANSC
- de::MovePtr<vk::DeviceDriver> deviceDriver,
+ de::MovePtr<vk::DeviceDriver> deviceDriver,
#else
- de::MovePtr<vk::DeviceDriverSC, vk::DeinitDeviceDeleter> deviceDriver,
+ de::MovePtr<vk::DeviceDriverSC, vk::DeinitDeviceDeleter> deviceDriver,
#endif // CTS_USES_VULKANSC
VkFormat inputFormat,
deUint32 numVertexValues,
virtual void initVertexIds (deUint32 *indicesPtr, size_t indexCount) = 0;
virtual deUint32 getIndex (deUint32 vertexNum) const = 0;
- std::shared_ptr<CustomInstanceWrapper> m_instanceWrapper;
Move<VkDevice> m_device;
#ifndef CTS_USES_VULKANSC
de::MovePtr<vk::DeviceDriver> m_deviceDriver;
{
public:
DrawAccessInstance (Context& context,
- std::shared_ptr<CustomInstanceWrapper> instanceWrapper,
Move<VkDevice> device,
#ifndef CTS_USES_VULKANSC
de::MovePtr<vk::DeviceDriver> deviceDriver,
{
public:
DrawIndexedAccessInstance (Context& context,
- std::shared_ptr<CustomInstanceWrapper> instanceWrapper,
Move<VkDevice> device,
#ifndef CTS_USES_VULKANSC
de::MovePtr<vk::DeviceDriver> deviceDriver,
TestInstance* DrawAccessTest::createInstance (Context& context) const
{
- std::shared_ptr<CustomInstanceWrapper> instanceWrapper(new CustomInstanceWrapper(context));
- Move<VkDevice> device = createRobustBufferAccessDevice(context, instanceWrapper->instance, instanceWrapper->instance.getDriver());
+ Move<VkDevice> device = createRobustBufferAccessDevice(context);
#ifndef CTS_USES_VULKANSC
- de::MovePtr<vk::DeviceDriver> deviceDriver = de::MovePtr<DeviceDriver>(new DeviceDriver(context.getPlatformInterface(), instanceWrapper->instance, *device));
+ de::MovePtr<vk::DeviceDriver> deviceDriver = de::MovePtr<DeviceDriver>(new DeviceDriver(context.getPlatformInterface(), context.getInstance(), *device));
#else
- de::MovePtr<vk::DeviceDriverSC, vk::DeinitDeviceDeleter> deviceDriver = de::MovePtr<DeviceDriverSC, DeinitDeviceDeleter>(new DeviceDriverSC(context.getPlatformInterface(), instanceWrapper->instance, *device, context.getTestContext().getCommandLine(), context.getResourceInterface(), context.getDeviceVulkanSC10Properties(), context.getDeviceProperties()), vk::DeinitDeviceDeleter(context.getResourceInterface().get(), *device));
+ de::MovePtr<vk::DeviceDriverSC, vk::DeinitDeviceDeleter> deviceDriver = de::MovePtr<DeviceDriverSC, DeinitDeviceDeleter>(new DeviceDriverSC(context.getPlatformInterface(), context.getInstance(), *device, context.getTestContext().getCommandLine(), context.getResourceInterface(), context.getDeviceVulkanSC10Properties(), context.getDeviceProperties()), vk::DeinitDeviceDeleter(context.getResourceInterface().get(), *device));
#endif // CTS_USES_VULKANSC
return new DrawAccessInstance(context,
- instanceWrapper,
device,
deviceDriver,
m_inputFormat,
TestInstance* DrawIndexedAccessTest::createInstance (Context& context) const
{
- std::shared_ptr<CustomInstanceWrapper> instanceWrapper(new CustomInstanceWrapper(context));
- Move<VkDevice> device = createRobustBufferAccessDevice(context, instanceWrapper->instance, instanceWrapper->instance.getDriver());
+ Move<VkDevice> device = createRobustBufferAccessDevice(context);
#ifndef CTS_USES_VULKANSC
- de::MovePtr<vk::DeviceDriver> deviceDriver = de::MovePtr<DeviceDriver>(new DeviceDriver(context.getPlatformInterface(), instanceWrapper->instance, *device));
+ de::MovePtr<vk::DeviceDriver> deviceDriver = de::MovePtr<DeviceDriver>(new DeviceDriver(context.getPlatformInterface(), context.getInstance(), *device));
#else
- de::MovePtr<vk::DeviceDriverSC, vk::DeinitDeviceDeleter> deviceDriver = de::MovePtr<DeviceDriverSC, DeinitDeviceDeleter>(new DeviceDriverSC(context.getPlatformInterface(), instanceWrapper->instance, *device, context.getTestContext().getCommandLine(), context.getResourceInterface(), context.getDeviceVulkanSC10Properties(), context.getDeviceProperties()), vk::DeinitDeviceDeleter(context.getResourceInterface().get(), *device));
+ de::MovePtr<vk::DeviceDriverSC, vk::DeinitDeviceDeleter> deviceDriver = de::MovePtr<DeviceDriverSC, DeinitDeviceDeleter>(new DeviceDriverSC(context.getPlatformInterface(), context.getInstance(), *device, context.getTestContext().getCommandLine(), context.getResourceInterface(), context.getDeviceVulkanSC10Properties(), context.getDeviceProperties()), vk::DeinitDeviceDeleter(context.getResourceInterface().get(), *device));
#endif // CTS_USES_VULKANSC
return new DrawIndexedAccessInstance(context,
- instanceWrapper,
device,
deviceDriver,
m_inputFormat,
// VertexAccessInstance
VertexAccessInstance::VertexAccessInstance (Context& context,
- std::shared_ptr<CustomInstanceWrapper> instanceWrapper,
Move<VkDevice> device,
#ifndef CTS_USES_VULKANSC
de::MovePtr<vk::DeviceDriver> deviceDriver,
const std::vector<deUint32>& indices)
: vkt::TestInstance (context)
- , m_instanceWrapper (instanceWrapper)
, m_device (device)
, m_deviceDriver (deviceDriver)
, m_inputFormat (inputFormat)
{
const DeviceInterface& vk = *m_deviceDriver;
const deUint32 queueFamilyIndex = context.getUniversalQueueFamilyIndex();
- const VkPhysicalDevice physicalDevice = chooseDevice(instanceWrapper->instance.getDriver(), instanceWrapper->instance, context.getTestContext().getCommandLine());
- SimpleAllocator memAlloc (vk, *m_device, getPhysicalDeviceMemoryProperties(instanceWrapper->instance.getDriver(), physicalDevice));
+ const auto& vki = context.getInstanceInterface();
+ const VkPhysicalDevice physicalDevice = chooseDevice(vki, context.getInstance(), context.getTestContext().getCommandLine());
+ SimpleAllocator memAlloc (vk, *m_device, getPhysicalDeviceMemoryProperties(vki, physicalDevice));
const deUint32 formatSizeInBytes = tcu::getPixelSize(mapVkFormat(m_inputFormat));
// Check storage support
if (m_inputFormat == VK_FORMAT_R64_UINT || m_inputFormat == VK_FORMAT_R64_SINT)
{
- const VkFormatProperties formatProperties = getPhysicalDeviceFormatProperties(instanceWrapper->instance.getDriver(), physicalDevice, m_inputFormat);
+ const VkFormatProperties formatProperties = getPhysicalDeviceFormatProperties(vki, physicalDevice, m_inputFormat);
context.requireDeviceFunctionality("VK_EXT_shader_image_atomic_int64");
if ((formatProperties.optimalTilingFeatures & VK_FORMAT_FEATURE_VERTEX_BUFFER_BIT) != VK_FORMAT_FEATURE_VERTEX_BUFFER_BIT)
drawConfig.indexCount = (deUint32)(m_indexBufferSize / sizeof(deUint32));
m_graphicsTestEnvironment = de::MovePtr<GraphicsEnvironment>(new GraphicsEnvironment(m_context,
- m_instanceWrapper->instance,
- m_instanceWrapper->instance.getDriver(),
+ *m_deviceDriver,
*m_device,
*m_descriptorSetLayout,
*m_descriptorSet,
// DrawAccessInstance
DrawAccessInstance::DrawAccessInstance (Context& context,
- std::shared_ptr<CustomInstanceWrapper> instanceWrapper,
Move<VkDevice> device,
#ifndef CTS_USES_VULKANSC
de::MovePtr<vk::DeviceDriver> deviceDriver,
deUint32 numVertices,
deUint32 numInstances)
: VertexAccessInstance (context,
- instanceWrapper,
device,
deviceDriver,
inputFormat,
// DrawIndexedAccessInstance
DrawIndexedAccessInstance::DrawIndexedAccessInstance (Context& context,
- std::shared_ptr<CustomInstanceWrapper> instanceWrapper,
Move<VkDevice> device,
#ifndef CTS_USES_VULKANSC
de::MovePtr<vk::DeviceDriver> deviceDriver,
deUint32 numInstances,
const std::vector<deUint32>& indices)
: VertexAccessInstance (context,
- instanceWrapper,
device,
deviceDriver,
inputFormat,