Skip to content

Commit 43d40e8

Browse files
authored
Merge pull request KhronosGroup#2866 from greg-lunarg/i2858
Temporarily disable spirv1.6 tests
2 parents 109b31a + 140a76a commit 43d40e8

File tree

3 files changed

+38
-31
lines changed

3 files changed

+38
-31
lines changed

glslang/Public/ShaderLang.h

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,8 +162,11 @@ typedef enum {
162162
LAST_ELEMENT_MARKER(EShTargetCount),
163163
} EShTargetLanguage;
164164

165+
// TODO(greg-lunarg): Fix non-determinism problem with Universal
166+
// https://github.com/KhronosGroup/glslang/issues/2858
167+
165168
typedef enum {
166-
EShTargetUniversal = 0, // Universal
169+
EShTargetUniversal = 0, // Universal - Do not use, see comment above
167170
EShTargetVulkan_1_0 = (1 << 22), // Vulkan 1.0
168171
EShTargetVulkan_1_1 = (1 << 22) | (1 << 12), // Vulkan 1.1
169172
EShTargetVulkan_1_2 = (1 << 22) | (2 << 12), // Vulkan 1.2

gtests/Hlsl.FromFile.cpp

Lines changed: 16 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ std::string FileNameAsCustomTestSuffix(
5959

6060
using HlslCompileTest = GlslangTest<::testing::TestWithParam<FileNameEntryPointPair>>;
6161
using HlslVulkan1_1CompileTest = GlslangTest<::testing::TestWithParam<FileNameEntryPointPair>>;
62-
using HlslSpv1_6CompileTest = GlslangTest<::testing::TestWithParam<FileNameEntryPointPair>>;
62+
//using HlslSpv1_6CompileTest = GlslangTest<::testing::TestWithParam<FileNameEntryPointPair>>;
6363
using HlslCompileAndFlattenTest = GlslangTest<::testing::TestWithParam<FileNameEntryPointPair>>;
6464
using HlslLegalizeTest = GlslangTest<::testing::TestWithParam<FileNameEntryPointPair>>;
6565
using HlslDebugTest = GlslangTest<::testing::TestWithParam<FileNameEntryPointPair>>;
@@ -82,12 +82,14 @@ TEST_P(HlslVulkan1_1CompileTest, FromFile)
8282
Target::BothASTAndSpv, true, GetParam().entryPoint);
8383
}
8484

85-
TEST_P(HlslSpv1_6CompileTest, FromFile)
86-
{
87-
loadFileCompileAndCheck(GlobalTestSettings.testRoot, GetParam().fileName,
88-
Source::HLSL, Semantics::Vulkan, glslang::EShTargetUniversal, glslang::EShTargetSpv_1_6,
89-
Target::BothASTAndSpv, true, GetParam().entryPoint);
90-
}
85+
// TODO(greg-lunarg): Re-enable tests when Vulkan1.3 ClientTarget is available
86+
87+
//TEST_P(HlslSpv1_6CompileTest, FromFile)
88+
//{
89+
// loadFileCompileAndCheck(GlobalTestSettings.testRoot, GetParam().fileName,
90+
// Source::HLSL, Semantics::Vulkan, glslang::EShTargetUniversal, glslang::EShTargetSpv_1_6,
91+
// Target::BothASTAndSpv, true, GetParam().entryPoint);
92+
//}
9193

9294
TEST_P(HlslCompileAndFlattenTest, FromFile)
9395
{
@@ -459,13 +461,13 @@ INSTANTIATE_TEST_SUITE_P(
459461
// clang-format on
460462

461463
// clang-format off
462-
INSTANTIATE_TEST_SUITE_P(
463-
ToSpirv, HlslSpv1_6CompileTest,
464-
::testing::ValuesIn(std::vector<FileNameEntryPointPair>{
465-
{"hlsl.spv.1.6.discard.frag", "PixelShaderFunction"}
466-
}),
467-
FileNameAsCustomTestSuffix
468-
);
464+
//INSTANTIATE_TEST_SUITE_P(
465+
// ToSpirv, HlslSpv1_6CompileTest,
466+
// ::testing::ValuesIn(std::vector<FileNameEntryPointPair>{
467+
// {"hlsl.spv.1.6.discard.frag", "PixelShaderFunction"}
468+
// }),
469+
// FileNameAsCustomTestSuffix
470+
//);
469471
// clang-format on
470472

471473
// clang-format off

gtests/Spv.FromFile.cpp

Lines changed: 18 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ using CompileVulkanToSpirvDeadCodeElimTest = GlslangTest<::testing::TestWithPara
6969
using CompileVulkanToDebugSpirvTest = GlslangTest<::testing::TestWithParam<std::string>>;
7070
using CompileVulkan1_1ToSpirvTest = GlslangTest<::testing::TestWithParam<std::string>>;
7171
using CompileToSpirv14Test = GlslangTest<::testing::TestWithParam<std::string>>;
72-
using CompileToSpirv16Test = GlslangTest<::testing::TestWithParam<std::string>>;
72+
//using CompileToSpirv16Test = GlslangTest<::testing::TestWithParam<std::string>>;
7373
using CompileOpenGLToSpirvTest = GlslangTest<::testing::TestWithParam<std::string>>;
7474
using VulkanSemantics = GlslangTest<::testing::TestWithParam<std::string>>;
7575
using OpenGLSemantics = GlslangTest<::testing::TestWithParam<std::string>>;
@@ -123,12 +123,14 @@ TEST_P(CompileToSpirv14Test, FromFile)
123123
Target::Spv);
124124
}
125125

126-
TEST_P(CompileToSpirv16Test, FromFile)
127-
{
128-
loadFileCompileAndCheck(GlobalTestSettings.testRoot, GetParam(),
129-
Source::GLSL, Semantics::Vulkan, glslang::EShTargetUniversal, glslang::EShTargetSpv_1_6,
130-
Target::Spv);
131-
}
126+
// TODO(greg-lunarg): Re-enable tests when Vulkan1.3 ClientTarget is available
127+
128+
//TEST_P(CompileToSpirv16Test, FromFile)
129+
//{
130+
// loadFileCompileAndCheck(GlobalTestSettings.testRoot, GetParam(),
131+
// Source::GLSL, Semantics::Vulkan, glslang::EShTargetUniversal, glslang::EShTargetSpv_1_6,
132+
// Target::Spv);
133+
//}
132134

133135
// Compiling GLSL to SPIR-V under OpenGL semantics. Expected to successfully
134136
// generate SPIR-V.
@@ -630,15 +632,15 @@ INSTANTIATE_TEST_SUITE_P(
630632
);
631633

632634
// clang-format off
633-
INSTANTIATE_TEST_SUITE_P(
634-
Glsl, CompileToSpirv16Test,
635-
::testing::ValuesIn(std::vector<std::string>({
636-
"spv.1.6.conditionalDiscard.frag",
637-
"spv.1.6.helperInvocation.frag",
638-
"spv.1.6.specConstant.comp",
639-
})),
640-
FileNameAsCustomTestSuffix
641-
);
635+
//INSTANTIATE_TEST_SUITE_P(
636+
// Glsl, CompileToSpirv16Test,
637+
// ::testing::ValuesIn(std::vector<std::string>({
638+
// "spv.1.6.conditionalDiscard.frag",
639+
// "spv.1.6.helperInvocation.frag",
640+
// "spv.1.6.specConstant.comp",
641+
// })),
642+
// FileNameAsCustomTestSuffix
643+
//);
642644

643645

644646
// clang-format off

0 commit comments

Comments
 (0)