SPV 1.4: Add testing infrastructure for SPV 1.4 tests.
This includes the test for the first feature of OpEntryPoint.
This commit is contained in:
@@ -65,6 +65,7 @@ std::string FileNameAsCustomTestSuffixIoMap(
|
||||
using CompileVulkanToSpirvTest = GlslangTest<::testing::TestWithParam<std::string>>;
|
||||
using CompileVulkanToDebugSpirvTest = GlslangTest<::testing::TestWithParam<std::string>>;
|
||||
using CompileVulkan1_1ToSpirvTest = GlslangTest<::testing::TestWithParam<std::string>>;
|
||||
using CompileToSpirv14Test = GlslangTest<::testing::TestWithParam<std::string>>;
|
||||
using CompileOpenGLToSpirvTest = GlslangTest<::testing::TestWithParam<std::string>>;
|
||||
using VulkanSemantics = GlslangTest<::testing::TestWithParam<std::string>>;
|
||||
using OpenGLSemantics = GlslangTest<::testing::TestWithParam<std::string>>;
|
||||
@@ -84,7 +85,7 @@ using CompileUpgradeTextureToSampledTextureAndDropSamplersTest = GlslangTest<::t
|
||||
TEST_P(CompileVulkanToSpirvTest, FromFile)
|
||||
{
|
||||
loadFileCompileAndCheck(GlobalTestSettings.testRoot, GetParam(),
|
||||
Source::GLSL, Semantics::Vulkan, glslang::EShTargetVulkan_1_0,
|
||||
Source::GLSL, Semantics::Vulkan, glslang::EShTargetVulkan_1_0, glslang::EShTargetSpv_1_0,
|
||||
Target::Spv);
|
||||
}
|
||||
|
||||
@@ -94,7 +95,7 @@ TEST_P(CompileVulkanToDebugSpirvTest, FromFile)
|
||||
{
|
||||
loadFileCompileAndCheck(GlobalTestSettings.testRoot, GetParam(),
|
||||
Source::GLSL, Semantics::Vulkan,
|
||||
glslang::EShTargetVulkan_1_0,
|
||||
glslang::EShTargetVulkan_1_0, glslang::EShTargetSpv_1_0,
|
||||
Target::Spv, true, "",
|
||||
"/baseResults/", false, true);
|
||||
}
|
||||
@@ -102,7 +103,14 @@ TEST_P(CompileVulkanToDebugSpirvTest, FromFile)
|
||||
TEST_P(CompileVulkan1_1ToSpirvTest, FromFile)
|
||||
{
|
||||
loadFileCompileAndCheck(GlobalTestSettings.testRoot, GetParam(),
|
||||
Source::GLSL, Semantics::Vulkan, glslang::EShTargetVulkan_1_1,
|
||||
Source::GLSL, Semantics::Vulkan, glslang::EShTargetVulkan_1_1, glslang::EShTargetSpv_1_3,
|
||||
Target::Spv);
|
||||
}
|
||||
|
||||
TEST_P(CompileToSpirv14Test, FromFile)
|
||||
{
|
||||
loadFileCompileAndCheck(GlobalTestSettings.testRoot, GetParam(),
|
||||
Source::GLSL, Semantics::Vulkan, glslang::EShTargetVulkan_1_1, glslang::EShTargetSpv_1_4,
|
||||
Target::Spv);
|
||||
}
|
||||
|
||||
@@ -111,7 +119,7 @@ TEST_P(CompileVulkan1_1ToSpirvTest, FromFile)
|
||||
TEST_P(CompileOpenGLToSpirvTest, FromFile)
|
||||
{
|
||||
loadFileCompileAndCheck(GlobalTestSettings.testRoot, GetParam(),
|
||||
Source::GLSL, Semantics::OpenGL, glslang::EShTargetVulkan_1_0,
|
||||
Source::GLSL, Semantics::OpenGL, glslang::EShTargetVulkan_1_0, glslang::EShTargetSpv_1_0,
|
||||
Target::Spv);
|
||||
}
|
||||
|
||||
@@ -120,7 +128,7 @@ TEST_P(CompileOpenGLToSpirvTest, FromFile)
|
||||
TEST_P(VulkanSemantics, FromFile)
|
||||
{
|
||||
loadFileCompileAndCheck(GlobalTestSettings.testRoot, GetParam(),
|
||||
Source::GLSL, Semantics::Vulkan, glslang::EShTargetVulkan_1_0,
|
||||
Source::GLSL, Semantics::Vulkan, glslang::EShTargetVulkan_1_0, glslang::EShTargetSpv_1_0,
|
||||
Target::Spv, false);
|
||||
}
|
||||
|
||||
@@ -129,7 +137,7 @@ TEST_P(VulkanSemantics, FromFile)
|
||||
TEST_P(OpenGLSemantics, FromFile)
|
||||
{
|
||||
loadFileCompileAndCheck(GlobalTestSettings.testRoot, GetParam(),
|
||||
Source::GLSL, Semantics::OpenGL, glslang::EShTargetVulkan_1_0,
|
||||
Source::GLSL, Semantics::OpenGL, glslang::EShTargetVulkan_1_0, glslang::EShTargetSpv_1_0,
|
||||
Target::Spv, false);
|
||||
}
|
||||
|
||||
@@ -137,7 +145,7 @@ TEST_P(OpenGLSemantics, FromFile)
|
||||
TEST_P(VulkanAstSemantics, FromFile)
|
||||
{
|
||||
loadFileCompileAndCheck(GlobalTestSettings.testRoot, GetParam(),
|
||||
Source::GLSL, Semantics::Vulkan, glslang::EShTargetVulkan_1_0,
|
||||
Source::GLSL, Semantics::Vulkan, glslang::EShTargetVulkan_1_0, glslang::EShTargetSpv_1_0,
|
||||
Target::AST);
|
||||
}
|
||||
|
||||
@@ -177,7 +185,7 @@ TEST_P(GlslIoMap, FromFile)
|
||||
TEST_P(CompileVulkanToSpirvTestAMD, FromFile)
|
||||
{
|
||||
loadFileCompileAndCheck(GlobalTestSettings.testRoot, GetParam(),
|
||||
Source::GLSL, Semantics::Vulkan, glslang::EShTargetVulkan_1_0,
|
||||
Source::GLSL, Semantics::Vulkan, glslang::EShTargetVulkan_1_0, glslang::EShTargetSpv_1_0,
|
||||
Target::Spv);
|
||||
}
|
||||
#endif
|
||||
@@ -188,7 +196,7 @@ TEST_P(CompileVulkanToSpirvTestAMD, FromFile)
|
||||
TEST_P(CompileVulkanToSpirvTestNV, FromFile)
|
||||
{
|
||||
loadFileCompileAndCheck(GlobalTestSettings.testRoot, GetParam(),
|
||||
Source::GLSL, Semantics::Vulkan, glslang::EShTargetVulkan_1_0,
|
||||
Source::GLSL, Semantics::Vulkan, glslang::EShTargetVulkan_1_0, glslang::EShTargetSpv_1_0,
|
||||
Target::Spv);
|
||||
}
|
||||
#endif
|
||||
@@ -453,6 +461,15 @@ INSTANTIATE_TEST_CASE_P(
|
||||
FileNameAsCustomTestSuffix
|
||||
);
|
||||
|
||||
// clang-format off
|
||||
INSTANTIATE_TEST_CASE_P(
|
||||
Glsl, CompileToSpirv14Test,
|
||||
::testing::ValuesIn(std::vector<std::string>({
|
||||
"spv.1.4.OpEntryPoint.frag",
|
||||
})),
|
||||
FileNameAsCustomTestSuffix
|
||||
);
|
||||
|
||||
// clang-format off
|
||||
INSTANTIATE_TEST_CASE_P(
|
||||
Hlsl, HlslIoMap,
|
||||
|
||||
Reference in New Issue
Block a user