blob: 4a33c7ad97311ede769eb160690b1180525b5d04 [file] [log] [blame]
dan sinclair1b77b6c2024-08-06 15:47:05 +00001; SPIR-V
2; Version: 1.3
3; Generator: Google Tint Compiler; 1
4; Bound: 43
5; Schema: 0
6 OpCapability Shader
7 OpMemoryModel Logical GLSL450
8 OpEntryPoint Fragment %fragment_main "fragment_main"
9 OpEntryPoint GLCompute %compute_main "compute_main"
10 OpExecutionMode %fragment_main OriginUpperLeft
11 OpExecutionMode %compute_main LocalSize 1 1 1
12 OpMemberName %tint_symbol_1 0 "tint_symbol"
13 OpName %tint_symbol_1 "tint_symbol_1"
14 OpName %arg_0 "arg_0"
15 OpName %textureLoad_c2d09a "textureLoad_c2d09a"
16 OpName %arg_1 "arg_1"
17 OpName %arg_2 "arg_2"
18 OpName %res "res"
19 OpName %fragment_main "fragment_main"
20 OpName %compute_main "compute_main"
21 OpMemberDecorate %tint_symbol_1 0 Offset 0
22 OpDecorate %tint_symbol_1 Block
23 OpDecorate %1 DescriptorSet 0
24 OpDecorate %1 Binding 0
25 OpDecorate %arg_0 DescriptorSet 1
26 OpDecorate %arg_0 Binding 0
27 %uint = OpTypeInt 32 0
28 %v4uint = OpTypeVector %uint 4
29%tint_symbol_1 = OpTypeStruct %v4uint
30%_ptr_StorageBuffer_tint_symbol_1 = OpTypePointer StorageBuffer %tint_symbol_1
31 %1 = OpVariable %_ptr_StorageBuffer_tint_symbol_1 StorageBuffer
32 %8 = OpTypeImage %uint 2D 0 1 0 2 R32ui
33%_ptr_UniformConstant_8 = OpTypePointer UniformConstant %8
34 %arg_0 = OpVariable %_ptr_UniformConstant_8 UniformConstant
35 %10 = OpTypeFunction %v4uint
36 %v2uint = OpTypeVector %uint 2
37%_ptr_Function_v2uint = OpTypePointer Function %v2uint
38 %uint_1 = OpConstant %uint 1
39 %15 = OpConstantComposite %v2uint %uint_1 %uint_1
40 %int = OpTypeInt 32 1
41%_ptr_Function_int = OpTypePointer Function %int
42 %int_1 = OpConstant %int 1
43 %v3uint = OpTypeVector %uint 3
44%_ptr_Function_v4uint = OpTypePointer Function %v4uint
45 %void = OpTypeVoid
46 %33 = OpTypeFunction %void
47%_ptr_StorageBuffer_v4uint = OpTypePointer StorageBuffer %v4uint
48 %uint_0 = OpConstant %uint 0
49%textureLoad_c2d09a = OpFunction %v4uint None %10
50 %11 = OpLabel
51 %arg_1 = OpVariable %_ptr_Function_v2uint Function
52 %arg_2 = OpVariable %_ptr_Function_int Function
53 %res = OpVariable %_ptr_Function_v4uint Function
54 OpStore %arg_1 %15
55 OpStore %arg_2 %int_1
56 %21 = OpLoad %8 %arg_0
57 %22 = OpLoad %v2uint %arg_1
58 %23 = OpLoad %int %arg_2
59 %24 = OpBitcast %uint %23
60 %26 = OpCompositeConstruct %v3uint %22 %24
61 %27 = OpImageRead %v4uint %21 %26 None
62 OpStore %res %27
63 %30 = OpLoad %v4uint %res
64 OpReturnValue %30
65 OpFunctionEnd
66%fragment_main = OpFunction %void None %33
67 %34 = OpLabel
68 %35 = OpFunctionCall %v4uint %textureLoad_c2d09a
69 %36 = OpAccessChain %_ptr_StorageBuffer_v4uint %1 %uint_0
70 OpStore %36 %35
71 OpReturn
72 OpFunctionEnd
73%compute_main = OpFunction %void None %33
74 %40 = OpLabel
75 %41 = OpFunctionCall %v4uint %textureLoad_c2d09a
76 %42 = OpAccessChain %_ptr_StorageBuffer_v4uint %1 %uint_0
77 OpStore %42 %41
78 OpReturn
79 OpFunctionEnd