mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-12-09 21:47:47 +00:00
Move tint::transform::Robustness to a santizier transform
There's no good reason for this to be public. Move it into the writers, and expose a 'disable_robustness' option to turn it off. This can be expanded to hold more fine-grain control in the future. Change-Id: I6ea6e54a27b2ae0fbcba5fdf45539063045cc15a Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/122203 Commit-Queue: Ben Clayton <bclayton@google.com> Kokoro: Ben Clayton <bclayton@google.com> Reviewed-by: Dan Sinclair <dsinclair@chromium.org> Auto-Submit: Ben Clayton <bclayton@google.com> Reviewed-by: Austin Eng <enga@chromium.org>
This commit is contained in:
committed by
Dawn LUCI CQ
parent
902c9e5726
commit
03de0e83ae
@@ -1,7 +1,7 @@
|
||||
; SPIR-V
|
||||
; Version: 1.3
|
||||
; Generator: Google Tint Compiler; 0
|
||||
; Bound: 46
|
||||
; Bound: 39
|
||||
; Schema: 0
|
||||
OpCapability Shader
|
||||
OpMemoryModel Logical GLSL450
|
||||
@@ -10,62 +10,49 @@
|
||||
OpName %tint_mod "tint_mod"
|
||||
OpName %lhs "lhs"
|
||||
OpName %rhs "rhs"
|
||||
OpName %tint_return_flag "tint_return_flag"
|
||||
OpName %tint_return_value "tint_return_value"
|
||||
OpName %f "f"
|
||||
%int = OpTypeInt 32 1
|
||||
%1 = OpTypeFunction %int %int %int
|
||||
%8 = OpConstantNull %int
|
||||
%bool = OpTypeBool
|
||||
%_ptr_Function_bool = OpTypePointer Function %bool
|
||||
%10 = OpConstantNull %bool
|
||||
%_ptr_Function_int = OpTypePointer Function %int
|
||||
%13 = OpConstantNull %int
|
||||
%int_n2147483648 = OpConstant %int -2147483648
|
||||
%int_n1 = OpConstant %int -1
|
||||
%int_1 = OpConstant %int 1
|
||||
%uint = OpTypeInt 32 0
|
||||
%uint_2147483648 = OpConstant %uint 2147483648
|
||||
%29 = OpConstantNull %uint
|
||||
%true = OpConstantTrue %bool
|
||||
%24 = OpConstantNull %uint
|
||||
%void = OpTypeVoid
|
||||
%40 = OpTypeFunction %void
|
||||
%33 = OpTypeFunction %void
|
||||
%int_2 = OpConstant %int 2
|
||||
%tint_mod = OpFunction %int None %1
|
||||
%lhs = OpFunctionParameter %int
|
||||
%rhs = OpFunctionParameter %int
|
||||
%6 = OpLabel
|
||||
%tint_return_flag = OpVariable %_ptr_Function_bool Function %10
|
||||
%tint_return_value = OpVariable %_ptr_Function_int Function %13
|
||||
%15 = OpIEqual %bool %rhs %13
|
||||
%17 = OpIEqual %bool %lhs %int_n2147483648
|
||||
%19 = OpIEqual %bool %rhs %int_n1
|
||||
%20 = OpLogicalAnd %bool %17 %19
|
||||
%21 = OpLogicalOr %bool %15 %20
|
||||
%14 = OpSelect %int %21 %int_1 %rhs
|
||||
%26 = OpBitwiseOr %int %lhs %14
|
||||
%24 = OpBitcast %uint %26
|
||||
%28 = OpBitwiseAnd %uint %24 %uint_2147483648
|
||||
%30 = OpINotEqual %bool %28 %29
|
||||
OpSelectionMerge %31 None
|
||||
OpBranchConditional %30 %32 %33
|
||||
%32 = OpLabel
|
||||
OpStore %tint_return_flag %true
|
||||
%35 = OpSDiv %int %lhs %14
|
||||
%36 = OpIMul %int %35 %14
|
||||
%37 = OpISub %int %lhs %36
|
||||
OpStore %tint_return_value %37
|
||||
OpBranch %31
|
||||
%33 = OpLabel
|
||||
OpStore %tint_return_flag %true
|
||||
%38 = OpSRem %int %lhs %14
|
||||
OpStore %tint_return_value %38
|
||||
OpBranch %31
|
||||
%31 = OpLabel
|
||||
%39 = OpLoad %int %tint_return_value
|
||||
OpReturnValue %39
|
||||
%9 = OpIEqual %bool %rhs %8
|
||||
%12 = OpIEqual %bool %lhs %int_n2147483648
|
||||
%14 = OpIEqual %bool %rhs %int_n1
|
||||
%15 = OpLogicalAnd %bool %12 %14
|
||||
%16 = OpLogicalOr %bool %9 %15
|
||||
%7 = OpSelect %int %16 %int_1 %rhs
|
||||
%21 = OpBitwiseOr %int %lhs %7
|
||||
%19 = OpBitcast %uint %21
|
||||
%23 = OpBitwiseAnd %uint %19 %uint_2147483648
|
||||
%25 = OpINotEqual %bool %23 %24
|
||||
OpSelectionMerge %26 None
|
||||
OpBranchConditional %25 %27 %28
|
||||
%27 = OpLabel
|
||||
%29 = OpSDiv %int %lhs %7
|
||||
%30 = OpIMul %int %29 %7
|
||||
%31 = OpISub %int %lhs %30
|
||||
OpReturnValue %31
|
||||
%28 = OpLabel
|
||||
%32 = OpSRem %int %lhs %7
|
||||
OpReturnValue %32
|
||||
%26 = OpLabel
|
||||
OpReturnValue %8
|
||||
OpFunctionEnd
|
||||
%f = OpFunction %void None %40
|
||||
%43 = OpLabel
|
||||
%45 = OpFunctionCall %int %tint_mod %int_1 %int_2
|
||||
%f = OpFunction %void None %33
|
||||
%36 = OpLabel
|
||||
%38 = OpFunctionCall %int %tint_mod %int_1 %int_2
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
; SPIR-V
|
||||
; Version: 1.3
|
||||
; Generator: Google Tint Compiler; 0
|
||||
; Bound: 57
|
||||
; Bound: 50
|
||||
; Schema: 0
|
||||
OpCapability Shader
|
||||
OpMemoryModel Logical GLSL450
|
||||
@@ -10,74 +10,61 @@
|
||||
OpName %tint_mod "tint_mod"
|
||||
OpName %lhs "lhs"
|
||||
OpName %rhs "rhs"
|
||||
OpName %tint_return_flag "tint_return_flag"
|
||||
OpName %tint_return_value "tint_return_value"
|
||||
OpName %f "f"
|
||||
%int = OpTypeInt 32 1
|
||||
%v3int = OpTypeVector %int 3
|
||||
%1 = OpTypeFunction %v3int %int %v3int
|
||||
%10 = OpConstantNull %v3int
|
||||
%bool = OpTypeBool
|
||||
%_ptr_Function_bool = OpTypePointer Function %bool
|
||||
%11 = OpConstantNull %bool
|
||||
%_ptr_Function_v3int = OpTypePointer Function %v3int
|
||||
%14 = OpConstantNull %v3int
|
||||
%v3bool = OpTypeVector %bool 3
|
||||
%int_n2147483648 = OpConstant %int -2147483648
|
||||
%20 = OpConstantComposite %v3int %int_n2147483648 %int_n2147483648 %int_n2147483648
|
||||
%15 = OpConstantComposite %v3int %int_n2147483648 %int_n2147483648 %int_n2147483648
|
||||
%int_n1 = OpConstant %int -1
|
||||
%23 = OpConstantComposite %v3int %int_n1 %int_n1 %int_n1
|
||||
%18 = OpConstantComposite %v3int %int_n1 %int_n1 %int_n1
|
||||
%int_1 = OpConstant %int 1
|
||||
%28 = OpConstantComposite %v3int %int_1 %int_1 %int_1
|
||||
%23 = OpConstantComposite %v3int %int_1 %int_1 %int_1
|
||||
%uint = OpTypeInt 32 0
|
||||
%v3uint = OpTypeVector %uint 3
|
||||
%uint_2147483648 = OpConstant %uint 2147483648
|
||||
%35 = OpConstantComposite %v3uint %uint_2147483648 %uint_2147483648 %uint_2147483648
|
||||
%37 = OpConstantNull %v3uint
|
||||
%true = OpConstantTrue %bool
|
||||
%30 = OpConstantComposite %v3uint %uint_2147483648 %uint_2147483648 %uint_2147483648
|
||||
%32 = OpConstantNull %v3uint
|
||||
%void = OpTypeVoid
|
||||
%48 = OpTypeFunction %void
|
||||
%41 = OpTypeFunction %void
|
||||
%int_4 = OpConstant %int 4
|
||||
%int_2 = OpConstant %int 2
|
||||
%int_3 = OpConstant %int 3
|
||||
%55 = OpConstantComposite %v3int %int_1 %int_2 %int_3
|
||||
%48 = OpConstantComposite %v3int %int_1 %int_2 %int_3
|
||||
%tint_mod = OpFunction %v3int None %1
|
||||
%lhs = OpFunctionParameter %int
|
||||
%rhs = OpFunctionParameter %v3int
|
||||
%7 = OpLabel
|
||||
%tint_return_flag = OpVariable %_ptr_Function_bool Function %11
|
||||
%tint_return_value = OpVariable %_ptr_Function_v3int Function %14
|
||||
%15 = OpCompositeConstruct %v3int %lhs %lhs %lhs
|
||||
%17 = OpIEqual %v3bool %rhs %14
|
||||
%21 = OpIEqual %v3bool %15 %20
|
||||
%24 = OpIEqual %v3bool %rhs %23
|
||||
%25 = OpLogicalAnd %v3bool %21 %24
|
||||
%26 = OpLogicalOr %v3bool %17 %25
|
||||
%16 = OpSelect %v3int %26 %28 %rhs
|
||||
%33 = OpBitwiseOr %v3int %15 %16
|
||||
%30 = OpBitcast %v3uint %33
|
||||
%36 = OpBitwiseAnd %v3uint %30 %35
|
||||
%38 = OpINotEqual %v3bool %36 %37
|
||||
%29 = OpAny %bool %38
|
||||
OpSelectionMerge %39 None
|
||||
OpBranchConditional %29 %40 %41
|
||||
%40 = OpLabel
|
||||
OpStore %tint_return_flag %true
|
||||
%43 = OpSDiv %v3int %15 %16
|
||||
%44 = OpIMul %v3int %43 %16
|
||||
%45 = OpISub %v3int %15 %44
|
||||
OpStore %tint_return_value %45
|
||||
OpBranch %39
|
||||
%41 = OpLabel
|
||||
OpStore %tint_return_flag %true
|
||||
%46 = OpSRem %v3int %15 %16
|
||||
OpStore %tint_return_value %46
|
||||
OpBranch %39
|
||||
%39 = OpLabel
|
||||
%47 = OpLoad %v3int %tint_return_value
|
||||
OpReturnValue %47
|
||||
%8 = OpCompositeConstruct %v3int %lhs %lhs %lhs
|
||||
%11 = OpIEqual %v3bool %rhs %10
|
||||
%16 = OpIEqual %v3bool %8 %15
|
||||
%19 = OpIEqual %v3bool %rhs %18
|
||||
%20 = OpLogicalAnd %v3bool %16 %19
|
||||
%21 = OpLogicalOr %v3bool %11 %20
|
||||
%9 = OpSelect %v3int %21 %23 %rhs
|
||||
%28 = OpBitwiseOr %v3int %8 %9
|
||||
%25 = OpBitcast %v3uint %28
|
||||
%31 = OpBitwiseAnd %v3uint %25 %30
|
||||
%33 = OpINotEqual %v3bool %31 %32
|
||||
%24 = OpAny %bool %33
|
||||
OpSelectionMerge %34 None
|
||||
OpBranchConditional %24 %35 %36
|
||||
%35 = OpLabel
|
||||
%37 = OpSDiv %v3int %8 %9
|
||||
%38 = OpIMul %v3int %37 %9
|
||||
%39 = OpISub %v3int %8 %38
|
||||
OpReturnValue %39
|
||||
%36 = OpLabel
|
||||
%40 = OpSRem %v3int %8 %9
|
||||
OpReturnValue %40
|
||||
%34 = OpLabel
|
||||
OpReturnValue %10
|
||||
OpFunctionEnd
|
||||
%f = OpFunction %void None %48
|
||||
%51 = OpLabel
|
||||
%56 = OpFunctionCall %v3int %tint_mod %int_4 %55
|
||||
%f = OpFunction %void None %41
|
||||
%44 = OpLabel
|
||||
%49 = OpFunctionCall %v3int %tint_mod %int_4 %48
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
; SPIR-V
|
||||
; Version: 1.3
|
||||
; Generator: Google Tint Compiler; 0
|
||||
; Bound: 57
|
||||
; Bound: 50
|
||||
; Schema: 0
|
||||
OpCapability Shader
|
||||
OpMemoryModel Logical GLSL450
|
||||
@@ -10,74 +10,61 @@
|
||||
OpName %tint_mod "tint_mod"
|
||||
OpName %lhs "lhs"
|
||||
OpName %rhs "rhs"
|
||||
OpName %tint_return_flag "tint_return_flag"
|
||||
OpName %tint_return_value "tint_return_value"
|
||||
OpName %f "f"
|
||||
%int = OpTypeInt 32 1
|
||||
%v3int = OpTypeVector %int 3
|
||||
%1 = OpTypeFunction %v3int %v3int %int
|
||||
%10 = OpConstantNull %v3int
|
||||
%bool = OpTypeBool
|
||||
%_ptr_Function_bool = OpTypePointer Function %bool
|
||||
%11 = OpConstantNull %bool
|
||||
%_ptr_Function_v3int = OpTypePointer Function %v3int
|
||||
%14 = OpConstantNull %v3int
|
||||
%v3bool = OpTypeVector %bool 3
|
||||
%int_n2147483648 = OpConstant %int -2147483648
|
||||
%20 = OpConstantComposite %v3int %int_n2147483648 %int_n2147483648 %int_n2147483648
|
||||
%15 = OpConstantComposite %v3int %int_n2147483648 %int_n2147483648 %int_n2147483648
|
||||
%int_n1 = OpConstant %int -1
|
||||
%23 = OpConstantComposite %v3int %int_n1 %int_n1 %int_n1
|
||||
%18 = OpConstantComposite %v3int %int_n1 %int_n1 %int_n1
|
||||
%int_1 = OpConstant %int 1
|
||||
%28 = OpConstantComposite %v3int %int_1 %int_1 %int_1
|
||||
%23 = OpConstantComposite %v3int %int_1 %int_1 %int_1
|
||||
%uint = OpTypeInt 32 0
|
||||
%v3uint = OpTypeVector %uint 3
|
||||
%uint_2147483648 = OpConstant %uint 2147483648
|
||||
%35 = OpConstantComposite %v3uint %uint_2147483648 %uint_2147483648 %uint_2147483648
|
||||
%37 = OpConstantNull %v3uint
|
||||
%true = OpConstantTrue %bool
|
||||
%30 = OpConstantComposite %v3uint %uint_2147483648 %uint_2147483648 %uint_2147483648
|
||||
%32 = OpConstantNull %v3uint
|
||||
%void = OpTypeVoid
|
||||
%48 = OpTypeFunction %void
|
||||
%41 = OpTypeFunction %void
|
||||
%int_2 = OpConstant %int 2
|
||||
%int_3 = OpConstant %int 3
|
||||
%54 = OpConstantComposite %v3int %int_1 %int_2 %int_3
|
||||
%47 = OpConstantComposite %v3int %int_1 %int_2 %int_3
|
||||
%int_4 = OpConstant %int 4
|
||||
%tint_mod = OpFunction %v3int None %1
|
||||
%lhs = OpFunctionParameter %v3int
|
||||
%rhs = OpFunctionParameter %int
|
||||
%7 = OpLabel
|
||||
%tint_return_flag = OpVariable %_ptr_Function_bool Function %11
|
||||
%tint_return_value = OpVariable %_ptr_Function_v3int Function %14
|
||||
%15 = OpCompositeConstruct %v3int %rhs %rhs %rhs
|
||||
%17 = OpIEqual %v3bool %15 %14
|
||||
%21 = OpIEqual %v3bool %lhs %20
|
||||
%24 = OpIEqual %v3bool %15 %23
|
||||
%25 = OpLogicalAnd %v3bool %21 %24
|
||||
%26 = OpLogicalOr %v3bool %17 %25
|
||||
%16 = OpSelect %v3int %26 %28 %15
|
||||
%33 = OpBitwiseOr %v3int %lhs %16
|
||||
%30 = OpBitcast %v3uint %33
|
||||
%36 = OpBitwiseAnd %v3uint %30 %35
|
||||
%38 = OpINotEqual %v3bool %36 %37
|
||||
%29 = OpAny %bool %38
|
||||
OpSelectionMerge %39 None
|
||||
OpBranchConditional %29 %40 %41
|
||||
%40 = OpLabel
|
||||
OpStore %tint_return_flag %true
|
||||
%43 = OpSDiv %v3int %lhs %16
|
||||
%44 = OpIMul %v3int %43 %16
|
||||
%45 = OpISub %v3int %lhs %44
|
||||
OpStore %tint_return_value %45
|
||||
OpBranch %39
|
||||
%41 = OpLabel
|
||||
OpStore %tint_return_flag %true
|
||||
%46 = OpSRem %v3int %lhs %16
|
||||
OpStore %tint_return_value %46
|
||||
OpBranch %39
|
||||
%39 = OpLabel
|
||||
%47 = OpLoad %v3int %tint_return_value
|
||||
OpReturnValue %47
|
||||
%8 = OpCompositeConstruct %v3int %rhs %rhs %rhs
|
||||
%11 = OpIEqual %v3bool %8 %10
|
||||
%16 = OpIEqual %v3bool %lhs %15
|
||||
%19 = OpIEqual %v3bool %8 %18
|
||||
%20 = OpLogicalAnd %v3bool %16 %19
|
||||
%21 = OpLogicalOr %v3bool %11 %20
|
||||
%9 = OpSelect %v3int %21 %23 %8
|
||||
%28 = OpBitwiseOr %v3int %lhs %9
|
||||
%25 = OpBitcast %v3uint %28
|
||||
%31 = OpBitwiseAnd %v3uint %25 %30
|
||||
%33 = OpINotEqual %v3bool %31 %32
|
||||
%24 = OpAny %bool %33
|
||||
OpSelectionMerge %34 None
|
||||
OpBranchConditional %24 %35 %36
|
||||
%35 = OpLabel
|
||||
%37 = OpSDiv %v3int %lhs %9
|
||||
%38 = OpIMul %v3int %37 %9
|
||||
%39 = OpISub %v3int %lhs %38
|
||||
OpReturnValue %39
|
||||
%36 = OpLabel
|
||||
%40 = OpSRem %v3int %lhs %9
|
||||
OpReturnValue %40
|
||||
%34 = OpLabel
|
||||
OpReturnValue %10
|
||||
OpFunctionEnd
|
||||
%f = OpFunction %void None %48
|
||||
%51 = OpLabel
|
||||
%56 = OpFunctionCall %v3int %tint_mod %54 %int_4
|
||||
%f = OpFunction %void None %41
|
||||
%44 = OpLabel
|
||||
%49 = OpFunctionCall %v3int %tint_mod %47 %int_4
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
; SPIR-V
|
||||
; Version: 1.3
|
||||
; Generator: Google Tint Compiler; 0
|
||||
; Bound: 59
|
||||
; Bound: 52
|
||||
; Schema: 0
|
||||
OpCapability Shader
|
||||
OpMemoryModel Logical GLSL450
|
||||
@@ -10,76 +10,63 @@
|
||||
OpName %tint_mod "tint_mod"
|
||||
OpName %lhs "lhs"
|
||||
OpName %rhs "rhs"
|
||||
OpName %tint_return_flag "tint_return_flag"
|
||||
OpName %tint_return_value "tint_return_value"
|
||||
OpName %f "f"
|
||||
%int = OpTypeInt 32 1
|
||||
%v3int = OpTypeVector %int 3
|
||||
%1 = OpTypeFunction %v3int %v3int %v3int
|
||||
%9 = OpConstantNull %v3int
|
||||
%bool = OpTypeBool
|
||||
%_ptr_Function_bool = OpTypePointer Function %bool
|
||||
%11 = OpConstantNull %bool
|
||||
%_ptr_Function_v3int = OpTypePointer Function %v3int
|
||||
%14 = OpConstantNull %v3int
|
||||
%v3bool = OpTypeVector %bool 3
|
||||
%int_n2147483648 = OpConstant %int -2147483648
|
||||
%19 = OpConstantComposite %v3int %int_n2147483648 %int_n2147483648 %int_n2147483648
|
||||
%14 = OpConstantComposite %v3int %int_n2147483648 %int_n2147483648 %int_n2147483648
|
||||
%int_n1 = OpConstant %int -1
|
||||
%22 = OpConstantComposite %v3int %int_n1 %int_n1 %int_n1
|
||||
%17 = OpConstantComposite %v3int %int_n1 %int_n1 %int_n1
|
||||
%int_1 = OpConstant %int 1
|
||||
%27 = OpConstantComposite %v3int %int_1 %int_1 %int_1
|
||||
%22 = OpConstantComposite %v3int %int_1 %int_1 %int_1
|
||||
%uint = OpTypeInt 32 0
|
||||
%v3uint = OpTypeVector %uint 3
|
||||
%uint_2147483648 = OpConstant %uint 2147483648
|
||||
%34 = OpConstantComposite %v3uint %uint_2147483648 %uint_2147483648 %uint_2147483648
|
||||
%36 = OpConstantNull %v3uint
|
||||
%true = OpConstantTrue %bool
|
||||
%29 = OpConstantComposite %v3uint %uint_2147483648 %uint_2147483648 %uint_2147483648
|
||||
%31 = OpConstantNull %v3uint
|
||||
%void = OpTypeVoid
|
||||
%47 = OpTypeFunction %void
|
||||
%40 = OpTypeFunction %void
|
||||
%int_2 = OpConstant %int 2
|
||||
%int_3 = OpConstant %int 3
|
||||
%53 = OpConstantComposite %v3int %int_1 %int_2 %int_3
|
||||
%46 = OpConstantComposite %v3int %int_1 %int_2 %int_3
|
||||
%int_4 = OpConstant %int 4
|
||||
%int_5 = OpConstant %int 5
|
||||
%int_6 = OpConstant %int 6
|
||||
%57 = OpConstantComposite %v3int %int_4 %int_5 %int_6
|
||||
%50 = OpConstantComposite %v3int %int_4 %int_5 %int_6
|
||||
%tint_mod = OpFunction %v3int None %1
|
||||
%lhs = OpFunctionParameter %v3int
|
||||
%rhs = OpFunctionParameter %v3int
|
||||
%7 = OpLabel
|
||||
%tint_return_flag = OpVariable %_ptr_Function_bool Function %11
|
||||
%tint_return_value = OpVariable %_ptr_Function_v3int Function %14
|
||||
%16 = OpIEqual %v3bool %rhs %14
|
||||
%20 = OpIEqual %v3bool %lhs %19
|
||||
%23 = OpIEqual %v3bool %rhs %22
|
||||
%24 = OpLogicalAnd %v3bool %20 %23
|
||||
%25 = OpLogicalOr %v3bool %16 %24
|
||||
%15 = OpSelect %v3int %25 %27 %rhs
|
||||
%32 = OpBitwiseOr %v3int %lhs %15
|
||||
%29 = OpBitcast %v3uint %32
|
||||
%35 = OpBitwiseAnd %v3uint %29 %34
|
||||
%37 = OpINotEqual %v3bool %35 %36
|
||||
%28 = OpAny %bool %37
|
||||
OpSelectionMerge %38 None
|
||||
OpBranchConditional %28 %39 %40
|
||||
%39 = OpLabel
|
||||
OpStore %tint_return_flag %true
|
||||
%42 = OpSDiv %v3int %lhs %15
|
||||
%43 = OpIMul %v3int %42 %15
|
||||
%44 = OpISub %v3int %lhs %43
|
||||
OpStore %tint_return_value %44
|
||||
OpBranch %38
|
||||
%40 = OpLabel
|
||||
OpStore %tint_return_flag %true
|
||||
%45 = OpSRem %v3int %lhs %15
|
||||
OpStore %tint_return_value %45
|
||||
OpBranch %38
|
||||
%38 = OpLabel
|
||||
%46 = OpLoad %v3int %tint_return_value
|
||||
OpReturnValue %46
|
||||
%10 = OpIEqual %v3bool %rhs %9
|
||||
%15 = OpIEqual %v3bool %lhs %14
|
||||
%18 = OpIEqual %v3bool %rhs %17
|
||||
%19 = OpLogicalAnd %v3bool %15 %18
|
||||
%20 = OpLogicalOr %v3bool %10 %19
|
||||
%8 = OpSelect %v3int %20 %22 %rhs
|
||||
%27 = OpBitwiseOr %v3int %lhs %8
|
||||
%24 = OpBitcast %v3uint %27
|
||||
%30 = OpBitwiseAnd %v3uint %24 %29
|
||||
%32 = OpINotEqual %v3bool %30 %31
|
||||
%23 = OpAny %bool %32
|
||||
OpSelectionMerge %33 None
|
||||
OpBranchConditional %23 %34 %35
|
||||
%34 = OpLabel
|
||||
%36 = OpSDiv %v3int %lhs %8
|
||||
%37 = OpIMul %v3int %36 %8
|
||||
%38 = OpISub %v3int %lhs %37
|
||||
OpReturnValue %38
|
||||
%35 = OpLabel
|
||||
%39 = OpSRem %v3int %lhs %8
|
||||
OpReturnValue %39
|
||||
%33 = OpLabel
|
||||
OpReturnValue %9
|
||||
OpFunctionEnd
|
||||
%f = OpFunction %void None %47
|
||||
%50 = OpLabel
|
||||
%58 = OpFunctionCall %v3int %tint_mod %53 %57
|
||||
%f = OpFunction %void None %40
|
||||
%43 = OpLabel
|
||||
%51 = OpFunctionCall %v3int %tint_mod %46 %50
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
; SPIR-V
|
||||
; Version: 1.3
|
||||
; Generator: Google Tint Compiler; 0
|
||||
; Bound: 45
|
||||
; Bound: 38
|
||||
; Schema: 0
|
||||
OpCapability Shader
|
||||
OpMemoryModel Logical GLSL450
|
||||
@@ -10,61 +10,48 @@
|
||||
OpName %tint_mod "tint_mod"
|
||||
OpName %lhs "lhs"
|
||||
OpName %rhs "rhs"
|
||||
OpName %tint_return_flag "tint_return_flag"
|
||||
OpName %tint_return_value "tint_return_value"
|
||||
OpName %f "f"
|
||||
%int = OpTypeInt 32 1
|
||||
%1 = OpTypeFunction %int %int %int
|
||||
%8 = OpConstantNull %int
|
||||
%bool = OpTypeBool
|
||||
%_ptr_Function_bool = OpTypePointer Function %bool
|
||||
%10 = OpConstantNull %bool
|
||||
%_ptr_Function_int = OpTypePointer Function %int
|
||||
%13 = OpConstantNull %int
|
||||
%int_n2147483648 = OpConstant %int -2147483648
|
||||
%int_n1 = OpConstant %int -1
|
||||
%int_1 = OpConstant %int 1
|
||||
%uint = OpTypeInt 32 0
|
||||
%uint_2147483648 = OpConstant %uint 2147483648
|
||||
%29 = OpConstantNull %uint
|
||||
%true = OpConstantTrue %bool
|
||||
%24 = OpConstantNull %uint
|
||||
%void = OpTypeVoid
|
||||
%40 = OpTypeFunction %void
|
||||
%33 = OpTypeFunction %void
|
||||
%tint_mod = OpFunction %int None %1
|
||||
%lhs = OpFunctionParameter %int
|
||||
%rhs = OpFunctionParameter %int
|
||||
%6 = OpLabel
|
||||
%tint_return_flag = OpVariable %_ptr_Function_bool Function %10
|
||||
%tint_return_value = OpVariable %_ptr_Function_int Function %13
|
||||
%15 = OpIEqual %bool %rhs %13
|
||||
%17 = OpIEqual %bool %lhs %int_n2147483648
|
||||
%19 = OpIEqual %bool %rhs %int_n1
|
||||
%20 = OpLogicalAnd %bool %17 %19
|
||||
%21 = OpLogicalOr %bool %15 %20
|
||||
%14 = OpSelect %int %21 %int_1 %rhs
|
||||
%26 = OpBitwiseOr %int %lhs %14
|
||||
%24 = OpBitcast %uint %26
|
||||
%28 = OpBitwiseAnd %uint %24 %uint_2147483648
|
||||
%30 = OpINotEqual %bool %28 %29
|
||||
OpSelectionMerge %31 None
|
||||
OpBranchConditional %30 %32 %33
|
||||
%32 = OpLabel
|
||||
OpStore %tint_return_flag %true
|
||||
%35 = OpSDiv %int %lhs %14
|
||||
%36 = OpIMul %int %35 %14
|
||||
%37 = OpISub %int %lhs %36
|
||||
OpStore %tint_return_value %37
|
||||
OpBranch %31
|
||||
%33 = OpLabel
|
||||
OpStore %tint_return_flag %true
|
||||
%38 = OpSRem %int %lhs %14
|
||||
OpStore %tint_return_value %38
|
||||
OpBranch %31
|
||||
%31 = OpLabel
|
||||
%39 = OpLoad %int %tint_return_value
|
||||
OpReturnValue %39
|
||||
%9 = OpIEqual %bool %rhs %8
|
||||
%12 = OpIEqual %bool %lhs %int_n2147483648
|
||||
%14 = OpIEqual %bool %rhs %int_n1
|
||||
%15 = OpLogicalAnd %bool %12 %14
|
||||
%16 = OpLogicalOr %bool %9 %15
|
||||
%7 = OpSelect %int %16 %int_1 %rhs
|
||||
%21 = OpBitwiseOr %int %lhs %7
|
||||
%19 = OpBitcast %uint %21
|
||||
%23 = OpBitwiseAnd %uint %19 %uint_2147483648
|
||||
%25 = OpINotEqual %bool %23 %24
|
||||
OpSelectionMerge %26 None
|
||||
OpBranchConditional %25 %27 %28
|
||||
%27 = OpLabel
|
||||
%29 = OpSDiv %int %lhs %7
|
||||
%30 = OpIMul %int %29 %7
|
||||
%31 = OpISub %int %lhs %30
|
||||
OpReturnValue %31
|
||||
%28 = OpLabel
|
||||
%32 = OpSRem %int %lhs %7
|
||||
OpReturnValue %32
|
||||
%26 = OpLabel
|
||||
OpReturnValue %8
|
||||
OpFunctionEnd
|
||||
%f = OpFunction %void None %40
|
||||
%43 = OpLabel
|
||||
%44 = OpFunctionCall %int %tint_mod %int_1 %13
|
||||
%f = OpFunction %void None %33
|
||||
%36 = OpLabel
|
||||
%37 = OpFunctionCall %int %tint_mod %int_1 %8
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
; SPIR-V
|
||||
; Version: 1.3
|
||||
; Generator: Google Tint Compiler; 0
|
||||
; Bound: 57
|
||||
; Bound: 50
|
||||
; Schema: 0
|
||||
OpCapability Shader
|
||||
OpMemoryModel Logical GLSL450
|
||||
@@ -10,74 +10,61 @@
|
||||
OpName %tint_mod "tint_mod"
|
||||
OpName %lhs "lhs"
|
||||
OpName %rhs "rhs"
|
||||
OpName %tint_return_flag "tint_return_flag"
|
||||
OpName %tint_return_value "tint_return_value"
|
||||
OpName %f "f"
|
||||
%int = OpTypeInt 32 1
|
||||
%v3int = OpTypeVector %int 3
|
||||
%1 = OpTypeFunction %v3int %int %v3int
|
||||
%10 = OpConstantNull %v3int
|
||||
%bool = OpTypeBool
|
||||
%_ptr_Function_bool = OpTypePointer Function %bool
|
||||
%11 = OpConstantNull %bool
|
||||
%_ptr_Function_v3int = OpTypePointer Function %v3int
|
||||
%14 = OpConstantNull %v3int
|
||||
%v3bool = OpTypeVector %bool 3
|
||||
%int_n2147483648 = OpConstant %int -2147483648
|
||||
%20 = OpConstantComposite %v3int %int_n2147483648 %int_n2147483648 %int_n2147483648
|
||||
%15 = OpConstantComposite %v3int %int_n2147483648 %int_n2147483648 %int_n2147483648
|
||||
%int_n1 = OpConstant %int -1
|
||||
%23 = OpConstantComposite %v3int %int_n1 %int_n1 %int_n1
|
||||
%18 = OpConstantComposite %v3int %int_n1 %int_n1 %int_n1
|
||||
%int_1 = OpConstant %int 1
|
||||
%28 = OpConstantComposite %v3int %int_1 %int_1 %int_1
|
||||
%23 = OpConstantComposite %v3int %int_1 %int_1 %int_1
|
||||
%uint = OpTypeInt 32 0
|
||||
%v3uint = OpTypeVector %uint 3
|
||||
%uint_2147483648 = OpConstant %uint 2147483648
|
||||
%35 = OpConstantComposite %v3uint %uint_2147483648 %uint_2147483648 %uint_2147483648
|
||||
%37 = OpConstantNull %v3uint
|
||||
%true = OpConstantTrue %bool
|
||||
%30 = OpConstantComposite %v3uint %uint_2147483648 %uint_2147483648 %uint_2147483648
|
||||
%32 = OpConstantNull %v3uint
|
||||
%void = OpTypeVoid
|
||||
%48 = OpTypeFunction %void
|
||||
%41 = OpTypeFunction %void
|
||||
%int_4 = OpConstant %int 4
|
||||
%53 = OpConstantNull %int
|
||||
%46 = OpConstantNull %int
|
||||
%int_2 = OpConstant %int 2
|
||||
%55 = OpConstantComposite %v3int %53 %int_2 %53
|
||||
%48 = OpConstantComposite %v3int %46 %int_2 %46
|
||||
%tint_mod = OpFunction %v3int None %1
|
||||
%lhs = OpFunctionParameter %int
|
||||
%rhs = OpFunctionParameter %v3int
|
||||
%7 = OpLabel
|
||||
%tint_return_flag = OpVariable %_ptr_Function_bool Function %11
|
||||
%tint_return_value = OpVariable %_ptr_Function_v3int Function %14
|
||||
%15 = OpCompositeConstruct %v3int %lhs %lhs %lhs
|
||||
%17 = OpIEqual %v3bool %rhs %14
|
||||
%21 = OpIEqual %v3bool %15 %20
|
||||
%24 = OpIEqual %v3bool %rhs %23
|
||||
%25 = OpLogicalAnd %v3bool %21 %24
|
||||
%26 = OpLogicalOr %v3bool %17 %25
|
||||
%16 = OpSelect %v3int %26 %28 %rhs
|
||||
%33 = OpBitwiseOr %v3int %15 %16
|
||||
%30 = OpBitcast %v3uint %33
|
||||
%36 = OpBitwiseAnd %v3uint %30 %35
|
||||
%38 = OpINotEqual %v3bool %36 %37
|
||||
%29 = OpAny %bool %38
|
||||
OpSelectionMerge %39 None
|
||||
OpBranchConditional %29 %40 %41
|
||||
%40 = OpLabel
|
||||
OpStore %tint_return_flag %true
|
||||
%43 = OpSDiv %v3int %15 %16
|
||||
%44 = OpIMul %v3int %43 %16
|
||||
%45 = OpISub %v3int %15 %44
|
||||
OpStore %tint_return_value %45
|
||||
OpBranch %39
|
||||
%41 = OpLabel
|
||||
OpStore %tint_return_flag %true
|
||||
%46 = OpSRem %v3int %15 %16
|
||||
OpStore %tint_return_value %46
|
||||
OpBranch %39
|
||||
%39 = OpLabel
|
||||
%47 = OpLoad %v3int %tint_return_value
|
||||
OpReturnValue %47
|
||||
%8 = OpCompositeConstruct %v3int %lhs %lhs %lhs
|
||||
%11 = OpIEqual %v3bool %rhs %10
|
||||
%16 = OpIEqual %v3bool %8 %15
|
||||
%19 = OpIEqual %v3bool %rhs %18
|
||||
%20 = OpLogicalAnd %v3bool %16 %19
|
||||
%21 = OpLogicalOr %v3bool %11 %20
|
||||
%9 = OpSelect %v3int %21 %23 %rhs
|
||||
%28 = OpBitwiseOr %v3int %8 %9
|
||||
%25 = OpBitcast %v3uint %28
|
||||
%31 = OpBitwiseAnd %v3uint %25 %30
|
||||
%33 = OpINotEqual %v3bool %31 %32
|
||||
%24 = OpAny %bool %33
|
||||
OpSelectionMerge %34 None
|
||||
OpBranchConditional %24 %35 %36
|
||||
%35 = OpLabel
|
||||
%37 = OpSDiv %v3int %8 %9
|
||||
%38 = OpIMul %v3int %37 %9
|
||||
%39 = OpISub %v3int %8 %38
|
||||
OpReturnValue %39
|
||||
%36 = OpLabel
|
||||
%40 = OpSRem %v3int %8 %9
|
||||
OpReturnValue %40
|
||||
%34 = OpLabel
|
||||
OpReturnValue %10
|
||||
OpFunctionEnd
|
||||
%f = OpFunction %void None %48
|
||||
%51 = OpLabel
|
||||
%56 = OpFunctionCall %v3int %tint_mod %int_4 %55
|
||||
%f = OpFunction %void None %41
|
||||
%44 = OpLabel
|
||||
%49 = OpFunctionCall %v3int %tint_mod %int_4 %48
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
; SPIR-V
|
||||
; Version: 1.3
|
||||
; Generator: Google Tint Compiler; 0
|
||||
; Bound: 57
|
||||
; Bound: 50
|
||||
; Schema: 0
|
||||
OpCapability Shader
|
||||
OpMemoryModel Logical GLSL450
|
||||
@@ -10,74 +10,61 @@
|
||||
OpName %tint_mod "tint_mod"
|
||||
OpName %lhs "lhs"
|
||||
OpName %rhs "rhs"
|
||||
OpName %tint_return_flag "tint_return_flag"
|
||||
OpName %tint_return_value "tint_return_value"
|
||||
OpName %f "f"
|
||||
%int = OpTypeInt 32 1
|
||||
%v3int = OpTypeVector %int 3
|
||||
%1 = OpTypeFunction %v3int %v3int %int
|
||||
%10 = OpConstantNull %v3int
|
||||
%bool = OpTypeBool
|
||||
%_ptr_Function_bool = OpTypePointer Function %bool
|
||||
%11 = OpConstantNull %bool
|
||||
%_ptr_Function_v3int = OpTypePointer Function %v3int
|
||||
%14 = OpConstantNull %v3int
|
||||
%v3bool = OpTypeVector %bool 3
|
||||
%int_n2147483648 = OpConstant %int -2147483648
|
||||
%20 = OpConstantComposite %v3int %int_n2147483648 %int_n2147483648 %int_n2147483648
|
||||
%15 = OpConstantComposite %v3int %int_n2147483648 %int_n2147483648 %int_n2147483648
|
||||
%int_n1 = OpConstant %int -1
|
||||
%23 = OpConstantComposite %v3int %int_n1 %int_n1 %int_n1
|
||||
%18 = OpConstantComposite %v3int %int_n1 %int_n1 %int_n1
|
||||
%int_1 = OpConstant %int 1
|
||||
%28 = OpConstantComposite %v3int %int_1 %int_1 %int_1
|
||||
%23 = OpConstantComposite %v3int %int_1 %int_1 %int_1
|
||||
%uint = OpTypeInt 32 0
|
||||
%v3uint = OpTypeVector %uint 3
|
||||
%uint_2147483648 = OpConstant %uint 2147483648
|
||||
%35 = OpConstantComposite %v3uint %uint_2147483648 %uint_2147483648 %uint_2147483648
|
||||
%37 = OpConstantNull %v3uint
|
||||
%true = OpConstantTrue %bool
|
||||
%30 = OpConstantComposite %v3uint %uint_2147483648 %uint_2147483648 %uint_2147483648
|
||||
%32 = OpConstantNull %v3uint
|
||||
%void = OpTypeVoid
|
||||
%48 = OpTypeFunction %void
|
||||
%41 = OpTypeFunction %void
|
||||
%int_2 = OpConstant %int 2
|
||||
%int_3 = OpConstant %int 3
|
||||
%54 = OpConstantComposite %v3int %int_1 %int_2 %int_3
|
||||
%55 = OpConstantNull %int
|
||||
%47 = OpConstantComposite %v3int %int_1 %int_2 %int_3
|
||||
%48 = OpConstantNull %int
|
||||
%tint_mod = OpFunction %v3int None %1
|
||||
%lhs = OpFunctionParameter %v3int
|
||||
%rhs = OpFunctionParameter %int
|
||||
%7 = OpLabel
|
||||
%tint_return_flag = OpVariable %_ptr_Function_bool Function %11
|
||||
%tint_return_value = OpVariable %_ptr_Function_v3int Function %14
|
||||
%15 = OpCompositeConstruct %v3int %rhs %rhs %rhs
|
||||
%17 = OpIEqual %v3bool %15 %14
|
||||
%21 = OpIEqual %v3bool %lhs %20
|
||||
%24 = OpIEqual %v3bool %15 %23
|
||||
%25 = OpLogicalAnd %v3bool %21 %24
|
||||
%26 = OpLogicalOr %v3bool %17 %25
|
||||
%16 = OpSelect %v3int %26 %28 %15
|
||||
%33 = OpBitwiseOr %v3int %lhs %16
|
||||
%30 = OpBitcast %v3uint %33
|
||||
%36 = OpBitwiseAnd %v3uint %30 %35
|
||||
%38 = OpINotEqual %v3bool %36 %37
|
||||
%29 = OpAny %bool %38
|
||||
OpSelectionMerge %39 None
|
||||
OpBranchConditional %29 %40 %41
|
||||
%40 = OpLabel
|
||||
OpStore %tint_return_flag %true
|
||||
%43 = OpSDiv %v3int %lhs %16
|
||||
%44 = OpIMul %v3int %43 %16
|
||||
%45 = OpISub %v3int %lhs %44
|
||||
OpStore %tint_return_value %45
|
||||
OpBranch %39
|
||||
%41 = OpLabel
|
||||
OpStore %tint_return_flag %true
|
||||
%46 = OpSRem %v3int %lhs %16
|
||||
OpStore %tint_return_value %46
|
||||
OpBranch %39
|
||||
%39 = OpLabel
|
||||
%47 = OpLoad %v3int %tint_return_value
|
||||
OpReturnValue %47
|
||||
%8 = OpCompositeConstruct %v3int %rhs %rhs %rhs
|
||||
%11 = OpIEqual %v3bool %8 %10
|
||||
%16 = OpIEqual %v3bool %lhs %15
|
||||
%19 = OpIEqual %v3bool %8 %18
|
||||
%20 = OpLogicalAnd %v3bool %16 %19
|
||||
%21 = OpLogicalOr %v3bool %11 %20
|
||||
%9 = OpSelect %v3int %21 %23 %8
|
||||
%28 = OpBitwiseOr %v3int %lhs %9
|
||||
%25 = OpBitcast %v3uint %28
|
||||
%31 = OpBitwiseAnd %v3uint %25 %30
|
||||
%33 = OpINotEqual %v3bool %31 %32
|
||||
%24 = OpAny %bool %33
|
||||
OpSelectionMerge %34 None
|
||||
OpBranchConditional %24 %35 %36
|
||||
%35 = OpLabel
|
||||
%37 = OpSDiv %v3int %lhs %9
|
||||
%38 = OpIMul %v3int %37 %9
|
||||
%39 = OpISub %v3int %lhs %38
|
||||
OpReturnValue %39
|
||||
%36 = OpLabel
|
||||
%40 = OpSRem %v3int %lhs %9
|
||||
OpReturnValue %40
|
||||
%34 = OpLabel
|
||||
OpReturnValue %10
|
||||
OpFunctionEnd
|
||||
%f = OpFunction %void None %48
|
||||
%51 = OpLabel
|
||||
%56 = OpFunctionCall %v3int %tint_mod %54 %55
|
||||
%f = OpFunction %void None %41
|
||||
%44 = OpLabel
|
||||
%49 = OpFunctionCall %v3int %tint_mod %47 %48
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
; SPIR-V
|
||||
; Version: 1.3
|
||||
; Generator: Google Tint Compiler; 0
|
||||
; Bound: 58
|
||||
; Bound: 51
|
||||
; Schema: 0
|
||||
OpCapability Shader
|
||||
OpMemoryModel Logical GLSL450
|
||||
@@ -10,75 +10,62 @@
|
||||
OpName %tint_mod "tint_mod"
|
||||
OpName %lhs "lhs"
|
||||
OpName %rhs "rhs"
|
||||
OpName %tint_return_flag "tint_return_flag"
|
||||
OpName %tint_return_value "tint_return_value"
|
||||
OpName %f "f"
|
||||
%int = OpTypeInt 32 1
|
||||
%v3int = OpTypeVector %int 3
|
||||
%1 = OpTypeFunction %v3int %v3int %v3int
|
||||
%9 = OpConstantNull %v3int
|
||||
%bool = OpTypeBool
|
||||
%_ptr_Function_bool = OpTypePointer Function %bool
|
||||
%11 = OpConstantNull %bool
|
||||
%_ptr_Function_v3int = OpTypePointer Function %v3int
|
||||
%14 = OpConstantNull %v3int
|
||||
%v3bool = OpTypeVector %bool 3
|
||||
%int_n2147483648 = OpConstant %int -2147483648
|
||||
%19 = OpConstantComposite %v3int %int_n2147483648 %int_n2147483648 %int_n2147483648
|
||||
%14 = OpConstantComposite %v3int %int_n2147483648 %int_n2147483648 %int_n2147483648
|
||||
%int_n1 = OpConstant %int -1
|
||||
%22 = OpConstantComposite %v3int %int_n1 %int_n1 %int_n1
|
||||
%17 = OpConstantComposite %v3int %int_n1 %int_n1 %int_n1
|
||||
%int_1 = OpConstant %int 1
|
||||
%27 = OpConstantComposite %v3int %int_1 %int_1 %int_1
|
||||
%22 = OpConstantComposite %v3int %int_1 %int_1 %int_1
|
||||
%uint = OpTypeInt 32 0
|
||||
%v3uint = OpTypeVector %uint 3
|
||||
%uint_2147483648 = OpConstant %uint 2147483648
|
||||
%34 = OpConstantComposite %v3uint %uint_2147483648 %uint_2147483648 %uint_2147483648
|
||||
%36 = OpConstantNull %v3uint
|
||||
%true = OpConstantTrue %bool
|
||||
%29 = OpConstantComposite %v3uint %uint_2147483648 %uint_2147483648 %uint_2147483648
|
||||
%31 = OpConstantNull %v3uint
|
||||
%void = OpTypeVoid
|
||||
%47 = OpTypeFunction %void
|
||||
%40 = OpTypeFunction %void
|
||||
%int_2 = OpConstant %int 2
|
||||
%int_3 = OpConstant %int 3
|
||||
%53 = OpConstantComposite %v3int %int_1 %int_2 %int_3
|
||||
%54 = OpConstantNull %int
|
||||
%46 = OpConstantComposite %v3int %int_1 %int_2 %int_3
|
||||
%47 = OpConstantNull %int
|
||||
%int_5 = OpConstant %int 5
|
||||
%56 = OpConstantComposite %v3int %54 %int_5 %54
|
||||
%49 = OpConstantComposite %v3int %47 %int_5 %47
|
||||
%tint_mod = OpFunction %v3int None %1
|
||||
%lhs = OpFunctionParameter %v3int
|
||||
%rhs = OpFunctionParameter %v3int
|
||||
%7 = OpLabel
|
||||
%tint_return_flag = OpVariable %_ptr_Function_bool Function %11
|
||||
%tint_return_value = OpVariable %_ptr_Function_v3int Function %14
|
||||
%16 = OpIEqual %v3bool %rhs %14
|
||||
%20 = OpIEqual %v3bool %lhs %19
|
||||
%23 = OpIEqual %v3bool %rhs %22
|
||||
%24 = OpLogicalAnd %v3bool %20 %23
|
||||
%25 = OpLogicalOr %v3bool %16 %24
|
||||
%15 = OpSelect %v3int %25 %27 %rhs
|
||||
%32 = OpBitwiseOr %v3int %lhs %15
|
||||
%29 = OpBitcast %v3uint %32
|
||||
%35 = OpBitwiseAnd %v3uint %29 %34
|
||||
%37 = OpINotEqual %v3bool %35 %36
|
||||
%28 = OpAny %bool %37
|
||||
OpSelectionMerge %38 None
|
||||
OpBranchConditional %28 %39 %40
|
||||
%39 = OpLabel
|
||||
OpStore %tint_return_flag %true
|
||||
%42 = OpSDiv %v3int %lhs %15
|
||||
%43 = OpIMul %v3int %42 %15
|
||||
%44 = OpISub %v3int %lhs %43
|
||||
OpStore %tint_return_value %44
|
||||
OpBranch %38
|
||||
%40 = OpLabel
|
||||
OpStore %tint_return_flag %true
|
||||
%45 = OpSRem %v3int %lhs %15
|
||||
OpStore %tint_return_value %45
|
||||
OpBranch %38
|
||||
%38 = OpLabel
|
||||
%46 = OpLoad %v3int %tint_return_value
|
||||
OpReturnValue %46
|
||||
%10 = OpIEqual %v3bool %rhs %9
|
||||
%15 = OpIEqual %v3bool %lhs %14
|
||||
%18 = OpIEqual %v3bool %rhs %17
|
||||
%19 = OpLogicalAnd %v3bool %15 %18
|
||||
%20 = OpLogicalOr %v3bool %10 %19
|
||||
%8 = OpSelect %v3int %20 %22 %rhs
|
||||
%27 = OpBitwiseOr %v3int %lhs %8
|
||||
%24 = OpBitcast %v3uint %27
|
||||
%30 = OpBitwiseAnd %v3uint %24 %29
|
||||
%32 = OpINotEqual %v3bool %30 %31
|
||||
%23 = OpAny %bool %32
|
||||
OpSelectionMerge %33 None
|
||||
OpBranchConditional %23 %34 %35
|
||||
%34 = OpLabel
|
||||
%36 = OpSDiv %v3int %lhs %8
|
||||
%37 = OpIMul %v3int %36 %8
|
||||
%38 = OpISub %v3int %lhs %37
|
||||
OpReturnValue %38
|
||||
%35 = OpLabel
|
||||
%39 = OpSRem %v3int %lhs %8
|
||||
OpReturnValue %39
|
||||
%33 = OpLabel
|
||||
OpReturnValue %9
|
||||
OpFunctionEnd
|
||||
%f = OpFunction %void None %47
|
||||
%50 = OpLabel
|
||||
%57 = OpFunctionCall %v3int %tint_mod %53 %56
|
||||
%f = OpFunction %void None %40
|
||||
%43 = OpLabel
|
||||
%50 = OpFunctionCall %v3int %tint_mod %46 %49
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
; SPIR-V
|
||||
; Version: 1.3
|
||||
; Generator: Google Tint Compiler; 0
|
||||
; Bound: 51
|
||||
; Bound: 45
|
||||
; Schema: 0
|
||||
OpCapability Shader
|
||||
OpMemoryModel Logical GLSL450
|
||||
@@ -10,71 +10,59 @@
|
||||
OpName %tint_mod "tint_mod"
|
||||
OpName %lhs "lhs"
|
||||
OpName %rhs "rhs"
|
||||
OpName %tint_return_flag "tint_return_flag"
|
||||
OpName %tint_return_value "tint_return_value"
|
||||
OpName %f "f"
|
||||
OpName %a "a"
|
||||
OpName %b "b"
|
||||
%int = OpTypeInt 32 1
|
||||
%1 = OpTypeFunction %int %int %int
|
||||
%8 = OpConstantNull %int
|
||||
%bool = OpTypeBool
|
||||
%_ptr_Function_bool = OpTypePointer Function %bool
|
||||
%10 = OpConstantNull %bool
|
||||
%_ptr_Function_int = OpTypePointer Function %int
|
||||
%13 = OpConstantNull %int
|
||||
%int_n2147483648 = OpConstant %int -2147483648
|
||||
%int_n1 = OpConstant %int -1
|
||||
%int_1 = OpConstant %int 1
|
||||
%uint = OpTypeInt 32 0
|
||||
%uint_2147483648 = OpConstant %uint 2147483648
|
||||
%29 = OpConstantNull %uint
|
||||
%true = OpConstantTrue %bool
|
||||
%24 = OpConstantNull %uint
|
||||
%void = OpTypeVoid
|
||||
%40 = OpTypeFunction %void
|
||||
%33 = OpTypeFunction %void
|
||||
%_ptr_Function_int = OpTypePointer Function %int
|
||||
%tint_mod = OpFunction %int None %1
|
||||
%lhs = OpFunctionParameter %int
|
||||
%rhs = OpFunctionParameter %int
|
||||
%6 = OpLabel
|
||||
%tint_return_flag = OpVariable %_ptr_Function_bool Function %10
|
||||
%tint_return_value = OpVariable %_ptr_Function_int Function %13
|
||||
%15 = OpIEqual %bool %rhs %13
|
||||
%17 = OpIEqual %bool %lhs %int_n2147483648
|
||||
%19 = OpIEqual %bool %rhs %int_n1
|
||||
%20 = OpLogicalAnd %bool %17 %19
|
||||
%21 = OpLogicalOr %bool %15 %20
|
||||
%14 = OpSelect %int %21 %int_1 %rhs
|
||||
%26 = OpBitwiseOr %int %lhs %14
|
||||
%24 = OpBitcast %uint %26
|
||||
%28 = OpBitwiseAnd %uint %24 %uint_2147483648
|
||||
%30 = OpINotEqual %bool %28 %29
|
||||
OpSelectionMerge %31 None
|
||||
OpBranchConditional %30 %32 %33
|
||||
%32 = OpLabel
|
||||
OpStore %tint_return_flag %true
|
||||
%35 = OpSDiv %int %lhs %14
|
||||
%36 = OpIMul %int %35 %14
|
||||
%37 = OpISub %int %lhs %36
|
||||
OpStore %tint_return_value %37
|
||||
OpBranch %31
|
||||
%33 = OpLabel
|
||||
OpStore %tint_return_flag %true
|
||||
%38 = OpSRem %int %lhs %14
|
||||
OpStore %tint_return_value %38
|
||||
OpBranch %31
|
||||
%31 = OpLabel
|
||||
%39 = OpLoad %int %tint_return_value
|
||||
OpReturnValue %39
|
||||
%9 = OpIEqual %bool %rhs %8
|
||||
%12 = OpIEqual %bool %lhs %int_n2147483648
|
||||
%14 = OpIEqual %bool %rhs %int_n1
|
||||
%15 = OpLogicalAnd %bool %12 %14
|
||||
%16 = OpLogicalOr %bool %9 %15
|
||||
%7 = OpSelect %int %16 %int_1 %rhs
|
||||
%21 = OpBitwiseOr %int %lhs %7
|
||||
%19 = OpBitcast %uint %21
|
||||
%23 = OpBitwiseAnd %uint %19 %uint_2147483648
|
||||
%25 = OpINotEqual %bool %23 %24
|
||||
OpSelectionMerge %26 None
|
||||
OpBranchConditional %25 %27 %28
|
||||
%27 = OpLabel
|
||||
%29 = OpSDiv %int %lhs %7
|
||||
%30 = OpIMul %int %29 %7
|
||||
%31 = OpISub %int %lhs %30
|
||||
OpReturnValue %31
|
||||
%28 = OpLabel
|
||||
%32 = OpSRem %int %lhs %7
|
||||
OpReturnValue %32
|
||||
%26 = OpLabel
|
||||
OpReturnValue %8
|
||||
OpFunctionEnd
|
||||
%f = OpFunction %void None %40
|
||||
%43 = OpLabel
|
||||
%a = OpVariable %_ptr_Function_int Function %13
|
||||
%b = OpVariable %_ptr_Function_int Function %13
|
||||
%f = OpFunction %void None %33
|
||||
%36 = OpLabel
|
||||
%a = OpVariable %_ptr_Function_int Function %8
|
||||
%b = OpVariable %_ptr_Function_int Function %8
|
||||
OpStore %a %int_1
|
||||
OpStore %b %13
|
||||
%47 = OpLoad %int %a
|
||||
%48 = OpLoad %int %b
|
||||
%49 = OpLoad %int %b
|
||||
%50 = OpIAdd %int %48 %49
|
||||
%46 = OpFunctionCall %int %tint_mod %47 %50
|
||||
OpStore %b %8
|
||||
%41 = OpLoad %int %a
|
||||
%42 = OpLoad %int %b
|
||||
%43 = OpLoad %int %b
|
||||
%44 = OpIAdd %int %42 %43
|
||||
%40 = OpFunctionCall %int %tint_mod %41 %44
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
; SPIR-V
|
||||
; Version: 1.3
|
||||
; Generator: Google Tint Compiler; 0
|
||||
; Bound: 64
|
||||
; Bound: 58
|
||||
; Schema: 0
|
||||
OpCapability Shader
|
||||
OpMemoryModel Logical GLSL450
|
||||
@@ -10,85 +10,73 @@
|
||||
OpName %tint_mod "tint_mod"
|
||||
OpName %lhs "lhs"
|
||||
OpName %rhs "rhs"
|
||||
OpName %tint_return_flag "tint_return_flag"
|
||||
OpName %tint_return_value "tint_return_value"
|
||||
OpName %f "f"
|
||||
OpName %a "a"
|
||||
OpName %b "b"
|
||||
%int = OpTypeInt 32 1
|
||||
%v3int = OpTypeVector %int 3
|
||||
%1 = OpTypeFunction %v3int %int %v3int
|
||||
%10 = OpConstantNull %v3int
|
||||
%bool = OpTypeBool
|
||||
%_ptr_Function_bool = OpTypePointer Function %bool
|
||||
%11 = OpConstantNull %bool
|
||||
%_ptr_Function_v3int = OpTypePointer Function %v3int
|
||||
%14 = OpConstantNull %v3int
|
||||
%v3bool = OpTypeVector %bool 3
|
||||
%int_n2147483648 = OpConstant %int -2147483648
|
||||
%20 = OpConstantComposite %v3int %int_n2147483648 %int_n2147483648 %int_n2147483648
|
||||
%15 = OpConstantComposite %v3int %int_n2147483648 %int_n2147483648 %int_n2147483648
|
||||
%int_n1 = OpConstant %int -1
|
||||
%23 = OpConstantComposite %v3int %int_n1 %int_n1 %int_n1
|
||||
%18 = OpConstantComposite %v3int %int_n1 %int_n1 %int_n1
|
||||
%int_1 = OpConstant %int 1
|
||||
%28 = OpConstantComposite %v3int %int_1 %int_1 %int_1
|
||||
%23 = OpConstantComposite %v3int %int_1 %int_1 %int_1
|
||||
%uint = OpTypeInt 32 0
|
||||
%v3uint = OpTypeVector %uint 3
|
||||
%uint_2147483648 = OpConstant %uint 2147483648
|
||||
%35 = OpConstantComposite %v3uint %uint_2147483648 %uint_2147483648 %uint_2147483648
|
||||
%37 = OpConstantNull %v3uint
|
||||
%true = OpConstantTrue %bool
|
||||
%30 = OpConstantComposite %v3uint %uint_2147483648 %uint_2147483648 %uint_2147483648
|
||||
%32 = OpConstantNull %v3uint
|
||||
%void = OpTypeVoid
|
||||
%48 = OpTypeFunction %void
|
||||
%41 = OpTypeFunction %void
|
||||
%int_4 = OpConstant %int 4
|
||||
%_ptr_Function_int = OpTypePointer Function %int
|
||||
%55 = OpConstantNull %int
|
||||
%48 = OpConstantNull %int
|
||||
%int_2 = OpConstant %int 2
|
||||
%57 = OpConstantComposite %v3int %55 %int_2 %55
|
||||
%50 = OpConstantComposite %v3int %48 %int_2 %48
|
||||
%_ptr_Function_v3int = OpTypePointer Function %v3int
|
||||
%tint_mod = OpFunction %v3int None %1
|
||||
%lhs = OpFunctionParameter %int
|
||||
%rhs = OpFunctionParameter %v3int
|
||||
%7 = OpLabel
|
||||
%tint_return_flag = OpVariable %_ptr_Function_bool Function %11
|
||||
%tint_return_value = OpVariable %_ptr_Function_v3int Function %14
|
||||
%15 = OpCompositeConstruct %v3int %lhs %lhs %lhs
|
||||
%17 = OpIEqual %v3bool %rhs %14
|
||||
%21 = OpIEqual %v3bool %15 %20
|
||||
%24 = OpIEqual %v3bool %rhs %23
|
||||
%25 = OpLogicalAnd %v3bool %21 %24
|
||||
%26 = OpLogicalOr %v3bool %17 %25
|
||||
%16 = OpSelect %v3int %26 %28 %rhs
|
||||
%33 = OpBitwiseOr %v3int %15 %16
|
||||
%30 = OpBitcast %v3uint %33
|
||||
%36 = OpBitwiseAnd %v3uint %30 %35
|
||||
%38 = OpINotEqual %v3bool %36 %37
|
||||
%29 = OpAny %bool %38
|
||||
OpSelectionMerge %39 None
|
||||
OpBranchConditional %29 %40 %41
|
||||
%40 = OpLabel
|
||||
OpStore %tint_return_flag %true
|
||||
%43 = OpSDiv %v3int %15 %16
|
||||
%44 = OpIMul %v3int %43 %16
|
||||
%45 = OpISub %v3int %15 %44
|
||||
OpStore %tint_return_value %45
|
||||
OpBranch %39
|
||||
%41 = OpLabel
|
||||
OpStore %tint_return_flag %true
|
||||
%46 = OpSRem %v3int %15 %16
|
||||
OpStore %tint_return_value %46
|
||||
OpBranch %39
|
||||
%39 = OpLabel
|
||||
%47 = OpLoad %v3int %tint_return_value
|
||||
OpReturnValue %47
|
||||
%8 = OpCompositeConstruct %v3int %lhs %lhs %lhs
|
||||
%11 = OpIEqual %v3bool %rhs %10
|
||||
%16 = OpIEqual %v3bool %8 %15
|
||||
%19 = OpIEqual %v3bool %rhs %18
|
||||
%20 = OpLogicalAnd %v3bool %16 %19
|
||||
%21 = OpLogicalOr %v3bool %11 %20
|
||||
%9 = OpSelect %v3int %21 %23 %rhs
|
||||
%28 = OpBitwiseOr %v3int %8 %9
|
||||
%25 = OpBitcast %v3uint %28
|
||||
%31 = OpBitwiseAnd %v3uint %25 %30
|
||||
%33 = OpINotEqual %v3bool %31 %32
|
||||
%24 = OpAny %bool %33
|
||||
OpSelectionMerge %34 None
|
||||
OpBranchConditional %24 %35 %36
|
||||
%35 = OpLabel
|
||||
%37 = OpSDiv %v3int %8 %9
|
||||
%38 = OpIMul %v3int %37 %9
|
||||
%39 = OpISub %v3int %8 %38
|
||||
OpReturnValue %39
|
||||
%36 = OpLabel
|
||||
%40 = OpSRem %v3int %8 %9
|
||||
OpReturnValue %40
|
||||
%34 = OpLabel
|
||||
OpReturnValue %10
|
||||
OpFunctionEnd
|
||||
%f = OpFunction %void None %48
|
||||
%51 = OpLabel
|
||||
%a = OpVariable %_ptr_Function_int Function %55
|
||||
%b = OpVariable %_ptr_Function_v3int Function %14
|
||||
%f = OpFunction %void None %41
|
||||
%44 = OpLabel
|
||||
%a = OpVariable %_ptr_Function_int Function %48
|
||||
%b = OpVariable %_ptr_Function_v3int Function %10
|
||||
OpStore %a %int_4
|
||||
OpStore %b %57
|
||||
%60 = OpLoad %int %a
|
||||
%61 = OpLoad %v3int %b
|
||||
%62 = OpLoad %v3int %b
|
||||
%63 = OpIAdd %v3int %61 %62
|
||||
%59 = OpFunctionCall %v3int %tint_mod %60 %63
|
||||
OpStore %b %50
|
||||
%54 = OpLoad %int %a
|
||||
%55 = OpLoad %v3int %b
|
||||
%56 = OpLoad %v3int %b
|
||||
%57 = OpIAdd %v3int %55 %56
|
||||
%53 = OpFunctionCall %v3int %tint_mod %54 %57
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
; SPIR-V
|
||||
; Version: 1.3
|
||||
; Generator: Google Tint Compiler; 0
|
||||
; Bound: 64
|
||||
; Bound: 58
|
||||
; Schema: 0
|
||||
OpCapability Shader
|
||||
OpMemoryModel Logical GLSL450
|
||||
@@ -10,85 +10,73 @@
|
||||
OpName %tint_mod "tint_mod"
|
||||
OpName %lhs "lhs"
|
||||
OpName %rhs "rhs"
|
||||
OpName %tint_return_flag "tint_return_flag"
|
||||
OpName %tint_return_value "tint_return_value"
|
||||
OpName %f "f"
|
||||
OpName %a "a"
|
||||
OpName %b "b"
|
||||
%int = OpTypeInt 32 1
|
||||
%v3int = OpTypeVector %int 3
|
||||
%1 = OpTypeFunction %v3int %v3int %int
|
||||
%10 = OpConstantNull %v3int
|
||||
%bool = OpTypeBool
|
||||
%_ptr_Function_bool = OpTypePointer Function %bool
|
||||
%11 = OpConstantNull %bool
|
||||
%_ptr_Function_v3int = OpTypePointer Function %v3int
|
||||
%14 = OpConstantNull %v3int
|
||||
%v3bool = OpTypeVector %bool 3
|
||||
%int_n2147483648 = OpConstant %int -2147483648
|
||||
%20 = OpConstantComposite %v3int %int_n2147483648 %int_n2147483648 %int_n2147483648
|
||||
%15 = OpConstantComposite %v3int %int_n2147483648 %int_n2147483648 %int_n2147483648
|
||||
%int_n1 = OpConstant %int -1
|
||||
%23 = OpConstantComposite %v3int %int_n1 %int_n1 %int_n1
|
||||
%18 = OpConstantComposite %v3int %int_n1 %int_n1 %int_n1
|
||||
%int_1 = OpConstant %int 1
|
||||
%28 = OpConstantComposite %v3int %int_1 %int_1 %int_1
|
||||
%23 = OpConstantComposite %v3int %int_1 %int_1 %int_1
|
||||
%uint = OpTypeInt 32 0
|
||||
%v3uint = OpTypeVector %uint 3
|
||||
%uint_2147483648 = OpConstant %uint 2147483648
|
||||
%35 = OpConstantComposite %v3uint %uint_2147483648 %uint_2147483648 %uint_2147483648
|
||||
%37 = OpConstantNull %v3uint
|
||||
%true = OpConstantTrue %bool
|
||||
%30 = OpConstantComposite %v3uint %uint_2147483648 %uint_2147483648 %uint_2147483648
|
||||
%32 = OpConstantNull %v3uint
|
||||
%void = OpTypeVoid
|
||||
%48 = OpTypeFunction %void
|
||||
%41 = OpTypeFunction %void
|
||||
%int_2 = OpConstant %int 2
|
||||
%int_3 = OpConstant %int 3
|
||||
%54 = OpConstantComposite %v3int %int_1 %int_2 %int_3
|
||||
%56 = OpConstantNull %int
|
||||
%47 = OpConstantComposite %v3int %int_1 %int_2 %int_3
|
||||
%_ptr_Function_v3int = OpTypePointer Function %v3int
|
||||
%50 = OpConstantNull %int
|
||||
%_ptr_Function_int = OpTypePointer Function %int
|
||||
%tint_mod = OpFunction %v3int None %1
|
||||
%lhs = OpFunctionParameter %v3int
|
||||
%rhs = OpFunctionParameter %int
|
||||
%7 = OpLabel
|
||||
%tint_return_flag = OpVariable %_ptr_Function_bool Function %11
|
||||
%tint_return_value = OpVariable %_ptr_Function_v3int Function %14
|
||||
%15 = OpCompositeConstruct %v3int %rhs %rhs %rhs
|
||||
%17 = OpIEqual %v3bool %15 %14
|
||||
%21 = OpIEqual %v3bool %lhs %20
|
||||
%24 = OpIEqual %v3bool %15 %23
|
||||
%25 = OpLogicalAnd %v3bool %21 %24
|
||||
%26 = OpLogicalOr %v3bool %17 %25
|
||||
%16 = OpSelect %v3int %26 %28 %15
|
||||
%33 = OpBitwiseOr %v3int %lhs %16
|
||||
%30 = OpBitcast %v3uint %33
|
||||
%36 = OpBitwiseAnd %v3uint %30 %35
|
||||
%38 = OpINotEqual %v3bool %36 %37
|
||||
%29 = OpAny %bool %38
|
||||
OpSelectionMerge %39 None
|
||||
OpBranchConditional %29 %40 %41
|
||||
%40 = OpLabel
|
||||
OpStore %tint_return_flag %true
|
||||
%43 = OpSDiv %v3int %lhs %16
|
||||
%44 = OpIMul %v3int %43 %16
|
||||
%45 = OpISub %v3int %lhs %44
|
||||
OpStore %tint_return_value %45
|
||||
OpBranch %39
|
||||
%41 = OpLabel
|
||||
OpStore %tint_return_flag %true
|
||||
%46 = OpSRem %v3int %lhs %16
|
||||
OpStore %tint_return_value %46
|
||||
OpBranch %39
|
||||
%39 = OpLabel
|
||||
%47 = OpLoad %v3int %tint_return_value
|
||||
OpReturnValue %47
|
||||
%8 = OpCompositeConstruct %v3int %rhs %rhs %rhs
|
||||
%11 = OpIEqual %v3bool %8 %10
|
||||
%16 = OpIEqual %v3bool %lhs %15
|
||||
%19 = OpIEqual %v3bool %8 %18
|
||||
%20 = OpLogicalAnd %v3bool %16 %19
|
||||
%21 = OpLogicalOr %v3bool %11 %20
|
||||
%9 = OpSelect %v3int %21 %23 %8
|
||||
%28 = OpBitwiseOr %v3int %lhs %9
|
||||
%25 = OpBitcast %v3uint %28
|
||||
%31 = OpBitwiseAnd %v3uint %25 %30
|
||||
%33 = OpINotEqual %v3bool %31 %32
|
||||
%24 = OpAny %bool %33
|
||||
OpSelectionMerge %34 None
|
||||
OpBranchConditional %24 %35 %36
|
||||
%35 = OpLabel
|
||||
%37 = OpSDiv %v3int %lhs %9
|
||||
%38 = OpIMul %v3int %37 %9
|
||||
%39 = OpISub %v3int %lhs %38
|
||||
OpReturnValue %39
|
||||
%36 = OpLabel
|
||||
%40 = OpSRem %v3int %lhs %9
|
||||
OpReturnValue %40
|
||||
%34 = OpLabel
|
||||
OpReturnValue %10
|
||||
OpFunctionEnd
|
||||
%f = OpFunction %void None %48
|
||||
%51 = OpLabel
|
||||
%a = OpVariable %_ptr_Function_v3int Function %14
|
||||
%b = OpVariable %_ptr_Function_int Function %56
|
||||
OpStore %a %54
|
||||
OpStore %b %56
|
||||
%60 = OpLoad %v3int %a
|
||||
%61 = OpLoad %int %b
|
||||
%62 = OpLoad %int %b
|
||||
%63 = OpIAdd %int %61 %62
|
||||
%59 = OpFunctionCall %v3int %tint_mod %60 %63
|
||||
%f = OpFunction %void None %41
|
||||
%44 = OpLabel
|
||||
%a = OpVariable %_ptr_Function_v3int Function %10
|
||||
%b = OpVariable %_ptr_Function_int Function %50
|
||||
OpStore %a %47
|
||||
OpStore %b %50
|
||||
%54 = OpLoad %v3int %a
|
||||
%55 = OpLoad %int %b
|
||||
%56 = OpLoad %int %b
|
||||
%57 = OpIAdd %int %55 %56
|
||||
%53 = OpFunctionCall %v3int %tint_mod %54 %57
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
; SPIR-V
|
||||
; Version: 1.3
|
||||
; Generator: Google Tint Compiler; 0
|
||||
; Bound: 64
|
||||
; Bound: 58
|
||||
; Schema: 0
|
||||
OpCapability Shader
|
||||
OpMemoryModel Logical GLSL450
|
||||
@@ -10,85 +10,73 @@
|
||||
OpName %tint_mod "tint_mod"
|
||||
OpName %lhs "lhs"
|
||||
OpName %rhs "rhs"
|
||||
OpName %tint_return_flag "tint_return_flag"
|
||||
OpName %tint_return_value "tint_return_value"
|
||||
OpName %f "f"
|
||||
OpName %a "a"
|
||||
OpName %b "b"
|
||||
%int = OpTypeInt 32 1
|
||||
%v3int = OpTypeVector %int 3
|
||||
%1 = OpTypeFunction %v3int %v3int %v3int
|
||||
%9 = OpConstantNull %v3int
|
||||
%bool = OpTypeBool
|
||||
%_ptr_Function_bool = OpTypePointer Function %bool
|
||||
%11 = OpConstantNull %bool
|
||||
%_ptr_Function_v3int = OpTypePointer Function %v3int
|
||||
%14 = OpConstantNull %v3int
|
||||
%v3bool = OpTypeVector %bool 3
|
||||
%int_n2147483648 = OpConstant %int -2147483648
|
||||
%19 = OpConstantComposite %v3int %int_n2147483648 %int_n2147483648 %int_n2147483648
|
||||
%14 = OpConstantComposite %v3int %int_n2147483648 %int_n2147483648 %int_n2147483648
|
||||
%int_n1 = OpConstant %int -1
|
||||
%22 = OpConstantComposite %v3int %int_n1 %int_n1 %int_n1
|
||||
%17 = OpConstantComposite %v3int %int_n1 %int_n1 %int_n1
|
||||
%int_1 = OpConstant %int 1
|
||||
%27 = OpConstantComposite %v3int %int_1 %int_1 %int_1
|
||||
%22 = OpConstantComposite %v3int %int_1 %int_1 %int_1
|
||||
%uint = OpTypeInt 32 0
|
||||
%v3uint = OpTypeVector %uint 3
|
||||
%uint_2147483648 = OpConstant %uint 2147483648
|
||||
%34 = OpConstantComposite %v3uint %uint_2147483648 %uint_2147483648 %uint_2147483648
|
||||
%36 = OpConstantNull %v3uint
|
||||
%true = OpConstantTrue %bool
|
||||
%29 = OpConstantComposite %v3uint %uint_2147483648 %uint_2147483648 %uint_2147483648
|
||||
%31 = OpConstantNull %v3uint
|
||||
%void = OpTypeVoid
|
||||
%47 = OpTypeFunction %void
|
||||
%40 = OpTypeFunction %void
|
||||
%int_2 = OpConstant %int 2
|
||||
%int_3 = OpConstant %int 3
|
||||
%53 = OpConstantComposite %v3int %int_1 %int_2 %int_3
|
||||
%55 = OpConstantNull %int
|
||||
%46 = OpConstantComposite %v3int %int_1 %int_2 %int_3
|
||||
%_ptr_Function_v3int = OpTypePointer Function %v3int
|
||||
%49 = OpConstantNull %int
|
||||
%int_5 = OpConstant %int 5
|
||||
%57 = OpConstantComposite %v3int %55 %int_5 %55
|
||||
%51 = OpConstantComposite %v3int %49 %int_5 %49
|
||||
%tint_mod = OpFunction %v3int None %1
|
||||
%lhs = OpFunctionParameter %v3int
|
||||
%rhs = OpFunctionParameter %v3int
|
||||
%7 = OpLabel
|
||||
%tint_return_flag = OpVariable %_ptr_Function_bool Function %11
|
||||
%tint_return_value = OpVariable %_ptr_Function_v3int Function %14
|
||||
%16 = OpIEqual %v3bool %rhs %14
|
||||
%20 = OpIEqual %v3bool %lhs %19
|
||||
%23 = OpIEqual %v3bool %rhs %22
|
||||
%24 = OpLogicalAnd %v3bool %20 %23
|
||||
%25 = OpLogicalOr %v3bool %16 %24
|
||||
%15 = OpSelect %v3int %25 %27 %rhs
|
||||
%32 = OpBitwiseOr %v3int %lhs %15
|
||||
%29 = OpBitcast %v3uint %32
|
||||
%35 = OpBitwiseAnd %v3uint %29 %34
|
||||
%37 = OpINotEqual %v3bool %35 %36
|
||||
%28 = OpAny %bool %37
|
||||
OpSelectionMerge %38 None
|
||||
OpBranchConditional %28 %39 %40
|
||||
%39 = OpLabel
|
||||
OpStore %tint_return_flag %true
|
||||
%42 = OpSDiv %v3int %lhs %15
|
||||
%43 = OpIMul %v3int %42 %15
|
||||
%44 = OpISub %v3int %lhs %43
|
||||
OpStore %tint_return_value %44
|
||||
OpBranch %38
|
||||
%40 = OpLabel
|
||||
OpStore %tint_return_flag %true
|
||||
%45 = OpSRem %v3int %lhs %15
|
||||
OpStore %tint_return_value %45
|
||||
OpBranch %38
|
||||
%38 = OpLabel
|
||||
%46 = OpLoad %v3int %tint_return_value
|
||||
OpReturnValue %46
|
||||
%10 = OpIEqual %v3bool %rhs %9
|
||||
%15 = OpIEqual %v3bool %lhs %14
|
||||
%18 = OpIEqual %v3bool %rhs %17
|
||||
%19 = OpLogicalAnd %v3bool %15 %18
|
||||
%20 = OpLogicalOr %v3bool %10 %19
|
||||
%8 = OpSelect %v3int %20 %22 %rhs
|
||||
%27 = OpBitwiseOr %v3int %lhs %8
|
||||
%24 = OpBitcast %v3uint %27
|
||||
%30 = OpBitwiseAnd %v3uint %24 %29
|
||||
%32 = OpINotEqual %v3bool %30 %31
|
||||
%23 = OpAny %bool %32
|
||||
OpSelectionMerge %33 None
|
||||
OpBranchConditional %23 %34 %35
|
||||
%34 = OpLabel
|
||||
%36 = OpSDiv %v3int %lhs %8
|
||||
%37 = OpIMul %v3int %36 %8
|
||||
%38 = OpISub %v3int %lhs %37
|
||||
OpReturnValue %38
|
||||
%35 = OpLabel
|
||||
%39 = OpSRem %v3int %lhs %8
|
||||
OpReturnValue %39
|
||||
%33 = OpLabel
|
||||
OpReturnValue %9
|
||||
OpFunctionEnd
|
||||
%f = OpFunction %void None %47
|
||||
%50 = OpLabel
|
||||
%a = OpVariable %_ptr_Function_v3int Function %14
|
||||
%b = OpVariable %_ptr_Function_v3int Function %14
|
||||
OpStore %a %53
|
||||
OpStore %b %57
|
||||
%60 = OpLoad %v3int %a
|
||||
%61 = OpLoad %v3int %b
|
||||
%62 = OpLoad %v3int %b
|
||||
%63 = OpIAdd %v3int %61 %62
|
||||
%59 = OpFunctionCall %v3int %tint_mod %60 %63
|
||||
%f = OpFunction %void None %40
|
||||
%43 = OpLabel
|
||||
%a = OpVariable %_ptr_Function_v3int Function %9
|
||||
%b = OpVariable %_ptr_Function_v3int Function %9
|
||||
OpStore %a %46
|
||||
OpStore %b %51
|
||||
%54 = OpLoad %v3int %a
|
||||
%55 = OpLoad %v3int %b
|
||||
%56 = OpLoad %v3int %b
|
||||
%57 = OpIAdd %v3int %55 %56
|
||||
%53 = OpFunctionCall %v3int %tint_mod %54 %57
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
; SPIR-V
|
||||
; Version: 1.3
|
||||
; Generator: Google Tint Compiler; 0
|
||||
; Bound: 49
|
||||
; Bound: 43
|
||||
; Schema: 0
|
||||
OpCapability Shader
|
||||
OpMemoryModel Logical GLSL450
|
||||
@@ -10,69 +10,57 @@
|
||||
OpName %tint_mod "tint_mod"
|
||||
OpName %lhs "lhs"
|
||||
OpName %rhs "rhs"
|
||||
OpName %tint_return_flag "tint_return_flag"
|
||||
OpName %tint_return_value "tint_return_value"
|
||||
OpName %f "f"
|
||||
OpName %a "a"
|
||||
OpName %b "b"
|
||||
%int = OpTypeInt 32 1
|
||||
%1 = OpTypeFunction %int %int %int
|
||||
%8 = OpConstantNull %int
|
||||
%bool = OpTypeBool
|
||||
%_ptr_Function_bool = OpTypePointer Function %bool
|
||||
%10 = OpConstantNull %bool
|
||||
%_ptr_Function_int = OpTypePointer Function %int
|
||||
%13 = OpConstantNull %int
|
||||
%int_n2147483648 = OpConstant %int -2147483648
|
||||
%int_n1 = OpConstant %int -1
|
||||
%int_1 = OpConstant %int 1
|
||||
%uint = OpTypeInt 32 0
|
||||
%uint_2147483648 = OpConstant %uint 2147483648
|
||||
%29 = OpConstantNull %uint
|
||||
%true = OpConstantTrue %bool
|
||||
%24 = OpConstantNull %uint
|
||||
%void = OpTypeVoid
|
||||
%40 = OpTypeFunction %void
|
||||
%33 = OpTypeFunction %void
|
||||
%_ptr_Function_int = OpTypePointer Function %int
|
||||
%tint_mod = OpFunction %int None %1
|
||||
%lhs = OpFunctionParameter %int
|
||||
%rhs = OpFunctionParameter %int
|
||||
%6 = OpLabel
|
||||
%tint_return_flag = OpVariable %_ptr_Function_bool Function %10
|
||||
%tint_return_value = OpVariable %_ptr_Function_int Function %13
|
||||
%15 = OpIEqual %bool %rhs %13
|
||||
%17 = OpIEqual %bool %lhs %int_n2147483648
|
||||
%19 = OpIEqual %bool %rhs %int_n1
|
||||
%20 = OpLogicalAnd %bool %17 %19
|
||||
%21 = OpLogicalOr %bool %15 %20
|
||||
%14 = OpSelect %int %21 %int_1 %rhs
|
||||
%26 = OpBitwiseOr %int %lhs %14
|
||||
%24 = OpBitcast %uint %26
|
||||
%28 = OpBitwiseAnd %uint %24 %uint_2147483648
|
||||
%30 = OpINotEqual %bool %28 %29
|
||||
OpSelectionMerge %31 None
|
||||
OpBranchConditional %30 %32 %33
|
||||
%32 = OpLabel
|
||||
OpStore %tint_return_flag %true
|
||||
%35 = OpSDiv %int %lhs %14
|
||||
%36 = OpIMul %int %35 %14
|
||||
%37 = OpISub %int %lhs %36
|
||||
OpStore %tint_return_value %37
|
||||
OpBranch %31
|
||||
%33 = OpLabel
|
||||
OpStore %tint_return_flag %true
|
||||
%38 = OpSRem %int %lhs %14
|
||||
OpStore %tint_return_value %38
|
||||
OpBranch %31
|
||||
%31 = OpLabel
|
||||
%39 = OpLoad %int %tint_return_value
|
||||
OpReturnValue %39
|
||||
%9 = OpIEqual %bool %rhs %8
|
||||
%12 = OpIEqual %bool %lhs %int_n2147483648
|
||||
%14 = OpIEqual %bool %rhs %int_n1
|
||||
%15 = OpLogicalAnd %bool %12 %14
|
||||
%16 = OpLogicalOr %bool %9 %15
|
||||
%7 = OpSelect %int %16 %int_1 %rhs
|
||||
%21 = OpBitwiseOr %int %lhs %7
|
||||
%19 = OpBitcast %uint %21
|
||||
%23 = OpBitwiseAnd %uint %19 %uint_2147483648
|
||||
%25 = OpINotEqual %bool %23 %24
|
||||
OpSelectionMerge %26 None
|
||||
OpBranchConditional %25 %27 %28
|
||||
%27 = OpLabel
|
||||
%29 = OpSDiv %int %lhs %7
|
||||
%30 = OpIMul %int %29 %7
|
||||
%31 = OpISub %int %lhs %30
|
||||
OpReturnValue %31
|
||||
%28 = OpLabel
|
||||
%32 = OpSRem %int %lhs %7
|
||||
OpReturnValue %32
|
||||
%26 = OpLabel
|
||||
OpReturnValue %8
|
||||
OpFunctionEnd
|
||||
%f = OpFunction %void None %40
|
||||
%43 = OpLabel
|
||||
%a = OpVariable %_ptr_Function_int Function %13
|
||||
%b = OpVariable %_ptr_Function_int Function %13
|
||||
%f = OpFunction %void None %33
|
||||
%36 = OpLabel
|
||||
%a = OpVariable %_ptr_Function_int Function %8
|
||||
%b = OpVariable %_ptr_Function_int Function %8
|
||||
OpStore %a %int_1
|
||||
OpStore %b %13
|
||||
%47 = OpLoad %int %a
|
||||
%48 = OpLoad %int %b
|
||||
%46 = OpFunctionCall %int %tint_mod %47 %48
|
||||
OpStore %b %8
|
||||
%41 = OpLoad %int %a
|
||||
%42 = OpLoad %int %b
|
||||
%40 = OpFunctionCall %int %tint_mod %41 %42
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
; SPIR-V
|
||||
; Version: 1.3
|
||||
; Generator: Google Tint Compiler; 0
|
||||
; Bound: 62
|
||||
; Bound: 56
|
||||
; Schema: 0
|
||||
OpCapability Shader
|
||||
OpMemoryModel Logical GLSL450
|
||||
@@ -10,83 +10,71 @@
|
||||
OpName %tint_mod "tint_mod"
|
||||
OpName %lhs "lhs"
|
||||
OpName %rhs "rhs"
|
||||
OpName %tint_return_flag "tint_return_flag"
|
||||
OpName %tint_return_value "tint_return_value"
|
||||
OpName %f "f"
|
||||
OpName %a "a"
|
||||
OpName %b "b"
|
||||
%int = OpTypeInt 32 1
|
||||
%v3int = OpTypeVector %int 3
|
||||
%1 = OpTypeFunction %v3int %int %v3int
|
||||
%10 = OpConstantNull %v3int
|
||||
%bool = OpTypeBool
|
||||
%_ptr_Function_bool = OpTypePointer Function %bool
|
||||
%11 = OpConstantNull %bool
|
||||
%_ptr_Function_v3int = OpTypePointer Function %v3int
|
||||
%14 = OpConstantNull %v3int
|
||||
%v3bool = OpTypeVector %bool 3
|
||||
%int_n2147483648 = OpConstant %int -2147483648
|
||||
%20 = OpConstantComposite %v3int %int_n2147483648 %int_n2147483648 %int_n2147483648
|
||||
%15 = OpConstantComposite %v3int %int_n2147483648 %int_n2147483648 %int_n2147483648
|
||||
%int_n1 = OpConstant %int -1
|
||||
%23 = OpConstantComposite %v3int %int_n1 %int_n1 %int_n1
|
||||
%18 = OpConstantComposite %v3int %int_n1 %int_n1 %int_n1
|
||||
%int_1 = OpConstant %int 1
|
||||
%28 = OpConstantComposite %v3int %int_1 %int_1 %int_1
|
||||
%23 = OpConstantComposite %v3int %int_1 %int_1 %int_1
|
||||
%uint = OpTypeInt 32 0
|
||||
%v3uint = OpTypeVector %uint 3
|
||||
%uint_2147483648 = OpConstant %uint 2147483648
|
||||
%35 = OpConstantComposite %v3uint %uint_2147483648 %uint_2147483648 %uint_2147483648
|
||||
%37 = OpConstantNull %v3uint
|
||||
%true = OpConstantTrue %bool
|
||||
%30 = OpConstantComposite %v3uint %uint_2147483648 %uint_2147483648 %uint_2147483648
|
||||
%32 = OpConstantNull %v3uint
|
||||
%void = OpTypeVoid
|
||||
%48 = OpTypeFunction %void
|
||||
%41 = OpTypeFunction %void
|
||||
%int_4 = OpConstant %int 4
|
||||
%_ptr_Function_int = OpTypePointer Function %int
|
||||
%55 = OpConstantNull %int
|
||||
%48 = OpConstantNull %int
|
||||
%int_2 = OpConstant %int 2
|
||||
%57 = OpConstantComposite %v3int %55 %int_2 %55
|
||||
%50 = OpConstantComposite %v3int %48 %int_2 %48
|
||||
%_ptr_Function_v3int = OpTypePointer Function %v3int
|
||||
%tint_mod = OpFunction %v3int None %1
|
||||
%lhs = OpFunctionParameter %int
|
||||
%rhs = OpFunctionParameter %v3int
|
||||
%7 = OpLabel
|
||||
%tint_return_flag = OpVariable %_ptr_Function_bool Function %11
|
||||
%tint_return_value = OpVariable %_ptr_Function_v3int Function %14
|
||||
%15 = OpCompositeConstruct %v3int %lhs %lhs %lhs
|
||||
%17 = OpIEqual %v3bool %rhs %14
|
||||
%21 = OpIEqual %v3bool %15 %20
|
||||
%24 = OpIEqual %v3bool %rhs %23
|
||||
%25 = OpLogicalAnd %v3bool %21 %24
|
||||
%26 = OpLogicalOr %v3bool %17 %25
|
||||
%16 = OpSelect %v3int %26 %28 %rhs
|
||||
%33 = OpBitwiseOr %v3int %15 %16
|
||||
%30 = OpBitcast %v3uint %33
|
||||
%36 = OpBitwiseAnd %v3uint %30 %35
|
||||
%38 = OpINotEqual %v3bool %36 %37
|
||||
%29 = OpAny %bool %38
|
||||
OpSelectionMerge %39 None
|
||||
OpBranchConditional %29 %40 %41
|
||||
%40 = OpLabel
|
||||
OpStore %tint_return_flag %true
|
||||
%43 = OpSDiv %v3int %15 %16
|
||||
%44 = OpIMul %v3int %43 %16
|
||||
%45 = OpISub %v3int %15 %44
|
||||
OpStore %tint_return_value %45
|
||||
OpBranch %39
|
||||
%41 = OpLabel
|
||||
OpStore %tint_return_flag %true
|
||||
%46 = OpSRem %v3int %15 %16
|
||||
OpStore %tint_return_value %46
|
||||
OpBranch %39
|
||||
%39 = OpLabel
|
||||
%47 = OpLoad %v3int %tint_return_value
|
||||
OpReturnValue %47
|
||||
%8 = OpCompositeConstruct %v3int %lhs %lhs %lhs
|
||||
%11 = OpIEqual %v3bool %rhs %10
|
||||
%16 = OpIEqual %v3bool %8 %15
|
||||
%19 = OpIEqual %v3bool %rhs %18
|
||||
%20 = OpLogicalAnd %v3bool %16 %19
|
||||
%21 = OpLogicalOr %v3bool %11 %20
|
||||
%9 = OpSelect %v3int %21 %23 %rhs
|
||||
%28 = OpBitwiseOr %v3int %8 %9
|
||||
%25 = OpBitcast %v3uint %28
|
||||
%31 = OpBitwiseAnd %v3uint %25 %30
|
||||
%33 = OpINotEqual %v3bool %31 %32
|
||||
%24 = OpAny %bool %33
|
||||
OpSelectionMerge %34 None
|
||||
OpBranchConditional %24 %35 %36
|
||||
%35 = OpLabel
|
||||
%37 = OpSDiv %v3int %8 %9
|
||||
%38 = OpIMul %v3int %37 %9
|
||||
%39 = OpISub %v3int %8 %38
|
||||
OpReturnValue %39
|
||||
%36 = OpLabel
|
||||
%40 = OpSRem %v3int %8 %9
|
||||
OpReturnValue %40
|
||||
%34 = OpLabel
|
||||
OpReturnValue %10
|
||||
OpFunctionEnd
|
||||
%f = OpFunction %void None %48
|
||||
%51 = OpLabel
|
||||
%a = OpVariable %_ptr_Function_int Function %55
|
||||
%b = OpVariable %_ptr_Function_v3int Function %14
|
||||
%f = OpFunction %void None %41
|
||||
%44 = OpLabel
|
||||
%a = OpVariable %_ptr_Function_int Function %48
|
||||
%b = OpVariable %_ptr_Function_v3int Function %10
|
||||
OpStore %a %int_4
|
||||
OpStore %b %57
|
||||
%60 = OpLoad %int %a
|
||||
%61 = OpLoad %v3int %b
|
||||
%59 = OpFunctionCall %v3int %tint_mod %60 %61
|
||||
OpStore %b %50
|
||||
%54 = OpLoad %int %a
|
||||
%55 = OpLoad %v3int %b
|
||||
%53 = OpFunctionCall %v3int %tint_mod %54 %55
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
; SPIR-V
|
||||
; Version: 1.3
|
||||
; Generator: Google Tint Compiler; 0
|
||||
; Bound: 62
|
||||
; Bound: 56
|
||||
; Schema: 0
|
||||
OpCapability Shader
|
||||
OpMemoryModel Logical GLSL450
|
||||
@@ -10,83 +10,71 @@
|
||||
OpName %tint_mod "tint_mod"
|
||||
OpName %lhs "lhs"
|
||||
OpName %rhs "rhs"
|
||||
OpName %tint_return_flag "tint_return_flag"
|
||||
OpName %tint_return_value "tint_return_value"
|
||||
OpName %f "f"
|
||||
OpName %a "a"
|
||||
OpName %b "b"
|
||||
%int = OpTypeInt 32 1
|
||||
%v3int = OpTypeVector %int 3
|
||||
%1 = OpTypeFunction %v3int %v3int %int
|
||||
%10 = OpConstantNull %v3int
|
||||
%bool = OpTypeBool
|
||||
%_ptr_Function_bool = OpTypePointer Function %bool
|
||||
%11 = OpConstantNull %bool
|
||||
%_ptr_Function_v3int = OpTypePointer Function %v3int
|
||||
%14 = OpConstantNull %v3int
|
||||
%v3bool = OpTypeVector %bool 3
|
||||
%int_n2147483648 = OpConstant %int -2147483648
|
||||
%20 = OpConstantComposite %v3int %int_n2147483648 %int_n2147483648 %int_n2147483648
|
||||
%15 = OpConstantComposite %v3int %int_n2147483648 %int_n2147483648 %int_n2147483648
|
||||
%int_n1 = OpConstant %int -1
|
||||
%23 = OpConstantComposite %v3int %int_n1 %int_n1 %int_n1
|
||||
%18 = OpConstantComposite %v3int %int_n1 %int_n1 %int_n1
|
||||
%int_1 = OpConstant %int 1
|
||||
%28 = OpConstantComposite %v3int %int_1 %int_1 %int_1
|
||||
%23 = OpConstantComposite %v3int %int_1 %int_1 %int_1
|
||||
%uint = OpTypeInt 32 0
|
||||
%v3uint = OpTypeVector %uint 3
|
||||
%uint_2147483648 = OpConstant %uint 2147483648
|
||||
%35 = OpConstantComposite %v3uint %uint_2147483648 %uint_2147483648 %uint_2147483648
|
||||
%37 = OpConstantNull %v3uint
|
||||
%true = OpConstantTrue %bool
|
||||
%30 = OpConstantComposite %v3uint %uint_2147483648 %uint_2147483648 %uint_2147483648
|
||||
%32 = OpConstantNull %v3uint
|
||||
%void = OpTypeVoid
|
||||
%48 = OpTypeFunction %void
|
||||
%41 = OpTypeFunction %void
|
||||
%int_2 = OpConstant %int 2
|
||||
%int_3 = OpConstant %int 3
|
||||
%54 = OpConstantComposite %v3int %int_1 %int_2 %int_3
|
||||
%56 = OpConstantNull %int
|
||||
%47 = OpConstantComposite %v3int %int_1 %int_2 %int_3
|
||||
%_ptr_Function_v3int = OpTypePointer Function %v3int
|
||||
%50 = OpConstantNull %int
|
||||
%_ptr_Function_int = OpTypePointer Function %int
|
||||
%tint_mod = OpFunction %v3int None %1
|
||||
%lhs = OpFunctionParameter %v3int
|
||||
%rhs = OpFunctionParameter %int
|
||||
%7 = OpLabel
|
||||
%tint_return_flag = OpVariable %_ptr_Function_bool Function %11
|
||||
%tint_return_value = OpVariable %_ptr_Function_v3int Function %14
|
||||
%15 = OpCompositeConstruct %v3int %rhs %rhs %rhs
|
||||
%17 = OpIEqual %v3bool %15 %14
|
||||
%21 = OpIEqual %v3bool %lhs %20
|
||||
%24 = OpIEqual %v3bool %15 %23
|
||||
%25 = OpLogicalAnd %v3bool %21 %24
|
||||
%26 = OpLogicalOr %v3bool %17 %25
|
||||
%16 = OpSelect %v3int %26 %28 %15
|
||||
%33 = OpBitwiseOr %v3int %lhs %16
|
||||
%30 = OpBitcast %v3uint %33
|
||||
%36 = OpBitwiseAnd %v3uint %30 %35
|
||||
%38 = OpINotEqual %v3bool %36 %37
|
||||
%29 = OpAny %bool %38
|
||||
OpSelectionMerge %39 None
|
||||
OpBranchConditional %29 %40 %41
|
||||
%40 = OpLabel
|
||||
OpStore %tint_return_flag %true
|
||||
%43 = OpSDiv %v3int %lhs %16
|
||||
%44 = OpIMul %v3int %43 %16
|
||||
%45 = OpISub %v3int %lhs %44
|
||||
OpStore %tint_return_value %45
|
||||
OpBranch %39
|
||||
%41 = OpLabel
|
||||
OpStore %tint_return_flag %true
|
||||
%46 = OpSRem %v3int %lhs %16
|
||||
OpStore %tint_return_value %46
|
||||
OpBranch %39
|
||||
%39 = OpLabel
|
||||
%47 = OpLoad %v3int %tint_return_value
|
||||
OpReturnValue %47
|
||||
%8 = OpCompositeConstruct %v3int %rhs %rhs %rhs
|
||||
%11 = OpIEqual %v3bool %8 %10
|
||||
%16 = OpIEqual %v3bool %lhs %15
|
||||
%19 = OpIEqual %v3bool %8 %18
|
||||
%20 = OpLogicalAnd %v3bool %16 %19
|
||||
%21 = OpLogicalOr %v3bool %11 %20
|
||||
%9 = OpSelect %v3int %21 %23 %8
|
||||
%28 = OpBitwiseOr %v3int %lhs %9
|
||||
%25 = OpBitcast %v3uint %28
|
||||
%31 = OpBitwiseAnd %v3uint %25 %30
|
||||
%33 = OpINotEqual %v3bool %31 %32
|
||||
%24 = OpAny %bool %33
|
||||
OpSelectionMerge %34 None
|
||||
OpBranchConditional %24 %35 %36
|
||||
%35 = OpLabel
|
||||
%37 = OpSDiv %v3int %lhs %9
|
||||
%38 = OpIMul %v3int %37 %9
|
||||
%39 = OpISub %v3int %lhs %38
|
||||
OpReturnValue %39
|
||||
%36 = OpLabel
|
||||
%40 = OpSRem %v3int %lhs %9
|
||||
OpReturnValue %40
|
||||
%34 = OpLabel
|
||||
OpReturnValue %10
|
||||
OpFunctionEnd
|
||||
%f = OpFunction %void None %48
|
||||
%51 = OpLabel
|
||||
%a = OpVariable %_ptr_Function_v3int Function %14
|
||||
%b = OpVariable %_ptr_Function_int Function %56
|
||||
OpStore %a %54
|
||||
OpStore %b %56
|
||||
%60 = OpLoad %v3int %a
|
||||
%61 = OpLoad %int %b
|
||||
%59 = OpFunctionCall %v3int %tint_mod %60 %61
|
||||
%f = OpFunction %void None %41
|
||||
%44 = OpLabel
|
||||
%a = OpVariable %_ptr_Function_v3int Function %10
|
||||
%b = OpVariable %_ptr_Function_int Function %50
|
||||
OpStore %a %47
|
||||
OpStore %b %50
|
||||
%54 = OpLoad %v3int %a
|
||||
%55 = OpLoad %int %b
|
||||
%53 = OpFunctionCall %v3int %tint_mod %54 %55
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
; SPIR-V
|
||||
; Version: 1.3
|
||||
; Generator: Google Tint Compiler; 0
|
||||
; Bound: 62
|
||||
; Bound: 56
|
||||
; Schema: 0
|
||||
OpCapability Shader
|
||||
OpMemoryModel Logical GLSL450
|
||||
@@ -10,83 +10,71 @@
|
||||
OpName %tint_mod "tint_mod"
|
||||
OpName %lhs "lhs"
|
||||
OpName %rhs "rhs"
|
||||
OpName %tint_return_flag "tint_return_flag"
|
||||
OpName %tint_return_value "tint_return_value"
|
||||
OpName %f "f"
|
||||
OpName %a "a"
|
||||
OpName %b "b"
|
||||
%int = OpTypeInt 32 1
|
||||
%v3int = OpTypeVector %int 3
|
||||
%1 = OpTypeFunction %v3int %v3int %v3int
|
||||
%9 = OpConstantNull %v3int
|
||||
%bool = OpTypeBool
|
||||
%_ptr_Function_bool = OpTypePointer Function %bool
|
||||
%11 = OpConstantNull %bool
|
||||
%_ptr_Function_v3int = OpTypePointer Function %v3int
|
||||
%14 = OpConstantNull %v3int
|
||||
%v3bool = OpTypeVector %bool 3
|
||||
%int_n2147483648 = OpConstant %int -2147483648
|
||||
%19 = OpConstantComposite %v3int %int_n2147483648 %int_n2147483648 %int_n2147483648
|
||||
%14 = OpConstantComposite %v3int %int_n2147483648 %int_n2147483648 %int_n2147483648
|
||||
%int_n1 = OpConstant %int -1
|
||||
%22 = OpConstantComposite %v3int %int_n1 %int_n1 %int_n1
|
||||
%17 = OpConstantComposite %v3int %int_n1 %int_n1 %int_n1
|
||||
%int_1 = OpConstant %int 1
|
||||
%27 = OpConstantComposite %v3int %int_1 %int_1 %int_1
|
||||
%22 = OpConstantComposite %v3int %int_1 %int_1 %int_1
|
||||
%uint = OpTypeInt 32 0
|
||||
%v3uint = OpTypeVector %uint 3
|
||||
%uint_2147483648 = OpConstant %uint 2147483648
|
||||
%34 = OpConstantComposite %v3uint %uint_2147483648 %uint_2147483648 %uint_2147483648
|
||||
%36 = OpConstantNull %v3uint
|
||||
%true = OpConstantTrue %bool
|
||||
%29 = OpConstantComposite %v3uint %uint_2147483648 %uint_2147483648 %uint_2147483648
|
||||
%31 = OpConstantNull %v3uint
|
||||
%void = OpTypeVoid
|
||||
%47 = OpTypeFunction %void
|
||||
%40 = OpTypeFunction %void
|
||||
%int_2 = OpConstant %int 2
|
||||
%int_3 = OpConstant %int 3
|
||||
%53 = OpConstantComposite %v3int %int_1 %int_2 %int_3
|
||||
%55 = OpConstantNull %int
|
||||
%46 = OpConstantComposite %v3int %int_1 %int_2 %int_3
|
||||
%_ptr_Function_v3int = OpTypePointer Function %v3int
|
||||
%49 = OpConstantNull %int
|
||||
%int_5 = OpConstant %int 5
|
||||
%57 = OpConstantComposite %v3int %55 %int_5 %55
|
||||
%51 = OpConstantComposite %v3int %49 %int_5 %49
|
||||
%tint_mod = OpFunction %v3int None %1
|
||||
%lhs = OpFunctionParameter %v3int
|
||||
%rhs = OpFunctionParameter %v3int
|
||||
%7 = OpLabel
|
||||
%tint_return_flag = OpVariable %_ptr_Function_bool Function %11
|
||||
%tint_return_value = OpVariable %_ptr_Function_v3int Function %14
|
||||
%16 = OpIEqual %v3bool %rhs %14
|
||||
%20 = OpIEqual %v3bool %lhs %19
|
||||
%23 = OpIEqual %v3bool %rhs %22
|
||||
%24 = OpLogicalAnd %v3bool %20 %23
|
||||
%25 = OpLogicalOr %v3bool %16 %24
|
||||
%15 = OpSelect %v3int %25 %27 %rhs
|
||||
%32 = OpBitwiseOr %v3int %lhs %15
|
||||
%29 = OpBitcast %v3uint %32
|
||||
%35 = OpBitwiseAnd %v3uint %29 %34
|
||||
%37 = OpINotEqual %v3bool %35 %36
|
||||
%28 = OpAny %bool %37
|
||||
OpSelectionMerge %38 None
|
||||
OpBranchConditional %28 %39 %40
|
||||
%39 = OpLabel
|
||||
OpStore %tint_return_flag %true
|
||||
%42 = OpSDiv %v3int %lhs %15
|
||||
%43 = OpIMul %v3int %42 %15
|
||||
%44 = OpISub %v3int %lhs %43
|
||||
OpStore %tint_return_value %44
|
||||
OpBranch %38
|
||||
%40 = OpLabel
|
||||
OpStore %tint_return_flag %true
|
||||
%45 = OpSRem %v3int %lhs %15
|
||||
OpStore %tint_return_value %45
|
||||
OpBranch %38
|
||||
%38 = OpLabel
|
||||
%46 = OpLoad %v3int %tint_return_value
|
||||
OpReturnValue %46
|
||||
%10 = OpIEqual %v3bool %rhs %9
|
||||
%15 = OpIEqual %v3bool %lhs %14
|
||||
%18 = OpIEqual %v3bool %rhs %17
|
||||
%19 = OpLogicalAnd %v3bool %15 %18
|
||||
%20 = OpLogicalOr %v3bool %10 %19
|
||||
%8 = OpSelect %v3int %20 %22 %rhs
|
||||
%27 = OpBitwiseOr %v3int %lhs %8
|
||||
%24 = OpBitcast %v3uint %27
|
||||
%30 = OpBitwiseAnd %v3uint %24 %29
|
||||
%32 = OpINotEqual %v3bool %30 %31
|
||||
%23 = OpAny %bool %32
|
||||
OpSelectionMerge %33 None
|
||||
OpBranchConditional %23 %34 %35
|
||||
%34 = OpLabel
|
||||
%36 = OpSDiv %v3int %lhs %8
|
||||
%37 = OpIMul %v3int %36 %8
|
||||
%38 = OpISub %v3int %lhs %37
|
||||
OpReturnValue %38
|
||||
%35 = OpLabel
|
||||
%39 = OpSRem %v3int %lhs %8
|
||||
OpReturnValue %39
|
||||
%33 = OpLabel
|
||||
OpReturnValue %9
|
||||
OpFunctionEnd
|
||||
%f = OpFunction %void None %47
|
||||
%50 = OpLabel
|
||||
%a = OpVariable %_ptr_Function_v3int Function %14
|
||||
%b = OpVariable %_ptr_Function_v3int Function %14
|
||||
OpStore %a %53
|
||||
OpStore %b %57
|
||||
%60 = OpLoad %v3int %a
|
||||
%61 = OpLoad %v3int %b
|
||||
%59 = OpFunctionCall %v3int %tint_mod %60 %61
|
||||
%f = OpFunction %void None %40
|
||||
%43 = OpLabel
|
||||
%a = OpVariable %_ptr_Function_v3int Function %9
|
||||
%b = OpVariable %_ptr_Function_v3int Function %9
|
||||
OpStore %a %46
|
||||
OpStore %b %51
|
||||
%54 = OpLoad %v3int %a
|
||||
%55 = OpLoad %v3int %b
|
||||
%53 = OpFunctionCall %v3int %tint_mod %54 %55
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
|
||||
Reference in New Issue
Block a user