| 115 | }; |
| 116 | |
| 117 | TEST(ValidationDuringReductionTest, CheckInvalidPassMakesNoProgress) { |
| 118 | // A module whose global values are all referenced, so that any application of |
| 119 | // MakeModuleInvalidPass will make the module invalid. Check that the reducer |
| 120 | // makes no progress, as every step will be invalid and treated as |
| 121 | // uninteresting. |
| 122 | std::string original = R"( |
| 123 | OpCapability Shader |
| 124 | %1 = OpExtInstImport "GLSL.std.450" |
| 125 | OpMemoryModel Logical GLSL450 |
| 126 | OpEntryPoint Fragment %4 "main" %60 |
| 127 | OpExecutionMode %4 OriginUpperLeft |
| 128 | OpSource ESSL 310 |
| 129 | OpName %4 "main" |
| 130 | OpName %16 "buf2" |
| 131 | OpMemberName %16 0 "i" |
| 132 | OpName %18 "" |
| 133 | OpName %25 "buf1" |
| 134 | OpMemberName %25 0 "f" |
| 135 | OpName %27 "" |
| 136 | OpName %60 "_GLF_color" |
| 137 | OpMemberDecorate %16 0 Offset 0 |
| 138 | OpDecorate %16 Block |
| 139 | OpDecorate %18 DescriptorSet 0 |
| 140 | OpDecorate %18 Binding 2 |
| 141 | OpMemberDecorate %25 0 Offset 0 |
| 142 | OpDecorate %25 Block |
| 143 | OpDecorate %27 DescriptorSet 0 |
| 144 | OpDecorate %27 Binding 1 |
| 145 | OpDecorate %60 Location 0 |
| 146 | %2 = OpTypeVoid |
| 147 | %3 = OpTypeFunction %2 |
| 148 | %6 = OpTypeInt 32 1 |
| 149 | %9 = OpConstant %6 0 |
| 150 | %16 = OpTypeStruct %6 |
| 151 | %17 = OpTypePointer Uniform %16 |
| 152 | %18 = OpVariable %17 Uniform |
| 153 | %19 = OpTypePointer Uniform %6 |
| 154 | %22 = OpTypeBool |
| 155 | %24 = OpTypeFloat 32 |
| 156 | %25 = OpTypeStruct %24 |
| 157 | %26 = OpTypePointer Uniform %25 |
| 158 | %27 = OpVariable %26 Uniform |
| 159 | %28 = OpTypePointer Uniform %24 |
| 160 | %31 = OpConstant %24 2 |
| 161 | %56 = OpConstant %6 1 |
| 162 | %58 = OpTypeVector %24 4 |
| 163 | %59 = OpTypePointer Output %58 |
| 164 | %60 = OpVariable %59 Output |
| 165 | %72 = OpUndef %24 |
| 166 | %74 = OpUndef %6 |
| 167 | %4 = OpFunction %2 None %3 |
| 168 | %5 = OpLabel |
| 169 | OpBranch %10 |
| 170 | %10 = OpLabel |
| 171 | %73 = OpPhi %6 %74 %5 %77 %34 |
| 172 | %71 = OpPhi %24 %72 %5 %76 %34 |
| 173 | %70 = OpPhi %6 %9 %5 %57 %34 |
| 174 | %20 = OpAccessChain %19 %18 %9 |
nothing calls this directly
no test coverage detected