blob: eaeec783f7b64705ee7d75b2685f80a27d154d78 [file] [log] [blame]
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
; Bound: 76
; Schema: 0
OpCapability Shader
%48 = OpExtInstImport "GLSL.std.450"
OpMemoryModel Logical GLSL450
OpEntryPoint Fragment %main "main" %tint_symbol_1
OpExecutionMode %main OriginUpperLeft
OpName %x_GLF_color "x_GLF_color"
OpName %buf0 "buf0"
OpMemberName %buf0 0 "x_GLF_uniform_int_values"
OpName %x_5 "x_5"
OpName %buf1 "buf1"
OpMemberName %buf1 0 "x_GLF_uniform_float_values"
OpName %x_8 "x_8"
OpName %tint_symbol_1 "tint_symbol_1"
OpName %main_1 "main_1"
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_5 NonWritable
OpDecorate %x_5 DescriptorSet 0
OpDecorate %x_5 Binding 0
OpDecorate %buf1 Block
OpMemberDecorate %buf1 0 Offset 0
OpDecorate %_arr_float_uint_2 ArrayStride 16
OpDecorate %x_8 NonWritable
OpDecorate %x_8 DescriptorSet 0
OpDecorate %x_8 Binding 1
OpDecorate %tint_symbol_1 Location 0
OpMemberDecorate %main_out 0 Offset 0
%float = OpTypeFloat 32
%v4float = OpTypeVector %float 4
%_ptr_Private_v4float = OpTypePointer Private %v4float
%5 = OpConstantNull %v4float
%x_GLF_color = OpVariable %_ptr_Private_v4float Private %5
%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_5 = OpVariable %_ptr_Uniform_buf0 Uniform
%_arr_float_uint_2 = OpTypeArray %float %uint_2
%buf1 = OpTypeStruct %_arr_float_uint_2
%_ptr_Uniform_buf1 = OpTypePointer Uniform %buf1
%x_8 = OpVariable %_ptr_Uniform_buf1 Uniform
%_ptr_Output_v4float = OpTypePointer Output %v4float
%tint_symbol_1 = OpVariable %_ptr_Output_v4float Output %5
%void = OpTypeVoid
%19 = OpTypeFunction %void
%_ptr_Function_float = OpTypePointer Function %float
%25 = OpConstantNull %float
%uint_0 = OpConstant %uint 0
%int_0 = OpConstant %int 0
%_ptr_Uniform_int = OpTypePointer Uniform %int
%int_1 = OpConstant %int 1
%_ptr_Uniform_float = OpTypePointer Uniform %float
%float_0x1_8p_128 = OpConstant %float 0x1.8p+128
%bool = OpTypeBool
%uint_1 = OpConstant %uint 1
%_ptr_Private_float = OpTypePointer Private %float
%main_out = OpTypeStruct %v4float
%64 = OpTypeFunction %void %main_out
%main_1 = OpFunction %void None %19
%22 = OpLabel
%a = OpVariable %_ptr_Function_float Function %25
%29 = OpAccessChain %_ptr_Uniform_int %x_5 %uint_0 %int_0
%30 = OpLoad %int %29
%32 = OpAccessChain %_ptr_Uniform_int %x_5 %uint_0 %int_1
%33 = OpLoad %int %32
%34 = OpAccessChain %_ptr_Uniform_int %x_5 %uint_0 %int_1
%35 = OpLoad %int %34
%36 = OpAccessChain %_ptr_Uniform_int %x_5 %uint_0 %int_0
%37 = OpLoad %int %36
%38 = OpConvertSToF %float %30
%39 = OpConvertSToF %float %33
%40 = OpConvertSToF %float %35
%41 = OpConvertSToF %float %37
%42 = OpCompositeConstruct %v4float %38 %39 %40 %41
OpStore %x_GLF_color %42
%44 = OpAccessChain %_ptr_Uniform_float %x_8 %uint_0 %int_1
%45 = OpLoad %float %44
%49 = OpFDiv %float %45 %float_0x1_8p_128
%47 = OpExtInst %float %48 Floor %49
%50 = OpFMul %float %float_0x1_8p_128 %47
%51 = OpFSub %float %45 %50
OpStore %a %51
%52 = OpLoad %float %a
%53 = OpAccessChain %_ptr_Uniform_float %x_8 %uint_0 %int_0
%54 = OpLoad %float %53
%55 = OpFOrdNotEqual %bool %52 %54
OpSelectionMerge %57 None
OpBranchConditional %55 %58 %57
%58 = OpLabel
%59 = OpAccessChain %_ptr_Uniform_float %x_8 %uint_0 %int_0
%60 = OpLoad %float %59
%63 = OpAccessChain %_ptr_Private_float %x_GLF_color %uint_1
OpStore %63 %60
OpBranch %57
%57 = OpLabel
OpReturn
OpFunctionEnd
%tint_symbol_2 = OpFunction %void None %64
%tint_symbol = OpFunctionParameter %main_out
%68 = OpLabel
%69 = OpCompositeExtract %v4float %tint_symbol 0
OpStore %tint_symbol_1 %69
OpReturn
OpFunctionEnd
%main = OpFunction %void None %19
%71 = OpLabel
%72 = OpFunctionCall %void %main_1
%74 = OpLoad %v4float %x_GLF_color
%75 = OpCompositeConstruct %main_out %74
%73 = OpFunctionCall %void %tint_symbol_2 %75
OpReturn
OpFunctionEnd