dawn-cmake/test/var/workgroup.wgsl.expected.spvasm
Ben Clayton 75db82c96b sanitizers: Use the ZeroInitWorkgroupMemory transform
Zero the workgroup memory for all backends.
We can probably disable this for the backends that support workgroup zeroing, but that's an optimization we can perform later.

Fixed: tint:280
Change-Id: I9cad919ba3a15b8cedfe6939317d1f6b95425453
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/55244
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: David Neto <dneto@google.com>
Reviewed-by: James Price <jrprice@google.com>
2021-06-18 22:44:31 +00:00

140 lines
5.0 KiB
Plaintext

; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
; Bound: 70
; Schema: 0
OpCapability Shader
OpMemoryModel Logical GLSL450
OpEntryPoint GLCompute %main1 "main1" %tint_symbol
OpEntryPoint GLCompute %main2 "main2" %tint_symbol_1
OpEntryPoint GLCompute %main3 "main3" %tint_symbol_2
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 %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 "main1"
OpName %main2 "main2"
OpName %main3 "main3"
OpName %main4 "main4"
OpDecorate %tint_symbol BuiltIn LocalInvocationIndex
OpDecorate %tint_symbol_1 BuiltIn LocalInvocationIndex
OpDecorate %tint_symbol_2 BuiltIn LocalInvocationIndex
%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
%uint_0 = OpConstant %uint 0
%bool = OpTypeBool
%43 = OpConstantNull %int
%uint_2 = OpConstant %uint 2
%uint_264 = OpConstant %uint 264
%int_42 = OpConstant %int 42
%int_7 = OpConstant %int 7
%uses_a = OpFunction %void None %11
%14 = OpLabel
%15 = OpLoad %int %a
%17 = OpIAdd %int %15 %int_1
OpStore %a %17
OpReturn
OpFunctionEnd
%uses_b = OpFunction %void None %11
%19 = OpLabel
%20 = OpLoad %int %b
%22 = OpIMul %int %20 %int_2
OpStore %b %22
OpReturn
OpFunctionEnd
%uses_a_and_b = OpFunction %void None %11
%24 = OpLabel
%25 = OpLoad %int %a
OpStore %b %25
OpReturn
OpFunctionEnd
%no_uses = OpFunction %void None %11
%27 = OpLabel
OpReturn
OpFunctionEnd
%outer = OpFunction %void None %11
%29 = OpLabel
OpStore %a %int_0
%31 = OpFunctionCall %void %uses_a
%32 = OpFunctionCall %void %uses_a_and_b
%33 = OpFunctionCall %void %uses_b
%34 = OpFunctionCall %void %no_uses
OpReturn
OpFunctionEnd
%main1 = OpFunction %void None %11
%36 = OpLabel
%37 = OpLoad %uint %tint_symbol
%39 = OpIEqual %bool %37 %uint_0
OpSelectionMerge %41 None
OpBranchConditional %39 %42 %41
%42 = OpLabel
OpStore %a %43
OpBranch %41
%41 = OpLabel
OpControlBarrier %uint_2 %uint_2 %uint_264
OpStore %a %int_42
%48 = OpFunctionCall %void %uses_a
OpReturn
OpFunctionEnd
%main2 = OpFunction %void None %11
%50 = OpLabel
%51 = OpLoad %uint %tint_symbol_1
%52 = OpIEqual %bool %51 %uint_0
OpSelectionMerge %53 None
OpBranchConditional %52 %54 %53
%54 = OpLabel
OpStore %b %43
OpBranch %53
%53 = OpLabel
OpControlBarrier %uint_2 %uint_2 %uint_264
OpStore %b %int_7
%57 = OpFunctionCall %void %uses_b
OpReturn
OpFunctionEnd
%main3 = OpFunction %void None %11
%59 = OpLabel
%60 = OpLoad %uint %tint_symbol_2
%61 = OpIEqual %bool %60 %uint_0
OpSelectionMerge %62 None
OpBranchConditional %61 %63 %62
%63 = OpLabel
OpStore %a %43
OpStore %b %43
OpBranch %62
%62 = OpLabel
OpControlBarrier %uint_2 %uint_2 %uint_264
%65 = OpFunctionCall %void %outer
%66 = OpFunctionCall %void %no_uses
OpReturn
OpFunctionEnd
%main4 = OpFunction %void None %11
%68 = OpLabel
%69 = OpFunctionCall %void %no_uses
OpReturn
OpFunctionEnd