2022-03-31 22:30:10 +00:00
|
|
|
; SPIR-V
|
|
|
|
; Version: 1.3
|
|
|
|
; Generator: Google Tint Compiler; 0
|
2023-02-10 15:01:02 +00:00
|
|
|
; Bound: 57
|
2022-03-31 22:30:10 +00:00
|
|
|
; Schema: 0
|
|
|
|
OpCapability Shader
|
|
|
|
OpMemoryModel Logical GLSL450
|
|
|
|
OpEntryPoint GLCompute %unused_entry_point "unused_entry_point"
|
|
|
|
OpExecutionMode %unused_entry_point LocalSize 1 1 1
|
2022-11-02 02:25:38 +00:00
|
|
|
OpName %v_block "v_block"
|
|
|
|
OpMemberName %v_block 0 "inner"
|
2022-03-31 22:30:10 +00:00
|
|
|
OpName %S "S"
|
|
|
|
OpMemberName %S 0 "a"
|
|
|
|
OpName %v "v"
|
|
|
|
OpName %unused_entry_point "unused_entry_point"
|
2022-11-09 22:04:11 +00:00
|
|
|
OpName %tint_mod "tint_mod"
|
|
|
|
OpName %lhs "lhs"
|
|
|
|
OpName %rhs "rhs"
|
2023-02-10 15:01:02 +00:00
|
|
|
OpName %tint_return_flag "tint_return_flag"
|
|
|
|
OpName %tint_return_value "tint_return_value"
|
2022-03-31 22:30:10 +00:00
|
|
|
OpName %foo "foo"
|
2022-11-02 02:25:38 +00:00
|
|
|
OpDecorate %v_block Block
|
|
|
|
OpMemberDecorate %v_block 0 Offset 0
|
2022-03-31 22:30:10 +00:00
|
|
|
OpMemberDecorate %S 0 Offset 0
|
|
|
|
OpDecorate %v DescriptorSet 0
|
|
|
|
OpDecorate %v Binding 0
|
|
|
|
%int = OpTypeInt 32 1
|
|
|
|
%S = OpTypeStruct %int
|
2022-11-02 02:25:38 +00:00
|
|
|
%v_block = OpTypeStruct %S
|
|
|
|
%_ptr_StorageBuffer_v_block = OpTypePointer StorageBuffer %v_block
|
|
|
|
%v = OpVariable %_ptr_StorageBuffer_v_block StorageBuffer
|
2022-03-31 22:30:10 +00:00
|
|
|
%void = OpTypeVoid
|
2022-11-02 02:25:38 +00:00
|
|
|
%6 = OpTypeFunction %void
|
2022-11-09 22:04:11 +00:00
|
|
|
%10 = OpTypeFunction %int %int %int
|
|
|
|
%bool = OpTypeBool
|
2023-02-10 15:01:02 +00:00
|
|
|
%_ptr_Function_bool = OpTypePointer Function %bool
|
|
|
|
%18 = OpConstantNull %bool
|
|
|
|
%_ptr_Function_int = OpTypePointer Function %int
|
|
|
|
%21 = OpConstantNull %int
|
2022-11-09 22:04:11 +00:00
|
|
|
%int_n2147483648 = OpConstant %int -2147483648
|
|
|
|
%int_n1 = OpConstant %int -1
|
|
|
|
%int_1 = OpConstant %int 1
|
2022-03-31 22:30:10 +00:00
|
|
|
%uint = OpTypeInt 32 0
|
2023-02-10 15:01:02 +00:00
|
|
|
%uint_2147483648 = OpConstant %uint 2147483648
|
|
|
|
%37 = OpConstantNull %uint
|
|
|
|
%true = OpConstantTrue %bool
|
2022-03-31 22:30:10 +00:00
|
|
|
%uint_0 = OpConstant %uint 0
|
|
|
|
%_ptr_StorageBuffer_int = OpTypePointer StorageBuffer %int
|
|
|
|
%int_2 = OpConstant %int 2
|
2022-11-02 02:25:38 +00:00
|
|
|
%unused_entry_point = OpFunction %void None %6
|
|
|
|
%9 = OpLabel
|
2022-03-31 22:30:10 +00:00
|
|
|
OpReturn
|
|
|
|
OpFunctionEnd
|
2022-11-09 22:04:11 +00:00
|
|
|
%tint_mod = OpFunction %int None %10
|
|
|
|
%lhs = OpFunctionParameter %int
|
|
|
|
%rhs = OpFunctionParameter %int
|
|
|
|
%14 = OpLabel
|
2023-02-10 15:01:02 +00:00
|
|
|
%tint_return_flag = OpVariable %_ptr_Function_bool Function %18
|
|
|
|
%tint_return_value = OpVariable %_ptr_Function_int Function %21
|
|
|
|
%23 = OpIEqual %bool %rhs %21
|
|
|
|
%25 = OpIEqual %bool %lhs %int_n2147483648
|
|
|
|
%27 = OpIEqual %bool %rhs %int_n1
|
|
|
|
%28 = OpLogicalAnd %bool %25 %27
|
|
|
|
%29 = OpLogicalOr %bool %23 %28
|
|
|
|
%22 = OpSelect %int %29 %int_1 %rhs
|
|
|
|
%34 = OpBitwiseOr %int %lhs %22
|
|
|
|
%32 = OpBitcast %uint %34
|
|
|
|
%36 = OpBitwiseAnd %uint %32 %uint_2147483648
|
|
|
|
%38 = OpINotEqual %bool %36 %37
|
|
|
|
OpSelectionMerge %39 None
|
|
|
|
OpBranchConditional %38 %40 %41
|
|
|
|
%40 = OpLabel
|
|
|
|
OpStore %tint_return_flag %true
|
|
|
|
%43 = OpSDiv %int %lhs %22
|
|
|
|
%44 = OpIMul %int %43 %22
|
|
|
|
%45 = OpISub %int %lhs %44
|
|
|
|
OpStore %tint_return_value %45
|
|
|
|
OpBranch %39
|
|
|
|
%41 = OpLabel
|
|
|
|
OpStore %tint_return_flag %true
|
|
|
|
%46 = OpSRem %int %lhs %22
|
|
|
|
OpStore %tint_return_value %46
|
|
|
|
OpBranch %39
|
|
|
|
%39 = OpLabel
|
|
|
|
%47 = OpLoad %int %tint_return_value
|
|
|
|
OpReturnValue %47
|
2022-11-09 22:04:11 +00:00
|
|
|
OpFunctionEnd
|
2022-11-02 02:25:38 +00:00
|
|
|
%foo = OpFunction %void None %6
|
2023-02-10 15:01:02 +00:00
|
|
|
%49 = OpLabel
|
|
|
|
%53 = OpAccessChain %_ptr_StorageBuffer_int %v %uint_0 %uint_0
|
|
|
|
%54 = OpLoad %int %53
|
|
|
|
%50 = OpFunctionCall %int %tint_mod %54 %int_2
|
|
|
|
%56 = OpAccessChain %_ptr_StorageBuffer_int %v %uint_0 %uint_0
|
|
|
|
OpStore %56 %50
|
2022-03-31 22:30:10 +00:00
|
|
|
OpReturn
|
|
|
|
OpFunctionEnd
|