spir-reader: fix validity of unit tests
- skip dumping due to SPIR-V Tools validation error for Location
conflicts for IO variables duplicated on an OpEntryPoint interface
list (SPIRV-Tools issue #4403)
- Skip dumping for unit test for conversion of RelaxedPrecision
decoration.
Bug: tint:1043
Change-Id: I8ce3a7660d74b771e3fa62dc39e4e030e4ba6aa1
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/59560
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: James Price <jrprice@google.com>
Commit-Queue: James Price <jrprice@google.com>
Auto-Submit: David Neto <dneto@google.com>
diff --git a/src/reader/spirv/parser_impl_get_decorations_test.cc b/src/reader/spirv/parser_impl_get_decorations_test.cc
index f4fa13d..eb81a34 100644
--- a/src/reader/spirv/parser_impl_get_decorations_test.cc
+++ b/src/reader/spirv/parser_impl_get_decorations_test.cc
@@ -118,6 +118,7 @@
EXPECT_THAT(decorations,
UnorderedElementsAre(Decoration{SpvDecorationRelaxedPrecision}));
EXPECT_TRUE(p->error().empty());
+ p->SkipDumpingPending(kSkipReason);
}
// TODO(dneto): Enable when ArrayStride is handled
diff --git a/src/reader/spirv/parser_impl_module_var_test.cc b/src/reader/spirv/parser_impl_module_var_test.cc
index 11da9b7..95ed7dd 100644
--- a/src/reader/spirv/parser_impl_module_var_test.cc
+++ b/src/reader/spirv/parser_impl_module_var_test.cc
@@ -5549,15 +5549,22 @@
R"(
OpCapability Shader
OpMemoryModel Logical Simple
- OpEntryPoint GLCompute %1000 "w1000"
- OpEntryPoint GLCompute %1100 "w1100" %1
- OpEntryPoint GLCompute %1200 "w1200" %2 %15
+ OpEntryPoint Fragment %1000 "w1000"
+ OpEntryPoint Fragment %1100 "w1100" %1
+ OpEntryPoint Fragment %1200 "w1200" %2 %15
; duplication is tolerated prior to SPIR-V 1.4
- OpEntryPoint GLCompute %1300 "w1300" %1 %15 %2 %1
- OpExecutionMode %1000 LocalSize 1 1 1
- OpExecutionMode %1100 LocalSize 1 1 1
- OpExecutionMode %1200 LocalSize 1 1 1
- OpExecutionMode %1300 LocalSize 1 1 1
+ OpEntryPoint Fragment %1300 "w1300" %1 %15 %2 %1
+ OpExecutionMode %1000 OriginUpperLeft
+ OpExecutionMode %1100 OriginUpperLeft
+ OpExecutionMode %1200 OriginUpperLeft
+ OpExecutionMode %1300 OriginUpperLeft
+
+ OpDecorate %1 Location 1
+ OpDecorate %2 Location 2
+ OpDecorate %5 Location 5
+ OpDecorate %11 Location 1
+ OpDecorate %12 Location 2
+ OpDecorate %15 Location 5
)" + CommonTypes() +
R"(
@@ -5644,6 +5651,11 @@
EXPECT_EQ(1u, info_1300.size());
EXPECT_THAT(info_1300[0].inputs, ElementsAre(1, 2));
EXPECT_THAT(info_1300[0].outputs, ElementsAre(15));
+
+ // Validation incorrectly reports an overlap for the duplicated variable %1 on
+ // shader %1300
+ p->SkipDumpingPending(
+ "https://github.com/KhronosGroup/SPIRV-Tools/issues/4403");
}
TEST_F(SpvModuleScopeVarParserTest, InputVarsConvertedToPrivate) {