Merge pull request #1291 from ben-clayton/add-nv-nopersp
Add support for GL_NV_shader_noperspective_interpolation
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user