blob: 3a722c8f03eac4e9089b406e3655efe84d26b9ce [file] [log] [blame]
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
; Bound: 62
; Schema: 0
OpCapability Shader
OpMemoryModel Logical GLSL450
OpEntryPoint Fragment %main "main" %tint_symbol %tint_symbol_1 %tint_symbol_3
OpExecutionMode %main OriginUpperLeft
OpName %x_2 "x_2"
OpName %x_3 "x_3"
OpName %x_4 "x_4"
OpName %x_5 "x_5"
OpName %tint_symbol "tint_symbol"
OpName %tint_symbol_1 "tint_symbol_1"
OpName %tint_symbol_3 "tint_symbol_3"
OpName %main_1 "main_1"
OpName %main_out "main_out"
OpMemberName %main_out 0 "x_4_1"
OpName %tint_symbol_4 "tint_symbol_4"
OpName %tint_symbol_2 "tint_symbol_2"
OpName %main "main"
OpDecorate %x_5 NonReadable
OpDecorate %x_5 DescriptorSet 0
OpDecorate %x_5 Binding 0
OpDecorate %tint_symbol BuiltIn FragCoord
OpDecorate %tint_symbol_1 Location 0
OpDecorate %tint_symbol_1 Flat
OpDecorate %tint_symbol_3 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_2 = OpVariable %_ptr_Private_v4float Private %5
%int = OpTypeInt 32 1
%_ptr_Private_int = OpTypePointer Private %int
%9 = OpConstantNull %int
%x_3 = OpVariable %_ptr_Private_int Private %9
%x_4 = OpVariable %_ptr_Private_int Private %9
%13 = OpTypeImage %int 2D 0 0 0 2 R32i
%_ptr_UniformConstant_13 = OpTypePointer UniformConstant %13
%x_5 = OpVariable %_ptr_UniformConstant_13 UniformConstant
%_ptr_Input_v4float = OpTypePointer Input %v4float
%tint_symbol = OpVariable %_ptr_Input_v4float Input
%_ptr_Input_int = OpTypePointer Input %int
%tint_symbol_1 = OpVariable %_ptr_Input_int Input
%_ptr_Output_int = OpTypePointer Output %int
%tint_symbol_3 = OpVariable %_ptr_Output_int Output %9
%void = OpTypeVoid
%20 = OpTypeFunction %void
%int_1 = OpConstant %int 1
%bool = OpTypeBool
%v2int = OpTypeVector %int 2
%v4int = OpTypeVector %int 4
%int_0 = OpConstant %int 0
%main_out = OpTypeStruct %int
%48 = OpTypeFunction %void %main_out
%main_1 = OpFunction %void None %20
%23 = OpLabel
OpStore %x_4 %int_1
%25 = OpLoad %v4float %x_2
%27 = OpCompositeExtract %float %25 0
%26 = OpConvertFToS %int %27
%29 = OpCompositeExtract %float %25 1
%28 = OpConvertFToS %int %29
%30 = OpLoad %int %x_3
%31 = OpBitwiseAnd %int %26 %int_1
%32 = OpBitwiseAnd %int %28 %int_1
%33 = OpIAdd %int %31 %32
%34 = OpIAdd %int %33 %30
%36 = OpCompositeExtract %float %25 2
%35 = OpConvertFToS %int %36
%37 = OpIEqual %bool %34 %35
OpSelectionMerge %39 None
OpBranchConditional %37 %40 %39
%40 = OpLabel
OpBranch %39
%39 = OpLabel
%42 = OpLoad %13 %x_5
%44 = OpCompositeConstruct %v2int %26 %28
%47 = OpCompositeConstruct %v4int %26 %int_0 %int_0 %int_0
OpImageWrite %42 %44 %47
OpReturn
OpFunctionEnd
%tint_symbol_4 = OpFunction %void None %48
%tint_symbol_2 = OpFunctionParameter %main_out
%52 = OpLabel
%53 = OpCompositeExtract %int %tint_symbol_2 0
OpStore %tint_symbol_3 %53
OpReturn
OpFunctionEnd
%main = OpFunction %void None %20
%55 = OpLabel
%56 = OpLoad %v4float %tint_symbol
OpStore %x_2 %56
%57 = OpLoad %int %tint_symbol_1
OpStore %x_3 %57
%58 = OpFunctionCall %void %main_1
%60 = OpLoad %int %x_4
%61 = OpCompositeConstruct %main_out %60
%59 = OpFunctionCall %void %tint_symbol_4 %61
OpReturn
OpFunctionEnd