blob: 27651dbce1fa78420859708dcae0e417c63c5828 [file] [log] [blame]
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
; Bound: 63
; Schema: 0
OpCapability Shader
OpMemoryModel Logical GLSL450
OpEntryPoint Fragment %main "main" %x_2_param_1 %x_3_param_1 %x_4_1_1
OpExecutionMode %main OriginUpperLeft
OpName %x_2_param_1 "x_2_param_1"
OpName %x_3_param_1 "x_3_param_1"
OpName %x_4_1_1 "x_4_1_1"
OpName %x_2 "x_2"
OpName %x_3 "x_3"
OpName %x_4 "x_4"
OpName %x_5 "x_5"
OpName %main_1 "main_1"
OpName %main_out "main_out"
OpMemberName %main_out 0 "x_4_1"
OpName %main_inner "main_inner"
OpName %x_2_param "x_2_param"
OpName %x_3_param "x_3_param"
OpName %main "main"
OpDecorate %x_2_param_1 BuiltIn FragCoord
OpDecorate %x_3_param_1 Location 0
OpDecorate %x_3_param_1 Flat
OpDecorate %x_4_1_1 Location 0
OpDecorate %x_5 NonReadable
OpDecorate %x_5 DescriptorSet 0
OpDecorate %x_5 Binding 0
OpMemberDecorate %main_out 0 Offset 0
%float = OpTypeFloat 32
%v4float = OpTypeVector %float 4
%_ptr_Input_v4float = OpTypePointer Input %v4float
%x_2_param_1 = OpVariable %_ptr_Input_v4float Input
%int = OpTypeInt 32 1
%_ptr_Input_int = OpTypePointer Input %int
%x_3_param_1 = OpVariable %_ptr_Input_int Input
%_ptr_Output_int = OpTypePointer Output %int
%10 = OpConstantNull %int
%x_4_1_1 = OpVariable %_ptr_Output_int Output %10
%_ptr_Private_v4float = OpTypePointer Private %v4float
%13 = OpConstantNull %v4float
%x_2 = OpVariable %_ptr_Private_v4float Private %13
%_ptr_Private_int = OpTypePointer Private %int
%x_3 = OpVariable %_ptr_Private_int Private %10
%x_4 = OpVariable %_ptr_Private_int Private %10
%19 = OpTypeImage %int 2D 0 0 0 2 R32i
%_ptr_UniformConstant_19 = OpTypePointer UniformConstant %19
%x_5 = OpVariable %_ptr_UniformConstant_19 UniformConstant
%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 %main_out %v4float %int
%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 %19 %x_5
%44 = OpCompositeConstruct %v2int %26 %28
%47 = OpCompositeConstruct %v4int %26 %int_0 %int_0 %int_0
OpImageWrite %42 %44 %47
OpReturn
OpFunctionEnd
%main_inner = OpFunction %main_out None %48
%x_2_param = OpFunctionParameter %v4float
%x_3_param = OpFunctionParameter %int
%53 = OpLabel
OpStore %x_2 %x_2_param
OpStore %x_3 %x_3_param
%54 = OpFunctionCall %void %main_1
%55 = OpLoad %int %x_4
%56 = OpCompositeConstruct %main_out %55
OpReturnValue %56
OpFunctionEnd
%main = OpFunction %void None %20
%58 = OpLabel
%60 = OpLoad %v4float %x_2_param_1
%61 = OpLoad %int %x_3_param_1
%59 = OpFunctionCall %main_out %main_inner %60 %61
%62 = OpCompositeExtract %int %59 0
OpStore %x_4_1_1 %62
OpReturn
OpFunctionEnd