blob: 2790fa5c8f0faaebfdf4714b34a61133584408fd [file] [log] [blame]
Peter McNeeleyd35a3b62024-09-20 20:20:51 +00001; SPIR-V
2; Version: 1.3
3; Generator: Google Tint Compiler; 1
4; Bound: 27
5; Schema: 0
6 OpCapability Shader
7 OpCapability GroupNonUniformArithmetic
8 OpMemoryModel Logical GLSL450
9 OpEntryPoint Fragment %fragment_main "fragment_main"
10 OpEntryPoint GLCompute %compute_main "compute_main"
11 OpExecutionMode %fragment_main OriginUpperLeft
12 OpExecutionMode %compute_main LocalSize 1 1 1
James Price71c1d542024-10-10 23:01:19 +000013 OpMemberName %prevent_dce_block 0 "inner"
14 OpName %prevent_dce_block "prevent_dce_block"
Peter McNeeleyd35a3b62024-09-20 20:20:51 +000015 OpName %subgroupInclusiveAdd_df692b "subgroupInclusiveAdd_df692b"
16 OpName %res "res"
17 OpName %fragment_main "fragment_main"
18 OpName %compute_main "compute_main"
James Price71c1d542024-10-10 23:01:19 +000019 OpMemberDecorate %prevent_dce_block 0 Offset 0
20 OpDecorate %prevent_dce_block Block
Peter McNeeleyd35a3b62024-09-20 20:20:51 +000021 OpDecorate %1 DescriptorSet 0
22 OpDecorate %1 Binding 0
23 OpDecorate %1 Coherent
24 %float = OpTypeFloat 32
James Price71c1d542024-10-10 23:01:19 +000025%prevent_dce_block = OpTypeStruct %float
26%_ptr_StorageBuffer_prevent_dce_block = OpTypePointer StorageBuffer %prevent_dce_block
27 %1 = OpVariable %_ptr_StorageBuffer_prevent_dce_block StorageBuffer
Peter McNeeleyd35a3b62024-09-20 20:20:51 +000028 %6 = OpTypeFunction %float
29 %uint = OpTypeInt 32 0
30 %uint_3 = OpConstant %uint 3
31 %float_1 = OpConstant %float 1
32%_ptr_Function_float = OpTypePointer Function %float
33 %void = OpTypeVoid
34 %17 = OpTypeFunction %void
35%_ptr_StorageBuffer_float = OpTypePointer StorageBuffer %float
36 %uint_0 = OpConstant %uint 0
37%subgroupInclusiveAdd_df692b = OpFunction %float None %6
38 %7 = OpLabel
39 %res = OpVariable %_ptr_Function_float Function
40 %8 = OpGroupNonUniformFAdd %float %uint_3 InclusiveScan %float_1
41 OpStore %res %8
42 %14 = OpLoad %float %res None
43 OpReturnValue %14
44 OpFunctionEnd
45%fragment_main = OpFunction %void None %17
46 %18 = OpLabel
47 %19 = OpFunctionCall %float %subgroupInclusiveAdd_df692b
48 %20 = OpAccessChain %_ptr_StorageBuffer_float %1 %uint_0
49 OpStore %20 %19 None
50 OpReturn
51 OpFunctionEnd
52%compute_main = OpFunction %void None %17
53 %24 = OpLabel
54 %25 = OpFunctionCall %float %subgroupInclusiveAdd_df692b
55 %26 = OpAccessChain %_ptr_StorageBuffer_float %1 %uint_0
56 OpStore %26 %25 None
57 OpReturn
58 OpFunctionEnd