mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-12-09 21:47:47 +00:00
spirv: Use generic transform to process shader IO
The refactored CanonicalizeEntryPointIO transform makes it much easier to handle SPIR-V style IO as well, and doing this removes a lot of duplicated code. Remove all of the SPIR-V transform code for shader IO and vertex point size. Bug: tint:920 Change-Id: Id1b97517619b4d2fd09b45d5aee848259f3dfa77 Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/60840 Kokoro: Kokoro <noreply+kokoro@google.com> Commit-Queue: James Price <jrprice@google.com> Auto-Submit: James Price <jrprice@google.com> Reviewed-by: Ben Clayton <bclayton@google.com>
This commit is contained in:
committed by
Tint LUCI CQ
parent
11e172ab64
commit
11c6fcdb51
@@ -1,13 +1,13 @@
|
||||
; SPIR-V
|
||||
; Version: 1.3
|
||||
; Generator: Google Tint Compiler; 0
|
||||
; Bound: 59
|
||||
; Bound: 58
|
||||
; Schema: 0
|
||||
OpCapability Shader
|
||||
OpMemoryModel Logical GLSL450
|
||||
OpEntryPoint Fragment %main "main" %tint_symbol_1
|
||||
OpEntryPoint Fragment %main "main" %value
|
||||
OpExecutionMode %main OriginUpperLeft
|
||||
OpName %tint_symbol_1 "tint_symbol_1"
|
||||
OpName %value "value"
|
||||
OpName %ret_i32 "ret_i32"
|
||||
OpName %ret_u32 "ret_u32"
|
||||
OpName %ret_f32 "ret_f32"
|
||||
@@ -16,17 +16,16 @@
|
||||
OpName %ret_MyStruct "ret_MyStruct"
|
||||
OpName %ret_MyArray "ret_MyArray"
|
||||
OpName %let_decls "let_decls"
|
||||
OpName %tint_symbol_2 "tint_symbol_2"
|
||||
OpName %tint_symbol "tint_symbol"
|
||||
OpName %main_inner "main_inner"
|
||||
OpName %main "main"
|
||||
OpDecorate %tint_symbol_1 Location 0
|
||||
OpDecorate %value Location 0
|
||||
OpMemberDecorate %MyStruct 0 Offset 0
|
||||
OpDecorate %_arr_float_uint_10 ArrayStride 4
|
||||
%float = OpTypeFloat 32
|
||||
%v4float = OpTypeVector %float 4
|
||||
%_ptr_Output_v4float = OpTypePointer Output %v4float
|
||||
%5 = OpConstantNull %v4float
|
||||
%tint_symbol_1 = OpVariable %_ptr_Output_v4float Output %5
|
||||
%value = OpVariable %_ptr_Output_v4float Output %5
|
||||
%int = OpTypeInt 32 1
|
||||
%6 = OpTypeFunction %int
|
||||
%int_1 = OpConstant %int 1
|
||||
@@ -52,9 +51,9 @@
|
||||
%40 = OpConstantComposite %v3float %float_1 %float_1 %float_1
|
||||
%mat3v3float = OpTypeMatrix %v3float 3
|
||||
%43 = OpConstantComposite %MyStruct %float_1
|
||||
%50 = OpTypeFunction %void %v4float
|
||||
%50 = OpTypeFunction %v4float
|
||||
%float_0 = OpConstant %float 0
|
||||
%58 = OpConstantComposite %v4float %float_0 %float_0 %float_0 %float_0
|
||||
%54 = OpConstantComposite %v4float %float_0 %float_0 %float_0 %float_0
|
||||
%ret_i32 = OpFunction %int None %6
|
||||
%9 = OpLabel
|
||||
OpReturnValue %int_1
|
||||
@@ -86,14 +85,13 @@
|
||||
%49 = OpFunctionCall %_arr_float_uint_10 %ret_MyArray
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
%tint_symbol_2 = OpFunction %void None %50
|
||||
%tint_symbol = OpFunctionParameter %v4float
|
||||
%53 = OpLabel
|
||||
OpStore %tint_symbol_1 %tint_symbol
|
||||
OpReturn
|
||||
%main_inner = OpFunction %v4float None %50
|
||||
%52 = OpLabel
|
||||
OpReturnValue %54
|
||||
OpFunctionEnd
|
||||
%main = OpFunction %void None %31
|
||||
%55 = OpLabel
|
||||
%56 = OpFunctionCall %void %tint_symbol_2 %58
|
||||
%56 = OpLabel
|
||||
%57 = OpFunctionCall %v4float %main_inner
|
||||
OpStore %value %57
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
; SPIR-V
|
||||
; Version: 1.3
|
||||
; Generator: Google Tint Compiler; 0
|
||||
; Bound: 93
|
||||
; Bound: 92
|
||||
; Schema: 0
|
||||
OpCapability Shader
|
||||
OpMemoryModel Logical GLSL450
|
||||
OpEntryPoint Fragment %main "main" %tint_symbol_1
|
||||
OpEntryPoint Fragment %main "main" %value
|
||||
OpExecutionMode %main OriginUpperLeft
|
||||
OpName %tint_symbol_1 "tint_symbol_1"
|
||||
OpName %value "value"
|
||||
OpName %ret_i32 "ret_i32"
|
||||
OpName %ret_u32 "ret_u32"
|
||||
OpName %ret_f32 "ret_f32"
|
||||
@@ -31,17 +31,16 @@
|
||||
OpName %v13 "v13"
|
||||
OpName %v14 "v14"
|
||||
OpName %v15 "v15"
|
||||
OpName %tint_symbol_2 "tint_symbol_2"
|
||||
OpName %tint_symbol "tint_symbol"
|
||||
OpName %main_inner "main_inner"
|
||||
OpName %main "main"
|
||||
OpDecorate %tint_symbol_1 Location 0
|
||||
OpDecorate %value Location 0
|
||||
OpMemberDecorate %MyStruct 0 Offset 0
|
||||
OpDecorate %_arr_float_uint_10 ArrayStride 4
|
||||
%float = OpTypeFloat 32
|
||||
%v4float = OpTypeVector %float 4
|
||||
%_ptr_Output_v4float = OpTypePointer Output %v4float
|
||||
%5 = OpConstantNull %v4float
|
||||
%tint_symbol_1 = OpVariable %_ptr_Output_v4float Output %5
|
||||
%value = OpVariable %_ptr_Output_v4float Output %5
|
||||
%int = OpTypeInt 32 1
|
||||
%6 = OpTypeFunction %int
|
||||
%int_1 = OpConstant %int 1
|
||||
@@ -83,9 +82,9 @@
|
||||
%67 = OpConstantComposite %MyStruct %float_1
|
||||
%_ptr_Function_MyStruct = OpTypePointer Function %MyStruct
|
||||
%_ptr_Function__arr_float_uint_10 = OpTypePointer Function %_arr_float_uint_10
|
||||
%84 = OpTypeFunction %void %v4float
|
||||
%84 = OpTypeFunction %v4float
|
||||
%float_0 = OpConstant %float 0
|
||||
%92 = OpConstantComposite %v4float %float_0 %float_0 %float_0 %float_0
|
||||
%88 = OpConstantComposite %v4float %float_0 %float_0 %float_0 %float_0
|
||||
%ret_i32 = OpFunction %int None %6
|
||||
%9 = OpLabel
|
||||
OpReturnValue %int_1
|
||||
@@ -150,14 +149,13 @@
|
||||
OpStore %v15 %82
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
%tint_symbol_2 = OpFunction %void None %84
|
||||
%tint_symbol = OpFunctionParameter %v4float
|
||||
%87 = OpLabel
|
||||
OpStore %tint_symbol_1 %tint_symbol
|
||||
OpReturn
|
||||
%main_inner = OpFunction %v4float None %84
|
||||
%86 = OpLabel
|
||||
OpReturnValue %88
|
||||
OpFunctionEnd
|
||||
%main = OpFunction %void None %31
|
||||
%89 = OpLabel
|
||||
%90 = OpFunctionCall %void %tint_symbol_2 %92
|
||||
%90 = OpLabel
|
||||
%91 = OpFunctionCall %v4float %main_inner
|
||||
OpStore %value %91
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
|
||||
@@ -1,12 +1,13 @@
|
||||
; SPIR-V
|
||||
; Version: 1.3
|
||||
; Generator: Google Tint Compiler; 0
|
||||
; Bound: 35
|
||||
; Bound: 34
|
||||
; Schema: 0
|
||||
OpCapability Shader
|
||||
OpMemoryModel Logical GLSL450
|
||||
OpEntryPoint Fragment %main "main" %tint_symbol_1
|
||||
OpEntryPoint Fragment %main "main" %value
|
||||
OpExecutionMode %main OriginUpperLeft
|
||||
OpName %value "value"
|
||||
OpName %v1 "v1"
|
||||
OpName %v2 "v2"
|
||||
OpName %v3 "v3"
|
||||
@@ -18,18 +19,20 @@
|
||||
OpMemberName %MyStruct 0 "f1"
|
||||
OpName %v8 "v8"
|
||||
OpName %v9 "v9"
|
||||
OpName %tint_symbol_1 "tint_symbol_1"
|
||||
OpName %tint_symbol_2 "tint_symbol_2"
|
||||
OpName %tint_symbol "tint_symbol"
|
||||
OpName %main_inner "main_inner"
|
||||
OpName %main "main"
|
||||
OpDecorate %value Location 0
|
||||
OpMemberDecorate %MyStruct 0 Offset 0
|
||||
OpDecorate %_arr_float_uint_10 ArrayStride 4
|
||||
OpDecorate %tint_symbol_1 Location 0
|
||||
%float = OpTypeFloat 32
|
||||
%v4float = OpTypeVector %float 4
|
||||
%_ptr_Output_v4float = OpTypePointer Output %v4float
|
||||
%5 = OpConstantNull %v4float
|
||||
%value = OpVariable %_ptr_Output_v4float Output %5
|
||||
%int = OpTypeInt 32 1
|
||||
%v1 = OpConstant %int 1
|
||||
%uint = OpTypeInt 32 0
|
||||
%v2 = OpConstant %uint 1
|
||||
%float = OpTypeFloat 32
|
||||
%v3 = OpConstant %float 1
|
||||
%v3int = OpTypeVector %int 3
|
||||
%v4 = OpConstantComposite %v3int %v1 %v1 %v1
|
||||
@@ -44,23 +47,18 @@
|
||||
%uint_10 = OpConstant %uint 10
|
||||
%_arr_float_uint_10 = OpTypeArray %float %uint_10
|
||||
%v9 = OpConstantNull %_arr_float_uint_10
|
||||
%v4float = OpTypeVector %float 4
|
||||
%_ptr_Output_v4float = OpTypePointer Output %v4float
|
||||
%23 = OpConstantNull %v4float
|
||||
%tint_symbol_1 = OpVariable %_ptr_Output_v4float Output %23
|
||||
%void = OpTypeVoid
|
||||
%24 = OpTypeFunction %void %v4float
|
||||
%29 = OpTypeFunction %void
|
||||
%24 = OpTypeFunction %v4float
|
||||
%float_0 = OpConstant %float 0
|
||||
%34 = OpConstantComposite %v4float %float_0 %float_0 %float_0 %float_0
|
||||
%tint_symbol_2 = OpFunction %void None %24
|
||||
%tint_symbol = OpFunctionParameter %v4float
|
||||
%28 = OpLabel
|
||||
OpStore %tint_symbol_1 %tint_symbol
|
||||
OpReturn
|
||||
%28 = OpConstantComposite %v4float %float_0 %float_0 %float_0 %float_0
|
||||
%void = OpTypeVoid
|
||||
%29 = OpTypeFunction %void
|
||||
%main_inner = OpFunction %v4float None %24
|
||||
%26 = OpLabel
|
||||
OpReturnValue %28
|
||||
OpFunctionEnd
|
||||
%main = OpFunction %void None %29
|
||||
%31 = OpLabel
|
||||
%32 = OpFunctionCall %void %tint_symbol_2 %34
|
||||
%32 = OpLabel
|
||||
%33 = OpFunctionCall %v4float %main_inner
|
||||
OpStore %value %33
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
|
||||
@@ -1,28 +1,30 @@
|
||||
; SPIR-V
|
||||
; Version: 1.3
|
||||
; Generator: Google Tint Compiler; 0
|
||||
; Bound: 39
|
||||
; Bound: 44
|
||||
; Schema: 0
|
||||
OpCapability Shader
|
||||
OpMemoryModel Logical GLSL450
|
||||
OpEntryPoint GLCompute %main "main" %tint_symbol
|
||||
OpEntryPoint GLCompute %main "main" %local_invocation_index_1
|
||||
OpExecutionMode %main LocalSize 1 1 1
|
||||
OpName %local_invocation_index_1 "local_invocation_index_1"
|
||||
OpName %v "v"
|
||||
OpName %tint_symbol "tint_symbol"
|
||||
OpName %main "main"
|
||||
OpName %main_inner "main_inner"
|
||||
OpName %local_invocation_index "local_invocation_index"
|
||||
OpName %idx "idx"
|
||||
OpName %main "main"
|
||||
OpDecorate %local_invocation_index_1 BuiltIn LocalInvocationIndex
|
||||
OpDecorate %_arr_int_uint_3 ArrayStride 4
|
||||
OpDecorate %tint_symbol BuiltIn LocalInvocationIndex
|
||||
%int = OpTypeInt 32 1
|
||||
%uint = OpTypeInt 32 0
|
||||
%_ptr_Input_uint = OpTypePointer Input %uint
|
||||
%local_invocation_index_1 = OpVariable %_ptr_Input_uint Input
|
||||
%int = OpTypeInt 32 1
|
||||
%uint_3 = OpConstant %uint 3
|
||||
%_arr_int_uint_3 = OpTypeArray %int %uint_3
|
||||
%_ptr_Workgroup__arr_int_uint_3 = OpTypePointer Workgroup %_arr_int_uint_3
|
||||
%v = OpVariable %_ptr_Workgroup__arr_int_uint_3 Workgroup
|
||||
%_ptr_Input_uint = OpTypePointer Input %uint
|
||||
%tint_symbol = OpVariable %_ptr_Input_uint Input
|
||||
%void = OpTypeVoid
|
||||
%9 = OpTypeFunction %void
|
||||
%9 = OpTypeFunction %void %uint
|
||||
%_ptr_Function_uint = OpTypePointer Function %uint
|
||||
%16 = OpConstantNull %uint
|
||||
%bool = OpTypeBool
|
||||
@@ -31,11 +33,12 @@
|
||||
%uint_1 = OpConstant %uint 1
|
||||
%uint_2 = OpConstant %uint 2
|
||||
%uint_264 = OpConstant %uint 264
|
||||
%main = OpFunction %void None %9
|
||||
%12 = OpLabel
|
||||
%39 = OpTypeFunction %void
|
||||
%main_inner = OpFunction %void None %9
|
||||
%local_invocation_index = OpFunctionParameter %uint
|
||||
%13 = OpLabel
|
||||
%idx = OpVariable %_ptr_Function_uint Function %16
|
||||
%13 = OpLoad %uint %tint_symbol
|
||||
OpStore %idx %13
|
||||
OpStore %idx %local_invocation_index
|
||||
OpBranch %17
|
||||
%17 = OpLabel
|
||||
OpLoopMerge %18 %19 None
|
||||
@@ -63,3 +66,9 @@
|
||||
%38 = OpLoad %_arr_int_uint_3 %v
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
%main = OpFunction %void None %39
|
||||
%41 = OpLabel
|
||||
%43 = OpLoad %uint %local_invocation_index_1
|
||||
%42 = OpFunctionCall %void %main_inner %43
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
|
||||
@@ -1,33 +1,43 @@
|
||||
; SPIR-V
|
||||
; Version: 1.3
|
||||
; Generator: Google Tint Compiler; 0
|
||||
; Bound: 19
|
||||
; Bound: 25
|
||||
; Schema: 0
|
||||
OpCapability Shader
|
||||
OpMemoryModel Logical GLSL450
|
||||
OpEntryPoint GLCompute %main "main"
|
||||
OpEntryPoint GLCompute %main "main" %local_invocation_index_1
|
||||
OpExecutionMode %main LocalSize 1 1 1
|
||||
OpName %local_invocation_index_1 "local_invocation_index_1"
|
||||
OpName %v "v"
|
||||
OpName %tint_symbol "tint_symbol"
|
||||
OpName %main_inner "main_inner"
|
||||
OpName %local_invocation_index "local_invocation_index"
|
||||
OpName %main "main"
|
||||
OpDecorate %tint_symbol BuiltIn LocalInvocationIndex
|
||||
OpDecorate %local_invocation_index_1 BuiltIn LocalInvocationIndex
|
||||
%uint = OpTypeInt 32 0
|
||||
%_ptr_Input_uint = OpTypePointer Input %uint
|
||||
%local_invocation_index_1 = OpVariable %_ptr_Input_uint Input
|
||||
%float = OpTypeFloat 32
|
||||
%v3float = OpTypeVector %float 3
|
||||
%mat2v3float = OpTypeMatrix %v3float 2
|
||||
%_ptr_Workgroup_mat2v3float = OpTypePointer Workgroup %mat2v3float
|
||||
%v = OpVariable %_ptr_Workgroup_mat2v3float Workgroup
|
||||
%uint = OpTypeInt 32 0
|
||||
%_ptr_Input_uint = OpTypePointer Input %uint
|
||||
%tint_symbol = OpVariable %_ptr_Input_uint Input
|
||||
%void = OpTypeVoid
|
||||
%9 = OpTypeFunction %void
|
||||
%13 = OpConstantNull %mat2v3float
|
||||
%9 = OpTypeFunction %void %uint
|
||||
%14 = OpConstantNull %mat2v3float
|
||||
%uint_2 = OpConstant %uint 2
|
||||
%uint_264 = OpConstant %uint 264
|
||||
%main = OpFunction %void None %9
|
||||
%12 = OpLabel
|
||||
OpStore %v %13
|
||||
%20 = OpTypeFunction %void
|
||||
%main_inner = OpFunction %void None %9
|
||||
%local_invocation_index = OpFunctionParameter %uint
|
||||
%13 = OpLabel
|
||||
OpStore %v %14
|
||||
OpControlBarrier %uint_2 %uint_2 %uint_264
|
||||
%18 = OpLoad %mat2v3float %v
|
||||
%19 = OpLoad %mat2v3float %v
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
%main = OpFunction %void None %20
|
||||
%22 = OpLabel
|
||||
%24 = OpLoad %uint %local_invocation_index_1
|
||||
%23 = OpFunctionCall %void %main_inner %24
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
|
||||
@@ -1,31 +1,41 @@
|
||||
; SPIR-V
|
||||
; Version: 1.3
|
||||
; Generator: Google Tint Compiler; 0
|
||||
; Bound: 17
|
||||
; Bound: 23
|
||||
; Schema: 0
|
||||
OpCapability Shader
|
||||
OpMemoryModel Logical GLSL450
|
||||
OpEntryPoint GLCompute %main "main"
|
||||
OpEntryPoint GLCompute %main "main" %local_invocation_index_1
|
||||
OpExecutionMode %main LocalSize 1 1 1
|
||||
OpName %local_invocation_index_1 "local_invocation_index_1"
|
||||
OpName %v "v"
|
||||
OpName %tint_symbol "tint_symbol"
|
||||
OpName %main_inner "main_inner"
|
||||
OpName %local_invocation_index "local_invocation_index"
|
||||
OpName %main "main"
|
||||
OpDecorate %tint_symbol BuiltIn LocalInvocationIndex
|
||||
OpDecorate %local_invocation_index_1 BuiltIn LocalInvocationIndex
|
||||
%uint = OpTypeInt 32 0
|
||||
%_ptr_Input_uint = OpTypePointer Input %uint
|
||||
%local_invocation_index_1 = OpVariable %_ptr_Input_uint Input
|
||||
%int = OpTypeInt 32 1
|
||||
%_ptr_Workgroup_int = OpTypePointer Workgroup %int
|
||||
%v = OpVariable %_ptr_Workgroup_int Workgroup
|
||||
%uint = OpTypeInt 32 0
|
||||
%_ptr_Input_uint = OpTypePointer Input %uint
|
||||
%tint_symbol = OpVariable %_ptr_Input_uint Input
|
||||
%void = OpTypeVoid
|
||||
%7 = OpTypeFunction %void
|
||||
%11 = OpConstantNull %int
|
||||
%7 = OpTypeFunction %void %uint
|
||||
%12 = OpConstantNull %int
|
||||
%uint_2 = OpConstant %uint 2
|
||||
%uint_264 = OpConstant %uint 264
|
||||
%main = OpFunction %void None %7
|
||||
%10 = OpLabel
|
||||
OpStore %v %11
|
||||
%18 = OpTypeFunction %void
|
||||
%main_inner = OpFunction %void None %7
|
||||
%local_invocation_index = OpFunctionParameter %uint
|
||||
%11 = OpLabel
|
||||
OpStore %v %12
|
||||
OpControlBarrier %uint_2 %uint_2 %uint_264
|
||||
%16 = OpLoad %int %v
|
||||
%17 = OpLoad %int %v
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
%main = OpFunction %void None %18
|
||||
%20 = OpLabel
|
||||
%22 = OpLoad %uint %local_invocation_index_1
|
||||
%21 = OpFunctionCall %void %main_inner %22
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
|
||||
@@ -1,38 +1,48 @@
|
||||
; SPIR-V
|
||||
; Version: 1.3
|
||||
; Generator: Google Tint Compiler; 0
|
||||
; Bound: 19
|
||||
; Bound: 25
|
||||
; Schema: 0
|
||||
OpCapability Shader
|
||||
OpMemoryModel Logical GLSL450
|
||||
OpEntryPoint GLCompute %main "main"
|
||||
OpEntryPoint GLCompute %main "main" %local_invocation_index_1
|
||||
OpExecutionMode %main LocalSize 1 1 1
|
||||
OpName %local_invocation_index_1 "local_invocation_index_1"
|
||||
OpName %S "S"
|
||||
OpMemberName %S 0 "a"
|
||||
OpMemberName %S 1 "b"
|
||||
OpName %v "v"
|
||||
OpName %tint_symbol "tint_symbol"
|
||||
OpName %main_inner "main_inner"
|
||||
OpName %local_invocation_index "local_invocation_index"
|
||||
OpName %main "main"
|
||||
OpDecorate %local_invocation_index_1 BuiltIn LocalInvocationIndex
|
||||
OpMemberDecorate %S 0 Offset 0
|
||||
OpMemberDecorate %S 1 Offset 4
|
||||
OpDecorate %tint_symbol BuiltIn LocalInvocationIndex
|
||||
%uint = OpTypeInt 32 0
|
||||
%_ptr_Input_uint = OpTypePointer Input %uint
|
||||
%local_invocation_index_1 = OpVariable %_ptr_Input_uint Input
|
||||
%int = OpTypeInt 32 1
|
||||
%float = OpTypeFloat 32
|
||||
%S = OpTypeStruct %int %float
|
||||
%_ptr_Workgroup_S = OpTypePointer Workgroup %S
|
||||
%v = OpVariable %_ptr_Workgroup_S Workgroup
|
||||
%uint = OpTypeInt 32 0
|
||||
%_ptr_Input_uint = OpTypePointer Input %uint
|
||||
%tint_symbol = OpVariable %_ptr_Input_uint Input
|
||||
%void = OpTypeVoid
|
||||
%9 = OpTypeFunction %void
|
||||
%13 = OpConstantNull %S
|
||||
%9 = OpTypeFunction %void %uint
|
||||
%14 = OpConstantNull %S
|
||||
%uint_2 = OpConstant %uint 2
|
||||
%uint_264 = OpConstant %uint 264
|
||||
%main = OpFunction %void None %9
|
||||
%12 = OpLabel
|
||||
OpStore %v %13
|
||||
%20 = OpTypeFunction %void
|
||||
%main_inner = OpFunction %void None %9
|
||||
%local_invocation_index = OpFunctionParameter %uint
|
||||
%13 = OpLabel
|
||||
OpStore %v %14
|
||||
OpControlBarrier %uint_2 %uint_2 %uint_264
|
||||
%18 = OpLoad %S %v
|
||||
%19 = OpLoad %S %v
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
%main = OpFunction %void None %20
|
||||
%22 = OpLabel
|
||||
%24 = OpLoad %uint %local_invocation_index_1
|
||||
%23 = OpFunctionCall %void %main_inner %24
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
|
||||
@@ -1,32 +1,42 @@
|
||||
; SPIR-V
|
||||
; Version: 1.3
|
||||
; Generator: Google Tint Compiler; 0
|
||||
; Bound: 18
|
||||
; Bound: 24
|
||||
; Schema: 0
|
||||
OpCapability Shader
|
||||
OpMemoryModel Logical GLSL450
|
||||
OpEntryPoint GLCompute %main "main"
|
||||
OpEntryPoint GLCompute %main "main" %local_invocation_index_1
|
||||
OpExecutionMode %main LocalSize 1 1 1
|
||||
OpName %local_invocation_index_1 "local_invocation_index_1"
|
||||
OpName %v "v"
|
||||
OpName %tint_symbol "tint_symbol"
|
||||
OpName %main_inner "main_inner"
|
||||
OpName %local_invocation_index "local_invocation_index"
|
||||
OpName %main "main"
|
||||
OpDecorate %tint_symbol BuiltIn LocalInvocationIndex
|
||||
OpDecorate %local_invocation_index_1 BuiltIn LocalInvocationIndex
|
||||
%uint = OpTypeInt 32 0
|
||||
%_ptr_Input_uint = OpTypePointer Input %uint
|
||||
%local_invocation_index_1 = OpVariable %_ptr_Input_uint Input
|
||||
%int = OpTypeInt 32 1
|
||||
%v3int = OpTypeVector %int 3
|
||||
%_ptr_Workgroup_v3int = OpTypePointer Workgroup %v3int
|
||||
%v = OpVariable %_ptr_Workgroup_v3int Workgroup
|
||||
%uint = OpTypeInt 32 0
|
||||
%_ptr_Input_uint = OpTypePointer Input %uint
|
||||
%tint_symbol = OpVariable %_ptr_Input_uint Input
|
||||
%void = OpTypeVoid
|
||||
%8 = OpTypeFunction %void
|
||||
%12 = OpConstantNull %v3int
|
||||
%8 = OpTypeFunction %void %uint
|
||||
%13 = OpConstantNull %v3int
|
||||
%uint_2 = OpConstant %uint 2
|
||||
%uint_264 = OpConstant %uint 264
|
||||
%main = OpFunction %void None %8
|
||||
%11 = OpLabel
|
||||
OpStore %v %12
|
||||
%19 = OpTypeFunction %void
|
||||
%main_inner = OpFunction %void None %8
|
||||
%local_invocation_index = OpFunctionParameter %uint
|
||||
%12 = OpLabel
|
||||
OpStore %v %13
|
||||
OpControlBarrier %uint_2 %uint_2 %uint_264
|
||||
%17 = OpLoad %v3int %v
|
||||
%18 = OpLoad %v3int %v
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
%main = OpFunction %void None %19
|
||||
%21 = OpLabel
|
||||
%23 = OpLoad %uint %local_invocation_index_1
|
||||
%22 = OpFunctionCall %void %main_inner %23
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
|
||||
@@ -1,52 +1,59 @@
|
||||
; SPIR-V
|
||||
; Version: 1.3
|
||||
; Generator: Google Tint Compiler; 0
|
||||
; Bound: 56
|
||||
; Bound: 72
|
||||
; Schema: 0
|
||||
OpCapability Shader
|
||||
OpMemoryModel Logical GLSL450
|
||||
OpEntryPoint GLCompute %main1 "main1"
|
||||
OpEntryPoint GLCompute %main2 "main2"
|
||||
OpEntryPoint GLCompute %main3 "main3"
|
||||
OpEntryPoint GLCompute %main1 "main1" %local_invocation_index_3
|
||||
OpEntryPoint GLCompute %main2 "main2" %local_invocation_index_1_1
|
||||
OpEntryPoint GLCompute %main3 "main3" %local_invocation_index_2_1
|
||||
OpEntryPoint GLCompute %main4 "main4"
|
||||
OpExecutionMode %main1 LocalSize 1 1 1
|
||||
OpExecutionMode %main2 LocalSize 1 1 1
|
||||
OpExecutionMode %main3 LocalSize 1 1 1
|
||||
OpExecutionMode %main4 LocalSize 1 1 1
|
||||
OpName %local_invocation_index_3 "local_invocation_index_3"
|
||||
OpName %local_invocation_index_1_1 "local_invocation_index_1_1"
|
||||
OpName %local_invocation_index_2_1 "local_invocation_index_2_1"
|
||||
OpName %a "a"
|
||||
OpName %b "b"
|
||||
OpName %c "c"
|
||||
OpName %tint_symbol "tint_symbol"
|
||||
OpName %tint_symbol_1 "tint_symbol_1"
|
||||
OpName %tint_symbol_2 "tint_symbol_2"
|
||||
OpName %uses_a "uses_a"
|
||||
OpName %uses_b "uses_b"
|
||||
OpName %uses_a_and_b "uses_a_and_b"
|
||||
OpName %no_uses "no_uses"
|
||||
OpName %outer "outer"
|
||||
OpName %main1_inner "main1_inner"
|
||||
OpName %local_invocation_index "local_invocation_index"
|
||||
OpName %main1 "main1"
|
||||
OpName %main2_inner "main2_inner"
|
||||
OpName %local_invocation_index_1 "local_invocation_index_1"
|
||||
OpName %main2 "main2"
|
||||
OpName %main3_inner "main3_inner"
|
||||
OpName %local_invocation_index_2 "local_invocation_index_2"
|
||||
OpName %main3 "main3"
|
||||
OpName %main4 "main4"
|
||||
OpDecorate %tint_symbol BuiltIn LocalInvocationIndex
|
||||
OpDecorate %tint_symbol_1 BuiltIn LocalInvocationIndex
|
||||
OpDecorate %tint_symbol_2 BuiltIn LocalInvocationIndex
|
||||
OpDecorate %local_invocation_index_3 BuiltIn LocalInvocationIndex
|
||||
OpDecorate %local_invocation_index_1_1 BuiltIn LocalInvocationIndex
|
||||
OpDecorate %local_invocation_index_2_1 BuiltIn LocalInvocationIndex
|
||||
%uint = OpTypeInt 32 0
|
||||
%_ptr_Input_uint = OpTypePointer Input %uint
|
||||
%local_invocation_index_3 = OpVariable %_ptr_Input_uint Input
|
||||
%local_invocation_index_1_1 = OpVariable %_ptr_Input_uint Input
|
||||
%local_invocation_index_2_1 = OpVariable %_ptr_Input_uint Input
|
||||
%int = OpTypeInt 32 1
|
||||
%_ptr_Workgroup_int = OpTypePointer Workgroup %int
|
||||
%a = OpVariable %_ptr_Workgroup_int Workgroup
|
||||
%b = OpVariable %_ptr_Workgroup_int Workgroup
|
||||
%c = OpVariable %_ptr_Workgroup_int Workgroup
|
||||
%uint = OpTypeInt 32 0
|
||||
%_ptr_Input_uint = OpTypePointer Input %uint
|
||||
%tint_symbol = OpVariable %_ptr_Input_uint Input
|
||||
%tint_symbol_1 = OpVariable %_ptr_Input_uint Input
|
||||
%tint_symbol_2 = OpVariable %_ptr_Input_uint Input
|
||||
%void = OpTypeVoid
|
||||
%11 = OpTypeFunction %void
|
||||
%int_1 = OpConstant %int 1
|
||||
%int_2 = OpConstant %int 2
|
||||
%int_0 = OpConstant %int 0
|
||||
%37 = OpConstantNull %int
|
||||
%35 = OpTypeFunction %void %uint
|
||||
%39 = OpConstantNull %int
|
||||
%uint_2 = OpConstant %uint 2
|
||||
%uint_264 = OpConstant %uint 264
|
||||
%int_42 = OpConstant %int 42
|
||||
@@ -84,33 +91,54 @@
|
||||
%34 = OpFunctionCall %void %no_uses
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
%main1 = OpFunction %void None %11
|
||||
%36 = OpLabel
|
||||
OpStore %a %37
|
||||
%main1_inner = OpFunction %void None %35
|
||||
%local_invocation_index = OpFunctionParameter %uint
|
||||
%38 = OpLabel
|
||||
OpStore %a %39
|
||||
OpControlBarrier %uint_2 %uint_2 %uint_264
|
||||
OpStore %a %int_42
|
||||
%42 = OpFunctionCall %void %uses_a
|
||||
%44 = OpFunctionCall %void %uses_a
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
%main1 = OpFunction %void None %11
|
||||
%46 = OpLabel
|
||||
%48 = OpLoad %uint %local_invocation_index_3
|
||||
%47 = OpFunctionCall %void %main1_inner %48
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
%main2_inner = OpFunction %void None %35
|
||||
%local_invocation_index_1 = OpFunctionParameter %uint
|
||||
%51 = OpLabel
|
||||
OpStore %b %39
|
||||
OpControlBarrier %uint_2 %uint_2 %uint_264
|
||||
OpStore %b %int_7
|
||||
%54 = OpFunctionCall %void %uses_b
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
%main2 = OpFunction %void None %11
|
||||
%44 = OpLabel
|
||||
OpStore %b %37
|
||||
%56 = OpLabel
|
||||
%58 = OpLoad %uint %local_invocation_index_1_1
|
||||
%57 = OpFunctionCall %void %main2_inner %58
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
%main3_inner = OpFunction %void None %35
|
||||
%local_invocation_index_2 = OpFunctionParameter %uint
|
||||
%61 = OpLabel
|
||||
OpStore %a %39
|
||||
OpStore %b %39
|
||||
OpControlBarrier %uint_2 %uint_2 %uint_264
|
||||
OpStore %b %int_7
|
||||
%47 = OpFunctionCall %void %uses_b
|
||||
%63 = OpFunctionCall %void %outer
|
||||
%64 = OpFunctionCall %void %no_uses
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
%main3 = OpFunction %void None %11
|
||||
%49 = OpLabel
|
||||
OpStore %a %37
|
||||
OpStore %b %37
|
||||
OpControlBarrier %uint_2 %uint_2 %uint_264
|
||||
%51 = OpFunctionCall %void %outer
|
||||
%52 = OpFunctionCall %void %no_uses
|
||||
%66 = OpLabel
|
||||
%68 = OpLoad %uint %local_invocation_index_2_1
|
||||
%67 = OpFunctionCall %void %main3_inner %68
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
%main4 = OpFunction %void None %11
|
||||
%54 = OpLabel
|
||||
%55 = OpFunctionCall %void %no_uses
|
||||
%70 = OpLabel
|
||||
%71 = OpFunctionCall %void %no_uses
|
||||
OpReturn
|
||||
OpFunctionEnd
|
||||
|
||||
Reference in New Issue
Block a user