xref: /OK3568_Linux_fs/external/xserver/glx/vndservervendor.h (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1*4882a593Smuzhiyun /*
2*4882a593Smuzhiyun  * Copyright (c) 2016, NVIDIA CORPORATION.
3*4882a593Smuzhiyun  *
4*4882a593Smuzhiyun  * Permission is hereby granted, free of charge, to any person obtaining a
5*4882a593Smuzhiyun  * copy of this software and/or associated documentation files (the
6*4882a593Smuzhiyun  * "Materials"), to deal in the Materials without restriction, including
7*4882a593Smuzhiyun  * without limitation the rights to use, copy, modify, merge, publish,
8*4882a593Smuzhiyun  * distribute, sublicense, and/or sell copies of the Materials, and to
9*4882a593Smuzhiyun  * permit persons to whom the Materials are furnished to do so, subject to
10*4882a593Smuzhiyun  * the following conditions:
11*4882a593Smuzhiyun  *
12*4882a593Smuzhiyun  * The above copyright notice and this permission notice shall be included
13*4882a593Smuzhiyun  * unaltered in all copies or substantial portions of the Materials.
14*4882a593Smuzhiyun  * Any additions, deletions, or changes to the original source files
15*4882a593Smuzhiyun  * must be clearly indicated in accompanying documentation.
16*4882a593Smuzhiyun  *
17*4882a593Smuzhiyun  * If only executable code is distributed, then the accompanying
18*4882a593Smuzhiyun  * documentation must state that "this software is based in part on the
19*4882a593Smuzhiyun  * work of the Khronos Group."
20*4882a593Smuzhiyun  *
21*4882a593Smuzhiyun  * THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
22*4882a593Smuzhiyun  * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
23*4882a593Smuzhiyun  * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
24*4882a593Smuzhiyun  * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
25*4882a593Smuzhiyun  * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
26*4882a593Smuzhiyun  * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
27*4882a593Smuzhiyun  * MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
28*4882a593Smuzhiyun  */
29*4882a593Smuzhiyun 
30*4882a593Smuzhiyun #ifndef VND_SERVER_VENDOR_H
31*4882a593Smuzhiyun #define VND_SERVER_VENDOR_H
32*4882a593Smuzhiyun 
33*4882a593Smuzhiyun #include <dix-config.h>
34*4882a593Smuzhiyun 
35*4882a593Smuzhiyun #include "glxvndabi.h"
36*4882a593Smuzhiyun #include "list.h"
37*4882a593Smuzhiyun 
38*4882a593Smuzhiyun #if defined(__cplusplus)
39*4882a593Smuzhiyun extern "C" {
40*4882a593Smuzhiyun #endif
41*4882a593Smuzhiyun 
42*4882a593Smuzhiyun /**
43*4882a593Smuzhiyun  * Info related to a single vendor library.
44*4882a593Smuzhiyun  */
45*4882a593Smuzhiyun struct GlxServerVendorRec {
46*4882a593Smuzhiyun     GlxServerImports glxvc;
47*4882a593Smuzhiyun 
48*4882a593Smuzhiyun     struct xorg_list entry;
49*4882a593Smuzhiyun };
50*4882a593Smuzhiyun 
51*4882a593Smuzhiyun /**
52*4882a593Smuzhiyun  * A linked list of vendor libraries.
53*4882a593Smuzhiyun  *
54*4882a593Smuzhiyun  * Note that this list only includes vendor libraries that were successfully
55*4882a593Smuzhiyun  * initialized.
56*4882a593Smuzhiyun  */
57*4882a593Smuzhiyun extern struct xorg_list GlxVendorList;
58*4882a593Smuzhiyun 
59*4882a593Smuzhiyun GlxServerVendor *GlxCreateVendor(const GlxServerImports *imports);
60*4882a593Smuzhiyun void GlxDestroyVendor(GlxServerVendor *vendor);
61*4882a593Smuzhiyun 
62*4882a593Smuzhiyun void GlxVendorExtensionReset(const ExtensionEntry *extEntry);
63*4882a593Smuzhiyun 
64*4882a593Smuzhiyun #if defined(__cplusplus)
65*4882a593Smuzhiyun }
66*4882a593Smuzhiyun #endif
67*4882a593Smuzhiyun 
68*4882a593Smuzhiyun #endif // VND_SERVER_VENDOR_H
69