blob: 0172857b07e8e3de877e55f6277ffefe54ea8571 (
plain)
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
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
|
/*
* Copyright 2017 Google Inc.
*
* Use of this source code is governed by a BSD-style license that can
* be found in the LICENSE file.
*
*/
#pragma once
//
//
//
#include "runtime_cl.h"
#include "block_pool_cl.h"
//
// FIXME -- define individual structs before defining skc_config
//
struct skc_config
{
struct {
struct {
skc_uint size;
skc_uint subbufs;
} host; // alignment determined by compiler
struct {
skc_uint size;
skc_uint subbufs;
} device; // alignment determined by device
} suballocator;
struct {
skc_uint size;
} scheduler;
struct {
skc_uint bytes; // bytes per subblock -- pow2
skc_uint words; // words per subblock -- pow2
// skc_uint words_log2;
} subblock;
struct {
skc_uint bytes; // bytes per block -- pow2
skc_uint words; // words per block -- pow2
skc_uint subblocks; // subblocks per block -- block.bytes >= subblock.bytes
// skc_uint subblocks_log2;
} block;
union skc_block_pool_size block_pool;
struct {
skc_cq_type_e type;
skc_uint size;
} cq_pool;
struct {
skc_uint size; // a large fraction of block pool size
skc_uint width; // determines number of launched reclamation subgroups
skc_uint recs; // how many in-flight width-subgroup reclamation grids
} handle_pool;
struct {
skc_uint width; // tile width in pixels
skc_uint height; // tile height in pixels
skc_uint ratio; // subblocks per TTPB
} tile;
struct {
struct {
skc_uint count; // # of subbufs in buffer
} buffer;
struct {
skc_uint count; // # of blocks/commands in subbuf
} subbuf;
struct {
size_t buffer; // block.bytes * subbuf.blocks * subbuf.count
size_t subbuf; // block.bytes * subbuf.blocks -- multiple of CL_DEVICE_MEM_BASE_ADDR_ALIGN
} block;
struct {
size_t buffer; // sizeof(skc_uint) * subbuf.blocks * subbuf.count
size_t subbuf; // sizeof(skc_uint) * subbuf.blocks -- multiple of CL_DEVICE_MEM_BASE_ADDR_ALIGN
} command;
//
// skc_uint paths_lowat;
//
} paths_copy;
struct {
struct {
skc_uint elem_count;
skc_uint snap_count;
} path_ids;
struct {
skc_uint elem_count;
skc_uint snap_count;
} transforms;
struct {
skc_uint elem_count;
skc_uint snap_count;
} clips;
struct {
skc_uint elem_count;
skc_uint snap_count;
} fill;
struct {
skc_uint elem_count;
skc_uint snap_count;
} raster_ids;
struct {
skc_uint cmds;
} expand;
struct {
skc_uint keys;
} rasterize;
} raster_cohort;
struct {
struct {
skc_uint elem_count;
skc_uint snap_count;
} cmds;
struct {
skc_uint elem_count;
} raster_ids;
struct {
skc_uint elem_count;
} keys;
} composition;
};
//
//
//
|