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
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
|
<?xml version="1.0" encoding="UTF-8"?>
<!-- Copyright (c) 2012-2013 The Etnaviv Project
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the "Software"),
to deal in the Software without restriction, including without limitation
the rights to use, copy, modify, merge, publish, distribute, sub license,
and/or sell copies of the Software, and to permit persons to whom the
Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice (including the
next paragraph) shall be included in all copies or substantial portions
of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
DEALINGS IN THE SOFTWARE.
-->
<database xmlns="http://nouveau.freedesktop.org/"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://nouveau.freedesktop.org/ rules-ng.xsd">
<!-- Vivante GCxxxx FE command stream format -->
<import file="common.xml"/>
<enum name="FE_OPCODE">
<value value="1" name="LOAD_STATE" brief="Load GPU state"/>
<value value="2" name="END" brief="Stop command stream"/>
<value value="3" name="NOP" brief="No operation"/>
<value value="4" name="DRAW_2D" brief="Draw 2D"/>
<value value="5" name="DRAW_PRIMITIVES" brief="Draw 3D primitives"/>
<value value="6" name="DRAW_INDEXED_PRIMITIVES" brief="Draw 3D indexed primitives"/>
<value value="7" name="WAIT"/>
<value value="8" name="LINK" brief="Transfer control flow"/>
<value value="9" name="STALL" brief="Stall command queue"/>
<value value="10" name="CALL"/>
<value value="11" name="RETURN"/>
<value value="13" name="CHIP_SELECT" brief="Chip select mask"/>
</enum>
<enum name="PRIMITIVE_TYPE">
<value value="1" name="POINTS" brief="Points (GL_POINTS)"/>
<value value="2" name="LINES" brief="Lines (GL_LINES)"/>
<value value="3" name="LINE_STRIP" brief="Line strip (GL_LINE_STRIP)"/>
<value value="4" name="TRIANGLES" brief="Triangles (GL_TRIANGLES)"/>
<value value="5" name="TRIANGLE_STRIP" brief="Triangle strip (GL_TRIANGLE_STRIP)"/>
<value value="6" name="TRIANGLE_FAN" brief="Triangle fan (GL_TRIANGLE_FAN)"/>
<value value="7" name="LINE_LOOP" brief="Line loop (GL_LINE_LOOP)"/>
<value value="8" name="QUADS" brief="Quadliterals (GL_QUADS)">
<doc>Only supported when RECT_PRIMITIVE feature bit is st.</doc>
</value>
</enum>
<domain name="VIVS"/>
<domain name="VIV_FE">
<!-- A stripe for each command follows.
The different commands are distinguished by the OP field.
-->
<stripe name="LOAD_STATE" varset="FE_OPCODE" variants="LOAD_STATE">
<reg32 offset="0x00000" name="HEADER">
<bitfield high="31" low="27" name="OP">
<value value="1" name="LOAD_STATE" brief="Load GPU state"/>
</bitfield>
<bitfield pos="26" name="FIXP" brief="Convert loaded values from 16.16 fixed point to float32"/>
<bitfield pos="25" low="16" name="COUNT" brief="Number of state words to load"/>
<bitfield pos="15" low="0" name="OFFSET" shr="2" brief="State load starting offset" type="VIVS"/>
</reg32>
<doc>COUNT state words follow. These are literally written to state space at
the provided offset, after which the offset is increased.
If the FIXP bit is set, a conversion from 16.16 fixed-point to 32-bit floating point will happen.
If COUNT is zero, it is interpreted as 1024 (the maximum value + 1).
</doc>
</stripe>
<stripe name="END" varset="FE_OPCODE" variants="END"> <!-- size="4" -->
<reg32 offset="0x00000" name="HEADER">
<bitfield high="4" low="0" name="EVENT_ID" brief="Event ID to be send"/>
<bitfield pos="8" name="EVENT_ENABLE" brief="Send event when END is completed"/>
<bitfield high="31" low="27" name="OP">
<value value="2" name="END" brief="Stop command stream"/>
</bitfield>
</reg32>
<!-- END has no arguments -->
</stripe>
<stripe name="NOP" varset="FE_OPCODE" variants="NOP"> <!-- size="4" -->
<reg32 offset="0x00000" name="HEADER">
<bitfield high="31" low="27" name="OP">
<value value="3" name="NOP" brief="No operation"/>
</bitfield>
</reg32>
<!-- NOP has no arguments -->
</stripe>
<stripe name="DRAW_2D" varset="FE_OPCODE" variants="DRAW_2D">
<doc>
Draw rectangles with the 2D engine.
Up to 256 rectangles can be rendered with one command.
After the header follows one padding word, and after this the specified amount of
rectangles follow in (top,left) (bottom,right) format.
Rectangles can have every size from one pixel to the size of the entire image, bounded
by the clipping rectangle.
In the case of drawing lines, the (top,left) and (bottom,right) will be used as inclusive
endpoints of the line.
</doc>
<reg32 offset="0x00000" name="HEADER">
<bitfield high="15" low="8" name="COUNT" brief="Number of rectangles to send">
<doc>
Number of rectangles to be rendered with this command.
</doc>
</bitfield>
<bitfield high="26" low="16" name="DATA_COUNT" brief="Number of 32-bit data words to send"/>
<bitfield high="31" low="27" name="OP">
<value value="4" name="DRAW_2D" brief="Draw 2D"/>
</bitfield>
</reg32>
<!-- 2 words per rectangle follow, aligned to 64 bit -->
<reg32 offset="0x00008" name="TOP_LEFT">
<doc>
Top left coordinates are inclusive.
</doc>
<bitfield high="15" low="0" name="X"/>
<bitfield high="31" low="16" name="Y"/>
</reg32>
<reg32 offset="0x0000C" name="BOTTOM_RIGHT">
<doc>
Bottom right coordinates are exclusive.
</doc>
<bitfield high="15" low="0" name="X"/>
<bitfield high="31" low="16" name="Y"/>
</reg32>
<!-- Data words follow, aligned to 64 bit -->
</stripe>
<stripe name="DRAW_PRIMITIVES" varset="FE_OPCODE" variants="DRAW_PRIMITIVES"> <!-- size="16" -->
<reg32 offset="0x00000" name="HEADER">
<bitfield high="31" low="27" name="OP">
<value value="5" name="DRAW_PRIMITIVES" brief="Draw 3D primitives"/>
</bitfield>
</reg32>
<reg32 offset="0x00004" name="COMMAND" brief="Primitive type">
<bitfield high="7" low="0" name="TYPE" type="PRIMITIVE_TYPE"/>
</reg32>
<reg32 offset="0x00008" name="START" brief="Index of the first vertex to load">
</reg32>
<reg32 offset="0x0000C" name="COUNT" brief="Number of primitives to render">
<doc>
In case of a triangle strip or other concatenated primitive, this is the actual number of lines
or triangles to render.
</doc>
</reg32>
</stripe>
<stripe name="DRAW_INDEXED_PRIMITIVES" varset="FE_OPCODE" variants="DRAW_INDEXED_PRIMITIVES"> <!-- size="20" -->
<reg32 offset="0x00000" name="HEADER">
<bitfield high="31" low="27" name="OP">
<value value="6" name="DRAW_INDEXED_PRIMITIVES" brief="Draw 3D indexed primitives"/>
</bitfield>
</reg32>
<reg32 offset="0x00004" name="COMMAND">
<bitfield high="7" low="0" name="TYPE" type="PRIMITIVE_TYPE"/>
</reg32>
<reg32 offset="0x00008" name="START" brief="Index of the first index to load">
</reg32>
<reg32 offset="0x0000C" name="COUNT" brief="Number of primitives to render">
</reg32>
<reg32 offset="0x00010" name="OFFSET" brief="Offset added to the retrieved indices">
</reg32>
</stripe>
<stripe name="WAIT" varset="FE_OPCODE" variants="WAIT"> <!-- size="4" -->
<reg32 offset="0x00000" name="HEADER">
<bitfield high="15" low="0" name="DELAY" brief="Number of cycles to wait until the next command gets fetched"/>
<bitfield high="31" low="27" name="OP">
<value value="7" name="WAIT"/>
</bitfield>
</reg32>
<!-- WAIT has no arguments -->
</stripe>
<stripe name="LINK" varset="FE_OPCODE" variants="LINK"> <!-- size="8" -->
<reg32 offset="0x00000" name="HEADER">
<bitfield high="15" low="0" name="PREFETCH" brief="Number of 64-bit words to fetch">
<doc>Make sure this number is not too low,
nothing else will be fetched. So, make sure that the last command in the
new command buffer is either an END, a LINK, a CALL, or a RETURN.
</doc>
</bitfield>
<bitfield high="31" low="27" name="OP">
<value value="8" name="LINK" brief="Transfer control flow"/>
</bitfield>
</reg32>
<reg32 offset="0x00004" name="ADDRESS">
</reg32>
</stripe>
<stripe name="STALL" varset="FE_OPCODE" variants="STALL"> <!-- size="8" -->
<reg32 offset="0x00000" name="HEADER">
<bitfield high="31" low="27" name="OP">
<value value="9" name="STALL" brief="Stall command queue"/>
</bitfield>
</reg32>
<reg32 offset="0x00004" name="TOKEN">
<bitfield high="4" low="0" name="FROM" type="SYNC_RECIPIENT"/>
<bitfield high="12" low="8" name="TO" type="SYNC_RECIPIENT"/>
</reg32>
</stripe>
<stripe name="CALL" varset="FE_OPCODE" variants="CALL"> <!-- size="16" -->
<reg32 offset="0x00000" name="HEADER">
<bitfield high="15" low="0" name="PREFETCH" brief="Number of 64-bit words to fetch">
<doc>Make sure this number is not too low,
nothing else will be fetched. So, make sure that the last command in the
new command buffer is either an END, a LINK, a CALL, or a RETURN.
</doc>
</bitfield>
<bitfield high="31" low="27" name="OP">
<value value="10" name="CALL"/>
</bitfield>
</reg32>
<reg32 offset="0x00004" name="ADDRESS"/>
<reg32 offset="0x00008" name="RETURN_PREFETCH" brief="Number of 64-bit words to fetch after a Return has been issued"/>
<reg32 offset="0x0000C" name="RETURN_ADDRESS"/>
</stripe>
<stripe name="RETURN" varset="FE_OPCODE" variants="RETURN"> <!-- size="4" -->
<reg32 offset="0x00000" name="HEADER">
<bitfield high="31" low="27" name="OP">
<value value="11" name="RETURN"/>
</bitfield>
</reg32>
<!-- RETURN has no arguments -->
</stripe>
<!-- GC6000 only -->
<stripe name="CHIP_SELECT" varset="FE_OPCODE" variants="CHIP_SELECT"> <!-- size="4" -->
<reg32 offset="0x00000" name="HEADER">
<bitfield high="31" low="27" name="OP">
<value value="13" name="CHIP_SELECT" brief="Chip select mask"/>
</bitfield>
<bitfield pos="15" name="ENABLE_CHIP15"/>
<bitfield pos="14" name="ENABLE_CHIP14"/>
<bitfield pos="13" name="ENABLE_CHIP13"/>
<bitfield pos="12" name="ENABLE_CHIP12"/>
<bitfield pos="11" name="ENABLE_CHIP11"/>
<bitfield pos="10" name="ENABLE_CHIP10"/>
<bitfield pos="9" name="ENABLE_CHIP9"/>
<bitfield pos="8" name="ENABLE_CHIP8"/>
<bitfield pos="7" name="ENABLE_CHIP7"/>
<bitfield pos="6" name="ENABLE_CHIP6"/>
<bitfield pos="5" name="ENABLE_CHIP5"/>
<bitfield pos="4" name="ENABLE_CHIP4"/>
<bitfield pos="3" name="ENABLE_CHIP3"/>
<bitfield pos="2" name="ENABLE_CHIP2"/>
<bitfield pos="1" name="ENABLE_CHIP1"/>
<bitfield pos="0" name="ENABLE_CHIP0"/>
</reg32>
<!-- CHIP_SELECT has no arguments -->
</stripe>
</domain>
</database>
|