-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathamd-issue-dis.spv
76 lines (76 loc) · 3.24 KB
/
amd-issue-dis.spv
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
; SPIR-V
; Version: 1.0
; Generator: Google Clspv; 0
; Bound: 55
; Schema: 0
OpCapability Shader
OpExtension "SPV_KHR_storage_buffer_storage_class"
OpExtension "SPV_KHR_non_semantic_info"
%44 = OpExtInstImport "NonSemantic.ClspvReflection.5"
OpMemoryModel Logical GLSL450
OpEntryPoint GLCompute %20 "test" %gl_LocalInvocationID
OpSource OpenCL_C 200
%45 = OpString "test"
%48 = OpString "out"
%51 = OpString "partition"
OpDecorate %gl_LocalInvocationID BuiltIn LocalInvocationId
OpDecorate %gl_WorkGroupSize BuiltIn WorkgroupSize
OpDecorate %_runtimearr_uint ArrayStride 4
OpMemberDecorate %_struct_14 0 Offset 0
OpDecorate %_struct_14 Block
OpDecorate %16 DescriptorSet 0
OpDecorate %16 Binding 0
OpDecorate %17 DescriptorSet 0
OpDecorate %17 Binding 1
OpDecorate %7 SpecId 0
OpDecorate %8 SpecId 1
OpDecorate %9 SpecId 2
%uint = OpTypeInt 32 0
%_ptr_Workgroup_uint = OpTypePointer Workgroup %uint
%v3uint = OpTypeVector %uint 3
%_ptr_Input_v3uint = OpTypePointer Input %v3uint
%7 = OpSpecConstant %uint 1
%8 = OpSpecConstant %uint 1
%9 = OpSpecConstant %uint 1
%gl_WorkGroupSize = OpSpecConstantComposite %v3uint %7 %8 %9
%_ptr_Private_v3uint = OpTypePointer Private %v3uint
%_runtimearr_uint = OpTypeRuntimeArray %uint
%_struct_14 = OpTypeStruct %_runtimearr_uint
%_ptr_StorageBuffer__struct_14 = OpTypePointer StorageBuffer %_struct_14
%void = OpTypeVoid
%19 = OpTypeFunction %void
%_ptr_StorageBuffer_uint = OpTypePointer StorageBuffer %uint
%uint_0 = OpConstant %uint 0
%_ptr_Input_uint = OpTypePointer Input %uint
%bool = OpTypeBool
%uint_1 = OpConstant %uint 1
%uint_72 = OpConstant %uint 72
%uint_2 = OpConstant %uint 2
%uint_264 = OpConstant %uint 264
%uint_3 = OpConstant %uint 3
%3 = OpVariable %_ptr_Workgroup_uint Workgroup
%gl_LocalInvocationID = OpVariable %_ptr_Input_v3uint Input
%12 = OpVariable %_ptr_Private_v3uint Private %gl_WorkGroupSize
%16 = OpVariable %_ptr_StorageBuffer__struct_14 StorageBuffer
%17 = OpVariable %_ptr_StorageBuffer__struct_14 StorageBuffer
%20 = OpFunction %void None %19
%21 = OpLabel
%24 = OpAccessChain %_ptr_StorageBuffer_uint %17 %uint_0 %uint_0
%26 = OpAccessChain %_ptr_Input_uint %gl_LocalInvocationID %uint_0
%27 = OpLoad %uint %26
%29 = OpIEqual %bool %27 %uint_0
OpSelectionMerge %37 None
OpBranchConditional %29 %32 %37
%32 = OpLabel
%35 = OpAtomicIAdd %uint %24 %uint_1 %uint_72 %uint_1
OpStore %3 %35
OpBranch %37
%37 = OpLabel
OpControlBarrier %uint_2 %uint_2 %uint_264
%40 = OpLoad %uint %3
%41 = OpAccessChain %_ptr_Input_uint %gl_LocalInvocationID %uint_0
%42 = OpLoad %uint %41
%43 = OpAccessChain %_ptr_StorageBuffer_uint %16 %uint_0 %42
OpStore %43 %40
OpReturn
OpFunctionEnd