OSDN Git Service

Upload latest libVA library
[android-x86/hardware-intel-common-libva.git] / libva / src / X11 / va_dri2str.h
1 /*
2  * Copyright © 2008 Red Hat, Inc.
3  *
4  * Permission is hereby granted, free of charge, to any person obtaining a
5  * copy of this software and associated documentation files (the "Soft-
6  * ware"), to deal in the Software without restriction, including without
7  * limitation the rights to use, copy, modify, merge, publish, distribute,
8  * and/or sell copies of the Software, and to permit persons to whom the
9  * Software is furnished to do so, provided that the above copyright
10  * notice(s) and this permission notice appear in all copies of the Soft-
11  * ware and that both the above copyright notice(s) and this permission
12  * notice appear in supporting documentation.
13  *
14  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
15  * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL-
16  * ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF THIRD PARTY
17  * RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS INCLUDED IN
18  * THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT OR CONSE-
19  * QUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
20  * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
21  * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFOR-
22  * MANCE OF THIS SOFTWARE.
23  *
24  * Except as contained in this notice, the name of a copyright holder shall
25  * not be used in advertising or otherwise to promote the sale, use or
26  * other dealings in this Software without prior written authorization of
27  * the copyright holder.
28  *
29  * Authors:
30  *   Kristian Høgsberg (krh@redhat.com)
31  */
32
33 #ifndef _DRI2_PROTO_H_
34 #define _DRI2_PROTO_H_
35
36 #define DRI2_NAME                       "DRI2"
37 #define DRI2_MAJOR                      1
38 #define DRI2_MINOR                      0
39
40 #define DRI2NumberErrors                0
41 #define DRI2NumberEvents                0
42 #define DRI2NumberRequests              7
43
44 #define X_DRI2QueryVersion              0
45 #define X_DRI2Connect                   1
46 #define X_DRI2Authenticate              2
47 #define X_DRI2CreateDrawable            3
48 #define X_DRI2DestroyDrawable           4
49 #define X_DRI2GetBuffers                5
50 #define X_DRI2CopyRegion                6
51
52 typedef struct {
53     CARD32  attachment B32;
54     CARD32  name B32;
55     CARD32  pitch B32;
56     CARD32  cpp B32;
57     CARD32  flags B32;
58 } xDRI2Buffer;
59
60 typedef struct {
61     CARD8   reqType;
62     CARD8   dri2ReqType;
63     CARD16  length B16;
64     CARD32  majorVersion B32;
65     CARD32  minorVersion B32;
66 } xDRI2QueryVersionReq;
67 #define sz_xDRI2QueryVersionReq   12
68
69 typedef struct {
70     BYTE    type;   /* X_Reply */
71     BYTE    pad1;
72     CARD16  sequenceNumber B16;
73     CARD32  length B32;
74     CARD32  majorVersion B32;
75     CARD32  minorVersion B32;
76     CARD32  pad2 B32;
77     CARD32  pad3 B32;
78     CARD32  pad4 B32;
79     CARD32  pad5 B32;
80 } xDRI2QueryVersionReply;
81 #define sz_xDRI2QueryVersionReply       32
82
83 typedef struct {
84     CARD8   reqType;
85     CARD8   dri2ReqType;
86     CARD16  length B16;
87     CARD32  window B32;
88     CARD32  driverType B32;
89 } xDRI2ConnectReq;
90 #define sz_xDRI2ConnectReq      12
91
92 typedef struct {
93     BYTE    type;   /* X_Reply */
94     BYTE    pad1;
95     CARD16  sequenceNumber B16;
96     CARD32  length B32;
97     CARD32  driverNameLength B32;
98     CARD32  deviceNameLength B32;
99     CARD32  pad2 B32;
100     CARD32  pad3 B32;
101     CARD32  pad4 B32;
102     CARD32  pad5 B32;
103 } xDRI2ConnectReply;
104 #define sz_xDRI2ConnectReply    32
105
106 typedef struct {
107     CARD8   reqType;
108     CARD8   dri2ReqType;
109     CARD16  length B16;
110     CARD32  window B32;
111     CARD32  magic B32;
112 } xDRI2AuthenticateReq;
113 #define sz_xDRI2AuthenticateReq   12
114
115 typedef struct {
116     BYTE    type;   /* X_Reply */
117     BYTE    pad1;
118     CARD16  sequenceNumber B16;
119     CARD32  length B32;
120     CARD32  authenticated B32;
121     CARD32  pad2 B32;
122     CARD32  pad3 B32;
123     CARD32  pad4 B32;
124     CARD32  pad5 B32;
125     CARD32  pad6 B32;
126 } xDRI2AuthenticateReply;
127 #define sz_xDRI2AuthenticateReply       32
128
129 typedef struct {
130     CARD8   reqType;
131     CARD8   dri2ReqType;
132     CARD16  length B16;
133     CARD32  drawable B32;
134 } xDRI2CreateDrawableReq;
135 #define sz_xDRI2CreateDrawableReq   8
136
137 typedef struct {
138     CARD8   reqType;
139     CARD8   dri2ReqType;
140     CARD16  length B16;
141     CARD32  drawable B32;
142 } xDRI2DestroyDrawableReq;
143 #define sz_xDRI2DestroyDrawableReq   8
144
145 typedef struct {
146     CARD8   reqType;
147     CARD8   dri2ReqType;
148     CARD16  length B16;
149     CARD32  drawable B32;
150     CARD32  count B32;
151 } xDRI2GetBuffersReq;
152 #define sz_xDRI2GetBuffersReq   12
153
154 typedef struct {
155     BYTE    type;   /* X_Reply */
156     BYTE    pad1;
157     CARD16  sequenceNumber B16;
158     CARD32  length B32;
159     CARD32  width B32;
160     CARD32  height B32;
161     CARD32  count B32;
162     CARD32  pad2 B32;
163     CARD32  pad3 B32;
164     CARD32  pad4 B32;
165 } xDRI2GetBuffersReply;
166 #define sz_xDRI2GetBuffersReply 32
167
168 typedef struct {
169     CARD8   reqType;
170     CARD8   dri2ReqType;
171     CARD16  length B16;
172     CARD32  drawable B32;
173     CARD32  region B32;
174     CARD32  dest B32;
175     CARD32  src B32;
176 } xDRI2CopyRegionReq;
177 #define sz_xDRI2CopyRegionReq   20
178
179 typedef struct {
180     BYTE    type;   /* X_Reply */
181     BYTE    pad1;
182     CARD16  sequenceNumber B16;
183     CARD32  length B32;
184     CARD32  pad2 B32;
185     CARD32  pad3 B32;
186     CARD32  pad4 B32;
187     CARD32  pad5 B32;
188     CARD32  pad6 B32;
189     CARD32  pad7 B32;
190 } xDRI2CopyRegionReply;
191 #define sz_xDRI2CopyRegionReply 32
192
193 #endif