-
Notifications
You must be signed in to change notification settings - Fork 6
/
dri2.proto
272 lines (242 loc) · 5.59 KB
/
dri2.proto
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
270
271
272
# This file is part of "xtrace"
# Copyright (C) 2010 Julien Cristau
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License version 2 as
# published by the Free Software Foundation.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
#
# This file is based on /usr/include/X11/extensions/dri2proto.h which states:
#
# Copyright © 2008 Red Hat, Inc.
#
# Permission is hereby granted, free of charge, to any person obtaining a
# copy of this software and associated documentation files (the "Soft-
# ware"), to deal in the Software without restriction, including without
# limitation the rights to use, copy, modify, merge, publish, distribute,
# and/or sell copies of the Software, and to permit persons to whom the
# Software is furnished to do so, provided that the above copyright
# notice(s) and this permission notice appear in all copies of the Soft-
# ware and that both the above copyright notice(s) and this permission
# notice appear in supporting documentation.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL-
# ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF THIRD PARTY
# RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS INCLUDED IN
# THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT OR CONSE-
# QUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
# DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
# TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFOR-
# MANCE OF THIS SOFTWARE.
#
# Except as contained in this notice, the name of a copyright holder shall
# not be used in advertising or otherwise to promote the sale, use or
# other dealings in this Software without prior written authorization of
# the copyright holder.
#
# Authors:
# Kristian Høgsberg (krh@redhat.com)
#
NEEDS "fixes.proto"
EXTENSION "DRI2" DRI2
USE core
REQUESTS
QueryVersion RESPONDS
Connect RESPONDS
Authenticate RESPONDS
CreateDrawable
DestroyDrawable
GetBuffers RESPONDS
CopyRegion RESPONDS
GetBuffersWithFormat RESPONDS
SwapBuffers RESPONDS
GetMSC RESPONDS
WaitMSC RESPONDS
WaitSBC RESPONDS
SwapInterval
END
EVENTS
BufferSwapComplete
InvalidateBuffers
END
ERRORS
END
REQUEST QueryVersion
4 major-version UINT32
8 minor-version UINT32
END
RESPONSE QueryVersion
8 major-version UINT32
12 minor-version UINT32
END
CONSTANTS driver_type
0 DRI
1 VDPAU
END
REQUEST Connect
4 window WINDOW
8 driver-type ENUM32 driver_type
END
RESPONSE Connect
8 driver-name-len COUNT32
32 driver-name STRING8
12 device-name-len COUNT32
ROUND
LATER device-name STRING8
END
REQUEST Authenticate
4 window WINDOW
8 token CARD32
END
RESPONSE Authenticate
8 authenticated ENUM32 bool
END
REQUEST CreateDrawable
4 drawable DRAWABLE
END
REQUEST DestroyDrawable
4 drawable DRAWABLE
END
CONSTANTS attachment
0x0 FrontLeft
0x1 BackLeft
0x2 FrontRight
0x3 BackRight
0x4 Depth
0x5 Stencil
0x6 Accum
0x7 FakeFrontLeft
0x8 FakeFrontRight
0x9 DepthStencil
END
TYPE DRI2ATTACHMENT ENUM32 attachment
LIST DRI2ATTACHMENT length 4
0 attachment DRI2ATTACHMENT
END
LIST DRI2BUFFER length 20
0 attachment DRI2ATTACHMENT
4 name CARD32
8 pitch UINT32
12 cpp UINT32
16 flags CARD32
END
REQUEST GetBuffers
4 drawable DRAWABLE
8 count COUNT32
12 attachments LISTofDRI2ATTACHMENT
END
RESPONSE GetBuffers
8 width UINT32
12 height UINT32
16 count COUNT32
32 buffers LISTofDRI2BUFFER
END
REQUEST CopyRegion
4 drawable DRAWABLE
8 region Fixes::REGION
12 dest DRI2ATTACHMENT
16 src DRI2ATTACHMENT
END
RESPONSE CopyRegion
END
LIST DRI2ATTACH_FORMAT length 8
0 attachment DRI2ATTACHMENT
4 format CARD32
END
REQUEST GetBuffersWithFormat
4 drawable DRAWABLE
8 count COUNT32
12 attachments LISTofDRI2ATTACH_FORMAT
END
RESPONSE GetBuffersWithFormat
8 width UINT32
12 height UINT32
16 count COUNT32
32 buffers LISTofDRI2BUFFER
END
REQUEST SwapBuffers
4 drawable DRAWABLE
8 target_msc_hi UINT32
12 target_msc_lo UINT32
16 divisor_hi UINT32
20 divisor_lo UINT32
24 remainder_hi UINT32
28 remainder_lo UINT32
END
RESPONSE SwapBuffers
8 swap_hi UINT32
12 swap_lo UINT32
END
REQUEST GetMSC
4 drawable DRAWABLE
END
RESPONSE GetMSC
8 ust_hi UINT32
12 ust_lo UINT32
16 msc_hi UINT32
20 msc_lo UINT32
24 sbc_hi UINT32
28 sbc_lo UINT32
END
REQUEST WaitMSC
4 drawable DRAWABLE
8 target_msc_hi UINT32
12 target_msc_lo UINT32
16 divisor_hi UINT32
20 divisor_lo UINT32
24 remainder_hi UINT32
28 remainder_lo UINT32
END
RESPONSE WaitMSC
8 ust_hi UINT32
12 ust_lo UINT32
16 msc_hi UINT32
20 msc_lo UINT32
24 sbc_hi UINT32
28 sbc_lo UINT32
END
REQUEST WaitSBC
4 drawable DRAWABLE
8 target_sbc_hi UINT32
12 target_sbc_lo UINT32
END
RESPONSE WaitSBC
8 ust_hi UINT32
12 ust_lo UINT32
16 msc_hi UINT32
20 msc_lo UINT32
24 sbc_hi UINT32
28 sbc_lo UINT32
END
REQUEST SwapInterval
4 drawable DRAWABLE
8 interval UINT32
END
CONSTANTS event_type
1 ExchangeComplete
2 BlitComplete
3 FlipComplete
END
TYPE EVENT_TYPE ENUM16 event_type
EVENT BufferSwapComplete
4 event_type EVENT_TYPE
8 drawable DRAWABLE
12 ust_hi UINT32
16 ust_lo UINT32
20 msc_hi UINT32
24 msc_lo UINT32
28 sbc_hi UINT32
32 sbc_lo UINT32
END
EVENT InvalidateBuffers
4 drawable DRAWABLE
END
EOF