• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1; SPIR-V
2; Version: 1.0
3; Generator: Khronos SPIR-V Tools Assembler; 0
4; Bound: 24
5; Schema: 0
6               OpCapability Float64
7               OpCapability Addresses
8               OpCapability Linkage
9               OpCapability Kernel
10          %1 = OpExtInstImport "OpenCL.std"
11               OpMemoryModel Physical32 OpenCL
12               OpEntryPoint Kernel %2 "fmath_spv"
13               OpName %res "res"
14               OpName %lhs "lhs"
15               OpName %rhs "rhs"
16               OpName %entry "entry"
17               OpDecorate %7 FuncParamAttr NoCapture
18          %7 = OpDecorationGroup
19               OpDecorate %gl_GlobalInvocationID BuiltIn GlobalInvocationId
20               OpDecorate %gl_GlobalInvocationID Constant
21               OpDecorate %gl_GlobalInvocationID LinkageAttributes "__spirv_GlobalInvocationId" Import
22               OpGroupDecorate %7 %res %lhs %rhs
23       %uint = OpTypeInt 32 0
24     %v3uint = OpTypeVector %uint 3
25%_ptr_UniformConstant_v3uint = OpTypePointer UniformConstant %v3uint
26       %void = OpTypeVoid
27     %double = OpTypeFloat 64
28%_ptr_CrossWorkgroup_double = OpTypePointer CrossWorkgroup %double
29         %15 = OpTypeFunction %void %_ptr_CrossWorkgroup_double %_ptr_CrossWorkgroup_double %_ptr_CrossWorkgroup_double
30%gl_GlobalInvocationID = OpVariable %_ptr_UniformConstant_v3uint UniformConstant
31          %2 = OpFunction %void None %15
32        %res = OpFunctionParameter %_ptr_CrossWorkgroup_double
33        %lhs = OpFunctionParameter %_ptr_CrossWorkgroup_double
34        %rhs = OpFunctionParameter %_ptr_CrossWorkgroup_double
35      %entry = OpLabel
36         %16 = OpLoad %v3uint %gl_GlobalInvocationID Aligned 0
37         %17 = OpCompositeExtract %uint %16 0
38         %18 = OpInBoundsPtrAccessChain %_ptr_CrossWorkgroup_double %lhs %17
39         %19 = OpLoad %double %18 Aligned 8
40         %20 = OpInBoundsPtrAccessChain %_ptr_CrossWorkgroup_double %rhs %17
41         %21 = OpLoad %double %20 Aligned 8
42         %22 = OpFSub %double %19 %21
43         %23 = OpInBoundsPtrAccessChain %_ptr_CrossWorkgroup_double %res %17
44               OpStore %23 %22 Aligned 8
45               OpReturn
46               OpFunctionEnd
47