mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-12-10 14:08:04 +00:00
tint/writer/spirv: Inline constant expressions
This is required to handle materialized values, and for constant expressions. Bug: tint:1504 Change-Id: If0a49e9b03566c06aa6e4e4c284fc427e1541e91 Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/92082 Reviewed-by: Dan Sinclair <dsinclair@chromium.org> Kokoro: Kokoro <noreply+kokoro@google.com> Commit-Queue: Ben Clayton <bclayton@chromium.org>
This commit is contained in:
committed by
Dawn LUCI CQ
parent
609ce6de8d
commit
8e3485248e
@@ -1,7 +1,7 @@
|
||||
; SPIR-V
|
||||
; Version: 1.3
|
||||
; Generator: Google Tint Compiler; 0
|
||||
; Bound: 72
|
||||
; Bound: 71
|
||||
; Schema: 0
|
||||
OpCapability Shader
|
||||
OpMemoryModel Logical GLSL450
|
||||
@@ -37,9 +37,8 @@
|
||||
%v2b = OpVariable %_ptr_Private_v2bool Private %20
|
||||
%void = OpTypeVoid
|
||||
%21 = OpTypeFunction %void
|
||||
%int_0 = OpConstant %int 0
|
||||
%25 = OpConstantNull %int
|
||||
%_ptr_Function_int = OpTypePointer Function %int
|
||||
%28 = OpConstantNull %int
|
||||
%int_2 = OpConstant %int 2
|
||||
%_ptr_Private_float = OpTypePointer Private %float
|
||||
%float_1 = OpConstant %float 1
|
||||
@@ -51,66 +50,66 @@
|
||||
%true = OpConstantTrue %bool
|
||||
%foo = OpFunction %void None %21
|
||||
%24 = OpLabel
|
||||
%i = OpVariable %_ptr_Function_int Function %28
|
||||
OpStore %i %int_0
|
||||
OpBranch %29
|
||||
%29 = OpLabel
|
||||
OpLoopMerge %30 %31 None
|
||||
OpBranch %32
|
||||
%32 = OpLabel
|
||||
%34 = OpLoad %int %i
|
||||
%36 = OpSLessThan %bool %34 %int_2
|
||||
%33 = OpLogicalNot %bool %36
|
||||
OpSelectionMerge %37 None
|
||||
OpBranchConditional %33 %38 %37
|
||||
%38 = OpLabel
|
||||
OpBranch %30
|
||||
%37 = OpLabel
|
||||
%39 = OpLoad %int %i
|
||||
%41 = OpAccessChain %_ptr_Private_float %v2f %39
|
||||
OpStore %41 %float_1
|
||||
%43 = OpLoad %int %i
|
||||
%45 = OpAccessChain %_ptr_Private_int %v3i %43
|
||||
OpStore %45 %int_1
|
||||
%47 = OpLoad %int %i
|
||||
%49 = OpAccessChain %_ptr_Private_uint %v4u %47
|
||||
OpStore %49 %uint_1
|
||||
%51 = OpLoad %int %i
|
||||
%53 = OpAccessChain %_ptr_Private_bool %v2b %51
|
||||
OpStore %53 %true
|
||||
%i = OpVariable %_ptr_Function_int Function %25
|
||||
OpStore %i %25
|
||||
OpBranch %28
|
||||
%28 = OpLabel
|
||||
OpLoopMerge %29 %30 None
|
||||
OpBranch %31
|
||||
%31 = OpLabel
|
||||
%55 = OpLoad %int %i
|
||||
%56 = OpIAdd %int %55 %int_1
|
||||
OpStore %i %56
|
||||
%33 = OpLoad %int %i
|
||||
%35 = OpSLessThan %bool %33 %int_2
|
||||
%32 = OpLogicalNot %bool %35
|
||||
OpSelectionMerge %36 None
|
||||
OpBranchConditional %32 %37 %36
|
||||
%37 = OpLabel
|
||||
OpBranch %29
|
||||
%36 = OpLabel
|
||||
%38 = OpLoad %int %i
|
||||
%40 = OpAccessChain %_ptr_Private_float %v2f %38
|
||||
OpStore %40 %float_1
|
||||
%42 = OpLoad %int %i
|
||||
%44 = OpAccessChain %_ptr_Private_int %v3i %42
|
||||
OpStore %44 %int_1
|
||||
%46 = OpLoad %int %i
|
||||
%48 = OpAccessChain %_ptr_Private_uint %v4u %46
|
||||
OpStore %48 %uint_1
|
||||
%50 = OpLoad %int %i
|
||||
%52 = OpAccessChain %_ptr_Private_bool %v2b %50
|
||||
OpStore %52 %true
|
||||
OpBranch %30
|
||||
%30 = OpLabel
|
||||
%54 = OpLoad %int %i
|
||||
%55 = OpIAdd %int %54 %int_1
|
||||
OpStore %i %55
|
||||
OpBranch %28
|
||||
%29 = OpLabel
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
%main = OpFunction %void None %21
|
||||
%58 = OpLabel
|
||||
%i_0 = OpVariable %_ptr_Function_int Function %28
|
||||
OpStore %i_0 %int_0
|
||||
OpBranch %60
|
||||
%60 = OpLabel
|
||||
OpLoopMerge %61 %62 None
|
||||
OpBranch %63
|
||||
%63 = OpLabel
|
||||
%65 = OpLoad %int %i_0
|
||||
%66 = OpSLessThan %bool %65 %int_2
|
||||
%64 = OpLogicalNot %bool %66
|
||||
OpSelectionMerge %67 None
|
||||
OpBranchConditional %64 %68 %67
|
||||
%68 = OpLabel
|
||||
OpBranch %61
|
||||
%67 = OpLabel
|
||||
%69 = OpFunctionCall %void %foo
|
||||
%57 = OpLabel
|
||||
%i_0 = OpVariable %_ptr_Function_int Function %25
|
||||
OpStore %i_0 %25
|
||||
OpBranch %59
|
||||
%59 = OpLabel
|
||||
OpLoopMerge %60 %61 None
|
||||
OpBranch %62
|
||||
%62 = OpLabel
|
||||
%70 = OpLoad %int %i_0
|
||||
%71 = OpIAdd %int %70 %int_1
|
||||
OpStore %i_0 %71
|
||||
%64 = OpLoad %int %i_0
|
||||
%65 = OpSLessThan %bool %64 %int_2
|
||||
%63 = OpLogicalNot %bool %65
|
||||
OpSelectionMerge %66 None
|
||||
OpBranchConditional %63 %67 %66
|
||||
%67 = OpLabel
|
||||
OpBranch %60
|
||||
%66 = OpLabel
|
||||
%68 = OpFunctionCall %void %foo
|
||||
OpBranch %61
|
||||
%61 = OpLabel
|
||||
%69 = OpLoad %int %i_0
|
||||
%70 = OpIAdd %int %69 %int_1
|
||||
OpStore %i_0 %70
|
||||
OpBranch %59
|
||||
%60 = OpLabel
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
; SPIR-V
|
||||
; Version: 1.3
|
||||
; Generator: Google Tint Compiler; 0
|
||||
; Bound: 61
|
||||
; Bound: 60
|
||||
; Schema: 0
|
||||
OpCapability Shader
|
||||
OpMemoryModel Logical GLSL450
|
||||
@@ -37,9 +37,8 @@
|
||||
%v2b = OpVariable %_ptr_Private_v2bool Private %20
|
||||
%void = OpTypeVoid
|
||||
%21 = OpTypeFunction %void
|
||||
%int_0 = OpConstant %int 0
|
||||
%25 = OpConstantNull %int
|
||||
%_ptr_Function_int = OpTypePointer Function %int
|
||||
%28 = OpConstantNull %int
|
||||
%_ptr_Private_float = OpTypePointer Private %float
|
||||
%float_1 = OpConstant %float 1
|
||||
%_ptr_Private_int = OpTypePointer Private %int
|
||||
@@ -51,46 +50,46 @@
|
||||
%int_2 = OpConstant %int 2
|
||||
%foo = OpFunction %void None %21
|
||||
%24 = OpLabel
|
||||
%i = OpVariable %_ptr_Function_int Function %28
|
||||
OpStore %i %int_0
|
||||
%29 = OpLoad %int %i
|
||||
%31 = OpAccessChain %_ptr_Private_float %v2f %29
|
||||
OpStore %31 %float_1
|
||||
%33 = OpLoad %int %i
|
||||
%35 = OpAccessChain %_ptr_Private_int %v3i %33
|
||||
OpStore %35 %int_1
|
||||
%37 = OpLoad %int %i
|
||||
%39 = OpAccessChain %_ptr_Private_uint %v4u %37
|
||||
OpStore %39 %uint_1
|
||||
%41 = OpLoad %int %i
|
||||
%43 = OpAccessChain %_ptr_Private_bool %v2b %41
|
||||
OpStore %43 %true
|
||||
%i = OpVariable %_ptr_Function_int Function %25
|
||||
OpStore %i %25
|
||||
%28 = OpLoad %int %i
|
||||
%30 = OpAccessChain %_ptr_Private_float %v2f %28
|
||||
OpStore %30 %float_1
|
||||
%32 = OpLoad %int %i
|
||||
%34 = OpAccessChain %_ptr_Private_int %v3i %32
|
||||
OpStore %34 %int_1
|
||||
%36 = OpLoad %int %i
|
||||
%38 = OpAccessChain %_ptr_Private_uint %v4u %36
|
||||
OpStore %38 %uint_1
|
||||
%40 = OpLoad %int %i
|
||||
%42 = OpAccessChain %_ptr_Private_bool %v2b %40
|
||||
OpStore %42 %true
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
%main = OpFunction %void None %21
|
||||
%46 = OpLabel
|
||||
%i_0 = OpVariable %_ptr_Function_int Function %28
|
||||
OpStore %i_0 %int_0
|
||||
OpBranch %48
|
||||
%48 = OpLabel
|
||||
OpLoopMerge %49 %50 None
|
||||
OpBranch %51
|
||||
%51 = OpLabel
|
||||
%53 = OpLoad %int %i_0
|
||||
%55 = OpSLessThan %bool %53 %int_2
|
||||
%52 = OpLogicalNot %bool %55
|
||||
OpSelectionMerge %56 None
|
||||
OpBranchConditional %52 %57 %56
|
||||
%57 = OpLabel
|
||||
OpBranch %49
|
||||
%56 = OpLabel
|
||||
%58 = OpFunctionCall %void %foo
|
||||
%45 = OpLabel
|
||||
%i_0 = OpVariable %_ptr_Function_int Function %25
|
||||
OpStore %i_0 %25
|
||||
OpBranch %47
|
||||
%47 = OpLabel
|
||||
OpLoopMerge %48 %49 None
|
||||
OpBranch %50
|
||||
%50 = OpLabel
|
||||
%59 = OpLoad %int %i_0
|
||||
%60 = OpIAdd %int %59 %int_1
|
||||
OpStore %i_0 %60
|
||||
%52 = OpLoad %int %i_0
|
||||
%54 = OpSLessThan %bool %52 %int_2
|
||||
%51 = OpLogicalNot %bool %54
|
||||
OpSelectionMerge %55 None
|
||||
OpBranchConditional %51 %56 %55
|
||||
%56 = OpLabel
|
||||
OpBranch %48
|
||||
%55 = OpLabel
|
||||
%57 = OpFunctionCall %void %foo
|
||||
OpBranch %49
|
||||
%49 = OpLabel
|
||||
%58 = OpLoad %int %i_0
|
||||
%59 = OpIAdd %int %58 %int_1
|
||||
OpStore %i_0 %59
|
||||
OpBranch %47
|
||||
%48 = OpLabel
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
; SPIR-V
|
||||
; Version: 1.3
|
||||
; Generator: Google Tint Compiler; 0
|
||||
; Bound: 104
|
||||
; Bound: 103
|
||||
; Schema: 0
|
||||
OpCapability Shader
|
||||
OpMemoryModel Logical GLSL450
|
||||
@@ -63,9 +63,8 @@
|
||||
%v4bool = OpTypeVector %bool 4
|
||||
%_ptr_Function_v4bool = OpTypePointer Function %v4bool
|
||||
%56 = OpConstantNull %v4bool
|
||||
%int_0 = OpConstant %int 0
|
||||
%57 = OpConstantNull %int
|
||||
%_ptr_Function_int = OpTypePointer Function %int
|
||||
%60 = OpConstantNull %int
|
||||
%int_2 = OpConstant %int 2
|
||||
%_ptr_Function_float = OpTypePointer Function %float
|
||||
%float_1 = OpConstant %float 1
|
||||
@@ -88,63 +87,63 @@
|
||||
%v2b = OpVariable %_ptr_Function_v2bool Function %48
|
||||
%v3b = OpVariable %_ptr_Function_v3bool Function %52
|
||||
%v4b = OpVariable %_ptr_Function_v4bool Function %56
|
||||
%i = OpVariable %_ptr_Function_int Function %60
|
||||
OpStore %i %int_0
|
||||
OpBranch %61
|
||||
%61 = OpLabel
|
||||
OpLoopMerge %62 %63 None
|
||||
OpBranch %64
|
||||
%64 = OpLabel
|
||||
%66 = OpLoad %int %i
|
||||
%68 = OpSLessThan %bool %66 %int_2
|
||||
%65 = OpLogicalNot %bool %68
|
||||
OpSelectionMerge %69 None
|
||||
OpBranchConditional %65 %70 %69
|
||||
%70 = OpLabel
|
||||
OpBranch %62
|
||||
%69 = OpLabel
|
||||
%71 = OpLoad %int %i
|
||||
%73 = OpAccessChain %_ptr_Function_float %v2f %71
|
||||
OpStore %73 %float_1
|
||||
%75 = OpLoad %int %i
|
||||
%76 = OpAccessChain %_ptr_Function_float %v3f %75
|
||||
OpStore %76 %float_1
|
||||
%77 = OpLoad %int %i
|
||||
%78 = OpAccessChain %_ptr_Function_float %v4f %77
|
||||
OpStore %78 %float_1
|
||||
%79 = OpLoad %int %i
|
||||
%80 = OpAccessChain %_ptr_Function_int %v2i %79
|
||||
OpStore %80 %int_1
|
||||
%82 = OpLoad %int %i
|
||||
%83 = OpAccessChain %_ptr_Function_int %v3i %82
|
||||
OpStore %83 %int_1
|
||||
%84 = OpLoad %int %i
|
||||
%85 = OpAccessChain %_ptr_Function_int %v4i %84
|
||||
OpStore %85 %int_1
|
||||
%86 = OpLoad %int %i
|
||||
%88 = OpAccessChain %_ptr_Function_uint %v2u %86
|
||||
OpStore %88 %uint_1
|
||||
%90 = OpLoad %int %i
|
||||
%91 = OpAccessChain %_ptr_Function_uint %v3u %90
|
||||
OpStore %91 %uint_1
|
||||
%92 = OpLoad %int %i
|
||||
%93 = OpAccessChain %_ptr_Function_uint %v4u %92
|
||||
OpStore %93 %uint_1
|
||||
%94 = OpLoad %int %i
|
||||
%96 = OpAccessChain %_ptr_Function_bool %v2b %94
|
||||
OpStore %96 %true
|
||||
%98 = OpLoad %int %i
|
||||
%99 = OpAccessChain %_ptr_Function_bool %v3b %98
|
||||
OpStore %99 %true
|
||||
%100 = OpLoad %int %i
|
||||
%101 = OpAccessChain %_ptr_Function_bool %v4b %100
|
||||
OpStore %101 %true
|
||||
%i = OpVariable %_ptr_Function_int Function %57
|
||||
OpStore %i %57
|
||||
OpBranch %60
|
||||
%60 = OpLabel
|
||||
OpLoopMerge %61 %62 None
|
||||
OpBranch %63
|
||||
%63 = OpLabel
|
||||
%102 = OpLoad %int %i
|
||||
%103 = OpIAdd %int %102 %int_1
|
||||
OpStore %i %103
|
||||
%65 = OpLoad %int %i
|
||||
%67 = OpSLessThan %bool %65 %int_2
|
||||
%64 = OpLogicalNot %bool %67
|
||||
OpSelectionMerge %68 None
|
||||
OpBranchConditional %64 %69 %68
|
||||
%69 = OpLabel
|
||||
OpBranch %61
|
||||
%68 = OpLabel
|
||||
%70 = OpLoad %int %i
|
||||
%72 = OpAccessChain %_ptr_Function_float %v2f %70
|
||||
OpStore %72 %float_1
|
||||
%74 = OpLoad %int %i
|
||||
%75 = OpAccessChain %_ptr_Function_float %v3f %74
|
||||
OpStore %75 %float_1
|
||||
%76 = OpLoad %int %i
|
||||
%77 = OpAccessChain %_ptr_Function_float %v4f %76
|
||||
OpStore %77 %float_1
|
||||
%78 = OpLoad %int %i
|
||||
%79 = OpAccessChain %_ptr_Function_int %v2i %78
|
||||
OpStore %79 %int_1
|
||||
%81 = OpLoad %int %i
|
||||
%82 = OpAccessChain %_ptr_Function_int %v3i %81
|
||||
OpStore %82 %int_1
|
||||
%83 = OpLoad %int %i
|
||||
%84 = OpAccessChain %_ptr_Function_int %v4i %83
|
||||
OpStore %84 %int_1
|
||||
%85 = OpLoad %int %i
|
||||
%87 = OpAccessChain %_ptr_Function_uint %v2u %85
|
||||
OpStore %87 %uint_1
|
||||
%89 = OpLoad %int %i
|
||||
%90 = OpAccessChain %_ptr_Function_uint %v3u %89
|
||||
OpStore %90 %uint_1
|
||||
%91 = OpLoad %int %i
|
||||
%92 = OpAccessChain %_ptr_Function_uint %v4u %91
|
||||
OpStore %92 %uint_1
|
||||
%93 = OpLoad %int %i
|
||||
%95 = OpAccessChain %_ptr_Function_bool %v2b %93
|
||||
OpStore %95 %true
|
||||
%97 = OpLoad %int %i
|
||||
%98 = OpAccessChain %_ptr_Function_bool %v3b %97
|
||||
OpStore %98 %true
|
||||
%99 = OpLoad %int %i
|
||||
%100 = OpAccessChain %_ptr_Function_bool %v4b %99
|
||||
OpStore %100 %true
|
||||
OpBranch %62
|
||||
%62 = OpLabel
|
||||
%101 = OpLoad %int %i
|
||||
%102 = OpIAdd %int %101 %int_1
|
||||
OpStore %i %102
|
||||
OpBranch %60
|
||||
%61 = OpLabel
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
; SPIR-V
|
||||
; Version: 1.3
|
||||
; Generator: Google Tint Compiler; 0
|
||||
; Bound: 68
|
||||
; Bound: 67
|
||||
; Schema: 0
|
||||
OpCapability Shader
|
||||
OpMemoryModel Logical GLSL450
|
||||
@@ -35,9 +35,8 @@
|
||||
%v2bool = OpTypeVector %bool 2
|
||||
%_ptr_Function_v2bool = OpTypePointer Function %v2bool
|
||||
%27 = OpConstantNull %v2bool
|
||||
%int_0 = OpConstant %int 0
|
||||
%29 = OpConstantNull %int
|
||||
%_ptr_Function_int = OpTypePointer Function %int
|
||||
%32 = OpConstantNull %int
|
||||
%int_2 = OpConstant %int 2
|
||||
%_ptr_Function_float = OpTypePointer Function %float
|
||||
%float_1 = OpConstant %float 1
|
||||
@@ -56,51 +55,51 @@
|
||||
%v4u_2 = OpVariable %_ptr_Function_v4uint Function %21
|
||||
%v2b = OpVariable %_ptr_Function_v2bool Function %27
|
||||
%v2b_2 = OpVariable %_ptr_Function_v2bool Function %27
|
||||
%i = OpVariable %_ptr_Function_int Function %32
|
||||
OpStore %i %int_0
|
||||
OpBranch %33
|
||||
%33 = OpLabel
|
||||
OpLoopMerge %34 %35 None
|
||||
OpBranch %36
|
||||
%36 = OpLabel
|
||||
%38 = OpLoad %int %i
|
||||
%40 = OpSLessThan %bool %38 %int_2
|
||||
%37 = OpLogicalNot %bool %40
|
||||
OpSelectionMerge %41 None
|
||||
OpBranchConditional %37 %42 %41
|
||||
%42 = OpLabel
|
||||
OpBranch %34
|
||||
%41 = OpLabel
|
||||
%43 = OpLoad %int %i
|
||||
%45 = OpAccessChain %_ptr_Function_float %v2f %43
|
||||
OpStore %45 %float_1
|
||||
%47 = OpLoad %int %i
|
||||
%48 = OpAccessChain %_ptr_Function_int %v3i %47
|
||||
OpStore %48 %int_1
|
||||
%50 = OpLoad %int %i
|
||||
%52 = OpAccessChain %_ptr_Function_uint %v4u %50
|
||||
OpStore %52 %uint_1
|
||||
%54 = OpLoad %int %i
|
||||
%56 = OpAccessChain %_ptr_Function_bool %v2b %54
|
||||
OpStore %56 %true
|
||||
%58 = OpLoad %int %i
|
||||
%59 = OpAccessChain %_ptr_Function_float %v2f_2 %58
|
||||
OpStore %59 %float_1
|
||||
%60 = OpLoad %int %i
|
||||
%61 = OpAccessChain %_ptr_Function_int %v3i_2 %60
|
||||
OpStore %61 %int_1
|
||||
%62 = OpLoad %int %i
|
||||
%63 = OpAccessChain %_ptr_Function_uint %v4u_2 %62
|
||||
OpStore %63 %uint_1
|
||||
%64 = OpLoad %int %i
|
||||
%65 = OpAccessChain %_ptr_Function_bool %v2b_2 %64
|
||||
OpStore %65 %true
|
||||
%i = OpVariable %_ptr_Function_int Function %29
|
||||
OpStore %i %29
|
||||
OpBranch %32
|
||||
%32 = OpLabel
|
||||
OpLoopMerge %33 %34 None
|
||||
OpBranch %35
|
||||
%35 = OpLabel
|
||||
%66 = OpLoad %int %i
|
||||
%67 = OpIAdd %int %66 %int_1
|
||||
OpStore %i %67
|
||||
%37 = OpLoad %int %i
|
||||
%39 = OpSLessThan %bool %37 %int_2
|
||||
%36 = OpLogicalNot %bool %39
|
||||
OpSelectionMerge %40 None
|
||||
OpBranchConditional %36 %41 %40
|
||||
%41 = OpLabel
|
||||
OpBranch %33
|
||||
%40 = OpLabel
|
||||
%42 = OpLoad %int %i
|
||||
%44 = OpAccessChain %_ptr_Function_float %v2f %42
|
||||
OpStore %44 %float_1
|
||||
%46 = OpLoad %int %i
|
||||
%47 = OpAccessChain %_ptr_Function_int %v3i %46
|
||||
OpStore %47 %int_1
|
||||
%49 = OpLoad %int %i
|
||||
%51 = OpAccessChain %_ptr_Function_uint %v4u %49
|
||||
OpStore %51 %uint_1
|
||||
%53 = OpLoad %int %i
|
||||
%55 = OpAccessChain %_ptr_Function_bool %v2b %53
|
||||
OpStore %55 %true
|
||||
%57 = OpLoad %int %i
|
||||
%58 = OpAccessChain %_ptr_Function_float %v2f_2 %57
|
||||
OpStore %58 %float_1
|
||||
%59 = OpLoad %int %i
|
||||
%60 = OpAccessChain %_ptr_Function_int %v3i_2 %59
|
||||
OpStore %60 %int_1
|
||||
%61 = OpLoad %int %i
|
||||
%62 = OpAccessChain %_ptr_Function_uint %v4u_2 %61
|
||||
OpStore %62 %uint_1
|
||||
%63 = OpLoad %int %i
|
||||
%64 = OpAccessChain %_ptr_Function_bool %v2b_2 %63
|
||||
OpStore %64 %true
|
||||
OpBranch %34
|
||||
%34 = OpLabel
|
||||
%65 = OpLoad %int %i
|
||||
%66 = OpIAdd %int %65 %int_1
|
||||
OpStore %i %66
|
||||
OpBranch %32
|
||||
%33 = OpLabel
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
; SPIR-V
|
||||
; Version: 1.3
|
||||
; Generator: Google Tint Compiler; 0
|
||||
; Bound: 105
|
||||
; Bound: 104
|
||||
; Schema: 0
|
||||
OpCapability Shader
|
||||
OpMemoryModel Logical GLSL450
|
||||
@@ -64,9 +64,8 @@
|
||||
%v4bool = OpTypeVector %bool 4
|
||||
%_ptr_Function_v4bool = OpTypePointer Function %v4bool
|
||||
%56 = OpConstantNull %v4bool
|
||||
%int_0 = OpConstant %int 0
|
||||
%57 = OpConstantNull %int
|
||||
%_ptr_Function_int = OpTypePointer Function %int
|
||||
%60 = OpConstantNull %int
|
||||
%int_2 = OpConstant %int 2
|
||||
%_ptr_Function_float = OpTypePointer Function %float
|
||||
%float_1 = OpConstant %float 1
|
||||
@@ -89,65 +88,65 @@
|
||||
%v2b = OpVariable %_ptr_Function_v2bool Function %48
|
||||
%v3b = OpVariable %_ptr_Function_v3bool Function %52
|
||||
%v4b = OpVariable %_ptr_Function_v4bool Function %56
|
||||
%i = OpVariable %_ptr_Function_int Function %60
|
||||
%i_0 = OpVariable %_ptr_Function_int Function %60
|
||||
OpStore %i %int_0
|
||||
OpBranch %61
|
||||
%61 = OpLabel
|
||||
OpLoopMerge %62 %63 None
|
||||
OpBranch %64
|
||||
%64 = OpLabel
|
||||
%66 = OpLoad %int %i
|
||||
%68 = OpSLessThan %bool %66 %int_2
|
||||
%65 = OpLogicalNot %bool %68
|
||||
OpSelectionMerge %69 None
|
||||
OpBranchConditional %65 %70 %69
|
||||
%70 = OpLabel
|
||||
OpBranch %62
|
||||
%69 = OpLabel
|
||||
%71 = OpLoad %int %i
|
||||
%73 = OpAccessChain %_ptr_Function_float %v2f %71
|
||||
OpStore %73 %float_1
|
||||
%75 = OpLoad %int %i
|
||||
%76 = OpAccessChain %_ptr_Function_int %v2i %75
|
||||
OpStore %76 %int_1
|
||||
%78 = OpLoad %int %i
|
||||
%80 = OpAccessChain %_ptr_Function_uint %v2u %78
|
||||
OpStore %80 %uint_1
|
||||
%82 = OpLoad %int %i
|
||||
%84 = OpAccessChain %_ptr_Function_bool %v2b %82
|
||||
OpStore %84 %true
|
||||
%i = OpVariable %_ptr_Function_int Function %57
|
||||
%i_0 = OpVariable %_ptr_Function_int Function %57
|
||||
OpStore %i %57
|
||||
OpBranch %60
|
||||
%60 = OpLabel
|
||||
OpLoopMerge %61 %62 None
|
||||
OpBranch %63
|
||||
%63 = OpLabel
|
||||
%86 = OpLoad %int %i
|
||||
%87 = OpIAdd %int %86 %int_1
|
||||
OpStore %i %87
|
||||
%65 = OpLoad %int %i
|
||||
%67 = OpSLessThan %bool %65 %int_2
|
||||
%64 = OpLogicalNot %bool %67
|
||||
OpSelectionMerge %68 None
|
||||
OpBranchConditional %64 %69 %68
|
||||
%69 = OpLabel
|
||||
OpBranch %61
|
||||
%68 = OpLabel
|
||||
%70 = OpLoad %int %i
|
||||
%72 = OpAccessChain %_ptr_Function_float %v2f %70
|
||||
OpStore %72 %float_1
|
||||
%74 = OpLoad %int %i
|
||||
%75 = OpAccessChain %_ptr_Function_int %v2i %74
|
||||
OpStore %75 %int_1
|
||||
%77 = OpLoad %int %i
|
||||
%79 = OpAccessChain %_ptr_Function_uint %v2u %77
|
||||
OpStore %79 %uint_1
|
||||
%81 = OpLoad %int %i
|
||||
%83 = OpAccessChain %_ptr_Function_bool %v2b %81
|
||||
OpStore %83 %true
|
||||
OpBranch %62
|
||||
%62 = OpLabel
|
||||
OpStore %i_0 %int_0
|
||||
%89 = OpLoad %int %i_0
|
||||
%90 = OpAccessChain %_ptr_Function_float %v3f %89
|
||||
OpStore %90 %float_1
|
||||
%91 = OpLoad %int %i_0
|
||||
%92 = OpAccessChain %_ptr_Function_float %v4f %91
|
||||
OpStore %92 %float_1
|
||||
%93 = OpLoad %int %i_0
|
||||
%94 = OpAccessChain %_ptr_Function_int %v3i %93
|
||||
OpStore %94 %int_1
|
||||
%95 = OpLoad %int %i_0
|
||||
%96 = OpAccessChain %_ptr_Function_int %v4i %95
|
||||
OpStore %96 %int_1
|
||||
%97 = OpLoad %int %i_0
|
||||
%98 = OpAccessChain %_ptr_Function_uint %v3u %97
|
||||
OpStore %98 %uint_1
|
||||
%99 = OpLoad %int %i_0
|
||||
%100 = OpAccessChain %_ptr_Function_uint %v4u %99
|
||||
OpStore %100 %uint_1
|
||||
%101 = OpLoad %int %i_0
|
||||
%102 = OpAccessChain %_ptr_Function_bool %v3b %101
|
||||
OpStore %102 %true
|
||||
%103 = OpLoad %int %i_0
|
||||
%104 = OpAccessChain %_ptr_Function_bool %v4b %103
|
||||
OpStore %104 %true
|
||||
%85 = OpLoad %int %i
|
||||
%86 = OpIAdd %int %85 %int_1
|
||||
OpStore %i %86
|
||||
OpBranch %60
|
||||
%61 = OpLabel
|
||||
OpStore %i_0 %57
|
||||
%88 = OpLoad %int %i_0
|
||||
%89 = OpAccessChain %_ptr_Function_float %v3f %88
|
||||
OpStore %89 %float_1
|
||||
%90 = OpLoad %int %i_0
|
||||
%91 = OpAccessChain %_ptr_Function_float %v4f %90
|
||||
OpStore %91 %float_1
|
||||
%92 = OpLoad %int %i_0
|
||||
%93 = OpAccessChain %_ptr_Function_int %v3i %92
|
||||
OpStore %93 %int_1
|
||||
%94 = OpLoad %int %i_0
|
||||
%95 = OpAccessChain %_ptr_Function_int %v4i %94
|
||||
OpStore %95 %int_1
|
||||
%96 = OpLoad %int %i_0
|
||||
%97 = OpAccessChain %_ptr_Function_uint %v3u %96
|
||||
OpStore %97 %uint_1
|
||||
%98 = OpLoad %int %i_0
|
||||
%99 = OpAccessChain %_ptr_Function_uint %v4u %98
|
||||
OpStore %99 %uint_1
|
||||
%100 = OpLoad %int %i_0
|
||||
%101 = OpAccessChain %_ptr_Function_bool %v3b %100
|
||||
OpStore %101 %true
|
||||
%102 = OpLoad %int %i_0
|
||||
%103 = OpAccessChain %_ptr_Function_bool %v4b %102
|
||||
OpStore %103 %true
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
; SPIR-V
|
||||
; Version: 1.3
|
||||
; Generator: Google Tint Compiler; 0
|
||||
; Bound: 92
|
||||
; Bound: 91
|
||||
; Schema: 0
|
||||
OpCapability Shader
|
||||
OpMemoryModel Logical GLSL450
|
||||
@@ -63,9 +63,8 @@
|
||||
%v4bool = OpTypeVector %bool 4
|
||||
%_ptr_Function_v4bool = OpTypePointer Function %v4bool
|
||||
%56 = OpConstantNull %v4bool
|
||||
%int_0 = OpConstant %int 0
|
||||
%57 = OpConstantNull %int
|
||||
%_ptr_Function_int = OpTypePointer Function %int
|
||||
%60 = OpConstantNull %int
|
||||
%_ptr_Function_float = OpTypePointer Function %float
|
||||
%float_1 = OpConstant %float 1
|
||||
%int_1 = OpConstant %int 1
|
||||
@@ -87,43 +86,43 @@
|
||||
%v2b = OpVariable %_ptr_Function_v2bool Function %48
|
||||
%v3b = OpVariable %_ptr_Function_v3bool Function %52
|
||||
%v4b = OpVariable %_ptr_Function_v4bool Function %56
|
||||
%i = OpVariable %_ptr_Function_int Function %60
|
||||
OpStore %i %int_0
|
||||
%61 = OpLoad %int %i
|
||||
%63 = OpAccessChain %_ptr_Function_float %v2f %61
|
||||
OpStore %63 %float_1
|
||||
%65 = OpLoad %int %i
|
||||
%66 = OpAccessChain %_ptr_Function_float %v3f %65
|
||||
OpStore %66 %float_1
|
||||
%67 = OpLoad %int %i
|
||||
%68 = OpAccessChain %_ptr_Function_float %v4f %67
|
||||
OpStore %68 %float_1
|
||||
%69 = OpLoad %int %i
|
||||
%70 = OpAccessChain %_ptr_Function_int %v2i %69
|
||||
OpStore %70 %int_1
|
||||
%72 = OpLoad %int %i
|
||||
%73 = OpAccessChain %_ptr_Function_int %v3i %72
|
||||
OpStore %73 %int_1
|
||||
%74 = OpLoad %int %i
|
||||
%75 = OpAccessChain %_ptr_Function_int %v4i %74
|
||||
OpStore %75 %int_1
|
||||
%76 = OpLoad %int %i
|
||||
%78 = OpAccessChain %_ptr_Function_uint %v2u %76
|
||||
OpStore %78 %uint_1
|
||||
%80 = OpLoad %int %i
|
||||
%81 = OpAccessChain %_ptr_Function_uint %v3u %80
|
||||
OpStore %81 %uint_1
|
||||
%82 = OpLoad %int %i
|
||||
%83 = OpAccessChain %_ptr_Function_uint %v4u %82
|
||||
OpStore %83 %uint_1
|
||||
%84 = OpLoad %int %i
|
||||
%86 = OpAccessChain %_ptr_Function_bool %v2b %84
|
||||
OpStore %86 %true
|
||||
%88 = OpLoad %int %i
|
||||
%89 = OpAccessChain %_ptr_Function_bool %v3b %88
|
||||
OpStore %89 %true
|
||||
%90 = OpLoad %int %i
|
||||
%91 = OpAccessChain %_ptr_Function_bool %v4b %90
|
||||
OpStore %91 %true
|
||||
%i = OpVariable %_ptr_Function_int Function %57
|
||||
OpStore %i %57
|
||||
%60 = OpLoad %int %i
|
||||
%62 = OpAccessChain %_ptr_Function_float %v2f %60
|
||||
OpStore %62 %float_1
|
||||
%64 = OpLoad %int %i
|
||||
%65 = OpAccessChain %_ptr_Function_float %v3f %64
|
||||
OpStore %65 %float_1
|
||||
%66 = OpLoad %int %i
|
||||
%67 = OpAccessChain %_ptr_Function_float %v4f %66
|
||||
OpStore %67 %float_1
|
||||
%68 = OpLoad %int %i
|
||||
%69 = OpAccessChain %_ptr_Function_int %v2i %68
|
||||
OpStore %69 %int_1
|
||||
%71 = OpLoad %int %i
|
||||
%72 = OpAccessChain %_ptr_Function_int %v3i %71
|
||||
OpStore %72 %int_1
|
||||
%73 = OpLoad %int %i
|
||||
%74 = OpAccessChain %_ptr_Function_int %v4i %73
|
||||
OpStore %74 %int_1
|
||||
%75 = OpLoad %int %i
|
||||
%77 = OpAccessChain %_ptr_Function_uint %v2u %75
|
||||
OpStore %77 %uint_1
|
||||
%79 = OpLoad %int %i
|
||||
%80 = OpAccessChain %_ptr_Function_uint %v3u %79
|
||||
OpStore %80 %uint_1
|
||||
%81 = OpLoad %int %i
|
||||
%82 = OpAccessChain %_ptr_Function_uint %v4u %81
|
||||
OpStore %82 %uint_1
|
||||
%83 = OpLoad %int %i
|
||||
%85 = OpAccessChain %_ptr_Function_bool %v2b %83
|
||||
OpStore %85 %true
|
||||
%87 = OpLoad %int %i
|
||||
%88 = OpAccessChain %_ptr_Function_bool %v3b %87
|
||||
OpStore %88 %true
|
||||
%89 = OpLoad %int %i
|
||||
%90 = OpAccessChain %_ptr_Function_bool %v4b %89
|
||||
OpStore %90 %true
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
|
||||
Reference in New Issue
Block a user