virtual void commandsAfterCompute (const VkCommandBuffer cmdBuffer) const = 0;
virtual bool verifyResult (Allocation& outputBufferAllocation) const = 0;
+ void checkRequirements (void) const;
protected:
const string m_name;
{
}
+void BinaryAtomicInstanceBase::checkRequirements (void) const
+{
+ if (m_imageType == IMAGE_TYPE_CUBE_ARRAY && !m_context.getDeviceFeatures().imageCubeArray)
+ {
+ TCU_THROW(NotSupportedError, "imageCubeArray feature not supported");
+ }
+}
+
tcu::TestStatus BinaryAtomicInstanceBase::iterate (void)
{
const VkDevice device = m_context.getDevice();
const VkDeviceSize imageSizeInBytes = tcu::getPixelSize(m_format) * getNumPixels(m_imageType, m_imageSize);
const VkDeviceSize outBuffSizeInBytes = getOutputBufferSize();
+ checkRequirements();
+
const VkImageCreateInfo imageParams =
{
VK_STRUCTURE_TYPE_IMAGE_CREATE_INFO, // VkStructureType sType;
if (!m_declareImageFormatInShader && !features.shaderStorageImageWriteWithoutFormat)
throw tcu::NotSupportedError("shaderStorageImageWriteWithoutFormat feature not supported");
+
+ if (m_texture.type() == IMAGE_TYPE_CUBE_ARRAY && !features.imageCubeArray)
+ TCU_THROW(NotSupportedError, "imageCubeArray feature not supported");
}
//! Store test for images
if (!m_declareImageFormatInShader && !features.shaderStorageImageReadWithoutFormat)
throw tcu::NotSupportedError("shaderStorageImageReadWithoutFormat feature not supported");
+
+ if (m_texture.type() == IMAGE_TYPE_CUBE_ARRAY && !features.imageCubeArray)
+ TCU_THROW(NotSupportedError, "imageCubeArray feature not supported");
}
virtual void commandsAfterCompute (const VkCommandBuffer cmdBuffer,
const VkDeviceSize bufferSizeInBytes) const = 0;
+
+ virtual void checkRequirements (void) const;
protected:
tcu::TextureLevel generateReferenceImage (void) const;
{
}
+void MemoryQualifierInstanceBase::checkRequirements (void) const
+{
+ if (m_imageType == IMAGE_TYPE_CUBE_ARRAY && !m_context.getDeviceFeatures().imageCubeArray)
+ {
+ TCU_THROW(NotSupportedError, "imageCubeArray feature not supported");
+ }
+}
+
tcu::TestStatus MemoryQualifierInstanceBase::iterate (void)
{
const VkDevice device = m_context.getDevice();
const VkDeviceSize bufferSizeInBytes = getNumPixels(m_imageType, m_imageSize) * tcu::getPixelSize(m_format);
+ checkRequirements();
+
// Prepare resources for the test
prepareResources(bufferSizeInBytes);
const VkFormat format);
tcu::TestStatus iterate (void);
+ void checkRequirements (void) const;
virtual ~SizeTestInstance (void) {}
MemoryRequirement::HostVisible));
}
+void SizeTestInstance::checkRequirements (void) const
+{
+ if (m_texture.type() == IMAGE_TYPE_CUBE_ARRAY && !m_context.getDeviceFeatures().imageCubeArray)
+ {
+ TCU_THROW(NotSupportedError, "imageCubeArray feature not supported");
+ }
+}
+
tcu::TestStatus SizeTestInstance::iterate (void)
{
const DeviceInterface& vk = m_context.getDeviceInterface();
const VkQueue queue = m_context.getUniversalQueue();
const deUint32 queueFamilyIndex = m_context.getUniversalQueueFamilyIndex();
+ checkRequirements();
+
// Create memory barriers.
const VkBufferMemoryBarrier shaderWriteBarrier = makeBufferMemoryBarrier(