blob: 59b8fddd471b10ce31d75f5243ddaa5eefe99b89 [file] [log] [blame]
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
; Bound: 145
; Schema: 0
OpCapability Shader
%73 = OpExtInstImport "GLSL.std.450"
OpMemoryModel Logical GLSL450
OpEntryPoint Fragment %main "main" %tint_symbol_1
OpExecutionMode %main OriginUpperLeft
OpName %buf0 "buf0"
OpMemberName %buf0 0 "x_GLF_uniform_float_values"
OpName %x_6 "x_6"
OpName %buf1 "buf1"
OpMemberName %buf1 0 "x_GLF_uniform_int_values"
OpName %x_10 "x_10"
OpName %x_GLF_color "x_GLF_color"
OpName %tint_symbol_1 "tint_symbol_1"
OpName %main_1 "main_1"
OpName %v0 "v0"
OpName %v1 "v1"
OpName %a "a"
OpName %c "c"
OpName %main_out "main_out"
OpMemberName %main_out 0 "x_GLF_color_1"
OpName %tint_symbol_2 "tint_symbol_2"
OpName %tint_symbol "tint_symbol"
OpName %main "main"
OpDecorate %buf0 Block
OpMemberDecorate %buf0 0 Offset 0
OpDecorate %_arr_float_uint_2 ArrayStride 16
OpDecorate %x_6 NonWritable
OpDecorate %x_6 DescriptorSet 0
OpDecorate %x_6 Binding 0
OpDecorate %buf1 Block
OpMemberDecorate %buf1 0 Offset 0
OpDecorate %_arr_int_uint_4 ArrayStride 16
OpDecorate %x_10 NonWritable
OpDecorate %x_10 DescriptorSet 0
OpDecorate %x_10 Binding 1
OpDecorate %tint_symbol_1 Location 0
OpMemberDecorate %main_out 0 Offset 0
%float = OpTypeFloat 32
%uint = OpTypeInt 32 0
%uint_2 = OpConstant %uint 2
%_arr_float_uint_2 = OpTypeArray %float %uint_2
%buf0 = OpTypeStruct %_arr_float_uint_2
%_ptr_Uniform_buf0 = OpTypePointer Uniform %buf0
%x_6 = OpVariable %_ptr_Uniform_buf0 Uniform
%int = OpTypeInt 32 1
%uint_4 = OpConstant %uint 4
%_arr_int_uint_4 = OpTypeArray %int %uint_4
%buf1 = OpTypeStruct %_arr_int_uint_4
%_ptr_Uniform_buf1 = OpTypePointer Uniform %buf1
%x_10 = OpVariable %_ptr_Uniform_buf1 Uniform
%v4float = OpTypeVector %float 4
%_ptr_Private_v4float = OpTypePointer Private %v4float
%17 = OpConstantNull %v4float
%x_GLF_color = OpVariable %_ptr_Private_v4float Private %17
%_ptr_Output_v4float = OpTypePointer Output %v4float
%tint_symbol_1 = OpVariable %_ptr_Output_v4float Output %17
%void = OpTypeVoid
%20 = OpTypeFunction %void
%_ptr_Function_v4float = OpTypePointer Function %v4float
%_ptr_Function_int = OpTypePointer Function %int
%29 = OpConstantNull %int
%uint_0 = OpConstant %uint 0
%int_1 = OpConstant %int 1
%_ptr_Uniform_float = OpTypePointer Uniform %float
%int_0 = OpConstant %int 0
%_ptr_Uniform_int = OpTypePointer Uniform %int
%bool = OpTypeBool
%int_3 = OpConstant %int 3
%int_2 = OpConstant %int 2
%_ptr_Function_float = OpTypePointer Function %float
%float_3 = OpConstant %float 3
%float_1 = OpConstant %float 1
%102 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1
%main_out = OpTypeStruct %v4float
%133 = OpTypeFunction %void %main_out
%main_1 = OpFunction %void None %20
%23 = OpLabel
%v0 = OpVariable %_ptr_Function_v4float Function %17
%v1 = OpVariable %_ptr_Function_v4float Function %17
%a = OpVariable %_ptr_Function_int Function %29
%c = OpVariable %_ptr_Function_int Function %29
%34 = OpAccessChain %_ptr_Uniform_float %x_6 %uint_0 %int_1
%35 = OpLoad %float %34
%36 = OpCompositeConstruct %v4float %35 %35 %35 %35
OpStore %v0 %36
%38 = OpAccessChain %_ptr_Uniform_float %x_6 %uint_0 %int_0
%39 = OpLoad %float %38
%40 = OpCompositeConstruct %v4float %39 %39 %39 %39
OpStore %v1 %40
%42 = OpAccessChain %_ptr_Uniform_int %x_10 %uint_0 %int_1
%43 = OpLoad %int %42
OpStore %a %43
OpBranch %44
%44 = OpLabel
OpLoopMerge %45 %46 None
OpBranch %47
%47 = OpLabel
%48 = OpLoad %int %a
%49 = OpAccessChain %_ptr_Uniform_int %x_10 %uint_0 %int_0
%50 = OpLoad %int %49
%51 = OpSLessThan %bool %48 %50
OpSelectionMerge %53 None
OpBranchConditional %51 %54 %55
%54 = OpLabel
OpBranch %53
%55 = OpLabel
OpBranch %45
%53 = OpLabel
%57 = OpAccessChain %_ptr_Uniform_int %x_10 %uint_0 %int_3
%58 = OpLoad %int %57
OpStore %c %58
OpBranch %59
%59 = OpLabel
OpLoopMerge %60 %61 None
OpBranch %62
%62 = OpLabel
%63 = OpLoad %int %c
%65 = OpAccessChain %_ptr_Uniform_int %x_10 %uint_0 %int_2
%66 = OpLoad %int %65
%67 = OpSLessThan %bool %63 %66
OpSelectionMerge %68 None
OpBranchConditional %67 %69 %70
%69 = OpLabel
OpBranch %68
%70 = OpLabel
OpBranch %60
%68 = OpLabel
%71 = OpLoad %int %c
%72 = OpExtInst %int %73 SClamp %71 %int_0 %int_3
%74 = OpAccessChain %_ptr_Uniform_float %x_6 %uint_0 %int_1
%75 = OpLoad %float %74
%77 = OpAccessChain %_ptr_Function_float %v0 %72
%78 = OpLoad %float %77
%79 = OpAccessChain %_ptr_Function_float %v0 %72
%80 = OpFSub %float %78 %75
OpStore %79 %80
%81 = OpAccessChain %_ptr_Uniform_int %x_10 %uint_0 %int_1
%82 = OpLoad %int %81
%83 = OpAccessChain %_ptr_Uniform_int %x_10 %uint_0 %int_3
%84 = OpLoad %int %83
%85 = OpIEqual %bool %82 %84
OpSelectionMerge %86 None
OpBranchConditional %85 %87 %86
%87 = OpLabel
%88 = OpLoad %int %a
%89 = OpAccessChain %_ptr_Uniform_float %x_6 %uint_0 %int_1
%90 = OpLoad %float %89
%91 = OpAccessChain %_ptr_Uniform_float %x_6 %uint_0 %int_1
%92 = OpLoad %float %91
%93 = OpAccessChain %_ptr_Uniform_float %x_6 %uint_0 %int_1
%94 = OpLoad %float %93
%95 = OpLoad %v4float %v0
%96 = OpLoad %int %a
%97 = OpAccessChain %_ptr_Function_float %v1 %88
%100 = OpCompositeConstruct %v4float %90 %92 %94 %float_3
%98 = OpExtInst %v4float %73 SmoothStep %100 %102 %95
%103 = OpVectorExtractDynamic %float %98 %96
OpStore %97 %103
OpBranch %86
%86 = OpLabel
OpBranch %61
%61 = OpLabel
%104 = OpLoad %int %c
%105 = OpIAdd %int %104 %int_1
OpStore %c %105
OpBranch %59
%60 = OpLabel
OpBranch %46
%46 = OpLabel
%106 = OpLoad %int %a
%107 = OpIAdd %int %106 %int_1
OpStore %a %107
OpBranch %44
%45 = OpLabel
%108 = OpAccessChain %_ptr_Function_float %v1 %uint_0
%109 = OpLoad %float %108
%110 = OpAccessChain %_ptr_Uniform_float %x_6 %uint_0 %int_0
%111 = OpLoad %float %110
%112 = OpFOrdEqual %bool %109 %111
OpSelectionMerge %113 None
OpBranchConditional %112 %114 %115
%114 = OpLabel
%116 = OpAccessChain %_ptr_Uniform_int %x_10 %uint_0 %int_1
%117 = OpLoad %int %116
%118 = OpAccessChain %_ptr_Uniform_int %x_10 %uint_0 %int_3
%119 = OpLoad %int %118
%120 = OpAccessChain %_ptr_Uniform_int %x_10 %uint_0 %int_3
%121 = OpLoad %int %120
%122 = OpAccessChain %_ptr_Uniform_int %x_10 %uint_0 %int_1
%123 = OpLoad %int %122
%124 = OpConvertSToF %float %117
%125 = OpConvertSToF %float %119
%126 = OpConvertSToF %float %121
%127 = OpConvertSToF %float %123
%128 = OpCompositeConstruct %v4float %124 %125 %126 %127
OpStore %x_GLF_color %128
OpBranch %113
%115 = OpLabel
%129 = OpAccessChain %_ptr_Uniform_int %x_10 %uint_0 %int_3
%130 = OpLoad %int %129
%131 = OpConvertSToF %float %130
%132 = OpCompositeConstruct %v4float %131 %131 %131 %131
OpStore %x_GLF_color %132
OpBranch %113
%113 = OpLabel
OpReturn
OpFunctionEnd
%tint_symbol_2 = OpFunction %void None %133
%tint_symbol = OpFunctionParameter %main_out
%137 = OpLabel
%138 = OpCompositeExtract %v4float %tint_symbol 0
OpStore %tint_symbol_1 %138
OpReturn
OpFunctionEnd
%main = OpFunction %void None %20
%140 = OpLabel
%141 = OpFunctionCall %void %main_1
%143 = OpLoad %v4float %x_GLF_color
%144 = OpCompositeConstruct %main_out %143
%142 = OpFunctionCall %void %tint_symbol_2 %144
OpReturn
OpFunctionEnd