Merge pull request #1291 from ben-clayton/add-nv-nopersp

Add support for GL_NV_shader_noperspective_interpolation
This commit is contained in:
John Kessenich
2018-03-16 15:50:38 -06:00
committed by GitHub
15 changed files with 1196 additions and 1074 deletions

View File

@@ -41,6 +41,10 @@ namespace {
using CompileToAstTest = GlslangTest<::testing::TestWithParam<std::string>>;
#ifdef NV_EXTENSIONS
using CompileToAstTestNV = GlslangTest<::testing::TestWithParam<std::string>>;
#endif
TEST_P(CompileToAstTest, FromFile)
{
loadFileCompileAndCheck(GlobalTestSettings.testRoot, GetParam(),
@@ -48,6 +52,16 @@ TEST_P(CompileToAstTest, FromFile)
Target::AST);
}
#ifdef NV_EXTENSIONS
// Compiling GLSL to SPIR-V under OpenGL semantics (NV extensions enabled).
TEST_P(CompileToAstTestNV, FromFile)
{
loadFileCompileAndCheck(GlobalTestSettings.testRoot, GetParam(),
Source::GLSL, Semantics::OpenGL, glslang::EShTargetVulkan_1_0,
Target::AST);
}
#endif
// clang-format off
INSTANTIATE_TEST_CASE_P(
Glsl, CompileToAstTest,
@@ -214,6 +228,16 @@ INSTANTIATE_TEST_CASE_P(
})),
FileNameAsCustomTestSuffix
);
#ifdef NV_EXTENSIONS
INSTANTIATE_TEST_CASE_P(
Glsl, CompileToAstTestNV,
::testing::ValuesIn(std::vector<std::string>({
"nvShaderNoperspectiveInterpolation.frag",
})),
FileNameAsCustomTestSuffix
);
#endif
// clang-format on
} // anonymous namespace

View File

@@ -171,7 +171,7 @@ TEST_P(CompileVulkanToSpirvTestAMD, FromFile)
#endif
#ifdef NV_EXTENSIONS
// Compiling GLSL to SPIR-V under Vulkan semantics (AMD extensions enabled).
// Compiling GLSL to SPIR-V under Vulkan semantics (NV extensions enabled).
// Expected to successfully generate SPIR-V.
TEST_P(CompileVulkanToSpirvTestNV, FromFile)
{