Vulkan: Finish semantics for what creates spec-const-semantics.
Note: This required adding a new test mode to see the AST for vulkan tests. This also required reworking some deeper parts of type creation, regarding when storage qualification and constness is deduced bottom-up or dictated top-down.
This commit is contained in:
parent
87a94fc0fa
commit
d82c906378
16 changed files with 610 additions and 245 deletions
|
|
@ -43,6 +43,7 @@ namespace {
|
|||
|
||||
using CompileToSpirvTest = GlslangTest<::testing::TestWithParam<std::string>>;
|
||||
using VulkanSemantics = GlslangTest<::testing::TestWithParam<std::string>>;
|
||||
using VulkanAstSemantics = GlslangTest<::testing::TestWithParam<std::string>>;
|
||||
|
||||
// Compiling GLSL to SPIR-V under Vulkan semantics. Expected to successfully
|
||||
// generate SPIR-V.
|
||||
|
|
@ -62,6 +63,14 @@ TEST_P(VulkanSemantics, FromFile)
|
|||
Target::Spv);
|
||||
}
|
||||
|
||||
// GLSL-level Vulkan semantics test that need to see the AST for validation.
|
||||
TEST_P(VulkanAstSemantics, FromFile)
|
||||
{
|
||||
loadFileCompileAndCheck(GLSLANG_TEST_DIRECTORY, GetParam(),
|
||||
Source::GLSL, Semantics::Vulkan,
|
||||
Target::AST);
|
||||
}
|
||||
|
||||
// clang-format off
|
||||
INSTANTIATE_TEST_CASE_P(
|
||||
Glsl, CompileToSpirvTest,
|
||||
|
|
@ -187,6 +196,14 @@ INSTANTIATE_TEST_CASE_P(
|
|||
})),
|
||||
FileNameAsCustomTestSuffix
|
||||
);
|
||||
|
||||
INSTANTIATE_TEST_CASE_P(
|
||||
Glsl, VulkanAstSemantics,
|
||||
::testing::ValuesIn(std::vector<std::string>({
|
||||
"vulkan.ast.vert",
|
||||
})),
|
||||
FileNameAsCustomTestSuffix
|
||||
);
|
||||
// clang-format on
|
||||
|
||||
} // anonymous namespace
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue