Minor r200 vertex program cleanups. Remove disabled leftovers from r300 vertex progra...
[mesa.git] / src / mesa / drivers / dri / glcore / glcore_driver.c
1 /*
2 * Copyright 2006 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 "Software"),
6 * to deal in the Software without restriction, including without limitation
7 * on the rights to use, copy, modify, merge, publish, distribute, sub
8 * license, and/or sell copies of the Software, and to permit persons to whom
9 * the Software is furnished to do so, subject to the following conditions:
10 *
11 * The above copyright notice and this permission notice (including the next
12 * paragraph) shall be included in all copies or substantial portions of the
13 * Software.
14 *
15 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
18 * THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
19 * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
20 * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
21 */
22
23 /*
24 * This implements a software-only "DRI" driver. It doesn't actually speak
25 * any DRI protocol or talk to the DRM, it just looks enough like a DRI driver
26 * that libglx in the server can load it for software rendering in the
27 * unaccelerated case.
28 */
29
30 static GLboolean
31 glcoreInitDriver(__DRIscreenPrivate *driScreenPriv)
32 {
33 }
34
35 static void
36 glcoreDestroyScreen(__DRIScreenPrivate *driScreenPriv)
37 {
38 }
39
40 static GLboolean
41 glcoreCreateContext(const __GLcontextModes *glVisual,
42 __DRIcontextPrivate *driContextPriv,
43 void *shared_context)
44 {
45 }
46
47 static void
48 glcoreDestroyContext(__DRIcontextPrivate *driContextPriv)
49 {
50 }
51
52 static GLboolean
53 glcoreCreateBuffer(__DRIscreenPrivate *driScreenPriv,
54 __DRIdrawablePrivate *driDrawablePriv,
55 const __GLcontextModes *mesaVisual,
56 GLboolean isPixmap)
57 {
58 }
59
60 static void
61 glcoreDestroyBuffer(__DRIdrawablePrivate *driDrawablePriv)
62 {
63 }
64
65 static void
66 glcoreSwapBuffers(__DRIdrawablePrivate *driDrawablePriv)
67 {
68 }
69
70 static GLboolean
71 glcoreMakeCurrent(__DRIcontextPrivate *driContextPriv,
72 __DRIdrawablePrivate *driDrawablePriv,
73 __DRIdrawablePrivate *driReadablePriv)
74 {
75 }
76
77 static GLboolean
78 glcoreUnbindContext(__DRIcontextPrivate *driContextPriv)
79 {
80 }
81
82 static struct __DriverAPIRec glcore_api = {
83 .InitDriver = glcoreInitDriver,
84 .DestroyScreen = glcoreDestroyScreen,
85 .CreateContext = glcoreCreateContext,
86 .DestroyContext = glcoreDestroyContext,
87 .CreateBuffer = glcoreCreateBuffer,
88 .DestroyBuffer = glcoreDestroyBuffer,
89 .SwapBuffers = glcoreSwapBuffers,
90 .MakeCurrent = glcoreMakeCurrent,
91 .UnbindContext = glcoreUnbindContext,
92 };
93
94 static __GLcontextModes *
95 glcoreFillInModes(unsigned pixel_bits)
96 {
97 }
98
99 PUBLIC void *
100 __driCreateNewScreen_20050727(__DRInativeDisplay *dpy, int scrn,
101 __DRIscreen *psc, const __GLcontextModes *modes,
102 const __DRIversion *ddx_version,
103 const __DRIversion *dri_version,
104 const __DRIversion *drm_version,
105 const __DRIframebuffer *fb, drmAddress pSarea,
106 int fd, int internal_api_version,
107 const ___DRIinterfaceMethods *interface,
108 __GLcontextModes **driver_modes)
109 {
110 __DRIscreenPrivate *driScreenPriv;
111 glcoreDriverPrivate *glcoreDriverPriv;
112
113 /* would normally check ddx/dri/drm versions here */
114
115 driScreenPriv = __driUtilCreateNewScreen(dpy, scrn, psc, NULL, ddx_version,
116 dri_version, drm_version, fb,
117 internal_api_version, &glcore_api);
118 if (!driScreenPriv)
119 return NULL;
120
121 glcoreDriverPriv = driScreenPriv->pDrvPriv;
122
123 *driver_modes = glcoreFillInModes(glcoreDriverPriv->bpp);
124
125 driInitExtensions(NULL, NULL, GL_FALSE);
126
127 return driScreenPriv;
128 }