blob: 2a1715fc77ed5948974c52eb26337601cdbab61e [file] [log] [blame]
; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
; Bound: 64
; 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 %S "S"
OpMemberName %S 0 "field0"
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 %S Block
OpMemberDecorate %S 0 Offset 0
OpDecorate %_runtimearr_int ArrayStride 4
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
%_runtimearr_int = OpTypeRuntimeArray %int
%S = OpTypeStruct %_runtimearr_int
%_ptr_StorageBuffer_S = OpTypePointer StorageBuffer %S
%x_5 = OpVariable %_ptr_StorageBuffer_S StorageBuffer
%void = OpTypeVoid
%21 = OpTypeFunction %void
%int_1 = OpConstant %int 1
%uint = OpTypeInt 32 0
%uint_0 = OpConstant %uint 0
%int_8 = OpConstant %int 8
%_ptr_StorageBuffer_int = OpTypePointer StorageBuffer %int
%bool = OpTypeBool
%main_out = OpTypeStruct %int
%49 = OpTypeFunction %main_out %v4float %int
%main_1 = OpFunction %void None %21
%24 = OpLabel
OpStore %x_4 %int_1
%26 = OpLoad %v4float %x_2
%28 = OpCompositeExtract %float %26 0
%27 = OpConvertFToS %int %28
%30 = OpCompositeExtract %float %26 1
%29 = OpConvertFToS %int %30
%31 = OpLoad %int %x_3
%35 = OpIMul %int %29 %int_8
%36 = OpIAdd %int %27 %35
%38 = OpAccessChain %_ptr_StorageBuffer_int %x_5 %uint_0 %36
OpStore %38 %27
%39 = OpBitwiseAnd %int %27 %int_1
%40 = OpBitwiseAnd %int %29 %int_1
%41 = OpIAdd %int %39 %40
%42 = OpIAdd %int %41 %31
%44 = OpCompositeExtract %float %26 2
%43 = OpConvertFToS %int %44
%45 = OpIEqual %bool %42 %43
OpSelectionMerge %47 None
OpBranchConditional %45 %48 %47
%48 = OpLabel
OpBranch %47
%47 = OpLabel
OpReturn
OpFunctionEnd
%main_inner = OpFunction %main_out None %49
%x_2_param = OpFunctionParameter %v4float
%x_3_param = OpFunctionParameter %int
%54 = OpLabel
OpStore %x_2 %x_2_param
OpStore %x_3 %x_3_param
%55 = OpFunctionCall %void %main_1
%56 = OpLoad %int %x_4
%57 = OpCompositeConstruct %main_out %56
OpReturnValue %57
OpFunctionEnd
%main = OpFunction %void None %21
%59 = OpLabel
%61 = OpLoad %v4float %x_2_param_1
%62 = OpLoad %int %x_3_param_1
%60 = OpFunctionCall %main_out %main_inner %61 %62
%63 = OpCompositeExtract %int %60 0
OpStore %x_4_1_1 %63
OpReturn
OpFunctionEnd