Web: Remove/rationalize a set of *_EXTENSIONS, using GLSLANG_WEB.
Focus was on the front end (not SPIR-V), minus the grammar. Reduces #ifdef count by around 320 and makes the web build 270K smaller, which is about 90% the target size. The grammar and scanner will be another step, as will the SPIR-V backend. This makes heavy use of methods #ifdef'd to return false as a global way of turning off code, relying on C++ DCE to do the rest.
This commit is contained in:
parent
e66dace97e
commit
7015bd658e
32 changed files with 2661 additions and 2712 deletions
|
|
@ -41,9 +41,7 @@ namespace {
|
|||
|
||||
using CompileToAstTest = GlslangTest<::testing::TestWithParam<std::string>>;
|
||||
|
||||
#ifdef NV_EXTENSIONS
|
||||
using CompileToAstTestNV = GlslangTest<::testing::TestWithParam<std::string>>;
|
||||
#endif
|
||||
|
||||
TEST_P(CompileToAstTest, FromFile)
|
||||
{
|
||||
|
|
@ -52,7 +50,6 @@ TEST_P(CompileToAstTest, FromFile)
|
|||
Target::AST);
|
||||
}
|
||||
|
||||
#ifdef NV_EXTENSIONS
|
||||
// Compiling GLSL to SPIR-V under OpenGL semantics (NV extensions enabled).
|
||||
TEST_P(CompileToAstTestNV, FromFile)
|
||||
{
|
||||
|
|
@ -60,7 +57,6 @@ TEST_P(CompileToAstTestNV, FromFile)
|
|||
Source::GLSL, Semantics::OpenGL, glslang::EShTargetVulkan_1_0, glslang::EShTargetSpv_1_0,
|
||||
Target::AST);
|
||||
}
|
||||
#endif
|
||||
|
||||
// clang-format off
|
||||
INSTANTIATE_TEST_CASE_P(
|
||||
|
|
@ -281,7 +277,6 @@ INSTANTIATE_TEST_CASE_P(
|
|||
FileNameAsCustomTestSuffix
|
||||
);
|
||||
|
||||
#ifdef NV_EXTENSIONS
|
||||
INSTANTIATE_TEST_CASE_P(
|
||||
Glsl, CompileToAstTestNV,
|
||||
::testing::ValuesIn(std::vector<std::string>({
|
||||
|
|
@ -289,7 +284,6 @@ INSTANTIATE_TEST_CASE_P(
|
|||
})),
|
||||
FileNameAsCustomTestSuffix
|
||||
);
|
||||
#endif
|
||||
// clang-format on
|
||||
|
||||
} // anonymous namespace
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue