blob: fef8d541b95d54fedfd7d15a638413566fe90813 [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" %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 %S "S"
OpMemberName %S 0 "field0"
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 %S Block
OpMemberDecorate %S 0 Offset 0
OpDecorate %_runtimearr_int ArrayStride 4
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
%_runtimearr_int = OpTypeRuntimeArray %int
%S = OpTypeStruct %_runtimearr_int
%_ptr_StorageBuffer_S = OpTypePointer StorageBuffer %S
%x_5 = OpVariable %_ptr_StorageBuffer_S StorageBuffer
%_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
%21 = OpTypeFunction %void
%int_1 = OpConstant %int 1
%bool = OpTypeBool
%uint = OpTypeInt 32 0
%uint_0 = OpConstant %uint 0
%int_8 = OpConstant %int 8
%_ptr_StorageBuffer_int = OpTypePointer StorageBuffer %int
%main_out = OpTypeStruct %int
%49 = OpTypeFunction %void %main_out
%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
%32 = OpBitwiseAnd %int %27 %int_1
%33 = OpBitwiseAnd %int %29 %int_1
%34 = OpIAdd %int %32 %33
%35 = OpIAdd %int %34 %31
%37 = OpCompositeExtract %float %26 2
%36 = OpConvertFToS %int %37
%38 = OpIEqual %bool %35 %36
OpSelectionMerge %40 None
OpBranchConditional %38 %41 %40
%41 = OpLabel
OpBranch %40
%40 = OpLabel
%45 = OpIMul %int %29 %int_8
%46 = OpIAdd %int %27 %45
%48 = OpAccessChain %_ptr_StorageBuffer_int %x_5 %uint_0 %46
OpStore %48 %27
OpReturn
OpFunctionEnd
%tint_symbol_4 = OpFunction %void None %49
%tint_symbol_2 = OpFunctionParameter %main_out
%53 = OpLabel
%54 = OpCompositeExtract %int %tint_symbol_2 0
OpStore %tint_symbol_3 %54
OpReturn
OpFunctionEnd
%main = OpFunction %void None %21
%56 = OpLabel
%57 = OpLoad %v4float %tint_symbol
OpStore %x_2 %57
%58 = OpLoad %int %tint_symbol_1
OpStore %x_3 %58
%59 = OpFunctionCall %void %main_1
%61 = OpLoad %int %x_4
%62 = OpCompositeConstruct %main_out %61
%60 = OpFunctionCall %void %tint_symbol_4 %62
OpReturn
OpFunctionEnd