summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPyry Haulos <phaulos@google.com>2017-05-03 15:08:12 -0700
committerAlexander Galazin <Alexander.Galazin@arm.com>2017-06-18 11:03:55 -0400
commitde7ecd11b6156599ee528e12b7d3420d5465e141 (patch)
treedc583b3ed85f4ac814fd0b689541339fcdbc20c6
parentb5c2f56daa415384202d097073cd8cb5dfcf2408 (diff)
downloadVK-GL-CTS-de7ecd11b6156599ee528e12b7d3420d5465e141.tar.gz
VK-GL-CTS-de7ecd11b6156599ee528e12b7d3420d5465e141.tar.bz2
VK-GL-CTS-de7ecd11b6156599ee528e12b7d3420d5465e141.zip
Add tests for VK_KHR_storage_buffer_storage_class
This change extends following groups to cover the new StorageBuffer decoration: * dEQP-VK.glsl.opaque_type_indexing * dEQP-VK.spirv_assembly.compute.opatomic VK-GL-CTS issue: 357 Components: Vulkan Change-Id: I283a39f4e92f1be6597d843c67debc3ae28c9f22 (cherry picked from commit 9e31538412fb6ce1773e8cfda5b7e5f7fd081e87)
-rw-r--r--android/cts/master/vk-master.txt19
-rw-r--r--external/fetch_sources.py6
-rw-r--r--external/vulkancts/framework/vulkan/vkGlslProgram.hpp5
-rw-r--r--external/vulkancts/framework/vulkan/vkGlslToSpirV.cpp16
-rw-r--r--external/vulkancts/modules/vulkan/api/vktApiFeatureInfo.cpp1
-rw-r--r--external/vulkancts/modules/vulkan/shaderexecutor/vktOpaqueTypeIndexingTests.cpp66
-rw-r--r--external/vulkancts/modules/vulkan/spirv_assembly/vktSpvAsmInstructionTests.cpp51
-rw-r--r--external/vulkancts/mustpass/1.0.2/vk-default.txt19
8 files changed, 152 insertions, 31 deletions
diff --git a/android/cts/master/vk-master.txt b/android/cts/master/vk-master.txt
index d55ef55ed..564704c8d 100644
--- a/android/cts/master/vk-master.txt
+++ b/android/cts/master/vk-master.txt
@@ -108218,6 +108218,13 @@ dEQP-VK.spirv_assembly.instruction.compute.opatomic.idec
dEQP-VK.spirv_assembly.instruction.compute.opatomic.load
dEQP-VK.spirv_assembly.instruction.compute.opatomic.store
dEQP-VK.spirv_assembly.instruction.compute.opatomic.compex
+dEQP-VK.spirv_assembly.instruction.compute.opatomic_storage_buffer.iadd
+dEQP-VK.spirv_assembly.instruction.compute.opatomic_storage_buffer.isub
+dEQP-VK.spirv_assembly.instruction.compute.opatomic_storage_buffer.iinc
+dEQP-VK.spirv_assembly.instruction.compute.opatomic_storage_buffer.idec
+dEQP-VK.spirv_assembly.instruction.compute.opatomic_storage_buffer.load
+dEQP-VK.spirv_assembly.instruction.compute.opatomic_storage_buffer.store
+dEQP-VK.spirv_assembly.instruction.compute.opatomic_storage_buffer.compex
dEQP-VK.spirv_assembly.instruction.compute.opline.all
dEQP-VK.spirv_assembly.instruction.compute.opnoline.all
dEQP-VK.spirv_assembly.instruction.compute.opconstantnull.bool
@@ -124916,6 +124923,18 @@ dEQP-VK.glsl.opaque_type_indexing.ssbo.const_literal_compute
dEQP-VK.glsl.opaque_type_indexing.ssbo.const_expression_vertex
dEQP-VK.glsl.opaque_type_indexing.ssbo.const_expression_fragment
dEQP-VK.glsl.opaque_type_indexing.ssbo.const_expression_compute
+dEQP-VK.glsl.opaque_type_indexing.ssbo_storage_buffer_decoration.const_literal_vertex
+dEQP-VK.glsl.opaque_type_indexing.ssbo_storage_buffer_decoration.const_literal_fragment
+dEQP-VK.glsl.opaque_type_indexing.ssbo_storage_buffer_decoration.const_literal_geometry
+dEQP-VK.glsl.opaque_type_indexing.ssbo_storage_buffer_decoration.const_literal_tess_ctrl
+dEQP-VK.glsl.opaque_type_indexing.ssbo_storage_buffer_decoration.const_literal_tess_eval
+dEQP-VK.glsl.opaque_type_indexing.ssbo_storage_buffer_decoration.const_literal_compute
+dEQP-VK.glsl.opaque_type_indexing.ssbo_storage_buffer_decoration.const_expression_vertex
+dEQP-VK.glsl.opaque_type_indexing.ssbo_storage_buffer_decoration.const_expression_fragment
+dEQP-VK.glsl.opaque_type_indexing.ssbo_storage_buffer_decoration.const_expression_geometry
+dEQP-VK.glsl.opaque_type_indexing.ssbo_storage_buffer_decoration.const_expression_tess_ctrl
+dEQP-VK.glsl.opaque_type_indexing.ssbo_storage_buffer_decoration.const_expression_tess_eval
+dEQP-VK.glsl.opaque_type_indexing.ssbo_storage_buffer_decoration.const_expression_compute
dEQP-VK.glsl.opaque_type_indexing.atomic_counter.const_literal_vertex
dEQP-VK.glsl.opaque_type_indexing.atomic_counter.const_literal_fragment
dEQP-VK.glsl.opaque_type_indexing.atomic_counter.const_literal_compute
diff --git a/external/fetch_sources.py b/external/fetch_sources.py
index c6b05e6a1..053752b72 100644
--- a/external/fetch_sources.py
+++ b/external/fetch_sources.py
@@ -185,15 +185,15 @@ PACKAGES = [
postExtract = postExtractLibpng),
GitRepo(
"https://github.com/KhronosGroup/SPIRV-Tools.git",
- "ab03b879cab5d09147c257035145f0ad36c45064",
+ "bf68c814268cfa8b0311f93f16db4c3eed6eb7d2",
"spirv-tools"),
GitRepo(
"https://github.com/KhronosGroup/glslang.git",
- "e3aa654c4b0c761b28d7864192ca8ceea6faf70a",
+ "a5c5fb61180e8703ca85f36d618f98e16dc317e2",
"glslang"),
GitRepo(
"https://github.com/KhronosGroup/SPIRV-Headers.git",
- "bd47a9abaefac00be692eae677daed1b977e625c",
+ "db5cf6176137003ca4c25df96f7c0649998c3499",
"spirv-headers"),
]
diff --git a/external/vulkancts/framework/vulkan/vkGlslProgram.hpp b/external/vulkancts/framework/vulkan/vkGlslProgram.hpp
index 1afa5a368..f09779da3 100644
--- a/external/vulkancts/framework/vulkan/vkGlslProgram.hpp
+++ b/external/vulkancts/framework/vulkan/vkGlslProgram.hpp
@@ -38,6 +38,11 @@ namespace vk
struct GlslBuildOptions
{
+ enum Flags
+ {
+ FLAG_USE_STORAGE_BUFFER_STORAGE_CLASS = (1u<<0)
+ };
+
SpirvVersion targetVersion;
deUint32 flags;
diff --git a/external/vulkancts/framework/vulkan/vkGlslToSpirV.cpp b/external/vulkancts/framework/vulkan/vkGlslToSpirV.cpp
index a8f5502dc..96a80abb4 100644
--- a/external/vulkancts/framework/vulkan/vkGlslToSpirV.cpp
+++ b/external/vulkancts/framework/vulkan/vkGlslToSpirV.cpp
@@ -209,7 +209,21 @@ std::string getShaderStageSource (const GlslSource& program, glu::ShaderType sha
if (program.sources[shaderType].size() != 1)
TCU_THROW(InternalError, "Linking multiple compilation units is not supported");
- return program.sources[shaderType][0];
+ if ((program.buildOptions.flags & GlslBuildOptions::FLAG_USE_STORAGE_BUFFER_STORAGE_CLASS) != 0)
+ {
+ // Hack to inject #pragma right after first #version statement
+ std::string src = program.sources[shaderType][0];
+ size_t injectPos = 0;
+
+ if (de::beginsWith(src, "#version"))
+ injectPos = src.find('\n') + 1;
+
+ src.insert(injectPos, "#pragma use_storage_buffer\n");
+
+ return src;
+ }
+ else
+ return program.sources[shaderType][0];
}
} // anonymous
diff --git a/external/vulkancts/modules/vulkan/api/vktApiFeatureInfo.cpp b/external/vulkancts/modules/vulkan/api/vktApiFeatureInfo.cpp
index 9fdc29faa..c4775d725 100644
--- a/external/vulkancts/modules/vulkan/api/vktApiFeatureInfo.cpp
+++ b/external/vulkancts/modules/vulkan/api/vktApiFeatureInfo.cpp
@@ -676,6 +676,7 @@ void checkDeviceExtensions (tcu::ResultCollector& results, const vector<string>&
"VK_KHR_descriptor_update_template",
"VK_KHR_incremental_present",
"VK_KHR_shared_presentable_image",
+ "VK_KHR_storage_buffer_storage_class",
};
checkKhrExtensions(results, extensions, DE_LENGTH_OF_ARRAY(s_allowedDeviceKhrExtensions), s_allowedDeviceKhrExtensions);
diff --git a/external/vulkancts/modules/vulkan/shaderexecutor/vktOpaqueTypeIndexingTests.cpp b/external/vulkancts/modules/vulkan/shaderexecutor/vktOpaqueTypeIndexingTests.cpp
index 0fdd97218..9384a2a7e 100644
--- a/external/vulkancts/modules/vulkan/shaderexecutor/vktOpaqueTypeIndexingTests.cpp
+++ b/external/vulkancts/modules/vulkan/shaderexecutor/vktOpaqueTypeIndexingTests.cpp
@@ -39,6 +39,7 @@
#include "deStringUtil.hpp"
#include "deSharedPtr.hpp"
#include "deRandom.hpp"
+#include "deSTLUtil.hpp"
#include "vktShaderExecutor.hpp"
@@ -1222,11 +1223,17 @@ public:
NUM_READS = 4
};
+ enum Flags
+ {
+ FLAG_USE_STORAGE_BUFFER = (1<<0) // Use VK_KHR_storage_buffer_storage_class
+ };
+
BlockArrayIndexingCaseInstance (Context& context,
const glu::ShaderType shaderType,
const ShaderSpec& shaderSpec,
const char* name,
BlockType blockType,
+ const deUint32 flags,
const IndexExprType indexExprType,
const std::vector<int>& readIndices,
const std::vector<deUint32>& inValues);
@@ -1236,6 +1243,7 @@ public:
private:
const BlockType m_blockType;
+ const deUint32 m_flags;
const std::vector<int>& m_readIndices;
const std::vector<deUint32>& m_inValues;
};
@@ -1245,11 +1253,13 @@ BlockArrayIndexingCaseInstance::BlockArrayIndexingCaseInstance (Context& co
const ShaderSpec& shaderSpec,
const char* name,
BlockType blockType,
+ const deUint32 flags,
const IndexExprType indexExprType,
const std::vector<int>& readIndices,
const std::vector<deUint32>& inValues)
: OpaqueTypeIndexingTestInstance (context, shaderType, shaderSpec, name, indexExprType)
, m_blockType (blockType)
+ , m_flags (flags)
, m_readIndices (readIndices)
, m_inValues (inValues)
{
@@ -1288,6 +1298,12 @@ tcu::TestStatus BlockArrayIndexingCaseInstance::iterate (void)
checkSupported(descriptorType);
+ if ((m_flags & FLAG_USE_STORAGE_BUFFER) != 0)
+ {
+ if (!de::contains(m_context.getDeviceExtensions().begin(), m_context.getDeviceExtensions().end(), "VK_KHR_storage_buffer_storage_class"))
+ TCU_THROW(NotSupportedError, "VK_KHR_storage_buffer_storage_class is not supported");
+ }
+
for (size_t bufferNdx = 0; bufferNdx < m_inValues.size(); ++bufferNdx)
{
buffers[bufferNdx] = BufferSp(new Buffer(m_context, bufferUsage, sizeof(deUint32)));
@@ -1453,7 +1469,8 @@ public:
const char* description,
BlockType blockType,
IndexExprType indexExprType,
- const glu::ShaderType shaderType);
+ const glu::ShaderType shaderType,
+ deUint32 flags = 0u);
virtual ~BlockArrayIndexingCase (void);
virtual TestInstance* createInstance (Context& ctx) const;
@@ -1465,6 +1482,7 @@ private:
void createShaderSpec (void);
const BlockType m_blockType;
+ const deUint32 m_flags;
std::vector<int> m_readIndices;
std::vector<deUint32> m_inValues;
};
@@ -1474,9 +1492,11 @@ BlockArrayIndexingCase::BlockArrayIndexingCase (tcu::TestContext& testCtx,
const char* description,
BlockType blockType,
IndexExprType indexExprType,
- const glu::ShaderType shaderType)
+ const glu::ShaderType shaderType,
+ deUint32 flags)
: OpaqueTypeIndexingCase (testCtx, name, description, shaderType, indexExprType)
, m_blockType (blockType)
+ , m_flags (flags)
, m_readIndices (BlockArrayIndexingCaseInstance::NUM_READS)
, m_inValues (BlockArrayIndexingCaseInstance::NUM_INSTANCES)
{
@@ -1495,6 +1515,7 @@ TestInstance* BlockArrayIndexingCase::createInstance (Context& ctx) const
m_shaderSpec,
m_name,
m_blockType,
+ m_flags,
m_indexExprType,
m_readIndices,
m_inValues);
@@ -1563,6 +1584,9 @@ void BlockArrayIndexingCase::createShaderSpec (void)
m_shaderSpec.globalDeclarations = global.str();
m_shaderSpec.source = code.str();
+
+ if ((m_flags & BlockArrayIndexingCaseInstance::FLAG_USE_STORAGE_BUFFER) != 0)
+ m_shaderSpec.buildOptions.flags |= vk::GlslBuildOptions::FLAG_USE_STORAGE_BUFFER_STORAGE_CLASS;
}
class AtomicCounterIndexingCaseInstance : public OpaqueTypeIndexingTestInstance
@@ -2011,9 +2035,12 @@ void OpaqueTypeIndexingTests::init (void)
const char* name;
} shaderTypes[] =
{
- { glu::SHADERTYPE_VERTEX, "vertex" },
- { glu::SHADERTYPE_FRAGMENT, "fragment" },
- { glu::SHADERTYPE_COMPUTE, "compute" }
+ { glu::SHADERTYPE_VERTEX, "vertex" },
+ { glu::SHADERTYPE_FRAGMENT, "fragment" },
+ { glu::SHADERTYPE_GEOMETRY, "geometry" },
+ { glu::SHADERTYPE_TESSELLATION_CONTROL, "tess_ctrl" },
+ { glu::SHADERTYPE_TESSELLATION_EVALUATION, "tess_eval" },
+ { glu::SHADERTYPE_COMPUTE, "compute" }
};
// .sampler
@@ -2057,6 +2084,12 @@ void OpaqueTypeIndexingTests::init (void)
tcu::TestCaseGroup* const shaderGroup = new tcu::TestCaseGroup(m_testCtx, shaderTypes[shaderTypeNdx].name, "");
indexGroup->addChild(shaderGroup);
+ // \note [pyry] In Vulkan CTS 1.0.2 sampler groups should not cover tess/geom stages
+ if ((shaderType != glu::SHADERTYPE_VERTEX) &&
+ (shaderType != glu::SHADERTYPE_FRAGMENT) &&
+ (shaderType != glu::SHADERTYPE_COMPUTE))
+ continue;
+
for (int samplerTypeNdx = 0; samplerTypeNdx < DE_LENGTH_OF_ARRAY(samplerTypes); samplerTypeNdx++)
{
const glu::DataType samplerType = samplerTypes[samplerTypeNdx];
@@ -2071,11 +2104,13 @@ void OpaqueTypeIndexingTests::init (void)
// .ubo / .ssbo / .atomic_counter
{
- tcu::TestCaseGroup* const uboGroup = new tcu::TestCaseGroup(m_testCtx, "ubo", "Uniform Block Instance Array Indexing Tests");
- tcu::TestCaseGroup* const ssboGroup = new tcu::TestCaseGroup(m_testCtx, "ssbo", "Buffer Block Instance Array Indexing Tests");
- tcu::TestCaseGroup* const acGroup = new tcu::TestCaseGroup(m_testCtx, "atomic_counter", "Atomic Counter Array Indexing Tests");
+ tcu::TestCaseGroup* const uboGroup = new tcu::TestCaseGroup(m_testCtx, "ubo", "Uniform Block Instance Array Indexing Tests");
+ tcu::TestCaseGroup* const ssboGroup = new tcu::TestCaseGroup(m_testCtx, "ssbo", "Buffer Block Instance Array Indexing Tests");
+ tcu::TestCaseGroup* const ssboStorageBufGroup = new tcu::TestCaseGroup(m_testCtx, "ssbo_storage_buffer_decoration", "Buffer Block (new StorageBuffer decoration) Instance Array Indexing Tests");
+ tcu::TestCaseGroup* const acGroup = new tcu::TestCaseGroup(m_testCtx, "atomic_counter", "Atomic Counter Array Indexing Tests");
addChild(uboGroup);
addChild(ssboGroup);
+ addChild(ssboStorageBufGroup);
addChild(acGroup);
for (int indexTypeNdx = 0; indexTypeNdx < DE_LENGTH_OF_ARRAY(indexingTypes); indexTypeNdx++)
@@ -2089,11 +2124,20 @@ void OpaqueTypeIndexingTests::init (void)
const glu::ShaderType shaderType = shaderTypes[shaderTypeNdx].type;
const std::string name = std::string(indexExprName) + "_" + shaderTypes[shaderTypeNdx].name;
- uboGroup->addChild (new BlockArrayIndexingCase (m_testCtx, name.c_str(), indexExprDesc, BLOCKTYPE_UNIFORM, indexExprType, shaderType));
- acGroup->addChild (new AtomicCounterIndexingCase (m_testCtx, name.c_str(), indexExprDesc, indexExprType, shaderType));
+ // \note [pyry] In Vulkan CTS 1.0.2 ubo/ssbo/atomic_counter groups should not cover tess/geom stages
+ if ((shaderType == glu::SHADERTYPE_VERTEX) ||
+ (shaderType == glu::SHADERTYPE_FRAGMENT) ||
+ (shaderType == glu::SHADERTYPE_COMPUTE))
+ {
+ uboGroup->addChild (new BlockArrayIndexingCase (m_testCtx, name.c_str(), indexExprDesc, BLOCKTYPE_UNIFORM, indexExprType, shaderType));
+ acGroup->addChild (new AtomicCounterIndexingCase (m_testCtx, name.c_str(), indexExprDesc, indexExprType, shaderType));
+
+ if (indexExprType == INDEX_EXPR_TYPE_CONST_LITERAL || indexExprType == INDEX_EXPR_TYPE_CONST_EXPRESSION)
+ ssboGroup->addChild (new BlockArrayIndexingCase (m_testCtx, name.c_str(), indexExprDesc, BLOCKTYPE_BUFFER, indexExprType, shaderType));
+ }
if (indexExprType == INDEX_EXPR_TYPE_CONST_LITERAL || indexExprType == INDEX_EXPR_TYPE_CONST_EXPRESSION)
- ssboGroup->addChild (new BlockArrayIndexingCase (m_testCtx, name.c_str(), indexExprDesc, BLOCKTYPE_BUFFER, indexExprType, shaderType));
+ ssboStorageBufGroup->addChild (new BlockArrayIndexingCase (m_testCtx, name.c_str(), indexExprDesc, BLOCKTYPE_BUFFER, indexExprType, shaderType, (deUint32)BlockArrayIndexingCaseInstance::FLAG_USE_STORAGE_BUFFER));
}
}
}
diff --git a/external/vulkancts/modules/vulkan/spirv_assembly/vktSpvAsmInstructionTests.cpp b/external/vulkancts/modules/vulkan/spirv_assembly/vktSpvAsmInstructionTests.cpp
index d25335960..f7dbf93cd 100644
--- a/external/vulkancts/modules/vulkan/spirv_assembly/vktSpvAsmInstructionTests.cpp
+++ b/external/vulkancts/modules/vulkan/spirv_assembly/vktSpvAsmInstructionTests.cpp
@@ -363,16 +363,22 @@ struct OpAtomicCase
, numOutputElements (_numOutputElements) {}
};
-tcu::TestCaseGroup* createOpAtomicGroup (tcu::TestContext& testCtx)
+tcu::TestCaseGroup* createOpAtomicGroup (tcu::TestContext& testCtx, bool useStorageBuffer)
{
- de::MovePtr<tcu::TestCaseGroup> group (new tcu::TestCaseGroup(testCtx, "opatomic", "Test the OpAtomic* opcodes"));
- de::Random rnd (deStringHash(group->getName()));
- const int numElements = 1000000;
+ de::MovePtr<tcu::TestCaseGroup> group (new tcu::TestCaseGroup(testCtx,
+ useStorageBuffer ? "opatomic_storage_buffer" : "opatomic",
+ "Test the OpAtomic* opcodes"));
+ de::Random rnd (deStringHash(group->getName()));
+ const int numElements = 1000000;
vector<OpAtomicCase> cases;
const StringTemplate shaderTemplate (
- string(getComputeAsmShaderPreamble()) +
+ string("OpCapability Shader\n") +
+ (useStorageBuffer ? "OpExtension \"SPV_KHR_storage_buffer_storage_class\"\n" : "") +
+ "OpMemoryModel Logical GLSL450\n"
+ "OpEntryPoint GLCompute %main \"main\" %id\n"
+ "OpExecutionMode %main LocalSize 1 1 1\n" +
"OpSource GLSL 430\n"
"OpName %main \"main\"\n"
@@ -380,27 +386,34 @@ tcu::TestCaseGroup* createOpAtomicGroup (tcu::TestContext& testCtx)
"OpDecorate %id BuiltIn GlobalInvocationId\n"
- "OpDecorate %buf BufferBlock\n"
+ "OpDecorate %buf ${BLOCK_DECORATION}\n"
"OpDecorate %indata DescriptorSet 0\n"
"OpDecorate %indata Binding 0\n"
"OpDecorate %i32arr ArrayStride 4\n"
"OpMemberDecorate %buf 0 Offset 0\n"
- "OpDecorate %sumbuf BufferBlock\n"
+ "OpDecorate %sumbuf ${BLOCK_DECORATION}\n"
"OpDecorate %sum DescriptorSet 0\n"
"OpDecorate %sum Binding 1\n"
"OpMemberDecorate %sumbuf 0 Coherent\n"
"OpMemberDecorate %sumbuf 0 Offset 0\n"
- + string(getComputeAsmCommonTypes()) +
+ "%void = OpTypeVoid\n"
+ "%voidf = OpTypeFunction %void\n"
+ "%u32 = OpTypeInt 32 0\n"
+ "%i32 = OpTypeInt 32 1\n"
+ "%uvec3 = OpTypeVector %u32 3\n"
+ "%uvec3ptr = OpTypePointer Input %uvec3\n"
+ "%i32ptr = OpTypePointer ${BLOCK_POINTER_TYPE} %i32\n"
+ "%i32arr = OpTypeRuntimeArray %i32\n"
"%buf = OpTypeStruct %i32arr\n"
- "%bufptr = OpTypePointer Uniform %buf\n"
- "%indata = OpVariable %bufptr Uniform\n"
+ "%bufptr = OpTypePointer ${BLOCK_POINTER_TYPE} %buf\n"
+ "%indata = OpVariable %bufptr ${BLOCK_POINTER_TYPE}\n"
"%sumbuf = OpTypeStruct %i32arr\n"
- "%sumbufptr = OpTypePointer Uniform %sumbuf\n"
- "%sum = OpVariable %sumbufptr Uniform\n"
+ "%sumbufptr = OpTypePointer ${BLOCK_POINTER_TYPE} %sumbuf\n"
+ "%sum = OpVariable %sumbufptr ${BLOCK_POINTER_TYPE}\n"
"%id = OpVariable %uvec3ptr Input\n"
"%minusone = OpConstant %i32 -1\n"
@@ -453,9 +466,14 @@ tcu::TestCaseGroup* createOpAtomicGroup (tcu::TestContext& testCtx)
vector<deInt32> inputInts (numElements, 0);
vector<deInt32> expected (cases[caseNdx].numOutputElements, -1);
- specializations["INDEX"] = (cases[caseNdx].numOutputElements == 1) ? "%zero" : "%x";
- specializations["INSTRUCTION"] = cases[caseNdx].assembly;
- spec.assembly = shaderTemplate.specialize(specializations);
+ specializations["INDEX"] = (cases[caseNdx].numOutputElements == 1) ? "%zero" : "%x";
+ specializations["INSTRUCTION"] = cases[caseNdx].assembly;
+ specializations["BLOCK_DECORATION"] = useStorageBuffer ? "Block" : "BufferBlock";
+ specializations["BLOCK_POINTER_TYPE"] = useStorageBuffer ? "StorageBuffer" : "Uniform";
+ spec.assembly = shaderTemplate.specialize(specializations);
+
+ if (useStorageBuffer)
+ spec.extensions.push_back("VK_KHR_storage_buffer_storage_class");
fillRandomScalars(rnd, 1, 100, &inputInts[0], numElements);
for (size_t ndx = 0; ndx < numElements; ++ndx)
@@ -6718,7 +6736,8 @@ tcu::TestCaseGroup* createInstructionTests (tcu::TestContext& testCtx)
computeTests->addChild(createOpNopGroup(testCtx));
computeTests->addChild(createOpFUnordGroup(testCtx));
- computeTests->addChild(createOpAtomicGroup(testCtx));
+ computeTests->addChild(createOpAtomicGroup(testCtx, false));
+ computeTests->addChild(createOpAtomicGroup(testCtx, true)); // Using new StorageBuffer decoration
computeTests->addChild(createOpLineGroup(testCtx));
computeTests->addChild(createOpNoLineGroup(testCtx));
computeTests->addChild(createOpConstantNullGroup(testCtx));
diff --git a/external/vulkancts/mustpass/1.0.2/vk-default.txt b/external/vulkancts/mustpass/1.0.2/vk-default.txt
index 0b12fb937..3805ec71c 100644
--- a/external/vulkancts/mustpass/1.0.2/vk-default.txt
+++ b/external/vulkancts/mustpass/1.0.2/vk-default.txt
@@ -108215,6 +108215,13 @@ dEQP-VK.spirv_assembly.instruction.compute.opatomic.idec
dEQP-VK.spirv_assembly.instruction.compute.opatomic.load
dEQP-VK.spirv_assembly.instruction.compute.opatomic.store
dEQP-VK.spirv_assembly.instruction.compute.opatomic.compex
+dEQP-VK.spirv_assembly.instruction.compute.opatomic_storage_buffer.iadd
+dEQP-VK.spirv_assembly.instruction.compute.opatomic_storage_buffer.isub
+dEQP-VK.spirv_assembly.instruction.compute.opatomic_storage_buffer.iinc
+dEQP-VK.spirv_assembly.instruction.compute.opatomic_storage_buffer.idec
+dEQP-VK.spirv_assembly.instruction.compute.opatomic_storage_buffer.load
+dEQP-VK.spirv_assembly.instruction.compute.opatomic_storage_buffer.store
+dEQP-VK.spirv_assembly.instruction.compute.opatomic_storage_buffer.compex
dEQP-VK.spirv_assembly.instruction.compute.opline.all
dEQP-VK.spirv_assembly.instruction.compute.opnoline.all
dEQP-VK.spirv_assembly.instruction.compute.opconstantnull.bool
@@ -124909,6 +124916,18 @@ dEQP-VK.glsl.opaque_type_indexing.ssbo.const_literal_compute
dEQP-VK.glsl.opaque_type_indexing.ssbo.const_expression_vertex
dEQP-VK.glsl.opaque_type_indexing.ssbo.const_expression_fragment
dEQP-VK.glsl.opaque_type_indexing.ssbo.const_expression_compute
+dEQP-VK.glsl.opaque_type_indexing.ssbo_storage_buffer_decoration.const_literal_vertex
+dEQP-VK.glsl.opaque_type_indexing.ssbo_storage_buffer_decoration.const_literal_fragment
+dEQP-VK.glsl.opaque_type_indexing.ssbo_storage_buffer_decoration.const_literal_geometry
+dEQP-VK.glsl.opaque_type_indexing.ssbo_storage_buffer_decoration.const_literal_tess_ctrl
+dEQP-VK.glsl.opaque_type_indexing.ssbo_storage_buffer_decoration.const_literal_tess_eval
+dEQP-VK.glsl.opaque_type_indexing.ssbo_storage_buffer_decoration.const_literal_compute
+dEQP-VK.glsl.opaque_type_indexing.ssbo_storage_buffer_decoration.const_expression_vertex
+dEQP-VK.glsl.opaque_type_indexing.ssbo_storage_buffer_decoration.const_expression_fragment
+dEQP-VK.glsl.opaque_type_indexing.ssbo_storage_buffer_decoration.const_expression_geometry
+dEQP-VK.glsl.opaque_type_indexing.ssbo_storage_buffer_decoration.const_expression_tess_ctrl
+dEQP-VK.glsl.opaque_type_indexing.ssbo_storage_buffer_decoration.const_expression_tess_eval
+dEQP-VK.glsl.opaque_type_indexing.ssbo_storage_buffer_decoration.const_expression_compute
dEQP-VK.glsl.opaque_type_indexing.atomic_counter.const_literal_vertex
dEQP-VK.glsl.opaque_type_indexing.atomic_counter.const_literal_fragment
dEQP-VK.glsl.opaque_type_indexing.atomic_counter.const_literal_compute