| 1 |
; SPIR-V |
| 2 |
; Version: 1.0 |
| 3 |
; Generator: Khronos Glslang Reference Front End; 7 |
| 4 |
; Bound: 33 |
| 5 |
; Schema: 0 |
| 6 |
OpCapability Shader |
| 7 |
OpCapability DemoteToHelperInvocationEXT |
| 8 |
OpExtension "SPV_EXT_demote_to_helper_invocation" |
| 9 |
%1 = OpExtInstImport "GLSL.std.450" |
| 10 |
OpMemoryModel Logical GLSL450 |
| 11 |
OpEntryPoint Fragment %main "main" %vA %FragColor |
| 12 |
OpExecutionMode %main OriginUpperLeft |
| 13 |
OpSource GLSL 450 |
| 14 |
OpSourceExtension "GL_EXT_demote_to_helper_invocation" |
| 15 |
OpName %main "main" |
| 16 |
OpName %foobar_i1_ "foobar(i1;" |
| 17 |
OpName %a "a" |
| 18 |
OpName %a_0 "a" |
| 19 |
OpName %vA "vA" |
| 20 |
OpName %param "param" |
| 21 |
OpName %FragColor "FragColor" |
| 22 |
OpDecorate %vA Flat |
| 23 |
OpDecorate %vA Location 0 |
| 24 |
OpDecorate %FragColor Location 0 |
| 25 |
%void = OpTypeVoid |
| 26 |
%3 = OpTypeFunction %void |
| 27 |
%int = OpTypeInt 32 1 |
| 28 |
%_ptr_Function_int = OpTypePointer Function %int |
| 29 |
%float = OpTypeFloat 32 |
| 30 |
%v4float = OpTypeVector %float 4 |
| 31 |
%10 = OpTypeFunction %v4float %_ptr_Function_int |
| 32 |
%int_0 = OpConstant %int 0 |
| 33 |
%bool = OpTypeBool |
| 34 |
%float_10 = OpConstant %float 10 |
| 35 |
%21 = OpConstantComposite %v4float %float_10 %float_10 %float_10 %float_10 |
| 36 |
%_ptr_Function_v4float = OpTypePointer Function %v4float |
| 37 |
%_ptr_Input_int = OpTypePointer Input %int |
| 38 |
%vA = OpVariable %_ptr_Input_int Input |
| 39 |
%_ptr_Output_v4float = OpTypePointer Output %v4float |
| 40 |
%FragColor = OpVariable %_ptr_Output_v4float Output |
| 41 |
%main = OpFunction %void None %3 |
| 42 |
%5 = OpLabel |
| 43 |
%a_0 = OpVariable %_ptr_Function_v4float Function |
| 44 |
%param = OpVariable %_ptr_Function_int Function |
| 45 |
%29 = OpLoad %int %vA |
| 46 |
OpStore %param %29 |
| 47 |
%30 = OpFunctionCall %v4float %foobar_i1_ %param |
| 48 |
OpStore %FragColor %21 |
| 49 |
OpReturn |
| 50 |
OpFunctionEnd |
| 51 |
%foobar_i1_ = OpFunction %v4float None %10 |
| 52 |
%a = OpFunctionParameter %_ptr_Function_int |
| 53 |
%13 = OpLabel |
| 54 |
%14 = OpLoad %int %a |
| 55 |
%17 = OpSLessThan %bool %14 %int_0 |
| 56 |
OpSelectionMerge %19 None |
| 57 |
OpBranchConditional %17 %18 %19 |
| 58 |
%18 = OpLabel |
| 59 |
OpDemoteToHelperInvocationEXT |
| 60 |
OpBranch %19 |
| 61 |
%19 = OpLabel |
| 62 |
OpReturnValue %21 |
| 63 |
OpFunctionEnd |