blob: 0094e72441f8c1b63309d03f78a11c6a4dbfecdc [file] [log] [blame]
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
; Bound: 80
; Schema: 0
OpCapability Shader
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 %gl_FragCoord "gl_FragCoord"
OpName %x_GLF_color "x_GLF_color"
OpName %main_1 "main_1"
OpName %data "data"
OpName %i "i"
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 %_arr_float_uint_10 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
%_ptr_Private_v4float = OpTypePointer Private %v4float
%gl_FragCoord = OpVariable %_ptr_Private_v4float Private %7
%x_GLF_color = OpVariable %_ptr_Private_v4float Private %7
%void = OpTypeVoid
%11 = OpTypeFunction %void
%uint = OpTypeInt 32 0
%uint_10 = OpConstant %uint 10
%_arr_float_uint_10 = OpTypeArray %float %uint_10
%_ptr_Function__arr_float_uint_10 = OpTypePointer Function %_arr_float_uint_10
%20 = OpConstantNull %_arr_float_uint_10
%int = OpTypeInt 32 1
%_ptr_Function_int = OpTypePointer Function %int
%24 = OpConstantNull %int
%float_0_100000001 = OpConstant %float 0.100000001
%float_0_200000003 = OpConstant %float 0.200000003
%float_0_300000012 = OpConstant %float 0.300000012
%float_0_400000006 = OpConstant %float 0.400000006
%float_0_5 = OpConstant %float 0.5
%float_0_600000024 = OpConstant %float 0.600000024
%float_0_699999988 = OpConstant %float 0.699999988
%float_0_800000012 = OpConstant %float 0.800000012
%float_0_899999976 = OpConstant %float 0.899999976
%float_1 = OpConstant %float 1
%35 = OpConstantComposite %_arr_float_uint_10 %float_0_100000001 %float_0_200000003 %float_0_300000012 %float_0_400000006 %float_0_5 %float_0_600000024 %float_0_699999988 %float_0_800000012 %float_0_899999976 %float_1
%int_0 = OpConstant %int 0
%int_10 = OpConstant %int 10
%bool = OpTypeBool
%uint_0 = OpConstant %uint 0
%_ptr_Private_float = OpTypePointer Private %float
%float_0 = OpConstant %float 0
%_ptr_Function_float = OpTypePointer Function %float
%int_1 = OpConstant %int 1
%main_out = OpTypeStruct %v4float
%67 = OpTypeFunction %main_out %v4float
%main_1 = OpFunction %void None %11
%14 = OpLabel
%data = OpVariable %_ptr_Function__arr_float_uint_10 Function %20
%i = OpVariable %_ptr_Function_int Function %24
OpStore %data %35
OpStore %i %int_0
OpBranch %37
%37 = OpLabel
OpLoopMerge %38 %39 None
OpBranch %40
%40 = OpLabel
%41 = OpLoad %int %i
%43 = OpSLessThan %bool %41 %int_10
OpSelectionMerge %45 None
OpBranchConditional %43 %46 %47
%46 = OpLabel
OpBranch %45
%47 = OpLabel
OpBranch %38
%45 = OpLabel
%50 = OpAccessChain %_ptr_Private_float %gl_FragCoord %uint_0
%51 = OpLoad %float %50
%53 = OpFOrdLessThan %bool %51 %float_0
OpSelectionMerge %54 None
OpBranchConditional %53 %55 %54
%55 = OpLabel
OpKill
%54 = OpLabel
%56 = OpLoad %int %i
%58 = OpAccessChain %_ptr_Function_float %data %56
%59 = OpLoad %float %58
%60 = OpAccessChain %_ptr_Function_float %data %int_0
OpStore %60 %59
OpBranch %39
%39 = OpLabel
%61 = OpLoad %int %i
%63 = OpIAdd %int %61 %int_1
OpStore %i %63
OpBranch %37
%38 = OpLabel
%64 = OpAccessChain %_ptr_Function_float %data %int_0
%65 = OpLoad %float %64
%66 = OpCompositeConstruct %v4float %65 %float_0 %float_0 %float_1
OpStore %x_GLF_color %66
OpReturn
OpFunctionEnd
%main_inner = OpFunction %main_out None %67
%gl_FragCoord_param = OpFunctionParameter %v4float
%71 = OpLabel
OpStore %gl_FragCoord %gl_FragCoord_param
%72 = OpFunctionCall %void %main_1
%73 = OpLoad %v4float %x_GLF_color
%74 = OpCompositeConstruct %main_out %73
OpReturnValue %74
OpFunctionEnd
%main = OpFunction %void None %11
%76 = OpLabel
%78 = OpLoad %v4float %gl_FragCoord_param_1
%77 = OpFunctionCall %main_out %main_inner %78
%79 = OpCompositeExtract %v4float %77 0
OpStore %x_GLF_color_1_1 %79
OpReturn
OpFunctionEnd