blob: 7ecd6230b0bf19fbe3b919bf325b23bb3fb98b33 [file] [log] [blame]
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
; Bound: 96
; Schema: 0
OpCapability Shader
OpMemoryModel Logical GLSL450
OpEntryPoint Fragment %main "main" %tint_symbol %tint_symbol_2
OpExecutionMode %main OriginUpperLeft
OpName %buf2 "buf2"
OpMemberName %buf2 0 "x_GLF_uniform_int_values"
OpName %x_8 "x_8"
OpName %gl_FragCoord "gl_FragCoord"
OpName %buf0 "buf0"
OpMemberName %buf0 0 "x_GLF_uniform_float_values"
OpName %x_10 "x_10"
OpName %buf1 "buf1"
OpMemberName %buf1 0 "x_GLF_uniform_uint_values"
OpName %x_12 "x_12"
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 %a "a"
OpName %b "b"
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 %buf2 Block
OpMemberDecorate %buf2 0 Offset 0
OpDecorate %_arr_int_uint_2 ArrayStride 16
OpDecorate %x_8 NonWritable
OpDecorate %x_8 DescriptorSet 0
OpDecorate %x_8 Binding 2
OpDecorate %buf0 Block
OpMemberDecorate %buf0 0 Offset 0
OpDecorate %_arr_float_uint_1 ArrayStride 16
OpDecorate %x_10 NonWritable
OpDecorate %x_10 DescriptorSet 0
OpDecorate %x_10 Binding 0
OpDecorate %buf1 Block
OpMemberDecorate %buf1 0 Offset 0
OpDecorate %_arr_uint_uint_1 ArrayStride 16
OpDecorate %x_12 NonWritable
OpDecorate %x_12 DescriptorSet 0
OpDecorate %x_12 Binding 1
OpDecorate %tint_symbol BuiltIn FragCoord
OpDecorate %tint_symbol_2 Location 0
OpMemberDecorate %main_out 0 Offset 0
%int = OpTypeInt 32 1
%uint = OpTypeInt 32 0
%uint_2 = OpConstant %uint 2
%_arr_int_uint_2 = OpTypeArray %int %uint_2
%buf2 = OpTypeStruct %_arr_int_uint_2
%_ptr_Uniform_buf2 = OpTypePointer Uniform %buf2
%x_8 = OpVariable %_ptr_Uniform_buf2 Uniform
%float = OpTypeFloat 32
%v4float = OpTypeVector %float 4
%_ptr_Private_v4float = OpTypePointer Private %v4float
%12 = OpConstantNull %v4float
%gl_FragCoord = OpVariable %_ptr_Private_v4float Private %12
%uint_1 = OpConstant %uint 1
%_arr_float_uint_1 = OpTypeArray %float %uint_1
%buf0 = OpTypeStruct %_arr_float_uint_1
%_ptr_Uniform_buf0 = OpTypePointer Uniform %buf0
%x_10 = OpVariable %_ptr_Uniform_buf0 Uniform
%_arr_uint_uint_1 = OpTypeArray %uint %uint_1
%buf1 = OpTypeStruct %_arr_uint_uint_1
%_ptr_Uniform_buf1 = OpTypePointer Uniform %buf1
%x_12 = OpVariable %_ptr_Uniform_buf1 Uniform
%x_GLF_color = OpVariable %_ptr_Private_v4float Private %12
%_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 %12
%void = OpTypeVoid
%27 = OpTypeFunction %void
%_ptr_Function_uint = OpTypePointer Function %uint
%33 = OpConstantNull %uint
%_ptr_Function_int = OpTypePointer Function %int
%36 = OpConstantNull %int
%uint_0 = OpConstant %uint 0
%int_1 = OpConstant %int 1
%_ptr_Uniform_int = OpTypePointer Uniform %int
%_ptr_Private_float = OpTypePointer Private %float
%int_0 = OpConstant %int 0
%_ptr_Uniform_float = OpTypePointer Uniform %float
%bool = OpTypeBool
%_ptr_Uniform_uint = OpTypePointer Uniform %uint
%main_out = OpTypeStruct %v4float
%83 = OpTypeFunction %void %main_out
%main_1 = OpFunction %void None %27
%30 = OpLabel
%a = OpVariable %_ptr_Function_uint Function %33
%b = OpVariable %_ptr_Function_int Function %36
OpStore %a %uint_0
%40 = OpAccessChain %_ptr_Uniform_int %x_8 %uint_0 %int_1
%41 = OpLoad %int %40
OpStore %b %41
%43 = OpAccessChain %_ptr_Private_float %gl_FragCoord %uint_0
%44 = OpLoad %float %43
%47 = OpAccessChain %_ptr_Uniform_float %x_10 %uint_0 %int_0
%48 = OpLoad %float %47
%49 = OpFOrdLessThan %bool %44 %48
OpSelectionMerge %51 None
OpBranchConditional %49 %52 %51
%52 = OpLabel
%54 = OpAccessChain %_ptr_Uniform_uint %x_12 %uint_0 %int_0
%55 = OpLoad %uint %54
%56 = OpLoad %uint %a
%58 = OpUMod %uint %55 %56
%57 = OpBitcast %int %58
OpStore %b %57
OpBranch %51
%51 = OpLabel
%59 = OpLoad %int %b
%60 = OpAccessChain %_ptr_Uniform_int %x_8 %uint_0 %int_1
%61 = OpLoad %int %60
%62 = OpIEqual %bool %59 %61
OpSelectionMerge %63 None
OpBranchConditional %62 %64 %65
%64 = OpLabel
%66 = OpAccessChain %_ptr_Uniform_int %x_8 %uint_0 %int_1
%67 = OpLoad %int %66
%68 = OpAccessChain %_ptr_Uniform_int %x_8 %uint_0 %int_0
%69 = OpLoad %int %68
%70 = OpAccessChain %_ptr_Uniform_int %x_8 %uint_0 %int_0
%71 = OpLoad %int %70
%72 = OpAccessChain %_ptr_Uniform_int %x_8 %uint_0 %int_1
%73 = OpLoad %int %72
%74 = OpConvertSToF %float %67
%75 = OpConvertSToF %float %69
%76 = OpConvertSToF %float %71
%77 = OpConvertSToF %float %73
%78 = OpCompositeConstruct %v4float %74 %75 %76 %77
OpStore %x_GLF_color %78
OpBranch %63
%65 = OpLabel
%79 = OpAccessChain %_ptr_Uniform_int %x_8 %uint_0 %int_0
%80 = OpLoad %int %79
%81 = OpConvertSToF %float %80
%82 = OpCompositeConstruct %v4float %81 %81 %81 %81
OpStore %x_GLF_color %82
OpBranch %63
%63 = OpLabel
OpReturn
OpFunctionEnd
%tint_symbol_3 = OpFunction %void None %83
%tint_symbol_1 = OpFunctionParameter %main_out
%87 = OpLabel
%88 = OpCompositeExtract %v4float %tint_symbol_1 0
OpStore %tint_symbol_2 %88
OpReturn
OpFunctionEnd
%main = OpFunction %void None %27
%90 = OpLabel
%91 = OpLoad %v4float %tint_symbol
OpStore %gl_FragCoord %91
%92 = OpFunctionCall %void %main_1
%94 = OpLoad %v4float %x_GLF_color
%95 = OpCompositeConstruct %main_out %94
%93 = OpFunctionCall %void %tint_symbol_3 %95
OpReturn
OpFunctionEnd