blob: b9c090d2eb0d2e9f9745429a828f2b086c034c45 [file] [log] [blame]
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
; Bound: 78
; Schema: 0
OpCapability Shader
%31 = OpExtInstImport "GLSL.std.450"
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 "x_GLF_uniform_float_values"
OpName %x_7 "x_7"
OpName %x_GLF_color "x_GLF_color"
OpName %buf1 "buf1"
OpMemberName %buf1 0 "x_GLF_uniform_int_values"
OpName %x_9 "x_9"
OpName %tint_symbol "tint_symbol"
OpName %tint_symbol_2 "tint_symbol_2"
OpName %main_1 "main_1"
OpName %f "f"
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 %_arr_float_uint_1 ArrayStride 16
OpDecorate %x_7 NonWritable
OpDecorate %x_7 DescriptorSet 0
OpDecorate %x_7 Binding 0
OpDecorate %buf1 Block
OpMemberDecorate %buf1 0 Offset 0
OpDecorate %_arr_int_uint_2 ArrayStride 16
OpDecorate %x_9 NonWritable
OpDecorate %x_9 DescriptorSet 0
OpDecorate %x_9 Binding 1
OpDecorate %tint_symbol BuiltIn FragCoord
OpDecorate %tint_symbol_2 Location 0
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
%uint = OpTypeInt 32 0
%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_7 = OpVariable %_ptr_Uniform_buf0 Uniform
%x_GLF_color = OpVariable %_ptr_Private_v4float Private %5
%int = OpTypeInt 32 1
%uint_2 = OpConstant %uint 2
%_arr_int_uint_2 = OpTypeArray %int %uint_2
%buf1 = OpTypeStruct %_arr_int_uint_2
%_ptr_Uniform_buf1 = OpTypePointer Uniform %buf1
%x_9 = OpVariable %_ptr_Uniform_buf1 Uniform
%_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
%23 = OpTypeFunction %void
%_ptr_Function_float = OpTypePointer Function %float
%29 = OpConstantNull %float
%int_n1 = OpConstant %int -1
%float_1 = OpConstant %float 1
%uint_0 = OpConstant %uint 0
%_ptr_Private_float = OpTypePointer Private %float
%int_0 = OpConstant %int 0
%_ptr_Uniform_float = OpTypePointer Uniform %float
%bool = OpTypeBool
%int_1 = OpConstant %int 1
%_ptr_Uniform_int = OpTypePointer Uniform %int
%main_out = OpTypeStruct %v4float
%65 = OpTypeFunction %void %main_out
%main_1 = OpFunction %void None %23
%26 = OpLabel
%f = OpVariable %_ptr_Function_float Function %29
%32 = OpBitcast %float %int_n1
%30 = OpExtInst %float %31 NMin %32 %float_1
OpStore %f %30
%37 = OpAccessChain %_ptr_Private_float %gl_FragCoord %uint_0
%38 = OpLoad %float %37
%41 = OpAccessChain %_ptr_Uniform_float %x_7 %uint_0 %int_0
%42 = OpLoad %float %41
%43 = OpFOrdGreaterThan %bool %38 %42
OpSelectionMerge %45 None
OpBranchConditional %43 %46 %47
%46 = OpLabel
%50 = OpAccessChain %_ptr_Uniform_int %x_9 %uint_0 %int_1
%51 = OpLoad %int %50
%52 = OpAccessChain %_ptr_Uniform_int %x_9 %uint_0 %int_0
%53 = OpLoad %int %52
%54 = OpAccessChain %_ptr_Uniform_int %x_9 %uint_0 %int_0
%55 = OpLoad %int %54
%56 = OpAccessChain %_ptr_Uniform_int %x_9 %uint_0 %int_1
%57 = OpLoad %int %56
%58 = OpConvertSToF %float %51
%59 = OpConvertSToF %float %53
%60 = OpConvertSToF %float %55
%61 = OpConvertSToF %float %57
%62 = OpCompositeConstruct %v4float %58 %59 %60 %61
OpStore %x_GLF_color %62
OpBranch %45
%47 = OpLabel
%63 = OpLoad %float %f
%64 = OpCompositeConstruct %v4float %63 %63 %63 %63
OpStore %x_GLF_color %64
OpBranch %45
%45 = OpLabel
OpReturn
OpFunctionEnd
%tint_symbol_3 = OpFunction %void None %65
%tint_symbol_1 = OpFunctionParameter %main_out
%69 = OpLabel
%70 = OpCompositeExtract %v4float %tint_symbol_1 0
OpStore %tint_symbol_2 %70
OpReturn
OpFunctionEnd
%main = OpFunction %void None %23
%72 = OpLabel
%73 = OpLoad %v4float %tint_symbol
OpStore %gl_FragCoord %73
%74 = OpFunctionCall %void %main_1
%76 = OpLoad %v4float %x_GLF_color
%77 = OpCompositeConstruct %main_out %76
%75 = OpFunctionCall %void %tint_symbol_3 %77
OpReturn
OpFunctionEnd