| 1 |
; SPIR-V |
| 2 |
; Version: 1.0 |
| 3 |
; Generator: Khronos Glslang Reference Front End; 7 |
| 4 |
; Bound: 50 |
| 5 |
; Schema: 0 |
| 6 |
OpCapability Shader |
| 7 |
%1 = OpExtInstImport "GLSL.std.450" |
| 8 |
OpMemoryModel Logical GLSL450 |
| 9 |
OpEntryPoint Fragment %main "main" %FragColor %gl_FragCoord %vUV |
| 10 |
OpExecutionMode %main OriginUpperLeft |
| 11 |
OpSource GLSL 450 |
| 12 |
OpName %main "main" |
| 13 |
OpName %FragColor "FragColor" |
| 14 |
OpName %gl_FragCoord "gl_FragCoord" |
| 15 |
OpName %uSampled "uSampled" |
| 16 |
OpName %vUV "vUV" |
| 17 |
OpDecorate %FragColor Location 0 |
| 18 |
OpDecorate %gl_FragCoord BuiltIn FragCoord |
| 19 |
OpDecorate %uSampled DescriptorSet 0 |
| 20 |
OpDecorate %uSampled Binding 0 |
| 21 |
OpDecorate %vUV Location 0 |
| 22 |
%void = OpTypeVoid |
| 23 |
%3 = OpTypeFunction %void |
| 24 |
%float = OpTypeFloat 32 |
| 25 |
%v4float = OpTypeVector %float 4 |
| 26 |
%_ptr_Output_v4float = OpTypePointer Output %v4float |
| 27 |
%FragColor = OpVariable %_ptr_Output_v4float Output |
| 28 |
%float_0 = OpConstant %float 0 |
| 29 |
%11 = OpConstantComposite %v4float %float_0 %float_0 %float_0 %float_0 |
| 30 |
%_ptr_Input_v4float = OpTypePointer Input %v4float |
| 31 |
%gl_FragCoord = OpVariable %_ptr_Input_v4float Input |
| 32 |
%uint = OpTypeInt 32 0 |
| 33 |
%uint_0 = OpConstant %uint 0 |
| 34 |
%_ptr_Input_float = OpTypePointer Input %float |
| 35 |
%float_10 = OpConstant %float 10 |
| 36 |
%bool = OpTypeBool |
| 37 |
%24 = OpTypeImage %float 2D 0 0 1 1 Unknown |
| 38 |
%25 = OpTypeSampledImage %24 |
| 39 |
%_ptr_UniformConstant_25 = OpTypePointer UniformConstant %25 |
| 40 |
%uSampled = OpVariable %_ptr_UniformConstant_25 UniformConstant |
| 41 |
%v2float = OpTypeVector %float 2 |
| 42 |
%_ptr_Input_v2float = OpTypePointer Input %v2float |
| 43 |
%vUV = OpVariable %_ptr_Input_v2float Input |
| 44 |
%int = OpTypeInt 32 1 |
| 45 |
%v2int = OpTypeVector %int 2 |
| 46 |
%int_0 = OpConstant %int 0 |
| 47 |
%int_1 = OpConstant %int 1 |
| 48 |
%main = OpFunction %void None %3 |
| 49 |
%5 = OpLabel |
| 50 |
OpStore %FragColor %11 |
| 51 |
%17 = OpAccessChain %_ptr_Input_float %gl_FragCoord %uint_0 |
| 52 |
%18 = OpLoad %float %17 |
| 53 |
%21 = OpFOrdLessThan %bool %18 %float_10 |
| 54 |
OpSelectionMerge %23 None |
| 55 |
OpBranchConditional %21 %22 %41 |
| 56 |
%22 = OpLabel |
| 57 |
%28 = OpLoad %25 %uSampled |
| 58 |
%32 = OpLoad %v2float %vUV |
| 59 |
%35 = OpConvertFToS %v2int %32 |
| 60 |
%64 = OpImage %24 %28 |
| 61 |
%38 = OpImageFetch %v4float %64 %35 Sample %int_0 |
| 62 |
%39 = OpLoad %v4float %FragColor |
| 63 |
%40 = OpFAdd %v4float %39 %38 |
| 64 |
OpStore %FragColor %40 |
| 65 |
OpBranch %23 |
| 66 |
%41 = OpLabel |
| 67 |
%42 = OpLoad %25 %uSampled |
| 68 |
%43 = OpLoad %v2float %vUV |
| 69 |
%44 = OpConvertFToS %v2int %43 |
| 70 |
%46 = OpImage %24 %42 |
| 71 |
%47 = OpImageFetch %v4float %46 %44 Sample %int_1 |
| 72 |
%48 = OpLoad %v4float %FragColor |
| 73 |
%49 = OpFAdd %v4float %48 %47 |
| 74 |
OpStore %FragColor %49 |
| 75 |
OpBranch %23 |
| 76 |
%23 = OpLabel |
| 77 |
OpReturn |
| 78 |
OpFunctionEnd |