MCPcopy Create free account
hub / github.com/KhronosGroup/SPIRV-Tools / TEST

Function TEST

test/diff/diff_files/OpExtInst_in_src_only_autogen.cpp:94–136  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

92)";
93
94TEST(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
138TEST(DiffTest, OpextinstInSrcOnlyNoDebug) {
139 constexpr char kSrcNoDebug[] = R"( OpCapability Shader

Callers

nothing calls this directly

Calls 1

DoStringDiffTestFunction · 0.85

Tested by

no test coverage detected