blob: 7dfa9c84ed312926746da0bb87e481ff18ae6cb8 [file] [log] [blame]
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
; Bound: 124
; Schema: 0
OpCapability Shader
OpMemoryModel Logical GLSL450
OpEntryPoint Fragment %main "main" %tint_symbol %tint_symbol_2
OpExecutionMode %main OriginUpperLeft
OpName %gl_FragCoord "gl_FragCoord"
OpName %buf0 "buf0"
OpMemberName %buf0 0 "resolution"
OpName %x_6 "x_6"
OpName %x_GLF_color "x_GLF_color"
OpName %tint_symbol "tint_symbol"
OpName %tint_symbol_2 "tint_symbol_2"
OpName %main_1 "main_1"
OpName %indexable "indexable"
OpName %x_69 "x_69"
OpName %x_69_phi "x_69_phi"
OpName %x_72_phi "x_72_phi"
OpName %x_70 "x_70"
OpName %x_73 "x_73"
OpName %main_out "main_out"
OpMemberName %main_out 0 "x_GLF_color_1"
OpName %tint_symbol_3 "tint_symbol_3"
OpName %tint_symbol_1 "tint_symbol_1"
OpName %main "main"
OpDecorate %buf0 Block
OpMemberDecorate %buf0 0 Offset 0
OpDecorate %x_6 NonWritable
OpDecorate %x_6 DescriptorSet 0
OpDecorate %x_6 Binding 0
OpDecorate %tint_symbol BuiltIn FragCoord
OpDecorate %tint_symbol_2 Location 0
OpDecorate %_arr_v4float_uint_16 ArrayStride 16
OpMemberDecorate %main_out 0 Offset 0
%float = OpTypeFloat 32
%v4float = OpTypeVector %float 4
%_ptr_Private_v4float = OpTypePointer Private %v4float
%5 = OpConstantNull %v4float
%gl_FragCoord = OpVariable %_ptr_Private_v4float Private %5
%v2float = OpTypeVector %float 2
%buf0 = OpTypeStruct %v2float
%_ptr_Uniform_buf0 = OpTypePointer Uniform %buf0
%x_6 = OpVariable %_ptr_Uniform_buf0 Uniform
%x_GLF_color = OpVariable %_ptr_Private_v4float Private %5
%_ptr_Input_v4float = OpTypePointer Input %v4float
%tint_symbol = OpVariable %_ptr_Input_v4float Input
%_ptr_Output_v4float = OpTypePointer Output %v4float
%tint_symbol_2 = OpVariable %_ptr_Output_v4float Output %5
%void = OpTypeVoid
%15 = OpTypeFunction %void
%uint = OpTypeInt 32 0
%uint_16 = OpConstant %uint 16
%_arr_v4float_uint_16 = OpTypeArray %v4float %uint_16
%_ptr_Function__arr_v4float_uint_16 = OpTypePointer Function %_arr_v4float_uint_16
%24 = OpConstantNull %_arr_v4float_uint_16
%int = OpTypeInt 32 1
%_ptr_Function_int = OpTypePointer Function %int
%28 = OpConstantNull %int
%uint_0 = OpConstant %uint 0
%_ptr_Uniform_v2float = OpTypePointer Uniform %v2float
%float_10 = OpConstant %float 10
%int_10 = OpConstant %int 10
%int_100 = OpConstant %int 100
%int_0 = OpConstant %int 0
%bool = OpTypeBool
%int_4 = OpConstant %int 4
%int_1000 = OpConstant %int 1000
%int_1 = OpConstant %int 1
%float_0 = OpConstant %float 0
%float_1 = OpConstant %float 1
%81 = OpConstantComposite %v4float %float_0 %float_0 %float_0 %float_1
%float_0_5 = OpConstant %float 0.5
%83 = OpConstantComposite %v4float %float_0_5 %float_0 %float_0 %float_1
%84 = OpConstantComposite %v4float %float_0 %float_0_5 %float_0 %float_1
%85 = OpConstantComposite %v4float %float_0_5 %float_0_5 %float_0 %float_1
%86 = OpConstantComposite %v4float %float_0 %float_0 %float_0_5 %float_1
%87 = OpConstantComposite %v4float %float_0_5 %float_0 %float_0_5 %float_1
%88 = OpConstantComposite %v4float %float_0 %float_0_5 %float_0_5 %float_1
%89 = OpConstantComposite %v4float %float_0_5 %float_0_5 %float_0_5 %float_1
%90 = OpConstantComposite %v4float %float_1 %float_0 %float_0 %float_1
%91 = OpConstantComposite %v4float %float_0 %float_1 %float_0 %float_1
%92 = OpConstantComposite %v4float %float_1 %float_1 %float_0 %float_1
%93 = OpConstantComposite %v4float %float_0 %float_0 %float_1 %float_1
%94 = OpConstantComposite %v4float %float_1 %float_0 %float_1 %float_1
%95 = OpConstantComposite %v4float %float_0 %float_1 %float_1 %float_1
%96 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1
%97 = OpConstantComposite %_arr_v4float_uint_16 %81 %83 %84 %85 %86 %87 %88 %89 %81 %90 %91 %92 %93 %94 %95 %96
%99 = OpConstantComposite %v4float %float_0 %float_0 %float_0 %float_0
%100 = OpConstantComposite %_arr_v4float_uint_16 %99 %99 %99 %99 %99 %99 %99 %99 %99 %99 %99 %99 %99 %99 %99 %99
%int_16 = OpConstant %int 16
%_ptr_Function_v4float = OpTypePointer Function %v4float
%main_out = OpTypeStruct %v4float
%111 = OpTypeFunction %void %main_out
%main_1 = OpFunction %void None %15
%18 = OpLabel
%indexable = OpVariable %_ptr_Function__arr_v4float_uint_16 Function %24
%x_69 = OpVariable %_ptr_Function_int Function %28
%x_69_phi = OpVariable %_ptr_Function_int Function %28
%x_72_phi = OpVariable %_ptr_Function_int Function %28
%x_70 = OpVariable %_ptr_Function_int Function %28
%x_73 = OpVariable %_ptr_Function_int Function %28
%31 = OpLoad %v4float %gl_FragCoord
%34 = OpAccessChain %_ptr_Uniform_v2float %x_6 %uint_0
%35 = OpLoad %v2float %34
%36 = OpCompositeExtract %float %31 0
%37 = OpCompositeExtract %float %31 1
%38 = OpCompositeConstruct %v2float %36 %37
%39 = OpFDiv %v2float %38 %35
%41 = OpCompositeExtract %float %39 0
%43 = OpFMul %float %41 %float_10
%40 = OpConvertFToS %int %43
%45 = OpCompositeExtract %float %39 1
%46 = OpFMul %float %45 %float_10
%44 = OpConvertFToS %int %46
%48 = OpIMul %int %44 %int_10
%49 = OpIAdd %int %40 %48
OpStore %x_69_phi %int_100
OpStore %x_72_phi %int_0
OpBranch %52
%52 = OpLabel
OpLoopMerge %53 %54 None
OpBranch %55
%55 = OpLabel
%58 = OpLoad %int %x_69_phi
OpStore %x_69 %58
%59 = OpLoad %int %x_72_phi
%60 = OpSLessThan %bool %59 %49
OpSelectionMerge %62 None
OpBranchConditional %60 %63 %64
%63 = OpLabel
OpBranch %62
%64 = OpLabel
OpBranch %53
%62 = OpLabel
OpBranch %54
%54 = OpLabel
%67 = OpLoad %int %x_69
%66 = OpCopyObject %int %67
%68 = OpIMul %int %int_4 %66
%71 = OpLoad %int %x_69
%70 = OpCopyObject %int %71
%72 = OpISub %int %int_1000 %70
%73 = OpIMul %int %68 %72
%74 = OpSDiv %int %73 %int_1000
OpStore %x_70 %74
%76 = OpIAdd %int %59 %int_1
OpStore %x_73 %76
%77 = OpLoad %int %x_70
OpStore %x_69_phi %77
%78 = OpLoad %int %x_73
OpStore %x_72_phi %78
OpBranch %52
%53 = OpLabel
OpStore %indexable %97
%98 = OpLoad %_arr_v4float_uint_16 %indexable
OpStore %indexable %100
OpStore %indexable %98
%101 = OpCompositeExtract %float %91 1
%102 = OpCompositeExtract %float %87 0
%103 = OpCompositeConstruct %v2float %101 %102
%105 = OpLoad %int %x_69
%107 = OpSMod %int %105 %int_16
%104 = OpCopyObject %int %107
%109 = OpAccessChain %_ptr_Function_v4float %indexable %104
%110 = OpLoad %v4float %109
OpStore %x_GLF_color %110
OpReturn
OpFunctionEnd
%tint_symbol_3 = OpFunction %void None %111
%tint_symbol_1 = OpFunctionParameter %main_out
%115 = OpLabel
%116 = OpCompositeExtract %v4float %tint_symbol_1 0
OpStore %tint_symbol_2 %116
OpReturn
OpFunctionEnd
%main = OpFunction %void None %15
%118 = OpLabel
%119 = OpLoad %v4float %tint_symbol
OpStore %gl_FragCoord %119
%120 = OpFunctionCall %void %main_1
%122 = OpLoad %v4float %x_GLF_color
%123 = OpCompositeConstruct %main_out %122
%121 = OpFunctionCall %void %tint_symbol_3 %123
OpReturn
OpFunctionEnd