Merge pull request #2866 from greg-lunarg/i2858

Temporarily disable spirv1.6 tests
This commit is contained in:
Greg Fischer 2022-01-11 14:36:01 -07:00 committed by GitHub
commit 43d40e80ad
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 38 additions and 31 deletions

View File

@ -162,8 +162,11 @@ typedef enum {
LAST_ELEMENT_MARKER(EShTargetCount), LAST_ELEMENT_MARKER(EShTargetCount),
} EShTargetLanguage; } EShTargetLanguage;
// TODO(greg-lunarg): Fix non-determinism problem with Universal
// https://github.com/KhronosGroup/glslang/issues/2858
typedef enum { typedef enum {
EShTargetUniversal = 0, // Universal EShTargetUniversal = 0, // Universal - Do not use, see comment above
EShTargetVulkan_1_0 = (1 << 22), // Vulkan 1.0 EShTargetVulkan_1_0 = (1 << 22), // Vulkan 1.0
EShTargetVulkan_1_1 = (1 << 22) | (1 << 12), // Vulkan 1.1 EShTargetVulkan_1_1 = (1 << 22) | (1 << 12), // Vulkan 1.1
EShTargetVulkan_1_2 = (1 << 22) | (2 << 12), // Vulkan 1.2 EShTargetVulkan_1_2 = (1 << 22) | (2 << 12), // Vulkan 1.2

View File

@ -59,7 +59,7 @@ std::string FileNameAsCustomTestSuffix(
using HlslCompileTest = GlslangTest<::testing::TestWithParam<FileNameEntryPointPair>>; using HlslCompileTest = GlslangTest<::testing::TestWithParam<FileNameEntryPointPair>>;
using HlslVulkan1_1CompileTest = GlslangTest<::testing::TestWithParam<FileNameEntryPointPair>>; using HlslVulkan1_1CompileTest = GlslangTest<::testing::TestWithParam<FileNameEntryPointPair>>;
using HlslSpv1_6CompileTest = GlslangTest<::testing::TestWithParam<FileNameEntryPointPair>>; //using HlslSpv1_6CompileTest = GlslangTest<::testing::TestWithParam<FileNameEntryPointPair>>;
using HlslCompileAndFlattenTest = GlslangTest<::testing::TestWithParam<FileNameEntryPointPair>>; using HlslCompileAndFlattenTest = GlslangTest<::testing::TestWithParam<FileNameEntryPointPair>>;
using HlslLegalizeTest = GlslangTest<::testing::TestWithParam<FileNameEntryPointPair>>; using HlslLegalizeTest = GlslangTest<::testing::TestWithParam<FileNameEntryPointPair>>;
using HlslDebugTest = GlslangTest<::testing::TestWithParam<FileNameEntryPointPair>>; using HlslDebugTest = GlslangTest<::testing::TestWithParam<FileNameEntryPointPair>>;
@ -82,12 +82,14 @@ TEST_P(HlslVulkan1_1CompileTest, FromFile)
Target::BothASTAndSpv, true, GetParam().entryPoint); Target::BothASTAndSpv, true, GetParam().entryPoint);
} }
TEST_P(HlslSpv1_6CompileTest, FromFile) // TODO(greg-lunarg): Re-enable tests when Vulkan1.3 ClientTarget is available
{
loadFileCompileAndCheck(GlobalTestSettings.testRoot, GetParam().fileName, //TEST_P(HlslSpv1_6CompileTest, FromFile)
Source::HLSL, Semantics::Vulkan, glslang::EShTargetUniversal, glslang::EShTargetSpv_1_6, //{
Target::BothASTAndSpv, true, GetParam().entryPoint); // loadFileCompileAndCheck(GlobalTestSettings.testRoot, GetParam().fileName,
} // Source::HLSL, Semantics::Vulkan, glslang::EShTargetUniversal, glslang::EShTargetSpv_1_6,
// Target::BothASTAndSpv, true, GetParam().entryPoint);
//}
TEST_P(HlslCompileAndFlattenTest, FromFile) TEST_P(HlslCompileAndFlattenTest, FromFile)
{ {
@ -459,13 +461,13 @@ INSTANTIATE_TEST_SUITE_P(
// clang-format on // clang-format on
// clang-format off // clang-format off
INSTANTIATE_TEST_SUITE_P( //INSTANTIATE_TEST_SUITE_P(
ToSpirv, HlslSpv1_6CompileTest, // ToSpirv, HlslSpv1_6CompileTest,
::testing::ValuesIn(std::vector<FileNameEntryPointPair>{ // ::testing::ValuesIn(std::vector<FileNameEntryPointPair>{
{"hlsl.spv.1.6.discard.frag", "PixelShaderFunction"} // {"hlsl.spv.1.6.discard.frag", "PixelShaderFunction"}
}), // }),
FileNameAsCustomTestSuffix // FileNameAsCustomTestSuffix
); //);
// clang-format on // clang-format on
// clang-format off // clang-format off

View File

@ -69,7 +69,7 @@ using CompileVulkanToSpirvDeadCodeElimTest = GlslangTest<::testing::TestWithPara
using CompileVulkanToDebugSpirvTest = GlslangTest<::testing::TestWithParam<std::string>>; using CompileVulkanToDebugSpirvTest = GlslangTest<::testing::TestWithParam<std::string>>;
using CompileVulkan1_1ToSpirvTest = GlslangTest<::testing::TestWithParam<std::string>>; using CompileVulkan1_1ToSpirvTest = GlslangTest<::testing::TestWithParam<std::string>>;
using CompileToSpirv14Test = GlslangTest<::testing::TestWithParam<std::string>>; using CompileToSpirv14Test = GlslangTest<::testing::TestWithParam<std::string>>;
using CompileToSpirv16Test = GlslangTest<::testing::TestWithParam<std::string>>; //using CompileToSpirv16Test = GlslangTest<::testing::TestWithParam<std::string>>;
using CompileOpenGLToSpirvTest = GlslangTest<::testing::TestWithParam<std::string>>; using CompileOpenGLToSpirvTest = GlslangTest<::testing::TestWithParam<std::string>>;
using VulkanSemantics = GlslangTest<::testing::TestWithParam<std::string>>; using VulkanSemantics = GlslangTest<::testing::TestWithParam<std::string>>;
using OpenGLSemantics = GlslangTest<::testing::TestWithParam<std::string>>; using OpenGLSemantics = GlslangTest<::testing::TestWithParam<std::string>>;
@ -123,12 +123,14 @@ TEST_P(CompileToSpirv14Test, FromFile)
Target::Spv); Target::Spv);
} }
TEST_P(CompileToSpirv16Test, FromFile) // TODO(greg-lunarg): Re-enable tests when Vulkan1.3 ClientTarget is available
{
loadFileCompileAndCheck(GlobalTestSettings.testRoot, GetParam(), //TEST_P(CompileToSpirv16Test, FromFile)
Source::GLSL, Semantics::Vulkan, glslang::EShTargetUniversal, glslang::EShTargetSpv_1_6, //{
Target::Spv); // loadFileCompileAndCheck(GlobalTestSettings.testRoot, GetParam(),
} // Source::GLSL, Semantics::Vulkan, glslang::EShTargetUniversal, glslang::EShTargetSpv_1_6,
// Target::Spv);
//}
// Compiling GLSL to SPIR-V under OpenGL semantics. Expected to successfully // Compiling GLSL to SPIR-V under OpenGL semantics. Expected to successfully
// generate SPIR-V. // generate SPIR-V.
@ -630,15 +632,15 @@ INSTANTIATE_TEST_SUITE_P(
); );
// clang-format off // clang-format off
INSTANTIATE_TEST_SUITE_P( //INSTANTIATE_TEST_SUITE_P(
Glsl, CompileToSpirv16Test, // Glsl, CompileToSpirv16Test,
::testing::ValuesIn(std::vector<std::string>({ // ::testing::ValuesIn(std::vector<std::string>({
"spv.1.6.conditionalDiscard.frag", // "spv.1.6.conditionalDiscard.frag",
"spv.1.6.helperInvocation.frag", // "spv.1.6.helperInvocation.frag",
"spv.1.6.specConstant.comp", // "spv.1.6.specConstant.comp",
})), // })),
FileNameAsCustomTestSuffix // FileNameAsCustomTestSuffix
); //);
// clang-format off // clang-format off