blob: 3acf3169103107975cb5db06b71f014dfe94f925 [file] [log] [blame]
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
; Bound: 73
; Schema: 0
OpCapability Shader
%30 = 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_int_values"
OpName %x_7 "x_7"
OpName %x_GLF_color "x_GLF_color"
OpName %tint_symbol_1 "tint_symbol_1"
OpName %main_1 "main_1"
OpName %f "f"
OpName %a "a"
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_int_uint_2 ArrayStride 16
OpDecorate %x_7 NonWritable
OpDecorate %x_7 DescriptorSet 0
OpDecorate %x_7 Binding 0
OpDecorate %tint_symbol_1 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
%buf0 = OpTypeStruct %_arr_int_uint_2
%_ptr_Uniform_buf0 = OpTypePointer Uniform %buf0
%x_7 = OpVariable %_ptr_Uniform_buf0 Uniform
%float = OpTypeFloat 32
%v4float = OpTypeVector %float 4
%_ptr_Private_v4float = OpTypePointer Private %v4float
%12 = OpConstantNull %v4float
%x_GLF_color = OpVariable %_ptr_Private_v4float Private %12
%_ptr_Output_v4float = OpTypePointer Output %v4float
%tint_symbol_1 = OpVariable %_ptr_Output_v4float Output %12
%void = OpTypeVoid
%15 = OpTypeFunction %void
%_ptr_Function_float = OpTypePointer Function %float
%21 = OpConstantNull %float
%_ptr_Function_int = OpTypePointer Function %int
%24 = OpConstantNull %int
%float_2 = OpConstant %float 2
%float_1 = OpConstant %float 1
%uint_0 = OpConstant %uint 0
%int_1 = OpConstant %int 1
%_ptr_Uniform_int = OpTypePointer Uniform %int
%bool = OpTypeBool
%int_0 = OpConstant %int 0
%main_out = OpTypeStruct %v4float
%61 = OpTypeFunction %void %main_out
%main_1 = OpFunction %void None %15
%18 = OpLabel
%f = OpVariable %_ptr_Function_float Function %21
%a = OpVariable %_ptr_Function_int Function %24
OpStore %f %float_2
%26 = OpLoad %float %f
%29 = OpExtInst %float %30 NClamp %float_1 %float_1 %26
%31 = OpFSub %float %float_1 %29
%27 = OpConvertFToS %int %31
OpStore %a %27
%32 = OpLoad %int %a
%36 = OpAccessChain %_ptr_Uniform_int %x_7 %uint_0 %int_1
%37 = OpLoad %int %36
%38 = OpIEqual %bool %32 %37
OpSelectionMerge %40 None
OpBranchConditional %38 %41 %42
%41 = OpLabel
%44 = OpAccessChain %_ptr_Uniform_int %x_7 %uint_0 %int_0
%45 = OpLoad %int %44
%46 = OpAccessChain %_ptr_Uniform_int %x_7 %uint_0 %int_1
%47 = OpLoad %int %46
%48 = OpAccessChain %_ptr_Uniform_int %x_7 %uint_0 %int_1
%49 = OpLoad %int %48
%50 = OpAccessChain %_ptr_Uniform_int %x_7 %uint_0 %int_0
%51 = OpLoad %int %50
%52 = OpConvertSToF %float %45
%53 = OpConvertSToF %float %47
%54 = OpConvertSToF %float %49
%55 = OpConvertSToF %float %51
%56 = OpCompositeConstruct %v4float %52 %53 %54 %55
OpStore %x_GLF_color %56
OpBranch %40
%42 = OpLabel
%57 = OpAccessChain %_ptr_Uniform_int %x_7 %uint_0 %int_1
%58 = OpLoad %int %57
%59 = OpConvertSToF %float %58
%60 = OpCompositeConstruct %v4float %59 %59 %59 %59
OpStore %x_GLF_color %60
OpBranch %40
%40 = OpLabel
OpReturn
OpFunctionEnd
%tint_symbol_2 = OpFunction %void None %61
%tint_symbol = OpFunctionParameter %main_out
%65 = OpLabel
%66 = OpCompositeExtract %v4float %tint_symbol 0
OpStore %tint_symbol_1 %66
OpReturn
OpFunctionEnd
%main = OpFunction %void None %15
%68 = OpLabel
%69 = OpFunctionCall %void %main_1
%71 = OpLoad %v4float %x_GLF_color
%72 = OpCompositeConstruct %main_out %71
%70 = OpFunctionCall %void %tint_symbol_2 %72
OpReturn
OpFunctionEnd