2 * Copyright 2008 George Sapountzis
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 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8 * and/or sell copies of the Software, and to permit persons to whom the
9 * Software is furnished to do so, subject to the following conditions:
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
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 NONINFRINGEMENT. IN NO EVENT SHALL
18 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
24 #if defined(GLX_DIRECT_RENDERING) && !defined(GLX_USE_APPLEGL)
27 #include "glxclient.h"
29 #include "dri_common.h"
30 #include "drisw_priv.h"
33 XCreateDrawable(struct drisw_drawable
* pdp
,
34 Display
* dpy
, XID drawable
, int visualid
)
42 pdp
->gc
= XCreateGC(dpy
, drawable
, 0, NULL
);
43 pdp
->swapgc
= XCreateGC(dpy
, drawable
, 0, NULL
);
45 gcvalues
.function
= GXcopy
;
46 gcvalues
.graphics_exposures
= False
;
47 XChangeGC(dpy
, pdp
->gc
, GCFunction
, &gcvalues
);
48 XChangeGC(dpy
, pdp
->swapgc
, GCFunction
, &gcvalues
);
49 XChangeGC(dpy
, pdp
->swapgc
, GCGraphicsExposures
, &gcvalues
);
52 visTemp
.visualid
= visualid
;
53 visMask
= VisualIDMask
;
54 pdp
->visinfo
= XGetVisualInfo(dpy
, visMask
, &visTemp
, &num_visuals
);
56 if (!pdp
->visinfo
|| num_visuals
== 0)
60 pdp
->ximage
= XCreateImage(dpy
,
63 ZPixmap
, 0, /* format, offset */
65 0, 0, /* width, height */
67 0); /* bytes_per_line */
70 * swrast does not handle 24-bit depth with 24 bpp, so let X do the
71 * the conversion for us.
73 if (pdp
->ximage
->bits_per_pixel
== 24)
74 pdp
->ximage
->bits_per_pixel
= 32;
80 XDestroyDrawable(struct drisw_drawable
* pdp
, Display
* dpy
, XID drawable
)
82 XDestroyImage(pdp
->ximage
);
85 XFreeGC(dpy
, pdp
->gc
);
86 XFreeGC(dpy
, pdp
->swapgc
);
90 * swrast loader functions
94 swrastGetDrawableInfo(__DRIdrawable
* draw
,
95 int *x
, int *y
, int *w
, int *h
,
98 struct drisw_drawable
*pdp
= loaderPrivate
;
99 __GLXDRIdrawable
*pdraw
= &(pdp
->base
);
100 Display
*dpy
= pdraw
->psc
->dpy
;
104 unsigned uw
, uh
, bw
, depth
;
106 drawable
= pdraw
->xDrawable
;
108 XGetGeometry(dpy
, drawable
, &root
, x
, y
, &uw
, &uh
, &bw
, &depth
);
114 * Align renderbuffer pitch.
116 * This should be chosen by the driver and the loader (libGL, xserver/glx)
117 * should use the driver provided pitch.
119 * It seems that the xorg loader (that is the xserver loading swrast_dri for
120 * indirect rendering, not client-side libGL) requires that the pitch is
121 * exactly the image width padded to 32 bits. XXX
123 * The above restriction can probably be overcome by using ScratchPixmap and
124 * CopyArea in the xserver, similar to ShmPutImage, and setting the width of
125 * the scratch pixmap to 'pitch / cpp'.
128 bytes_per_line(unsigned pitch_bits
, unsigned mul
)
130 unsigned mask
= mul
- 1;
132 return ((pitch_bits
+ mask
) & ~mask
) / 8;
136 swrastPutImage2(__DRIdrawable
* draw
, int op
,
137 int x
, int y
, int w
, int h
, int stride
,
138 char *data
, void *loaderPrivate
)
140 struct drisw_drawable
*pdp
= loaderPrivate
;
141 __GLXDRIdrawable
*pdraw
= &(pdp
->base
);
142 Display
*dpy
= pdraw
->psc
->dpy
;
148 case __DRI_SWRAST_IMAGE_OP_DRAW
:
151 case __DRI_SWRAST_IMAGE_OP_SWAP
:
158 drawable
= pdraw
->xDrawable
;
160 ximage
= pdp
->ximage
;
164 ximage
->bytes_per_line
= stride
? stride
: bytes_per_line(w
* ximage
->bits_per_pixel
, 32);
166 XPutImage(dpy
, drawable
, gc
, ximage
, 0, 0, x
, y
, w
, h
);
172 swrastPutImage(__DRIdrawable
* draw
, int op
,
173 int x
, int y
, int w
, int h
,
174 char *data
, void *loaderPrivate
)
176 swrastPutImage2(draw
, op
, x
, y
, w
, h
, 0, data
, loaderPrivate
);
180 swrastGetImage2(__DRIdrawable
* read
,
181 int x
, int y
, int w
, int h
, int stride
,
182 char *data
, void *loaderPrivate
)
184 struct drisw_drawable
*prp
= loaderPrivate
;
185 __GLXDRIdrawable
*pread
= &(prp
->base
);
186 Display
*dpy
= pread
->psc
->dpy
;
190 readable
= pread
->xDrawable
;
192 ximage
= prp
->ximage
;
196 ximage
->bytes_per_line
= stride
? stride
: bytes_per_line(w
* ximage
->bits_per_pixel
, 32);
198 XGetSubImage(dpy
, readable
, x
, y
, w
, h
, ~0L, ZPixmap
, ximage
, 0, 0);
204 swrastGetImage(__DRIdrawable
* read
,
205 int x
, int y
, int w
, int h
,
206 char *data
, void *loaderPrivate
)
208 swrastGetImage2(read
, x
, y
, w
, h
, 0, data
, loaderPrivate
);
211 static const __DRIswrastLoaderExtension swrastLoaderExtension
= {
212 .base
= {__DRI_SWRAST_LOADER
, 3 },
214 .getDrawableInfo
= swrastGetDrawableInfo
,
215 .putImage
= swrastPutImage
,
216 .getImage
= swrastGetImage
,
217 .putImage2
= swrastPutImage2
,
218 .getImage2
= swrastGetImage2
,
221 static const __DRIextension
*loader_extensions
[] = {
222 &swrastLoaderExtension
.base
,
231 drisw_destroy_context(struct glx_context
*context
)
233 struct drisw_context
*pcp
= (struct drisw_context
*) context
;
234 struct drisw_screen
*psc
= (struct drisw_screen
*) context
->psc
;
236 driReleaseDrawables(&pcp
->base
);
238 free((char *) context
->extensions
);
240 (*psc
->core
->destroyContext
) (pcp
->driContext
);
246 drisw_bind_context(struct glx_context
*context
, struct glx_context
*old
,
247 GLXDrawable draw
, GLXDrawable read
)
249 struct drisw_context
*pcp
= (struct drisw_context
*) context
;
250 struct drisw_screen
*psc
= (struct drisw_screen
*) pcp
->base
.psc
;
251 struct drisw_drawable
*pdraw
, *pread
;
253 pdraw
= (struct drisw_drawable
*) driFetchDrawable(context
, draw
);
254 pread
= (struct drisw_drawable
*) driFetchDrawable(context
, read
);
256 driReleaseDrawables(&pcp
->base
);
258 if ((*psc
->core
->bindContext
) (pcp
->driContext
,
259 pdraw
? pdraw
->driDrawable
: NULL
,
260 pread
? pread
->driDrawable
: NULL
))
263 return GLXBadContext
;
267 drisw_unbind_context(struct glx_context
*context
, struct glx_context
*new)
269 struct drisw_context
*pcp
= (struct drisw_context
*) context
;
270 struct drisw_screen
*psc
= (struct drisw_screen
*) pcp
->base
.psc
;
272 (*psc
->core
->unbindContext
) (pcp
->driContext
);
276 drisw_bind_tex_image(Display
* dpy
,
277 GLXDrawable drawable
,
278 int buffer
, const int *attrib_list
)
280 struct glx_context
*gc
= __glXGetCurrentContext();
281 struct drisw_context
*pcp
= (struct drisw_context
*) gc
;
282 __GLXDRIdrawable
*base
= GetGLXDRIDrawable(dpy
, drawable
);
283 struct drisw_drawable
*pdraw
= (struct drisw_drawable
*) base
;
284 struct drisw_screen
*psc
;
286 __glXInitialize(dpy
);
289 psc
= (struct drisw_screen
*) base
->psc
;
294 if (psc
->texBuffer
->base
.version
>= 2 &&
295 psc
->texBuffer
->setTexBuffer2
!= NULL
) {
296 (*psc
->texBuffer
->setTexBuffer2
) (pcp
->driContext
,
297 pdraw
->base
.textureTarget
,
298 pdraw
->base
.textureFormat
,
302 (*psc
->texBuffer
->setTexBuffer
) (pcp
->driContext
,
303 pdraw
->base
.textureTarget
,
310 drisw_release_tex_image(Display
* dpy
, GLXDrawable drawable
, int buffer
)
312 struct glx_context
*gc
= __glXGetCurrentContext();
313 struct drisw_context
*pcp
= (struct drisw_context
*) gc
;
314 __GLXDRIdrawable
*base
= GetGLXDRIDrawable(dpy
, drawable
);
315 struct glx_display
*dpyPriv
= __glXInitialize(dpy
);
316 struct drisw_drawable
*pdraw
= (struct drisw_drawable
*) base
;
317 struct drisw_screen
*psc
;
319 if (dpyPriv
!= NULL
&& pdraw
!= NULL
) {
320 psc
= (struct drisw_screen
*) base
->psc
;
325 if (psc
->texBuffer
->base
.version
>= 3 &&
326 psc
->texBuffer
->releaseTexBuffer
!= NULL
) {
327 (*psc
->texBuffer
->releaseTexBuffer
) (pcp
->driContext
,
328 pdraw
->base
.textureTarget
,
334 static const struct glx_context_vtable drisw_context_vtable
= {
335 .destroy
= drisw_destroy_context
,
336 .bind
= drisw_bind_context
,
337 .unbind
= drisw_unbind_context
,
340 .use_x_font
= DRI_glXUseXFont
,
341 .bind_tex_image
= drisw_bind_tex_image
,
342 .release_tex_image
= drisw_release_tex_image
,
343 .get_proc_address
= NULL
,
346 static struct glx_context
*
347 drisw_create_context(struct glx_screen
*base
,
348 struct glx_config
*config_base
,
349 struct glx_context
*shareList
, int renderType
)
351 struct drisw_context
*pcp
, *pcp_shared
;
352 __GLXDRIconfigPrivate
*config
= (__GLXDRIconfigPrivate
*) config_base
;
353 struct drisw_screen
*psc
= (struct drisw_screen
*) base
;
354 __DRIcontext
*shared
= NULL
;
356 if (!psc
->base
.driScreen
)
359 /* Check the renderType value */
360 if (!validate_renderType_against_config(config_base
, renderType
))
364 /* If the shareList context is not a DRISW context, we cannot possibly
365 * create a DRISW context that shares it.
367 if (shareList
->vtable
->destroy
!= drisw_destroy_context
) {
371 pcp_shared
= (struct drisw_context
*) shareList
;
372 shared
= pcp_shared
->driContext
;
375 pcp
= calloc(1, sizeof *pcp
);
379 if (!glx_context_init(&pcp
->base
, &psc
->base
, &config
->base
)) {
384 pcp
->base
.renderType
= renderType
;
387 (*psc
->core
->createNewContext
) (psc
->driScreen
,
388 config
->driConfig
, shared
, pcp
);
389 if (pcp
->driContext
== NULL
) {
394 pcp
->base
.vtable
= &drisw_context_vtable
;
399 static struct glx_context
*
400 drisw_create_context_attribs(struct glx_screen
*base
,
401 struct glx_config
*config_base
,
402 struct glx_context
*shareList
,
403 unsigned num_attribs
,
404 const uint32_t *attribs
,
407 struct drisw_context
*pcp
, *pcp_shared
;
408 __GLXDRIconfigPrivate
*config
= (__GLXDRIconfigPrivate
*) config_base
;
409 struct drisw_screen
*psc
= (struct drisw_screen
*) base
;
410 __DRIcontext
*shared
= NULL
;
419 uint32_t ctx_attribs
[2 * 5];
420 unsigned num_ctx_attribs
= 0;
422 if (!psc
->base
.driScreen
)
425 if (psc
->swrast
->base
.version
< 3)
428 /* Remap the GLX tokens to DRI2 tokens.
430 if (!dri2_convert_glx_attribs(num_attribs
, attribs
,
431 &major_ver
, &minor_ver
, &renderType
, &flags
,
432 &api
, &reset
, &release
, error
))
435 /* Check the renderType value */
436 if (!validate_renderType_against_config(config_base
, renderType
)) {
440 if (reset
!= __DRI_CTX_RESET_NO_NOTIFICATION
)
443 if (release
!= __DRI_CTX_RELEASE_BEHAVIOR_FLUSH
&&
444 release
!= __DRI_CTX_RELEASE_BEHAVIOR_NONE
)
448 pcp_shared
= (struct drisw_context
*) shareList
;
449 shared
= pcp_shared
->driContext
;
452 pcp
= calloc(1, sizeof *pcp
);
456 if (!glx_context_init(&pcp
->base
, &psc
->base
, config_base
)) {
461 ctx_attribs
[num_ctx_attribs
++] = __DRI_CTX_ATTRIB_MAJOR_VERSION
;
462 ctx_attribs
[num_ctx_attribs
++] = major_ver
;
463 ctx_attribs
[num_ctx_attribs
++] = __DRI_CTX_ATTRIB_MINOR_VERSION
;
464 ctx_attribs
[num_ctx_attribs
++] = minor_ver
;
465 if (release
!= __DRI_CTX_RELEASE_BEHAVIOR_FLUSH
) {
466 ctx_attribs
[num_ctx_attribs
++] = __DRI_CTX_ATTRIB_RELEASE_BEHAVIOR
;
467 ctx_attribs
[num_ctx_attribs
++] = release
;
471 ctx_attribs
[num_ctx_attribs
++] = __DRI_CTX_ATTRIB_FLAGS
;
473 /* The current __DRI_CTX_FLAG_* values are identical to the
474 * GLX_CONTEXT_*_BIT values.
476 ctx_attribs
[num_ctx_attribs
++] = flags
;
479 pcp
->base
.renderType
= renderType
;
482 (*psc
->swrast
->createContextAttribs
) (psc
->driScreen
,
484 config
? config
->driConfig
: 0,
490 if (pcp
->driContext
== NULL
) {
495 pcp
->base
.vtable
= &drisw_context_vtable
;
501 driswDestroyDrawable(__GLXDRIdrawable
* pdraw
)
503 struct drisw_drawable
*pdp
= (struct drisw_drawable
*) pdraw
;
504 struct drisw_screen
*psc
= (struct drisw_screen
*) pdp
->base
.psc
;
506 (*psc
->core
->destroyDrawable
) (pdp
->driDrawable
);
508 XDestroyDrawable(pdp
, pdraw
->psc
->dpy
, pdraw
->drawable
);
512 static __GLXDRIdrawable
*
513 driswCreateDrawable(struct glx_screen
*base
, XID xDrawable
,
514 GLXDrawable drawable
, struct glx_config
*modes
)
516 struct drisw_drawable
*pdp
;
517 __GLXDRIconfigPrivate
*config
= (__GLXDRIconfigPrivate
*) modes
;
518 struct drisw_screen
*psc
= (struct drisw_screen
*) base
;
520 const __DRIswrastExtension
*swrast
= psc
->swrast
;
522 pdp
= calloc(1, sizeof(*pdp
));
526 pdp
->base
.xDrawable
= xDrawable
;
527 pdp
->base
.drawable
= drawable
;
528 pdp
->base
.psc
= &psc
->base
;
530 ret
= XCreateDrawable(pdp
, psc
->base
.dpy
, xDrawable
, modes
->visualID
);
536 /* Create a new drawable */
538 (*swrast
->createNewDrawable
) (psc
->driScreen
, config
->driConfig
, pdp
);
540 if (!pdp
->driDrawable
) {
541 XDestroyDrawable(pdp
, psc
->base
.dpy
, xDrawable
);
546 pdp
->base
.destroyDrawable
= driswDestroyDrawable
;
552 driswSwapBuffers(__GLXDRIdrawable
* pdraw
,
553 int64_t target_msc
, int64_t divisor
, int64_t remainder
,
556 struct drisw_drawable
*pdp
= (struct drisw_drawable
*) pdraw
;
557 struct drisw_screen
*psc
= (struct drisw_screen
*) pdp
->base
.psc
;
567 (*psc
->core
->swapBuffers
) (pdp
->driDrawable
);
573 driswCopySubBuffer(__GLXDRIdrawable
* pdraw
,
574 int x
, int y
, int width
, int height
, Bool flush
)
576 struct drisw_drawable
*pdp
= (struct drisw_drawable
*) pdraw
;
577 struct drisw_screen
*psc
= (struct drisw_screen
*) pdp
->base
.psc
;
583 (*psc
->copySubBuffer
->copySubBuffer
) (pdp
->driDrawable
,
584 x
, y
, width
, height
);
588 driswDestroyScreen(struct glx_screen
*base
)
590 struct drisw_screen
*psc
= (struct drisw_screen
*) base
;
592 /* Free the direct rendering per screen data */
593 (*psc
->core
->destroyScreen
) (psc
->driScreen
);
594 driDestroyConfigs(psc
->driver_configs
);
595 psc
->driScreen
= NULL
;
597 dlclose(psc
->driver
);
601 #define SWRAST_DRIVER_NAME "swrast"
609 driver
= driOpenDriver(SWRAST_DRIVER_NAME
);
614 static const struct glx_screen_vtable drisw_screen_vtable
= {
615 .create_context
= drisw_create_context
,
616 .create_context_attribs
= drisw_create_context_attribs
,
617 .query_renderer_integer
= drisw_query_renderer_integer
,
618 .query_renderer_string
= drisw_query_renderer_string
,
622 driswBindExtensions(struct drisw_screen
*psc
, const __DRIextension
**extensions
)
626 __glXEnableDirectExtension(&psc
->base
, "GLX_SGI_make_current_read");
628 if (psc
->swrast
->base
.version
>= 3) {
629 __glXEnableDirectExtension(&psc
->base
, "GLX_ARB_create_context");
630 __glXEnableDirectExtension(&psc
->base
, "GLX_ARB_create_context_profile");
632 /* DRISW version >= 2 implies support for OpenGL ES.
634 __glXEnableDirectExtension(&psc
->base
,
635 "GLX_EXT_create_context_es_profile");
636 __glXEnableDirectExtension(&psc
->base
,
637 "GLX_EXT_create_context_es2_profile");
640 if (psc
->copySubBuffer
)
641 __glXEnableDirectExtension(&psc
->base
, "GLX_MESA_copy_sub_buffer");
643 /* FIXME: Figure out what other extensions can be ported here from dri2. */
644 for (i
= 0; extensions
[i
]; i
++) {
645 if ((strcmp(extensions
[i
]->name
, __DRI_TEX_BUFFER
) == 0)) {
646 psc
->texBuffer
= (__DRItexBufferExtension
*) extensions
[i
];
647 __glXEnableDirectExtension(&psc
->base
, "GLX_EXT_texture_from_pixmap");
649 /* DRISW version 3 is also required because GLX_MESA_query_renderer
650 * requires GLX_ARB_create_context_profile.
652 if (psc
->swrast
->base
.version
>= 3
653 && strcmp(extensions
[i
]->name
, __DRI2_RENDERER_QUERY
) == 0) {
654 psc
->rendererQuery
= (__DRI2rendererQueryExtension
*) extensions
[i
];
655 __glXEnableDirectExtension(&psc
->base
, "GLX_MESA_query_renderer");
657 if (strcmp(extensions
[i
]->name
, __DRI2_FLUSH_CONTROL
) == 0) {
658 __glXEnableDirectExtension(&psc
->base
,
659 "GLX_ARB_context_flush_control");
664 static struct glx_screen
*
665 driswCreateScreen(int screen
, struct glx_display
*priv
)
668 const __DRIconfig
**driver_configs
;
669 const __DRIextension
**extensions
;
670 struct drisw_screen
*psc
;
671 struct glx_config
*configs
= NULL
, *visuals
= NULL
;
674 psc
= calloc(1, sizeof *psc
);
678 if (!glx_screen_init(&psc
->base
, screen
, priv
)) {
683 psc
->driver
= driOpenSwrast();
684 if (psc
->driver
== NULL
)
687 extensions
= driGetDriverExtensions(psc
->driver
, SWRAST_DRIVER_NAME
);
688 if (extensions
== NULL
)
691 for (i
= 0; extensions
[i
]; i
++) {
692 if (strcmp(extensions
[i
]->name
, __DRI_CORE
) == 0)
693 psc
->core
= (__DRIcoreExtension
*) extensions
[i
];
694 if (strcmp(extensions
[i
]->name
, __DRI_SWRAST
) == 0)
695 psc
->swrast
= (__DRIswrastExtension
*) extensions
[i
];
696 if (strcmp(extensions
[i
]->name
, __DRI_COPY_SUB_BUFFER
) == 0)
697 psc
->copySubBuffer
= (__DRIcopySubBufferExtension
*) extensions
[i
];
700 if (psc
->core
== NULL
|| psc
->swrast
== NULL
) {
701 ErrorMessageF("core dri extension not found\n");
705 if (psc
->swrast
->base
.version
>= 4) {
707 psc
->swrast
->createNewScreen2(screen
, loader_extensions
,
709 &driver_configs
, psc
);
712 psc
->swrast
->createNewScreen(screen
, loader_extensions
,
713 &driver_configs
, psc
);
715 if (psc
->driScreen
== NULL
) {
716 ErrorMessageF("failed to create dri screen\n");
720 extensions
= psc
->core
->getExtensions(psc
->driScreen
);
721 driswBindExtensions(psc
, extensions
);
723 configs
= driConvertConfigs(psc
->core
, psc
->base
.configs
, driver_configs
);
724 visuals
= driConvertConfigs(psc
->core
, psc
->base
.visuals
, driver_configs
);
726 if (!configs
|| !visuals
) {
727 ErrorMessageF("No matching fbConfigs or visuals found\n");
731 glx_config_destroy_list(psc
->base
.configs
);
732 psc
->base
.configs
= configs
;
733 glx_config_destroy_list(psc
->base
.visuals
);
734 psc
->base
.visuals
= visuals
;
736 psc
->driver_configs
= driver_configs
;
738 psc
->base
.vtable
= &drisw_screen_vtable
;
740 psc
->base
.driScreen
= psp
;
741 psp
->destroyScreen
= driswDestroyScreen
;
742 psp
->createDrawable
= driswCreateDrawable
;
743 psp
->swapBuffers
= driswSwapBuffers
;
745 if (psc
->copySubBuffer
)
746 psp
->copySubBuffer
= driswCopySubBuffer
;
752 glx_config_destroy_list(configs
);
754 glx_config_destroy_list(visuals
);
756 psc
->core
->destroyScreen(psc
->driScreen
);
757 psc
->driScreen
= NULL
;
760 dlclose(psc
->driver
);
761 glx_screen_cleanup(&psc
->base
);
764 CriticalErrorMessageF("failed to load driver: %s\n", SWRAST_DRIVER_NAME
);
769 /* Called from __glXFreeDisplayPrivate.
772 driswDestroyDisplay(__GLXDRIdisplay
* dpy
)
778 * Allocate, initialize and return a __DRIdisplayPrivate object.
779 * This is called from __glXInitialize() when we are given a new
782 _X_HIDDEN __GLXDRIdisplay
*
783 driswCreateDisplay(Display
* dpy
)
785 struct drisw_display
*pdpyp
;
787 pdpyp
= malloc(sizeof *pdpyp
);
791 pdpyp
->base
.destroyDisplay
= driswDestroyDisplay
;
792 pdpyp
->base
.createScreen
= driswCreateScreen
;
797 #endif /* GLX_DIRECT_RENDERING */