xref: /OK3568_Linux_fs/external/xserver/glx/indirect_util.h (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1*4882a593Smuzhiyun /*
2*4882a593Smuzhiyun  * (C) Copyright IBM Corporation 2005
3*4882a593Smuzhiyun  * All Rights Reserved.
4*4882a593Smuzhiyun  *
5*4882a593Smuzhiyun  * Permission is hereby granted, free of charge, to any person obtaining a
6*4882a593Smuzhiyun  * copy of this software and associated documentation files (the "Software"),
7*4882a593Smuzhiyun  * to deal in the Software without restriction, including without limitation
8*4882a593Smuzhiyun  * the rights to use, copy, modify, merge, publish, distribute, sub license,
9*4882a593Smuzhiyun  * and/or sell copies of the Software, and to permit persons to whom the
10*4882a593Smuzhiyun  * Software is furnished to do so, subject to the following conditions:
11*4882a593Smuzhiyun  *
12*4882a593Smuzhiyun  * The above copyright notice and this permission notice (including the next
13*4882a593Smuzhiyun  * paragraph) shall be included in all copies or substantial portions of the
14*4882a593Smuzhiyun  * Software.
15*4882a593Smuzhiyun  *
16*4882a593Smuzhiyun  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17*4882a593Smuzhiyun  * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18*4882a593Smuzhiyun  * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.  IN NO EVENT SHALL
19*4882a593Smuzhiyun  * IBM,
20*4882a593Smuzhiyun  * AND/OR THEIR SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
21*4882a593Smuzhiyun  * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
22*4882a593Smuzhiyun  * OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
23*4882a593Smuzhiyun  * SOFTWARE.
24*4882a593Smuzhiyun  */
25*4882a593Smuzhiyun 
26*4882a593Smuzhiyun #ifndef __GLX_INDIRECT_UTIL_H__
27*4882a593Smuzhiyun #define __GLX_INDIRECT_UTIL_H__
28*4882a593Smuzhiyun 
29*4882a593Smuzhiyun extern GLint __glGetBooleanv_variable_size(GLenum e);
30*4882a593Smuzhiyun 
31*4882a593Smuzhiyun extern void *__glXGetAnswerBuffer(__GLXclientState * cl,
32*4882a593Smuzhiyun                                   size_t required_size, void *local_buffer,
33*4882a593Smuzhiyun                                   size_t local_size, unsigned alignment);
34*4882a593Smuzhiyun 
35*4882a593Smuzhiyun extern void __glXSendReply(ClientPtr client, const void *data,
36*4882a593Smuzhiyun                            size_t elements, size_t element_size,
37*4882a593Smuzhiyun                            GLboolean always_array, CARD32 retval);
38*4882a593Smuzhiyun 
39*4882a593Smuzhiyun extern void __glXSendReplySwap(ClientPtr client, const void *data,
40*4882a593Smuzhiyun                                size_t elements, size_t element_size,
41*4882a593Smuzhiyun                                GLboolean always_array, CARD32 retval);
42*4882a593Smuzhiyun 
43*4882a593Smuzhiyun struct __glXDispatchInfo;
44*4882a593Smuzhiyun 
45*4882a593Smuzhiyun extern void *__glXGetProtocolDecodeFunction(const struct __glXDispatchInfo
46*4882a593Smuzhiyun                                             *dispatch_info, int opcode,
47*4882a593Smuzhiyun                                             int swapped_version);
48*4882a593Smuzhiyun 
49*4882a593Smuzhiyun extern int __glXGetProtocolSizeData(const struct __glXDispatchInfo
50*4882a593Smuzhiyun                                     *dispatch_info, int opcode,
51*4882a593Smuzhiyun                                     __GLXrenderSizeData * data);
52*4882a593Smuzhiyun 
53*4882a593Smuzhiyun #endif                          /* __GLX_INDIRECT_UTIL_H__ */
54