| 1 |
;; Tests a diff where the dst shader doesn't have OpExtImport while the |
| 2 |
;; src shader does (and uses OpExtInst). This test ensures that when matching, |
| 3 |
;; the OpExtImport instruction from the correct module is referenced. |
| 4 |
OpCapability Shader |
| 5 |
%1 = OpExtInstImport "GLSL.std.450" |
| 6 |
OpMemoryModel Logical GLSL450 |
| 7 |
OpEntryPoint Fragment %4 "main" %9 %11 |
| 8 |
OpExecutionMode %4 OriginUpperLeft |
| 9 |
OpSource ESSL 310 |
| 10 |
OpName %4 "main" |
| 11 |
OpName %9 "color" |
| 12 |
OpName %11 "v" |
| 13 |
OpDecorate %9 RelaxedPrecision |
| 14 |
OpDecorate %9 Location 0 |
| 15 |
OpDecorate %11 RelaxedPrecision |
| 16 |
OpDecorate %11 Location 0 |
| 17 |
OpDecorate %12 RelaxedPrecision |
| 18 |
OpDecorate %13 RelaxedPrecision |
| 19 |
OpDecorate %14 RelaxedPrecision |
| 20 |
%2 = OpTypeVoid |
| 21 |
%3 = OpTypeFunction %2 |
| 22 |
%6 = OpTypeFloat 32 |
| 23 |
%7 = OpTypeVector %6 4 |
| 24 |
%8 = OpTypePointer Output %7 |
| 25 |
%9 = OpVariable %8 Output |
| 26 |
%10 = OpTypePointer Input %6 |
| 27 |
%11 = OpVariable %10 Input |
| 28 |
%4 = OpFunction %2 None %3 |
| 29 |
%5 = OpLabel |
| 30 |
%12 = OpLoad %6 %11 |
| 31 |
%13 = OpExtInst %6 %1 Log2 %12 |
| 32 |
%14 = OpCompositeConstruct %7 %13 %13 %13 %13 |
| 33 |
OpStore %9 %14 |
| 34 |
OpReturn |
| 35 |
OpFunctionEnd |
| 36 |
|