blob: c84ec5097d3a275ea91e9abf38651771ac9be3e8 [file] [log] [blame]
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
; Bound: 111
; Schema: 0
OpCapability Shader
%75 = OpExtInstImport "GLSL.std.450"
OpMemoryModel Logical GLSL450
OpEntryPoint Fragment %main "main" %gl_FragCoord_param_1 %x_GLF_color_1_1
OpExecutionMode %main OriginUpperLeft
OpName %gl_FragCoord_param_1 "gl_FragCoord_param_1"
OpName %x_GLF_color_1_1 "x_GLF_color_1_1"
OpName %buf0 "buf0"
OpMemberName %buf0 0 "x_GLF_uniform_int_values"
OpName %x_7 "x_7"
OpName %gl_FragCoord "gl_FragCoord"
OpName %buf1 "buf1"
OpMemberName %buf1 0 "x_GLF_uniform_float_values"
OpName %x_11 "x_11"
OpName %x_GLF_color "x_GLF_color"
OpName %main_1 "main_1"
OpName %arr "arr"
OpName %a "a"
OpName %b "b"
OpName %c "c"
OpName %main_out "main_out"
OpMemberName %main_out 0 "x_GLF_color_1"
OpName %main_inner "main_inner"
OpName %gl_FragCoord_param "gl_FragCoord_param"
OpName %main "main"
OpDecorate %gl_FragCoord_param_1 BuiltIn FragCoord
OpDecorate %x_GLF_color_1_1 Location 0
OpDecorate %buf0 Block
OpMemberDecorate %buf0 0 Offset 0
OpDecorate %_arr_int_uint_3 ArrayStride 16
OpDecorate %x_7 NonWritable
OpDecorate %x_7 DescriptorSet 0
OpDecorate %x_7 Binding 0
OpDecorate %buf1 Block
OpMemberDecorate %buf1 0 Offset 0
OpDecorate %_arr_float_uint_1 ArrayStride 16
OpDecorate %x_11 NonWritable
OpDecorate %x_11 DescriptorSet 0
OpDecorate %x_11 Binding 1
OpDecorate %_arr_int_uint_3_0 ArrayStride 4
OpMemberDecorate %main_out 0 Offset 0
%float = OpTypeFloat 32
%v4float = OpTypeVector %float 4
%_ptr_Input_v4float = OpTypePointer Input %v4float
%gl_FragCoord_param_1 = OpVariable %_ptr_Input_v4float Input
%_ptr_Output_v4float = OpTypePointer Output %v4float
%7 = OpConstantNull %v4float
%x_GLF_color_1_1 = OpVariable %_ptr_Output_v4float Output %7
%int = OpTypeInt 32 1
%uint = OpTypeInt 32 0
%uint_3 = OpConstant %uint 3
%_arr_int_uint_3 = OpTypeArray %int %uint_3
%buf0 = OpTypeStruct %_arr_int_uint_3
%_ptr_Uniform_buf0 = OpTypePointer Uniform %buf0
%x_7 = OpVariable %_ptr_Uniform_buf0 Uniform
%_ptr_Private_v4float = OpTypePointer Private %v4float
%gl_FragCoord = OpVariable %_ptr_Private_v4float Private %7
%uint_1 = OpConstant %uint 1
%_arr_float_uint_1 = OpTypeArray %float %uint_1
%buf1 = OpTypeStruct %_arr_float_uint_1
%_ptr_Uniform_buf1 = OpTypePointer Uniform %buf1
%x_11 = OpVariable %_ptr_Uniform_buf1 Uniform
%x_GLF_color = OpVariable %_ptr_Private_v4float Private %7
%void = OpTypeVoid
%23 = OpTypeFunction %void
%_arr_int_uint_3_0 = OpTypeArray %int %uint_3
%_ptr_Function__arr_int_uint_3_0 = OpTypePointer Function %_arr_int_uint_3_0
%30 = OpConstantNull %_arr_int_uint_3_0
%_ptr_Function_int = OpTypePointer Function %int
%33 = OpConstantNull %int
%uint_0 = OpConstant %uint 0
%int_1 = OpConstant %int 1
%_ptr_Uniform_int = OpTypePointer Uniform %int
%int_0 = OpConstant %int 0
%_ptr_Private_float = OpTypePointer Private %float
%_ptr_Uniform_float = OpTypePointer Uniform %float
%bool = OpTypeBool
%int_2 = OpConstant %int 2
%main_out = OpTypeStruct %v4float
%98 = OpTypeFunction %main_out %v4float
%main_1 = OpFunction %void None %23
%26 = OpLabel
%arr = OpVariable %_ptr_Function__arr_int_uint_3_0 Function %30
%a = OpVariable %_ptr_Function_int Function %33
%b = OpVariable %_ptr_Function_int Function %33
%c = OpVariable %_ptr_Function_int Function %33
%39 = OpAccessChain %_ptr_Uniform_int %x_7 %uint_0 %int_1
%40 = OpLoad %int %39
%41 = OpAccessChain %_ptr_Uniform_int %x_7 %uint_0 %int_1
%42 = OpLoad %int %41
%43 = OpAccessChain %_ptr_Uniform_int %x_7 %uint_0 %int_1
%44 = OpLoad %int %43
%45 = OpCompositeConstruct %_arr_int_uint_3_0 %40 %42 %44
OpStore %arr %45
%47 = OpAccessChain %_ptr_Uniform_int %x_7 %uint_0 %int_0
%48 = OpLoad %int %47
%49 = OpAccessChain %_ptr_Function_int %arr %48
%50 = OpLoad %int %49
OpStore %a %50
%51 = OpLoad %int %a
%52 = OpISub %int %51 %int_1
OpStore %b %52
%54 = OpAccessChain %_ptr_Private_float %gl_FragCoord %uint_0
%55 = OpLoad %float %54
%57 = OpAccessChain %_ptr_Uniform_float %x_11 %uint_0 %int_0
%58 = OpLoad %float %57
%59 = OpFOrdLessThan %bool %55 %58
OpSelectionMerge %61 None
OpBranchConditional %59 %62 %61
%62 = OpLabel
%63 = OpLoad %int %b
%64 = OpIAdd %int %63 %int_1
OpStore %b %64
OpBranch %61
%61 = OpLabel
%65 = OpAccessChain %_ptr_Uniform_int %x_7 %uint_0 %int_0
%66 = OpLoad %int %65
OpStore %c %66
%67 = OpLoad %int %c
%68 = OpAccessChain %_ptr_Uniform_int %x_7 %uint_0 %int_1
%69 = OpLoad %int %68
%71 = OpAccessChain %_ptr_Uniform_int %x_7 %uint_0 %int_2
%72 = OpLoad %int %71
%73 = OpLoad %int %b
%74 = OpExtInst %int %75 SClamp %67 %69 %72
%76 = OpAccessChain %_ptr_Function_int %arr %74
OpStore %76 %73
%77 = OpAccessChain %_ptr_Uniform_int %x_7 %uint_0 %int_0
%78 = OpLoad %int %77
%79 = OpAccessChain %_ptr_Function_int %arr %78
%80 = OpLoad %int %79
%81 = OpAccessChain %_ptr_Uniform_int %x_7 %uint_0 %int_1
%82 = OpLoad %int %81
%83 = OpAccessChain %_ptr_Function_int %arr %82
%84 = OpLoad %int %83
%85 = OpAccessChain %_ptr_Uniform_int %x_7 %uint_0 %int_1
%86 = OpLoad %int %85
%87 = OpAccessChain %_ptr_Function_int %arr %86
%88 = OpLoad %int %87
%89 = OpAccessChain %_ptr_Uniform_int %x_7 %uint_0 %int_2
%90 = OpLoad %int %89
%91 = OpAccessChain %_ptr_Function_int %arr %90
%92 = OpLoad %int %91
%93 = OpConvertSToF %float %80
%94 = OpConvertSToF %float %84
%95 = OpConvertSToF %float %88
%96 = OpConvertSToF %float %92
%97 = OpCompositeConstruct %v4float %93 %94 %95 %96
OpStore %x_GLF_color %97
OpReturn
OpFunctionEnd
%main_inner = OpFunction %main_out None %98
%gl_FragCoord_param = OpFunctionParameter %v4float
%102 = OpLabel
OpStore %gl_FragCoord %gl_FragCoord_param
%103 = OpFunctionCall %void %main_1
%104 = OpLoad %v4float %x_GLF_color
%105 = OpCompositeConstruct %main_out %104
OpReturnValue %105
OpFunctionEnd
%main = OpFunction %void None %23
%107 = OpLabel
%109 = OpLoad %v4float %gl_FragCoord_param_1
%108 = OpFunctionCall %main_out %main_inner %109
%110 = OpCompositeExtract %v4float %108 0
OpStore %x_GLF_color_1_1 %110
OpReturn
OpFunctionEnd