| 92 | )"; |
| 93 | |
| 94 | TEST(DiffTest, OpextinstInSrcOnly) { |
| 95 | constexpr char kDiff[] = R"( ; SPIR-V |
| 96 | ; Version: 1.6 |
| 97 | ; Generator: Khronos SPIR-V Tools Assembler; 0 |
| 98 | ; Bound: 15 |
| 99 | ; Schema: 0 |
| 100 | OpCapability Shader |
| 101 | -%1 = OpExtInstImport "GLSL.std.450" |
| 102 | OpMemoryModel Logical GLSL450 |
| 103 | OpEntryPoint Fragment %4 "main" %9 %11 |
| 104 | OpExecutionMode %4 OriginUpperLeft |
| 105 | OpSource ESSL 310 |
| 106 | OpName %4 "main" |
| 107 | OpName %9 "color" |
| 108 | OpName %11 "v" |
| 109 | OpDecorate %9 RelaxedPrecision |
| 110 | OpDecorate %9 Location 0 |
| 111 | OpDecorate %11 RelaxedPrecision |
| 112 | OpDecorate %11 Location 0 |
| 113 | OpDecorate %12 RelaxedPrecision |
| 114 | -OpDecorate %13 RelaxedPrecision |
| 115 | OpDecorate %14 RelaxedPrecision |
| 116 | %2 = OpTypeVoid |
| 117 | %3 = OpTypeFunction %2 |
| 118 | %6 = OpTypeFloat 32 |
| 119 | %7 = OpTypeVector %6 4 |
| 120 | %8 = OpTypePointer Output %7 |
| 121 | %9 = OpVariable %8 Output |
| 122 | %10 = OpTypePointer Input %6 |
| 123 | %11 = OpVariable %10 Input |
| 124 | %4 = OpFunction %2 None %3 |
| 125 | %5 = OpLabel |
| 126 | %12 = OpLoad %6 %11 |
| 127 | -%13 = OpExtInst %6 %1 Log2 %12 |
| 128 | -%14 = OpCompositeConstruct %7 %13 %13 %13 %13 |
| 129 | +%14 = OpCompositeConstruct %7 %12 %12 %12 %12 |
| 130 | OpStore %9 %14 |
| 131 | OpReturn |
| 132 | OpFunctionEnd |
| 133 | )"; |
| 134 | Options options; |
| 135 | DoStringDiffTest(kSrc, kDst, kDiff, options); |
| 136 | } |
| 137 | |
| 138 | TEST(DiffTest, OpextinstInSrcOnlyNoDebug) { |
| 139 | constexpr char kSrcNoDebug[] = R"( OpCapability Shader |
nothing calls this directly
no test coverage detected