#include "vkImageUtil.hpp"
#include "vkCmdUtil.hpp"
#include "vkObjUtil.hpp"
+#include "vkBufferWithMemory.hpp"
#include "deMath.h"
#include "deUniquePtr.hpp"
const float storeColorScale = computeStoreColorScale(imageFormat, imageSize);
const float storeColorBias = computeStoreColorBias(imageFormat);
+ const bool srgbFormat = isSrgbFormat(imageFormat);
const bool intFormat = isIntegerFormat(imageFormat);
const bool storeNegativeValues = isSignedFormat(imageFormat) && (storeColorBias == 0);
const int xMax = imageSize.x() - 1;
if (intFormat)
access.setPixel(color, x, y, z);
else
- access.setPixel(color.asFloat()*storeColorScale + storeColorBias, x, y, z);
+ {
+ if (srgbFormat)
+ access.setPixel(tcu::linearToSRGB(color.asFloat() * storeColorScale + storeColorBias), x, y, z);
+ else
+ access.setPixel(color.asFloat() * storeColorScale + storeColorBias, x, y, z);
+ }
}
}
const std::string& description,
const Texture& texture,
const VkFormat format,
+ const VkImageTiling tiling,
const deUint32 flags = FLAG_DECLARE_IMAGE_FORMAT_IN_SHADER);
virtual void checkSupport (Context& context) const;
private:
const Texture m_texture;
const VkFormat m_format;
+ const VkImageTiling m_tiling;
const bool m_declareImageFormatInShader;
const bool m_singleLayerBind;
const bool m_minalign;
const std::string& description,
const Texture& texture,
const VkFormat format,
+ const VkImageTiling tiling,
const deUint32 flags)
: TestCase (testCtx, name, description)
, m_texture (texture)
, m_format (format)
+ , m_tiling (tiling)
, m_declareImageFormatInShader ((flags & FLAG_DECLARE_IMAGE_FORMAT_IN_SHADER) != 0)
, m_singleLayerBind ((flags & FLAG_SINGLE_LAYER_BIND) != 0)
, m_minalign ((flags & FLAG_MINALIGN) != 0)
void StoreTest::checkSupport (Context& context) const
{
+#ifndef CTS_USES_VULKANSC
const VkFormatProperties3 formatProperties (context.getFormatProperties(m_format));
+ const auto tilingFeatures = (m_tiling == vk::VK_IMAGE_TILING_OPTIMAL) ? formatProperties.optimalTilingFeatures : formatProperties.linearTilingFeatures;
+
if (!m_declareImageFormatInShader && !(formatProperties.bufferFeatures & VK_FORMAT_FEATURE_2_STORAGE_WRITE_WITHOUT_FORMAT_BIT_KHR))
TCU_THROW(NotSupportedError, "Format not supported for unformatted stores via storage buffer");
- if (!m_declareImageFormatInShader && !(formatProperties.optimalTilingFeatures & VK_FORMAT_FEATURE_2_STORAGE_WRITE_WITHOUT_FORMAT_BIT_KHR))
+ if (!m_declareImageFormatInShader && !(tilingFeatures & VK_FORMAT_FEATURE_2_STORAGE_WRITE_WITHOUT_FORMAT_BIT_KHR))
TCU_THROW(NotSupportedError, "Format not supported for unformatted stores via storage images");
if (m_texture.type() == IMAGE_TYPE_CUBE_ARRAY)
context.requireDeviceCoreFeature(DEVICE_CORE_FEATURE_IMAGE_CUBE_ARRAY);
- if ((m_texture.type() != IMAGE_TYPE_BUFFER) && !(formatProperties.optimalTilingFeatures & VK_FORMAT_FEATURE_STORAGE_IMAGE_BIT))
+ if ((m_texture.type() != IMAGE_TYPE_BUFFER) && !(tilingFeatures & VK_FORMAT_FEATURE_STORAGE_IMAGE_BIT))
+ TCU_THROW(NotSupportedError, "Format not supported for storage images");
+
+ if (m_texture.type() == IMAGE_TYPE_BUFFER && !(formatProperties.bufferFeatures & VK_FORMAT_FEATURE_STORAGE_TEXEL_BUFFER_BIT))
+ TCU_THROW(NotSupportedError, "Format not supported for storage texel buffers");
+#else
+ const VkFormatProperties formatProperties(getPhysicalDeviceFormatProperties(context.getInstanceInterface(), context.getPhysicalDevice(), m_format));
+ const auto tilingFeatures = (m_tiling == vk::VK_IMAGE_TILING_OPTIMAL) ? formatProperties.optimalTilingFeatures : formatProperties.linearTilingFeatures;
+
+ if (!m_declareImageFormatInShader)
+ context.requireDeviceCoreFeature(DEVICE_CORE_FEATURE_SHADER_STORAGE_IMAGE_WRITE_WITHOUT_FORMAT);
+
+ if (m_texture.type() == IMAGE_TYPE_CUBE_ARRAY)
+ context.requireDeviceCoreFeature(DEVICE_CORE_FEATURE_IMAGE_CUBE_ARRAY);
+
+ if ((m_texture.type() != IMAGE_TYPE_BUFFER) && !(tilingFeatures & VK_FORMAT_FEATURE_STORAGE_IMAGE_BIT))
TCU_THROW(NotSupportedError, "Format not supported for storage images");
if (m_texture.type() == IMAGE_TYPE_BUFFER && !(formatProperties.bufferFeatures & VK_FORMAT_FEATURE_STORAGE_TEXEL_BUFFER_BIT))
TCU_THROW(NotSupportedError, "Format not supported for storage texel buffers");
+#endif // CTS_USES_VULKANSC
+ const auto& vki = context.getInstanceInterface();
+ const auto physicalDevice = context.getPhysicalDevice();
+
+ VkImageFormatProperties imageFormatProperties;
+ const auto result = vki.getPhysicalDeviceImageFormatProperties(physicalDevice, m_format, mapImageType(m_texture.type()), m_tiling, (VK_IMAGE_USAGE_STORAGE_BIT | VK_IMAGE_USAGE_TRANSFER_SRC_BIT), 0, &imageFormatProperties);
+ if (result != VK_SUCCESS) {
+ if (result == VK_ERROR_FORMAT_NOT_SUPPORTED)
+ TCU_THROW(NotSupportedError, "Format unsupported for tiling");
+ else
+ TCU_FAIL("vkGetPhysicalDeviceImageFormatProperties returned unexpected error");
+ }
+
+ if (imageFormatProperties.maxArrayLayers < (uint32_t)m_texture.numLayers()) {
+ TCU_THROW(NotSupportedError, "This format and tiling combination does not support this number of aray layers");
+ }
+
+ if (imageFormatProperties.maxMipLevels < (uint32_t)m_texture.numMipmapLevels()) {
+ TCU_THROW(NotSupportedError, "This format and tiling combination does not support this number of miplevels");
+ }
}
void StoreTest::initPrograms (SourceCollections& programCollection) const
const ImageType usedImageType = (m_singleLayerBind ? getImageTypeForSingleLayer(m_texture.type()) : m_texture.type());
const std::string imageTypeStr = getShaderImageType(mapVkFormat(m_format), usedImageType);
+ std::string maybeFmtQualStr = m_declareImageFormatInShader ? ", " + getShaderImageFormatQualifier(mapVkFormat(m_format)) : "";
+
std::ostringstream src;
src << glu::getGLSLVersionDeclaration(glu::GLSL_VERSION_440) << "\n"
<< "\n"
- << "layout (local_size_x = 1, local_size_y = 1, local_size_z = 1) in;\n";
- if (m_declareImageFormatInShader)
- {
- const std::string formatQualifierStr = getShaderImageFormatQualifier(mapVkFormat(m_format));
- src << "layout (binding = 0, " << formatQualifierStr << ") writeonly uniform " << imageTypeStr << " u_image;\n";
- }
- else
- src << "layout (binding = 0) writeonly uniform " << imageTypeStr << " u_image;\n";
+ << "layout (local_size_x = 1, local_size_y = 1, local_size_z = 1) in;\n"
+ << "layout (binding = 0" << maybeFmtQualStr << ") writeonly uniform " << imageTypeStr << " u_image;\n";
if (m_singleLayerBind)
src << "layout (binding = 1) readonly uniform Constants {\n"
void commandBetweenShaderInvocations (const VkCommandBuffer) {}
void commandAfterCompute (const VkCommandBuffer) {}
- de::MovePtr<Buffer> m_imageBuffer;
+ de::MovePtr<BufferWithMemory> m_imageBuffer;
const VkDeviceSize m_imageSizeBytes;
bool m_storeConstantValue;
};
// A helper buffer with enough space to hold the whole image. Usage flags accommodate all derived test instances.
- m_imageBuffer = de::MovePtr<Buffer>(new Buffer(
+ m_imageBuffer = de::MovePtr<BufferWithMemory>(new BufferWithMemory(
vk, device, allocator,
makeBufferCreateInfo(m_imageSizeBytes + m_dstViewOffset, VK_BUFFER_USAGE_STORAGE_TEXEL_BUFFER_BIT | VK_BUFFER_USAGE_TRANSFER_DST_BIT),
MemoryRequirement::HostVisible));
ImageStoreTestInstance (Context& context,
const Texture& texture,
const VkFormat format,
+ const VkImageTiling tiling,
const bool declareImageFormatInShader,
const bool singleLayerBind,
const bool minalign,
const int layerNdx);
de::MovePtr<Image> m_image;
- de::MovePtr<Buffer> m_constantsBuffer;
+ de::MovePtr<BufferWithMemory> m_constantsBuffer;
const VkDeviceSize m_constantsBufferChunkSizeBytes;
Move<VkDescriptorSetLayout> m_descriptorSetLayout;
Move<VkDescriptorPool> m_descriptorPool;
ImageStoreTestInstance::ImageStoreTestInstance (Context& context,
const Texture& texture,
const VkFormat format,
+ const VkImageTiling tiling,
const bool declareImageFormatInShader,
const bool singleLayerBind,
const bool minalign,
m_image = de::MovePtr<Image>(new Image(
vk, device, allocator,
- makeImageCreateInfo(m_texture, m_format, VK_IMAGE_USAGE_STORAGE_BIT | VK_IMAGE_USAGE_TRANSFER_SRC_BIT, 0u),
+ makeImageCreateInfo(m_texture, m_format, VK_IMAGE_USAGE_STORAGE_BIT | VK_IMAGE_USAGE_TRANSFER_SRC_BIT, 0u, tiling),
MemoryRequirement::Any));
// This buffer will be used to pass constants to the shader
const int numLayers = m_texture.numLayers();
const VkDeviceSize constantsBufferSizeBytes = numLayers * m_constantsBufferChunkSizeBytes;
- m_constantsBuffer = de::MovePtr<Buffer>(new Buffer(
+ m_constantsBuffer = de::MovePtr<BufferWithMemory>(new BufferWithMemory(
vk, device, allocator,
makeBufferCreateInfo(constantsBufferSizeBytes, VK_BUFFER_USAGE_UNIFORM_BUFFER_BIT),
MemoryRequirement::HostVisible));
const Texture& texture,
const VkFormat format,
const VkFormat imageFormat,
+ const VkImageTiling tiling,
const deUint32 flags = FLAG_DECLARE_IMAGE_FORMAT_IN_SHADER,
const deBool imageLoadStoreLodAMD = DE_FALSE);
const Texture m_texture;
const VkFormat m_format; //!< Format as accessed in the shader
const VkFormat m_imageFormat; //!< Storage format
+ const VkImageTiling m_tiling; //!< Image Tiling
const bool m_declareImageFormatInShader; //!< Whether the shader will specify the format layout qualifier of the images
const bool m_singleLayerBind;
const bool m_restrictImages;
const Texture& texture,
const VkFormat format,
const VkFormat imageFormat,
+ const VkImageTiling tiling,
const deUint32 flags,
const deBool imageLoadStoreLodAMD)
: TestCase (testCtx, name, description)
, m_texture (texture)
, m_format (format)
, m_imageFormat (imageFormat)
+ , m_tiling (tiling)
, m_declareImageFormatInShader ((flags & FLAG_DECLARE_IMAGE_FORMAT_IN_SHADER) != 0)
, m_singleLayerBind ((flags & FLAG_SINGLE_LAYER_BIND) != 0)
, m_restrictImages ((flags & FLAG_RESTRICT_IMAGES) != 0)
void LoadStoreTest::checkSupport (Context& context) const
{
+#ifndef CTS_USES_VULKANSC
const VkFormatProperties3 formatProperties (context.getFormatProperties(m_format));
const VkFormatProperties3 imageFormatProperties (context.getFormatProperties(m_imageFormat));
- if (m_imageLoadStoreLodAMD)
+ const auto tilingFeatures = (m_tiling == vk::VK_IMAGE_TILING_OPTIMAL) ? formatProperties.optimalTilingFeatures : formatProperties.linearTilingFeatures;
+ const auto imageTilingFeatures = (m_tiling == vk::VK_IMAGE_TILING_OPTIMAL) ? imageFormatProperties.optimalTilingFeatures : imageFormatProperties.linearTilingFeatures;
+
+ if (m_imageLoadStoreLodAMD)
context.requireDeviceFunctionality("VK_AMD_shader_image_load_store_lod");
- if (!m_bufferLoadUniform && !m_declareImageFormatInShader && !(formatProperties.optimalTilingFeatures & VK_FORMAT_FEATURE_2_STORAGE_READ_WITHOUT_FORMAT_BIT_KHR))
+ if (!m_bufferLoadUniform && !m_declareImageFormatInShader && !(tilingFeatures & VK_FORMAT_FEATURE_2_STORAGE_READ_WITHOUT_FORMAT_BIT_KHR))
TCU_THROW(NotSupportedError, "Format not supported for unformatted loads via storage images");
+ if (m_texture.type() == IMAGE_TYPE_BUFFER && !m_declareImageFormatInShader && !(formatProperties.bufferFeatures & VK_FORMAT_FEATURE_2_STORAGE_READ_WITHOUT_FORMAT_BIT_KHR))
+ TCU_THROW(NotSupportedError, "Format not supported for unformatted loads via buffers");
if (m_texture.type() == IMAGE_TYPE_CUBE_ARRAY)
context.requireDeviceCoreFeature(DEVICE_CORE_FEATURE_IMAGE_CUBE_ARRAY);
- if ((m_texture.type() != IMAGE_TYPE_BUFFER) && !(formatProperties.optimalTilingFeatures & VK_FORMAT_FEATURE_STORAGE_IMAGE_BIT))
+ if ((m_texture.type() != IMAGE_TYPE_BUFFER) && !(tilingFeatures & VK_FORMAT_FEATURE_STORAGE_IMAGE_BIT))
+ TCU_THROW(NotSupportedError, "Format not supported for storage images");
+
+ if ((m_texture.type() != IMAGE_TYPE_BUFFER) && !(imageTilingFeatures & VK_FORMAT_FEATURE_STORAGE_IMAGE_BIT))
TCU_THROW(NotSupportedError, "Format not supported for storage images");
if (m_texture.type() == IMAGE_TYPE_BUFFER && !(formatProperties.bufferFeatures & VK_FORMAT_FEATURE_STORAGE_TEXEL_BUFFER_BIT))
TCU_THROW(NotSupportedError, "Format not supported for storage texel buffers");
- if ((m_texture.type() != IMAGE_TYPE_BUFFER) && !(imageFormatProperties.optimalTilingFeatures))
+ if ((m_texture.type() != IMAGE_TYPE_BUFFER) && !(imageTilingFeatures))
TCU_THROW(NotSupportedError, "Underlying format not supported at all for images");
if ((m_texture.type() == IMAGE_TYPE_BUFFER) && !(imageFormatProperties.bufferFeatures))
if (m_bufferLoadUniform && m_texture.type() == IMAGE_TYPE_BUFFER && !(formatProperties.bufferFeatures & VK_FORMAT_FEATURE_UNIFORM_TEXEL_BUFFER_BIT))
TCU_THROW(NotSupportedError, "Format not supported for uniform texel buffers");
+#else
+ const vk::VkFormatProperties formatProperties (vk::getPhysicalDeviceFormatProperties(context.getInstanceInterface(),
+ context.getPhysicalDevice(),
+ m_format));
+ const vk::VkFormatProperties imageFormatProperties (vk::getPhysicalDeviceFormatProperties(context.getInstanceInterface(),
+ context.getPhysicalDevice(),
+ m_imageFormat));
+
+ const auto tilingFeatures = (m_tiling == vk::VK_IMAGE_TILING_OPTIMAL) ? formatProperties.optimalTilingFeatures : formatProperties.linearTilingFeatures;
+ const auto imageTilingFeatures = (m_tiling == vk::VK_IMAGE_TILING_OPTIMAL) ? imageFormatProperties.optimalTilingFeatures : imageFormatProperties.linearTilingFeatures;
+
+ if (m_imageLoadStoreLodAMD)
+ context.requireDeviceFunctionality("VK_AMD_shader_image_load_store_lod");
+
+ if (!m_bufferLoadUniform && !m_declareImageFormatInShader)
+ context.requireDeviceCoreFeature(DEVICE_CORE_FEATURE_SHADER_STORAGE_IMAGE_READ_WITHOUT_FORMAT);
+
+ if (m_texture.type() == IMAGE_TYPE_CUBE_ARRAY)
+ context.requireDeviceCoreFeature(DEVICE_CORE_FEATURE_IMAGE_CUBE_ARRAY);
+
+ if ((m_texture.type() != IMAGE_TYPE_BUFFER) && !(tilingFeatures & VK_FORMAT_FEATURE_STORAGE_IMAGE_BIT))
+ TCU_THROW(NotSupportedError, "Format not supported for storage images");
+
+ if ((m_texture.type() != IMAGE_TYPE_BUFFER) && !(imageTilingFeatures & VK_FORMAT_FEATURE_STORAGE_IMAGE_BIT))
+ TCU_THROW(NotSupportedError, "Format not supported for storage images");
+
+ if (m_texture.type() == IMAGE_TYPE_BUFFER && !(formatProperties.bufferFeatures & VK_FORMAT_FEATURE_STORAGE_TEXEL_BUFFER_BIT))
+ TCU_THROW(NotSupportedError, "Format not supported for storage texel buffers");
+
+ if ((m_texture.type() != IMAGE_TYPE_BUFFER) && !(imageTilingFeatures))
+ TCU_THROW(NotSupportedError, "Underlying format not supported at all for images");
+
+ if ((m_texture.type() == IMAGE_TYPE_BUFFER) && !(imageFormatProperties.bufferFeatures))
+ TCU_THROW(NotSupportedError, "Underlying format not supported at all for buffers");
+
+ if (formatHasThreeComponents(m_format))
+ {
+ // When the source buffer is three-component, the destination buffer is single-component.
+ VkFormat dstFormat = getSingleComponentFormat(m_format);
+ const vk::VkFormatProperties dstFormatProperties (vk::getPhysicalDeviceFormatProperties(context.getInstanceInterface(),
+ context.getPhysicalDevice(),
+ dstFormat));
+
+ if (m_texture.type() == IMAGE_TYPE_BUFFER && !(dstFormatProperties.bufferFeatures & VK_FORMAT_FEATURE_STORAGE_TEXEL_BUFFER_BIT))
+ TCU_THROW(NotSupportedError, "Format not supported for storage texel buffers");
+ }
+ else
+ if (m_texture.type() == IMAGE_TYPE_BUFFER && !(formatProperties.bufferFeatures & VK_FORMAT_FEATURE_STORAGE_TEXEL_BUFFER_BIT))
+ TCU_THROW(NotSupportedError, "Format not supported for storage texel buffers");
+
+ if (m_bufferLoadUniform && m_texture.type() == IMAGE_TYPE_BUFFER && !(formatProperties.bufferFeatures & VK_FORMAT_FEATURE_UNIFORM_TEXEL_BUFFER_BIT))
+ TCU_THROW(NotSupportedError, "Format not supported for uniform texel buffers");
+#endif // CTS_USES_VULKANSC
+ const auto& vki = context.getInstanceInterface();
+ const auto physicalDevice = context.getPhysicalDevice();
+
+ VkImageFormatProperties vkImageFormatProperties;
+ const auto result = vki.getPhysicalDeviceImageFormatProperties(physicalDevice, m_imageFormat, mapImageType(m_texture.type()), m_tiling, VK_IMAGE_USAGE_STORAGE_BIT | VK_IMAGE_USAGE_TRANSFER_SRC_BIT, 0, &vkImageFormatProperties);
+ if (result != VK_SUCCESS) {
+ if (result == VK_ERROR_FORMAT_NOT_SUPPORTED)
+ TCU_THROW(NotSupportedError, "Format unsupported for tiling");
+ else
+ TCU_FAIL("vkGetPhysicalDeviceImageFormatProperties returned unexpected error");
+ }
+
+ if (vkImageFormatProperties.maxArrayLayers < (uint32_t)m_texture.numLayers()) {
+ TCU_THROW(NotSupportedError, "This format and tiling combination does not support this number of aray layers");
+ }
+
+ if (vkImageFormatProperties.maxMipLevels < (uint32_t)m_texture.numMipmapLevels()) {
+ TCU_THROW(NotSupportedError, "This format and tiling combination does not support this number of miplevels");
+ }
}
void LoadStoreTest::initPrograms (SourceCollections& programCollection) const
src << "#extension GL_AMD_shader_image_load_store_lod : require\n";
}
+ const std::string maybeFmtQualStr = m_declareImageFormatInShader ? ", " + formatQualifierStr : "";
+
src << "layout (local_size_x = 1, local_size_y = 1, local_size_z = 1) in;\n";
if (m_bufferLoadUniform)
src << "layout (binding = 0) uniform " << uniformTypeStr << " u_image0;\n";
- else if (m_declareImageFormatInShader)
- src << "layout (binding = 0, " << formatQualifierStr << ") " << maybeRestrictStr << "readonly uniform " << imageTypeStr << " u_image0;\n";
else
- src << "layout (binding = 0) " << maybeRestrictStr << "readonly uniform " << imageTypeStr << " u_image0;\n";
+ src << "layout (binding = 0" << maybeFmtQualStr << ") " << maybeRestrictStr << "readonly uniform " << imageTypeStr << " u_image0;\n";
+ // For three-component formats, the dst buffer is single-component and the shader expands the store into 3 component-wise stores.
+ // We always use the format qualifier for the dst buffer, except when splitting it up.
if (formatHasThreeComponents(m_format))
src << "layout (binding = 1) " << maybeRestrictStr << "writeonly uniform " << imageTypeStr << " u_image1;\n";
else
case 1:
if (m_bufferLoadUniform)
{
- // for three-component formats, the dst buffer is single-component and the shader
- // expands the store into 3 component-wise stores.
+ // Expand the store into 3 component-wise stores.
std::string type = getFormatPrefix(texFormat) + "vec4";
src << " int pos = int(gl_GlobalInvocationID.x);\n"
" " << type << " t = texelFetch(u_image0, " + xMax + "-pos);\n";
const bool bufferLoadUniform);
protected:
- virtual Buffer* getResultBuffer (void) const = 0; //!< Get the buffer that contains the result image
+ virtual BufferWithMemory* getResultBuffer (void) const = 0; //!< Get the buffer that contains the result image
tcu::TestStatus verifyResult (void);
void commandBetweenShaderInvocations (const VkCommandBuffer) {}
void commandAfterCompute (const VkCommandBuffer) {}
- de::MovePtr<Buffer> m_imageBuffer; //!< Source data and helper buffer
+ de::MovePtr<BufferWithMemory> m_imageBuffer; //!< Source data and helper buffer
const VkDeviceSize m_imageSizeBytes;
const VkFormat m_imageFormat; //!< Image format (for storage, may be different than texture format)
tcu::TextureLevel m_referenceImage; //!< Used as input data and later to verify result image
// A helper buffer with enough space to hold the whole image.
- m_imageBuffer = de::MovePtr<Buffer>(new Buffer(
+ m_imageBuffer = de::MovePtr<BufferWithMemory>(new BufferWithMemory(
vk, device, allocator,
makeBufferCreateInfo(m_imageSizeBytes + m_srcViewOffset, m_bufferLoadUsageBit | VK_BUFFER_USAGE_TRANSFER_DST_BIT | VK_BUFFER_USAGE_TRANSFER_SRC_BIT),
MemoryRequirement::HostVisible));
const Texture& texture,
const VkFormat format,
const VkFormat imageFormat,
+ const VkImageTiling tiling,
const bool declareImageFormatInShader,
const bool singleLayerBind,
const bool minalign,
const VkPipelineLayout pipelineLayout,
const int layerNdx);
- Buffer* getResultBuffer (void) const { return m_imageBuffer.get(); }
+ BufferWithMemory* getResultBuffer (void) const { return m_imageBuffer.get(); }
de::MovePtr<Image> m_imageSrc;
de::MovePtr<Image> m_imageDst;
const Texture& texture,
const VkFormat format,
const VkFormat imageFormat,
+ const VkImageTiling tiling,
const bool declareImageFormatInShader,
const bool singleLayerBind,
const bool minalign,
m_imageSrc = de::MovePtr<Image>(new Image(
vk, device, allocator,
- makeImageCreateInfo(m_texture, m_imageFormat, VK_IMAGE_USAGE_STORAGE_BIT | VK_IMAGE_USAGE_TRANSFER_DST_BIT, imageFlags),
+ makeImageCreateInfo(m_texture, m_imageFormat, VK_IMAGE_USAGE_STORAGE_BIT | VK_IMAGE_USAGE_TRANSFER_DST_BIT, imageFlags, tiling),
MemoryRequirement::Any));
m_imageDst = de::MovePtr<Image>(new Image(
vk, device, allocator,
- makeImageCreateInfo(m_texture, m_imageFormat, VK_IMAGE_USAGE_STORAGE_BIT | VK_IMAGE_USAGE_TRANSFER_SRC_BIT, imageFlags),
+ makeImageCreateInfo(m_texture, m_imageFormat, VK_IMAGE_USAGE_STORAGE_BIT | VK_IMAGE_USAGE_TRANSFER_SRC_BIT, imageFlags, tiling),
MemoryRequirement::Any));
}
const VkPipelineLayout pipelineLayout,
const int layerNdx);
- Buffer* getResultBuffer (void) const { return m_imageBuffer.get(); }
+ BufferWithMemory* getResultBuffer (void) const { return m_imageBuffer.get(); }
tcu::TestStatus verifyResult (void);
- de::MovePtr<Buffer> m_imageBuffer; //!< Source data and helper buffer
+ de::MovePtr<BufferWithMemory> m_imageBuffer; //!< Source data and helper buffer
const VkDeviceSize m_imageSizeBytes;
const VkFormat m_imageFormat; //!< Image format (for storage, may be different than texture format)
std::vector<tcu::TextureLevel> m_referenceImages; //!< Used as input data and later to verify result image
m_bufferLoadUsageBit = m_bufferLoadUniform ? VK_BUFFER_USAGE_UNIFORM_TEXEL_BUFFER_BIT : VK_BUFFER_USAGE_STORAGE_TEXEL_BUFFER_BIT;
// A helper buffer with enough space to hold the whole image.
- m_imageBuffer = de::MovePtr<Buffer>(new Buffer(
+ m_imageBuffer = de::MovePtr<BufferWithMemory>(new BufferWithMemory(
vk, device, allocator,
makeBufferCreateInfo(m_imageSizeBytes + m_srcViewOffset, m_bufferLoadUsageBit | VK_BUFFER_USAGE_TRANSFER_DST_BIT | VK_BUFFER_USAGE_TRANSFER_SRC_BIT),
MemoryRequirement::HostVisible));
const VkPipelineLayout pipelineLayout,
const int layerNdx);
- Buffer* getResultBuffer (void) const { return m_imageBufferDst.get(); }
+ BufferWithMemory* getResultBuffer (void) const { return m_imageBufferDst.get(); }
- de::MovePtr<Buffer> m_imageBufferDst;
+ de::MovePtr<BufferWithMemory> m_imageBufferDst;
Move<VkDescriptorSetLayout> m_descriptorSetLayout;
Move<VkDescriptorPool> m_descriptorPool;
Move<VkDescriptorSet> m_descriptorSet;
// Create a destination buffer.
- m_imageBufferDst = de::MovePtr<Buffer>(new Buffer(
+ m_imageBufferDst = de::MovePtr<BufferWithMemory>(new BufferWithMemory(
vk, device, allocator,
makeBufferCreateInfo(m_imageSizeBytes + m_dstViewOffset, VK_BUFFER_USAGE_STORAGE_TEXEL_BUFFER_BIT),
MemoryRequirement::HostVisible));
if (m_texture.type() == IMAGE_TYPE_BUFFER)
return new BufferStoreTestInstance(context, m_texture, m_format, m_declareImageFormatInShader, m_minalign, m_storeConstantValue);
else
- return new ImageStoreTestInstance(context, m_texture, m_format, m_declareImageFormatInShader, m_singleLayerBind, m_minalign, m_storeConstantValue);
+ return new ImageStoreTestInstance(context, m_texture, m_format, m_tiling, m_declareImageFormatInShader, m_singleLayerBind, m_minalign, m_storeConstantValue);
}
TestInstance* LoadStoreTest::createInstance (Context& context) const
if (m_texture.type() == IMAGE_TYPE_BUFFER)
return new BufferLoadStoreTestInstance(context, m_texture, m_format, m_imageFormat, m_declareImageFormatInShader, m_minalign, m_bufferLoadUniform);
else
- return new ImageLoadStoreTestInstance(context, m_texture, m_format, m_imageFormat, m_declareImageFormatInShader, m_singleLayerBind, m_minalign, m_bufferLoadUniform);
+ return new ImageLoadStoreTestInstance(context, m_texture, m_format, m_imageFormat, m_tiling, m_declareImageFormatInShader, m_singleLayerBind, m_minalign, m_bufferLoadUniform);
}
class ImageExtendOperandTestInstance : public BaseTestInstance
VkFormat m_imageDstFormat;
VkDeviceSize m_imageDstSize;
- de::MovePtr<Buffer> m_buffer; // result buffer
+ de::MovePtr<BufferWithMemory> m_buffer; // result buffer
Move<VkDescriptorSetLayout> m_descriptorSetLayout;
Move<VkDescriptorPool> m_descriptorPool;
VkDeviceSize bufferSizeBytes = de::max(m_imageSrcSize, m_imageDstSize);
// Create helper buffer able to store input data and image write result
- m_buffer = de::MovePtr<Buffer>(new Buffer(
+ m_buffer = de::MovePtr<BufferWithMemory>(new BufferWithMemory(
vk, device, allocator,
makeBufferCreateInfo(bufferSizeBytes, VK_BUFFER_USAGE_STORAGE_TEXEL_BUFFER_BIT | VK_BUFFER_USAGE_TRANSFER_SRC_BIT | VK_BUFFER_USAGE_TRANSFER_DST_BIT),
MemoryRequirement::HostVisible));
{
}
-void checkFormatProperties (Context& context, VkFormat format)
+void checkFormatProperties (const Context& context, VkFormat format)
{
+#ifndef CTS_USES_VULKANSC
const VkFormatProperties3 formatProperties (context.getFormatProperties(format));
if (!(formatProperties.optimalTilingFeatures & VK_FORMAT_FEATURE_STORAGE_IMAGE_BIT))
TCU_THROW(NotSupportedError, "Format not supported for storage images");
+#else
+ const VkFormatProperties formatProperties(getPhysicalDeviceFormatProperties(context.getInstanceInterface(), context.getPhysicalDevice(), format));
+
+ if (!(formatProperties.optimalTilingFeatures & VK_FORMAT_FEATURE_STORAGE_IMAGE_BIT))
+ TCU_THROW(NotSupportedError, "Format not supported for storage images");
+#endif // CTS_USES_VULKANSC
}
void check64BitSupportIfNeeded (Context& context, VkFormat readFormat, VkFormat writeFormat)
if (!context.requireDeviceFunctionality("VK_KHR_spirv_1_4"))
TCU_THROW(NotSupportedError, "VK_KHR_spirv_1_4 not supported");
+#ifndef CTS_USES_VULKANSC
if ((m_extendTestType == ExtendTestType::WRITE_NONTEMPORAL) &&
(context.getUsedApiVersion() < VK_API_VERSION_1_3))
TCU_THROW(NotSupportedError, "Vulkan 1.3 or higher is required for this test to run");
+#endif // CTS_USES_VULKANSC
check64BitSupportIfNeeded(context, m_readFormat, m_writeFormat);
VK_FORMAT_R16G16_SNORM,
VK_FORMAT_R16_SNORM,
VK_FORMAT_R8G8_SNORM,
- VK_FORMAT_R8_SNORM
+ VK_FORMAT_R8_SNORM,
+
+ VK_FORMAT_R10X6_UNORM_PACK16,
+ VK_FORMAT_R10X6G10X6_UNORM_2PACK16,
+ VK_FORMAT_R10X6G10X6B10X6A10X6_UNORM_4PACK16,
+
+ VK_FORMAT_R4G4_UNORM_PACK8,
+ VK_FORMAT_R4G4B4A4_UNORM_PACK16,
+ VK_FORMAT_B4G4R4A4_UNORM_PACK16,
+ VK_FORMAT_R5G6B5_UNORM_PACK16,
+ VK_FORMAT_B5G6R5_UNORM_PACK16,
+ VK_FORMAT_R5G5B5A1_UNORM_PACK16,
+ VK_FORMAT_B5G5R5A1_UNORM_PACK16,
+ VK_FORMAT_A1R5G5B5_UNORM_PACK16,
+ VK_FORMAT_B8G8R8A8_SNORM,
+ VK_FORMAT_B8G8R8A8_SINT,
+ VK_FORMAT_A8B8G8R8_UNORM_PACK32,
+ VK_FORMAT_A8B8G8R8_SNORM_PACK32,
+ VK_FORMAT_A8B8G8R8_UINT_PACK32,
+ VK_FORMAT_A8B8G8R8_SINT_PACK32,
+ VK_FORMAT_A2R10G10B10_UNORM_PACK32,
+ VK_FORMAT_A2R10G10B10_SNORM_PACK32,
+ VK_FORMAT_A2R10G10B10_UINT_PACK32,
+ VK_FORMAT_A2R10G10B10_SINT_PACK32,
+ VK_FORMAT_A2B10G10R10_SNORM_PACK32,
+ VK_FORMAT_A2B10G10R10_SINT_PACK32,
+ VK_FORMAT_R32G32B32_UINT,
+ VK_FORMAT_R32G32B32_SINT,
+ VK_FORMAT_R32G32B32_SFLOAT,
+ VK_FORMAT_E5B9G9R9_UFLOAT_PACK32,
+
+ VK_FORMAT_R8G8_SRGB,
+ VK_FORMAT_R8G8B8_SRGB,
+ VK_FORMAT_B8G8R8_SRGB,
+ VK_FORMAT_R8G8B8A8_SRGB,
+ VK_FORMAT_B8G8R8A8_SRGB,
+ VK_FORMAT_A8B8G8R8_SRGB_PACK32
};
static const VkFormat s_formatsThreeComponent[] =
VK_FORMAT_R32G32B32_SFLOAT,
};
+static const VkImageTiling s_tilings[] = {
+ VK_IMAGE_TILING_OPTIMAL,
+ VK_IMAGE_TILING_LINEAR,
+};
+
+const char* tilingSuffix(VkImageTiling tiling) {
+ switch (tiling) {
+ case VK_IMAGE_TILING_OPTIMAL:
+ return "";
+ case VK_IMAGE_TILING_LINEAR:
+ return "_linear";
+ default:
+ return "unknown";
+ }
+}
+
} // anonymous ns
tcu::TestCaseGroup* createImageStoreTests (tcu::TestContext& testCtx)
for (int formatNdx = 0; formatNdx < DE_LENGTH_OF_ARRAY(s_formats); ++formatNdx)
{
- const bool hasSpirvFmt = hasSpirvFormat(s_formats[formatNdx]);
-
- if (hasSpirvFmt)
- {
- groupWithFormatByImageViewType->addChild( new StoreTest(testCtx, getFormatShortString(s_formats[formatNdx]), "", texture, s_formats[formatNdx]));
- // Additional tests where the shader uses constant data for imageStore.
- groupWithFormatByImageViewType->addChild(new StoreTest(testCtx, getFormatShortString(s_formats[formatNdx]) + "_constant", "", texture, s_formats[formatNdx], StoreTest::FLAG_DECLARE_IMAGE_FORMAT_IN_SHADER | StoreTest::FLAG_STORE_CONSTANT_VALUE));
- }
- groupWithoutFormatByImageViewType->addChild(new StoreTest(testCtx, getFormatShortString(s_formats[formatNdx]), "", texture, s_formats[formatNdx], 0));
-
- if (isLayered && hasSpirvFmt)
- groupWithFormatByImageViewType->addChild(new StoreTest(testCtx, getFormatShortString(s_formats[formatNdx]) + "_single_layer", "",
- texture, s_formats[formatNdx],
- StoreTest::FLAG_SINGLE_LAYER_BIND | StoreTest::FLAG_DECLARE_IMAGE_FORMAT_IN_SHADER));
-
- if (texture.type() == IMAGE_TYPE_BUFFER)
- {
- if (hasSpirvFmt)
- groupWithFormatByImageViewType->addChild(new StoreTest(testCtx, getFormatShortString(s_formats[formatNdx]) + "_minalign", "", texture, s_formats[formatNdx], StoreTest::FLAG_MINALIGN | StoreTest::FLAG_DECLARE_IMAGE_FORMAT_IN_SHADER));
- groupWithoutFormatByImageViewType->addChild(new StoreTest(testCtx, getFormatShortString(s_formats[formatNdx]) + "_minalign", "", texture, s_formats[formatNdx], StoreTest::FLAG_MINALIGN));
- }
- }
+ for (int tilingNdx = 0; tilingNdx < DE_LENGTH_OF_ARRAY(s_tilings); tilingNdx++) {
+ const bool hasSpirvFmt = hasSpirvFormat(s_formats[formatNdx]);
+ const char* suffix = tilingSuffix(s_tilings[tilingNdx]);
+
+ if (hasSpirvFmt)
+ {
+ groupWithFormatByImageViewType->addChild( new StoreTest(testCtx, getFormatShortString(s_formats[formatNdx]) + suffix, "", texture, s_formats[formatNdx], s_tilings[tilingNdx]));
+ // Additional tests where the shader uses constant data for imageStore.
+ groupWithFormatByImageViewType->addChild(new StoreTest(testCtx, getFormatShortString(s_formats[formatNdx]) + "_constant" + suffix, "", texture, s_formats[formatNdx], s_tilings[tilingNdx], StoreTest::FLAG_DECLARE_IMAGE_FORMAT_IN_SHADER | StoreTest::FLAG_STORE_CONSTANT_VALUE));
+ }
+ groupWithoutFormatByImageViewType->addChild(new StoreTest(testCtx, getFormatShortString(s_formats[formatNdx]) + suffix, "", texture, s_formats[formatNdx], s_tilings[tilingNdx], 0));
+
+ if (isLayered && hasSpirvFmt)
+ groupWithFormatByImageViewType->addChild(new StoreTest(testCtx, getFormatShortString(s_formats[formatNdx]) + "_single_layer" + suffix, "",
+ texture, s_formats[formatNdx], VK_IMAGE_TILING_OPTIMAL,
+ StoreTest::FLAG_SINGLE_LAYER_BIND | StoreTest::FLAG_DECLARE_IMAGE_FORMAT_IN_SHADER));
+
+ if (texture.type() == IMAGE_TYPE_BUFFER)
+ {
+ if (hasSpirvFmt)
+ groupWithFormatByImageViewType->addChild(new StoreTest(testCtx, getFormatShortString(s_formats[formatNdx]) + "_minalign" + suffix, "", texture, s_formats[formatNdx], s_tilings[tilingNdx], StoreTest::FLAG_MINALIGN | StoreTest::FLAG_DECLARE_IMAGE_FORMAT_IN_SHADER));
+ groupWithoutFormatByImageViewType->addChild(new StoreTest(testCtx, getFormatShortString(s_formats[formatNdx]) + "_minalign" + suffix, "", texture, s_formats[formatNdx], s_tilings[tilingNdx], StoreTest::FLAG_MINALIGN));
+ }
+ }
+ }
testGroupWithFormat->addChild(groupWithFormatByImageViewType.release());
testGroupWithoutFormat->addChild(groupWithoutFormatByImageViewType.release());
for (int formatNdx = 0; formatNdx < DE_LENGTH_OF_ARRAY(s_formats); ++formatNdx)
{
- // These tests always require a SPIR-V format for the write image, even if the read
- // image is being used without a format.
- if (!hasSpirvFormat(s_formats[formatNdx]))
- continue;
+ for (int tilingNdx = 0; tilingNdx < DE_LENGTH_OF_ARRAY(s_tilings); tilingNdx++) {
+ // These tests always require a SPIR-V format for the write image, even if the read
+ // image is being used without a format.
+ const char* suffix = tilingSuffix(s_tilings[tilingNdx]);
+ if (!hasSpirvFormat(s_formats[formatNdx]))
+ continue;
- groupWithFormatByImageViewType->addChild(new LoadStoreTest(testCtx, getFormatShortString(s_formats[formatNdx]), "", texture, s_formats[formatNdx], s_formats[formatNdx]));
- groupWithoutFormatByImageViewType->addChild(new LoadStoreTest(testCtx, getFormatShortString(s_formats[formatNdx]), "", texture, s_formats[formatNdx], s_formats[formatNdx], 0));
+ groupWithFormatByImageViewType->addChild(new LoadStoreTest(testCtx, getFormatShortString(s_formats[formatNdx]) + suffix, "", texture, s_formats[formatNdx], s_formats[formatNdx], s_tilings[tilingNdx]));
+ groupWithoutFormatByImageViewType->addChild(new LoadStoreTest(testCtx, getFormatShortString(s_formats[formatNdx]) + suffix, "", texture, s_formats[formatNdx], s_formats[formatNdx], s_tilings[tilingNdx], 0));
- if (isLayered)
- groupWithFormatByImageViewType->addChild(new LoadStoreTest(testCtx, getFormatShortString(s_formats[formatNdx]) + "_single_layer", "",
- texture, s_formats[formatNdx], s_formats[formatNdx],
- LoadStoreTest::FLAG_SINGLE_LAYER_BIND | LoadStoreTest::FLAG_DECLARE_IMAGE_FORMAT_IN_SHADER));
- if (texture.type() == IMAGE_TYPE_BUFFER)
- {
- groupWithFormatByImageViewType->addChild(new LoadStoreTest(testCtx, getFormatShortString(s_formats[formatNdx]) + "_minalign", "", texture, s_formats[formatNdx], s_formats[formatNdx], LoadStoreTest::FLAG_MINALIGN | LoadStoreTest::FLAG_DECLARE_IMAGE_FORMAT_IN_SHADER));
- groupWithFormatByImageViewType->addChild(new LoadStoreTest(testCtx, getFormatShortString(s_formats[formatNdx]) + "_minalign_uniform", "", texture, s_formats[formatNdx], s_formats[formatNdx], LoadStoreTest::FLAG_MINALIGN | LoadStoreTest::FLAG_DECLARE_IMAGE_FORMAT_IN_SHADER | LoadStoreTest::FLAG_UNIFORM_TEXEL_BUFFER));
- groupWithoutFormatByImageViewType->addChild(new LoadStoreTest(testCtx, getFormatShortString(s_formats[formatNdx]) + "_minalign", "", texture, s_formats[formatNdx], s_formats[formatNdx], LoadStoreTest::FLAG_MINALIGN));
- groupWithoutFormatByImageViewType->addChild(new LoadStoreTest(testCtx, getFormatShortString(s_formats[formatNdx]) + "_minalign_uniform", "", texture, s_formats[formatNdx], s_formats[formatNdx], LoadStoreTest::FLAG_MINALIGN | LoadStoreTest::FLAG_UNIFORM_TEXEL_BUFFER));
+ if (isLayered)
+ groupWithFormatByImageViewType->addChild(new LoadStoreTest(testCtx, getFormatShortString(s_formats[formatNdx]) + "_single_layer" + suffix, "",
+ texture, s_formats[formatNdx], s_formats[formatNdx], s_tilings[tilingNdx],
+ LoadStoreTest::FLAG_SINGLE_LAYER_BIND | LoadStoreTest::FLAG_DECLARE_IMAGE_FORMAT_IN_SHADER));
+ if (texture.type() == IMAGE_TYPE_BUFFER)
+ {
+ groupWithFormatByImageViewType->addChild(new LoadStoreTest(testCtx, getFormatShortString(s_formats[formatNdx]) + "_minalign" + suffix, "", texture, s_formats[formatNdx], s_formats[formatNdx], s_tilings[tilingNdx], LoadStoreTest::FLAG_MINALIGN | LoadStoreTest::FLAG_DECLARE_IMAGE_FORMAT_IN_SHADER));
+ groupWithFormatByImageViewType->addChild(new LoadStoreTest(testCtx, getFormatShortString(s_formats[formatNdx]) + "_minalign_uniform" + suffix, "", texture, s_formats[formatNdx], s_formats[formatNdx], s_tilings[tilingNdx], LoadStoreTest::FLAG_MINALIGN | LoadStoreTest::FLAG_DECLARE_IMAGE_FORMAT_IN_SHADER | LoadStoreTest::FLAG_UNIFORM_TEXEL_BUFFER));
+ groupWithoutFormatByImageViewType->addChild(new LoadStoreTest(testCtx, getFormatShortString(s_formats[formatNdx]) + "_minalign" + suffix, "", texture, s_formats[formatNdx], s_formats[formatNdx], s_tilings[tilingNdx], LoadStoreTest::FLAG_MINALIGN));
+ groupWithoutFormatByImageViewType->addChild(new LoadStoreTest(testCtx, getFormatShortString(s_formats[formatNdx]) + "_minalign_uniform" + suffix, "", texture, s_formats[formatNdx], s_formats[formatNdx], s_tilings[tilingNdx], LoadStoreTest::FLAG_MINALIGN | LoadStoreTest::FLAG_UNIFORM_TEXEL_BUFFER));
+ }
}
}
{
for (int formatNdx = 0; formatNdx < DE_LENGTH_OF_ARRAY(s_formatsThreeComponent); ++formatNdx)
{
- groupWithoutFormatByImageViewType->addChild(new LoadStoreTest(testCtx, getFormatShortString(s_formatsThreeComponent[formatNdx]) + "_uniform", "", texture, s_formatsThreeComponent[formatNdx], s_formatsThreeComponent[formatNdx], LoadStoreTest::FLAG_UNIFORM_TEXEL_BUFFER));
- groupWithoutFormatByImageViewType->addChild(new LoadStoreTest(testCtx, getFormatShortString(s_formatsThreeComponent[formatNdx]) + "_minalign_uniform", "", texture, s_formatsThreeComponent[formatNdx], s_formatsThreeComponent[formatNdx], LoadStoreTest::FLAG_MINALIGN | LoadStoreTest::FLAG_UNIFORM_TEXEL_BUFFER));
+ for (int tilingNdx = 0; tilingNdx < DE_LENGTH_OF_ARRAY(s_tilings); tilingNdx++) {
+ const char* suffix = tilingSuffix(s_tilings[tilingNdx]);
+
+ groupWithoutFormatByImageViewType->addChild(new LoadStoreTest(testCtx, getFormatShortString(s_formatsThreeComponent[formatNdx]) + "_uniform" + suffix, "", texture, s_formatsThreeComponent[formatNdx], s_formatsThreeComponent[formatNdx], s_tilings[tilingNdx], LoadStoreTest::FLAG_UNIFORM_TEXEL_BUFFER));
+ groupWithoutFormatByImageViewType->addChild(new LoadStoreTest(testCtx, getFormatShortString(s_formatsThreeComponent[formatNdx]) + "_minalign_uniform" + suffix, "", texture, s_formatsThreeComponent[formatNdx], s_formatsThreeComponent[formatNdx], s_tilings[tilingNdx], LoadStoreTest::FLAG_MINALIGN | LoadStoreTest::FLAG_UNIFORM_TEXEL_BUFFER));
+ }
}
}
if (!hasSpirvFormat(s_formats[formatNdx]))
continue;
- groupWithFormatByImageViewType->addChild(new LoadStoreTest(testCtx, getFormatShortString(s_formats[formatNdx]), "", texture, s_formats[formatNdx], s_formats[formatNdx], LoadStoreTest::FLAG_DECLARE_IMAGE_FORMAT_IN_SHADER, DE_TRUE));
- groupWithoutFormatByImageViewType->addChild(new LoadStoreTest(testCtx, getFormatShortString(s_formats[formatNdx]), "", texture, s_formats[formatNdx], s_formats[formatNdx], 0, DE_TRUE));
+ groupWithFormatByImageViewType->addChild(new LoadStoreTest(testCtx, getFormatShortString(s_formats[formatNdx]), "", texture, s_formats[formatNdx], s_formats[formatNdx], VK_IMAGE_TILING_OPTIMAL, LoadStoreTest::FLAG_DECLARE_IMAGE_FORMAT_IN_SHADER, DE_TRUE));
+ groupWithoutFormatByImageViewType->addChild(new LoadStoreTest(testCtx, getFormatShortString(s_formats[formatNdx]), "", texture, s_formats[formatNdx], s_formats[formatNdx], VK_IMAGE_TILING_OPTIMAL, 0, DE_TRUE));
if (isLayered)
groupWithFormatByImageViewType->addChild(new LoadStoreTest(testCtx, getFormatShortString(s_formats[formatNdx]) + "_single_layer", "",
- texture, s_formats[formatNdx], s_formats[formatNdx],
+ texture, s_formats[formatNdx], s_formats[formatNdx], VK_IMAGE_TILING_OPTIMAL,
LoadStoreTest::FLAG_SINGLE_LAYER_BIND | LoadStoreTest::FLAG_DECLARE_IMAGE_FORMAT_IN_SHADER, DE_TRUE));
}
const std::string caseName = getFormatShortString(s_formats[imageFormatNdx]) + "_" + getFormatShortString(s_formats[formatNdx]);
if (imageFormatNdx != formatNdx && formatsAreCompatible(s_formats[imageFormatNdx], s_formats[formatNdx]))
- groupByImageViewType->addChild(new LoadStoreTest(testCtx, caseName, "", texture, s_formats[formatNdx], s_formats[imageFormatNdx]));
+ groupByImageViewType->addChild(new LoadStoreTest(testCtx, caseName, "", texture, s_formats[formatNdx], s_formats[imageFormatNdx], VK_IMAGE_TILING_OPTIMAL));
}
testGroup->addChild(groupByImageViewType.release());
}
{
const VkFormat format = VK_FORMAT_R32G32B32A32_UINT;
const Texture& texture = getTestTexture(imageType);
- return de::MovePtr<TestCase>(new LoadStoreTest(testCtx, name, "", texture, format, format, LoadStoreTest::FLAG_RESTRICT_IMAGES | LoadStoreTest::FLAG_DECLARE_IMAGE_FORMAT_IN_SHADER));
+ return de::MovePtr<TestCase>(new LoadStoreTest(testCtx, name, "", texture, format, format, VK_IMAGE_TILING_OPTIMAL,LoadStoreTest::FLAG_RESTRICT_IMAGES | LoadStoreTest::FLAG_DECLARE_IMAGE_FORMAT_IN_SHADER));
}
namespace