Merge pull request #2985 from jeremy-lunarg/hayes-nonsemantic-shader-debuginfo-rebase
[platform/upstream/glslang.git] / gtests / Spv.FromFile.cpp
index 0f3cd0c..ed0f5ca 100644 (file)
@@ -80,6 +80,7 @@ using CompileVulkanToSpirvTestAMD = GlslangTest<::testing::TestWithParam<std::st
 using CompileVulkanToSpirvTestNV = GlslangTest<::testing::TestWithParam<std::string>>;
 using CompileVulkanToSpirv14TestNV = GlslangTest<::testing::TestWithParam<std::string>>;
 using CompileUpgradeTextureToSampledTextureAndDropSamplersTest = GlslangTest<::testing::TestWithParam<std::string>>;
+using CompileVulkanToNonSemanticShaderDebugInfoTest = GlslangTest<::testing::TestWithParam<std::string>>;
 
 // Compiling GLSL to SPIR-V under Vulkan semantics. Expected to successfully
 // generate SPIR-V.
@@ -229,6 +230,13 @@ TEST_P(CompileUpgradeTextureToSampledTextureAndDropSamplersTest, FromFile)
                                                                      Target::Spv);
 }
 
+TEST_P(CompileVulkanToNonSemanticShaderDebugInfoTest, FromFile)
+{
+    loadFileCompileAndCheck(GlobalTestSettings.testRoot, GetParam(),
+                            Source::GLSL, Semantics::Vulkan, glslang::EShTargetVulkan_1_0, glslang::EShTargetSpv_1_0,
+                            Target::Spv, true, "", "/baseResults/", false, false, true);
+}
+
 // clang-format off
 INSTANTIATE_TEST_SUITE_P(
     Glsl, CompileVulkanToSpirvTest,
@@ -823,6 +831,7 @@ INSTANTIATE_TEST_SUITE_P(
 })),
 FileNameAsCustomTestSuffix
 );
+
 INSTANTIATE_TEST_SUITE_P(
     Glsl, CompileUpgradeTextureToSampledTextureAndDropSamplersTest,
     ::testing::ValuesIn(std::vector<std::string>({
@@ -830,6 +839,19 @@ INSTANTIATE_TEST_SUITE_P(
     })),
     FileNameAsCustomTestSuffix
 );
+
+INSTANTIATE_TEST_SUITE_P(
+    Glsl, CompileVulkanToNonSemanticShaderDebugInfoTest,
+    ::testing::ValuesIn(std::vector<std::string>({
+        "spv.debuginfo.glsl.vert",
+        "spv.debuginfo.glsl.frag",
+        "spv.debuginfo.glsl.comp",
+        "spv.debuginfo.glsl.geom",
+        "spv.debuginfo.glsl.tesc",
+        "spv.debuginfo.glsl.tese"
+    })),
+    FileNameAsCustomTestSuffix
+);
 // clang-format on
 
 }  // anonymous namespace