SPV: Turn on atomic-storage functionality for SPIR-V.
This is used by OpenGL, but not Vulkan. Includes: - atomicCounter, atomicIncrement, atomicCounterDecrement - atomic_uint layout-offset checking - AtomicStorage capability
This commit is contained in:
parent
5e69ec683d
commit
2d0cc786f3
6 changed files with 152 additions and 203 deletions
|
|
@ -41,19 +41,29 @@
|
|||
namespace glslangtest {
|
||||
namespace {
|
||||
|
||||
using CompileToSpirvTest = GlslangTest<::testing::TestWithParam<std::string>>;
|
||||
using CompileVulkanToSpirvTest = GlslangTest<::testing::TestWithParam<std::string>>;
|
||||
using CompileOpenGLToSpirvTest = GlslangTest<::testing::TestWithParam<std::string>>;
|
||||
using VulkanSemantics = GlslangTest<::testing::TestWithParam<std::string>>;
|
||||
using VulkanAstSemantics = GlslangTest<::testing::TestWithParam<std::string>>;
|
||||
|
||||
// Compiling GLSL to SPIR-V under Vulkan semantics. Expected to successfully
|
||||
// generate SPIR-V.
|
||||
TEST_P(CompileToSpirvTest, FromFile)
|
||||
TEST_P(CompileVulkanToSpirvTest, FromFile)
|
||||
{
|
||||
loadFileCompileAndCheck(GLSLANG_TEST_DIRECTORY, GetParam(),
|
||||
Source::GLSL, Semantics::Vulkan,
|
||||
Target::Spv);
|
||||
}
|
||||
|
||||
// Compiling GLSL to SPIR-V under OpenGL semantics. Expected to successfully
|
||||
// generate SPIR-V.
|
||||
TEST_P(CompileOpenGLToSpirvTest, FromFile)
|
||||
{
|
||||
loadFileCompileAndCheck(GLSLANG_TEST_DIRECTORY, GetParam(),
|
||||
Source::GLSL, Semantics::OpenGL,
|
||||
Target::Spv);
|
||||
}
|
||||
|
||||
// GLSL-level Vulkan semantics test. Expected to error out before generating
|
||||
// SPIR-V.
|
||||
TEST_P(VulkanSemantics, FromFile)
|
||||
|
|
@ -73,7 +83,7 @@ TEST_P(VulkanAstSemantics, FromFile)
|
|||
|
||||
// clang-format off
|
||||
INSTANTIATE_TEST_CASE_P(
|
||||
Glsl, CompileToSpirvTest,
|
||||
Glsl, CompileVulkanToSpirvTest,
|
||||
::testing::ValuesIn(std::vector<std::string>({
|
||||
// Test looping constructs.
|
||||
// No tests yet for making sure break and continue from a nested loop
|
||||
|
|
@ -192,6 +202,18 @@ INSTANTIATE_TEST_CASE_P(
|
|||
FileNameAsCustomTestSuffix
|
||||
);
|
||||
|
||||
// clang-format off
|
||||
INSTANTIATE_TEST_CASE_P(
|
||||
Glsl, CompileOpenGLToSpirvTest,
|
||||
::testing::ValuesIn(std::vector<std::string>({
|
||||
// Test looping constructs.
|
||||
// No tests yet for making sure break and continue from a nested loop
|
||||
// goes to the innermost target.
|
||||
"spv.atomic.comp",
|
||||
})),
|
||||
FileNameAsCustomTestSuffix
|
||||
);
|
||||
|
||||
INSTANTIATE_TEST_CASE_P(
|
||||
Glsl, VulkanSemantics,
|
||||
::testing::ValuesIn(std::vector<std::string>({
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue