Manually merge ClemensRognerSD-dx9-sampler and resolve conflicts.

This commit is contained in:
John Kessenich
2018-12-07 18:38:26 -07:00
parent 5d43c4aac7
commit bd1c1831d5
13 changed files with 1060 additions and 8 deletions

18
gtests/Hlsl.FromFile.cpp Normal file → Executable file
View File

@@ -62,6 +62,7 @@ using HlslVulkan1_1CompileTest = GlslangTest<::testing::TestWithParam<FileNameEn
using HlslCompileAndFlattenTest = GlslangTest<::testing::TestWithParam<FileNameEntryPointPair>>;
using HlslLegalizeTest = GlslangTest<::testing::TestWithParam<FileNameEntryPointPair>>;
using HlslDebugTest = GlslangTest<::testing::TestWithParam<FileNameEntryPointPair>>;
using HlslDX9CompatibleTest = GlslangTest<::testing::TestWithParam<FileNameEntryPointPair>>;
// Compiling HLSL to pre-legalized SPIR-V under Vulkan semantics. Expected
// to successfully generate both AST and SPIR-V.
@@ -106,6 +107,14 @@ TEST_P(HlslDebugTest, FromFile)
"/baseResults/", false, true);
}
TEST_P(HlslDX9CompatibleTest, FromFile)
{
loadFileCompileAndCheckWithOptions(GlobalTestSettings.testRoot, GetParam().fileName, Source::HLSL,
Semantics::Vulkan, glslang::EShTargetVulkan_1_0, Target::BothASTAndSpv, true,
GetParam().entryPoint, "/baseResults/",
EShMessages::EShMsgHlslDX9Compatible);
}
// clang-format off
INSTANTIATE_TEST_CASE_P(
ToSpirv, HlslCompileTest,
@@ -457,6 +466,15 @@ INSTANTIATE_TEST_CASE_P(
FileNameAsCustomTestSuffix
);
INSTANTIATE_TEST_CASE_P(
ToSpirv, HlslDX9CompatibleTest,
::testing::ValuesIn(std::vector<FileNameEntryPointPair>{
{"hlsl.sample.dx9.frag", "main"},
{"hlsl.sample.dx9.vert", "main"},
}),
FileNameAsCustomTestSuffix
);
// clang-format on
} // anonymous namespace
} // namespace glslangtest