Merge branch 'master' into exa-damagetrack

Conflicts:

	exa/exa_accel.c
	exa/exa_migration.c
This commit is contained in:
Michel Dänzer 2006-12-19 16:29:26 +01:00
commit 4334860e69
1711 changed files with 43308 additions and 69257 deletions

270
.gitignore vendored Normal file
View File

@ -0,0 +1,270 @@
Makefile
Makefile.in
.deps
.libs
.msg
*.lo
*.la
*.a
*.o
*~
aclocal.m4
autom4te.cache
compile
config.guess
config.log
config.status
config.sub
configure
depcomp
install-sh
libtool
ltmain.sh
missing
xorg-server.pc
stamp-h?
do-not-use-config.h
do-not-use-config.h.in
afb/afbbltC.c
afb/afbbltCI.c
afb/afbbltG.c
afb/afbbltO.c
afb/afbbltX.c
afb/afbseg.c
afb/afbtileC.c
afb/afbtileG.c
cfb/cfb8lineCO.c
cfb/cfb8lineCP.c
cfb/cfb8lineG.c
cfb/cfb8lineX.c
cfb/cfb8segC.c
cfb/cfb8segCS.c
cfb/cfb8segX.c
cfb/cfb8setG.c
cfb/cfbbltC.c
cfb/cfbbltG.c
cfb/cfbbltO.c
cfb/cfbbltX.c
cfb/cfbfillarcC.c
cfb/cfbfillarcG.c
cfb/cfbglrop8.c
cfb/cfbply1rctC.c
cfb/cfbply1rctG.c
cfb/cfbseg.c
cfb/cfbsolidC.c
cfb/cfbsolidG.c
cfb/cfbsolidX.c
cfb/cfbtile32C.c
cfb/cfbtile32G.c
cfb/cfbtileoddC.c
cfb/cfbtileoddG.c
cfb/cfbzerarcC.c
cfb/cfbzerarcG.c
cfb/cfbzerarcX.c
cfb32/cfb8lineCO.c
cfb32/cfb8lineCP.c
cfb32/cfb8lineG.c
cfb32/cfb8lineX.c
cfb32/cfb8segC.c
cfb32/cfb8segCS.c
cfb32/cfb8segX.c
cfb32/cfb8setG.c
cfb32/cfbbltC.c
cfb32/cfbbltG.c
cfb32/cfbbltO.c
cfb32/cfbbltX.c
cfb32/cfbfillarcC.c
cfb32/cfbfillarcG.c
cfb32/cfbply1rctC.c
cfb32/cfbply1rctG.c
cfb32/cfbseg.c
cfb32/cfbsolidC.c
cfb32/cfbsolidG.c
cfb32/cfbsolidX.c
cfb32/cfbtile32C.c
cfb32/cfbtile32G.c
cfb32/cfbtileoddC.c
cfb32/cfbtileoddG.c
cfb32/cfbzerarcC.c
cfb32/cfbzerarcG.c
cfb32/cfbzerarcX.c
doc/Xserver.1x
doc/Xserver.man
hw/dmx/Xdmx
hw/dmx/Xdmx.1x
hw/dmx/config/dmxtodmx
hw/dmx/config/dmxtodmx.1x
hw/dmx/config/parser.c
hw/dmx/config/parser.h
hw/dmx/config/scanner.c
hw/dmx/config/vdltodmx
hw/dmx/config/vdltodmx.1x
hw/dmx/config/xdmxconfig
hw/dmx/config/xdmxconfig.1x
hw/dmx/examples/dmxaddinput
hw/dmx/examples/dmxaddscreen
hw/dmx/examples/dmxreconfig
hw/dmx/examples/dmxresize
hw/dmx/examples/dmxrminput
hw/dmx/examples/dmxrmscreen
hw/dmx/examples/dmxwininfo
hw/dmx/examples/ev
hw/dmx/examples/evi
hw/dmx/examples/res
hw/dmx/examples/xbell
hw/dmx/examples/xdmx
hw/dmx/examples/xinput
hw/dmx/examples/xled
hw/dmx/examples/xtest
hw/kdrive/ati/Xati
hw/kdrive/chips/Xchips
hw/kdrive/ephyr/Xephyr
hw/kdrive/epson/Xepson
hw/kdrive/fake/Xfake
hw/kdrive/fbdev/Xfbdev
hw/kdrive/i810/Xi810
hw/kdrive/mach64/Xmach64
hw/kdrive/mga/Xmga
hw/kdrive/neomagic/Xneomagic
hw/kdrive/nvidia/Xnvidia
hw/kdrive/pm2/Xpm2
hw/kdrive/r128/Xr128
hw/kdrive/sdl/Xsdl
hw/kdrive/sis300/Xsis
hw/kdrive/smi/Xsmi
hw/kdrive/vesa/Xvesa
hw/kdrive/via/Xvia
hw/vfb/Xvfb
hw/vfb/Xvfb.1x
hw/vfb/Xvfb.man
hw/xfree86/Xorg
hw/xfree86/common/xf86Build.h
hw/xfree86/common/xf86DefModeSet.c
hw/xfree86/doc/man/Xorg.1x
hw/xfree86/doc/man/Xorg.man
hw/xfree86/doc/man/xorg.conf.5x
hw/xfree86/doc/man/xorg.conf.man
hw/xfree86/exa/exa.4
hw/xfree86/exa/exa.4x
hw/xfree86/exa/exa.man
hw/xfree86/fbdevhw/fbdevhw.4x
hw/xfree86/fbdevhw/fbdevhw.man
hw/xfree86/getconfig/cfg.man
hw/xfree86/getconfig/getconfig.1x
hw/xfree86/getconfig/getconfig.5x
hw/xfree86/getconfig/getconfig.man
hw/xfree86/os-support/xorgos.c
hw/xfree86/osandcommon.c
hw/xfree86/ramdac/xf86BitOrder.c
hw/xfree86/scanpci/xf86PciData.c
hw/xfree86/scanpci/xf86PciIds.h
hw/xfree86/utils/cvt/cvt
hw/xfree86/utils/cvt/cvt.man
hw/xfree86/utils/gtf/gtf
hw/xfree86/utils/gtf/gtf.1x
hw/xfree86/utils/gtf/gtf.man
hw/xfree86/utils/ioport/inb
hw/xfree86/utils/ioport/inl
hw/xfree86/utils/ioport/inw
hw/xfree86/utils/ioport/ioport
hw/xfree86/utils/ioport/outb
hw/xfree86/utils/ioport/outl
hw/xfree86/utils/ioport/outw
hw/xfree86/utils/pcitweak/pcitweak
hw/xfree86/utils/pcitweak/pcitweak.1x
hw/xfree86/utils/pcitweak/pcitweak.man
hw/xfree86/utils/scanpci/scanpci
hw/xfree86/utils/scanpci/scanpci.1x
hw/xfree86/utils/scanpci/scanpci.man
hw/xfree86/utils/xorgcfg/XOrgCfg
hw/xfree86/utils/xorgcfg/xorgcfg
hw/xfree86/utils/xorgcfg/xorgcfg.1x
hw/xfree86/utils/xorgcfg/xorgcfg.man
hw/xfree86/utils/xorgconfig/xorgconfig
hw/xfree86/utils/xorgconfig/xorgconfig.1x
hw/xfree86/utils/xorgconfig/xorgconfig.man
hw/xfree86/xaa/l-xaaBitmap.c
hw/xfree86/xaa/l-xaaStipple.c
hw/xfree86/xaa/l-xaaTEGlyph.c
hw/xfree86/xaa/l3-xaaBitmap.c
hw/xfree86/xaa/l3-xaaStipple.c
hw/xfree86/xaa/lf-xaaBitmap.c
hw/xfree86/xaa/lf-xaaStipple.c
hw/xfree86/xaa/lf-xaaTEGlyph.c
hw/xfree86/xaa/lf3-xaaBitmap.c
hw/xfree86/xaa/lf3-xaaStipple.c
hw/xfree86/xaa/m-xaaBitmap.c
hw/xfree86/xaa/m-xaaStipple.c
hw/xfree86/xaa/m-xaaTEGlyph.c
hw/xfree86/xaa/m3-xaaBitmap.c
hw/xfree86/xaa/m3-xaaStipple.c
hw/xfree86/xaa/mf-xaaBitmap.c
hw/xfree86/xaa/mf-xaaStipple.c
hw/xfree86/xaa/mf-xaaTEGlyph.c
hw/xfree86/xaa/mf3-xaaBitmap.c
hw/xfree86/xaa/mf3-xaaStipple.c
hw/xfree86/xaa/s-xaaDashLine.c
hw/xfree86/xaa/s-xaaLine.c
hw/xfree86/xf1bpp/mfbbltC.c
hw/xfree86/xf1bpp/mfbbltCI.c
hw/xfree86/xf1bpp/mfbbltG.c
hw/xfree86/xf1bpp/mfbbltO.c
hw/xfree86/xf1bpp/mfbbltX.c
hw/xfree86/xf1bpp/mfbigbblak.c
hw/xfree86/xf1bpp/mfbigbwht.c
hw/xfree86/xf1bpp/mfbpablack.c
hw/xfree86/xf1bpp/mfbpainv.c
hw/xfree86/xf1bpp/mfbpawhite.c
hw/xfree86/xf1bpp/mfbpgbblak.c
hw/xfree86/xf1bpp/mfbpgbinv.c
hw/xfree86/xf1bpp/mfbpgbwht.c
hw/xfree86/xf1bpp/mfbplyblack.c
hw/xfree86/xf1bpp/mfbplyinv.c
hw/xfree86/xf1bpp/mfbplywhite.c
hw/xfree86/xf1bpp/mfbseg.c
hw/xfree86/xf1bpp/mfbteblack.c
hw/xfree86/xf1bpp/mfbtewhite.c
hw/xfree86/xf1bpp/mfbtileC.c
hw/xfree86/xf1bpp/mfbtileG.c
hw/xfree86/xf4bpp/mfbseg.c
hw/xfree86/xf8_32bpp/cfbgc32.c
hw/xfree86/xf8_32bpp/cfbgc8.c
hw/xfree86/xorg.c
hw/xnest/Xnest
hw/xnest/Xnest.1x
hw/xnest/Xnest.man
hw/xprint/Xprt
hw/xprint/config/C/print/Xprinters.ghostscript
hw/xprint/doc/Xprt.1x
hw/xprint/doc/Xprt.man
hw/xprint/dpmsstubs-wrapper.c
hw/xprint/miinitext-wrapper.c
include/dix-config.h
include/kdrive-config.h
include/xgl-config.h
include/xkb-config.h
include/xorg-config.h
include/xorg-server.h
include/xwin-config.h
mfb/mfbbltC.c
mfb/mfbbltCI.c
mfb/mfbbltG.c
mfb/mfbbltO.c
mfb/mfbbltX.c
mfb/mfbigbblak.c
mfb/mfbigbwht.c
mfb/mfbpablack.c
mfb/mfbpainv.c
mfb/mfbpawhite.c
mfb/mfbpgbblak.c
mfb/mfbpgbinv.c
mfb/mfbpgbwht.c
mfb/mfbplyblack.c
mfb/mfbplyinv.c
mfb/mfbplywhite.c
mfb/mfbseg.c
mfb/mfbteblack.c
mfb/mfbtewhite.c
mfb/mfbtileC.c
mfb/mfbtileG.c
.*.swp

View File

@ -1,4 +1,4 @@
SUBDIRS = glx mesa include
SUBDIRS = glx mesa
# someone could get really crazy someday and add support for the SI...

View File

@ -32,7 +32,6 @@
* ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
* DEALINGS IN THE SOFTWARE.
*/
/* $XFree86: xc/programs/Xserver/GL/apple/aglGlx.c,v 1.2 2003/09/16 00:36:11 torrey Exp $ */
#ifdef HAVE_DIX_CONFIG_H
#include <dix-config.h>

View File

@ -31,7 +31,6 @@
* ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
* DEALINGS IN THE SOFTWARE.
*/
/* $XFree86: xc/programs/Xserver/GL/apple/indirect.c,v 1.2 2003/09/16 00:36:11 torrey Exp $ */
#ifdef HAVE_DIX_CONFIG_H
#include <dix-config.h>

5
GL/glx/.gitignore vendored Normal file
View File

@ -0,0 +1,5 @@
indirect_size.h
glcontextmodes.c
glcontextmodes.h
glapi.c
glthread.c

View File

@ -13,9 +13,7 @@ AM_CFLAGS = \
@DRIPROTO_CFLAGS@ \
-I@MESA_SOURCE@/src/mesa/glapi \
-I@MESA_SOURCE@/src/mesa/main \
@SERVER_DEFINES@ \
@MODULE_DEFINES@ \
@LOADER_DEFINES@ \
-DXFree86Server \
-DNO_LIBCWRAPPER \
@GLX_DEFINES@
@ -30,26 +28,23 @@ INCLUDES = \
-I$(top_srcdir)/mi
nodist_libglx_la_SOURCES = indirect_size.h
nodist_libglx_la_SOURCES = indirect_size.h \
glapi.c \
glcontextmodes.c \
glcontextmode.h \
glthread.c
libglxdri_la_SOURCES = \
glxdri.c
glxdri.c \
extension_string.c \
extension_string.h
libglx_la_SOURCES = \
g_disptab.c \
g_disptab.h \
g_disptab_EXT.c \
g_disptab_EXT.h \
glapi.c \
glcontextmodes.c \
glcontextmodes.h \
global.c \
glthread.c \
glxcmds.c \
glxcmdsswap.c \
glxcontext.h \
glxdrawable.h \
glxerror.h \
glxext.c \
glxext.h \
glxvisuals.c \
@ -61,10 +56,14 @@ libglx_la_SOURCES = \
indirect_dispatch.c \
indirect_dispatch.h \
indirect_dispatch_swap.c \
indirect_program.c \
indirect_reqsize.c \
indirect_reqsize.h \
indirect_size_get.c \
indirect_size_get.h \
indirect_table.c \
indirect_table.h \
indirect_texture_compression.c \
indirect_util.c \
indirect_util.h \
render2.c \
@ -72,12 +71,12 @@ libglx_la_SOURCES = \
renderpix.c \
renderpixswap.c \
rensize.c \
rensizetab.c \
single2.c \
single2swap.c \
singlepix.c \
singlepixswap.c \
singlesize.c \
singlesize.h \
swap_interval.c \
unpack.h \
xfont.c

165
GL/glx/extension_string.c Normal file
View File

@ -0,0 +1,165 @@
/*
* (C) Copyright IBM Corporation 2002-2006
* All Rights Reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
* to deal in the Software without restriction, including without limitation
* on the rights to use, copy, modify, merge, publish, distribute, sub
* license, and/or sell copies of the Software, and to permit persons to whom
* the Software is furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice (including the next
* paragraph) shall be included in all copies or substantial portions of the
* Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
* THE COPYRIGHT HOLDERS AND/OR THEIR SUPPLIERS BE LIABLE FOR ANY CLAIM,
* DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
* OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
* USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
/**
* \file extension_string.c
* Routines to manage the GLX extension string and GLX version for AIGLX
* drivers. This code is loosely based on src/glx/x11/glxextensions.c from
* Mesa.
*
* \author Ian Romanick <idr@us.ibm.com>
*/
#include <string.h>
#include "extension_string.h"
#define SET_BIT(m,b) (m[ (b) / 8 ] |= (1U << ((b) % 8)))
#define CLR_BIT(m,b) (m[ (b) / 8 ] &= ~(1U << ((b) % 8)))
#define IS_SET(m,b) ((m[ (b) / 8 ] & (1U << ((b) % 8))) != 0)
#define CONCAT(a,b) a ## b
#define GLX(n) "GLX_" # n, 4 + sizeof( # n ) - 1, CONCAT(n,_bit)
#define VER(a,b) a, b
#define Y 1
#define N 0
#define EXT_ENABLED(bit,supported) (IS_SET(supported, bit))
struct extension_info {
const char * const name;
unsigned name_len;
unsigned char bit;
/**
* This is the lowest version of GLX that "requires" this extension.
* For example, GLX 1.3 requires SGIX_fbconfig, SGIX_pbuffer, and
* SGI_make_current_read. If the extension is not required by any known
* version of GLX, use 0, 0.
*/
unsigned char version_major;
unsigned char version_minor;
/**
* Is driver support forced by the ABI?
*/
unsigned char driver_support;
};
static const struct extension_info known_glx_extensions[] = {
/* GLX_ARB_get_proc_address is implemented on the client. */
{ GLX(ARB_multisample), VER(1,4), Y, },
{ GLX(EXT_import_context), VER(0,0), Y, },
{ GLX(EXT_texture_from_pixmap), VER(0,0), Y, },
{ GLX(EXT_visual_info), VER(0,0), Y, },
{ GLX(EXT_visual_rating), VER(0,0), Y, },
{ GLX(MESA_copy_sub_buffer), VER(0,0), N, },
{ GLX(OML_swap_method), VER(0,0), Y, },
{ GLX(SGI_make_current_read), VER(1,3), N, },
{ GLX(SGI_swap_control), VER(0,0), N, },
{ GLX(SGIS_multisample), VER(0,0), Y, },
{ GLX(SGIX_fbconfig), VER(1,3), Y, },
{ GLX(SGIX_pbuffer), VER(1,3), N, },
{ GLX(SGIX_visual_select_group), VER(0,0), Y, },
{ NULL }
};
/**
* Create a GLX extension string for a set of enable bits.
*
* Creates a GLX extension string for the set of bit in \c enable_bits. This
* string is then stored in \c buffer if buffer is not \c NULL. This allows
* two-pass operation. On the first pass the caller passes \c NULL for
* \c buffer, and the function determines how much space is required to store
* the extension string. The caller allocates the buffer and calls the
* function again.
*
* \param enable_bits Bits representing the enabled extensions.
* \param buffer Buffer to store the extension string. May be \c NULL.
*
* \return
* The number of characters in \c buffer that were written to. If \c buffer
* is \c NULL, this is the size of buffer that must be allocated by the
* caller.
*/
int
__glXGetExtensionString(const unsigned char *enable_bits, char *buffer)
{
unsigned i;
int length = 0;
for (i = 0; known_glx_extensions[i].name != NULL; i++) {
const unsigned bit = known_glx_extensions[i].bit;
const size_t len = known_glx_extensions[i].name_len;
if (EXT_ENABLED(bit, enable_bits)) {
if (buffer != NULL) {
(void) memcpy(& buffer[length], known_glx_extensions[i].name,
len);
buffer[length + len + 0] = ' ';
buffer[length + len + 1] = '\0';
}
length += len + 1;
}
}
return length + 1;
}
void
__glXEnableExtension(unsigned char *enable_bits, const char *ext)
{
const size_t ext_name_len = strlen(ext);
unsigned i;
for (i = 0; known_glx_extensions[i].name != NULL; i++) {
if ((ext_name_len == known_glx_extensions[i].name_len)
&& (memcmp(ext, known_glx_extensions[i].name, ext_name_len) == 0)) {
SET_BIT(enable_bits, known_glx_extensions[i].bit);
break;
}
}
}
void
__glXInitExtensionEnableBits(unsigned char *enable_bits)
{
unsigned i;
(void) memset(enable_bits, 0, __GLX_EXT_BYTES);
for (i = 0; known_glx_extensions[i].name != NULL; i++) {
if (known_glx_extensions[i].driver_support) {
SET_BIT(enable_bits, known_glx_extensions[i].bit);
}
}
}

63
GL/glx/extension_string.h Normal file
View File

@ -0,0 +1,63 @@
/*
* (C) Copyright IBM Corporation 2002-2006
* All Rights Reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
* to deal in the Software without restriction, including without limitation
* on the rights to use, copy, modify, merge, publish, distribute, sub
* license, and/or sell copies of the Software, and to permit persons to whom
* the Software is furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice (including the next
* paragraph) shall be included in all copies or substantial portions of the
* Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
* THE COPYRIGHT HOLDERS AND/OR THEIR SUPPLIERS BE LIABLE FOR ANY CLAIM,
* DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
* OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
* USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
/**
* \file extension_string.h
* Routines to manage the GLX extension string and GLX version for AIGLX
* drivers. This code is loosely based on src/glx/x11/glxextensions.c from
* Mesa.
*
* \author Ian Romanick <idr@us.ibm.com>
*/
#ifndef GLX_EXTENSION_STRING_H
#define GLX_EXTENSION_STRING_H
enum {
/* GLX_ARB_get_proc_address is implemented on the client. */
ARB_multisample_bit = 0,
EXT_import_context_bit,
EXT_texture_from_pixmap_bit,
EXT_visual_info_bit,
EXT_visual_rating_bit,
MESA_copy_sub_buffer_bit,
OML_swap_method_bit,
SGI_make_current_read_bit,
SGI_swap_control_bit,
SGI_video_sync_bit,
SGIS_multisample_bit,
SGIX_fbconfig_bit,
SGIX_pbuffer_bit,
SGIX_visual_select_group_bit,
__NUM_GLX_EXTS,
};
#define __GLX_EXT_BYTES ((__NUM_GLX_EXTS + 7) / 8)
extern int __glXGetExtensionString(const unsigned char *enable_bits,
char *buffer);
extern void __glXEnableExtension(unsigned char *enable_bits, const char *ext);
extern void __glXInitExtensionEnableBits(unsigned char *enable_bits);
#endif /* GLX_EXTENSION_STRING_H */

View File

@ -1,841 +0,0 @@
/* $XFree86: xc/programs/Xserver/GL/glx/g_disptab.c,v 1.5 2004/01/28 18:11:50 alanh Exp $ */
/* DO NOT EDIT - THIS FILE IS AUTOMATICALLY GENERATED */
/*
** License Applicability. Except to the extent portions of this file are
** made subject to an alternative license as permitted in the SGI Free
** Software License B, Version 1.1 (the "License"), the contents of this
** file are subject only to the provisions of the License. You may not use
** this file except in compliance with the License. You may obtain a copy
** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600
** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at:
**
** http://oss.sgi.com/projects/FreeB
**
** Note that, as provided in the License, the Software is distributed on an
** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS
** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND
** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A
** PARTICULAR PURPOSE, AND NON-INFRINGEMENT.
**
** Original Code. The Original Code is: OpenGL Sample Implementation,
** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics,
** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc.
** Copyright in any portions created by third parties is as indicated
** elsewhere herein. All Rights Reserved.
**
** Additional Notice Provisions: This software was created using the
** OpenGL(R) version 1.2.1 Sample Implementation published by SGI, but has
** not been independently verified as being compliant with the OpenGL(R)
** version 1.2.1 Specification.
*/
#ifdef HAVE_DIX_CONFIG_H
#include <dix-config.h>
#endif
#include "glxserver.h"
#include "glxext.h"
#include "g_disptab.h"
#include "indirect_dispatch.h"
__GLXdispatchSingleProcPtr __glXSingleTable[__GLX_SINGLE_TABLE_SIZE] = {
__glXNoSuchSingleOpcode,
__glXRender,
__glXRenderLarge,
__glXCreateContext,
__glXDestroyContext,
__glXMakeCurrent,
__glXIsDirect,
__glXQueryVersion,
__glXWaitGL,
__glXWaitX,
__glXCopyContext,
__glXSwapBuffers,
__glXUseXFont,
__glXCreateGLXPixmap,
__glXGetVisualConfigs,
__glXDestroyGLXPixmap,
__glXVendorPrivate,
__glXVendorPrivateWithReply,
__glXQueryExtensionsString,
__glXQueryServerString,
__glXClientInfo,
__glXGetFBConfigs,
__glXCreatePixmap,
__glXDestroyGLXPixmap, /* glXDestroyPixmap */
__glXCreateNewContext,
__glXNoSuchSingleOpcode, /* glXQueryContext */
__glXMakeContextCurrent,
__glXNoSuchSingleOpcode, /* glXCreatePbuffer */
__glXNoSuchSingleOpcode, /* glXDestroyPbuffer */
__glXNoSuchSingleOpcode, /* glXGetDrawableAttributes */
__glXNoSuchSingleOpcode, /* glXChangeDrawableAttributes */
__glXNoSuchSingleOpcode, /* glXCreateWindow */
__glXNoSuchSingleOpcode, /* glXDestroyWindow */
__glXNoSuchSingleOpcode,
__glXNoSuchSingleOpcode,
__glXNoSuchSingleOpcode,
__glXNoSuchSingleOpcode,
__glXNoSuchSingleOpcode,
__glXNoSuchSingleOpcode,
__glXNoSuchSingleOpcode,
__glXNoSuchSingleOpcode,
__glXNoSuchSingleOpcode,
__glXNoSuchSingleOpcode,
__glXNoSuchSingleOpcode,
__glXNoSuchSingleOpcode,
__glXNoSuchSingleOpcode,
__glXNoSuchSingleOpcode,
__glXNoSuchSingleOpcode,
__glXNoSuchSingleOpcode,
__glXNoSuchSingleOpcode,
__glXNoSuchSingleOpcode,
__glXNoSuchSingleOpcode,
__glXNoSuchSingleOpcode,
__glXNoSuchSingleOpcode,
__glXNoSuchSingleOpcode,
__glXNoSuchSingleOpcode,
__glXNoSuchSingleOpcode,
__glXNoSuchSingleOpcode,
__glXNoSuchSingleOpcode,
__glXNoSuchSingleOpcode,
__glXNoSuchSingleOpcode,
__glXNoSuchSingleOpcode,
__glXNoSuchSingleOpcode,
__glXNoSuchSingleOpcode,
__glXNoSuchSingleOpcode,
__glXNoSuchSingleOpcode,
__glXNoSuchSingleOpcode,
__glXNoSuchSingleOpcode,
__glXNoSuchSingleOpcode,
__glXNoSuchSingleOpcode,
__glXNoSuchSingleOpcode,
__glXNoSuchSingleOpcode,
__glXNoSuchSingleOpcode,
__glXNoSuchSingleOpcode,
__glXNoSuchSingleOpcode,
__glXNoSuchSingleOpcode,
__glXNoSuchSingleOpcode,
__glXNoSuchSingleOpcode,
__glXNoSuchSingleOpcode,
__glXNoSuchSingleOpcode,
__glXNoSuchSingleOpcode,
__glXNoSuchSingleOpcode,
__glXNoSuchSingleOpcode,
__glXNoSuchSingleOpcode,
__glXNoSuchSingleOpcode,
__glXNoSuchSingleOpcode,
__glXNoSuchSingleOpcode,
__glXNoSuchSingleOpcode,
__glXNoSuchSingleOpcode,
__glXNoSuchSingleOpcode,
__glXNoSuchSingleOpcode,
__glXNoSuchSingleOpcode,
__glXNoSuchSingleOpcode,
__glXNoSuchSingleOpcode,
__glXNoSuchSingleOpcode,
__glXNoSuchSingleOpcode,
__glXNoSuchSingleOpcode,
__glXNoSuchSingleOpcode,
__glXNoSuchSingleOpcode,
__glXNoSuchSingleOpcode,
__glXNoSuchSingleOpcode,
__glXDisp_NewList,
__glXDisp_EndList,
__glXDisp_DeleteLists,
__glXDisp_GenLists,
__glXDisp_FeedbackBuffer,
__glXDisp_SelectBuffer,
__glXDisp_RenderMode,
__glXDisp_Finish,
__glXDisp_PixelStoref,
__glXDisp_PixelStorei,
__glXDisp_ReadPixels,
__glXDisp_GetBooleanv,
__glXDisp_GetClipPlane,
__glXDisp_GetDoublev,
__glXDisp_GetError,
__glXDisp_GetFloatv,
__glXDisp_GetIntegerv,
__glXDisp_GetLightfv,
__glXDisp_GetLightiv,
__glXDisp_GetMapdv,
__glXDisp_GetMapfv,
__glXDisp_GetMapiv,
__glXDisp_GetMaterialfv,
__glXDisp_GetMaterialiv,
__glXDisp_GetPixelMapfv,
__glXDisp_GetPixelMapuiv,
__glXDisp_GetPixelMapusv,
__glXDisp_GetPolygonStipple,
__glXDisp_GetString,
__glXDisp_GetTexEnvfv,
__glXDisp_GetTexEnviv,
__glXDisp_GetTexGendv,
__glXDisp_GetTexGenfv,
__glXDisp_GetTexGeniv,
__glXDisp_GetTexImage,
__glXDisp_GetTexParameterfv,
__glXDisp_GetTexParameteriv,
__glXDisp_GetTexLevelParameterfv,
__glXDisp_GetTexLevelParameteriv,
__glXDisp_IsEnabled,
__glXDisp_IsList,
__glXDisp_Flush,
__glXDisp_AreTexturesResident,
__glXDisp_DeleteTextures,
__glXDisp_GenTextures,
__glXDisp_IsTexture,
__glXDisp_GetColorTable,
__glXDisp_GetColorTableParameterfv,
__glXDisp_GetColorTableParameteriv,
__glXDisp_GetConvolutionFilter,
__glXDisp_GetConvolutionParameterfv,
__glXDisp_GetConvolutionParameteriv,
__glXDisp_GetSeparableFilter,
__glXDisp_GetHistogram,
__glXDisp_GetHistogramParameterfv,
__glXDisp_GetHistogramParameteriv,
__glXDisp_GetMinmax,
__glXDisp_GetMinmaxParameterfv,
__glXDisp_GetMinmaxParameteriv,
};
__GLXdispatchRenderProcPtr __glXRenderTable[] = {
__glXNoSuchRenderOpcode,
__glXDisp_CallList,
__glXDisp_CallLists,
__glXDisp_ListBase,
__glXDisp_Begin,
__glXDisp_Bitmap,
__glXDisp_Color3bv,
__glXDisp_Color3dv,
__glXDisp_Color3fv,
__glXDisp_Color3iv,
__glXDisp_Color3sv,
__glXDisp_Color3ubv,
__glXDisp_Color3uiv,
__glXDisp_Color3usv,
__glXDisp_Color4bv,
__glXDisp_Color4dv,
__glXDisp_Color4fv,
__glXDisp_Color4iv,
__glXDisp_Color4sv,
__glXDisp_Color4ubv,
__glXDisp_Color4uiv,
__glXDisp_Color4usv,
__glXDisp_EdgeFlagv,
__glXDisp_End,
__glXDisp_Indexdv,
__glXDisp_Indexfv,
__glXDisp_Indexiv,
__glXDisp_Indexsv,
__glXDisp_Normal3bv,
__glXDisp_Normal3dv,
__glXDisp_Normal3fv,
__glXDisp_Normal3iv,
__glXDisp_Normal3sv,
__glXDisp_RasterPos2dv,
__glXDisp_RasterPos2fv,
__glXDisp_RasterPos2iv,
__glXDisp_RasterPos2sv,
__glXDisp_RasterPos3dv,
__glXDisp_RasterPos3fv,
__glXDisp_RasterPos3iv,
__glXDisp_RasterPos3sv,
__glXDisp_RasterPos4dv,
__glXDisp_RasterPos4fv,
__glXDisp_RasterPos4iv,
__glXDisp_RasterPos4sv,
__glXDisp_Rectdv,
__glXDisp_Rectfv,
__glXDisp_Rectiv,
__glXDisp_Rectsv,
__glXDisp_TexCoord1dv,
__glXDisp_TexCoord1fv,
__glXDisp_TexCoord1iv,
__glXDisp_TexCoord1sv,
__glXDisp_TexCoord2dv,
__glXDisp_TexCoord2fv,
__glXDisp_TexCoord2iv,
__glXDisp_TexCoord2sv,
__glXDisp_TexCoord3dv,
__glXDisp_TexCoord3fv,
__glXDisp_TexCoord3iv,
__glXDisp_TexCoord3sv,
__glXDisp_TexCoord4dv,
__glXDisp_TexCoord4fv,
__glXDisp_TexCoord4iv,
__glXDisp_TexCoord4sv,
__glXDisp_Vertex2dv,
__glXDisp_Vertex2fv,
__glXDisp_Vertex2iv,
__glXDisp_Vertex2sv,
__glXDisp_Vertex3dv,
__glXDisp_Vertex3fv,
__glXDisp_Vertex3iv,
__glXDisp_Vertex3sv,
__glXDisp_Vertex4dv,
__glXDisp_Vertex4fv,
__glXDisp_Vertex4iv,
__glXDisp_Vertex4sv,
__glXDisp_ClipPlane,
__glXDisp_ColorMaterial,
__glXDisp_CullFace,
__glXDisp_Fogf,
__glXDisp_Fogfv,
__glXDisp_Fogi,
__glXDisp_Fogiv,
__glXDisp_FrontFace,
__glXDisp_Hint,
__glXDisp_Lightf,
__glXDisp_Lightfv,
__glXDisp_Lighti,
__glXDisp_Lightiv,
__glXDisp_LightModelf,
__glXDisp_LightModelfv,
__glXDisp_LightModeli,
__glXDisp_LightModeliv,
__glXDisp_LineStipple,
__glXDisp_LineWidth,
__glXDisp_Materialf,
__glXDisp_Materialfv,
__glXDisp_Materiali,
__glXDisp_Materialiv,
__glXDisp_PointSize,
__glXDisp_PolygonMode,
__glXDisp_PolygonStipple,
__glXDisp_Scissor,
__glXDisp_ShadeModel,
__glXDisp_TexParameterf,
__glXDisp_TexParameterfv,
__glXDisp_TexParameteri,
__glXDisp_TexParameteriv,
__glXDisp_TexImage1D,
__glXDisp_TexImage2D,
__glXDisp_TexEnvf,
__glXDisp_TexEnvfv,
__glXDisp_TexEnvi,
__glXDisp_TexEnviv,
__glXDisp_TexGend,
__glXDisp_TexGendv,
__glXDisp_TexGenf,
__glXDisp_TexGenfv,
__glXDisp_TexGeni,
__glXDisp_TexGeniv,
__glXDisp_InitNames,
__glXDisp_LoadName,
__glXDisp_PassThrough,
__glXDisp_PopName,
__glXDisp_PushName,
__glXDisp_DrawBuffer,
__glXDisp_Clear,
__glXDisp_ClearAccum,
__glXDisp_ClearIndex,
__glXDisp_ClearColor,
__glXDisp_ClearStencil,
__glXDisp_ClearDepth,
__glXDisp_StencilMask,
__glXDisp_ColorMask,
__glXDisp_DepthMask,
__glXDisp_IndexMask,
__glXDisp_Accum,
__glXDisp_Disable,
__glXDisp_Enable,
__glXNoSuchRenderOpcode,
__glXDisp_PopAttrib,
__glXDisp_PushAttrib,
__glXDisp_Map1d,
__glXDisp_Map1f,
__glXDisp_Map2d,
__glXDisp_Map2f,
__glXDisp_MapGrid1d,
__glXDisp_MapGrid1f,
__glXDisp_MapGrid2d,
__glXDisp_MapGrid2f,
__glXDisp_EvalCoord1dv,
__glXDisp_EvalCoord1fv,
__glXDisp_EvalCoord2dv,
__glXDisp_EvalCoord2fv,
__glXDisp_EvalMesh1,
__glXDisp_EvalPoint1,
__glXDisp_EvalMesh2,
__glXDisp_EvalPoint2,
__glXDisp_AlphaFunc,
__glXDisp_BlendFunc,
__glXDisp_LogicOp,
__glXDisp_StencilFunc,
__glXDisp_StencilOp,
__glXDisp_DepthFunc,
__glXDisp_PixelZoom,
__glXDisp_PixelTransferf,
__glXDisp_PixelTransferi,
__glXDisp_PixelMapfv,
__glXDisp_PixelMapuiv,
__glXDisp_PixelMapusv,
__glXDisp_ReadBuffer,
__glXDisp_CopyPixels,
__glXDisp_DrawPixels,
__glXDisp_DepthRange,
__glXDisp_Frustum,
__glXDisp_LoadIdentity,
__glXDisp_LoadMatrixf,
__glXDisp_LoadMatrixd,
__glXDisp_MatrixMode,
__glXDisp_MultMatrixf,
__glXDisp_MultMatrixd,
__glXDisp_Ortho,
__glXDisp_PopMatrix,
__glXDisp_PushMatrix,
__glXDisp_Rotated,
__glXDisp_Rotatef,
__glXDisp_Scaled,
__glXDisp_Scalef,
__glXDisp_Translated,
__glXDisp_Translatef,
__glXDisp_Viewport,
__glXDisp_PolygonOffset,
__glXDisp_DrawArrays,
__glXDisp_Indexubv,
__glXDisp_ColorSubTable,
__glXDisp_CopyColorSubTable,
__glXDisp_ActiveTextureARB,
__glXDisp_MultiTexCoord1dvARB,
__glXDisp_MultiTexCoord1fvARB,
__glXDisp_MultiTexCoord1ivARB,
__glXDisp_MultiTexCoord1svARB,
__glXDisp_MultiTexCoord2dvARB,
__glXDisp_MultiTexCoord2fvARB,
__glXDisp_MultiTexCoord2ivARB,
__glXDisp_MultiTexCoord2svARB,
__glXDisp_MultiTexCoord3dvARB,
__glXDisp_MultiTexCoord3fvARB,
__glXDisp_MultiTexCoord3ivARB,
__glXDisp_MultiTexCoord3svARB,
__glXDisp_MultiTexCoord4dvARB,
__glXDisp_MultiTexCoord4fvARB,
__glXDisp_MultiTexCoord4ivARB,
__glXDisp_MultiTexCoord4svARB, /* 213 */
__glXNoSuchRenderOpcode,
__glXNoSuchRenderOpcode,
__glXNoSuchRenderOpcode,
__glXNoSuchRenderOpcode,
__glXNoSuchRenderOpcode,
__glXNoSuchRenderOpcode,
__glXNoSuchRenderOpcode, /* 220 */
__glXNoSuchRenderOpcode,
__glXNoSuchRenderOpcode,
__glXNoSuchRenderOpcode,
__glXNoSuchRenderOpcode,
__glXNoSuchRenderOpcode,
__glXNoSuchRenderOpcode,
__glXNoSuchRenderOpcode,
__glXNoSuchRenderOpcode,
__glXDisp_SampleCoverageARB,
#ifndef MISSING_GL_EXTS
__glXDisp_WindowPos3fvMESA /* 230 */
#else
__glXNoSuchRenderOpcode
#endif
};
__GLXdispatchSingleProcPtr __glXSwapSingleTable[__GLX_SINGLE_TABLE_SIZE] = {
__glXNoSuchSingleOpcode,
__glXSwapRender,
__glXSwapRenderLarge,
__glXSwapCreateContext,
__glXSwapDestroyContext,
__glXSwapMakeCurrent,
__glXSwapIsDirect,
__glXSwapQueryVersion,
__glXSwapWaitGL,
__glXSwapWaitX,
__glXSwapCopyContext,
__glXSwapSwapBuffers,
__glXSwapUseXFont,
__glXSwapCreateGLXPixmap,
__glXSwapGetVisualConfigs,
__glXSwapDestroyGLXPixmap,
__glXSwapVendorPrivate,
__glXSwapVendorPrivateWithReply,
__glXSwapQueryExtensionsString,
__glXSwapQueryServerString,
__glXSwapClientInfo,
__glXSwapGetFBConfigs,
__glXSwapCreatePixmap,
__glXSwapDestroyGLXPixmap, /* glXDestroyPixmap */
__glXSwapCreateNewContext,
__glXNoSuchSingleOpcode, /* glXQueryContext */
__glXSwapMakeContextCurrent,
__glXNoSuchSingleOpcode, /* glXCreatePbuffer */
__glXNoSuchSingleOpcode, /* glXDestroyPbuffer */
__glXNoSuchSingleOpcode, /* glXGetDrawableAttributes */
__glXNoSuchSingleOpcode, /* glXChangeDrawableAttributes */
__glXNoSuchSingleOpcode, /* glXCreateWindow */
__glXNoSuchSingleOpcode, /* glXDestroyWindow */
__glXNoSuchSingleOpcode,
__glXNoSuchSingleOpcode,
__glXNoSuchSingleOpcode,
__glXNoSuchSingleOpcode,
__glXNoSuchSingleOpcode,
__glXNoSuchSingleOpcode,
__glXNoSuchSingleOpcode,
__glXNoSuchSingleOpcode,
__glXNoSuchSingleOpcode,
__glXNoSuchSingleOpcode,
__glXNoSuchSingleOpcode,
__glXNoSuchSingleOpcode,
__glXNoSuchSingleOpcode,
__glXNoSuchSingleOpcode,
__glXNoSuchSingleOpcode,
__glXNoSuchSingleOpcode,
__glXNoSuchSingleOpcode,
__glXNoSuchSingleOpcode,
__glXNoSuchSingleOpcode,
__glXNoSuchSingleOpcode,
__glXNoSuchSingleOpcode,
__glXNoSuchSingleOpcode,
__glXNoSuchSingleOpcode,
__glXNoSuchSingleOpcode,
__glXNoSuchSingleOpcode,
__glXNoSuchSingleOpcode,
__glXNoSuchSingleOpcode,
__glXNoSuchSingleOpcode,
__glXNoSuchSingleOpcode,
__glXNoSuchSingleOpcode,
__glXNoSuchSingleOpcode,
__glXNoSuchSingleOpcode,
__glXNoSuchSingleOpcode,
__glXNoSuchSingleOpcode,
__glXNoSuchSingleOpcode,
__glXNoSuchSingleOpcode,
__glXNoSuchSingleOpcode,
__glXNoSuchSingleOpcode,
__glXNoSuchSingleOpcode,
__glXNoSuchSingleOpcode,
__glXNoSuchSingleOpcode,
__glXNoSuchSingleOpcode,
__glXNoSuchSingleOpcode,
__glXNoSuchSingleOpcode,
__glXNoSuchSingleOpcode,
__glXNoSuchSingleOpcode,
__glXNoSuchSingleOpcode,
__glXNoSuchSingleOpcode,
__glXNoSuchSingleOpcode,
__glXNoSuchSingleOpcode,
__glXNoSuchSingleOpcode,
__glXNoSuchSingleOpcode,
__glXNoSuchSingleOpcode,
__glXNoSuchSingleOpcode,
__glXNoSuchSingleOpcode,
__glXNoSuchSingleOpcode,
__glXNoSuchSingleOpcode,
__glXNoSuchSingleOpcode,
__glXNoSuchSingleOpcode,
__glXNoSuchSingleOpcode,
__glXNoSuchSingleOpcode,
__glXNoSuchSingleOpcode,
__glXNoSuchSingleOpcode,
__glXNoSuchSingleOpcode,
__glXNoSuchSingleOpcode,
__glXNoSuchSingleOpcode,
__glXNoSuchSingleOpcode,
__glXNoSuchSingleOpcode,
__glXDispSwap_NewList,
__glXDispSwap_EndList,
__glXDispSwap_DeleteLists,
__glXDispSwap_GenLists,
__glXDispSwap_FeedbackBuffer,
__glXDispSwap_SelectBuffer,
__glXDispSwap_RenderMode,
__glXDispSwap_Finish,
__glXDispSwap_PixelStoref,
__glXDispSwap_PixelStorei,
__glXDispSwap_ReadPixels,
__glXDispSwap_GetBooleanv,
__glXDispSwap_GetClipPlane,
__glXDispSwap_GetDoublev,
__glXDispSwap_GetError,
__glXDispSwap_GetFloatv,
__glXDispSwap_GetIntegerv,
__glXDispSwap_GetLightfv,
__glXDispSwap_GetLightiv,
__glXDispSwap_GetMapdv,
__glXDispSwap_GetMapfv,
__glXDispSwap_GetMapiv,
__glXDispSwap_GetMaterialfv,
__glXDispSwap_GetMaterialiv,
__glXDispSwap_GetPixelMapfv,
__glXDispSwap_GetPixelMapuiv,
__glXDispSwap_GetPixelMapusv,
__glXDispSwap_GetPolygonStipple,
__glXDispSwap_GetString,
__glXDispSwap_GetTexEnvfv,
__glXDispSwap_GetTexEnviv,
__glXDispSwap_GetTexGendv,
__glXDispSwap_GetTexGenfv,
__glXDispSwap_GetTexGeniv,
__glXDispSwap_GetTexImage,
__glXDispSwap_GetTexParameterfv,
__glXDispSwap_GetTexParameteriv,
__glXDispSwap_GetTexLevelParameterfv,
__glXDispSwap_GetTexLevelParameteriv,
__glXDispSwap_IsEnabled,
__glXDispSwap_IsList,
__glXDispSwap_Flush,
__glXDispSwap_AreTexturesResident,
__glXDispSwap_DeleteTextures,
__glXDispSwap_GenTextures,
__glXDispSwap_IsTexture,
__glXDispSwap_GetColorTable,
__glXDispSwap_GetColorTableParameterfv,
__glXDispSwap_GetColorTableParameteriv,
__glXDispSwap_GetConvolutionFilter,
__glXDispSwap_GetConvolutionParameterfv,
__glXDispSwap_GetConvolutionParameteriv,
__glXDispSwap_GetSeparableFilter,
__glXDispSwap_GetHistogram,
__glXDispSwap_GetHistogramParameterfv,
__glXDispSwap_GetHistogramParameteriv,
__glXDispSwap_GetMinmax,
__glXDispSwap_GetMinmaxParameterfv,
__glXDispSwap_GetMinmaxParameteriv,
};
__GLXdispatchRenderProcPtr __glXSwapRenderTable[__GLX_RENDER_TABLE_SIZE] = {
__glXNoSuchRenderOpcode,
__glXDispSwap_CallList,
__glXDispSwap_CallLists,
__glXDispSwap_ListBase,
__glXDispSwap_Begin,
__glXDispSwap_Bitmap,
__glXDispSwap_Color3bv,
__glXDispSwap_Color3dv,
__glXDispSwap_Color3fv,
__glXDispSwap_Color3iv,
__glXDispSwap_Color3sv,
__glXDispSwap_Color3ubv,
__glXDispSwap_Color3uiv,
__glXDispSwap_Color3usv,
__glXDispSwap_Color4bv,
__glXDispSwap_Color4dv,
__glXDispSwap_Color4fv,
__glXDispSwap_Color4iv,
__glXDispSwap_Color4sv,
__glXDispSwap_Color4ubv,
__glXDispSwap_Color4uiv,
__glXDispSwap_Color4usv,
__glXDispSwap_EdgeFlagv,
__glXDispSwap_End,
__glXDispSwap_Indexdv,
__glXDispSwap_Indexfv,
__glXDispSwap_Indexiv,
__glXDispSwap_Indexsv,
__glXDispSwap_Normal3bv,
__glXDispSwap_Normal3dv,
__glXDispSwap_Normal3fv,
__glXDispSwap_Normal3iv,
__glXDispSwap_Normal3sv,
__glXDispSwap_RasterPos2dv,
__glXDispSwap_RasterPos2fv,
__glXDispSwap_RasterPos2iv,
__glXDispSwap_RasterPos2sv,
__glXDispSwap_RasterPos3dv,
__glXDispSwap_RasterPos3fv,
__glXDispSwap_RasterPos3iv,
__glXDispSwap_RasterPos3sv,
__glXDispSwap_RasterPos4dv,
__glXDispSwap_RasterPos4fv,
__glXDispSwap_RasterPos4iv,
__glXDispSwap_RasterPos4sv,
__glXDispSwap_Rectdv,
__glXDispSwap_Rectfv,
__glXDispSwap_Rectiv,
__glXDispSwap_Rectsv,
__glXDispSwap_TexCoord1dv,
__glXDispSwap_TexCoord1fv,
__glXDispSwap_TexCoord1iv,
__glXDispSwap_TexCoord1sv,
__glXDispSwap_TexCoord2dv,
__glXDispSwap_TexCoord2fv,
__glXDispSwap_TexCoord2iv,
__glXDispSwap_TexCoord2sv,
__glXDispSwap_TexCoord3dv,
__glXDispSwap_TexCoord3fv,
__glXDispSwap_TexCoord3iv,
__glXDispSwap_TexCoord3sv,
__glXDispSwap_TexCoord4dv,
__glXDispSwap_TexCoord4fv,
__glXDispSwap_TexCoord4iv,
__glXDispSwap_TexCoord4sv,
__glXDispSwap_Vertex2dv,
__glXDispSwap_Vertex2fv,
__glXDispSwap_Vertex2iv,
__glXDispSwap_Vertex2sv,
__glXDispSwap_Vertex3dv,
__glXDispSwap_Vertex3fv,
__glXDispSwap_Vertex3iv,
__glXDispSwap_Vertex3sv,
__glXDispSwap_Vertex4dv,
__glXDispSwap_Vertex4fv,
__glXDispSwap_Vertex4iv,
__glXDispSwap_Vertex4sv,
__glXDispSwap_ClipPlane,
__glXDispSwap_ColorMaterial,
__glXDispSwap_CullFace,
__glXDispSwap_Fogf,
__glXDispSwap_Fogfv,
__glXDispSwap_Fogi,
__glXDispSwap_Fogiv,
__glXDispSwap_FrontFace,
__glXDispSwap_Hint,
__glXDispSwap_Lightf,
__glXDispSwap_Lightfv,
__glXDispSwap_Lighti,
__glXDispSwap_Lightiv,
__glXDispSwap_LightModelf,
__glXDispSwap_LightModelfv,
__glXDispSwap_LightModeli,
__glXDispSwap_LightModeliv,
__glXDispSwap_LineStipple,
__glXDispSwap_LineWidth,
__glXDispSwap_Materialf,
__glXDispSwap_Materialfv,
__glXDispSwap_Materiali,
__glXDispSwap_Materialiv,
__glXDispSwap_PointSize,
__glXDispSwap_PolygonMode,
__glXDispSwap_PolygonStipple,
__glXDispSwap_Scissor,
__glXDispSwap_ShadeModel,
__glXDispSwap_TexParameterf,
__glXDispSwap_TexParameterfv,
__glXDispSwap_TexParameteri,
__glXDispSwap_TexParameteriv,
__glXDispSwap_TexImage1D,
__glXDispSwap_TexImage2D,
__glXDispSwap_TexEnvf,
__glXDispSwap_TexEnvfv,
__glXDispSwap_TexEnvi,
__glXDispSwap_TexEnviv,
__glXDispSwap_TexGend,
__glXDispSwap_TexGendv,
__glXDispSwap_TexGenf,
__glXDispSwap_TexGenfv,
__glXDispSwap_TexGeni,
__glXDispSwap_TexGeniv,
__glXDispSwap_InitNames,
__glXDispSwap_LoadName,
__glXDispSwap_PassThrough,
__glXDispSwap_PopName,
__glXDispSwap_PushName,
__glXDispSwap_DrawBuffer,
__glXDispSwap_Clear,
__glXDispSwap_ClearAccum,
__glXDispSwap_ClearIndex,
__glXDispSwap_ClearColor,
__glXDispSwap_ClearStencil,
__glXDispSwap_ClearDepth,
__glXDispSwap_StencilMask,
__glXDispSwap_ColorMask,
__glXDispSwap_DepthMask,
__glXDispSwap_IndexMask,
__glXDispSwap_Accum,
__glXDispSwap_Disable,
__glXDispSwap_Enable,
__glXNoSuchRenderOpcode,
__glXDispSwap_PopAttrib,
__glXDispSwap_PushAttrib,
__glXDispSwap_Map1d,
__glXDispSwap_Map1f,
__glXDispSwap_Map2d,
__glXDispSwap_Map2f,
__glXDispSwap_MapGrid1d,
__glXDispSwap_MapGrid1f,
__glXDispSwap_MapGrid2d,
__glXDispSwap_MapGrid2f,
__glXDispSwap_EvalCoord1dv,
__glXDispSwap_EvalCoord1fv,
__glXDispSwap_EvalCoord2dv,
__glXDispSwap_EvalCoord2fv,
__glXDispSwap_EvalMesh1,
__glXDispSwap_EvalPoint1,
__glXDispSwap_EvalMesh2,
__glXDispSwap_EvalPoint2,
__glXDispSwap_AlphaFunc,
__glXDispSwap_BlendFunc,
__glXDispSwap_LogicOp,
__glXDispSwap_StencilFunc,
__glXDispSwap_StencilOp,
__glXDispSwap_DepthFunc,
__glXDispSwap_PixelZoom,
__glXDispSwap_PixelTransferf,
__glXDispSwap_PixelTransferi,
__glXDispSwap_PixelMapfv,
__glXDispSwap_PixelMapuiv,
__glXDispSwap_PixelMapusv,
__glXDispSwap_ReadBuffer,
__glXDispSwap_CopyPixels,
__glXDispSwap_DrawPixels,
__glXDispSwap_DepthRange,
__glXDispSwap_Frustum,
__glXDispSwap_LoadIdentity,
__glXDispSwap_LoadMatrixf,
__glXDispSwap_LoadMatrixd,
__glXDispSwap_MatrixMode,
__glXDispSwap_MultMatrixf,
__glXDispSwap_MultMatrixd,
__glXDispSwap_Ortho,
__glXDispSwap_PopMatrix,
__glXDispSwap_PushMatrix,
__glXDispSwap_Rotated,
__glXDispSwap_Rotatef,
__glXDispSwap_Scaled,
__glXDispSwap_Scalef,
__glXDispSwap_Translated,
__glXDispSwap_Translatef,
__glXDispSwap_Viewport,
__glXDispSwap_PolygonOffset,
__glXDispSwap_DrawArrays,
__glXDispSwap_Indexubv,
__glXDispSwap_ColorSubTable,
__glXDispSwap_CopyColorSubTable,
__glXDispSwap_ActiveTextureARB,
__glXDispSwap_MultiTexCoord1dvARB,
__glXDispSwap_MultiTexCoord1fvARB,
__glXDispSwap_MultiTexCoord1ivARB,
__glXDispSwap_MultiTexCoord1svARB,
__glXDispSwap_MultiTexCoord2dvARB,
__glXDispSwap_MultiTexCoord2fvARB,
__glXDispSwap_MultiTexCoord2ivARB,
__glXDispSwap_MultiTexCoord2svARB,
__glXDispSwap_MultiTexCoord3dvARB,
__glXDispSwap_MultiTexCoord3fvARB,
__glXDispSwap_MultiTexCoord3ivARB,
__glXDispSwap_MultiTexCoord3svARB,
__glXDispSwap_MultiTexCoord4dvARB,
__glXDispSwap_MultiTexCoord4fvARB,
__glXDispSwap_MultiTexCoord4ivARB,
__glXDispSwap_MultiTexCoord4svARB, /* 213 */
__glXNoSuchRenderOpcode,
__glXNoSuchRenderOpcode,
__glXNoSuchRenderOpcode,
__glXNoSuchRenderOpcode,
__glXNoSuchRenderOpcode,
__glXNoSuchRenderOpcode,
__glXNoSuchRenderOpcode, /* 220 */
__glXNoSuchRenderOpcode,
__glXNoSuchRenderOpcode,
__glXNoSuchRenderOpcode,
__glXNoSuchRenderOpcode,
__glXNoSuchRenderOpcode,
__glXNoSuchRenderOpcode,
__glXNoSuchRenderOpcode,
__glXNoSuchRenderOpcode,
__glXDispSwap_SampleCoverageARB,
#ifndef MISSING_GL_EXTS
__glXDispSwap_WindowPos3fvMESA /* 230 */
#else
__glXNoSuchRenderOpcode
#endif
};

View File

@ -1,4 +1,3 @@
/* $XFree86: xc/programs/Xserver/GL/glx/g_disptab.h,v 1.4 2003/09/28 20:15:42 alanh Exp $ */
/* DO NOT EDIT - THIS FILE IS AUTOMATICALLY GENERATED */
#ifdef HAVE_DIX_CONFIG_H
#include <dix-config.h>
@ -35,74 +34,20 @@
** version 1.2.1 Specification.
*/
extern int __glXRender(__GLXclientState*, GLbyte*);
extern int __glXRenderLarge(__GLXclientState*, GLbyte*);
extern int __glXCreateContext(__GLXclientState*, GLbyte*);
extern int __glXDestroyContext(__GLXclientState*, GLbyte*);
extern int __glXMakeCurrent(__GLXclientState*, GLbyte*);
extern int __glXIsDirect(__GLXclientState*, GLbyte*);
extern int __glXQueryVersion(__GLXclientState*, GLbyte*);
extern int __glXWaitGL(__GLXclientState*, GLbyte*);
extern int __glXWaitX(__GLXclientState*, GLbyte*);
extern int __glXCopyContext(__GLXclientState*, GLbyte*);
extern int __glXSwapBuffers(__GLXclientState*, GLbyte*);
extern int __glXBindTexImageEXT(__GLXclientState *cl, GLbyte *pc);
extern int __glXReleaseTexImageEXT(__GLXclientState *cl, GLbyte *pc);
extern int __glXGetDrawableAttributesSGIX(__GLXclientState *cl, GLbyte *pc);
extern int __glXUseXFont(__GLXclientState*, GLbyte*);
extern int __glXCreateGLXPixmap(__GLXclientState*, GLbyte*);
extern int __glXGetVisualConfigs(__GLXclientState*, GLbyte*);
extern int __glXDestroyGLXPixmap(__GLXclientState*, GLbyte*);
extern int __glXVendorPrivate(__GLXclientState*, GLbyte*);
extern int __glXVendorPrivateWithReply(__GLXclientState*, GLbyte*);
extern int __glXQueryExtensionsString(__GLXclientState*, GLbyte*);
extern int __glXQueryServerString(__GLXclientState*, GLbyte*);
extern int __glXClientInfo(__GLXclientState*, GLbyte*);
extern int __glXMakeContextCurrent(__GLXclientState*, GLbyte*);
extern int __glXGetFBConfigs(__GLXclientState*, GLbyte*);
extern int __glXCreateNewContext(__GLXclientState*, GLbyte*);
extern int __glXCreatePixmap(__GLXclientState*, GLbyte*);
extern int __glXDisp_GetDrawableAttributesSGIX(__GLXclientState *cl, GLbyte *pc);
extern int __glXDisp_BindSwapBarrierSGIX(__GLXclientState *cl, GLbyte *pc);
extern int __glXDisp_QueryMaxSwapBarriersSGIX(__GLXclientState *cl, GLbyte *pc);
extern int __glXDisp_QueryHyperpipeNetworkSGIX(__GLXclientState *cl, GLbyte *pc);
extern int __glXDisp_DestroyHyperpipeConfigSGIX (__GLXclientState *cl, GLbyte *pc);
extern int __glXDisp_QueryHyperpipeConfigSGIX(__GLXclientState *cl, GLbyte *pc);
extern int __glXDisp_HyperpipeConfigSGIX(__GLXclientState *cl, GLbyte *pc);
extern int __glXSwapRender(__GLXclientState*, GLbyte*);
extern int __glXSwapRenderLarge(__GLXclientState*, GLbyte*);
extern int __glXSwapCreateContext(__GLXclientState*, GLbyte*);
extern int __glXSwapDestroyContext(__GLXclientState*, GLbyte*);
extern int __glXSwapMakeCurrent(__GLXclientState*, GLbyte*);
extern int __glXSwapIsDirect(__GLXclientState*, GLbyte*);
extern int __glXSwapQueryVersion(__GLXclientState*, GLbyte*);
extern int __glXSwapWaitGL(__GLXclientState*, GLbyte*);
extern int __glXSwapWaitX(__GLXclientState*, GLbyte*);
extern int __glXSwapCopyContext(__GLXclientState*, GLbyte*);
extern int __glXSwapSwapBuffers(__GLXclientState*, GLbyte*);
extern int __glXSwapBindTexImageEXT(__GLXclientState *cl, GLbyte *pc);
extern int __glXSwapReleaseTexImageEXT(__GLXclientState *cl, GLbyte *pc);
extern int __glXSwapGetDrawableAttributesSGIX(__GLXclientState *cl, GLbyte *pc);
extern int __glXSwapUseXFont(__GLXclientState*, GLbyte*);
extern int __glXSwapCreateGLXPixmap(__GLXclientState*, GLbyte*);
extern int __glXSwapGetVisualConfigs(__GLXclientState*, GLbyte*);
extern int __glXSwapDestroyGLXPixmap(__GLXclientState*, GLbyte*);
extern int __glXSwapVendorPrivate(__GLXclientState*, GLbyte*);
extern int __glXSwapVendorPrivateWithReply(__GLXclientState*, GLbyte*);
extern int __glXSwapQueryExtensionsString(__GLXclientState*, GLbyte*);
extern int __glXSwapQueryServerString(__GLXclientState*, GLbyte*);
extern int __glXSwapClientInfo(__GLXclientState*, GLbyte*);
extern int __glXSwapMakeContextCurrent(__GLXclientState*, GLbyte*);
extern int __glXSwapGetFBConfigs(__GLXclientState*, GLbyte*);
extern int __glXSwapCreateNewContext(__GLXclientState*, GLbyte*);
extern int __glXSwapCreatePixmap(__GLXclientState*, GLbyte*);
extern int __glXDispSwap_GetDrawableAttributesSGIX(__GLXclientState *cl, GLbyte *pc);
extern int __glXDispSwap_BindSwapBarrierSGIX(__GLXclientState *cl, GLbyte *pc);
extern int __glXDispSwap_QueryMaxSwapBarriersSGIX(__GLXclientState *cl, GLbyte *pc);
extern int __glXDispSwap_QueryHyperpipeNetworkSGIX(__GLXclientState *cl, GLbyte *pc);
extern int __glXDispSwap_DestroyHyperpipeConfigSGIX (__GLXclientState *cl, GLbyte *pc);
extern int __glXDispSwap_QueryHyperpipeConfigSGIX(__GLXclientState *cl, GLbyte *pc);
extern int __glXDispSwap_HyperpipeConfigSGIX(__GLXclientState *cl, GLbyte *pc);
#define __GLX_MIN_GLXCMD_OPCODE 1
#define __GLX_MAX_GLXCMD_OPCODE 20
#define __GLX_MIN_RENDER_OPCODE 1
/*#define __GLX_MAX_RENDER_OPCODE 213*/
#define __GLX_MAX_RENDER_OPCODE 230
#define __GLX_MIN_SINGLE_OPCODE 1
#define __GLX_MAX_SINGLE_OPCODE 159
#define __GLX_SINGLE_TABLE_SIZE 160
/*#define __GLX_RENDER_TABLE_SIZE 214*/
#define __GLX_RENDER_TABLE_SIZE 231
extern __GLXdispatchRenderProcPtr __glXRenderTable[__GLX_RENDER_TABLE_SIZE];
extern __GLXdispatchSingleProcPtr __glXSingleTable[__GLX_SINGLE_TABLE_SIZE];
extern __GLXdispatchRenderProcPtr __glXSwapRenderTable[__GLX_RENDER_TABLE_SIZE];
extern __GLXdispatchSingleProcPtr __glXSwapSingleTable[__GLX_SINGLE_TABLE_SIZE];
#endif /* _GLX_g_disptab_h_ */

File diff suppressed because it is too large Load Diff

View File

@ -1,48 +0,0 @@
/* $XFree86: xc/programs/Xserver/GL/glx/g_disptab_EXT.h,v 1.5 2004/01/28 18:11:50 alanh Exp $ */
/* DO NOT EDIT - THIS FILE IS AUTOMATICALLY GENERATED */
#ifdef HAVE_DIX_CONFIG_H
#include <dix-config.h>
#endif
#ifndef _GLX_g_disptab_EXT_h_
#define _GLX_g_disptab_EXT_h_
/*
** License Applicability. Except to the extent portions of this file are
** made subject to an alternative license as permitted in the SGI Free
** Software License B, Version 1.1 (the "License"), the contents of this
** file are subject only to the provisions of the License. You may not use
** this file except in compliance with the License. You may obtain a copy
** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600
** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at:
**
** http://oss.sgi.com/projects/FreeB
**
** Note that, as provided in the License, the Software is distributed on an
** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS
** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND
** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A
** PARTICULAR PURPOSE, AND NON-INFRINGEMENT.
**
** Original Code. The Original Code is: OpenGL Sample Implementation,
** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics,
** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc.
** Copyright in any portions created by third parties is as indicated
** elsewhere herein. All Rights Reserved.
**
** Additional Notice Provisions: This software was created using the
** OpenGL(R) version 1.2.1 Sample Implementation published by SGI, but has
** not been independently verified as being compliant with the OpenGL(R)
** version 1.2.1 Specification.
*/
#define __GLX_MIN_RENDER_OPCODE_EXT 2053
#define __GLX_MAX_RENDER_OPCODE_EXT 4325
#define __GLX_MIN_VENDPRIV_OPCODE_EXT 11
#define __GLX_MAX_VENDPRIV_OPCODE_EXT 14
#define __GLX_VENDPRIV_TABLE_SIZE_EXT (__GLX_MAX_VENDPRIV_OPCODE_EXT - __GLX_MIN_VENDPRIV_OPCODE_EXT + 1)
#define __GLX_RENDER_TABLE_SIZE_EXT (__GLX_MAX_RENDER_OPCODE_EXT - __GLX_MIN_RENDER_OPCODE_EXT + 1)
extern __GLXdispatchRenderProcPtr __glXRenderTable_EXT[__GLX_RENDER_TABLE_SIZE_EXT];
extern __GLXdispatchVendorPrivProcPtr __glXVendorPrivTable_EXT[__GLX_VENDPRIV_TABLE_SIZE_EXT];
extern __GLXdispatchRenderProcPtr __glXSwapRenderTable_EXT[__GLX_RENDER_TABLE_SIZE_EXT];
extern __GLXdispatchVendorPrivProcPtr __glXSwapVendorPrivTable_EXT[__GLX_VENDPRIV_TABLE_SIZE_EXT];
#endif /* _GLX_g_disptab_EXT_h_ */

View File

@ -1,77 +0,0 @@
/* $XFree86$ */
/*
** License Applicability. Except to the extent portions of this file are
** made subject to an alternative license as permitted in the SGI Free
** Software License B, Version 1.1 (the "License"), the contents of this
** file are subject only to the provisions of the License. You may not use
** this file except in compliance with the License. You may obtain a copy
** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600
** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at:
**
** http://oss.sgi.com/projects/FreeB
**
** Note that, as provided in the License, the Software is distributed on an
** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS
** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND
** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A
** PARTICULAR PURPOSE, AND NON-INFRINGEMENT.
**
** Original Code. The Original Code is: OpenGL Sample Implementation,
** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics,
** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc.
** Copyright in any portions created by third parties is as indicated
** elsewhere herein. All Rights Reserved.
**
** Additional Notice Provisions: The application programming interfaces
** established by SGI in conjunction with the Original Code are The
** OpenGL(R) Graphics System: A Specification (Version 1.2.1), released
** April 1, 1999; The OpenGL(R) Graphics System Utility Library (Version
** 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X
** Window System(R) (Version 1.3), released October 19, 1998. This software
** was created using the OpenGL(R) version 1.2.1 Sample Implementation
** published by SGI, but has not been independently verified as being
** compliant with the OpenGL(R) version 1.2.1 Specification.
**
*/
#define NEED_REPLIES
#ifdef HAVE_DIX_CONFIG_H
#include <dix-config.h>
#endif
#include "glxserver.h"
/*
** The last context used by the server. It is the context that is current
** from the server's perspective.
*/
__GLXcontext *__glXLastContext;
/*
** X resources.
*/
RESTYPE __glXContextRes;
RESTYPE __glXClientRes;
RESTYPE __glXPixmapRes;
RESTYPE __glXDrawableRes;
RESTYPE __glXSwapBarrierRes;
/*
** Error codes with the extension error base already added in.
*/
int __glXBadContext, __glXBadContextState, __glXBadDrawable, __glXBadPixmap;
int __glXBadContextTag, __glXBadCurrentWindow;
int __glXBadRenderRequest, __glXBadLargeRequest;
int __glXUnsupportedPrivateRequest;
/*
** Reply for most singles.
*/
xGLXSingleReply __glXReply;
/*
** A set of state for each client. The 0th one is unused because client
** indices start at 1, not 0.
*/
__GLXclientState *__glXClients[MAXCLIENTS+1];

File diff suppressed because it is too large Load Diff

View File

@ -1,4 +1,3 @@
/* $XFree86: xc/programs/Xserver/GL/glx/glxcmdsswap.c,v 1.10 2004/01/28 18:11:50 alanh Exp $ */
/*
** License Applicability. Except to the extent portions of this file are
** made subject to an alternative license as permitted in the SGI Free
@ -45,8 +44,7 @@
#include "glxutil.h"
#include <GL/glxtokens.h>
#include <unpack.h>
#include <g_disptab.h>
#include <g_disptab_EXT.h>
#include "g_disptab.h"
#include <pixmapstr.h>
#include <windowstr.h>
#include "glxext.h"
@ -55,11 +53,9 @@
#include "glthread.h"
#include "dispatch.h"
#include "indirect_dispatch.h"
#include "indirect_table.h"
#include "indirect_util.h"
static int __glXSwapGetFBConfigsSGIX(__GLXclientState *cl, GLbyte *pc);
static int __glXSwapCreateContextWithConfigSGIX(__GLXclientState *cl, GLbyte *pc);
static int __glXSwapCreateGLXPixmapWithConfigSGIX(__GLXclientState *cl, GLbyte *pc);
static int __glXSwapMakeCurrentReadSGI(__GLXclientState *cl, GLbyte *pc);
/************************************************************************/
@ -70,7 +66,7 @@ static int __glXSwapMakeCurrentReadSGI(__GLXclientState *cl, GLbyte *pc);
** it is called at the end of the unswapped routine.
*/
int __glXSwapCreateContext(__GLXclientState *cl, GLbyte *pc)
int __glXDispSwap_CreateContext(__GLXclientState *cl, GLbyte *pc)
{
xGLXCreateContextReq *req = (xGLXCreateContextReq *) pc;
__GLX_DECLARE_SWAP_VARIABLES;
@ -85,7 +81,7 @@ int __glXSwapCreateContext(__GLXclientState *cl, GLbyte *pc)
req->screen, req->isDirect );
}
int __glXSwapCreateNewContext(__GLXclientState *cl, GLbyte *pc)
int __glXDispSwap_CreateNewContext(__GLXclientState *cl, GLbyte *pc)
{
xGLXCreateNewContextReq *req = (xGLXCreateNewContextReq *) pc;
__GLX_DECLARE_SWAP_VARIABLES;
@ -101,7 +97,7 @@ int __glXSwapCreateNewContext(__GLXclientState *cl, GLbyte *pc)
req->screen, req->isDirect );
}
int __glXSwapCreateContextWithConfigSGIX(__GLXclientState *cl, GLbyte *pc)
int __glXDispSwap_CreateContextWithConfigSGIX(__GLXclientState *cl, GLbyte *pc)
{
xGLXCreateContextWithConfigSGIXReq *req =
(xGLXCreateContextWithConfigSGIXReq *) pc;
@ -118,7 +114,7 @@ int __glXSwapCreateContextWithConfigSGIX(__GLXclientState *cl, GLbyte *pc)
req->screen, req->isDirect );
}
int __glXSwapDestroyContext(__GLXclientState *cl, GLbyte *pc)
int __glXDispSwap_DestroyContext(__GLXclientState *cl, GLbyte *pc)
{
xGLXDestroyContextReq *req = (xGLXDestroyContextReq *) pc;
__GLX_DECLARE_SWAP_VARIABLES;
@ -126,10 +122,10 @@ int __glXSwapDestroyContext(__GLXclientState *cl, GLbyte *pc)
__GLX_SWAP_SHORT(&req->length);
__GLX_SWAP_INT(&req->context);
return __glXDestroyContext(cl, pc);
return __glXDisp_DestroyContext(cl, pc);
}
int __glXSwapMakeCurrent(__GLXclientState *cl, GLbyte *pc)
int __glXDispSwap_MakeCurrent(__GLXclientState *cl, GLbyte *pc)
{
xGLXMakeCurrentReq *req = (xGLXMakeCurrentReq *) pc;
__GLX_DECLARE_SWAP_VARIABLES;
@ -143,7 +139,7 @@ int __glXSwapMakeCurrent(__GLXclientState *cl, GLbyte *pc)
req->context, req->oldContextTag );
}
int __glXSwapMakeContextCurrent(__GLXclientState *cl, GLbyte *pc)
int __glXDispSwap_MakeContextCurrent(__GLXclientState *cl, GLbyte *pc)
{
xGLXMakeContextCurrentReq *req = (xGLXMakeContextCurrentReq *) pc;
__GLX_DECLARE_SWAP_VARIABLES;
@ -158,7 +154,7 @@ int __glXSwapMakeContextCurrent(__GLXclientState *cl, GLbyte *pc)
req->context, req->oldContextTag );
}
int __glXSwapMakeCurrentReadSGI(__GLXclientState *cl, GLbyte *pc)
int __glXDispSwap_MakeCurrentReadSGI(__GLXclientState *cl, GLbyte *pc)
{
xGLXMakeCurrentReadSGIReq *req = (xGLXMakeCurrentReadSGIReq *) pc;
__GLX_DECLARE_SWAP_VARIABLES;
@ -173,7 +169,7 @@ int __glXSwapMakeCurrentReadSGI(__GLXclientState *cl, GLbyte *pc)
req->context, req->oldContextTag );
}
int __glXSwapIsDirect(__GLXclientState *cl, GLbyte *pc)
int __glXDispSwap_IsDirect(__GLXclientState *cl, GLbyte *pc)
{
xGLXIsDirectReq *req = (xGLXIsDirectReq *) pc;
__GLX_DECLARE_SWAP_VARIABLES;
@ -181,10 +177,10 @@ int __glXSwapIsDirect(__GLXclientState *cl, GLbyte *pc)
__GLX_SWAP_SHORT(&req->length);
__GLX_SWAP_INT(&req->context);
return __glXIsDirect(cl, pc);
return __glXDisp_IsDirect(cl, pc);
}
int __glXSwapQueryVersion(__GLXclientState *cl, GLbyte *pc)
int __glXDispSwap_QueryVersion(__GLXclientState *cl, GLbyte *pc)
{
xGLXQueryVersionReq *req = (xGLXQueryVersionReq *) pc;
__GLX_DECLARE_SWAP_VARIABLES;
@ -193,10 +189,10 @@ int __glXSwapQueryVersion(__GLXclientState *cl, GLbyte *pc)
__GLX_SWAP_INT(&req->majorVersion);
__GLX_SWAP_INT(&req->minorVersion);
return __glXQueryVersion(cl, pc);
return __glXDisp_QueryVersion(cl, pc);
}
int __glXSwapWaitGL(__GLXclientState *cl, GLbyte *pc)
int __glXDispSwap_WaitGL(__GLXclientState *cl, GLbyte *pc)
{
xGLXWaitGLReq *req = (xGLXWaitGLReq *) pc;
__GLX_DECLARE_SWAP_VARIABLES;
@ -204,10 +200,10 @@ int __glXSwapWaitGL(__GLXclientState *cl, GLbyte *pc)
__GLX_SWAP_SHORT(&req->length);
__GLX_SWAP_INT(&req->contextTag);
return __glXWaitGL(cl, pc);
return __glXDisp_WaitGL(cl, pc);
}
int __glXSwapWaitX(__GLXclientState *cl, GLbyte *pc)
int __glXDispSwap_WaitX(__GLXclientState *cl, GLbyte *pc)
{
xGLXWaitXReq *req = (xGLXWaitXReq *) pc;
__GLX_DECLARE_SWAP_VARIABLES;
@ -215,10 +211,10 @@ int __glXSwapWaitX(__GLXclientState *cl, GLbyte *pc)
__GLX_SWAP_SHORT(&req->length);
__GLX_SWAP_INT(&req->contextTag);
return __glXWaitX(cl, pc);
return __glXDisp_WaitX(cl, pc);
}
int __glXSwapCopyContext(__GLXclientState *cl, GLbyte *pc)
int __glXDispSwap_CopyContext(__GLXclientState *cl, GLbyte *pc)
{
xGLXCopyContextReq *req = (xGLXCopyContextReq *) pc;
__GLX_DECLARE_SWAP_VARIABLES;
@ -228,10 +224,10 @@ int __glXSwapCopyContext(__GLXclientState *cl, GLbyte *pc)
__GLX_SWAP_INT(&req->dest);
__GLX_SWAP_INT(&req->mask);
return __glXCopyContext(cl, pc);
return __glXDisp_CopyContext(cl, pc);
}
int __glXSwapGetVisualConfigs(__GLXclientState *cl, GLbyte *pc)
int __glXDispSwap_GetVisualConfigs(__GLXclientState *cl, GLbyte *pc)
{
xGLXGetVisualConfigsReq *req = (xGLXGetVisualConfigsReq *) pc;
__GLX_DECLARE_SWAP_VARIABLES;
@ -240,7 +236,7 @@ int __glXSwapGetVisualConfigs(__GLXclientState *cl, GLbyte *pc)
return DoGetVisualConfigs( cl, req->screen, GL_TRUE );
}
int __glXSwapGetFBConfigs(__GLXclientState *cl, GLbyte *pc)
int __glXDispSwap_GetFBConfigs(__GLXclientState *cl, GLbyte *pc)
{
xGLXGetFBConfigsReq *req = (xGLXGetFBConfigsReq *) pc;
__GLX_DECLARE_SWAP_VARIABLES;
@ -249,7 +245,7 @@ int __glXSwapGetFBConfigs(__GLXclientState *cl, GLbyte *pc)
return DoGetFBConfigs( cl, req->screen, GL_TRUE );
}
int __glXSwapGetFBConfigsSGIX(__GLXclientState *cl, GLbyte *pc)
int __glXDispSwap_GetFBConfigsSGIX(__GLXclientState *cl, GLbyte *pc)
{
xGLXGetFBConfigsSGIXReq *req = (xGLXGetFBConfigsSGIXReq *) pc;
__GLX_DECLARE_SWAP_VARIABLES;
@ -258,7 +254,7 @@ int __glXSwapGetFBConfigsSGIX(__GLXclientState *cl, GLbyte *pc)
return DoGetFBConfigs( cl, req->screen, GL_TRUE );
}
int __glXSwapCreateGLXPixmap(__GLXclientState *cl, GLbyte *pc)
int __glXDispSwap_CreateGLXPixmap(__GLXclientState *cl, GLbyte *pc)
{
xGLXCreateGLXPixmapReq *req = (xGLXCreateGLXPixmapReq *) pc;
__GLX_DECLARE_SWAP_VARIABLES;
@ -273,7 +269,7 @@ int __glXSwapCreateGLXPixmap(__GLXclientState *cl, GLbyte *pc)
req->pixmap, req->glxpixmap );
}
int __glXSwapCreatePixmap(__GLXclientState *cl, GLbyte *pc)
int __glXDispSwap_CreatePixmap(__GLXclientState *cl, GLbyte *pc)
{
xGLXCreatePixmapReq *req = (xGLXCreatePixmapReq *) pc;
__GLX_DECLARE_SWAP_VARIABLES;
@ -288,7 +284,7 @@ int __glXSwapCreatePixmap(__GLXclientState *cl, GLbyte *pc)
req->pixmap, req->glxpixmap );
}
int __glXSwapCreateGLXPixmapWithConfigSGIX(__GLXclientState *cl, GLbyte *pc)
int __glXDispSwap_CreateGLXPixmapWithConfigSGIX(__GLXclientState *cl, GLbyte *pc)
{
xGLXCreateGLXPixmapWithConfigSGIXReq *req =
(xGLXCreateGLXPixmapWithConfigSGIXReq *) pc;
@ -304,7 +300,7 @@ int __glXSwapCreateGLXPixmapWithConfigSGIX(__GLXclientState *cl, GLbyte *pc)
req->pixmap, req->glxpixmap );
}
int __glXSwapDestroyGLXPixmap(__GLXclientState *cl, GLbyte *pc)
int __glXDispSwap_DestroyGLXPixmap(__GLXclientState *cl, GLbyte *pc)
{
xGLXDestroyGLXPixmapReq *req = (xGLXDestroyGLXPixmapReq *) pc;
__GLX_DECLARE_SWAP_VARIABLES;
@ -312,10 +308,72 @@ int __glXSwapDestroyGLXPixmap(__GLXclientState *cl, GLbyte *pc)
__GLX_SWAP_SHORT(&req->length);
__GLX_SWAP_INT(&req->glxpixmap);
return __glXDestroyGLXPixmap(cl, pc);
return __glXDisp_DestroyGLXPixmap(cl, pc);
}
int __glXSwapSwapBuffers(__GLXclientState *cl, GLbyte *pc)
int __glXDispSwap_DestroyPixmap(__GLXclientState *cl, GLbyte *pc)
{
xGLXDestroyGLXPixmapReq *req = (xGLXDestroyGLXPixmapReq *) pc;
__GLX_DECLARE_SWAP_VARIABLES;
__GLX_SWAP_SHORT(&req->length);
__GLX_SWAP_INT(&req->glxpixmap);
return __glXDisp_DestroyGLXPixmap(cl, pc);
}
int __glXDispSwap_QueryContext(__GLXclientState *cl, GLbyte *pc)
{
xGLXQueryContextReq *req = (xGLXQueryContextReq *) pc;
(void) req;
return BadRequest;
}
int __glXDispSwap_CreatePbuffer(__GLXclientState *cl, GLbyte *pc)
{
xGLXCreatePbufferReq *req = (xGLXCreatePbufferReq *) pc;
(void) req;
return BadRequest;
}
int __glXDispSwap_DestroyPbuffer(__GLXclientState *cl, GLbyte *pc)
{
xGLXDestroyPbufferReq *req = (xGLXDestroyPbufferReq *) req;
return BadRequest;
}
int __glXDispSwap_ChangeDrawableAttributes(__GLXclientState *cl, GLbyte *pc)
{
xGLXChangeDrawableAttributesReq *req =
(xGLXChangeDrawableAttributesReq *) req;
return BadRequest;
}
int __glXDispSwap_CreateWindow(__GLXclientState *cl, GLbyte *pc)
{
xGLXCreateWindowReq *req = (xGLXCreateWindowReq *) pc;
(void) req;
return BadRequest;
}
int __glXDispSwap_DestroyWindow(__GLXclientState *cl, GLbyte *pc)
{
xGLXDestroyWindowReq *req = (xGLXDestroyWindowReq *) pc;
(void) req;
return BadRequest;
}
int __glXDispSwap_SwapBuffers(__GLXclientState *cl, GLbyte *pc)
{
xGLXSwapBuffersReq *req = (xGLXSwapBuffersReq *) pc;
__GLX_DECLARE_SWAP_VARIABLES;
@ -324,10 +382,10 @@ int __glXSwapSwapBuffers(__GLXclientState *cl, GLbyte *pc)
__GLX_SWAP_INT(&req->contextTag);
__GLX_SWAP_INT(&req->drawable);
return __glXSwapBuffers(cl, pc);
return __glXDisp_SwapBuffers(cl, pc);
}
int __glXSwapUseXFont(__GLXclientState *cl, GLbyte *pc)
int __glXDispSwap_UseXFont(__GLXclientState *cl, GLbyte *pc)
{
xGLXUseXFontReq *req = (xGLXUseXFontReq *) pc;
__GLX_DECLARE_SWAP_VARIABLES;
@ -339,11 +397,11 @@ int __glXSwapUseXFont(__GLXclientState *cl, GLbyte *pc)
__GLX_SWAP_INT(&req->count);
__GLX_SWAP_INT(&req->listBase);
return __glXUseXFont(cl, pc);
return __glXDisp_UseXFont(cl, pc);
}
int __glXSwapQueryExtensionsString(__GLXclientState *cl, GLbyte *pc)
int __glXDispSwap_QueryExtensionsString(__GLXclientState *cl, GLbyte *pc)
{
xGLXQueryExtensionsStringReq *req = (xGLXQueryExtensionsStringReq *)pc;
__GLX_DECLARE_SWAP_VARIABLES;
@ -351,10 +409,10 @@ int __glXSwapQueryExtensionsString(__GLXclientState *cl, GLbyte *pc)
__GLX_SWAP_SHORT(&req->length);
__GLX_SWAP_INT(&req->screen);
return __glXQueryExtensionsString(cl, pc);
return __glXDisp_QueryExtensionsString(cl, pc);
}
int __glXSwapQueryServerString(__GLXclientState *cl, GLbyte *pc)
int __glXDispSwap_QueryServerString(__GLXclientState *cl, GLbyte *pc)
{
xGLXQueryServerStringReq *req = (xGLXQueryServerStringReq *)pc;
__GLX_DECLARE_SWAP_VARIABLES;
@ -363,10 +421,10 @@ int __glXSwapQueryServerString(__GLXclientState *cl, GLbyte *pc)
__GLX_SWAP_INT(&req->screen);
__GLX_SWAP_INT(&req->name);
return __glXQueryServerString(cl, pc);
return __glXDisp_QueryServerString(cl, pc);
}
int __glXSwapClientInfo(__GLXclientState *cl, GLbyte *pc)
int __glXDispSwap_ClientInfo(__GLXclientState *cl, GLbyte *pc)
{
xGLXClientInfoReq *req = (xGLXClientInfoReq *)pc;
__GLX_DECLARE_SWAP_VARIABLES;
@ -376,10 +434,10 @@ int __glXSwapClientInfo(__GLXclientState *cl, GLbyte *pc)
__GLX_SWAP_INT(&req->minor);
__GLX_SWAP_INT(&req->numbytes);
return __glXClientInfo(cl, pc);
return __glXDisp_ClientInfo(cl, pc);
}
int __glXSwapQueryContextInfoEXT(__GLXclientState *cl, GLbyte *pc)
int __glXDispSwap_QueryContextInfoEXT(__GLXclientState *cl, GLbyte *pc)
{
xGLXQueryContextInfoEXTReq *req = (xGLXQueryContextInfoEXTReq *) pc;
__GLX_DECLARE_SWAP_VARIABLES;
@ -387,10 +445,10 @@ int __glXSwapQueryContextInfoEXT(__GLXclientState *cl, GLbyte *pc)
__GLX_SWAP_SHORT(&req->length);
__GLX_SWAP_INT(&req->context);
return __glXQueryContextInfoEXT(cl, pc);
return __glXDisp_QueryContextInfoEXT(cl, pc);
}
int __glXSwapBindTexImageEXT(__GLXclientState *cl, GLbyte *pc)
int __glXDispSwap_BindTexImageEXT(__GLXclientState *cl, GLbyte *pc)
{
xGLXVendorPrivateReq *req = (xGLXVendorPrivateReq *) pc;
GLXDrawable *drawId;
@ -408,10 +466,10 @@ int __glXSwapBindTexImageEXT(__GLXclientState *cl, GLbyte *pc)
__GLX_SWAP_INT(drawId);
__GLX_SWAP_INT(buffer);
return __glXBindTexImageEXT(cl, (GLbyte *)pc);
return __glXDisp_BindTexImageEXT(cl, (GLbyte *)pc);
}
int __glXSwapReleaseTexImageEXT(__GLXclientState *cl, GLbyte *pc)
int __glXDispSwap_ReleaseTexImageEXT(__GLXclientState *cl, GLbyte *pc)
{
xGLXVendorPrivateReq *req = (xGLXVendorPrivateReq *) pc;
GLXDrawable *drawId;
@ -429,10 +487,35 @@ int __glXSwapReleaseTexImageEXT(__GLXclientState *cl, GLbyte *pc)
__GLX_SWAP_INT(drawId);
__GLX_SWAP_INT(buffer);
return __glXReleaseTexImageEXT(cl, (GLbyte *)pc);
return __glXDisp_ReleaseTexImageEXT(cl, (GLbyte *)pc);
}
int __glXSwapGetDrawableAttributesSGIX(__GLXclientState *cl, GLbyte *pc)
int __glXDispSwap_CopySubBufferMESA(__GLXclientState *cl, GLbyte *pc)
{
xGLXVendorPrivateReq *req = (xGLXVendorPrivateReq *) pc;
GLXDrawable *drawId;
int *buffer;
(void) drawId;
(void) buffer;
__GLX_DECLARE_SWAP_VARIABLES;
pc += __GLX_VENDPRIV_HDR_SIZE;
__GLX_SWAP_SHORT(&req->length);
__GLX_SWAP_INT(&req->contextTag);
__GLX_SWAP_INT(pc);
__GLX_SWAP_INT(pc + 4);
__GLX_SWAP_INT(pc + 8);
__GLX_SWAP_INT(pc + 12);
__GLX_SWAP_INT(pc + 16);
return __glXDisp_CopySubBufferMESA(cl, pc);
}
int __glXDispSwap_GetDrawableAttributesSGIX(__GLXclientState *cl, GLbyte *pc)
{
xGLXVendorPrivateWithReplyReq *req = (xGLXVendorPrivateWithReplyReq *)pc;
CARD32 *data;
@ -444,7 +527,19 @@ int __glXSwapGetDrawableAttributesSGIX(__GLXclientState *cl, GLbyte *pc)
__GLX_SWAP_INT(&req->contextTag);
__GLX_SWAP_INT(data);
return __glXGetDrawableAttributesSGIX(cl, (GLbyte *)pc);
return __glXDisp_GetDrawableAttributesSGIX(cl, pc);
}
int __glXDispSwap_GetDrawableAttributes(__GLXclientState *cl, GLbyte *pc)
{
xGLXGetDrawableAttributesReq *req = (xGLXGetDrawableAttributesReq *)pc;
__GLX_DECLARE_SWAP_VARIABLES;
__GLX_SWAP_SHORT(&req->length);
__GLX_SWAP_INT(&req->drawable);
return __glXDisp_GetDrawableAttributes(cl, pc);
}
@ -543,325 +638,17 @@ void __glXSwapGetDrawableAttributesReply(ClientPtr client,
** client library to send batches of GL rendering commands.
*/
int __glXSwapRender(__GLXclientState *cl, GLbyte *pc)
int __glXDispSwap_Render(__GLXclientState *cl, GLbyte *pc)
{
xGLXRenderReq *req;
ClientPtr client= cl->client;
int left, cmdlen, error;
int commandsDone;
CARD16 opcode;
__GLXrenderHeader *hdr;
__GLXcontext *cx;
__GLX_DECLARE_SWAP_VARIABLES;
/*
** NOTE: much of this code also appears in the nonswapping version of this
** routine, __glXRender(). Any changes made here should also be
** duplicated there.
*/
req = (xGLXRenderReq *) pc;
__GLX_SWAP_SHORT(&req->length);
__GLX_SWAP_INT(&req->contextTag);
cx = __glXForceCurrent(cl, req->contextTag, &error);
if (!cx) {
return error;
}
commandsDone = 0;
pc += sz_xGLXRenderReq;
left = (req->length << 2) - sz_xGLXRenderReq;
while (left > 0) {
__GLXrenderSizeData *entry;
int extra;
void (* proc)(GLbyte *);
/*
** Verify that the header length and the overall length agree.
** Also, each command must be word aligned.
*/
hdr = (__GLXrenderHeader *) pc;
__GLX_SWAP_SHORT(&hdr->length);
__GLX_SWAP_SHORT(&hdr->opcode);
cmdlen = hdr->length;
opcode = hdr->opcode;
if ( (opcode >= __GLX_MIN_RENDER_OPCODE) &&
(opcode <= __GLX_MAX_RENDER_OPCODE) ) {
entry = &__glXRenderSizeTable[opcode];
proc = __glXSwapRenderTable[opcode];
#if __GLX_MAX_RENDER_OPCODE_EXT > __GLX_MIN_RENDER_OPCODE_EXT
} else if ( (opcode >= __GLX_MIN_RENDER_OPCODE_EXT) &&
(opcode <= __GLX_MAX_RENDER_OPCODE_EXT) ) {
int index = opcode - __GLX_MIN_RENDER_OPCODE_EXT;
entry = &__glXRenderSizeTable_EXT[index];
proc = __glXSwapRenderTable_EXT[index];
#endif /* __GLX_MAX_RENDER_OPCODE_EXT > __GLX_MIN_RENDER_OPCODE_EXT */
} else {
client->errorValue = commandsDone;
return __glXBadRenderRequest;
}
if (!entry->bytes) {
/* unused opcode */
client->errorValue = commandsDone;
return __glXBadRenderRequest;
}
if (entry->varsize) {
/* variable size command */
extra = (*entry->varsize)(pc + __GLX_RENDER_HDR_SIZE, True);
if (extra < 0) {
extra = 0;
}
if (cmdlen != __GLX_PAD(entry->bytes + extra)) {
return BadLength;
}
} else {
/* constant size command */
if (cmdlen != __GLX_PAD(entry->bytes)) {
return BadLength;
}
}
if (left < cmdlen) {
return BadLength;
}
/*
** Skip over the header and execute the command. We allow the
** caller to trash the command memory. This is useful especially
** for things that require double alignment - they can just shift
** the data towards lower memory (trashing the header) by 4 bytes
** and achieve the required alignment.
*/
(*proc)(pc + __GLX_RENDER_HDR_SIZE);
pc += cmdlen;
left -= cmdlen;
commandsDone++;
}
__GLX_NOTE_UNFLUSHED_CMDS(cx);
return Success;
return DoRender(cl, pc, True);
}
/*
** Execute a large rendering request (one that spans multiple X requests).
*/
int __glXSwapRenderLarge(__GLXclientState *cl, GLbyte *pc)
int __glXDispSwap_RenderLarge(__GLXclientState *cl, GLbyte *pc)
{
xGLXRenderLargeReq *req;
ClientPtr client= cl->client;
size_t dataBytes;
void (*proc)(GLbyte *);
__GLXrenderLargeHeader *hdr;
__GLXcontext *cx;
int error;
CARD16 opcode;
__GLX_DECLARE_SWAP_VARIABLES;
/*
** NOTE: much of this code also appears in the nonswapping version of this
** routine, __glXRenderLarge(). Any changes made here should also be
** duplicated there.
*/
req = (xGLXRenderLargeReq *) pc;
__GLX_SWAP_SHORT(&req->length);
__GLX_SWAP_INT(&req->contextTag);
__GLX_SWAP_INT(&req->dataBytes);
__GLX_SWAP_SHORT(&req->requestNumber);
__GLX_SWAP_SHORT(&req->requestTotal);
cx = __glXForceCurrent(cl, req->contextTag, &error);
if (!cx) {
/* Reset in case this isn't 1st request. */
__glXResetLargeCommandStatus(cl);
return error;
}
dataBytes = req->dataBytes;
/*
** Check the request length.
*/
if ((req->length << 2) != __GLX_PAD(dataBytes) + sz_xGLXRenderLargeReq) {
client->errorValue = req->length;
/* Reset in case this isn't 1st request. */
__glXResetLargeCommandStatus(cl);
return BadLength;
}
pc += sz_xGLXRenderLargeReq;
if (cl->largeCmdRequestsSoFar == 0) {
__GLXrenderSizeData *entry;
int extra;
size_t cmdlen;
/*
** This is the first request of a multi request command.
** Make enough space in the buffer, then copy the entire request.
*/
if (req->requestNumber != 1) {
client->errorValue = req->requestNumber;
return __glXBadLargeRequest;
}
hdr = (__GLXrenderLargeHeader *) pc;
__GLX_SWAP_INT(&hdr->length);
__GLX_SWAP_INT(&hdr->opcode);
cmdlen = hdr->length;
opcode = hdr->opcode;
if ( (opcode >= __GLX_MIN_RENDER_OPCODE) &&
(opcode <= __GLX_MAX_RENDER_OPCODE) ) {
entry = &__glXRenderSizeTable[opcode];
proc = __glXSwapRenderTable[opcode];
#if __GLX_MAX_RENDER_OPCODE_EXT > __GLX_MIN_RENDER_OPCODE_EXT
} else if ( (opcode >= __GLX_MIN_RENDER_OPCODE_EXT) &&
(opcode <= __GLX_MAX_RENDER_OPCODE_EXT) ) {
int index = opcode - __GLX_MIN_RENDER_OPCODE_EXT;
entry = &__glXRenderSizeTable_EXT[index];
proc = __glXSwapRenderTable_EXT[index];
#endif /* __GLX_MAX_RENDER_OPCODE_EXT > __GLX_MIN_RENDER_OPCODE_EXT */
} else {
client->errorValue = opcode;
return __glXBadLargeRequest;
}
if (!entry->bytes) {
/* unused opcode */
client->errorValue = opcode;
return __glXBadLargeRequest;
}
if (entry->varsize) {
/*
** If it's a variable-size command (a command whose length must
** be computed from its parameters), all the parameters needed
** will be in the 1st request, so it's okay to do this.
*/
extra = (*entry->varsize)(pc + __GLX_RENDER_LARGE_HDR_SIZE, True);
if (extra < 0) {
extra = 0;
}
/* large command's header is 4 bytes longer, so add 4 */
if (cmdlen != __GLX_PAD(entry->bytes + 4 + extra)) {
return BadLength;
}
} else {
/* constant size command */
if (cmdlen != __GLX_PAD(entry->bytes + 4)) {
return BadLength;
}
}
/*
** Make enough space in the buffer, then copy the entire request.
*/
if (cl->largeCmdBufSize < cmdlen) {
if (!cl->largeCmdBuf) {
cl->largeCmdBuf = (GLbyte *) xalloc(cmdlen);
} else {
cl->largeCmdBuf = (GLbyte *) xrealloc(cl->largeCmdBuf, cmdlen);
}
if (!cl->largeCmdBuf) {
return BadAlloc;
}
cl->largeCmdBufSize = cmdlen;
}
memcpy(cl->largeCmdBuf, pc, dataBytes);
cl->largeCmdBytesSoFar = dataBytes;
cl->largeCmdBytesTotal = cmdlen;
cl->largeCmdRequestsSoFar = 1;
cl->largeCmdRequestsTotal = req->requestTotal;
return Success;
} else {
/*
** We are receiving subsequent (i.e. not the first) requests of a
** multi request command.
*/
/*
** Check the request number and the total request count.
*/
if (req->requestNumber != cl->largeCmdRequestsSoFar + 1) {
client->errorValue = req->requestNumber;
__glXResetLargeCommandStatus(cl);
return __glXBadLargeRequest;
}
if (req->requestTotal != cl->largeCmdRequestsTotal) {
client->errorValue = req->requestTotal;
__glXResetLargeCommandStatus(cl);
return __glXBadLargeRequest;
}
/*
** Check that we didn't get too much data.
*/
if ((cl->largeCmdBytesSoFar + dataBytes) > cl->largeCmdBytesTotal) {
client->errorValue = dataBytes;
__glXResetLargeCommandStatus(cl);
return __glXBadLargeRequest;
}
memcpy(cl->largeCmdBuf + cl->largeCmdBytesSoFar, pc, dataBytes);
cl->largeCmdBytesSoFar += dataBytes;
cl->largeCmdRequestsSoFar++;
if (req->requestNumber == cl->largeCmdRequestsTotal) {
/*
** This is the last request; it must have enough bytes to complete
** the command.
*/
/* NOTE: the two pad macros have been added below; they are needed
** because the client library pads the total byte count, but not
** the per-request byte counts. The Protocol Encoding says the
** total byte count should not be padded, so a proposal will be
** made to the ARB to relax the padding constraint on the total
** byte count, thus preserving backward compatibility. Meanwhile,
** the padding done below fixes a bug that did not allow
** large commands of odd sizes to be accepted by the server.
*/
if (__GLX_PAD(cl->largeCmdBytesSoFar) !=
__GLX_PAD(cl->largeCmdBytesTotal)) {
client->errorValue = dataBytes;
__glXResetLargeCommandStatus(cl);
return __glXBadLargeRequest;
}
hdr = (__GLXrenderLargeHeader *) cl->largeCmdBuf;
/*
** The opcode and length field in the header had already been
** swapped when the first request was received.
*/
/*
** Use the opcode to index into the procedure table.
*/
opcode = hdr->opcode;
if ( (opcode >= __GLX_MIN_RENDER_OPCODE) &&
(opcode <= __GLX_MAX_RENDER_OPCODE) ) {
proc = __glXSwapRenderTable[opcode];
#if __GLX_MAX_RENDER_OPCODE_EXT > __GLX_MIN_RENDER_OPCODE_EXT
} else if ( (opcode >= __GLX_MIN_RENDER_OPCODE_EXT) &&
(opcode <= __GLX_MAX_RENDER_OPCODE_EXT) ) {
int index = opcode - __GLX_MIN_RENDER_OPCODE_EXT;
proc = __glXSwapRenderTable_EXT[index];
#endif /* __GLX_MAX_RENDER_OPCODE_EXT > __GLX_MIN_RENDER_OPCODE_EXT */
} else {
client->errorValue = opcode;
return __glXBadLargeRequest;
}
/*
** Skip over the header and execute the command.
*/
(*proc)(cl->largeCmdBuf + __GLX_RENDER_LARGE_HDR_SIZE);
__GLX_NOTE_UNFLUSHED_CMDS(cx);
/*
** Reset for the next RenderLarge series.
*/
__glXResetLargeCommandStatus(cl);
} else {
/*
** This is neither the first nor the last request.
*/
}
return Success;
}
return DoRenderLarge(cl, pc, True);
}
/************************************************************************/
@ -871,10 +658,11 @@ int __glXSwapRenderLarge(__GLXclientState *cl, GLbyte *pc)
** allocating these entry points in the dispatch table.
*/
int __glXSwapVendorPrivate(__GLXclientState *cl, GLbyte *pc)
int __glXDispSwap_VendorPrivate(__GLXclientState *cl, GLbyte *pc)
{
xGLXVendorPrivateReq *req;
GLint vendorcode;
__GLXdispatchVendorPrivProcPtr proc;
__GLX_DECLARE_SWAP_VARIABLES;
@ -884,39 +672,24 @@ int __glXSwapVendorPrivate(__GLXclientState *cl, GLbyte *pc)
vendorcode = req->vendorCode;
#ifndef __DARWIN__
switch( vendorcode ) {
case X_GLvop_SampleMaskSGIS:
__GLX_SWAP_FLOAT(pc + 4);
__GLX_SWAP_INT(pc + 8);
CALL_SampleMaskSGIS( GET_DISPATCH(),
(*(GLfloat *)(pc + 4), *(GLboolean *)(pc + 8)) );
return Success;
case X_GLvop_SamplePatternSGIS:
__GLX_SWAP_INT(pc + 4);
CALL_SamplePatternSGIS( GET_DISPATCH(), (*(GLenum *)(pc + 4)) );
return Success;
case X_GLXvop_BindTexImageEXT:
return __glXSwapBindTexImageEXT(cl, pc);
case X_GLXvop_ReleaseTexImageEXT:
return __glXSwapReleaseTexImageEXT(cl, pc);
}
#endif
if ((vendorcode >= __GLX_MIN_VENDPRIV_OPCODE_EXT) &&
(vendorcode <= __GLX_MAX_VENDPRIV_OPCODE_EXT)) {
(*__glXSwapVendorPrivTable_EXT[vendorcode-__GLX_MIN_VENDPRIV_OPCODE_EXT])(cl, (GLbyte*)req);
proc = (__GLXdispatchVendorPrivProcPtr)
__glXGetProtocolDecodeFunction(& VendorPriv_dispatch_info,
vendorcode, 1);
if (proc != NULL) {
(*proc)(cl, (GLbyte*)req);
return Success;
}
cl->client->errorValue = req->vendorCode;
return __glXUnsupportedPrivateRequest;
return __glXError(GLXUnsupportedPrivateRequest);
}
int __glXSwapVendorPrivateWithReply(__GLXclientState *cl, GLbyte *pc)
int __glXDispSwap_VendorPrivateWithReply(__GLXclientState *cl, GLbyte *pc)
{
xGLXVendorPrivateWithReplyReq *req;
GLint vendorcode;
__GLXdispatchVendorPrivProcPtr proc;
__GLX_DECLARE_SWAP_VARIABLES;
@ -926,42 +699,13 @@ int __glXSwapVendorPrivateWithReply(__GLXclientState *cl, GLbyte *pc)
vendorcode = req->vendorCode;
switch (vendorcode) {
case X_GLXvop_QueryContextInfoEXT:
return __glXSwapQueryContextInfoEXT(cl, pc);
case X_GLXvop_MakeCurrentReadSGI:
return __glXSwapMakeCurrentReadSGI(cl, pc);
case X_GLXvop_GetFBConfigsSGIX:
return __glXSwapGetFBConfigsSGIX(cl, pc);
case X_GLXvop_CreateContextWithConfigSGIX:
return __glXSwapCreateContextWithConfigSGIX(cl, pc);
case X_GLXvop_CreateGLXPixmapWithConfigSGIX:
return __glXSwapCreateGLXPixmapWithConfigSGIX(cl, pc);
case X_GLXvop_GetDrawableAttributesSGIX:
return __glXSwapGetDrawableAttributesSGIX(cl, pc);
case X_GLvop_IsRenderbufferEXT:
return __glXDispSwap_IsRenderbufferEXT(cl, pc);
case X_GLvop_GenRenderbuffersEXT:
return __glXDispSwap_GenRenderbuffersEXT(cl, pc);
case X_GLvop_GetRenderbufferParameterivEXT:
return __glXDispSwap_GetRenderbufferParameterivEXT(cl, pc);
case X_GLvop_IsFramebufferEXT:
return __glXDispSwap_IsFramebufferEXT(cl, pc);
case X_GLvop_GenFramebuffersEXT:
return __glXDispSwap_GenFramebuffersEXT(cl, pc);
case X_GLvop_CheckFramebufferStatusEXT:
return __glXDispSwap_CheckFramebufferStatusEXT(cl, pc);
case X_GLvop_GetFramebufferAttachmentParameterivEXT:
return __glXDispSwap_GetFramebufferAttachmentParameterivEXT(cl, pc);
default:
break;
proc = (__GLXdispatchVendorPrivProcPtr)
__glXGetProtocolDecodeFunction(& VendorPriv_dispatch_info,
vendorcode, 1);
if (proc != NULL) {
return (*proc)(cl, (GLbyte*)req);
}
if ((vendorcode >= __GLX_MIN_VENDPRIV_OPCODE_EXT) &&
(vendorcode <= __GLX_MAX_VENDPRIV_OPCODE_EXT)) {
return (*__glXSwapVendorPrivTable_EXT[vendorcode-__GLX_MIN_VENDPRIV_OPCODE_EXT])(cl, (GLbyte*)req);
}
cl->client->errorValue = req->vendorCode;
return __glXUnsupportedPrivateRequest;
return __glXError(GLXUnsupportedPrivateRequest);
}

View File

@ -1,4 +1,3 @@
/* $XFree86: xc/programs/Xserver/GL/glx/glxcontext.h,v 1.4 2002/02/22 21:45:07 dawes Exp $ */
#ifdef HAVE_DIX_CONFIG_H
#include <dix-config.h>
#endif
@ -58,7 +57,7 @@ struct __GLXtextureFromPixmap {
struct __GLXcontext {
void (*destroy) (__GLXcontext *context);
void (*destroy) (__GLXcontext *context);
int (*makeCurrent) (__GLXcontext *context);
int (*loseCurrent) (__GLXcontext *context);
int (*copy) (__GLXcontext *dst,
@ -66,10 +65,6 @@ struct __GLXcontext {
unsigned long mask);
int (*forceCurrent) (__GLXcontext *context);
__GLXdrawable *(*createDrawable)(__GLXcontext *context,
DrawablePtr pDraw,
XID drawId);
__GLXtextureFromPixmap *textureFromPixmap;
/*

View File

@ -1,4 +1,3 @@
/* $XFree86: xc/programs/Xserver/GL/glx/glxdrawable.h,v 1.3 2001/03/21 16:29:36 dawes Exp $ */
#ifdef HAVE_DIX_CONFIG_H
#include <dix-config.h>
#endif
@ -41,6 +40,8 @@
**
*/
#include <damage.h>
typedef struct {
DrawablePtr pDraw;
@ -49,13 +50,15 @@ typedef struct {
ScreenPtr pScreen;
Bool idExists;
int refcnt;
DamagePtr pDamage;
} __GLXpixmap;
struct __GLXdrawable {
void (*destroy)(__GLXdrawable *private);
GLboolean (*resize)(__GLXdrawable *private);
GLboolean (*swapBuffers)(__GLXdrawable *);
void (*copySubBuffer)(__GLXdrawable *drawable,
int x, int y, int w, int h);
/*
** list of drawable private structs

View File

@ -53,11 +53,11 @@
#include "glcontextmodes.h"
#include "g_disptab.h"
#include "g_disptab_EXT.h"
#include "glapitable.h"
#include "glapi.h"
#include "glthread.h"
#include "dispatch.h"
#include "extension_string.h"
#define STRINGIFY(macro_or_string) STRINGIFY_ARG (macro_or_string)
@ -72,6 +72,11 @@ struct __GLXDRIscreen {
__DRIscreen driScreen;
void *driver;
xf86EnterVTProc *enterVT;
xf86LeaveVTProc *leaveVT;
unsigned char glx_enable_bits[__GLX_EXT_BYTES];
};
struct __GLXDRIcontext {
@ -112,28 +117,54 @@ struct __GLXDRIdrawable {
* months ago. :(
* 20050727 - Gut all the old interfaces. This breaks compatability with
* any DRI driver built to any previous version.
* 20060314 - Added support for GLX_MESA_copy_sub_buffer.
*/
#define INTERNAL_VERSION 20050727
static const char CREATE_NEW_SCREEN_FUNC[] =
"__driCreateNewScreen_" STRINGIFY (INTERNAL_VERSION);
/* The DRI driver entry point version wasn't bumped when the
* copySubBuffer functionality was added to the DRI drivers, but the
* functionality is still conditional on the value of the
* internal_api_version passed to __driCreateNewScreen. However, the
* screen constructor doesn't fail for a DRI driver that's older than
* the passed in version number, so there's no way we can know for
* sure that we can actually use the copySubBuffer functionality. But
* since the earliest (and at this point only) released mesa version
* (6.5) that uses the 20050727 entry point does have copySubBuffer,
* we'll just settle for that. We still have to pass in a higher to
* the screen constructor to enable the functionality.
*/
#define COPY_SUB_BUFFER_INTERNAL_VERSION 20060314
static void
__glXDRIleaveServer(void)
{
int i;
for (i = 0; i < screenInfo.numScreens; i++)
DRIDoBlockHandler(i, NULL, NULL, NULL);
DRIBlockHandler(NULL, NULL, NULL);
}
static void
__glXDRIenterServer(void)
{
int i;
DRIWakeupHandler(NULL, 0, NULL);
}
for (i = 0; i < screenInfo.numScreens; i++)
DRIDoWakeupHandler(i, NULL, 0, NULL);
/**
* \bug
* We're jumping through hoops here to get the DRIdrawable which the DRI
* driver tries to keep to it self... cf. FIXME in \c createDrawable.
*/
static void
__glXDRIdrawableFoo(__GLXDRIdrawable *draw)
{
__GLXDRIscreen * const screen =
(__GLXDRIscreen *) __glXgetActiveScreen(draw->base.pDraw->pScreen->myNum);
draw->driDrawable = (*screen->driScreen.getDrawable)(NULL,
draw->base.drawId,
screen->driScreen.private);
}
static void
@ -160,16 +191,8 @@ static GLboolean
__glXDRIdrawableSwapBuffers(__GLXdrawable *basePrivate)
{
__GLXDRIdrawable *private = (__GLXDRIdrawable *) basePrivate;
__GLXDRIscreen *screen;
/* FIXME: We're jumping through hoops here to get the DRIdrawable
* which the dri driver tries to keep to it self... cf. FIXME in
* createDrawable. */
screen = (__GLXDRIscreen *) __glXgetActiveScreen(private->base.pDraw->pScreen->myNum);
private->driDrawable = (screen->driScreen.getDrawable)(NULL,
private->base.drawId,
screen->driScreen.private);
__glXDRIdrawableFoo(private);
(*private->driDrawable->swapBuffers)(NULL,
private->driDrawable->private);
@ -177,48 +200,32 @@ __glXDRIdrawableSwapBuffers(__GLXdrawable *basePrivate)
return TRUE;
}
static __GLXdrawable *
__glXDRIcontextCreateDrawable(__GLXcontext *context,
DrawablePtr pDraw,
XID drawId)
static int
__glXDRIdrawableSwapInterval(__GLXdrawable *baseDrawable, int interval)
{
__GLXDRIdrawable *private;
__GLXDRIdrawable *draw = (__GLXDRIdrawable *) baseDrawable;
private = xalloc(sizeof *private);
if (private == NULL)
return NULL;
__glXDRIdrawableFoo(draw);
memset(private, 0, sizeof *private);
if (!__glXDrawableInit(&private->base, context, pDraw, drawId)) {
xfree(private);
return NULL;
}
private->base.destroy = __glXDRIdrawableDestroy;
private->base.resize = __glXDRIdrawableResize;
private->base.swapBuffers = __glXDRIdrawableSwapBuffers;
#if 0
/* FIXME: It would only be natural that we called
* driScreen->createNewDrawable here but the DRI drivers manage
* them a little oddly. FIXME: describe this better.*/
/* The last argument is 'attrs', which is used with pbuffers which
* we currently don't support. */
glxPriv->driDrawable.private =
(pGlxScreen->driScreen.createNewDrawable)(NULL, modes,
drawId,
&glxPriv->driDrawable,
0,
NULL);
#endif
return &private->base;
draw->driDrawable->swap_interval = interval;
return 0;
}
static void
__glXDRIdrawableCopySubBuffer(__GLXdrawable *basePrivate,
int x, int y, int w, int h)
{
__GLXDRIdrawable *private = (__GLXDRIdrawable *) basePrivate;
__glXDRIdrawableFoo(private);
(*private->driDrawable->copySubBuffer)(NULL,
private->driDrawable->private,
x, y, w, h);
}
static void
__glXDRIcontextDestroy(__GLXcontext *baseContext)
{
@ -296,24 +303,18 @@ glxCountBits(int word)
}
static void
glxFillAlphaChannel (PixmapPtr pixmap)
glxFillAlphaChannel (PixmapPtr pixmap, int x, int y, int width, int height)
{
int i, j;
CARD32 *pixels = (CARD32 *)pixmap->devPrivate.ptr;
int i;
CARD32 *p, *end, *pixels = (CARD32 *)pixmap->devPrivate.ptr;
CARD32 rowstride = pixmap->devKind / 4;
CARD32 x, y;
x = pixmap->drawable.x;
y = pixmap->drawable.y;
for (i = y; i < pixmap->drawable.height + y; ++i)
for (i = y; i < y + height; i++)
{
for (j = x; j < pixmap->drawable.width + x; ++j)
{
int index = i * rowstride + j;
pixels[index] |= 0xFF000000;
}
p = &pixels[i * rowstride + x];
end = p + width;
while (p < end)
*p++ |= 0xFF000000;
}
}
@ -326,7 +327,6 @@ glxFillAlphaChannel (PixmapPtr pixmap)
* - No fbconfig handling for TEXTURE_TARGET
* - No fbconfig exposure of Y inversion state
* - No GenerateMipmapEXT support (due to no FBO support)
* - No damage tracking between binds
* - No support for anything but 16bpp and 32bpp-sparse pixmaps
*/
@ -335,38 +335,108 @@ __glXDRIbindTexImage(__GLXcontext *baseContext,
int buffer,
__GLXpixmap *glxPixmap)
{
RegionPtr pRegion;
PixmapPtr pixmap;
int bpp;
Bool npot;
GLenum target, format, type;
pixmap = (PixmapPtr) glxPixmap->pDraw;
bpp = pixmap->drawable.depth >= 24 ? 4 : 2; /* XXX 24bpp packed, 8, etc */
if (!glxPixmap->pDamage) {
glxPixmap->pDamage = DamageCreate(NULL, NULL, DamageReportNone,
TRUE, glxPixmap->pScreen, NULL);
if (!glxPixmap->pDamage)
return BadAlloc;
DamageRegister ((DrawablePtr) pixmap, glxPixmap->pDamage);
pRegion = NULL;
} else {
pRegion = DamageRegion(glxPixmap->pDamage);
if (REGION_NIL(pRegion))
return Success;
}
/* XXX 24bpp packed, 8, etc */
if (pixmap->drawable.depth >= 24) {
bpp = 4;
format = GL_BGRA;
type =
#if X_BYTE_ORDER == X_LITTLE_ENDIAN
GL_UNSIGNED_BYTE;
#else
GL_UNSIGNED_INT_8_8_8_8_REV;
#endif
} else {
bpp = 2;
format = GL_RGB;
type = GL_UNSIGNED_SHORT_5_6_5;
}
if (!(glxCountBits(pixmap->drawable.width) == 1 &&
glxCountBits(pixmap->drawable.height) == 1)
/* || strstr(CALL_GetString(GL_EXTENSIONS,
"GL_ARB_texture_non_power_of_two")) */)
target = GL_TEXTURE_RECTANGLE_ARB;
else
target = GL_TEXTURE_2D;
CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_ROW_LENGTH,
pixmap->devKind / bpp) );
CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_ROWS,
pixmap->drawable.y) );
CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_PIXELS,
pixmap->drawable.x) );
pixmap->devKind / bpp) );
if (pRegion == NULL)
{
if (pixmap->drawable.depth == 24)
glxFillAlphaChannel(pixmap,
pixmap->drawable.x,
pixmap->drawable.y,
pixmap->drawable.width,
pixmap->drawable.height);
if (pixmap->drawable.depth == 24)
glxFillAlphaChannel(pixmap);
CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_PIXELS,
pixmap->drawable.x) );
CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_ROWS,
pixmap->drawable.y) );
npot = !(glxCountBits(pixmap->drawable.width) == 1 &&
glxCountBits(pixmap->drawable.height) == 1) /* ||
strstr(CALL_GetString(GL_EXTENSIONS,
"GL_ARB_texture_non_power_of_two")) */ ;
CALL_TexImage2D( GET_DISPATCH(),
( npot ? GL_TEXTURE_RECTANGLE_ARB : GL_TEXTURE_2D,
0,
bpp == 4 ? 4 : 3,
pixmap->drawable.width,
pixmap->drawable.height,
0,
bpp == 4 ? GL_BGRA : GL_RGB,
bpp == 4 ? GL_UNSIGNED_BYTE : GL_UNSIGNED_SHORT_5_6_5,
pixmap->devPrivate.ptr ) );
CALL_TexImage2D( GET_DISPATCH(),
(target,
0,
bpp == 4 ? 4 : 3,
pixmap->drawable.width,
pixmap->drawable.height,
0,
format,
type,
pixmap->devPrivate.ptr) );
} else {
int i, numRects;
BoxPtr p;
numRects = REGION_NUM_RECTS (pRegion);
p = REGION_RECTS (pRegion);
for (i = 0; i < numRects; i++)
{
if (pixmap->drawable.depth == 24)
glxFillAlphaChannel(pixmap,
pixmap->drawable.x + p[i].x1,
pixmap->drawable.y + p[i].y1,
p[i].x2 - p[i].x1,
p[i].y2 - p[i].y1);
CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_PIXELS,
pixmap->drawable.x + p[i].x1) );
CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_ROWS,
pixmap->drawable.y + p[i].y1) );
CALL_TexSubImage2D( GET_DISPATCH(),
(target,
0,
p[i].x1, p[i].y1,
p[i].x2 - p[i].x1, p[i].y2 - p[i].y1,
format,
type,
pixmap->devPrivate.ptr) );
}
}
DamageEmpty(glxPixmap->pDamage);
return Success;
}
@ -425,7 +495,6 @@ __glXDRIscreenCreateContext(__GLXscreen *baseScreen,
context->base.loseCurrent = __glXDRIcontextLoseCurrent;
context->base.copy = __glXDRIcontextCopy;
context->base.forceCurrent = __glXDRIcontextForceCurrent;
context->base.createDrawable = __glXDRIcontextCreateDrawable;
context->base.textureFromPixmap = &__glXDRItextureFromPixmap;
@ -440,6 +509,50 @@ __glXDRIscreenCreateContext(__GLXscreen *baseScreen,
return &context->base;
}
static __GLXdrawable *
__glXDRIscreenCreateDrawable(__GLXscreen *screen,
DrawablePtr pDraw,
XID drawId,
__GLcontextModes *modes)
{
__GLXDRIdrawable *private;
private = xalloc(sizeof *private);
if (private == NULL)
return NULL;
memset(private, 0, sizeof *private);
if (!__glXDrawableInit(&private->base, screen, pDraw, drawId, modes)) {
xfree(private);
return NULL;
}
private->base.destroy = __glXDRIdrawableDestroy;
private->base.resize = __glXDRIdrawableResize;
private->base.swapBuffers = __glXDRIdrawableSwapBuffers;
private->base.copySubBuffer = __glXDRIdrawableCopySubBuffer;
#if 0
/* FIXME: It would only be natural that we called
* driScreen->createNewDrawable here but the DRI drivers manage
* them a little oddly. FIXME: describe this better.*/
/* The last argument is 'attrs', which is used with pbuffers which
* we currently don't support. */
glxPriv->driDrawable.private =
(screen->driScreen.createNewDrawable)(NULL, modes,
drawId,
&glxPriv->driDrawable,
0,
NULL);
#endif
return &private->base;
}
static unsigned
filter_modes(__GLcontextModes **server_modes,
const __GLcontextModes *driver_modes)
@ -497,15 +610,27 @@ filter_modes(__GLcontextModes **server_modes,
}
static void
enable_glx_extension(void *psc, const char *ext_name)
{
__GLXDRIscreen * const screen = (__GLXDRIscreen *) psc;
__glXEnableExtension(screen->glx_enable_bits, ext_name);
}
static __DRIfuncPtr getProcAddress(const char *proc_name)
{
if (strcmp(proc_name, "glxEnableExtension") == 0) {
return (__DRIfuncPtr) enable_glx_extension;
}
return NULL;
}
static __DRIscreen *findScreen(__DRInativeDisplay *dpy, int scrn)
{
__GLXDRIscreen *screen =
(__GLXDRIscreen *) __glXgetActiveScreen(scrn);
__GLXDRIscreen *screen = (__GLXDRIscreen *) __glXgetActiveScreen(scrn);
return &screen->driScreen;
}
@ -699,6 +824,30 @@ static const __DRIinterfaceMethods interface_methods = {
static const char dri_driver_path[] = DRI_DRIVER_PATH;
static Bool
glxDRIEnterVT (int index, int flags)
{
__GLXDRIscreen *screen = (__GLXDRIscreen *) __glXgetActiveScreen(index);
LogMessage(X_INFO, "AIGLX: Resuming AIGLX clients after VT switch\n");
glxResumeClients();
return (*screen->enterVT) (index, flags);
}
static void
glxDRILeaveVT (int index, int flags)
{
__GLXDRIscreen *screen = (__GLXDRIscreen *) __glXgetActiveScreen(index);
LogMessage(X_INFO, "AIGLX: Suspending AIGLX clients for VT switch\n");
glxSuspendClients();
return (*screen->leaveVT) (index, flags);
}
static __GLXscreen *
__glXDRIscreenProbe(ScreenPtr pScreen)
{
@ -712,7 +861,7 @@ __glXDRIscreenProbe(ScreenPtr pScreen)
__DRIframebuffer framebuffer;
int fd = -1;
int status;
int api_ver = INTERNAL_VERSION;
int api_ver = COPY_SUB_BUFFER_INTERNAL_VERSION;
drm_magic_t magic;
drmVersionPtr version;
char *driverName;
@ -723,6 +872,8 @@ __glXDRIscreenProbe(ScreenPtr pScreen)
void *dev_priv = NULL;
char filename[128];
Bool isCapable;
size_t buffer_size;
ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum];
if (!xf86LoaderCheckSymbol("DRIQueryDirectRenderingCapable")) {
LogMessage(X_ERROR, "AIGLX: DRI module not loaded\n");
@ -740,10 +891,16 @@ __glXDRIscreenProbe(ScreenPtr pScreen)
return NULL;
memset(screen, 0, sizeof *screen);
screen->base.destroy = __glXDRIscreenDestroy;
screen->base.createContext = __glXDRIscreenCreateContext;
screen->base.destroy = __glXDRIscreenDestroy;
screen->base.createContext = __glXDRIscreenCreateContext;
screen->base.createDrawable = __glXDRIscreenCreateDrawable;
screen->base.swapInterval = __glXDRIdrawableSwapInterval;
screen->base.pScreen = pScreen;
__glXInitExtensionEnableBits(screen->glx_enable_bits);
screen->driScreen.screenConfigs = screen;
/* DRI protocol version. */
dri_version.major = XF86DRI_MAJOR_VERSION;
dri_version.minor = XF86DRI_MINOR_VERSION;
@ -887,11 +1044,28 @@ __glXDRIscreenProbe(ScreenPtr pScreen)
__glXScreenInit(&screen->base, pScreen);
buffer_size = __glXGetExtensionString(screen->glx_enable_bits, NULL);
if (buffer_size > 0) {
if (screen->base.GLXextensions != NULL) {
xfree(screen->base.GLXextensions);
}
screen->base.GLXextensions = xnfalloc(buffer_size);
(void) __glXGetExtensionString(screen->glx_enable_bits,
screen->base.GLXextensions);
}
filter_modes(&screen->base.modes, driver_modes);
_gl_context_modes_destroy(driver_modes);
__glXsetEnterLeaveServerFuncs(__glXDRIenterServer, __glXDRIleaveServer);
screen->enterVT = pScrn->EnterVT;
pScrn->EnterVT = glxDRIEnterVT;
screen->leaveVT = pScrn->LeaveVT;
pScrn->LeaveVT = glxDRILeaveVT;
LogMessage(X_INFO,
"AIGLX: Loaded and initialized %s\n", filename);

View File

@ -1,58 +0,0 @@
/* $XFree86$ */
#ifdef HAVE_DIX_CONFIG_H
#include <dix-config.h>
#endif
#ifndef _GLX_error_h_
#define _GLX_error_h_
/*
** License Applicability. Except to the extent portions of this file are
** made subject to an alternative license as permitted in the SGI Free
** Software License B, Version 1.1 (the "License"), the contents of this
** file are subject only to the provisions of the License. You may not use
** this file except in compliance with the License. You may obtain a copy
** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600
** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at:
**
** http://oss.sgi.com/projects/FreeB
**
** Note that, as provided in the License, the Software is distributed on an
** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS
** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND
** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A
** PARTICULAR PURPOSE, AND NON-INFRINGEMENT.
**
** Original Code. The Original Code is: OpenGL Sample Implementation,
** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics,
** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc.
** Copyright in any portions created by third parties is as indicated
** elsewhere herein. All Rights Reserved.
**
** Additional Notice Provisions: The application programming interfaces
** established by SGI in conjunction with the Original Code are The
** OpenGL(R) Graphics System: A Specification (Version 1.2.1), released
** April 1, 1999; The OpenGL(R) Graphics System Utility Library (Version
** 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X
** Window System(R) (Version 1.3), released October 19, 1998. This software
** was created using the OpenGL(R) version 1.2.1 Sample Implementation
** published by SGI, but has not been independently verified as being
** compliant with the OpenGL(R) version 1.2.1 Specification.
**
*/
/*
** Error codes. These have the extension error base added to them
** when the extension initializes.
*/
extern int __glXBadContext;
extern int __glXBadContextState;
extern int __glXBadDrawable;
extern int __glXBadPixmap;
extern int __glXBadCurrentWindow;
extern int __glXBadContextTag;
extern int __glXBadRenderRequest;
extern int __glXBadLargeRequest;
extern int __glXUnsupportedPrivateRequest;
#endif

View File

@ -1,4 +1,4 @@
/* $XFree86: xc/programs/Xserver/GL/glx/glxext.c,v 1.9 2003/09/28 20:15:43 alanh Exp $
/*
** The contents of this file are subject to the GLX Public License Version 1.0
** (the "License"). You may not use this file except in compliance with the
** License. You may obtain a copy of the License at Silicon Graphics, Inc.,
@ -32,8 +32,34 @@
#include "unpack.h"
#include "glxutil.h"
#include "glxext.h"
#include "indirect_table.h"
#include "indirect_util.h"
static Bool inDispatch;
/*
** The last context used by the server. It is the context that is current
** from the server's perspective.
*/
__GLXcontext *__glXLastContext;
/*
** X resources.
*/
RESTYPE __glXContextRes;
RESTYPE __glXClientRes;
RESTYPE __glXPixmapRes;
RESTYPE __glXDrawableRes;
RESTYPE __glXSwapBarrierRes;
/*
** Reply for most singles.
*/
xGLXSingleReply __glXReply;
/*
** A set of state for each client. The 0th one is unused because client
** indices start at 1, not 0.
*/
static __GLXclientState *__glXClients[MAXCLIENTS + 1];
/*
** Forward declarations.
@ -141,6 +167,10 @@ static int PixmapGone(__GLXpixmap *pGlxPixmap, XID id)
pGlxPixmap->idExists = False;
if (!pGlxPixmap->refcnt) {
if (pGlxPixmap->pDamage) {
DamageUnregister (pGlxPixmap->pDraw, pGlxPixmap->pDamage);
DamageDestroy(pGlxPixmap->pDamage);
}
/*
** The DestroyPixmap routine should decrement the refcount and free
** only if it's zero.
@ -186,6 +216,10 @@ static Bool DrawableGone(__GLXdrawable *glxPriv, XID xid)
return True;
}
static __GLXcontext *glxPendingDestroyContexts;
static int glxServerLeaveCount;
static int glxBlockClients;
/*
** Free a context.
*/
@ -203,13 +237,14 @@ GLboolean __glXFreeContext(__GLXcontext *cx)
* __glXDispatch() or as a callback from the resource manager. In
* the latter case we need to lift the DRI lock manually. */
if (!inDispatch)
__glXleaveServer();
cx->destroy(cx);
if (!inDispatch)
__glXenterServer();
if (!glxBlockClients) {
__glXleaveServer();
cx->destroy(cx);
__glXenterServer();
} else {
cx->next = glxPendingDestroyContexts;
glxPendingDestroyContexts = cx;
}
return GL_TRUE;
}
@ -261,6 +296,13 @@ GLboolean __glXErrorOccured(void)
return errorOccured;
}
static int __glXErrorBase;
int __glXError(int error)
{
return __glXErrorBase + error;
}
/************************************************************************/
/*
@ -270,11 +312,12 @@ void GlxExtensionInit(void)
{
ExtensionEntry *extEntry;
int i;
__glXContextRes = CreateNewResourceType((DeleteType)ContextGone);
__glXClientRes = CreateNewResourceType((DeleteType)ClientGone);
__glXPixmapRes = CreateNewResourceType((DeleteType)PixmapGone);
__glXDrawableRes = CreateNewResourceType((DeleteType)DrawableGone);
__glXSwapBarrierRes = CreateNewResourceType((DeleteType)SwapBarrierGone);
/*
** Add extension to server extensions.
@ -292,23 +335,12 @@ void GlxExtensionInit(void)
return;
}
__glXBadContext = extEntry->errorBase + GLXBadContext;
__glXBadContextState = extEntry->errorBase + GLXBadContextState;
__glXBadDrawable = extEntry->errorBase + GLXBadDrawable;
__glXBadPixmap = extEntry->errorBase + GLXBadPixmap;
__glXBadContextTag = extEntry->errorBase + GLXBadContextTag;
__glXBadCurrentWindow = extEntry->errorBase + GLXBadCurrentWindow;
__glXBadRenderRequest = extEntry->errorBase + GLXBadRenderRequest;
__glXBadLargeRequest = extEntry->errorBase + GLXBadLargeRequest;
__glXUnsupportedPrivateRequest = extEntry->errorBase +
GLXUnsupportedPrivateRequest;
__glXSwapBarrierRes = CreateNewResourceType((DeleteType)SwapBarrierGone);
__glXErrorBase = extEntry->errorBase;
/*
** Initialize table of client state. There is never a client 0.
*/
for (i=1; i <= MAXCLIENTS; i++) {
for (i = 1; i <= MAXCLIENTS; i++) {
__glXClients[i] = 0;
}
@ -343,7 +375,7 @@ __GLXcontext *__glXForceCurrent(__GLXclientState *cl, GLXContextTag tag,
cx = (__GLXcontext *) __glXLookupContextByTag(cl, tag);
if (!cx) {
cl->client->errorValue = tag;
*error = __glXBadContextTag;
*error = __glXError(GLXBadContextTag);
return 0;
}
@ -354,7 +386,7 @@ __GLXcontext *__glXForceCurrent(__GLXclientState *cl, GLXContextTag tag,
** windows can be destroyed from under us; GLX pixmaps are
** refcounted and don't go away until no one is using them.
*/
*error = __glXBadCurrentWindow;
*error = __glXError(GLXBadCurrentWindow);
return 0;
}
}
@ -369,7 +401,7 @@ __GLXcontext *__glXForceCurrent(__GLXclientState *cl, GLXContextTag tag,
if (!(*cx->forceCurrent)(cx)) {
/* Bind failed, and set the error code. Bummer */
cl->client->errorValue = cx->id;
*error = __glXBadContextState;
*error = __glXError(GLXBadContextState);
return 0;
}
}
@ -379,11 +411,43 @@ __GLXcontext *__glXForceCurrent(__GLXclientState *cl, GLXContextTag tag,
/************************************************************************/
/*
** Top level dispatcher; all commands are executed from here down.
*/
void glxSuspendClients(void)
{
int i;
/* I cried when I wrote this. Damn you XAA! */
for (i = 1; i <= MAXCLIENTS; i++) {
if (__glXClients[i] == NULL || !__glXClients[i]->inUse)
continue;
IgnoreClient(__glXClients[i]->client);
}
glxBlockClients = TRUE;
}
void glxResumeClients(void)
{
__GLXcontext *cx, *next;
int i;
glxBlockClients = FALSE;
for (i = 1; i <= MAXCLIENTS; i++) {
if (__glXClients[i] == NULL || !__glXClients[i]->inUse)
continue;
AttendClient(__glXClients[i]->client);
}
__glXleaveServer();
for (cx = glxPendingDestroyContexts; cx != NULL; cx = next) {
next = cx->next;
cx->destroy(cx);
}
glxPendingDestroyContexts = NULL;
__glXenterServer();
}
static void
__glXnopEnterServer(void)
@ -408,14 +472,19 @@ void __glXsetEnterLeaveServerFuncs(void (*enter)(void),
void __glXenterServer(void)
{
(*__glXenterServerFunc)();
glxServerLeaveCount--;
if (glxServerLeaveCount == 0)
(*__glXenterServerFunc)();
}
void __glXleaveServer(void)
{
(*__glXleaveServerFunc)();
}
if (glxServerLeaveCount == 0)
(*__glXleaveServerFunc)();
glxServerLeaveCount++;
}
/*
** Top level dispatcher; all commands are executed from here down.
@ -424,7 +493,7 @@ static int __glXDispatch(ClientPtr client)
{
REQUEST(xGLXSingleReq);
CARD8 opcode;
int (*proc)(__GLXclientState *cl, GLbyte *pc);
__GLXdispatchSingleProcPtr proc;
__GLXclientState *cl;
int retval;
@ -453,49 +522,39 @@ static int __glXDispatch(ClientPtr client)
cl->client = client;
}
/*
** Check for valid opcode.
*/
if (opcode >= __GLX_SINGLE_TABLE_SIZE) {
return BadRequest;
}
/*
** If we're expecting a glXRenderLarge request, this better be one.
*/
if ((cl->largeCmdRequestsSoFar != 0) && (opcode != X_GLXRenderLarge)) {
client->errorValue = stuff->glxCode;
return __glXBadLargeRequest;
return __glXError(GLXBadLargeRequest);
}
/* If we're currently blocking GLX clients, just put this guy to
* sleep, reset the request and return. */
if (glxBlockClients) {
ResetCurrentRequest(client);
client->sequence--;
IgnoreClient(client);
return(client->noClientException);
}
/*
** Use the opcode to index into the procedure table.
*/
if (client->swapped)
proc = __glXSwapSingleTable[opcode];
else
proc = __glXSingleTable[opcode];
proc = (__GLXdispatchSingleProcPtr) __glXGetProtocolDecodeFunction(& Single_dispatch_info,
opcode,
client->swapped);
if (proc != NULL) {
__glXleaveServer();
__glXleaveServer();
retval = (*proc)(cl, (GLbyte *) stuff);
inDispatch = True;
retval = proc(cl, (GLbyte *) stuff);
inDispatch = False;
__glXenterServer();
__glXenterServer();
}
else {
retval = BadRequest;
}
return retval;
}
int __glXNoSuchSingleOpcode(__GLXclientState *cl, GLbyte *pc)
{
return BadRequest;
}
void __glXNoSuchRenderOpcode(GLbyte *pc)
{
return;
}

View File

@ -1,4 +1,3 @@
/* $XFree86: xc/programs/Xserver/GL/glx/glxext.h,v 1.7 2003/11/17 22:20:26 dawes Exp $ */
#ifdef HAVE_DIX_CONFIG_H
#include <dix-config.h>
#endif
@ -67,16 +66,11 @@ typedef struct {
extern GLboolean __glXFreeContext(__GLXcontext *glxc);
extern void __glXFlushContextCache(void);
extern void __glXNoSuchRenderOpcode(GLbyte*);
extern int __glXNoSuchSingleOpcode(__GLXclientState*, GLbyte*);
extern void __glXErrorCallBack(__GLinterface *gc, GLenum code);
extern void __glXClearErrorOccured(void);
extern GLboolean __glXErrorOccured(void);
extern void __glXResetLargeCommandStatus(__GLXclientState*);
extern int __glXQueryContextInfoEXT(__GLXclientState *cl, GLbyte *pc);
extern int __glXSwapQueryContextInfoEXT(__GLXclientState *cl, GLbyte *pc);
extern int DoMakeCurrent( __GLXclientState *cl, GLXDrawable drawId,
GLXDrawable readId, GLXContextID contextId, GLXContextTag tag );
extern int DoGetVisualConfigs(__GLXclientState *cl, unsigned screen,
@ -85,13 +79,17 @@ extern int DoGetFBConfigs(__GLXclientState *cl, unsigned screen,
GLboolean do_swap);
extern int DoCreateContext(__GLXclientState *cl, GLXContextID gcId,
GLXContextID shareList, VisualID visual, GLuint screen, GLboolean isDirect);
extern int DoCreateGLXPixmap(__GLXclientState *cl, VisualID visual,
extern int DoCreateGLXPixmap(__GLXclientState *cl, XID fbconfigId,
GLuint screenNum, XID pixmapId, XID glxpixmapId);
extern int DoDestroyPixmap(__GLXclientState *cl, XID glxpixmapId);
extern int DoQueryContext(__GLXclientState *cl, GLXContextID gcId);
extern int DoRender(__GLXclientState *cl, GLbyte *pc, int do_swap);
extern int DoRenderLarge(__GLXclientState *cl, GLbyte *pc, int do_swap);
extern void GlxExtensionInit(void);
extern Bool __glXCoreType(void);
extern const char GLServerVersion[];
extern int DoGetString(__GLXclientState *cl, GLbyte *pc, GLboolean need_swap);

View File

@ -1,4 +1,3 @@
/* $XFree86: xc/programs/Xserver/GL/glx/glxscreens.c,v 1.14 2004/02/09 23:46:31 alanh Exp $ */
/*
** License Applicability. Except to the extent portions of this file are
** made subject to an alternative license as permitted in the SGI Free
@ -46,28 +45,36 @@
#include "glxutil.h"
#include "glxext.h"
const char GLServerVersion[] = "1.2";
const char GLServerVersion[] = "1.4";
static const char GLServerExtensions[] =
"GL_ARB_depth_texture "
"GL_ARB_draw_buffers "
"GL_ARB_fragment_program "
"GL_ARB_fragment_program_shadow "
"GL_ARB_imaging "
"GL_ARB_multisample "
"GL_ARB_multitexture "
"GL_ARB_occlusion_query "
"GL_ARB_point_parameters "
"GL_ARB_point_sprite "
"GL_ARB_shadow "
"GL_ARB_shadow_ambient "
"GL_ARB_texture_border_clamp "
"GL_ARB_texture_compression "
"GL_ARB_texture_cube_map "
"GL_ARB_texture_env_add "
"GL_ARB_texture_env_combine "
"GL_ARB_texture_env_crossbar "
"GL_ARB_texture_env_dot3 "
"GL_ARB_texture_mirrored_repeat "
"GL_ARB_transpose_matrix "
"GL_ARB_window_pos "
"GL_ARB_texture_non_power_of_two "
"GL_ARB_transpose_matrix "
"GL_ARB_vertex_program "
"GL_ARB_window_pos "
"GL_EXT_abgr "
"GL_EXT_bgra "
"GL_EXT_blend_color "
"GL_EXT_blend_equation_separate "
"GL_EXT_blend_func_separate "
"GL_EXT_blend_logic_op "
"GL_EXT_blend_minmax "
@ -76,47 +83,77 @@ static const char GLServerExtensions[] =
"GL_EXT_copy_texture "
"GL_EXT_draw_range_elements "
"GL_EXT_fog_coord "
"GL_EXT_framebuffer_object "
"GL_EXT_multi_draw_arrays "
"GL_EXT_packed_pixels "
"GL_EXT_paletted_texture "
"GL_EXT_point_parameters "
"GL_EXT_polygon_offset "
"GL_EXT_rescale_normal "
"GL_EXT_secondary_color "
"GL_EXT_separate_specular_color "
"GL_EXT_shadow_funcs "
"GL_EXT_shared_texture_palette "
"GL_EXT_stencil_two_side "
"GL_EXT_stencil_wrap "
"GL_EXT_subtexture "
"GL_EXT_texture "
"GL_EXT_texture3D "
"GL_EXT_texture_compression_dxt1 "
"GL_EXT_texture_compression_s3tc "
"GL_EXT_texture_edge_clamp "
"GL_EXT_texture_env_add "
"GL_EXT_texture_env_combine "
"GL_EXT_texture_env_dot3 "
"GL_EXT_texture_filter_ansiotropic "
"GL_EXT_texture_lod "
"GL_EXT_texture_lod_bias "
"GL_EXT_texture_mirror_clamp "
"GL_EXT_texture_object "
"GL_EXT_texture_rectangle "
"GL_EXT_vertex_array "
"GL_EXT_framebuffer_object "
"GL_3DFX_texture_compression_FXT1 "
"GL_APPLE_packed_pixels "
"GL_ATI_texture_mirror_once "
"GL_ATI_draw_buffers "
"GL_ATI_texture_env_combine3 "
"GL_ATI_texture_mirror_once "
"GL_HP_occlusion_test "
"GL_IBM_texture_mirrored_repeat "
"GL_INGR_blend_func_separate "
"GL_MESA_pack_invert "
"GL_MESA_ycbcr_texture "
"GL_NV_blend_square "
"GL_NV_depth_clamp "
"GL_NV_fog_distance "
"GL_NV_fragment_program "
"GL_NV_fragment_program_option "
"GL_NV_fragment_program2 "
"GL_NV_light_max_exponent "
"GL_NV_multisample_filter_hint "
"GL_NV_point_sprite "
"GL_NV_texgen_reflection "
"GL_NV_texture_rectangle "
"GL_NV_texture_compression_vtc "
"GL_NV_texture_env_combine4 "
"GL_NV_texture_expand_normal "
"GL_NV_texture_rectangle "
"GL_NV_vertex_program "
"GL_NV_vertex_program1_1 "
"GL_NV_vertex_program2 "
"GL_NV_vertex_program2_option "
"GL_NV_vertex_program3 "
"GL_OES_compressed_paletted_texture "
"GL_SGI_color_matrix "
"GL_SGI_color_table "
"GL_SGIS_generate_mipmap "
"GL_SGIS_multisample "
"GL_SGIS_point_parameters "
"GL_SGIS_texture_border_clamp "
"GL_SGIS_texture_edge_clamp "
"GL_SGIS_texture_lod "
"GL_SGIX_depth_texture "
"GL_SGIX_shadow "
"GL_SGIX_shadow_ambient "
"GL_SUN_slice_accum "
;
/*
@ -139,6 +176,7 @@ static char GLXServerExtensions[] =
"GLX_SGIX_swap_barrier "
#endif
"GLX_SGIX_fbconfig "
"GLX_MESA_copy_sub_buffer "
;
__GLXscreen **__glXActiveScreens;

View File

@ -5,7 +5,6 @@
#ifndef _GLX_screens_h_
#define _GLX_screens_h_
/* $XFree86: xc/programs/Xserver/GL/glx/glxscreens.h,v 1.4 2001/03/21 16:29:37 dawes Exp $ */
/*
** License Applicability. Except to the extent portions of this file are
** made subject to an alternative license as permitted in the SGI Free
@ -53,11 +52,18 @@
*/
typedef struct __GLXscreen __GLXscreen;
struct __GLXscreen {
void (*destroy)(__GLXscreen *screen);
void (*destroy) (__GLXscreen *screen);
__GLXcontext *(*createContext)(__GLXscreen *screen,
__GLcontextModes *modes,
__GLXcontext *shareContext);
__GLXcontext *(*createContext) (__GLXscreen *screen,
__GLcontextModes *modes,
__GLXcontext *shareContext);
__GLXdrawable *(*createDrawable)(__GLXscreen *context,
DrawablePtr pDraw,
XID drawId,
__GLcontextModes *modes);
int (*swapInterval) (__GLXdrawable *drawable,
int interval);
ScreenPtr pScreen;

View File

@ -1,4 +1,3 @@
/* $XFree86: xc/programs/Xserver/GL/glx/glxserver.h,v 1.5 2003/09/28 20:15:43 alanh Exp $ */
#ifdef HAVE_DIX_CONFIG_H
#include <dix-config.h>
#endif
@ -70,7 +69,6 @@ typedef struct __GLXcontext __GLXcontext;
#include "glxscreens.h"
#include "glxdrawable.h"
#include "glxcontext.h"
#include "glxerror.h"
#define GLX_SERVER_MAJOR_VERSION 1
@ -112,6 +110,8 @@ void __glXScreenInitVisuals(__GLXscreen *screen);
extern __GLXcontext *__glXLastContext;
extern __GLXcontext *__glXForceCurrent(__GLXclientState*, GLXContextTag, int*);
int __glXError(int error);
/*
** Macros to set, unset, and retrieve the flag that says whether a context
** has unflushed commands.
@ -136,6 +136,9 @@ void __glXsetEnterLeaveServerFuncs(void (*enter)(void),
void __glXenterServer(void);
void __glXleaveServer(void);
void glxSuspendClients(void);
void glxResumeClients(void);
/*
** State kept per client.
*/
@ -176,8 +179,6 @@ struct __GLXclientStateRec {
char *GLClientextensions;
};
extern __GLXclientState *__glXClients[];
/************************************************************************/
/*
@ -191,17 +192,16 @@ typedef int (*__GLXdispatchVendorPrivProcPtr)(__GLXclientState *, GLbyte *);
* Dispatch for GLX commands.
*/
typedef int (*__GLXprocPtr)(__GLXclientState *, char *pc);
extern __GLXprocPtr __glXProcTable[];
/*
* Tables for computing the size of each rendering command.
*/
typedef int (*gl_proto_size_func)(const GLbyte *, Bool);
typedef struct {
int bytes;
int (*varsize)(const GLbyte *pc, Bool swap);
gl_proto_size_func varsize;
} __GLXrenderSizeData;
extern __GLXrenderSizeData __glXRenderSizeTable[];
extern __GLXrenderSizeData __glXRenderSizeTable_EXT[];
/************************************************************************/
@ -252,6 +252,4 @@ extern int __glXImageSize(GLenum format, GLenum type,
GLint imageHeight, GLint rowLength, GLint skipImages, GLint skipRows,
GLint alignment);
extern int __glXDrawArraysSize(const GLbyte *pc, Bool swap);
#endif /* !__GLX_server_h__ */

View File

@ -1,4 +1,3 @@
/* $XFree86: xc/programs/Xserver/GL/glx/glxutil.c,v 1.5 2001/03/21 16:29:37 dawes Exp $ */
/*
** License Applicability. Except to the extent portions of this file are
** made subject to an alternative license as permitted in the SGI Free
@ -140,12 +139,14 @@ __glXUnrefDrawable(__GLXdrawable *glxPriv)
GLboolean
__glXDrawableInit(__GLXdrawable *drawable,
__GLXcontext *ctx, DrawablePtr pDraw, XID drawId)
__GLXscreen *screen, DrawablePtr pDraw, XID drawId,
__GLcontextModes *modes)
{
drawable->type = pDraw->type;
drawable->pDraw = pDraw;
drawable->drawId = drawId;
drawable->refCount = 1;
drawable->modes = modes;
/* if not a pixmap, lookup will fail, so pGlxPixmap will be NULL */
drawable->pGlxPixmap = (__GLXpixmap *)
@ -153,35 +154,3 @@ __glXDrawableInit(__GLXdrawable *drawable,
return GL_TRUE;
}
__GLXdrawable *
__glXFindDrawable(XID drawId)
{
__GLXdrawable *glxPriv;
glxPriv = (__GLXdrawable *)LookupIDByType(drawId, __glXDrawableRes);
return glxPriv;
}
__GLXdrawable *
__glXGetDrawable(__GLXcontext *ctx, DrawablePtr pDraw, XID drawId)
{
__GLXdrawable *glxPriv;
glxPriv = __glXFindDrawable(drawId);
if (glxPriv == NULL)
{
glxPriv = ctx->createDrawable(ctx, pDraw, drawId);
/* since we are creating the drawablePrivate, drawId should be new */
if (!AddResource(drawId, __glXDrawableRes, glxPriv))
{
glxPriv->destroy (glxPriv);
return NULL;
}
}
return glxPriv;
}

View File

@ -1,4 +1,3 @@
/* $XFree86: xc/programs/Xserver/GL/glx/glxutil.h,v 1.3 2001/03/21 16:29:37 dawes Exp $ */
#ifdef HAVE_DIX_CONFIG_H
#include <dix-config.h>
#endif
@ -41,34 +40,18 @@
**
*/
extern void __glXNop(void);
/* relate contexts with drawables */
extern void __glXAssociateContext(__GLXcontext *glxc);
extern void __glXDeassociateContext(__GLXcontext *glxc);
/* drawable operation */
extern void __glXGetDrawableSize(__GLdrawablePrivate *glPriv,
GLint *x, GLint *y,
GLuint *width, GLuint *height);
extern GLboolean __glXResizeDrawable(__GLdrawablePrivate *glPriv);
extern GLboolean __glXResizeDrawableBuffers(__GLXdrawable *glxPriv);
/* drawable management */
extern void __glXRefDrawable(__GLXdrawable *glxPriv);
extern void __glXUnrefDrawable(__GLXdrawable *glxPriv);
extern __GLXdrawable *__glXCreateDrawable(__GLXcontext *ctx,
DrawablePtr pDraw,
XID glxpixmapId);
extern GLboolean __glXDrawableInit(__GLXdrawable *drawable, __GLXcontext *ctx,
DrawablePtr pDraw, XID drawID);
extern GLboolean __glXDestroyDrawable(__GLXdrawable *glxPriv);
extern __GLXdrawable *__glXFindDrawable(XID glxpixmapId);
extern __GLXdrawable *__glXGetDrawable(__GLXcontext *ctx,
DrawablePtr pDraw,
XID glxpixmapId);
extern void __glXCacheDrawableSize(__GLXdrawable *glxPriv);
extern GLboolean __glXDrawableInit(__GLXdrawable *drawable,
__GLXscreen *screen,
DrawablePtr pDraw, XID drawID,
__GLcontextModes *modes);
/* context helper routines */
extern __GLXcontext *__glXLookupContextByTag(__GLXclientState*, GLXContextTag);
@ -78,4 +61,3 @@ extern void *__glXglDDXScreenInfo(void);
extern void *__glXglDDXExtensionInfo(void);
#endif /* _glxcmds_h_ */

File diff suppressed because it is too large Load Diff

View File

@ -67,8 +67,12 @@ extern HIDDEN void __glXDisp_Histogram(GLbyte * pc);
extern HIDDEN void __glXDispSwap_Histogram(GLbyte * pc);
extern HIDDEN int __glXDisp_GetMapfv(struct __GLXclientStateRec *, GLbyte *);
extern HIDDEN int __glXDispSwap_GetMapfv(struct __GLXclientStateRec *, GLbyte *);
extern HIDDEN void __glXDisp_RasterPos4dv(GLbyte * pc);
extern HIDDEN void __glXDispSwap_RasterPos4dv(GLbyte * pc);
extern HIDDEN void __glXDisp_PolygonStipple(GLbyte * pc);
extern HIDDEN void __glXDispSwap_PolygonStipple(GLbyte * pc);
extern HIDDEN void __glXDisp_BlendEquationSeparateEXT(GLbyte * pc);
extern HIDDEN void __glXDispSwap_BlendEquationSeparateEXT(GLbyte * pc);
extern HIDDEN int __glXDisp_GetPixelMapfv(struct __GLXclientStateRec *, GLbyte *);
extern HIDDEN int __glXDispSwap_GetPixelMapfv(struct __GLXclientStateRec *, GLbyte *);
extern HIDDEN void __glXDisp_Color3uiv(GLbyte * pc);
@ -79,16 +83,24 @@ extern HIDDEN void __glXDisp_VertexAttrib4svNV(GLbyte * pc);
extern HIDDEN void __glXDispSwap_VertexAttrib4svNV(GLbyte * pc);
extern HIDDEN void __glXDisp_EvalCoord2fv(GLbyte * pc);
extern HIDDEN void __glXDispSwap_EvalCoord2fv(GLbyte * pc);
extern HIDDEN void __glXDisp_ProgramEnvParameter4dvARB(GLbyte * pc);
extern HIDDEN void __glXDispSwap_ProgramEnvParameter4dvARB(GLbyte * pc);
extern HIDDEN int __glXDisp_DestroyPixmap(struct __GLXclientStateRec *, GLbyte *);
extern HIDDEN int __glXDispSwap_DestroyPixmap(struct __GLXclientStateRec *, GLbyte *);
extern HIDDEN int __glXDisp_GetMapiv(struct __GLXclientStateRec *, GLbyte *);
extern HIDDEN int __glXDispSwap_GetMapiv(struct __GLXclientStateRec *, GLbyte *);
extern HIDDEN int __glXDisp_SwapBuffers(struct __GLXclientStateRec *, GLbyte *);
extern HIDDEN int __glXDispSwap_SwapBuffers(struct __GLXclientStateRec *, GLbyte *);
extern HIDDEN void __glXDisp_Indexubv(GLbyte * pc);
extern HIDDEN void __glXDispSwap_Indexubv(GLbyte * pc);
extern HIDDEN int __glXDisp_Render(struct __GLXclientStateRec *, GLbyte *);
extern HIDDEN int __glXDispSwap_Render(struct __GLXclientStateRec *, GLbyte *);
extern HIDDEN int __glXDisp_GetQueryivARB(struct __GLXclientStateRec *, GLbyte *);
extern HIDDEN int __glXDispSwap_GetQueryivARB(struct __GLXclientStateRec *, GLbyte *);
extern HIDDEN void __glXDisp_TexImage3D(GLbyte * pc);
extern HIDDEN void __glXDispSwap_TexImage3D(GLbyte * pc);
extern HIDDEN int __glXDisp_MakeContextCurrent(struct __GLXclientStateRec *, GLbyte *);
extern HIDDEN int __glXDispSwap_MakeContextCurrent(struct __GLXclientStateRec *, GLbyte *);
extern HIDDEN int __glXDisp_GetFBConfigs(struct __GLXclientStateRec *, GLbyte *);
extern HIDDEN int __glXDispSwap_GetFBConfigs(struct __GLXclientStateRec *, GLbyte *);
extern HIDDEN void __glXDisp_Color3ubv(GLbyte * pc);
extern HIDDEN void __glXDispSwap_Color3ubv(GLbyte * pc);
extern HIDDEN int __glXDisp_GetQueryObjectivARB(struct __GLXclientStateRec *, GLbyte *);
@ -105,16 +117,20 @@ extern HIDDEN void __glXDisp_VertexAttribs1dvNV(GLbyte * pc);
extern HIDDEN void __glXDispSwap_VertexAttribs1dvNV(GLbyte * pc);
extern HIDDEN void __glXDisp_Normal3bv(GLbyte * pc);
extern HIDDEN void __glXDispSwap_Normal3bv(GLbyte * pc);
extern HIDDEN void __glXDisp_TexGeniv(GLbyte * pc);
extern HIDDEN void __glXDispSwap_TexGeniv(GLbyte * pc);
extern HIDDEN int __glXDisp_VendorPrivate(struct __GLXclientStateRec *, GLbyte *);
extern HIDDEN int __glXDispSwap_VendorPrivate(struct __GLXclientStateRec *, GLbyte *);
extern HIDDEN int __glXDisp_CreateGLXPixmapWithConfigSGIX(struct __GLXclientStateRec *, GLbyte *);
extern HIDDEN int __glXDispSwap_CreateGLXPixmapWithConfigSGIX(struct __GLXclientStateRec *, GLbyte *);
extern HIDDEN void __glXDisp_VertexAttrib1fvNV(GLbyte * pc);
extern HIDDEN void __glXDispSwap_VertexAttrib1fvNV(GLbyte * pc);
extern HIDDEN void __glXDisp_Vertex3iv(GLbyte * pc);
extern HIDDEN void __glXDispSwap_Vertex3iv(GLbyte * pc);
extern HIDDEN void __glXDisp_CopyConvolutionFilter1D(GLbyte * pc);
extern HIDDEN void __glXDispSwap_CopyConvolutionFilter1D(GLbyte * pc);
extern HIDDEN void __glXDisp_BlendColor(GLbyte * pc);
extern HIDDEN void __glXDispSwap_BlendColor(GLbyte * pc);
extern HIDDEN void __glXDisp_CallLists(GLbyte * pc);
extern HIDDEN void __glXDispSwap_CallLists(GLbyte * pc);
extern HIDDEN void __glXDisp_Scalef(GLbyte * pc);
extern HIDDEN void __glXDispSwap_Scalef(GLbyte * pc);
extern HIDDEN void __glXDisp_Normal3iv(GLbyte * pc);
extern HIDDEN void __glXDispSwap_Normal3iv(GLbyte * pc);
extern HIDDEN void __glXDisp_PassThrough(GLbyte * pc);
@ -123,8 +139,10 @@ extern HIDDEN void __glXDisp_Viewport(GLbyte * pc);
extern HIDDEN void __glXDispSwap_Viewport(GLbyte * pc);
extern HIDDEN void __glXDisp_VertexAttrib4NusvARB(GLbyte * pc);
extern HIDDEN void __glXDispSwap_VertexAttrib4NusvARB(GLbyte * pc);
extern HIDDEN void __glXDisp_PrioritizeTextures(GLbyte * pc);
extern HIDDEN void __glXDispSwap_PrioritizeTextures(GLbyte * pc);
extern HIDDEN void __glXDisp_CopyTexSubImage2D(GLbyte * pc);
extern HIDDEN void __glXDispSwap_CopyTexSubImage2D(GLbyte * pc);
extern HIDDEN void __glXDisp_DepthRange(GLbyte * pc);
extern HIDDEN void __glXDispSwap_DepthRange(GLbyte * pc);
extern HIDDEN void __glXDisp_ResetHistogram(GLbyte * pc);
extern HIDDEN void __glXDispSwap_ResetHistogram(GLbyte * pc);
extern HIDDEN int __glXDisp_GetProgramNamedParameterfvNV(struct __GLXclientStateRec *, GLbyte *);
@ -143,12 +161,18 @@ extern HIDDEN void __glXDisp_Color3sv(GLbyte * pc);
extern HIDDEN void __glXDispSwap_Color3sv(GLbyte * pc);
extern HIDDEN int __glXDisp_GetConvolutionParameteriv(struct __GLXclientStateRec *, GLbyte *);
extern HIDDEN int __glXDispSwap_GetConvolutionParameteriv(struct __GLXclientStateRec *, GLbyte *);
extern HIDDEN int __glXDisp_GetConvolutionParameterivEXT(struct __GLXclientStateRec *, GLbyte *);
extern HIDDEN int __glXDispSwap_GetConvolutionParameterivEXT(struct __GLXclientStateRec *, GLbyte *);
extern HIDDEN void __glXDisp_Vertex2dv(GLbyte * pc);
extern HIDDEN void __glXDispSwap_Vertex2dv(GLbyte * pc);
extern HIDDEN int __glXDisp_GetVisualConfigs(struct __GLXclientStateRec *, GLbyte *);
extern HIDDEN int __glXDispSwap_GetVisualConfigs(struct __GLXclientStateRec *, GLbyte *);
extern HIDDEN void __glXDisp_MultiTexCoord1fvARB(GLbyte * pc);
extern HIDDEN void __glXDispSwap_MultiTexCoord1fvARB(GLbyte * pc);
extern HIDDEN void __glXDisp_TexCoord3iv(GLbyte * pc);
extern HIDDEN void __glXDispSwap_TexCoord3iv(GLbyte * pc);
extern HIDDEN int __glXDisp_CopyContext(struct __GLXclientStateRec *, GLbyte *);
extern HIDDEN int __glXDispSwap_CopyContext(struct __GLXclientStateRec *, GLbyte *);
extern HIDDEN void __glXDisp_Color3fv(GLbyte * pc);
extern HIDDEN void __glXDispSwap_Color3fv(GLbyte * pc);
extern HIDDEN void __glXDisp_PointSize(GLbyte * pc);
@ -161,36 +185,40 @@ extern HIDDEN void __glXDisp_Vertex4sv(GLbyte * pc);
extern HIDDEN void __glXDispSwap_Vertex4sv(GLbyte * pc);
extern HIDDEN int __glXDisp_GetTexEnvfv(struct __GLXclientStateRec *, GLbyte *);
extern HIDDEN int __glXDispSwap_GetTexEnvfv(struct __GLXclientStateRec *, GLbyte *);
extern HIDDEN void __glXDisp_LineStipple(GLbyte * pc);
extern HIDDEN void __glXDispSwap_LineStipple(GLbyte * pc);
extern HIDDEN void __glXDisp_TexEnvi(GLbyte * pc);
extern HIDDEN void __glXDispSwap_TexEnvi(GLbyte * pc);
extern HIDDEN int __glXDisp_GetClipPlane(struct __GLXclientStateRec *, GLbyte *);
extern HIDDEN int __glXDispSwap_GetClipPlane(struct __GLXclientStateRec *, GLbyte *);
extern HIDDEN void __glXDisp_VertexAttribs3dvNV(GLbyte * pc);
extern HIDDEN void __glXDispSwap_VertexAttribs3dvNV(GLbyte * pc);
extern HIDDEN void __glXDisp_LightModeli(GLbyte * pc);
extern HIDDEN void __glXDispSwap_LightModeli(GLbyte * pc);
extern HIDDEN void __glXDisp_VertexAttribs4fvNV(GLbyte * pc);
extern HIDDEN void __glXDispSwap_VertexAttribs4fvNV(GLbyte * pc);
extern HIDDEN void __glXDisp_Scaled(GLbyte * pc);
extern HIDDEN void __glXDispSwap_Scaled(GLbyte * pc);
extern HIDDEN void __glXDisp_Scalef(GLbyte * pc);
extern HIDDEN void __glXDispSwap_Scalef(GLbyte * pc);
extern HIDDEN void __glXDisp_CallLists(GLbyte * pc);
extern HIDDEN void __glXDispSwap_CallLists(GLbyte * pc);
extern HIDDEN void __glXDisp_AlphaFunc(GLbyte * pc);
extern HIDDEN void __glXDispSwap_AlphaFunc(GLbyte * pc);
extern HIDDEN void __glXDisp_TexCoord2iv(GLbyte * pc);
extern HIDDEN void __glXDispSwap_TexCoord2iv(GLbyte * pc);
extern HIDDEN void __glXDisp_CompressedTexImage1DARB(GLbyte * pc);
extern HIDDEN void __glXDispSwap_CompressedTexImage1DARB(GLbyte * pc);
extern HIDDEN void __glXDisp_Rotated(GLbyte * pc);
extern HIDDEN void __glXDispSwap_Rotated(GLbyte * pc);
extern HIDDEN int __glXDisp_ReadPixels(struct __GLXclientStateRec *, GLbyte *);
extern HIDDEN int __glXDispSwap_ReadPixels(struct __GLXclientStateRec *, GLbyte *);
extern HIDDEN void __glXDisp_EdgeFlagv(GLbyte * pc);
extern HIDDEN void __glXDispSwap_EdgeFlagv(GLbyte * pc);
extern HIDDEN void __glXDisp_Color4iv(GLbyte * pc);
extern HIDDEN void __glXDispSwap_Color4iv(GLbyte * pc);
extern HIDDEN void __glXDisp_Rotatef(GLbyte * pc);
extern HIDDEN void __glXDispSwap_Rotatef(GLbyte * pc);
extern HIDDEN void __glXDisp_TexParameterf(GLbyte * pc);
extern HIDDEN void __glXDispSwap_TexParameterf(GLbyte * pc);
extern HIDDEN void __glXDisp_TexParameteri(GLbyte * pc);
extern HIDDEN void __glXDispSwap_TexParameteri(GLbyte * pc);
extern HIDDEN int __glXDisp_DestroyContext(struct __GLXclientStateRec *, GLbyte *);
extern HIDDEN int __glXDispSwap_DestroyContext(struct __GLXclientStateRec *, GLbyte *);
extern HIDDEN void __glXDisp_DrawPixels(GLbyte * pc);
extern HIDDEN void __glXDispSwap_DrawPixels(GLbyte * pc);
extern HIDDEN void __glXDisp_MultiTexCoord2svARB(GLbyte * pc);
@ -215,22 +243,18 @@ extern HIDDEN void __glXDisp_Color4usv(GLbyte * pc);
extern HIDDEN void __glXDispSwap_Color4usv(GLbyte * pc);
extern HIDDEN void __glXDisp_Fogi(GLbyte * pc);
extern HIDDEN void __glXDispSwap_Fogi(GLbyte * pc);
extern HIDDEN void __glXDisp_DepthRange(GLbyte * pc);
extern HIDDEN void __glXDispSwap_DepthRange(GLbyte * pc);
extern HIDDEN void __glXDisp_RasterPos3iv(GLbyte * pc);
extern HIDDEN void __glXDispSwap_RasterPos3iv(GLbyte * pc);
extern HIDDEN void __glXDisp_PixelMapfv(GLbyte * pc);
extern HIDDEN void __glXDispSwap_PixelMapfv(GLbyte * pc);
extern HIDDEN void __glXDisp_Color3usv(GLbyte * pc);
extern HIDDEN void __glXDispSwap_Color3usv(GLbyte * pc);
extern HIDDEN void __glXDisp_DrawBuffersARB(GLbyte * pc);
extern HIDDEN void __glXDispSwap_DrawBuffersARB(GLbyte * pc);
extern HIDDEN int __glXDisp_AreTexturesResident(struct __GLXclientStateRec *, GLbyte *);
extern HIDDEN int __glXDispSwap_AreTexturesResident(struct __GLXclientStateRec *, GLbyte *);
extern HIDDEN int __glXDisp_AreTexturesResidentEXT(struct __GLXclientStateRec *, GLbyte *);
extern HIDDEN int __glXDispSwap_AreTexturesResidentEXT(struct __GLXclientStateRec *, GLbyte *);
extern HIDDEN int __glXDisp_IsRenderbufferEXT(struct __GLXclientStateRec *, GLbyte *);
extern HIDDEN int __glXDispSwap_IsRenderbufferEXT(struct __GLXclientStateRec *, GLbyte *);
extern HIDDEN void __glXDisp_ColorTableParameteriv(GLbyte * pc);
extern HIDDEN void __glXDispSwap_ColorTableParameteriv(GLbyte * pc);
extern HIDDEN void __glXDisp_PointParameterfvEXT(GLbyte * pc);
extern HIDDEN void __glXDispSwap_PointParameterfvEXT(GLbyte * pc);
extern HIDDEN void __glXDisp_Color3bv(GLbyte * pc);
@ -255,6 +279,8 @@ extern HIDDEN void __glXDisp_ClearStencil(GLbyte * pc);
extern HIDDEN void __glXDispSwap_ClearStencil(GLbyte * pc);
extern HIDDEN void __glXDisp_VertexAttrib3dvARB(GLbyte * pc);
extern HIDDEN void __glXDispSwap_VertexAttrib3dvARB(GLbyte * pc);
extern HIDDEN void __glXDisp_VertexAttribs4ubvNV(GLbyte * pc);
extern HIDDEN void __glXDispSwap_VertexAttribs4ubvNV(GLbyte * pc);
extern HIDDEN void __glXDisp_ConvolutionParameteriv(GLbyte * pc);
extern HIDDEN void __glXDispSwap_ConvolutionParameteriv(GLbyte * pc);
extern HIDDEN void __glXDisp_RasterPos2fv(GLbyte * pc);
@ -291,10 +317,20 @@ extern HIDDEN int __glXDisp_CheckFramebufferStatusEXT(struct __GLXclientStateRec
extern HIDDEN int __glXDispSwap_CheckFramebufferStatusEXT(struct __GLXclientStateRec *, GLbyte *);
extern HIDDEN int __glXDisp_GetVertexAttribivARB(struct __GLXclientStateRec *, GLbyte *);
extern HIDDEN int __glXDispSwap_GetVertexAttribivARB(struct __GLXclientStateRec *, GLbyte *);
extern HIDDEN int __glXDisp_GetFBConfigsSGIX(struct __GLXclientStateRec *, GLbyte *);
extern HIDDEN int __glXDispSwap_GetFBConfigsSGIX(struct __GLXclientStateRec *, GLbyte *);
extern HIDDEN int __glXDisp_CreateNewContext(struct __GLXclientStateRec *, GLbyte *);
extern HIDDEN int __glXDispSwap_CreateNewContext(struct __GLXclientStateRec *, GLbyte *);
extern HIDDEN int __glXDisp_GetMinmax(struct __GLXclientStateRec *, GLbyte *);
extern HIDDEN int __glXDispSwap_GetMinmax(struct __GLXclientStateRec *, GLbyte *);
extern HIDDEN int __glXDisp_GetMinmaxEXT(struct __GLXclientStateRec *, GLbyte *);
extern HIDDEN int __glXDispSwap_GetMinmaxEXT(struct __GLXclientStateRec *, GLbyte *);
extern HIDDEN int __glXDisp_GetVertexAttribdvNV(struct __GLXclientStateRec *, GLbyte *);
extern HIDDEN int __glXDispSwap_GetVertexAttribdvNV(struct __GLXclientStateRec *, GLbyte *);
extern HIDDEN void __glXDisp_Normal3fv(GLbyte * pc);
extern HIDDEN void __glXDispSwap_Normal3fv(GLbyte * pc);
extern HIDDEN void __glXDisp_ProgramEnvParameter4dvARB(GLbyte * pc);
extern HIDDEN void __glXDispSwap_ProgramEnvParameter4dvARB(GLbyte * pc);
extern HIDDEN void __glXDisp_VertexAttrib4ivARB(GLbyte * pc);
extern HIDDEN void __glXDispSwap_VertexAttrib4ivARB(GLbyte * pc);
extern HIDDEN void __glXDisp_End(GLbyte * pc);
@ -305,6 +341,8 @@ extern HIDDEN void __glXDisp_MultiTexCoord3fvARB(GLbyte * pc);
extern HIDDEN void __glXDispSwap_MultiTexCoord3fvARB(GLbyte * pc);
extern HIDDEN int __glXDisp_GetProgramParameterfvNV(struct __GLXclientStateRec *, GLbyte *);
extern HIDDEN int __glXDispSwap_GetProgramParameterfvNV(struct __GLXclientStateRec *, GLbyte *);
extern HIDDEN void __glXDisp_BindTexture(GLbyte * pc);
extern HIDDEN void __glXDispSwap_BindTexture(GLbyte * pc);
extern HIDDEN void __glXDisp_TexSubImage2D(GLbyte * pc);
extern HIDDEN void __glXDispSwap_TexSubImage2D(GLbyte * pc);
extern HIDDEN void __glXDisp_DeleteRenderbuffersEXT(GLbyte * pc);
@ -313,8 +351,12 @@ extern HIDDEN void __glXDisp_TexGenfv(GLbyte * pc);
extern HIDDEN void __glXDispSwap_TexGenfv(GLbyte * pc);
extern HIDDEN void __glXDisp_VertexAttrib4bvARB(GLbyte * pc);
extern HIDDEN void __glXDispSwap_VertexAttrib4bvARB(GLbyte * pc);
extern HIDDEN int __glXDisp_CreateContextWithConfigSGIX(struct __GLXclientStateRec *, GLbyte *);
extern HIDDEN int __glXDispSwap_CreateContextWithConfigSGIX(struct __GLXclientStateRec *, GLbyte *);
extern HIDDEN void __glXDisp_FramebufferTexture3DEXT(GLbyte * pc);
extern HIDDEN void __glXDispSwap_FramebufferTexture3DEXT(GLbyte * pc);
extern HIDDEN int __glXDisp_CopySubBufferMESA(struct __GLXclientStateRec *, GLbyte *);
extern HIDDEN int __glXDispSwap_CopySubBufferMESA(struct __GLXclientStateRec *, GLbyte *);
extern HIDDEN void __glXDisp_BlendEquation(GLbyte * pc);
extern HIDDEN void __glXDispSwap_BlendEquation(GLbyte * pc);
extern HIDDEN int __glXDisp_GetError(struct __GLXclientStateRec *, GLbyte *);
@ -337,6 +379,8 @@ extern HIDDEN void __glXDisp_EndQueryARB(GLbyte * pc);
extern HIDDEN void __glXDispSwap_EndQueryARB(GLbyte * pc);
extern HIDDEN void __glXDisp_DepthMask(GLbyte * pc);
extern HIDDEN void __glXDispSwap_DepthMask(GLbyte * pc);
extern HIDDEN void __glXDisp_Rotated(GLbyte * pc);
extern HIDDEN void __glXDispSwap_Rotated(GLbyte * pc);
extern HIDDEN int __glXDisp_GetMaterialiv(struct __GLXclientStateRec *, GLbyte *);
extern HIDDEN int __glXDispSwap_GetMaterialiv(struct __GLXclientStateRec *, GLbyte *);
extern HIDDEN void __glXDisp_StencilOp(GLbyte * pc);
@ -345,6 +389,8 @@ extern HIDDEN void __glXDisp_MultiTexCoord3svARB(GLbyte * pc);
extern HIDDEN void __glXDispSwap_MultiTexCoord3svARB(GLbyte * pc);
extern HIDDEN void __glXDisp_TexEnvfv(GLbyte * pc);
extern HIDDEN void __glXDispSwap_TexEnvfv(GLbyte * pc);
extern HIDDEN int __glXDisp_QueryServerString(struct __GLXclientStateRec *, GLbyte *);
extern HIDDEN int __glXDispSwap_QueryServerString(struct __GLXclientStateRec *, GLbyte *);
extern HIDDEN void __glXDisp_LoadMatrixf(GLbyte * pc);
extern HIDDEN void __glXDispSwap_LoadMatrixf(GLbyte * pc);
extern HIDDEN void __glXDisp_Color4bv(GLbyte * pc);
@ -361,16 +407,22 @@ extern HIDDEN void __glXDisp_LogicOp(GLbyte * pc);
extern HIDDEN void __glXDispSwap_LogicOp(GLbyte * pc);
extern HIDDEN void __glXDisp_TexCoord4fv(GLbyte * pc);
extern HIDDEN void __glXDispSwap_TexCoord4fv(GLbyte * pc);
extern HIDDEN void __glXDisp_VertexAttrib2dvNV(GLbyte * pc);
extern HIDDEN void __glXDispSwap_VertexAttrib2dvNV(GLbyte * pc);
extern HIDDEN int __glXDisp_WaitX(struct __GLXclientStateRec *, GLbyte *);
extern HIDDEN int __glXDispSwap_WaitX(struct __GLXclientStateRec *, GLbyte *);
extern HIDDEN void __glXDisp_SecondaryColor3uivEXT(GLbyte * pc);
extern HIDDEN void __glXDispSwap_SecondaryColor3uivEXT(GLbyte * pc);
extern HIDDEN void __glXDisp_FramebufferRenderbufferEXT(GLbyte * pc);
extern HIDDEN void __glXDispSwap_FramebufferRenderbufferEXT(GLbyte * pc);
extern HIDDEN void __glXDisp_VertexAttrib1dvNV(GLbyte * pc);
extern HIDDEN void __glXDispSwap_VertexAttrib1dvNV(GLbyte * pc);
extern HIDDEN int __glXDisp_GenTextures(struct __GLXclientStateRec *, GLbyte *);
extern HIDDEN int __glXDispSwap_GenTextures(struct __GLXclientStateRec *, GLbyte *);
extern HIDDEN int __glXDisp_GenTexturesEXT(struct __GLXclientStateRec *, GLbyte *);
extern HIDDEN int __glXDispSwap_GenTexturesEXT(struct __GLXclientStateRec *, GLbyte *);
extern HIDDEN void __glXDisp_FramebufferTexture1DEXT(GLbyte * pc);
extern HIDDEN void __glXDispSwap_FramebufferTexture1DEXT(GLbyte * pc);
extern HIDDEN int __glXDisp_GetDrawableAttributes(struct __GLXclientStateRec *, GLbyte *);
extern HIDDEN int __glXDispSwap_GetDrawableAttributes(struct __GLXclientStateRec *, GLbyte *);
extern HIDDEN void __glXDisp_ProgramParameter4fvNV(GLbyte * pc);
extern HIDDEN void __glXDispSwap_ProgramParameter4fvNV(GLbyte * pc);
extern HIDDEN void __glXDisp_RasterPos2sv(GLbyte * pc);
@ -383,6 +435,8 @@ extern HIDDEN void __glXDisp_TexCoord2fv(GLbyte * pc);
extern HIDDEN void __glXDispSwap_TexCoord2fv(GLbyte * pc);
extern HIDDEN void __glXDisp_TexCoord1sv(GLbyte * pc);
extern HIDDEN void __glXDispSwap_TexCoord1sv(GLbyte * pc);
extern HIDDEN void __glXDisp_TexGeniv(GLbyte * pc);
extern HIDDEN void __glXDispSwap_TexGeniv(GLbyte * pc);
extern HIDDEN void __glXDisp_DepthFunc(GLbyte * pc);
extern HIDDEN void __glXDispSwap_DepthFunc(GLbyte * pc);
extern HIDDEN void __glXDisp_PixelMapusv(GLbyte * pc);
@ -391,6 +445,8 @@ extern HIDDEN void __glXDisp_PointParameterivNV(GLbyte * pc);
extern HIDDEN void __glXDispSwap_PointParameterivNV(GLbyte * pc);
extern HIDDEN void __glXDisp_BlendFunc(GLbyte * pc);
extern HIDDEN void __glXDispSwap_BlendFunc(GLbyte * pc);
extern HIDDEN int __glXDisp_WaitGL(struct __GLXclientStateRec *, GLbyte *);
extern HIDDEN int __glXDispSwap_WaitGL(struct __GLXclientStateRec *, GLbyte *);
extern HIDDEN void __glXDisp_MultiTexCoord3dvARB(GLbyte * pc);
extern HIDDEN void __glXDispSwap_MultiTexCoord3dvARB(GLbyte * pc);
extern HIDDEN void __glXDisp_ProgramNamedParameter4dvNV(GLbyte * pc);
@ -405,54 +461,68 @@ extern HIDDEN void __glXDisp_BindFramebufferEXT(GLbyte * pc);
extern HIDDEN void __glXDispSwap_BindFramebufferEXT(GLbyte * pc);
extern HIDDEN void __glXDisp_PushAttrib(GLbyte * pc);
extern HIDDEN void __glXDispSwap_PushAttrib(GLbyte * pc);
extern HIDDEN void __glXDisp_VertexAttrib4usvARB(GLbyte * pc);
extern HIDDEN void __glXDispSwap_VertexAttrib4usvARB(GLbyte * pc);
extern HIDDEN int __glXDisp_DestroyPbuffer(struct __GLXclientStateRec *, GLbyte *);
extern HIDDEN int __glXDispSwap_DestroyPbuffer(struct __GLXclientStateRec *, GLbyte *);
extern HIDDEN void __glXDisp_TexParameteriv(GLbyte * pc);
extern HIDDEN void __glXDispSwap_TexParameteriv(GLbyte * pc);
extern HIDDEN void __glXDisp_WindowPos3fvMESA(GLbyte * pc);
extern HIDDEN void __glXDispSwap_WindowPos3fvMESA(GLbyte * pc);
extern HIDDEN void __glXDisp_VertexAttrib1svNV(GLbyte * pc);
extern HIDDEN void __glXDispSwap_VertexAttrib1svNV(GLbyte * pc);
extern HIDDEN int __glXDisp_QueryExtensionsString(struct __GLXclientStateRec *, GLbyte *);
extern HIDDEN int __glXDispSwap_QueryExtensionsString(struct __GLXclientStateRec *, GLbyte *);
extern HIDDEN void __glXDisp_RasterPos3fv(GLbyte * pc);
extern HIDDEN void __glXDispSwap_RasterPos3fv(GLbyte * pc);
extern HIDDEN void __glXDisp_CopyTexSubImage3D(GLbyte * pc);
extern HIDDEN void __glXDispSwap_CopyTexSubImage3D(GLbyte * pc);
extern HIDDEN int __glXDisp_GetColorTable(struct __GLXclientStateRec *, GLbyte *);
extern HIDDEN int __glXDispSwap_GetColorTable(struct __GLXclientStateRec *, GLbyte *);
extern HIDDEN int __glXDisp_SelectBuffer(struct __GLXclientStateRec *, GLbyte *);
extern HIDDEN int __glXDispSwap_SelectBuffer(struct __GLXclientStateRec *, GLbyte *);
extern HIDDEN int __glXDisp_GetColorTableSGI(struct __GLXclientStateRec *, GLbyte *);
extern HIDDEN int __glXDispSwap_GetColorTableSGI(struct __GLXclientStateRec *, GLbyte *);
extern HIDDEN void __glXDisp_Indexiv(GLbyte * pc);
extern HIDDEN void __glXDispSwap_Indexiv(GLbyte * pc);
extern HIDDEN int __glXDisp_CreateContext(struct __GLXclientStateRec *, GLbyte *);
extern HIDDEN int __glXDispSwap_CreateContext(struct __GLXclientStateRec *, GLbyte *);
extern HIDDEN void __glXDisp_CopyColorTable(GLbyte * pc);
extern HIDDEN void __glXDispSwap_CopyColorTable(GLbyte * pc);
extern HIDDEN int __glXDisp_GetHistogramParameterfv(struct __GLXclientStateRec *, GLbyte *);
extern HIDDEN int __glXDispSwap_GetHistogramParameterfv(struct __GLXclientStateRec *, GLbyte *);
extern HIDDEN int __glXDisp_GetHistogramParameterfvEXT(struct __GLXclientStateRec *, GLbyte *);
extern HIDDEN int __glXDispSwap_GetHistogramParameterfvEXT(struct __GLXclientStateRec *, GLbyte *);
extern HIDDEN void __glXDisp_Frustum(GLbyte * pc);
extern HIDDEN void __glXDispSwap_Frustum(GLbyte * pc);
extern HIDDEN int __glXDisp_GetString(struct __GLXclientStateRec *, GLbyte *);
extern HIDDEN int __glXDispSwap_GetString(struct __GLXclientStateRec *, GLbyte *);
extern HIDDEN int __glXDisp_CreateGLXPixmap(struct __GLXclientStateRec *, GLbyte *);
extern HIDDEN int __glXDispSwap_CreateGLXPixmap(struct __GLXclientStateRec *, GLbyte *);
extern HIDDEN void __glXDisp_TexEnvf(GLbyte * pc);
extern HIDDEN void __glXDispSwap_TexEnvf(GLbyte * pc);
extern HIDDEN int __glXDisp_GetProgramStringARB(struct __GLXclientStateRec *, GLbyte *);
extern HIDDEN int __glXDispSwap_GetProgramStringARB(struct __GLXclientStateRec *, GLbyte *);
extern HIDDEN void __glXDisp_MultiTexCoord3ivARB(GLbyte * pc);
extern HIDDEN void __glXDispSwap_MultiTexCoord3ivARB(GLbyte * pc);
extern HIDDEN void __glXDisp_VertexAttrib1dvARB(GLbyte * pc);
extern HIDDEN void __glXDispSwap_VertexAttrib1dvARB(GLbyte * pc);
extern HIDDEN int __glXDisp_DeleteTextures(struct __GLXclientStateRec *, GLbyte *);
extern HIDDEN int __glXDispSwap_DeleteTextures(struct __GLXclientStateRec *, GLbyte *);
extern HIDDEN int __glXDisp_DeleteTexturesEXT(struct __GLXclientStateRec *, GLbyte *);
extern HIDDEN int __glXDispSwap_DeleteTexturesEXT(struct __GLXclientStateRec *, GLbyte *);
extern HIDDEN int __glXDisp_GetTexLevelParameteriv(struct __GLXclientStateRec *, GLbyte *);
extern HIDDEN int __glXDispSwap_GetTexLevelParameteriv(struct __GLXclientStateRec *, GLbyte *);
extern HIDDEN void __glXDisp_ClearAccum(GLbyte * pc);
extern HIDDEN void __glXDispSwap_ClearAccum(GLbyte * pc);
extern HIDDEN int __glXDisp_QueryVersion(struct __GLXclientStateRec *, GLbyte *);
extern HIDDEN int __glXDispSwap_QueryVersion(struct __GLXclientStateRec *, GLbyte *);
extern HIDDEN int __glXDisp_GetVertexAttribfvARB(struct __GLXclientStateRec *, GLbyte *);
extern HIDDEN int __glXDispSwap_GetVertexAttribfvARB(struct __GLXclientStateRec *, GLbyte *);
extern HIDDEN void __glXDisp_SecondaryColor3ivEXT(GLbyte * pc);
extern HIDDEN void __glXDispSwap_SecondaryColor3ivEXT(GLbyte * pc);
extern HIDDEN void __glXDisp_TexCoord4iv(GLbyte * pc);
extern HIDDEN void __glXDispSwap_TexCoord4iv(GLbyte * pc);
extern HIDDEN void __glXDisp_PolygonOffset(GLbyte * pc);
extern HIDDEN void __glXDispSwap_PolygonOffset(GLbyte * pc);
extern HIDDEN void __glXDisp_SampleMaskSGIS(GLbyte * pc);
extern HIDDEN void __glXDispSwap_SampleMaskSGIS(GLbyte * pc);
extern HIDDEN void __glXDisp_ColorTableParameteriv(GLbyte * pc);
extern HIDDEN void __glXDispSwap_ColorTableParameteriv(GLbyte * pc);
extern HIDDEN void __glXDisp_VertexAttrib4ubvARB(GLbyte * pc);
extern HIDDEN void __glXDispSwap_VertexAttrib4ubvARB(GLbyte * pc);
extern HIDDEN void __glXDisp_CopyTexImage2D(GLbyte * pc);
@ -467,6 +537,8 @@ extern HIDDEN void __glXDisp_Color4fv(GLbyte * pc);
extern HIDDEN void __glXDispSwap_Color4fv(GLbyte * pc);
extern HIDDEN void __glXDisp_MultiTexCoord4ivARB(GLbyte * pc);
extern HIDDEN void __glXDispSwap_MultiTexCoord4ivARB(GLbyte * pc);
extern HIDDEN int __glXDisp_CreatePixmap(struct __GLXclientStateRec *, GLbyte *);
extern HIDDEN int __glXDispSwap_CreatePixmap(struct __GLXclientStateRec *, GLbyte *);
extern HIDDEN void __glXDisp_Lightiv(GLbyte * pc);
extern HIDDEN void __glXDispSwap_Lightiv(GLbyte * pc);
extern HIDDEN int __glXDisp_GetQueryObjectuivARB(struct __GLXclientStateRec *, GLbyte *);
@ -479,8 +551,6 @@ extern HIDDEN void __glXDisp_VertexAttrib2dvARB(GLbyte * pc);
extern HIDDEN void __glXDispSwap_VertexAttrib2dvARB(GLbyte * pc);
extern HIDDEN void __glXDisp_VertexAttribs2svNV(GLbyte * pc);
extern HIDDEN void __glXDispSwap_VertexAttribs2svNV(GLbyte * pc);
extern HIDDEN void __glXDisp_VertexAttrib2fvARB(GLbyte * pc);
extern HIDDEN void __glXDispSwap_VertexAttrib2fvARB(GLbyte * pc);
extern HIDDEN void __glXDisp_Rectdv(GLbyte * pc);
extern HIDDEN void __glXDispSwap_Rectdv(GLbyte * pc);
extern HIDDEN void __glXDisp_VertexAttrib4NivARB(GLbyte * pc);
@ -493,10 +563,12 @@ extern HIDDEN void __glXDisp_PolygonMode(GLbyte * pc);
extern HIDDEN void __glXDispSwap_PolygonMode(GLbyte * pc);
extern HIDDEN void __glXDisp_CompressedTexSubImage1DARB(GLbyte * pc);
extern HIDDEN void __glXDispSwap_CompressedTexSubImage1DARB(GLbyte * pc);
extern HIDDEN void __glXDisp_VertexAttrib2dvNV(GLbyte * pc);
extern HIDDEN void __glXDispSwap_VertexAttrib2dvNV(GLbyte * pc);
extern HIDDEN int __glXDisp_GetVertexAttribivNV(struct __GLXclientStateRec *, GLbyte *);
extern HIDDEN int __glXDispSwap_GetVertexAttribivNV(struct __GLXclientStateRec *, GLbyte *);
extern HIDDEN int __glXDisp_GetProgramStringARB(struct __GLXclientStateRec *, GLbyte *);
extern HIDDEN int __glXDispSwap_GetProgramStringARB(struct __GLXclientStateRec *, GLbyte *);
extern HIDDEN int __glXDisp_IsQueryARB(struct __GLXclientStateRec *, GLbyte *);
extern HIDDEN int __glXDispSwap_IsQueryARB(struct __GLXclientStateRec *, GLbyte *);
extern HIDDEN void __glXDisp_TexGeni(GLbyte * pc);
extern HIDDEN void __glXDispSwap_TexGeni(GLbyte * pc);
extern HIDDEN void __glXDisp_TexGenf(GLbyte * pc);
@ -513,6 +585,8 @@ extern HIDDEN void __glXDisp_VertexAttribs1fvNV(GLbyte * pc);
extern HIDDEN void __glXDispSwap_VertexAttribs1fvNV(GLbyte * pc);
extern HIDDEN void __glXDisp_VertexAttrib4NuivARB(GLbyte * pc);
extern HIDDEN void __glXDispSwap_VertexAttrib4NuivARB(GLbyte * pc);
extern HIDDEN int __glXDisp_DestroyWindow(struct __GLXclientStateRec *, GLbyte *);
extern HIDDEN int __glXDispSwap_DestroyWindow(struct __GLXclientStateRec *, GLbyte *);
extern HIDDEN void __glXDisp_Color4sv(GLbyte * pc);
extern HIDDEN void __glXDispSwap_Color4sv(GLbyte * pc);
extern HIDDEN int __glXDisp_IsProgramNV(struct __GLXclientStateRec *, GLbyte *);
@ -527,18 +601,26 @@ extern HIDDEN void __glXDisp_Color3dv(GLbyte * pc);
extern HIDDEN void __glXDispSwap_Color3dv(GLbyte * pc);
extern HIDDEN int __glXDisp_IsTexture(struct __GLXclientStateRec *, GLbyte *);
extern HIDDEN int __glXDispSwap_IsTexture(struct __GLXclientStateRec *, GLbyte *);
extern HIDDEN int __glXDisp_IsTextureEXT(struct __GLXclientStateRec *, GLbyte *);
extern HIDDEN int __glXDispSwap_IsTextureEXT(struct __GLXclientStateRec *, GLbyte *);
extern HIDDEN int __glXDisp_DeleteQueriesARB(struct __GLXclientStateRec *, GLbyte *);
extern HIDDEN int __glXDispSwap_DeleteQueriesARB(struct __GLXclientStateRec *, GLbyte *);
extern HIDDEN int __glXDisp_GetMapdv(struct __GLXclientStateRec *, GLbyte *);
extern HIDDEN int __glXDispSwap_GetMapdv(struct __GLXclientStateRec *, GLbyte *);
extern HIDDEN int __glXDisp_DestroyGLXPixmap(struct __GLXclientStateRec *, GLbyte *);
extern HIDDEN int __glXDispSwap_DestroyGLXPixmap(struct __GLXclientStateRec *, GLbyte *);
extern HIDDEN void __glXDisp_SamplePatternSGIS(GLbyte * pc);
extern HIDDEN void __glXDispSwap_SamplePatternSGIS(GLbyte * pc);
extern HIDDEN int __glXDisp_PixelStoref(struct __GLXclientStateRec *, GLbyte *);
extern HIDDEN int __glXDispSwap_PixelStoref(struct __GLXclientStateRec *, GLbyte *);
extern HIDDEN int __glXDisp_IsQueryARB(struct __GLXclientStateRec *, GLbyte *);
extern HIDDEN int __glXDispSwap_IsQueryARB(struct __GLXclientStateRec *, GLbyte *);
extern HIDDEN void __glXDisp_PrioritizeTextures(GLbyte * pc);
extern HIDDEN void __glXDispSwap_PrioritizeTextures(GLbyte * pc);
extern HIDDEN int __glXDisp_PixelStorei(struct __GLXclientStateRec *, GLbyte *);
extern HIDDEN int __glXDispSwap_PixelStorei(struct __GLXclientStateRec *, GLbyte *);
extern HIDDEN void __glXDisp_VertexAttrib4usvARB(GLbyte * pc);
extern HIDDEN void __glXDispSwap_VertexAttrib4usvARB(GLbyte * pc);
extern HIDDEN void __glXDisp_Color4iv(GLbyte * pc);
extern HIDDEN void __glXDispSwap_Color4iv(GLbyte * pc);
extern HIDDEN void __glXDisp_EvalCoord2dv(GLbyte * pc);
extern HIDDEN void __glXDispSwap_EvalCoord2dv(GLbyte * pc);
extern HIDDEN void __glXDisp_VertexAttrib3svARB(GLbyte * pc);
@ -553,6 +635,8 @@ extern HIDDEN int __glXDisp_GetVertexAttribdvARB(struct __GLXclientStateRec *, G
extern HIDDEN int __glXDispSwap_GetVertexAttribdvARB(struct __GLXclientStateRec *, GLbyte *);
extern HIDDEN int __glXDisp_GetSeparableFilter(struct __GLXclientStateRec *, GLbyte *);
extern HIDDEN int __glXDispSwap_GetSeparableFilter(struct __GLXclientStateRec *, GLbyte *);
extern HIDDEN int __glXDisp_GetSeparableFilterEXT(struct __GLXclientStateRec *, GLbyte *);
extern HIDDEN int __glXDispSwap_GetSeparableFilterEXT(struct __GLXclientStateRec *, GLbyte *);
extern HIDDEN void __glXDisp_RequestResidentProgramsNV(GLbyte * pc);
extern HIDDEN void __glXDispSwap_RequestResidentProgramsNV(GLbyte * pc);
extern HIDDEN int __glXDisp_FeedbackBuffer(struct __GLXclientStateRec *, GLbyte *);
@ -563,10 +647,12 @@ extern HIDDEN void __glXDisp_TexImage1D(GLbyte * pc);
extern HIDDEN void __glXDispSwap_TexImage1D(GLbyte * pc);
extern HIDDEN void __glXDisp_FrontFace(GLbyte * pc);
extern HIDDEN void __glXDispSwap_FrontFace(GLbyte * pc);
extern HIDDEN void __glXDisp_SecondaryColor3ubvEXT(GLbyte * pc);
extern HIDDEN void __glXDispSwap_SecondaryColor3ubvEXT(GLbyte * pc);
extern HIDDEN int __glXDisp_RenderLarge(struct __GLXclientStateRec *, GLbyte *);
extern HIDDEN int __glXDispSwap_RenderLarge(struct __GLXclientStateRec *, GLbyte *);
extern HIDDEN void __glXDisp_VertexAttrib4dvARB(GLbyte * pc);
extern HIDDEN void __glXDispSwap_VertexAttrib4dvARB(GLbyte * pc);
extern HIDDEN void __glXDisp_PolygonOffset(GLbyte * pc);
extern HIDDEN void __glXDispSwap_PolygonOffset(GLbyte * pc);
extern HIDDEN void __glXDisp_ExecuteProgramNV(GLbyte * pc);
extern HIDDEN void __glXDispSwap_ExecuteProgramNV(GLbyte * pc);
extern HIDDEN void __glXDisp_Normal3dv(GLbyte * pc);
@ -585,6 +671,8 @@ extern HIDDEN int __glXDisp_GetFramebufferAttachmentParameterivEXT(struct __GLXc
extern HIDDEN int __glXDispSwap_GetFramebufferAttachmentParameterivEXT(struct __GLXclientStateRec *, GLbyte *);
extern HIDDEN void __glXDisp_MultiTexCoord4dvARB(GLbyte * pc);
extern HIDDEN void __glXDispSwap_MultiTexCoord4dvARB(GLbyte * pc);
extern HIDDEN int __glXDisp_CreatePbuffer(struct __GLXclientStateRec *, GLbyte *);
extern HIDDEN int __glXDispSwap_CreatePbuffer(struct __GLXclientStateRec *, GLbyte *);
extern HIDDEN int __glXDisp_GetDoublev(struct __GLXclientStateRec *, GLbyte *);
extern HIDDEN int __glXDispSwap_GetDoublev(struct __GLXclientStateRec *, GLbyte *);
extern HIDDEN void __glXDisp_MultMatrixd(GLbyte * pc);
@ -603,16 +691,20 @@ extern HIDDEN void __glXDisp_VertexAttrib3fvARB(GLbyte * pc);
extern HIDDEN void __glXDispSwap_VertexAttrib3fvARB(GLbyte * pc);
extern HIDDEN void __glXDisp_ClearColor(GLbyte * pc);
extern HIDDEN void __glXDispSwap_ClearColor(GLbyte * pc);
extern HIDDEN int __glXDisp_IsDirect(struct __GLXclientStateRec *, GLbyte *);
extern HIDDEN int __glXDispSwap_IsDirect(struct __GLXclientStateRec *, GLbyte *);
extern HIDDEN void __glXDisp_DeleteFramebuffersEXT(GLbyte * pc);
extern HIDDEN void __glXDispSwap_DeleteFramebuffersEXT(GLbyte * pc);
extern HIDDEN void __glXDisp_TexEnviv(GLbyte * pc);
extern HIDDEN void __glXDispSwap_TexEnviv(GLbyte * pc);
extern HIDDEN void __glXDisp_TexSubImage3D(GLbyte * pc);
extern HIDDEN void __glXDispSwap_TexSubImage3D(GLbyte * pc);
extern HIDDEN void __glXDisp_SecondaryColor3uivEXT(GLbyte * pc);
extern HIDDEN void __glXDispSwap_SecondaryColor3uivEXT(GLbyte * pc);
extern HIDDEN int __glXDisp_SwapIntervalSGI(struct __GLXclientStateRec *, GLbyte *);
extern HIDDEN int __glXDispSwap_SwapIntervalSGI(struct __GLXclientStateRec *, GLbyte *);
extern HIDDEN int __glXDisp_GetColorTableParameterfv(struct __GLXclientStateRec *, GLbyte *);
extern HIDDEN int __glXDispSwap_GetColorTableParameterfv(struct __GLXclientStateRec *, GLbyte *);
extern HIDDEN int __glXDisp_GetColorTableParameterfvSGI(struct __GLXclientStateRec *, GLbyte *);
extern HIDDEN int __glXDispSwap_GetColorTableParameterfvSGI(struct __GLXclientStateRec *, GLbyte *);
extern HIDDEN void __glXDisp_Bitmap(GLbyte * pc);
extern HIDDEN void __glXDispSwap_Bitmap(GLbyte * pc);
extern HIDDEN int __glXDisp_GetTexLevelParameterfv(struct __GLXclientStateRec *, GLbyte *);
@ -633,6 +725,8 @@ extern HIDDEN void __glXDisp_VertexAttrib3svNV(GLbyte * pc);
extern HIDDEN void __glXDispSwap_VertexAttrib3svNV(GLbyte * pc);
extern HIDDEN int __glXDisp_GetTexEnviv(struct __GLXclientStateRec *, GLbyte *);
extern HIDDEN int __glXDispSwap_GetTexEnviv(struct __GLXclientStateRec *, GLbyte *);
extern HIDDEN int __glXDisp_VendorPrivateWithReply(struct __GLXclientStateRec *, GLbyte *);
extern HIDDEN int __glXDispSwap_VendorPrivateWithReply(struct __GLXclientStateRec *, GLbyte *);
extern HIDDEN void __glXDisp_SeparableFilter2D(GLbyte * pc);
extern HIDDEN void __glXDispSwap_SeparableFilter2D(GLbyte * pc);
extern HIDDEN void __glXDisp_Map1d(GLbyte * pc);
@ -647,8 +741,12 @@ extern HIDDEN void __glXDisp_ProgramParameters4fvNV(GLbyte * pc);
extern HIDDEN void __glXDispSwap_ProgramParameters4fvNV(GLbyte * pc);
extern HIDDEN int __glXDisp_GetProgramivNV(struct __GLXclientStateRec *, GLbyte *);
extern HIDDEN int __glXDispSwap_GetProgramivNV(struct __GLXclientStateRec *, GLbyte *);
extern HIDDEN int __glXDisp_ChangeDrawableAttributes(struct __GLXclientStateRec *, GLbyte *);
extern HIDDEN int __glXDispSwap_ChangeDrawableAttributes(struct __GLXclientStateRec *, GLbyte *);
extern HIDDEN int __glXDisp_GetMinmaxParameteriv(struct __GLXclientStateRec *, GLbyte *);
extern HIDDEN int __glXDispSwap_GetMinmaxParameteriv(struct __GLXclientStateRec *, GLbyte *);
extern HIDDEN int __glXDisp_GetMinmaxParameterivEXT(struct __GLXclientStateRec *, GLbyte *);
extern HIDDEN int __glXDispSwap_GetMinmaxParameterivEXT(struct __GLXclientStateRec *, GLbyte *);
extern HIDDEN void __glXDisp_PixelTransferf(GLbyte * pc);
extern HIDDEN void __glXDispSwap_PixelTransferf(GLbyte * pc);
extern HIDDEN void __glXDisp_CopyTexImage1D(GLbyte * pc);
@ -661,12 +759,10 @@ extern HIDDEN void __glXDisp_TexCoord1dv(GLbyte * pc);
extern HIDDEN void __glXDispSwap_TexCoord1dv(GLbyte * pc);
extern HIDDEN void __glXDisp_PixelTransferi(GLbyte * pc);
extern HIDDEN void __glXDispSwap_PixelTransferi(GLbyte * pc);
extern HIDDEN int __glXDisp_GetVertexAttribdvNV(struct __GLXclientStateRec *, GLbyte *);
extern HIDDEN int __glXDispSwap_GetVertexAttribdvNV(struct __GLXclientStateRec *, GLbyte *);
extern HIDDEN void __glXDisp_SecondaryColor3ubvEXT(GLbyte * pc);
extern HIDDEN void __glXDispSwap_SecondaryColor3ubvEXT(GLbyte * pc);
extern HIDDEN void __glXDisp_VertexAttrib3fvNV(GLbyte * pc);
extern HIDDEN void __glXDispSwap_VertexAttrib3fvNV(GLbyte * pc);
extern HIDDEN void __glXDisp_Rotatef(GLbyte * pc);
extern HIDDEN void __glXDispSwap_Rotatef(GLbyte * pc);
extern HIDDEN void __glXDisp_Clear(GLbyte * pc);
extern HIDDEN void __glXDispSwap_Clear(GLbyte * pc);
extern HIDDEN void __glXDisp_ReadBuffer(GLbyte * pc);
@ -681,14 +777,16 @@ extern HIDDEN void __glXDisp_ConvolutionParameterf(GLbyte * pc);
extern HIDDEN void __glXDispSwap_ConvolutionParameterf(GLbyte * pc);
extern HIDDEN int __glXDisp_GetColorTableParameteriv(struct __GLXclientStateRec *, GLbyte *);
extern HIDDEN int __glXDispSwap_GetColorTableParameteriv(struct __GLXclientStateRec *, GLbyte *);
extern HIDDEN void __glXDisp_ShadeModel(GLbyte * pc);
extern HIDDEN void __glXDispSwap_ShadeModel(GLbyte * pc);
extern HIDDEN int __glXDisp_GetColorTableParameterivSGI(struct __GLXclientStateRec *, GLbyte *);
extern HIDDEN int __glXDispSwap_GetColorTableParameterivSGI(struct __GLXclientStateRec *, GLbyte *);
extern HIDDEN int __glXDisp_ReleaseTexImageEXT(struct __GLXclientStateRec *, GLbyte *);
extern HIDDEN int __glXDispSwap_ReleaseTexImageEXT(struct __GLXclientStateRec *, GLbyte *);
extern HIDDEN void __glXDisp_CallList(GLbyte * pc);
extern HIDDEN void __glXDispSwap_CallList(GLbyte * pc);
extern HIDDEN void __glXDisp_VertexAttribs2fvNV(GLbyte * pc);
extern HIDDEN void __glXDispSwap_VertexAttribs2fvNV(GLbyte * pc);
extern HIDDEN void __glXDisp_Rectiv(GLbyte * pc);
extern HIDDEN void __glXDispSwap_Rectiv(GLbyte * pc);
extern HIDDEN void __glXDisp_VertexAttrib1fvNV(GLbyte * pc);
extern HIDDEN void __glXDispSwap_VertexAttrib1fvNV(GLbyte * pc);
extern HIDDEN void __glXDisp_SecondaryColor3dvEXT(GLbyte * pc);
extern HIDDEN void __glXDispSwap_SecondaryColor3dvEXT(GLbyte * pc);
extern HIDDEN void __glXDisp_Vertex2fv(GLbyte * pc);
@ -697,6 +795,8 @@ extern HIDDEN void __glXDisp_BindRenderbufferEXT(GLbyte * pc);
extern HIDDEN void __glXDispSwap_BindRenderbufferEXT(GLbyte * pc);
extern HIDDEN void __glXDisp_Vertex3sv(GLbyte * pc);
extern HIDDEN void __glXDispSwap_Vertex3sv(GLbyte * pc);
extern HIDDEN int __glXDisp_BindTexImageEXT(struct __GLXclientStateRec *, GLbyte *);
extern HIDDEN int __glXDispSwap_BindTexImageEXT(struct __GLXclientStateRec *, GLbyte *);
extern HIDDEN void __glXDisp_ProgramLocalParameter4fvARB(GLbyte * pc);
extern HIDDEN void __glXDispSwap_ProgramLocalParameter4fvARB(GLbyte * pc);
extern HIDDEN int __glXDisp_DeleteProgramsNV(struct __GLXclientStateRec *, GLbyte *);
@ -711,20 +811,24 @@ extern HIDDEN int __glXDisp_GetProgramStringNV(struct __GLXclientStateRec *, GLb
extern HIDDEN int __glXDispSwap_GetProgramStringNV(struct __GLXclientStateRec *, GLbyte *);
extern HIDDEN void __glXDisp_LineWidth(GLbyte * pc);
extern HIDDEN void __glXDispSwap_LineWidth(GLbyte * pc);
extern HIDDEN void __glXDisp_VertexAttrib2fvARB(GLbyte * pc);
extern HIDDEN void __glXDispSwap_VertexAttrib2fvARB(GLbyte * pc);
extern HIDDEN void __glXDisp_TexGendv(GLbyte * pc);
extern HIDDEN void __glXDispSwap_TexGendv(GLbyte * pc);
extern HIDDEN void __glXDisp_ResetMinmax(GLbyte * pc);
extern HIDDEN void __glXDispSwap_ResetMinmax(GLbyte * pc);
extern HIDDEN int __glXDisp_GenTexturesEXT(struct __GLXclientStateRec *, GLbyte *);
extern HIDDEN int __glXDispSwap_GenTexturesEXT(struct __GLXclientStateRec *, GLbyte *);
extern HIDDEN int __glXDisp_GetConvolutionParameterfv(struct __GLXclientStateRec *, GLbyte *);
extern HIDDEN int __glXDispSwap_GetConvolutionParameterfv(struct __GLXclientStateRec *, GLbyte *);
extern HIDDEN int __glXDisp_GetConvolutionParameterfvEXT(struct __GLXclientStateRec *, GLbyte *);
extern HIDDEN int __glXDispSwap_GetConvolutionParameterfvEXT(struct __GLXclientStateRec *, GLbyte *);
extern HIDDEN void __glXDisp_VertexAttribs4dvNV(GLbyte * pc);
extern HIDDEN void __glXDispSwap_VertexAttribs4dvNV(GLbyte * pc);
extern HIDDEN int __glXDisp_GetMaterialfv(struct __GLXclientStateRec *, GLbyte *);
extern HIDDEN int __glXDispSwap_GetMaterialfv(struct __GLXclientStateRec *, GLbyte *);
extern HIDDEN void __glXDisp_CallList(GLbyte * pc);
extern HIDDEN void __glXDispSwap_CallList(GLbyte * pc);
extern HIDDEN int __glXDisp_UseXFont(struct __GLXclientStateRec *, GLbyte *);
extern HIDDEN int __glXDispSwap_UseXFont(struct __GLXclientStateRec *, GLbyte *);
extern HIDDEN void __glXDisp_ShadeModel(GLbyte * pc);
extern HIDDEN void __glXDispSwap_ShadeModel(GLbyte * pc);
extern HIDDEN void __glXDisp_Materialfv(GLbyte * pc);
extern HIDDEN void __glXDispSwap_Materialfv(GLbyte * pc);
extern HIDDEN void __glXDisp_TexCoord3fv(GLbyte * pc);
@ -735,16 +839,20 @@ extern HIDDEN void __glXDisp_MultiTexCoord1ivARB(GLbyte * pc);
extern HIDDEN void __glXDispSwap_MultiTexCoord1ivARB(GLbyte * pc);
extern HIDDEN void __glXDisp_MultiTexCoord2ivARB(GLbyte * pc);
extern HIDDEN void __glXDispSwap_MultiTexCoord2ivARB(GLbyte * pc);
extern HIDDEN void __glXDisp_CopyTexSubImage2D(GLbyte * pc);
extern HIDDEN void __glXDispSwap_CopyTexSubImage2D(GLbyte * pc);
extern HIDDEN void __glXDisp_DrawArrays(GLbyte * pc);
extern HIDDEN void __glXDispSwap_DrawArrays(GLbyte * pc);
extern HIDDEN void __glXDisp_Color3iv(GLbyte * pc);
extern HIDDEN void __glXDispSwap_Color3iv(GLbyte * pc);
extern HIDDEN int __glXDisp_GetProgramLocalParameterdvARB(struct __GLXclientStateRec *, GLbyte *);
extern HIDDEN int __glXDispSwap_GetProgramLocalParameterdvARB(struct __GLXclientStateRec *, GLbyte *);
extern HIDDEN int __glXDisp_GetHistogramParameteriv(struct __GLXclientStateRec *, GLbyte *);
extern HIDDEN int __glXDispSwap_GetHistogramParameteriv(struct __GLXclientStateRec *, GLbyte *);
extern HIDDEN int __glXDisp_GetHistogramParameterivEXT(struct __GLXclientStateRec *, GLbyte *);
extern HIDDEN int __glXDispSwap_GetHistogramParameterivEXT(struct __GLXclientStateRec *, GLbyte *);
extern HIDDEN int __glXDisp_GetConvolutionFilter(struct __GLXclientStateRec *, GLbyte *);
extern HIDDEN int __glXDispSwap_GetConvolutionFilter(struct __GLXclientStateRec *, GLbyte *);
extern HIDDEN int __glXDisp_GetConvolutionFilterEXT(struct __GLXclientStateRec *, GLbyte *);
extern HIDDEN int __glXDispSwap_GetConvolutionFilterEXT(struct __GLXclientStateRec *, GLbyte *);
extern HIDDEN int __glXDisp_GetProgramivARB(struct __GLXclientStateRec *, GLbyte *);
extern HIDDEN int __glXDispSwap_GetProgramivARB(struct __GLXclientStateRec *, GLbyte *);
extern HIDDEN void __glXDisp_BlendFuncSeparateEXT(GLbyte * pc);
@ -757,24 +865,26 @@ extern HIDDEN void __glXDisp_EvalPoint1(GLbyte * pc);
extern HIDDEN void __glXDispSwap_EvalPoint1(GLbyte * pc);
extern HIDDEN void __glXDisp_PopMatrix(GLbyte * pc);
extern HIDDEN void __glXDispSwap_PopMatrix(GLbyte * pc);
extern HIDDEN int __glXDisp_AreTexturesResidentEXT(struct __GLXclientStateRec *, GLbyte *);
extern HIDDEN int __glXDispSwap_AreTexturesResidentEXT(struct __GLXclientStateRec *, GLbyte *);
extern HIDDEN int __glXDisp_MakeCurrentReadSGI(struct __GLXclientStateRec *, GLbyte *);
extern HIDDEN int __glXDispSwap_MakeCurrentReadSGI(struct __GLXclientStateRec *, GLbyte *);
extern HIDDEN int __glXDisp_GetTexGeniv(struct __GLXclientStateRec *, GLbyte *);
extern HIDDEN int __glXDispSwap_GetTexGeniv(struct __GLXclientStateRec *, GLbyte *);
extern HIDDEN int __glXDisp_MakeCurrent(struct __GLXclientStateRec *, GLbyte *);
extern HIDDEN int __glXDispSwap_MakeCurrent(struct __GLXclientStateRec *, GLbyte *);
extern HIDDEN void __glXDisp_Map2d(GLbyte * pc);
extern HIDDEN void __glXDispSwap_Map2d(GLbyte * pc);
extern HIDDEN void __glXDisp_Map2f(GLbyte * pc);
extern HIDDEN void __glXDispSwap_Map2f(GLbyte * pc);
extern HIDDEN void __glXDisp_ProgramStringARB(GLbyte * pc);
extern HIDDEN void __glXDispSwap_ProgramStringARB(GLbyte * pc);
extern HIDDEN void __glXDisp_RasterPos4dv(GLbyte * pc);
extern HIDDEN void __glXDispSwap_RasterPos4dv(GLbyte * pc);
extern HIDDEN int __glXDisp_GetCompressedTexImageARB(struct __GLXclientStateRec *, GLbyte *);
extern HIDDEN int __glXDispSwap_GetCompressedTexImageARB(struct __GLXclientStateRec *, GLbyte *);
extern HIDDEN int __glXDisp_GetTexGenfv(struct __GLXclientStateRec *, GLbyte *);
extern HIDDEN int __glXDispSwap_GetTexGenfv(struct __GLXclientStateRec *, GLbyte *);
extern HIDDEN int __glXDisp_GetHistogram(struct __GLXclientStateRec *, GLbyte *);
extern HIDDEN int __glXDispSwap_GetHistogram(struct __GLXclientStateRec *, GLbyte *);
extern HIDDEN int __glXDisp_GetHistogramEXT(struct __GLXclientStateRec *, GLbyte *);
extern HIDDEN int __glXDispSwap_GetHistogramEXT(struct __GLXclientStateRec *, GLbyte *);
extern HIDDEN void __glXDisp_ActiveStencilFaceEXT(GLbyte * pc);
extern HIDDEN void __glXDispSwap_ActiveStencilFaceEXT(GLbyte * pc);
extern HIDDEN void __glXDisp_Materialf(GLbyte * pc);
@ -799,22 +909,24 @@ extern HIDDEN void __glXDisp_Translatef(GLbyte * pc);
extern HIDDEN void __glXDispSwap_Translatef(GLbyte * pc);
extern HIDDEN void __glXDisp_StencilMask(GLbyte * pc);
extern HIDDEN void __glXDispSwap_StencilMask(GLbyte * pc);
extern HIDDEN int __glXDisp_CreateWindow(struct __GLXclientStateRec *, GLbyte *);
extern HIDDEN int __glXDispSwap_CreateWindow(struct __GLXclientStateRec *, GLbyte *);
extern HIDDEN int __glXDisp_GetLightiv(struct __GLXclientStateRec *, GLbyte *);
extern HIDDEN int __glXDispSwap_GetLightiv(struct __GLXclientStateRec *, GLbyte *);
extern HIDDEN int __glXDisp_IsList(struct __GLXclientStateRec *, GLbyte *);
extern HIDDEN int __glXDispSwap_IsList(struct __GLXclientStateRec *, GLbyte *);
extern HIDDEN int __glXDisp_RenderMode(struct __GLXclientStateRec *, GLbyte *);
extern HIDDEN int __glXDispSwap_RenderMode(struct __GLXclientStateRec *, GLbyte *);
extern HIDDEN void __glXDisp_DrawBuffersARB(GLbyte * pc);
extern HIDDEN void __glXDispSwap_DrawBuffersARB(GLbyte * pc);
extern HIDDEN void __glXDisp_LoadName(GLbyte * pc);
extern HIDDEN void __glXDispSwap_LoadName(GLbyte * pc);
extern HIDDEN void __glXDisp_VertexAttribs4ubvNV(GLbyte * pc);
extern HIDDEN void __glXDispSwap_VertexAttribs4ubvNV(GLbyte * pc);
extern HIDDEN void __glXDisp_CopyTexSubImage1D(GLbyte * pc);
extern HIDDEN void __glXDispSwap_CopyTexSubImage1D(GLbyte * pc);
extern HIDDEN void __glXDisp_CullFace(GLbyte * pc);
extern HIDDEN void __glXDispSwap_CullFace(GLbyte * pc);
extern HIDDEN void __glXDisp_BindTexture(GLbyte * pc);
extern HIDDEN void __glXDispSwap_BindTexture(GLbyte * pc);
extern HIDDEN int __glXDisp_QueryContextInfoEXT(struct __GLXclientStateRec *, GLbyte *);
extern HIDDEN int __glXDispSwap_QueryContextInfoEXT(struct __GLXclientStateRec *, GLbyte *);
extern HIDDEN void __glXDisp_VertexAttribs3svNV(GLbyte * pc);
extern HIDDEN void __glXDispSwap_VertexAttribs3svNV(GLbyte * pc);
extern HIDDEN void __glXDisp_StencilFunc(GLbyte * pc);
@ -831,12 +943,12 @@ extern HIDDEN void __glXDisp_VertexAttrib4uivARB(GLbyte * pc);
extern HIDDEN void __glXDispSwap_VertexAttrib4uivARB(GLbyte * pc);
extern HIDDEN void __glXDisp_ClipPlane(GLbyte * pc);
extern HIDDEN void __glXDispSwap_ClipPlane(GLbyte * pc);
extern HIDDEN int __glXDisp_IsTextureEXT(struct __GLXclientStateRec *, GLbyte *);
extern HIDDEN int __glXDispSwap_IsTextureEXT(struct __GLXclientStateRec *, GLbyte *);
extern HIDDEN int __glXDisp_GetPixelMapuiv(struct __GLXclientStateRec *, GLbyte *);
extern HIDDEN int __glXDispSwap_GetPixelMapuiv(struct __GLXclientStateRec *, GLbyte *);
extern HIDDEN void __glXDisp_Indexfv(GLbyte * pc);
extern HIDDEN void __glXDispSwap_Indexfv(GLbyte * pc);
extern HIDDEN int __glXDisp_QueryContext(struct __GLXclientStateRec *, GLbyte *);
extern HIDDEN int __glXDispSwap_QueryContext(struct __GLXclientStateRec *, GLbyte *);
extern HIDDEN void __glXDisp_SecondaryColor3svEXT(GLbyte * pc);
extern HIDDEN void __glXDispSwap_SecondaryColor3svEXT(GLbyte * pc);
extern HIDDEN void __glXDisp_IndexMask(GLbyte * pc);
@ -885,8 +997,8 @@ extern HIDDEN void __glXDisp_TexCoord4dv(GLbyte * pc);
extern HIDDEN void __glXDispSwap_TexCoord4dv(GLbyte * pc);
extern HIDDEN void __glXDisp_Begin(GLbyte * pc);
extern HIDDEN void __glXDispSwap_Begin(GLbyte * pc);
extern HIDDEN void __glXDisp_LightModeli(GLbyte * pc);
extern HIDDEN void __glXDispSwap_LightModeli(GLbyte * pc);
extern HIDDEN int __glXDisp_ClientInfo(struct __GLXclientStateRec *, GLbyte *);
extern HIDDEN int __glXDispSwap_ClientInfo(struct __GLXclientStateRec *, GLbyte *);
extern HIDDEN void __glXDisp_Rectfv(GLbyte * pc);
extern HIDDEN void __glXDispSwap_Rectfv(GLbyte * pc);
extern HIDDEN void __glXDisp_LightModelf(GLbyte * pc);
@ -901,20 +1013,20 @@ extern HIDDEN void __glXDisp_MultiTexCoord2fvARB(GLbyte * pc);
extern HIDDEN void __glXDispSwap_MultiTexCoord2fvARB(GLbyte * pc);
extern HIDDEN int __glXDisp_GetRenderbufferParameterivEXT(struct __GLXclientStateRec *, GLbyte *);
extern HIDDEN int __glXDispSwap_GetRenderbufferParameterivEXT(struct __GLXclientStateRec *, GLbyte *);
extern HIDDEN void __glXDisp_DrawArrays(GLbyte * pc);
extern HIDDEN void __glXDispSwap_DrawArrays(GLbyte * pc);
extern HIDDEN int __glXDisp_SelectBuffer(struct __GLXclientStateRec *, GLbyte *);
extern HIDDEN int __glXDispSwap_SelectBuffer(struct __GLXclientStateRec *, GLbyte *);
extern HIDDEN void __glXDisp_ColorMask(GLbyte * pc);
extern HIDDEN void __glXDispSwap_ColorMask(GLbyte * pc);
extern HIDDEN void __glXDisp_RasterPos4iv(GLbyte * pc);
extern HIDDEN void __glXDispSwap_RasterPos4iv(GLbyte * pc);
extern HIDDEN void __glXDisp_Enable(GLbyte * pc);
extern HIDDEN void __glXDispSwap_Enable(GLbyte * pc);
extern HIDDEN void __glXDisp_LineStipple(GLbyte * pc);
extern HIDDEN void __glXDispSwap_LineStipple(GLbyte * pc);
extern HIDDEN void __glXDisp_VertexAttribs4svNV(GLbyte * pc);
extern HIDDEN void __glXDispSwap_VertexAttribs4svNV(GLbyte * pc);
extern HIDDEN int __glXDisp_GetMinmaxParameterfv(struct __GLXclientStateRec *, GLbyte *);
extern HIDDEN int __glXDispSwap_GetMinmaxParameterfv(struct __GLXclientStateRec *, GLbyte *);
extern HIDDEN int __glXDisp_GetMinmaxParameterfvEXT(struct __GLXclientStateRec *, GLbyte *);
extern HIDDEN int __glXDispSwap_GetMinmaxParameterfvEXT(struct __GLXclientStateRec *, GLbyte *);
extern HIDDEN void __glXDisp_VertexAttrib1fvARB(GLbyte * pc);
extern HIDDEN void __glXDispSwap_VertexAttrib1fvARB(GLbyte * pc);
extern HIDDEN void __glXDisp_VertexAttribs1svNV(GLbyte * pc);

File diff suppressed because it is too large Load Diff

163
GL/glx/indirect_program.c Normal file
View File

@ -0,0 +1,163 @@
/*
* (C) Copyright IBM Corporation 2005, 2006
* All Rights Reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
* to deal in the Software without restriction, including without limitation
* the rights to use, copy, modify, merge, publish, distribute, sub license,
* and/or sell copies of the Software, and to permit persons to whom the
* Software is furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice (including the next
* paragraph) shall be included in all copies or substantial portions of the
* Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
* THE COPYRIGHT HOLDERS, THE AUTHORS, AND/OR THEIR SUPPLIERS BE LIABLE FOR
* ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE
* OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
/**
* \file indirect_program.c
* Hand-coded routines needed to support programmable pipeline extensions.
*
* \author Ian Romanick <idr@us.ibm.com>
*/
#define NEED_REPLIES
#ifdef HAVE_DIX_CONFIG_H
#include <dix-config.h>
#endif
#include "glxserver.h"
#include "glxext.h"
#include "singlesize.h"
#include "unpack.h"
#include "indirect_size_get.h"
#include "indirect_dispatch.h"
#include "glapitable.h"
#include "glapi.h"
#include "glthread.h"
#include "dispatch.h"
#include "glapioffsets.h"
#if defined(__linux__) || defined (__GLIBC__) || defined (__GNU__)
#include <byteswap.h>
#elif defined(__OpenBSD__)
#include <sys/endian.h>
#define bswap_16 __swap16
#define bswap_32 __swap32
#define bswap_64 __swap64
#else
#include <sys/endian.h>
#define bswap_16 bswap16
#define bswap_32 bswap32
#define bswap_64 bswap64
#endif
static int DoGetProgramString(struct __GLXclientStateRec *cl, GLbyte *pc,
unsigned get_programiv_offset, unsigned get_program_string_offset,
Bool do_swap);
/**
* Handle both types of glGetProgramString calls.
*
* This single function handles both \c glGetProgramStringARB and
* \c glGetProgramStringNV. The dispatch offsets for the functions to use
* for \c glGetProgramivARB and \c glGetProgramStringARB are passed in by the
* caller. These can be the offsets of either the ARB versions or the NV
* versions.
*/
int DoGetProgramString(struct __GLXclientStateRec *cl, GLbyte *pc,
unsigned get_programiv_offset,
unsigned get_program_string_offset,
Bool do_swap)
{
xGLXVendorPrivateWithReplyReq * const req =
(xGLXVendorPrivateWithReplyReq *) pc;
int error;
__GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, & error);
ClientPtr client = cl->client;
pc += __GLX_VENDPRIV_HDR_SIZE;
if (cx != NULL) {
GLenum target;
GLenum pname;
GLint compsize = 0;
char *answer = NULL, answerBuffer[200];
if (do_swap) {
target = (GLenum) bswap_32(*(int *)(pc + 0));
pname = (GLenum) bswap_32(*(int *)(pc + 4));
}
else {
target = *(GLenum *)(pc + 0);
pname = *(GLuint *)(pc + 4);
}
/* The value of the GL_PROGRAM_LENGTH_ARB and GL_PROGRAM_LENGTH_NV
* enumerants is the same.
*/
CALL_by_offset(GET_DISPATCH(),
(void (GLAPIENTRYP)(GLuint, GLenum, GLint *)),
get_programiv_offset,
(target, GL_PROGRAM_LENGTH_ARB, &compsize));
if (compsize != 0) {
__GLX_GET_ANSWER_BUFFER(answer,cl,compsize,1);
__glXClearErrorOccured();
CALL_by_offset(GET_DISPATCH(),
(void (GLAPIENTRYP)(GLuint, GLenum, GLubyte *)),
get_program_string_offset,
(target, pname, answer));
}
if (__glXErrorOccured()) {
__GLX_BEGIN_REPLY(0);
__GLX_SEND_HEADER();
} else {
__GLX_BEGIN_REPLY(compsize);
((xGLXGetTexImageReply *)&__glXReply)->width = compsize;
__GLX_SEND_HEADER();
__GLX_SEND_VOID_ARRAY(compsize);
}
error = Success;
}
return error;
}
int __glXDisp_GetProgramStringARB(struct __GLXclientStateRec *cl, GLbyte *pc)
{
return DoGetProgramString(cl, pc, _gloffset_GetProgramivARB,
_gloffset_GetProgramStringARB, False);
}
int __glXDispSwap_GetProgramStringARB(struct __GLXclientStateRec *cl, GLbyte *pc)
{
return DoGetProgramString(cl, pc, _gloffset_GetProgramivARB,
_gloffset_GetProgramStringARB, True);
}
int __glXDisp_GetProgramStringNV(struct __GLXclientStateRec *cl, GLbyte *pc)
{
return DoGetProgramString(cl, pc, _gloffset_GetProgramivNV,
_gloffset_GetProgramStringNV, False);
}
int __glXDispSwap_GetProgramStringNV(struct __GLXclientStateRec *cl, GLbyte *pc)
{
return DoGetProgramString(cl, pc, _gloffset_GetProgramivNV,
_gloffset_GetProgramStringNV, True);
}

View File

@ -31,7 +31,7 @@
#include "indirect_size.h"
#include "indirect_reqsize.h"
#if defined(linux)
#if defined(__linux__) || defined (__GLIBC__) || defined(__GNU__)
# include <byteswap.h>
# define SWAP_32(v) do { (v) = bswap_32(v); } while(0)
#else

File diff suppressed because it is too large Load Diff

View File

@ -73,24 +73,27 @@ extern INTERNAL PURE FASTCALL GLint __glGetTexLevelParameterfv_size(GLenum);
extern INTERNAL PURE FASTCALL GLint __glGetTexLevelParameteriv_size(GLenum);
extern INTERNAL PURE FASTCALL GLint __glGetColorTableParameterfv_size(GLenum);
extern INTERNAL PURE FASTCALL GLint __glGetColorTableParameteriv_size(GLenum);
extern INTERNAL PURE FASTCALL GLint __glGetConvolutionParameterfv_size(GLenum);
extern INTERNAL PURE FASTCALL GLint __glGetConvolutionParameteriv_size(GLenum);
extern INTERNAL PURE FASTCALL GLint
__glGetConvolutionParameterfv_size(GLenum);
extern INTERNAL PURE FASTCALL GLint
__glGetConvolutionParameteriv_size(GLenum);
extern INTERNAL PURE FASTCALL GLint __glGetHistogramParameterfv_size(GLenum);
extern INTERNAL PURE FASTCALL GLint __glGetHistogramParameteriv_size(GLenum);
extern INTERNAL PURE FASTCALL GLint __glGetMinmaxParameterfv_size(GLenum);
extern INTERNAL PURE FASTCALL GLint __glGetMinmaxParameteriv_size(GLenum);
extern INTERNAL PURE FASTCALL GLint __glGetProgramivNV_size(GLenum);
extern INTERNAL PURE FASTCALL GLint __glGetProgramivARB_size(GLenum);
extern INTERNAL PURE FASTCALL GLint __glGetVertexAttribdvARB_size(GLenum);
extern INTERNAL PURE FASTCALL GLint __glGetVertexAttribfvARB_size(GLenum);
extern INTERNAL PURE FASTCALL GLint __glGetVertexAttribivARB_size(GLenum);
extern INTERNAL PURE FASTCALL GLint __glGetProgramivARB_size(GLenum);
extern INTERNAL PURE FASTCALL GLint __glGetQueryivARB_size(GLenum);
extern INTERNAL PURE FASTCALL GLint __glGetQueryObjectivARB_size(GLenum);
extern INTERNAL PURE FASTCALL GLint __glGetQueryObjectuivARB_size(GLenum);
extern INTERNAL PURE FASTCALL GLint __glGetQueryivARB_size(GLenum);
extern INTERNAL PURE FASTCALL GLint __glGetProgramivNV_size(GLenum);
extern INTERNAL PURE FASTCALL GLint __glGetVertexAttribdvNV_size(GLenum);
extern INTERNAL PURE FASTCALL GLint __glGetVertexAttribfvNV_size(GLenum);
extern INTERNAL PURE FASTCALL GLint __glGetVertexAttribivNV_size(GLenum);
extern INTERNAL PURE FASTCALL GLint __glGetFramebufferAttachmentParameterivEXT_size(GLenum);
extern INTERNAL PURE FASTCALL GLint
__glGetFramebufferAttachmentParameterivEXT_size(GLenum);
# undef PURE
# undef FASTCALL

1593
GL/glx/indirect_table.c Normal file

File diff suppressed because it is too large Load Diff

106
GL/glx/indirect_table.h Normal file
View File

@ -0,0 +1,106 @@
/*
* (C) Copyright IBM Corporation 2005, 2006
* All Rights Reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
* to deal in the Software without restriction, including without limitation
* the rights to use, copy, modify, merge, publish, distribute, sub license,
* and/or sell copies of the Software, and to permit persons to whom the
* Software is furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice (including the next
* paragraph) shall be included in all copies or substantial portions of the
* Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
* IBM,
* AND/OR THEIR SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
* OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/
/**
* \file indirect_table.h
*
* \author Ian Romanick <idr@us.ibm.com>
*/
#ifndef INDIRECT_TABLE_H
#define INDIRECT_TABLE_H
#include <inttypes.h>
/**
*/
struct __glXDispatchInfo {
/**
* Number of significant bits in the protocol opcode. Opcodes with values
* larger than ((1 << bits) - 1) are invalid.
*/
unsigned bits;
/**
*/
const int_fast16_t * dispatch_tree;
/**
* Array of protocol decode and dispatch functions index by the opcode
* search tree (i.e., \c dispatch_tree). The first element in each pair
* is the non-byte-swapped version, and the second element is the
* byte-swapped version.
*/
const void *(*dispatch_functions)[2];
/**
* Pointer to size validation data. This table is indexed with the same
* value as ::dispatch_functions.
*
* The first element in the pair is the size, in bytes, of the fixed-size
* portion of the protocol.
*
* For opcodes that have a variable-size portion, the second value is an
* index in \c size_func_table to calculate that size. If there is no
* variable-size portion, this index will be ~0.
*
* \note
* If size checking is not to be performed on this type of protocol
* data, this pointer will be \c NULL.
*/
const int_fast16_t (*size_table)[2];
/**
* Array of functions used to calculate the variable-size portion of
* protocol messages. Indexed by the second element of the entries
* in \c ::size_table.
*
* \note
* If size checking is not to be performed on this type of protocol
* data, this pointer will be \c NULL.
*/
const gl_proto_size_func *size_func_table;
};
/**
* Sentinel value for an empty leaf in the \c dispatch_tree.
*/
#define EMPTY_LEAF INT_FAST16_MIN
/**
* Declare the index \c x as a leaf index.
*/
#define LEAF(x) -x
/**
* Determine if an index is a leaf index.
*/
#define IS_LEAF_INDEX(x) ((x) <= 0)
extern const struct __glXDispatchInfo Single_dispatch_info;
extern const struct __glXDispatchInfo Render_dispatch_info;
extern const struct __glXDispatchInfo VendorPriv_dispatch_info;
#endif /* INDIRECT_TABLE_H */

View File

@ -0,0 +1,133 @@
/*
* (C) Copyright IBM Corporation 2005, 2006
* All Rights Reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
* to deal in the Software without restriction, including without limitation
* the rights to use, copy, modify, merge, publish, distribute, sub license,
* and/or sell copies of the Software, and to permit persons to whom the
* Software is furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice (including the next
* paragraph) shall be included in all copies or substantial portions of the
* Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
* IBM,
* AND/OR THEIR SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
* OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/
#define NEED_REPLIES
#ifdef HAVE_DIX_CONFIG_H
#include <dix-config.h>
#endif
#include "glxserver.h"
#include "glxext.h"
#include "singlesize.h"
#include "unpack.h"
#include "indirect_size_get.h"
#include "indirect_dispatch.h"
#include "glapitable.h"
#include "glapi.h"
#include "glthread.h"
#include "dispatch.h"
#if defined(__linux__) || defined (__GLIBC__) || defined (__GNU__)
#include <byteswap.h>
#elif defined(__OpenBSD__)
#include <sys/endian.h>
#define bswap_16 __swap16
#define bswap_32 __swap32
#define bswap_64 __swap64
#else
#include <sys/endian.h>
#define bswap_16 bswap16
#define bswap_32 bswap32
#define bswap_64 bswap64
#endif
int __glXDisp_GetCompressedTexImageARB(struct __GLXclientStateRec *cl, GLbyte *pc)
{
xGLXSingleReq * const req = (xGLXSingleReq *) pc;
int error;
__GLXcontext * const cx = __glXForceCurrent( cl, req->contextTag, & error );
ClientPtr client = cl->client;
pc += __GLX_SINGLE_HDR_SIZE;
if ( cx != NULL ) {
const GLenum target = *(GLenum *)(pc + 0);
const GLint level = *(GLint *)(pc + 4);
GLint compsize = 0;
char *answer, answerBuffer[200];
CALL_GetTexLevelParameteriv(GET_DISPATCH(), (target, level, GL_TEXTURE_COMPRESSED_IMAGE_SIZE, &compsize));
if ( compsize != 0 ) {
__GLX_GET_ANSWER_BUFFER(answer,cl,compsize,1);
__glXClearErrorOccured();
CALL_GetCompressedTexImageARB(GET_DISPATCH(), (target, level, answer));
}
if (__glXErrorOccured()) {
__GLX_BEGIN_REPLY(0);
__GLX_SEND_HEADER();
} else {
__GLX_BEGIN_REPLY(compsize);
((xGLXGetTexImageReply *)&__glXReply)->width = compsize;
__GLX_SEND_HEADER();
__GLX_SEND_VOID_ARRAY(compsize);
}
error = Success;
}
return error;
}
int __glXDispSwap_GetCompressedTexImageARB(struct __GLXclientStateRec *cl, GLbyte *pc)
{
xGLXSingleReq * const req = (xGLXSingleReq *) pc;
int error;
__GLXcontext * const cx = __glXForceCurrent( cl, bswap_32( req->contextTag ), & error );
ClientPtr client = cl->client;
pc += __GLX_SINGLE_HDR_SIZE;
if ( cx != NULL ) {
const GLenum target = (GLenum) bswap_32( *(int *)(pc + 0) );
const GLint level = (GLint ) bswap_32( *(int *)(pc + 4) );
GLint compsize = 0;
char *answer, answerBuffer[200];
CALL_GetTexLevelParameteriv(GET_DISPATCH(), (target, level, GL_TEXTURE_COMPRESSED_IMAGE_SIZE, &compsize));
if ( compsize != 0 ) {
__GLX_GET_ANSWER_BUFFER(answer,cl,compsize,1);
__glXClearErrorOccured();
CALL_GetCompressedTexImageARB(GET_DISPATCH(), (target, level, answer));
}
if (__glXErrorOccured()) {
__GLX_BEGIN_REPLY(0);
__GLX_SEND_HEADER();
} else {
__GLX_BEGIN_REPLY(compsize);
((xGLXGetTexImageReply *)&__glXReply)->width = compsize;
__GLX_SEND_HEADER();
__GLX_SEND_VOID_ARRAY(compsize);
}
error = Success;
}
return error;
}

View File

@ -28,7 +28,7 @@
#include <X11/Xmd.h>
#include <GL/gl.h>
#include <GL/glxproto.h>
#ifdef __linux__
#if defined(__linux__) || defined (__GLIBC__) || defined(__GNU__)
#include <byteswap.h>
#elif defined(__OpenBSD__)
#include <sys/endian.h>
@ -52,6 +52,7 @@
#include "glthread.h"
#include "dispatch.h"
#include "glxext.h"
#include "indirect_table.h"
#include "indirect_util.h"
@ -185,8 +186,8 @@ __glXSendReplySwap( ClientPtr client, const void * data, size_t elements,
}
__glXReply.length = bswap_32( reply_ints );
__glXReply.type = bswap_32( X_Reply );
__glXReply.sequenceNumber = bswap_32( client->sequence );
__glXReply.type = X_Reply;
__glXReply.sequenceNumber = bswap_16( client->sequence );
__glXReply.size = bswap_32( elements );
__glXReply.retval = bswap_32( retval );
@ -204,3 +205,114 @@ __glXSendReplySwap( ClientPtr client, const void * data, size_t elements,
WriteToClient( client, reply_ints * 4, (char *) data );
}
}
static int
get_decode_index(const struct __glXDispatchInfo *dispatch_info,
unsigned opcode)
{
int remaining_bits;
int next_remain;
const int_fast16_t * const tree = dispatch_info->dispatch_tree;
int_fast16_t index;
remaining_bits = dispatch_info->bits;
if (opcode >= (1U << remaining_bits)) {
return -1;
}
index = 0;
for (/* empty */; remaining_bits > 0; remaining_bits = next_remain) {
unsigned mask;
unsigned child_index;
/* Calculate the slice of bits used by this node.
*
* If remaining_bits = 8 and tree[index] = 3, the mask of just the
* remaining bits is 0x00ff and the mask for the remaining bits after
* this node is 0x001f. By taking 0x00ff & ~0x001f, we get 0x00e0.
* This masks the 3 bits that we would want for this node.
*/
next_remain = remaining_bits - tree[index];
mask = ((1 << remaining_bits) - 1) &
~((1 << next_remain) - 1);
/* Using the mask, calculate the index of the opcode in the node.
* With that index, fetch the index of the next node.
*/
child_index = (opcode & mask) >> next_remain;
index = tree[index + 1 + child_index];
/* If the next node is an empty leaf, the opcode is for a non-existant
* function. We're done.
*
* If the next node is a non-empty leaf, look up the function pointer
* and return it.
*/
if (index == EMPTY_LEAF) {
return -1;
}
else if (IS_LEAF_INDEX(index)) {
unsigned func_index;
/* The value stored in the tree for a leaf node is the base of
* the function pointers for that leaf node. The offset for the
* function for a particular opcode is the remaining bits in the
* opcode.
*/
func_index = -index;
func_index += opcode & ((1 << next_remain) - 1);
return func_index;
}
}
/* We should *never* get here!!!
*/
return -1;
}
void *
__glXGetProtocolDecodeFunction(const struct __glXDispatchInfo *dispatch_info,
int opcode, int swapped_version)
{
const int func_index = get_decode_index(dispatch_info, opcode);
return (func_index < 0)
? NULL
: (void *) dispatch_info->dispatch_functions[func_index][swapped_version];
}
int
__glXGetProtocolSizeData(const struct __glXDispatchInfo *dispatch_info,
int opcode, __GLXrenderSizeData *data)
{
if (dispatch_info->size_table != NULL) {
const int func_index = get_decode_index(dispatch_info, opcode);
if ((func_index >= 0)
&& (dispatch_info->size_table[func_index][0] != 0)) {
const int var_offset =
dispatch_info->size_table[func_index][1];
data->bytes = dispatch_info->size_table[func_index][0];
data->varsize = (var_offset != ~0)
? dispatch_info->size_func_table[var_offset]
: NULL;
return 0;
}
}
return -1;
}

View File

@ -40,4 +40,14 @@ extern void __glXSendReplySwap( ClientPtr client, const void * data,
size_t elements, size_t element_size, GLboolean always_array,
CARD32 retval );
struct __glXDispatchInfo;
extern void *__glXGetProtocolDecodeFunction(
const struct __glXDispatchInfo *dispatch_info, int opcode,
int swapped_version);
extern int __glXGetProtocolSizeData(
const struct __glXDispatchInfo *dispatch_info, int opcode,
__GLXrenderSizeData *data);
#endif /* __GLX_INDIRECT_UTIL_H__ */

View File

@ -1,4 +1,3 @@
/* $XFree86: xc/programs/Xserver/GL/glx/render2.c,v 1.8 2004/02/03 23:04:08 alanh Exp $ */
/*
** License Applicability. Except to the extent portions of this file are
** made subject to an alternative license as permitted in the SGI Free

View File

@ -1,4 +1,3 @@
/* $XFree86: xc/programs/Xserver/GL/glx/render2swap.c,v 1.6 2002/01/14 22:47:08 tsi Exp $ */
/*
** License Applicability. Except to the extent portions of this file are
** made subject to an alternative license as permitted in the SGI Free

View File

@ -1,4 +1,3 @@
/* $XFree86: xc/programs/Xserver/GL/glx/rensize.c,v 1.6 2003/09/28 20:15:43 alanh Exp $ */
/*
** License Applicability. Except to the extent portions of this file are
** made subject to an alternative license as permitted in the SGI Free
@ -324,7 +323,7 @@ int __glXTypeSize(GLenum enm)
}
}
int __glXDrawArraysSize( const GLbyte *pc, Bool swap )
int __glXDrawArraysReqSize( const GLbyte *pc, Bool swap )
{
__GLXdispatchDrawArraysHeader *hdr = (__GLXdispatchDrawArraysHeader *) pc;
__GLXdispatchDrawArraysComponentHeader *compHeader;

File diff suppressed because it is too large Load Diff

View File

@ -1,4 +1,3 @@
/* $XFree86: xc/programs/Xserver/GL/glx/single2.c,v 1.8 2004/02/10 22:54:15 alanh Exp $ */
/*
** License Applicability. Except to the extent portions of this file are
** made subject to an alternative license as permitted in the SGI Free

View File

@ -1,4 +1,3 @@
/* $XFree86: xc/programs/Xserver/GL/glx/single2swap.c,v 1.7 2002/01/14 22:47:08 tsi Exp $ */
/*
** License Applicability. Except to the extent portions of this file are
** made subject to an alternative license as permitted in the SGI Free

View File

@ -195,7 +195,7 @@ int __glXDisp_GetPolygonStipple(__GLXclientState *cl, GLbyte *pc)
return Success;
}
int __glXDisp_GetSeparableFilter(__GLXclientState *cl, GLbyte *pc)
static int GetSeparableFilter(__GLXclientState *cl, GLbyte *pc, GLXContextTag tag)
{
GLint compsize, compsize2;
GLenum format, type, target;
@ -206,12 +206,11 @@ int __glXDisp_GetSeparableFilter(__GLXclientState *cl, GLbyte *pc)
char *answer, answerBuffer[200];
GLint width=0, height=0;
cx = __glXForceCurrent(cl, __GLX_GET_SINGLE_CONTEXT_TAG(pc), &error);
cx = __glXForceCurrent(cl, tag, &error);
if (!cx) {
return error;
}
pc += __GLX_SINGLE_HDR_SIZE;
format = *(GLenum *)(pc + 4);
type = *(GLenum *)(pc + 8);
target = *(GLenum *)(pc + 0);
@ -220,8 +219,8 @@ int __glXDisp_GetSeparableFilter(__GLXclientState *cl, GLbyte *pc)
/* target must be SEPARABLE_2D, however I guess we can let the GL
barf on this one.... */
CALL_GetConvolutionParameteriv( GET_DISPATCH(), (target, GL_CONVOLUTION_WIDTH, &width) );
CALL_GetConvolutionParameteriv( GET_DISPATCH(), (target, GL_CONVOLUTION_HEIGHT, &height) );
CALL_GetConvolutionParameteriv(GET_DISPATCH(), (target, GL_CONVOLUTION_WIDTH, &width));
CALL_GetConvolutionParameteriv(GET_DISPATCH(), (target, GL_CONVOLUTION_HEIGHT, &height));
/*
* The two queries above might fail if we're in a state where queries
* are illegal, but then width and height would still be zero anyway.
@ -234,7 +233,7 @@ int __glXDisp_GetSeparableFilter(__GLXclientState *cl, GLbyte *pc)
compsize = __GLX_PAD(compsize);
compsize2 = __GLX_PAD(compsize2);
CALL_PixelStorei( GET_DISPATCH(), (GL_PACK_SWAP_BYTES, swapBytes) );
CALL_PixelStorei(GET_DISPATCH(), (GL_PACK_SWAP_BYTES, swapBytes));
__GLX_GET_ANSWER_BUFFER(answer,cl,compsize + compsize2,1);
__glXClearErrorOccured();
CALL_GetSeparableFilter( GET_DISPATCH(), (
@ -260,7 +259,22 @@ int __glXDisp_GetSeparableFilter(__GLXclientState *cl, GLbyte *pc)
return Success;
}
int __glXDisp_GetConvolutionFilter(__GLXclientState *cl, GLbyte *pc)
int __glXDisp_GetSeparableFilter(__GLXclientState *cl, GLbyte *pc)
{
const GLXContextTag tag = __GLX_GET_SINGLE_CONTEXT_TAG(pc);
return GetSeparableFilter(cl, pc + __GLX_SINGLE_HDR_SIZE, tag);
}
int __glXDisp_GetSeparableFilterEXT(__GLXclientState *cl, GLbyte *pc)
{
const GLXContextTag tag = __GLX_GET_VENDPRIV_CONTEXT_TAG(pc);
return GetSeparableFilter(cl, pc + __GLX_VENDPRIV_HDR_SIZE, tag);
}
static int GetConvolutionFilter(__GLXclientState *cl, GLbyte *pc,
GLXContextTag tag)
{
GLint compsize;
GLenum format, type, target;
@ -271,22 +285,23 @@ int __glXDisp_GetConvolutionFilter(__GLXclientState *cl, GLbyte *pc)
char *answer, answerBuffer[200];
GLint width=0, height=0;
cx = __glXForceCurrent(cl, __GLX_GET_SINGLE_CONTEXT_TAG(pc), &error);
cx = __glXForceCurrent(cl, tag, &error);
if (!cx) {
return error;
}
pc += __GLX_SINGLE_HDR_SIZE;
format = *(GLenum *)(pc + 4);
type = *(GLenum *)(pc + 8);
target = *(GLenum *)(pc + 0);
swapBytes = *(GLboolean *)(pc + 12);
CALL_GetConvolutionParameteriv( GET_DISPATCH(), (target, GL_CONVOLUTION_WIDTH, &width) );
CALL_GetConvolutionParameteriv(GET_DISPATCH(),
(target, GL_CONVOLUTION_WIDTH, &width));
if (target == GL_CONVOLUTION_1D) {
height = 1;
} else {
CALL_GetConvolutionParameteriv( GET_DISPATCH(), (target, GL_CONVOLUTION_HEIGHT, &height) );
CALL_GetConvolutionParameteriv(GET_DISPATCH(),
(target, GL_CONVOLUTION_HEIGHT, &height));
}
/*
* The two queries above might fail if we're in a state where queries
@ -295,7 +310,7 @@ int __glXDisp_GetConvolutionFilter(__GLXclientState *cl, GLbyte *pc)
compsize = __glGetTexImage_size(target,1,format,type,width,height,1);
if (compsize < 0) compsize = 0;
CALL_PixelStorei( GET_DISPATCH(), (GL_PACK_SWAP_BYTES, swapBytes) );
CALL_PixelStorei(GET_DISPATCH(), (GL_PACK_SWAP_BYTES, swapBytes));
__GLX_GET_ANSWER_BUFFER(answer,cl,compsize,1);
__glXClearErrorOccured();
CALL_GetConvolutionFilter( GET_DISPATCH(), (
@ -319,7 +334,21 @@ int __glXDisp_GetConvolutionFilter(__GLXclientState *cl, GLbyte *pc)
return Success;
}
int __glXDisp_GetHistogram(__GLXclientState *cl, GLbyte *pc)
int __glXDisp_GetConvolutionFilter(__GLXclientState *cl, GLbyte *pc)
{
const GLXContextTag tag = __GLX_GET_SINGLE_CONTEXT_TAG(pc);
return GetConvolutionFilter(cl, pc + __GLX_SINGLE_HDR_SIZE, tag);
}
int __glXDisp_GetConvolutionFilterEXT(__GLXclientState *cl, GLbyte *pc)
{
const GLXContextTag tag = __GLX_GET_VENDPRIV_CONTEXT_TAG(pc);
return GetConvolutionFilter(cl, pc + __GLX_VENDPRIV_HDR_SIZE, tag);
}
static int GetHistogram(__GLXclientState *cl, GLbyte *pc, GLXContextTag tag)
{
GLint compsize;
GLenum format, type, target;
@ -330,19 +359,19 @@ int __glXDisp_GetHistogram(__GLXclientState *cl, GLbyte *pc)
char *answer, answerBuffer[200];
GLint width=0;
cx = __glXForceCurrent(cl, __GLX_GET_SINGLE_CONTEXT_TAG(pc), &error);
cx = __glXForceCurrent(cl, tag, &error);
if (!cx) {
return error;
}
pc += __GLX_SINGLE_HDR_SIZE;
format = *(GLenum *)(pc + 4);
type = *(GLenum *)(pc + 8);
target = *(GLenum *)(pc + 0);
swapBytes = *(GLboolean *)(pc + 12);
reset = *(GLboolean *)(pc + 13);
CALL_GetHistogramParameteriv( GET_DISPATCH(), (target, GL_HISTOGRAM_WIDTH, &width) );
CALL_GetHistogramParameteriv(GET_DISPATCH(),
(target, GL_HISTOGRAM_WIDTH, &width));
/*
* The one query above might fail if we're in a state where queries
* are illegal, but then width would still be zero anyway.
@ -350,10 +379,10 @@ int __glXDisp_GetHistogram(__GLXclientState *cl, GLbyte *pc)
compsize = __glGetTexImage_size(target,1,format,type,width,1,1);
if (compsize < 0) compsize = 0;
CALL_PixelStorei( GET_DISPATCH(), (GL_PACK_SWAP_BYTES, swapBytes) );
CALL_PixelStorei(GET_DISPATCH(), (GL_PACK_SWAP_BYTES, swapBytes));
__GLX_GET_ANSWER_BUFFER(answer,cl,compsize,1);
__glXClearErrorOccured();
CALL_GetHistogram( GET_DISPATCH(), (target, reset, format, type, answer) );
CALL_GetHistogram(GET_DISPATCH(), (target, reset, format, type, answer));
if (__glXErrorOccured()) {
__GLX_BEGIN_REPLY(0);
@ -368,7 +397,21 @@ int __glXDisp_GetHistogram(__GLXclientState *cl, GLbyte *pc)
return Success;
}
int __glXDisp_GetMinmax(__GLXclientState *cl, GLbyte *pc)
int __glXDisp_GetHistogram(__GLXclientState *cl, GLbyte *pc)
{
const GLXContextTag tag = __GLX_GET_SINGLE_CONTEXT_TAG(pc);
return GetHistogram(cl, pc + __GLX_SINGLE_HDR_SIZE, tag);
}
int __glXDisp_GetHistogramEXT(__GLXclientState *cl, GLbyte *pc)
{
const GLXContextTag tag = __GLX_GET_VENDPRIV_CONTEXT_TAG(pc);
return GetHistogram(cl, pc + __GLX_VENDPRIV_HDR_SIZE, tag);
}
static int GetMinmax(__GLXclientState *cl, GLbyte *pc, GLXContextTag tag)
{
GLint compsize;
GLenum format, type, target;
@ -378,12 +421,11 @@ int __glXDisp_GetMinmax(__GLXclientState *cl, GLbyte *pc)
int error;
char *answer, answerBuffer[200];
cx = __glXForceCurrent(cl, __GLX_GET_SINGLE_CONTEXT_TAG(pc), &error);
cx = __glXForceCurrent(cl, tag, &error);
if (!cx) {
return error;
}
pc += __GLX_SINGLE_HDR_SIZE;
format = *(GLenum *)(pc + 4);
type = *(GLenum *)(pc + 8);
target = *(GLenum *)(pc + 0);
@ -393,10 +435,10 @@ int __glXDisp_GetMinmax(__GLXclientState *cl, GLbyte *pc)
compsize = __glGetTexImage_size(target,1,format,type,2,1,1);
if (compsize < 0) compsize = 0;
CALL_PixelStorei( GET_DISPATCH(), (GL_PACK_SWAP_BYTES, swapBytes) );
CALL_PixelStorei(GET_DISPATCH(), (GL_PACK_SWAP_BYTES, swapBytes));
__GLX_GET_ANSWER_BUFFER(answer,cl,compsize,1);
__glXClearErrorOccured();
CALL_GetMinmax( GET_DISPATCH(), (target, reset, format, type, answer) );
CALL_GetMinmax(GET_DISPATCH(), (target, reset, format, type, answer));
if (__glXErrorOccured()) {
__GLX_BEGIN_REPLY(0);
@ -410,7 +452,21 @@ int __glXDisp_GetMinmax(__GLXclientState *cl, GLbyte *pc)
return Success;
}
int __glXDisp_GetColorTable(__GLXclientState *cl, GLbyte *pc)
int __glXDisp_GetMinmax(__GLXclientState *cl, GLbyte *pc)
{
const GLXContextTag tag = __GLX_GET_SINGLE_CONTEXT_TAG(pc);
return GetMinmax(cl, pc + __GLX_SINGLE_HDR_SIZE, tag);
}
int __glXDisp_GetMinmaxEXT(__GLXclientState *cl, GLbyte *pc)
{
const GLXContextTag tag = __GLX_GET_VENDPRIV_CONTEXT_TAG(pc);
return GetMinmax(cl, pc + __GLX_VENDPRIV_HDR_SIZE, tag);
}
static int GetColorTable(__GLXclientState *cl, GLbyte *pc, GLXContextTag tag)
{
GLint compsize;
GLenum format, type, target;
@ -421,18 +477,18 @@ int __glXDisp_GetColorTable(__GLXclientState *cl, GLbyte *pc)
char *answer, answerBuffer[200];
GLint width=0;
cx = __glXForceCurrent(cl, __GLX_GET_SINGLE_CONTEXT_TAG(pc), &error);
cx = __glXForceCurrent(cl, tag, &error);
if (!cx) {
return error;
}
pc += __GLX_SINGLE_HDR_SIZE;
target = *(GLenum *)(pc + 0);
format = *(GLenum *)(pc + 4);
type = *(GLenum *)(pc + 8);
swapBytes = *(GLboolean *)(pc + 12);
CALL_GetColorTableParameteriv( GET_DISPATCH(), (target, GL_COLOR_TABLE_WIDTH, &width) );
CALL_GetColorTableParameteriv(GET_DISPATCH(),
(target, GL_COLOR_TABLE_WIDTH, &width));
/*
* The one query above might fail if we're in a state where queries
* are illegal, but then width would still be zero anyway.
@ -440,7 +496,7 @@ int __glXDisp_GetColorTable(__GLXclientState *cl, GLbyte *pc)
compsize = __glGetTexImage_size(target,1,format,type,width,1,1);
if (compsize < 0) compsize = 0;
CALL_PixelStorei( GET_DISPATCH(), (GL_PACK_SWAP_BYTES, swapBytes) );
CALL_PixelStorei(GET_DISPATCH(), (GL_PACK_SWAP_BYTES, swapBytes));
__GLX_GET_ANSWER_BUFFER(answer,cl,compsize,1);
__glXClearErrorOccured();
CALL_GetColorTable( GET_DISPATCH(), (
@ -462,3 +518,17 @@ int __glXDisp_GetColorTable(__GLXclientState *cl, GLbyte *pc)
return Success;
}
int __glXDisp_GetColorTable(__GLXclientState *cl, GLbyte *pc)
{
const GLXContextTag tag = __GLX_GET_SINGLE_CONTEXT_TAG(pc);
return GetColorTable(cl, pc + __GLX_SINGLE_HDR_SIZE, tag);
}
int __glXDisp_GetColorTableSGI(__GLXclientState *cl, GLbyte *pc)
{
const GLXContextTag tag = __GLX_GET_VENDPRIV_CONTEXT_TAG(pc);
return GetColorTable(cl, pc + __GLX_VENDPRIV_HDR_SIZE, tag);
}

View File

@ -1,4 +1,3 @@
/* $XFree86: xc/programs/Xserver/GL/glx/singlepixswap.c,v 1.5 2001/03/21 16:29:37 dawes Exp $ */
/*
** License Applicability. Except to the extent portions of this file are
** made subject to an alternative license as permitted in the SGI Free
@ -220,7 +219,7 @@ int __glXDispSwap_GetPolygonStipple(__GLXclientState *cl, GLbyte *pc)
return Success;
}
int __glXDispSwap_GetSeparableFilter(__GLXclientState *cl, GLbyte *pc)
static int GetSeparableFilter(__GLXclientState *cl, GLbyte *pc, GLXContextTag tag)
{
GLint compsize, compsize2;
GLenum format, type, target;
@ -232,12 +231,11 @@ int __glXDispSwap_GetSeparableFilter(__GLXclientState *cl, GLbyte *pc)
char *answer, answerBuffer[200];
GLint width=0, height=0;
cx = __glXForceCurrent(cl, __GLX_GET_SINGLE_CONTEXT_TAG(pc), &error);
cx = __glXForceCurrent(cl, tag, &error);
if (!cx) {
return error;
}
pc += __GLX_SINGLE_HDR_SIZE;
__GLX_SWAP_INT(pc+0);
__GLX_SWAP_INT(pc+4);
__GLX_SWAP_INT(pc+8);
@ -292,7 +290,21 @@ int __glXDispSwap_GetSeparableFilter(__GLXclientState *cl, GLbyte *pc)
return Success;
}
int __glXDispSwap_GetConvolutionFilter(__GLXclientState *cl, GLbyte *pc)
int __glXDispSwap_GetSeparableFilter(__GLXclientState *cl, GLbyte *pc)
{
const GLXContextTag tag = __GLX_GET_SINGLE_CONTEXT_TAG(pc);
return GetSeparableFilter(cl, pc + __GLX_SINGLE_HDR_SIZE, tag);
}
int __glXDispSwap_GetSeparableFilterEXT(__GLXclientState *cl, GLbyte *pc)
{
const GLXContextTag tag = __GLX_GET_VENDPRIV_CONTEXT_TAG(pc);
return GetSeparableFilter(cl, pc + __GLX_VENDPRIV_HDR_SIZE, tag);
}
static int GetConvolutionFilter(__GLXclientState *cl, GLbyte *pc, GLXContextTag tag)
{
GLint compsize;
GLenum format, type, target;
@ -304,12 +316,11 @@ int __glXDispSwap_GetConvolutionFilter(__GLXclientState *cl, GLbyte *pc)
char *answer, answerBuffer[200];
GLint width=0, height=0;
cx = __glXForceCurrent(cl, __GLX_GET_SINGLE_CONTEXT_TAG(pc), &error);
cx = __glXForceCurrent(cl, tag, &error);
if (!cx) {
return error;
}
pc += __GLX_SINGLE_HDR_SIZE;
__GLX_SWAP_INT(pc+0);
__GLX_SWAP_INT(pc+4);
__GLX_SWAP_INT(pc+8);
@ -358,7 +369,21 @@ int __glXDispSwap_GetConvolutionFilter(__GLXclientState *cl, GLbyte *pc)
return Success;
}
int __glXDispSwap_GetHistogram(__GLXclientState *cl, GLbyte *pc)
int __glXDispSwap_GetConvolutionFilter(__GLXclientState *cl, GLbyte *pc)
{
const GLXContextTag tag = __GLX_GET_SINGLE_CONTEXT_TAG(pc);
return GetConvolutionFilter(cl, pc + __GLX_SINGLE_HDR_SIZE, tag);
}
int __glXDispSwap_GetConvolutionFilterEXT(__GLXclientState *cl, GLbyte *pc)
{
const GLXContextTag tag = __GLX_GET_VENDPRIV_CONTEXT_TAG(pc);
return GetConvolutionFilter(cl, pc + __GLX_VENDPRIV_HDR_SIZE, tag);
}
static int GetHistogram(__GLXclientState *cl, GLbyte *pc, GLXContextTag tag)
{
GLint compsize;
GLenum format, type, target;
@ -370,12 +395,11 @@ int __glXDispSwap_GetHistogram(__GLXclientState *cl, GLbyte *pc)
char *answer, answerBuffer[200];
GLint width=0;
cx = __glXForceCurrent(cl, __GLX_GET_SINGLE_CONTEXT_TAG(pc), &error);
cx = __glXForceCurrent(cl, tag, &error);
if (!cx) {
return error;
}
pc += __GLX_SINGLE_HDR_SIZE;
__GLX_SWAP_INT(pc+0);
__GLX_SWAP_INT(pc+4);
__GLX_SWAP_INT(pc+8);
@ -413,7 +437,21 @@ int __glXDispSwap_GetHistogram(__GLXclientState *cl, GLbyte *pc)
return Success;
}
int __glXDispSwap_GetMinmax(__GLXclientState *cl, GLbyte *pc)
int __glXDispSwap_GetHistogram(__GLXclientState *cl, GLbyte *pc)
{
const GLXContextTag tag = __GLX_GET_SINGLE_CONTEXT_TAG(pc);
return GetHistogram(cl, pc + __GLX_SINGLE_HDR_SIZE, tag);
}
int __glXDispSwap_GetHistogramEXT(__GLXclientState *cl, GLbyte *pc)
{
const GLXContextTag tag = __GLX_GET_VENDPRIV_CONTEXT_TAG(pc);
return GetHistogram(cl, pc + __GLX_VENDPRIV_HDR_SIZE, tag);
}
static int GetMinmax(__GLXclientState *cl, GLbyte *pc, GLXContextTag tag)
{
GLint compsize;
GLenum format, type, target;
@ -424,12 +462,11 @@ int __glXDispSwap_GetMinmax(__GLXclientState *cl, GLbyte *pc)
__GLX_DECLARE_SWAP_VARIABLES;
char *answer, answerBuffer[200];
cx = __glXForceCurrent(cl, __GLX_GET_SINGLE_CONTEXT_TAG(pc), &error);
cx = __glXForceCurrent(cl, tag, &error);
if (!cx) {
return error;
}
pc += __GLX_SINGLE_HDR_SIZE;
__GLX_SWAP_INT(pc+0);
__GLX_SWAP_INT(pc+4);
__GLX_SWAP_INT(pc+8);
@ -460,7 +497,21 @@ int __glXDispSwap_GetMinmax(__GLXclientState *cl, GLbyte *pc)
return Success;
}
int __glXDispSwap_GetColorTable(__GLXclientState *cl, GLbyte *pc)
int __glXDispSwap_GetMinmax(__GLXclientState *cl, GLbyte *pc)
{
const GLXContextTag tag = __GLX_GET_SINGLE_CONTEXT_TAG(pc);
return GetMinmax(cl, pc + __GLX_SINGLE_HDR_SIZE, tag);
}
int __glXDispSwap_GetMinmaxEXT(__GLXclientState *cl, GLbyte *pc)
{
const GLXContextTag tag = __GLX_GET_VENDPRIV_CONTEXT_TAG(pc);
return GetMinmax(cl, pc + __GLX_VENDPRIV_HDR_SIZE, tag);
}
static int GetColorTable(__GLXclientState *cl, GLbyte *pc, GLXContextTag tag)
{
GLint compsize;
GLenum format, type, target;
@ -472,12 +523,11 @@ int __glXDispSwap_GetColorTable(__GLXclientState *cl, GLbyte *pc)
char *answer, answerBuffer[200];
GLint width=0;
cx = __glXForceCurrent(cl, __GLX_GET_SINGLE_CONTEXT_TAG(pc), &error);
cx = __glXForceCurrent(cl, tag, &error);
if (!cx) {
return error;
}
pc += __GLX_SINGLE_HDR_SIZE;
__GLX_SWAP_INT(pc+0);
__GLX_SWAP_INT(pc+4);
__GLX_SWAP_INT(pc+8);
@ -518,3 +568,17 @@ int __glXDispSwap_GetColorTable(__GLXclientState *cl, GLbyte *pc)
return Success;
}
int __glXDispSwap_GetColorTable(__GLXclientState *cl, GLbyte *pc)
{
const GLXContextTag tag = __GLX_GET_SINGLE_CONTEXT_TAG(pc);
return GetColorTable(cl, pc + __GLX_SINGLE_HDR_SIZE, tag);
}
int __glXDispSwap_GetColorTableSGI(__GLXclientState *cl, GLbyte *pc)
{
const GLXContextTag tag = __GLX_GET_VENDPRIV_CONTEXT_TAG(pc);
return GetColorTable(cl, pc + __GLX_VENDPRIV_HDR_SIZE, tag);
}

View File

@ -1,4 +1,3 @@
/* $XFree86: xc/programs/Xserver/GL/glx/singlesize.c,v 1.7tsi Exp $ */
/*
** License Applicability. Except to the extent portions of this file are
** made subject to an alternative license as permitted in the SGI Free

105
GL/glx/swap_interval.c Normal file
View File

@ -0,0 +1,105 @@
/*
* (C) Copyright IBM Corporation 2006
* All Rights Reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
* to deal in the Software without restriction, including without limitation
* on the rights to use, copy, modify, merge, publish, distribute, sub
* license, and/or sell copies of the Software, and to permit persons to whom
* the Software is furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice (including the next
* paragraph) shall be included in all copies or substantial portions of the
* Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
* THE COPYRIGHT HOLDERS AND/OR THEIR SUPPLIERS BE LIABLE FOR ANY CLAIM,
* DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
* OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
* USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
#define NEED_REPLIES
#ifdef HAVE_DIX_CONFIG_H
#include <dix-config.h>
#endif
#include "glxserver.h"
#include "glxutil.h"
#include "glxext.h"
#include "singlesize.h"
#include "unpack.h"
#include "indirect_size_get.h"
#include "indirect_dispatch.h"
#include "glapitable.h"
#include "glapi.h"
#include "glthread.h"
#include "dispatch.h"
#include "glapioffsets.h"
#if defined(__linux__) || defined (__GLIBC__) || defined (__GNU__)
#include <byteswap.h>
#elif defined(__OpenBSD__)
#include <sys/endian.h>
#define bswap_16 __swap16
#define bswap_32 __swap32
#define bswap_64 __swap64
#else
#include <sys/endian.h>
#define bswap_16 bswap16
#define bswap_32 bswap32
#define bswap_64 bswap64
#endif
static int DoSwapInterval(__GLXclientState *cl, GLbyte *pc, int do_swap);
int DoSwapInterval(__GLXclientState *cl, GLbyte *pc, int do_swap)
{
xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc;
ClientPtr client = cl->client;
const GLXContextTag tag = req->contextTag;
__GLXcontext *cx;
GLint interval;
cx = __glXLookupContextByTag(cl, tag);
LogMessage(X_ERROR, "%s: cx = %p, GLX screen = %p\n", __func__,
cx, (cx == NULL) ? NULL : cx->pGlxScreen);
if ((cx == NULL) || (cx->pGlxScreen == NULL)) {
client->errorValue = tag;
return __glXError(GLXBadContext);
}
if (cx->pGlxScreen->swapInterval == NULL) {
LogMessage(X_ERROR, "AIGLX: cx->pGlxScreen->swapInterval == NULL\n");
client->errorValue = tag;
return __glXError(GLXUnsupportedPrivateRequest);
}
if (cx->drawPriv == NULL) {
client->errorValue = tag;
return __glXError(GLXBadDrawable);
}
pc += __GLX_VENDPRIV_HDR_SIZE;
interval = (do_swap)
? bswap_32(*(int *)(pc + 0))
: *(int *)(pc + 0);
(void) (*cx->pGlxScreen->swapInterval)(cx->drawPriv, interval);
return Success;
}
int __glXDisp_SwapIntervalSGI(__GLXclientState *cl, GLbyte *pc)
{
return DoSwapInterval(cl, pc, 0);
}
int __glXDispSwap_SwapIntervalSGI(__GLXclientState *cl, GLbyte *pc)
{
return DoSwapInterval(cl, pc, 1);
}

View File

@ -1,4 +1,3 @@
/* $XFree86: xc/programs/Xserver/GL/glx/unpack.h,v 1.4 2002/01/14 22:47:08 tsi Exp $ */
#ifdef HAVE_DIX_CONFIG_H
#include <dix-config.h>
#endif

View File

@ -47,6 +47,7 @@
#include "glapi.h"
#include "glthread.h"
#include "dispatch.h"
#include "indirect_dispatch.h"
#include <GL/gl.h>
#include <pixmapstr.h>
#include <windowstr.h>
@ -156,7 +157,7 @@ MakeBitmapsFromFont(FontPtr pFont, int first, int count, int list_base)
/************************************************************************/
int __glXUseXFont(__GLXclientState *cl, GLbyte *pc)
int __glXDisp_UseXFont(__GLXclientState *cl, GLbyte *pc)
{
ClientPtr client = cl->client;
xGLXUseXFontReq *req;
@ -179,7 +180,7 @@ int __glXUseXFont(__GLXclientState *cl, GLbyte *pc)
** to try to make a font during another lists construction.
*/
client->errorValue = cx->id;
return __glXBadContextState;
return __glXError(GLXBadContextState);
}
/*

View File

@ -1 +0,0 @@
EXTRA_DIST = glx_ansic.h xf86glx.h

View File

@ -1,112 +0,0 @@
#ifdef HAVE_DIX_CONFIG_H
#include <dix-config.h>
#endif
#ifndef _glx_ansic_h_
#define _glx_ansic_h_
/* $XFree86: xc/programs/Xserver/GL/include/GL/glx_ansic.h,v 1.5 2001/03/21 20:49:08 dawes Exp $ */
/*
** License Applicability. Except to the extent portions of this file are
** made subject to an alternative license as permitted in the SGI Free
** Software License B, Version 1.1 (the "License"), the contents of this
** file are subject only to the provisions of the License. You may not use
** this file except in compliance with the License. You may obtain a copy
** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600
** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at:
**
** http://oss.sgi.com/projects/FreeB
**
** Note that, as provided in the License, the Software is distributed on an
** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS
** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND
** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A
** PARTICULAR PURPOSE, AND NON-INFRINGEMENT.
**
** Original Code. The Original Code is: OpenGL Sample Implementation,
** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics,
** Inc. The Original Code is Copyright (c) 1991-2000 Silicon Graphics, Inc.
** Copyright in any portions created by third parties is as indicated
** elsewhere herein. All Rights Reserved.
**
** Additional Notice Provisions: The application programming interfaces
** established by SGI in conjunction with the Original Code are The
** OpenGL(R) Graphics System: A Specification (Version 1.2.1), released
** April 1, 1999; The OpenGL(R) Graphics System Utility Library (Version
** 1.3), released November 4, 1998; and OpenGL(R) Graphics with the X
** Window System(R) (Version 1.3), released October 19, 1998. This software
** was created using the OpenGL(R) version 1.2.1 Sample Implementation
** published by SGI, but has not been independently verified as being
** compliant with the OpenGL(R) version 1.2.1 Specification.
*/
/*
** this needs to check whether we're using XFree86 at all, and then
** which version we're using. Use these macros if version is 3.9+, else
** use normal commands below.
*/
/*
** turns out this include file only exists for XFree86 3.9+
** I notice that not having it is not an error and does not stop the build,
** but having it will allow opengl and glx to be built for 3.9+. We no longer
** need an explicit define in the Makefile, just point to the correct X source
** tree and all should be taken care of.
*/
#ifdef XFree86Server
#ifndef assert
#define assert(a)
#endif
#else
#if defined(Lynx) && defined(__assert_h)
#undef __assert_h
#endif
#ifdef assert
#undef assert
#endif
#include <assert.h>
#endif
#define GLX_STDOUT stdout
#define GLX_STDERR stderr
#define __glXPrintf printf
#define __glXFprintf fprintf
#define __glXSprintf sprintf
#define __glXVfprintf vfprintf
#define __glXVsprintf vsprintf
#define __glXFopen fopen
#define __glXFclose fclose
#define __glXCos(x) cos(x)
#define __glXSin(x) sin(x)
#define __glXAtan(x) atan(x)
#define __glXAbs(x) abs(x)
#define __glXLog(x) log(x)
#define __glXCeil(x) ceil(x)
#define __glXFloor(x) floor(x)
#define __glXSqrt(x) sqrt(x)
#define __glXPow(x, y) pow(x, y)
#define __glXMemmove(dest, src, n) memmove(dest, src, n)
#define __glXMemcpy(dest, src, n) memcpy(dest, src, n)
#define __glXMemset(s, c, n) memset(s, c, n)
#define __glXStrdup(str) xstrdup(str)
#define __glXStrcpy(dest, src) strcpy(dest, src)
#define __glXStrncpy(dest, src, n) strncpy(dest, src, n)
#define __glXStrcat(dest, src) strcat(dest, src)
#define __glXStrncat(dest, src, n) strncat(dest, src, n)
#define __glXStrcmp(s1, s2) strcmp(s1, s2)
#define __glXStrncmp(s1, s2, n) strncmp(s1, s2, n)
#define __glXStrlen(str) strlen(str)
#define __glXAbort() abort()
#define __glXStrtok(s, delim) strtok(s, delim)
#define __glXStrcspn(s, reject) strcspn(s, reject)
#define __glXGetenv(a) getenv(a)
#define __glXAtoi(a) atoi(a)
#endif /* _glx_ansic_h_ */

View File

@ -1,39 +0,0 @@
/* $XFree86: xc/programs/Xserver/GL/include/GL/xf86glx.h,v 1.3 1999/06/14 07:31:41 dawes Exp $ */
/**************************************************************************
Copyright 1998-1999 Precision Insight, Inc., Cedar Park, Texas.
All Rights Reserved.
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sub license, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:
The above copyright notice and this permission notice (including the
next paragraph) shall be included in all copies or substantial portions
of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
IN NO EVENT SHALL PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR
ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
**************************************************************************/
/*
* Authors:
* Kevin E. Martin <kevin@precisioninsight.com>
*
*/
#ifdef HAVE_DIX_CONFIG_H
#include <dix-config.h>
#endif
#include "miscstruct.h"

View File

@ -1 +0,0 @@
SUBDIRS = GL

32
GL/mesa/.gitignore vendored Normal file
View File

@ -0,0 +1,32 @@
X/drivers
X/glxheader.h
X/xmesaP.h
X/xm*.c
array_cache/*.c
array_cache/*.h
mesa/drivers
mesa/glxheader.h
mesa/xm*.c
glapi/*.c
glapi/*.h
main/*.c
main/*.h
math/*.c
math/*.h
ppc
shader/*.c
shader/*.h
shader/slang/*.c
shader/slang/*.h
shader/slang/library
shader/grammar/*.c
shader/grammar/*.h
sparc
swrast/*.c
swrast/*.h
swrast_setup/*.c
swrast_setup/*.h
tnl/*.c
tnl/*.h
x86
x86-64

View File

@ -20,9 +20,7 @@ INCLUDES = -I@MESA_SOURCE@/include \
# symbol means "being built in the server"
AM_CFLAGS = \
$(DIX_CFLAGS) \
@SERVER_DEFINES@ \
@MODULE_DEFINES@ \
@LOADER_DEFINES@ \
-DXFree86Server \
@GLX_DEFINES@ \
-DXFree86Server

View File

@ -1,4 +1,3 @@
/* $XFree86: xc/programs/Xserver/GL/mesa/src/X/xf86glx.c,v 1.19 2003/07/16 01:38:27 dawes Exp $ */
/**************************************************************************
Copyright 1998-1999 Precision Insight, Inc., Cedar Park, Texas.
@ -54,7 +53,6 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#include <glxutil.h>
#include "context.h"
#include "xmesaP.h"
#include <GL/xf86glx.h>
#include "context.h"
#include "glcontextmodes.h"
@ -140,12 +138,12 @@ __glXMesaDrawableSwapBuffers(__GLXdrawable *base)
static __GLXdrawable *
__glXMesaContextCreateDrawable(__GLXcontext *context,
DrawablePtr pDraw,
XID drawId)
__glXMesaScreenCreateDrawable(__GLXscreen *screen,
DrawablePtr pDraw,
XID drawId,
__GLcontextModes *modes)
{
__GLXMESAdrawable *glxPriv;
__GLXscreen *pGlxScreen;
XMesaVisual xm_vis;
glxPriv = xalloc(sizeof *glxPriv);
@ -154,30 +152,19 @@ __glXMesaContextCreateDrawable(__GLXcontext *context,
memset(glxPriv, 0, sizeof *glxPriv);
if (!__glXDrawableInit(&glxPriv->base, context, pDraw, drawId)) {
if (!__glXDrawableInit(&glxPriv->base, screen, pDraw, drawId, modes)) {
xfree(glxPriv);
return NULL;
}
glxPriv->base.destroy = __glXMesaDrawableDestroy;
glxPriv->base.resize = __glXMesaDrawableResize;
glxPriv->base.swapBuffers = __glXMesaDrawableSwapBuffers;
glxPriv->base.destroy = __glXMesaDrawableDestroy;
glxPriv->base.resize = __glXMesaDrawableResize;
glxPriv->base.swapBuffers = __glXMesaDrawableSwapBuffers;
pGlxScreen = __glXActiveScreens[pDraw->pScreen->myNum];
if (glxPriv->base.type == DRAWABLE_WINDOW) {
VisualID vid = wVisual((WindowPtr)pDraw);
glxPriv->base.modes = _gl_context_modes_find_visual(pGlxScreen->modes,
vid);
} else {
glxPriv->base.modes = glxPriv->base.pGlxPixmap->modes;
}
xm_vis = find_mesa_visual(pGlxScreen, glxPriv->base.modes->visualID);
xm_vis = find_mesa_visual(screen, modes->visualID);
if (xm_vis == NULL) {
ErrorF("find_mesa_visual returned NULL for visualID = 0x%04x\n",
glxPriv->base.modes->visualID);
modes->visualID);
xfree(glxPriv);
return NULL;
}
@ -197,7 +184,7 @@ __glXMesaContextDestroy(__GLXcontext *baseContext)
__GLXMESAcontext *context = (__GLXMESAcontext *) baseContext;
XMesaDestroyContext(context->xmesa);
__glXContextDestroy(context);
__glXContextDestroy(&context->base);
xfree(context);
}
@ -268,7 +255,6 @@ __glXMesaScreenCreateContext(__GLXscreen *screen,
context->base.loseCurrent = __glXMesaContextLoseCurrent;
context->base.copy = __glXMesaContextCopy;
context->base.forceCurrent = __glXMesaContextForceCurrent;
context->base.createDrawable = __glXMesaContextCreateDrawable;
xm_vis = find_mesa_visual(screen, modes->visualID);
if (!xm_vis) {
@ -417,8 +403,9 @@ __glXMesaScreenProbe(ScreenPtr pScreen)
__glXScreenInit(&screen->base, pScreen);
screen->base.destroy = __glXMesaScreenDestroy;
screen->base.createContext = __glXMesaScreenCreateContext;
screen->base.destroy = __glXMesaScreenDestroy;
screen->base.createContext = __glXMesaScreenCreateContext;
screen->base.createDrawable = __glXMesaScreenCreateDrawable;
screen->base.pScreen = pScreen;
/*

View File

@ -1,4 +1,3 @@
/* $XFree86: xc/programs/Xserver/GL/mesa/src/X/xf86glx_util.c,v 1.5 2000/03/02 16:07:39 martin Exp $ */
/**************************************************************************
Copyright 1998-1999 Precision Insight, Inc., Cedar Park, Texas.
@ -42,7 +41,6 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#include "pixmapstr.h"
#include "xf86glx_util.h"
#include <X11/Xmd.h>
#include "GL/xf86glx.h"
#ifdef ROUNDUP
#undef ROUNDUP

View File

@ -1,4 +1,3 @@
/* $XFree86: xc/programs/Xserver/GL/mesa/src/X/xf86glx_util.h,v 1.5 2000/08/10 17:40:29 dawes Exp $ */
/**************************************************************************
Copyright 1998-1999 Precision Insight, Inc., Cedar Park, Texas.

View File

@ -1,4 +1,3 @@
/* $XFree86: xc/programs/Xserver/GL/mesa/src/X/xf86glxint.h,v 1.4 2002/02/22 21:45:08 dawes Exp $ */
/**************************************************************************
Copyright 1998-1999 Precision Insight, Inc., Cedar Park, Texas.

View File

@ -2,9 +2,7 @@ noinst_LTLIBRARIES = libac.la
AM_CFLAGS = \
$(DIX_CFLAGS) \
@SERVER_DEFINES@ \
@MODULE_DEFINES@ \
@LOADER_DEFINES@ \
-DXFree86Server \
@GLX_DEFINES@
INCLUDES = -I@MESA_SOURCE@/include \

View File

@ -2,9 +2,7 @@ noinst_LTLIBRARIES = libglapi.la
AM_CFLAGS = \
$(DIX_CFLAGS) \
@SERVER_DEFINES@ \
@MODULE_DEFINES@ \
@LOADER_DEFINES@ \
-DXFree86Server \
@GLX_DEFINES@
INCLUDES = -I@MESA_SOURCE@/include \

View File

@ -2,9 +2,7 @@ noinst_LTLIBRARIES = libmain.la
AM_CFLAGS = \
$(DIX_CFLAGS) \
@SERVER_DEFINES@ \
@MODULE_DEFINES@ \
@LOADER_DEFINES@ \
-DXFree86Server \
@GLX_DEFINES@
INCLUDES = -I@MESA_SOURCE@/include \
@ -29,6 +27,7 @@ nodist_libmain_la_SOURCES = accum.c \
api_loopback.c \
api_noop.c \
api_validate.c \
arrayobj.c \
attrib.c \
blend.c \
bufferobj.c \
@ -61,6 +60,7 @@ nodist_libmain_la_SOURCES = accum.c \
light.c \
lines.c \
matrix.c \
mipmap.c \
mm.c \
occlude.c \
pixel.c \

View File

@ -2,9 +2,7 @@ noinst_LTLIBRARIES = libmath.la
AM_CFLAGS = \
$(DIX_CFLAGS) \
@SERVER_DEFINES@ \
@MODULE_DEFINES@ \
@LOADER_DEFINES@ \
-DXFree86Server \
@GLX_DEFINES@
INCLUDES = -I@MESA_SOURCE@/include \

View File

@ -4,9 +4,7 @@ noinst_LTLIBRARIES = libshader.la
AM_CFLAGS = \
$(DIX_CFLAGS) \
@SERVER_DEFINES@ \
@MODULE_DEFINES@ \
@LOADER_DEFINES@ \
-DXFree86Server \
@GLX_DEFINES@
INCLUDES = -I@MESA_SOURCE@/include \

View File

@ -2,9 +2,7 @@ noinst_LTLIBRARIES = libgrammar.la
AM_CFLAGS = \
$(DIX_CFLAGS) \
@SERVER_DEFINES@ \
@MODULE_DEFINES@ \
@LOADER_DEFINES@ \
-DXFree86Server \
@GLX_DEFINES@
INCLUDES = -I@MESA_SOURCE@/include \

View File

@ -2,9 +2,7 @@ noinst_LTLIBRARIES = libslang.la
AM_CFLAGS = \
$(DIX_CFLAGS) \
@SERVER_DEFINES@ \
@MODULE_DEFINES@ \
@LOADER_DEFINES@ \
-DXFree86Server \
@GLX_DEFINES@
INCLUDES = -I@MESA_SOURCE@/include \

View File

@ -2,9 +2,7 @@ noinst_LTLIBRARIES = libswrast.la
AM_CFLAGS = \
$(DIX_CFLAGS) \
@SERVER_DEFINES@ \
@MODULE_DEFINES@ \
@LOADER_DEFINES@ \
-DXFree86Server \
@GLX_DEFINES@
INCLUDES = -I@MESA_SOURCE@/include \

View File

@ -2,9 +2,7 @@ noinst_LTLIBRARIES = libss.la
AM_CFLAGS = \
$(DIX_CFLAGS) \
@SERVER_DEFINES@ \
@MODULE_DEFINES@ \
@LOADER_DEFINES@ \
-DXFree86Server \
@GLX_DEFINES@
INCLUDES = -I@MESA_SOURCE@/include \

View File

@ -2,9 +2,7 @@ noinst_LTLIBRARIES = libtnl.la
AM_CFLAGS = \
$(DIX_CFLAGS) \
@SERVER_DEFINES@ \
@MODULE_DEFINES@ \
@LOADER_DEFINES@ \
-DXFree86Server \
@GLX_DEFINES@
INCLUDES = -I@MESA_SOURCE@/include \

View File

@ -62,412 +62,99 @@ symlink_mesa_glapi() {
src_dir src/mesa/glapi
dst_dir mesa/glapi
action dispatch.h
action glapi.c
action glapi.h
action glapioffsets.h
action glapitable.h
action glapitemp.h
action glprocs.h
action glthread.c
action glthread.h
for src in $REAL_SRC_DIR/*.c $REAL_SRC_DIR/*.h; do
action `basename $src`
done
}
symlink_mesa_main() {
src_dir src/mesa/main
dst_dir mesa/main
action accum.c
action accum.h
action api_arrayelt.c
action api_arrayelt.h
action api_eval.h
action api_loopback.c
action api_loopback.h
action api_noop.c
action api_noop.h
action api_validate.c
action api_validate.h
action attrib.c
action attrib.h
action bitset.h
action blend.c
action blend.h
action bufferobj.c
action bufferobj.h
action buffers.c
action buffers.h
action clip.c
action clip.h
action colormac.h
action colortab.c
action colortab.h
action config.h
action context.c
action context.h
action convolve.c
action convolve.h
action dd.h
action debug.c
action debug.h
action depth.c
action depth.h
action depthstencil.c
action depthstencil.h
action dlist.c
action dlist.h
action drawpix.c
action drawpix.h
action enable.c
action enable.h
action enums.c
action enums.h
action eval.c
action eval.h
action execmem.c
action extensions.c
action extensions.h
action fbobject.c
action fbobject.h
action feedback.c
action feedback.h
action fog.c
action fog.h
action framebuffer.c
action framebuffer.h
action get.c
action get.h
action getstring.c
action glheader.h
action hash.c
action hash.h
action hint.c
action hint.h
action histogram.c
action histogram.h
action image.c
action image.h
action imports.c
action imports.h
action light.c
action light.h
action lines.c
action lines.h
action macros.h
action matrix.c
action matrix.h
action mm.c
action mm.h
action mtypes.h
action occlude.c
action occlude.h
action pixel.c
action pixel.h
action points.c
action points.h
action polygon.c
action polygon.h
action rastpos.c
action rastpos.h
action rbadaptors.c
action rbadaptors.h
action renderbuffer.c
action renderbuffer.h
action simple_list.h
action state.c
action state.h
action stencil.c
action stencil.h
action texcompress.c
action texcompress.h
action texcompress_fxt1.c
action texcompress_s3tc.c
action texenvprogram.c
action texenvprogram.h
action texformat.c
action texformat.h
action texformat_tmp.h
action teximage.c
action teximage.h
action texobj.c
action texobj.h
action texrender.c
action texrender.h
action texstate.c
action texstate.h
action texstore.c
action texstore.h
action varray.c
action varray.h
action version.h
action vsnprintf.c
action vtxfmt.c
action vtxfmt.h
action vtxfmt_tmp.h
for src in $REAL_SRC_DIR/*.c $REAL_SRC_DIR/*.h; do
action `basename $src`
done
}
symlink_mesa_math() {
src_dir src/mesa/math
dst_dir mesa/math
action m_clip_tmp.h
action m_copy_tmp.h
action m_debug.h
action m_debug_clip.c
action m_debug_norm.c
action m_debug_util.h
action m_debug_xform.c
action m_dotprod_tmp.h
action m_eval.c
action m_eval.h
action m_matrix.c
action m_matrix.h
action m_norm_tmp.h
action m_trans_tmp.h
action m_translate.c
action m_translate.h
action m_vector.c
action m_vector.h
action m_xform.c
action m_xform.h
action m_xform_tmp.h
action mathmod.h
for src in $REAL_SRC_DIR/*.c $REAL_SRC_DIR/*.h; do
action `basename $src`
done
}
symlink_mesa_ac() {
src_dir src/mesa/array_cache
dst_dir mesa/array_cache
action ac_context.c
action ac_context.h
action ac_import.c
action acache.h
for src in $REAL_SRC_DIR/*.c $REAL_SRC_DIR/*.h; do
action `basename $src`
done
}
symlink_mesa_swrast() {
src_dir src/mesa/swrast
dst_dir mesa/swrast
action s_aaline.c
action s_aaline.h
action s_aalinetemp.h
action s_aatriangle.c
action s_aatriangle.h
action s_aatritemp.h
action s_accum.c
action s_accum.h
action s_alpha.c
action s_alpha.h
action s_arbshader.c
action s_arbshader.h
action s_atifragshader.c
action s_atifragshader.h
action s_bitmap.c
action s_blend.c
action s_blend.h
action s_blit.c
action s_buffers.c
action s_context.c
action s_context.h
action s_copypix.c
action s_depth.c
action s_depth.h
action s_drawpix.c
action s_drawpix.h
action s_feedback.c
action s_feedback.h
action s_fog.c
action s_fog.h
action s_imaging.c
action s_lines.c
action s_lines.h
action s_linetemp.h
action s_logic.c
action s_logic.h
action s_masking.c
action s_masking.h
action s_nvfragprog.c
action s_nvfragprog.h
action s_points.c
action s_points.h
action s_pointtemp.h
action s_readpix.c
action s_span.c
action s_span.h
action s_spantemp.h
action s_stencil.c
action s_stencil.h
action s_texcombine.c
action s_texcombine.h
action s_texfilter.c
action s_texfilter.h
action s_texstore.c
action s_triangle.c
action s_triangle.h
action s_trispan.h
action s_tritemp.h
action s_zoom.c
action s_zoom.h
action swrast.h
for src in $REAL_SRC_DIR/*.c $REAL_SRC_DIR/*.h; do
action `basename $src`
done
}
symlink_mesa_ss() {
src_dir src/mesa/swrast_setup
dst_dir mesa/swrast_setup
action ss_context.c
action ss_context.h
action ss_triangle.c
action ss_triangle.h
action ss_tritmp.h
action ss_vb.h
action swrast_setup.h
for src in $REAL_SRC_DIR/*.c $REAL_SRC_DIR/*.h; do
action `basename $src`
done
}
symlink_mesa_tnl() {
src_dir src/mesa/tnl
dst_dir mesa/tnl
action t_array_api.c
action t_array_api.h
action t_array_import.c
action t_array_import.h
action t_context.c
action t_context.h
action t_pipeline.c
action t_pipeline.h
action t_save_api.c
action t_save_api.h
action t_save_loopback.c
action t_save_playback.c
action t_vb_arbprogram.c
action t_vb_arbprogram.h
action t_vb_arbprogram_sse.c
action t_vb_arbshader.c
action t_vb_cliptmp.h
action t_vb_cull.c
action t_vb_fog.c
action t_vb_light.c
action t_vb_lighttmp.h
action t_vb_normals.c
action t_vb_points.c
action t_vb_program.c
action t_vb_render.c
action t_vb_rendertmp.h
action t_vb_texgen.c
action t_vb_texmat.c
action t_vb_vertex.c
action t_vertex.c
action t_vertex.h
action t_vertex_generic.c
action t_vertex_sse.c
action t_vp_build.c
action t_vp_build.h
action t_vtx_api.c
action t_vtx_api.h
action t_vtx_eval.c
action t_vtx_exec.c
action t_vtx_generic.c
action t_vtx_x86.c
action tnl.h
for src in $REAL_SRC_DIR/*.c $REAL_SRC_DIR/*.h; do
action `basename $src`
done
}
symlink_mesa_shader() {
src_dir src/mesa/shader
dst_dir mesa/shader
action arbprogparse.c
action arbprogparse.h
action arbprogram.c
action arbprogram.h
action arbprogram_syn.h
action atifragshader.c
action atifragshader.h
action nvfragparse.c
action nvfragparse.h
action nvprogram.c
action nvprogram.h
action nvvertexec.c
action nvvertexec.h
action nvvertparse.c
action nvvertparse.h
action program.c
action program.h
action program_instruction.h
action shaderobjects.c
action shaderobjects.h
action shaderobjects_3dlabs.c
action shaderobjects_3dlabs.h
for src in $REAL_SRC_DIR/*.c $REAL_SRC_DIR/*.h; do
action `basename $src`
done
}
symlink_mesa_shader_grammar() {
src_dir src/mesa/shader/grammar
dst_dir mesa/shader/grammar
action grammar.c
action grammar.h
action grammar_syn.h
action grammar_mesa.c
action grammar_mesa.h
for src in $REAL_SRC_DIR/*.c $REAL_SRC_DIR/*.h; do
action `basename $src`
done
}
symlink_mesa_shader_slang() {
src_dir src/mesa/shader/slang
dst_dir mesa/shader/slang
action slang_analyse.c
action slang_analyse.h
action slang_assemble.c
action slang_assemble.h
action slang_assemble_assignment.c
action slang_assemble_assignment.h
action slang_assemble_conditional.c
action slang_assemble_conditional.h
action slang_assemble_constructor.c
action slang_assemble_constructor.h
action slang_assemble_typeinfo.c
action slang_assemble_typeinfo.h
action slang_compile.c
action slang_compile.h
action slang_compile_function.c
action slang_compile_function.h
action slang_compile_operation.c
action slang_compile_operation.h
action slang_compile_struct.c
action slang_compile_struct.h
action slang_compile_variable.c
action slang_compile_variable.h
action slang_execute.c
action slang_execute.h
action slang_execute_x86.c
action slang_export.c
action slang_export.h
action slang_library_noise.c
action slang_library_noise.h
action slang_library_texsample.c
action slang_library_texsample.h
action slang_link.c
action slang_link.h
action slang_mesa.h
action slang_preprocess.c
action slang_preprocess.h
action slang_storage.c
action slang_storage.h
action slang_utility.c
action slang_utility.h
action traverse_wrap.h
for src in $REAL_SRC_DIR/*.c $REAL_SRC_DIR/*.h; do
action `basename $src`
done
}
symlink_mesa_shader_slang_library() {
src_dir src/mesa/shader/slang/library
dst_dir mesa/shader/slang/library
action slang_common_builtin_gc.h
action slang_core_gc.h
action slang_fragment_builtin_gc.h
action slang_shader_syn.h
action slang_version_syn.h
action slang_vertex_builtin_gc.h
for src in $REAL_SRC_DIR/*.c $REAL_SRC_DIR/*.h; do
action `basename $src`
done
}
symlink_mesa_x() {
@ -602,9 +289,9 @@ action() {
}
usage() {
echo symlink.sh src-dir dst-dir
echo src-dir: the xc directory of the monolithic source tree
echo dst-dir: the modular source tree containing proto, app, lib, ...
echo symlink-mesa.sh src-dir dst-dir
echo src-dir: the Mesa source directory
echo dst-dir: the GL subdirectory of the Xserver modular tree
}
# Check commandline args

View File

@ -26,15 +26,6 @@ if GLX
GLX_DIR=GL
endif
if XPRINT
XPDDX_DIR=Xprint
XPCONFIG_DIR=XpConfig
endif
if XINPUT
XINPUT_DIR=Xi
endif
if DBE
DBE_DIR=dbe
endif
@ -50,7 +41,7 @@ SUBDIRS = \
os \
randr \
render \
$(XINPUT_DIR) \
Xi \
xkb \
$(DBE_DIR) \
$(MFB_DIR) \
@ -64,9 +55,8 @@ SUBDIRS = \
$(COMPOSITE_DIR) \
$(GLX_DIR) \
exa \
hw \
$(XPDDX_DIR) \
$(XPCONFIG_DIR)
config \
hw
aclocaldir = $(datadir)/aclocal
aclocal_DATA = xorg-server.m4
@ -101,9 +91,8 @@ DIST_SUBDIRS = \
composite \
GL \
exa \
hw \
Xprint \
XpConfig
config \
hw
# gross hack
relink: all

View File

@ -1,5 +1,5 @@
noinst_LTLIBRARIES = libxtrap.la
AM_CFLAGS = $(DIX_CFLAGS) @SERVER_DEFINES@ @LOADER_DEFINES@
AM_CFLAGS = $(DIX_CFLAGS)
libxtrap_la_SOURCES = xtrapddmi.c xtrapdi.c xtrapdiswp.c xtrapditbl.c

View File

@ -1,4 +1,3 @@
/* $XFree86: xc/programs/Xserver/XTrap/xtrapddmi.c,v 1.1 2001/11/02 23:29:29 dawes Exp $ */
/*****************************************************************************
Copyright 1987, 1988, 1989, 1990, 1991 by Digital Equipment Corp., Maynard, MA

View File

@ -1,5 +1,3 @@
/* $XdotOrg: xserver/xorg/XTrap/xtrapdi.c,v 1.6 2006/02/10 22:00:19 anholt Exp $ */
/* $XFree86: xc/programs/Xserver/XTrap/xtrapdi.c,v 1.6tsi Exp $ */
/*****************************************************************************
Copyright 1987, 1988, 1989, 1990, 1991 by Digital Equipment Corp., Maynard, MA
X11R6 Changes Copyright (c) 1994 by Robert Chesler of Absol-Puter, Hudson, NH.
@ -170,7 +168,7 @@ static ClientList cmd_clients; /* Linked-list of clients using command key */
/*----------------------------*
* Forward Declarations
*----------------------------*/
static void _SwapProc (int (**f1 )(), int (**f2 )());
static void _SwapProc (int (**f1 )(void), int (**f2 )(void));
static void sXETrapEvent (xETrapDataEvent *from , xETrapDataEvent *to );
static int add_accelerator_node (ClientPtr client , ClientList *accel );
static void remove_accelerator_node (ClientPtr client , ClientList *accel );
@ -886,14 +884,14 @@ int XETrapConfig(xXTrapConfigReq *request, ClientPtr client)
{ /* Client wants the XTrap rtn */
if (++(vectored_requests[i]) <= 1L)
{ /* first client, so do it */
_SwapProc(&(XETrapProcVector[i]), &(ProcVector[i]));
_SwapProc(&(XETrapProcVector[i]), (int_function *)&(ProcVector[i]));
}
}
else
{ /* Client wants the *real* rtn */
if (--(vectored_requests[i]) <= 0L)
{ /* No more clients using, so do it */
_SwapProc(&(XETrapProcVector[i]), &(ProcVector[i]));
_SwapProc(&(XETrapProcVector[i]), (int_function *)&(ProcVector[i]));
}
}
if (status == Success)
@ -1094,8 +1092,8 @@ int XETrapRequestVector(ClientPtr client)
pdata->hdr.client = client->index; /* stuff client index in hdr */
if (BitIsTrue(penv->cur.data_config_flags_data,XETrapWinXY))
{
window_ptr = (WindowPtr) LookupDrawable(stuff->id, client);
if (window_ptr == 0L)
if (Success != dixLookupDrawable(&window_ptr, stuff->id,
client, 0, DixUnknownAccess))
{ /* Failed...invalidate the X and Y coordinate data. */
pdata->hdr.win_x = -1L;
pdata->hdr.win_y = -1L;
@ -1787,9 +1785,9 @@ static void update_protocol(xXTrapGetReq *reqptr, ClientPtr client)
* lint from complaining about mixed types. It seems to work, but I would
* probably classify this as a hack.
*/
static void _SwapProc( register int (**f1)(), register int (**f2)())
static void _SwapProc( register int (**f1)(void), register int (**f2)(void))
{
register int (*t1)() = *f1;
register int (*t1)(void) = *f1;
*f1 = *f2;
*f2 = t1;

View File

@ -374,13 +374,13 @@ void XETSwSendEvent(register xSendEventReq *data)
{
register char n;
xEvent eventT;
void (*proc)();
EventSwapPtr proc;
swapl(&(data->destination), n);
swapl(&(data->eventMask), n);
/* Swap event */
proc = EventSwapVector[data->event.u.u.type & 0177];
if (!proc || (int (*)()) proc == (int (*)()) NotImplemented)
if (!proc || proc == NotImplemented)
(*proc)(&(data->event), &eventT);
data->event = eventT;
swaps(&(data->length), n);

View File

@ -1,4 +1,3 @@
/* $Xorg: EVI.c,v 1.3 2000/08/17 19:47:55 cpqbld Exp $ */
/************************************************************
Copyright (c) 1997 by Silicon Graphics Computer Systems, Inc.
Permission to use, copy, modify, and distribute this
@ -21,7 +20,6 @@ DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH
THE USE OR PERFORMANCE OF THIS SOFTWARE.
********************************************************/
/* $XFree86: xc/programs/Xserver/Xext/EVI.c,v 3.10tsi Exp $ */
#ifdef HAVE_DIX_CONFIG_H
#include <dix-config.h>

View File

@ -1,4 +1,3 @@
/* $Xorg: EVIstruct.h,v 1.3 2000/08/17 19:47:55 cpqbld Exp $ */
/************************************************************
Copyright (c) 1997 by Silicon Graphics Computer Systems, Inc.
Permission to use, copy, modify, and distribute this
@ -21,7 +20,6 @@ DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH
THE USE OR PERFORMANCE OF THIS SOFTWARE.
********************************************************/
/* $XFree86: xc/programs/Xserver/Xext/EVIstruct.h,v 3.5 2003/07/16 01:38:28 dawes Exp $ */
#ifdef HAVE_DIX_CONFIG_H
#include <dix-config.h>

View File

@ -12,7 +12,7 @@ endif
INCLUDES = -I$(top_srcdir)/hw/xfree86/dixmods/extmod
AM_CFLAGS = $(DIX_CFLAGS) @SERVER_DEFINES@ @LOADER_DEFINES@
AM_CFLAGS = $(DIX_CFLAGS)
if XORG
sdk_HEADERS = xvdix.h xvmcext.h
@ -33,6 +33,10 @@ MODULE_SRCS = \
sync.c \
xcmisc.c
# Extra configuration files ship with some extensions
SERVERCONFIGdir = $(libdir)/xserver
SERVERCONFIG_DATA =
# Optional sources included if extension enabled by configure.ac rules
# MIT Shared Memory extension
@ -65,16 +69,28 @@ if XINERAMA
BUILTIN_SRCS += $(XINERAMA_SRCS)
endif
# X-ACE extension: provides hooks for building security policy extensions
# like XC-Security, X-SELinux & XTSol
XACE_SRCS = xace.c xace.h xacestr.h
if XACE
BUILTIN_SRCS += $(XACE_SRCS)
endif
# Security extension: multi-level security to protect clients from each other
XCSECURITY_SRCS = security.c
XCSECURITY_SRCS = security.c securitysrv.h
if XCSECURITY
BUILTIN_SRCS += $(XCSECURITY_SRCS)
SERVERCONFIGdir = $(libdir)/xserver
SERVERCONFIG_DATA = SecurityPolicy
SERVERCONFIG_DATA += SecurityPolicy
AM_CFLAGS += -DDEFAULTPOLICYFILE=\"$(SERVERCONFIGdir)/SecurityPolicy\"
endif
XCALIBRATE_SRCS = xcalibrate.c
if XCALIBRATE
BUILTIN_SRCS += $(XCALIBRATE_SRCS)
# XCalibrare needs tslib
endif
# X EVent Interception Extension: allows accessibility helpers & composite
# managers to intercept events from input devices and transform as needed
# before the clients see them.
@ -144,12 +160,14 @@ libXextmodule_la_SOURCES = $(MODULE_SRCS)
endif
EXTRA_DIST = \
SecurityPolicy \
$(SERVERCONFIG_DATA) \
$(MITSHM_SRCS) \
$(XV_SRCS) \
$(RES_SRCS) \
$(SCREENSAVER_SRCS) \
$(XACE_SRCS) \
$(XCSECURITY_SRCS) \
$(XCALIBRATE_SRCS) \
$(XINERAMA_SRCS) \
$(XEVIE_SRCS) \
$(XPRINT_SRCS) \

View File

@ -1,4 +1,3 @@
/* $XFree86: xc/programs/Xserver/Xext/appgroup.c,v 1.10tsi Exp $ */
/*
Copyright 1996, 1998, 2001 The Open Group
@ -24,7 +23,6 @@ not be used in advertising or otherwise to promote the sale, use or
other dealings in this Software without prior written authorization
from The Open Group.
*/
/* $Xorg: appgroup.c,v 1.6 2001/02/09 02:04:32 xorgcvs Exp $ */
#define NEED_REPLIES
#define NEED_EVENTS
@ -43,9 +41,8 @@ from The Open Group.
#include "servermd.h"
#define _XAG_SERVER_
#include <X11/extensions/Xagstr.h>
#include <X11/extensions/Xagsrv.h>
#define _SECURITY_SERVER
#include <X11/extensions/security.h>
#include "xacestr.h"
#include "securitysrv.h"
#include <X11/Xfuncproto.h>
#define XSERV_t
@ -77,10 +74,6 @@ static int ProcXagDispatch(ClientPtr client);
static int SProcXagDispatch(ClientPtr client);
static void XagResetProc(ExtensionEntry* extEntry);
#if 0
static unsigned char XagReqCode = 0;
static int XagErrorBase;
#endif
static int XagCallbackRefCount = 0;
static RESTYPE RT_APPGROUP;
@ -129,62 +122,11 @@ void XagClientStateChange(
pointer nulldata,
pointer calldata)
{
SecurityAuthorizationPtr pAuth;
NewClientInfoRec* pci = (NewClientInfoRec*) calldata;
ClientPtr pClient = pci->client;
AppGroupPtr pAppGrp;
XID authId = 0;
AppGroupPtr pAppGrp = pClient->appgroup;
int slot;
if (!pClient->appgroup) {
switch (pClient->clientState) {
case ClientStateAuthenticating:
case ClientStateRunning:
case ClientStateCheckingSecurity:
return;
case ClientStateInitial:
case ClientStateCheckedSecurity:
/*
* If the client is connecting via a firewall proxy (which
* uses XC-QUERY-SECURITY-1, then the authId is available
* during ClientStateCheckedSecurity, otherwise it's
* available during ClientStateInitial.
*
* Don't get it from pClient because can't guarantee the order
* of the callbacks and the security extension might not have
* plugged it in yet.
*/
authId = AuthorizationIDOfClient(pClient);
break;
case ClientStateGone:
case ClientStateRetained:
/*
* Don't get if from AuthorizationIDOfClient because can't
* guarantee the order of the callbacks and the security
* extension may have torn down the client's private data
*/
authId = pClient->authId;
break;
}
if (authId == None)
return;
pAuth = (SecurityAuthorizationPtr)SecurityLookupIDByType(pClient,
authId, SecurityAuthorizationResType, SecurityReadAccess);
if (pAuth == NULL)
return;
for (pAppGrp = appGrpList; pAppGrp != NULL; pAppGrp = pAppGrp->next)
if (pAppGrp->appgroupId == pAuth->group) break;
} else {
pAppGrp = pClient->appgroup;
}
if (!pAppGrp)
return;
@ -233,19 +175,6 @@ void XagClientStateChange(
void
XagExtensionInit(INITARGS)
{
#if 0
ExtensionEntry* extEntry;
if ((extEntry = AddExtension (XAGNAME,
0,
XagNumberErrors,
ProcXagDispatch,
SProcXagDispatch,
XagResetProc,
StandardMinorOpcode))) {
XagReqCode = (unsigned char)extEntry->base;
XagErrorBase = extEntry->errorBase;
#else
if (AddExtension (XAGNAME,
0,
XagNumberErrors,
@ -253,8 +182,8 @@ XagExtensionInit(INITARGS)
SProcXagDispatch,
XagResetProc,
StandardMinorOpcode)) {
#endif
RT_APPGROUP = CreateNewResourceType (XagAppGroupFree);
XaceRegisterCallback(XACE_AUTH_AVAIL, XagCallClientStateChange, NULL);
}
}
@ -426,13 +355,15 @@ int AttrValidate(
AppGroupPtr pAppGrp)
{
WindowPtr pWin;
int idepth, ivids, found;
int idepth, ivids, found, rc;
ScreenPtr pScreen;
DepthPtr pDepth;
ColormapPtr pColormap;
pWin = LookupWindow (pAppGrp->default_root, client);
/* XXX check that pWin is not NULL */
rc = dixLookupWindow(&pWin, pAppGrp->default_root, client,
DixUnknownAccess);
if (rc != Success)
return rc;
pScreen = pWin->drawable.pScreen;
if (WindowTable[pScreen->myNum]->drawable.id != pAppGrp->default_root)
return BadWindow;
@ -503,7 +434,7 @@ int ProcXagDestroy(
REQUEST_SIZE_MATCH (xXagDestroyReq);
pAppGrp = (AppGroupPtr)SecurityLookupIDByType (client,
(XID)stuff->app_group, RT_APPGROUP, SecurityReadAccess);
(XID)stuff->app_group, RT_APPGROUP, DixReadAccess);
if (!pAppGrp) return XagBadAppGroup;
FreeResource ((XID)stuff->app_group, RT_NONE);
if (--XagCallbackRefCount == 0)
@ -522,7 +453,7 @@ int ProcXagGetAttr(
REQUEST_SIZE_MATCH (xXagGetAttrReq);
pAppGrp = (AppGroupPtr)SecurityLookupIDByType (client,
(XID)stuff->app_group, RT_APPGROUP, SecurityReadAccess);
(XID)stuff->app_group, RT_APPGROUP, DixReadAccess);
if (!pAppGrp) return XagBadAppGroup;
rep.type = X_Reply;
rep.length = 0;
@ -554,10 +485,13 @@ int ProcXagQuery(
ClientPtr pClient;
AppGroupPtr pAppGrp;
REQUEST (xXagQueryReq);
int n;
int n, rc;
REQUEST_SIZE_MATCH (xXagQueryReq);
pClient = LookupClient (stuff->resource, client);
rc = dixLookupClient(&pClient, stuff->resource, client, DixUnknownAccess);
if (rc != Success)
return rc;
for (pAppGrp = appGrpList; pAppGrp != NULL; pAppGrp = pAppGrp->next)
for (n = 0; n < pAppGrp->nclients; n++)
if (pAppGrp->clients[n] == pClient) {
@ -821,12 +755,33 @@ void XagGetDeltaInfo(
}
void XagCallClientStateChange(
ClientPtr client)
CallbackListPtr *pcbl,
pointer nulldata,
pointer calldata)
{
if (appGrpList) {
XaceAuthAvailRec* rec = (XaceAuthAvailRec*) calldata;
ClientPtr pClient = rec->client;
if (!pClient->appgroup) {
SecurityAuthorizationPtr pAuth;
XID authId = rec->authId;
/* can't use SecurityLookupIDByType here -- client
* security state hasn't been setup yet.
*/
pAuth = (SecurityAuthorizationPtr)LookupIDByType(authId,
SecurityAuthorizationResType);
if (!pAuth)
return;
pClient->appgroup = (AppGroupPtr)LookupIDByType(pAuth->group,
RT_APPGROUP);
}
if (pClient->appgroup) {
NewClientInfoRec clientinfo;
clientinfo.client = client;
clientinfo.client = pClient;
XagClientStateChange (NULL, NULL, (pointer)&clientinfo);
}
}

View File

@ -1,10 +1,89 @@
/* $XFree86$ */
/*
Copyright 1996, 1998 The Open Group
void XagClientStateChange(
Permission to use, copy, modify, distribute, and sell this software and its
documentation for any purpose is hereby granted without fee, provided that
the above copyright notice appear in all copies and that both that
copyright notice and this permission notice appear in supporting
documentation.
The above copyright notice and this permission notice shall be included
in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR
OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
OTHER DEALINGS IN THE SOFTWARE.
Except as contained in this notice, the name of The Open Group shall
not be used in advertising or otherwise to promote the sale, use or
other dealings in this Software without prior written authorization
from The Open Group.
*/
#ifndef _APPGROUP_SRV_H_
#define _APPGROUP_SRV_H_
#include <X11/Xfuncproto.h>
_XFUNCPROTOBEGIN
extern void XagConnectionInfo(
ClientPtr /* client */,
xConnSetupPrefix** /* conn_prefix */,
char** /* conn_info */,
int* /* num_screens */
);
extern VisualID XagRootVisual(
ClientPtr /* client */
);
extern Colormap XagDefaultColormap(
ClientPtr /* client */
);
extern ClientPtr XagLeader(
ClientPtr /* client */
);
extern void XagCallClientStateChange(
CallbackListPtr * /* pcbl */,
pointer /* nulldata */,
pointer /* calldata */
);
extern Bool XagIsControlledRoot (
ClientPtr /* client */,
WindowPtr /* pParent */
);
extern XID XagId (
ClientPtr /* client */
);
extern void XagGetDeltaInfo (
ClientPtr /* client */,
CARD32* /* buf */
);
extern void XagClientStateChange(
CallbackListPtr* pcbl,
pointer nulldata,
pointer calldata);
int ProcXagCreate (
extern int ProcXagCreate (
register ClientPtr client);
int ProcXagDestroy(
extern int ProcXagDestroy(
register ClientPtr client);
_XFUNCPROTOEND
#endif /* _APPGROUP_SRV_H_ */

View File

@ -1,4 +1,3 @@
/* $Xorg: bigreq.c,v 1.4 2001/02/09 02:04:32 xorgcvs Exp $ */
/*
Copyright 1992, 1998 The Open Group
@ -26,7 +25,6 @@ other dealings in this Software without prior written authorization
from The Open Group.
*/
/* $XFree86: xc/programs/Xserver/Xext/bigreq.c,v 3.8 2003/10/28 23:08:43 tsi Exp $ */
#define NEED_EVENTS
#ifdef HAVE_DIX_CONFIG_H

View File

@ -1,4 +1,3 @@
/* $Xorg: cup.c,v 1.4 2001/02/09 02:04:32 xorgcvs Exp $ */
/*
Copyright 1997, 1998 The Open Group
@ -24,7 +23,6 @@ used in advertising or otherwise to promote the sale, use or other dealings
in this Software without prior written authorization from The Open Group.
*/
/* $XFree86: xc/programs/Xserver/Xext/cup.c,v 1.11tsi Exp $ */
#define NEED_REPLIES
#define NEED_EVENTS
@ -229,7 +227,7 @@ int ProcStoreColors(
REQUEST_AT_LEAST_SIZE (xXcupStoreColorsReq);
pcmp = (ColormapPtr) SecurityLookupIDByType (client, stuff->cmap,
RT_COLORMAP, SecurityWriteAccess);
RT_COLORMAP, DixWriteAccess);
if (pcmp) {
int ncolors, n;

View File

@ -1,4 +1,3 @@
/* $Xorg: dpms.c,v 1.3 2000/08/17 19:47:56 cpqbld Exp $ */
/*****************************************************************
Copyright (c) 1996 Digital Equipment Corporation, Maynard, Massachusetts.
@ -33,7 +32,6 @@ Equipment Corporation.
* @(#)RCSfile: dpms.c,v Revision: 1.1.4.5 (DEC) Date: 1996/03/04 15:27:00
*/
/* $XFree86: xc/programs/Xserver/Xext/dpms.c,v 3.10tsi Exp $ */
#ifdef HAVE_DIX_CONFIG_H
#include <dix-config.h>

View File

@ -1,4 +1,3 @@
/* $XFree86: xc/programs/Xserver/Xext/dpmsproc.h,v 1.3 2001/10/28 03:32:50 tsi Exp $ */
/* Prototypes for functions that the DDX must provide */

View File

@ -1,4 +1,3 @@
/* $Xorg: dpmsstubs.c,v 1.3 2000/08/17 19:47:56 cpqbld Exp $ */
/*****************************************************************
Copyright (c) 1996 Digital Equipment Corporation, Maynard, Massachusetts.
@ -26,7 +25,6 @@ dealings in this Software without prior written authorization from Digital
Equipment Corporation.
******************************************************************/
/* $XFree86: xc/programs/Xserver/Xext/dpmsstubs.c,v 3.4 2001/01/17 22:13:15 dawes Exp $ */
typedef int Bool;

View File

@ -27,7 +27,6 @@
*
* Id: fontcache.c,v 1.12 1999/01/31 13:47:45 akiyama Exp $
*/
/* $XFree86: xc/programs/Xserver/Xext/fontcache.c,v 1.7 2003/10/28 23:08:43 tsi Exp $ */
/* THIS IS NOT AN X CONSORTIUM STANDARD */
@ -46,8 +45,8 @@
#include "inputstr.h"
#include "servermd.h"
#define _FONTCACHE_SERVER_
#include "fontcacheP.h"
#include "fontcachstr.h"
#include <X11/extensions/fontcacheP.h>
#include <X11/extensions/fontcachstr.h>
#include <X11/Xfuncproto.h>
#include "swaprep.h"

View File

@ -1,4 +1,3 @@
/* $XFree86: xc/programs/Xserver/Xext/mbuf.c,v 3.15 2003/10/28 23:08:43 tsi Exp $ */
/************************************************************
Copyright 1989, 1998 The Open Group
@ -25,7 +24,6 @@ in this Software without prior written authorization from The Open Group.
********************************************************/
/* $Xorg: mbuf.c,v 1.4 2001/02/09 02:04:32 xorgcvs Exp $ */
#define NEED_REPLIES
#define NEED_EVENTS
#ifdef HAVE_DIX_CONFIG_H
@ -450,16 +448,15 @@ ProcCreateImageBuffers (client)
register int n;
WindowPtr pWin;
XID *ids;
int len, nbuf;
int i;
int err;
int len, nbuf, i, err, rc;
REQUEST_AT_LEAST_SIZE (xMbufCreateImageBuffersReq);
len = stuff->length - (sizeof(xMbufCreateImageBuffersReq) >> 2);
if (len == 0)
return BadLength;
if (!(pWin = LookupWindow (stuff->window, client)))
return BadWindow;
rc = dixLookupWindow(&pWin, stuff->window, client, DixUnknownAccess);
if (rc != Success)
return rc;
if (pWin->drawable.class == InputOnly)
return BadMatch;
switch (stuff->updateAction)
@ -586,10 +583,12 @@ ProcDestroyImageBuffers (client)
{
REQUEST (xMbufDestroyImageBuffersReq);
WindowPtr pWin;
int rc;
REQUEST_SIZE_MATCH (xMbufDestroyImageBuffersReq);
if (!(pWin = LookupWindow (stuff->window, client)))
return BadWindow;
rc = dixLookupWindow(&pWin, stuff->window, client, DixUnknownAccess);
if (rc != Success)
return rc;
DestroyImageBuffers (pWin);
return Success;
}
@ -601,16 +600,16 @@ ProcSetMBufferAttributes (client)
REQUEST (xMbufSetMBufferAttributesReq);
WindowPtr pWin;
MultibuffersPtr pMultibuffers;
int len;
int len, rc;
Mask vmask;
Mask index2;
CARD32 updateHint;
XID *vlist;
REQUEST_AT_LEAST_SIZE (xMbufSetMBufferAttributesReq);
pWin = LookupWindow (stuff->window, client);
if (!pWin)
return BadWindow;
rc = dixLookupWindow(&pWin, stuff->window, client, DixUnknownAccess);
if (rc != Success)
return rc;
pMultibuffers = (MultibuffersPtr)LookupIDByType (pWin->drawable.id, MultibuffersResType);
if (!pMultibuffers)
return BadMatch;
@ -657,12 +656,12 @@ ProcGetMBufferAttributes (client)
MultibuffersPtr pMultibuffers;
XID *ids;
xMbufGetMBufferAttributesReply rep;
int i, n;
int i, n, rc;
REQUEST_SIZE_MATCH (xMbufGetMBufferAttributesReq);
pWin = LookupWindow (stuff->window, client);
if (!pWin)
return BadWindow;
rc = dixLookupWindow(&pWin, stuff->window, client, DixUnknownAccess);
if (rc != Success)
return rc;
pMultibuffers = (MultibuffersPtr)LookupIDByType (pWin->drawable.id, MultibuffersResType);
if (!pMultibuffers)
return BadAccess;
@ -787,15 +786,15 @@ ProcGetBufferInfo (client)
DrawablePtr pDrawable;
xMbufGetBufferInfoReply rep;
ScreenPtr pScreen;
int i, j, k;
int n;
int i, j, k, n, rc;
xMbufBufferInfo *pInfo;
int nInfo;
DepthPtr pDepth;
pDrawable = (DrawablePtr) LookupDrawable (stuff->drawable, client);
if (!pDrawable)
return BadDrawable;
rc = dixLookupDrawable(&pDrawable, stuff->drawable, client, 0,
DixUnknownAccess);
if (rc != Success)
return rc;
pScreen = pDrawable->pScreen;
nInfo = 0;
for (i = 0; i < pScreen->numDepths; i++)

View File

@ -1,4 +1,3 @@
/* $XFree86: xc/programs/Xserver/Xext/mbufbf.c,v 3.5tsi Exp $ */
/*
Copyright 1989, 1998 The Open Group
@ -25,7 +24,6 @@ in this Software without prior written authorization from The Open Group.
*/
/* $Xorg: mbufbf.c,v 1.4 2001/02/09 02:04:32 xorgcvs Exp $ */
#define NEED_REPLIES
#define NEED_EVENTS

View File

@ -1,4 +1,3 @@
/* $XFree86: xc/programs/Xserver/Xext/mbufpx.c,v 3.3 2001/07/23 13:15:44 dawes Exp $ */
/************************************************************
Copyright 1989, 1998 The Open Group
@ -25,7 +24,6 @@ in this Software without prior written authorization from The Open Group.
********************************************************/
/* $Xorg: mbufpx.c,v 1.4 2001/02/09 02:04:32 xorgcvs Exp $ */
#define NEED_REPLIES
#define NEED_EVENTS
#ifdef HAVE_DIX_CONFIG_H

View File

@ -1,4 +1,3 @@
/* $XFree86: xc/programs/Xserver/Xext/mitmisc.c,v 3.6 2003/10/28 23:08:43 tsi Exp $ */
/************************************************************
Copyright 1989, 1998 The Open Group
@ -27,7 +26,6 @@ in this Software without prior written authorization from The Open Group.
/* RANDOM CRUFT! THIS HAS NO OFFICIAL X CONSORTIUM OR X PROJECT TEAM BLESSING */
/* $Xorg: mitmisc.c,v 1.4 2001/02/09 02:04:32 xorgcvs Exp $ */
#define NEED_EVENTS
#ifdef HAVE_DIX_CONFIG_H
@ -44,8 +42,6 @@ in this Software without prior written authorization from The Open Group.
#include <X11/extensions/mitmiscstr.h>
#include "modinit.h"
extern Bool permitOldBugs;
#if 0
static unsigned char MITReqCode;
#endif
@ -92,12 +88,8 @@ ProcMITSetBugMode(client)
REQUEST(xMITSetBugModeReq);
REQUEST_SIZE_MATCH(xMITSetBugModeReq);
if ((stuff->onOff != xTrue) && (stuff->onOff != xFalse))
{
client->errorValue = stuff->onOff;
return BadValue;
}
permitOldBugs = stuff->onOff;
if (stuff->onOff != xFalse)
return BadRequest;
return(client->noClientException);
}
@ -112,7 +104,7 @@ ProcMITGetBugMode(client)
rep.type = X_Reply;
rep.length = 0;
rep.sequenceNumber = client->sequence;
rep.onOff = permitOldBugs;
rep.onOff = FALSE;
if (client->swapped) {
swaps(&rep.sequenceNumber, n);
swapl(&rep.length, n);

View File

@ -1,4 +1,3 @@
/* $Xorg: panoramiX.c,v 1.5 2000/08/17 19:47:57 cpqbld Exp $ */
/*****************************************************************
Copyright (c) 1991, 1997 Digital Equipment Corporation, Maynard, Massachusetts.
Permission is hereby granted, free of charge, to any person obtaining a copy
@ -23,7 +22,6 @@ shall not be used in advertising or otherwise to promote the sale, use or other
dealings in this Software without prior written authorization from Digital
Equipment Corporation.
******************************************************************/
/* $XFree86: xc/programs/Xserver/Xext/panoramiX.c,v 3.37tsi Exp $ */
#ifdef HAVE_DIX_CONFIG_H
#include <dix-config.h>
@ -960,12 +958,13 @@ ProcPanoramiXGetState(ClientPtr client)
REQUEST(xPanoramiXGetStateReq);
WindowPtr pWin;
xPanoramiXGetStateReply rep;
register int n;
register int n, rc;
REQUEST_SIZE_MATCH(xPanoramiXGetStateReq);
pWin = LookupWindow (stuff->window, client);
if (!pWin)
return BadWindow;
rc = dixLookupWindow(&pWin, stuff->window, client, DixUnknownAccess);
if (rc != Success)
return rc;
rep.type = X_Reply;
rep.length = 0;
rep.sequenceNumber = client->sequence;
@ -986,12 +985,13 @@ ProcPanoramiXGetScreenCount(ClientPtr client)
REQUEST(xPanoramiXGetScreenCountReq);
WindowPtr pWin;
xPanoramiXGetScreenCountReply rep;
register int n;
register int n, rc;
REQUEST_SIZE_MATCH(xPanoramiXGetScreenCountReq);
pWin = LookupWindow (stuff->window, client);
if (!pWin)
return BadWindow;
rc = dixLookupWindow(&pWin, stuff->window, client, DixUnknownAccess);
if (rc != Success)
return rc;
rep.type = X_Reply;
rep.length = 0;
rep.sequenceNumber = client->sequence;
@ -1011,12 +1011,13 @@ ProcPanoramiXGetScreenSize(ClientPtr client)
REQUEST(xPanoramiXGetScreenSizeReq);
WindowPtr pWin;
xPanoramiXGetScreenSizeReply rep;
register int n;
register int n, rc;
REQUEST_SIZE_MATCH(xPanoramiXGetScreenSizeReq);
pWin = LookupWindow (stuff->window, client);
if (!pWin)
return BadWindow;
rc = dixLookupWindow(&pWin, stuff->window, client, DixUnknownAccess);
if (rc != Success)
return rc;
rep.type = X_Reply;
rep.length = 0;
rep.sequenceNumber = client->sequence;
@ -1049,7 +1050,6 @@ ProcXineramaIsActive(ClientPtr client)
{
/* The following hack fools clients into thinking that Xinerama
* is disabled even though it is not. */
extern Bool PanoramiXExtensionDisabledHack;
rep.state = !noPanoramiXExtension && !PanoramiXExtensionDisabledHack;
}
#else

View File

@ -1,5 +1,4 @@
/* $TOG: panoramiX.h /main/4 1998/03/17 06:51:02 kaleb $ */
/* $XdotOrg: xc/programs/Xserver/Xext/panoramiX.h,v 1.3 2005/04/20 12:25:12 daniels Exp $ */
/*****************************************************************
Copyright (c) 1991, 1997 Digital Equipment Corporation, Maynard, Massachusetts.
@ -28,7 +27,6 @@ Equipment Corporation.
******************************************************************/
/* $XFree86: xc/programs/Xserver/Xext/panoramiX.h,v 1.5 2001/01/03 02:54:17 keithp Exp $ */
/* THIS IS NOT AN X PROJECT TEAM SPECIFICATION */

View File

@ -1,4 +1,3 @@
/* $Xorg: panoramiXSwap.c,v 1.4 2000/08/17 19:47:57 cpqbld Exp $ */
/*****************************************************************
Copyright (c) 1991, 1997 Digital Equipment Corporation, Maynard, Massachusetts.
Permission is hereby granted, free of charge, to any person obtaining a copy
@ -23,7 +22,6 @@ shall not be used in advertising or otherwise to promote the sale, use or other
dealings in this Software without prior written authorization from Digital
Equipment Corporation.
******************************************************************/
/* $XFree86: xc/programs/Xserver/Xext/panoramiXSwap.c,v 3.9 2003/07/16 01:38:29 dawes Exp $ */
#ifdef HAVE_DIX_CONFIG_H
#include <dix-config.h>

View File

@ -1,4 +1,3 @@
/* $XFree86: xc/programs/Xserver/Xext/panoramiXh.h,v 1.2 2003/09/13 21:33:03 dawes Exp $ */
/*
* Server dispatcher function replacements

View File

@ -1,4 +1,3 @@
/* $Xorg: panoramiXprocs.c,v 1.5 2000/08/17 19:47:57 cpqbld Exp $ */
/*****************************************************************
Copyright (c) 1991, 1997 Digital Equipment Corporation, Maynard, Massachusetts.
Permission is hereby granted, free of charge, to any person obtaining a copy
@ -26,7 +25,6 @@ Equipment Corporation.
/* Massively rewritten by Mark Vojkovich <markv@valinux.com> */
/* $XFree86: xc/programs/Xserver/Xext/panoramiXprocs.c,v 3.36tsi Exp $ */
#ifdef HAVE_DIX_CONFIG_H
#include <dix-config.h>
@ -93,7 +91,7 @@ int PanoramiXCreateWindow(ClientPtr client)
return BadLength;
if (!(parent = (PanoramiXRes *)SecurityLookupIDByType(
client, stuff->parent, XRT_WINDOW, SecurityWriteAccess)))
client, stuff->parent, XRT_WINDOW, DixWriteAccess)))
return BadWindow;
if(stuff->class == CopyFromParent)
@ -107,7 +105,7 @@ int PanoramiXCreateWindow(ClientPtr client)
tmp = *((CARD32 *) &stuff[1] + pback_offset);
if ((tmp != None) && (tmp != ParentRelative)) {
if(!(backPix = (PanoramiXRes*) SecurityLookupIDByType(
client, tmp, XRT_PIXMAP, SecurityReadAccess)))
client, tmp, XRT_PIXMAP, DixReadAccess)))
return BadPixmap;
}
}
@ -116,7 +114,7 @@ int PanoramiXCreateWindow(ClientPtr client)
tmp = *((CARD32 *) &stuff[1] + pbord_offset);
if (tmp != CopyFromParent) {
if(!(bordPix = (PanoramiXRes*) SecurityLookupIDByType(
client, tmp, XRT_PIXMAP, SecurityReadAccess)))
client, tmp, XRT_PIXMAP, DixReadAccess)))
return BadPixmap;
}
}
@ -125,7 +123,7 @@ int PanoramiXCreateWindow(ClientPtr client)
tmp = *((CARD32 *) &stuff[1] + cmap_offset);
if ((tmp != CopyFromParent) && (tmp != None)) {
if(!(cmap = (PanoramiXRes*) SecurityLookupIDByType(
client, tmp, XRT_COLORMAP, SecurityReadAccess)))
client, tmp, XRT_COLORMAP, DixReadAccess)))
return BadColor;
}
}
@ -194,7 +192,7 @@ int PanoramiXChangeWindowAttributes(ClientPtr client)
return BadLength;
if (!(win = (PanoramiXRes *)SecurityLookupIDByType(
client, stuff->window, XRT_WINDOW, SecurityWriteAccess)))
client, stuff->window, XRT_WINDOW, DixWriteAccess)))
return BadWindow;
if((win->u.win.class == InputOnly) &&
@ -206,7 +204,7 @@ int PanoramiXChangeWindowAttributes(ClientPtr client)
tmp = *((CARD32 *) &stuff[1] + pback_offset);
if ((tmp != None) && (tmp != ParentRelative)) {
if(!(backPix = (PanoramiXRes*) SecurityLookupIDByType(
client, tmp, XRT_PIXMAP, SecurityReadAccess)))
client, tmp, XRT_PIXMAP, DixReadAccess)))
return BadPixmap;
}
}
@ -215,7 +213,7 @@ int PanoramiXChangeWindowAttributes(ClientPtr client)
tmp = *((CARD32 *) &stuff[1] + pbord_offset);
if (tmp != CopyFromParent) {
if(!(bordPix = (PanoramiXRes*) SecurityLookupIDByType(
client, tmp, XRT_PIXMAP, SecurityReadAccess)))
client, tmp, XRT_PIXMAP, DixReadAccess)))
return BadPixmap;
}
}
@ -224,7 +222,7 @@ int PanoramiXChangeWindowAttributes(ClientPtr client)
tmp = *((CARD32 *) &stuff[1] + cmap_offset);
if ((tmp != CopyFromParent) && (tmp != None)) {
if(!(cmap = (PanoramiXRes*) SecurityLookupIDByType(
client, tmp, XRT_COLORMAP, SecurityReadAccess)))
client, tmp, XRT_COLORMAP, DixReadAccess)))
return BadColor;
}
}
@ -253,7 +251,7 @@ int PanoramiXDestroyWindow(ClientPtr client)
REQUEST_SIZE_MATCH(xResourceReq);
if(!(win = (PanoramiXRes *)SecurityLookupIDByType(
client, stuff->id, XRT_WINDOW, SecurityDestroyAccess)))
client, stuff->id, XRT_WINDOW, DixDestroyAccess)))
return BadWindow;
FOR_NSCREENS_BACKWARD(j) {
@ -278,7 +276,7 @@ int PanoramiXDestroySubwindows(ClientPtr client)
REQUEST_SIZE_MATCH(xResourceReq);
if(!(win = (PanoramiXRes *)SecurityLookupIDByType(
client, stuff->id, XRT_WINDOW, SecurityDestroyAccess)))
client, stuff->id, XRT_WINDOW, DixDestroyAccess)))
return BadWindow;
FOR_NSCREENS_BACKWARD(j) {
@ -303,7 +301,7 @@ int PanoramiXChangeSaveSet(ClientPtr client)
REQUEST_SIZE_MATCH(xChangeSaveSetReq);
if(!(win = (PanoramiXRes *)SecurityLookupIDByType(
client, stuff->window, XRT_WINDOW, SecurityReadAccess)))
client, stuff->window, XRT_WINDOW, DixReadAccess)))
return BadWindow;
FOR_NSCREENS_BACKWARD(j) {
@ -327,11 +325,11 @@ int PanoramiXReparentWindow(ClientPtr client)
REQUEST_SIZE_MATCH(xReparentWindowReq);
if(!(win = (PanoramiXRes *)SecurityLookupIDByType(
client, stuff->window, XRT_WINDOW, SecurityWriteAccess)))
client, stuff->window, XRT_WINDOW, DixWriteAccess)))
return BadWindow;
if(!(parent = (PanoramiXRes *)SecurityLookupIDByType(
client, stuff->parent, XRT_WINDOW, SecurityWriteAccess)))
client, stuff->parent, XRT_WINDOW, DixWriteAccess)))
return BadWindow;
x = stuff->x;
@ -362,7 +360,7 @@ int PanoramiXMapWindow(ClientPtr client)
REQUEST_SIZE_MATCH(xResourceReq);
if(!(win = (PanoramiXRes *)SecurityLookupIDByType(
client, stuff->id, XRT_WINDOW, SecurityReadAccess)))
client, stuff->id, XRT_WINDOW, DixReadAccess)))
return BadWindow;
FOR_NSCREENS_FORWARD(j) {
@ -384,7 +382,7 @@ int PanoramiXMapSubwindows(ClientPtr client)
REQUEST_SIZE_MATCH(xResourceReq);
if(!(win = (PanoramiXRes *)SecurityLookupIDByType(
client, stuff->id, XRT_WINDOW, SecurityReadAccess)))
client, stuff->id, XRT_WINDOW, DixReadAccess)))
return BadWindow;
FOR_NSCREENS_FORWARD(j) {
@ -406,7 +404,7 @@ int PanoramiXUnmapWindow(ClientPtr client)
REQUEST_SIZE_MATCH(xResourceReq);
if(!(win = (PanoramiXRes *)SecurityLookupIDByType(
client, stuff->id, XRT_WINDOW, SecurityReadAccess)))
client, stuff->id, XRT_WINDOW, DixReadAccess)))
return BadWindow;
FOR_NSCREENS_FORWARD(j) {
@ -428,7 +426,7 @@ int PanoramiXUnmapSubwindows(ClientPtr client)
REQUEST_SIZE_MATCH(xResourceReq);
if(!(win = (PanoramiXRes *)SecurityLookupIDByType(
client, stuff->id, XRT_WINDOW, SecurityReadAccess)))
client, stuff->id, XRT_WINDOW, DixReadAccess)))
return BadWindow;
FOR_NSCREENS_FORWARD(j) {
@ -459,11 +457,11 @@ int PanoramiXConfigureWindow(ClientPtr client)
/* because we need the parent */
if (!(pWin = (WindowPtr)SecurityLookupIDByType(
client, stuff->window, RT_WINDOW, SecurityWriteAccess)))
client, stuff->window, RT_WINDOW, DixWriteAccess)))
return BadWindow;
if (!(win = (PanoramiXRes *)SecurityLookupIDByType(
client, stuff->window, XRT_WINDOW, SecurityWriteAccess)))
client, stuff->window, XRT_WINDOW, DixWriteAccess)))
return BadWindow;
if ((Mask)stuff->mask & CWSibling) {
@ -471,7 +469,7 @@ int PanoramiXConfigureWindow(ClientPtr client)
sib_offset = Ones((Mask)stuff->mask & (CWSibling - 1));
if ((tmp = *((CARD32 *) &stuff[1] + sib_offset))) {
if(!(sib = (PanoramiXRes*) SecurityLookupIDByType(
client, tmp, XRT_WINDOW, SecurityReadAccess)))
client, tmp, XRT_WINDOW, DixReadAccess)))
return BadWindow;
}
}
@ -516,7 +514,7 @@ int PanoramiXCirculateWindow(ClientPtr client)
REQUEST_SIZE_MATCH(xCirculateWindowReq);
if(!(win = (PanoramiXRes *)SecurityLookupIDByType(
client, stuff->window, XRT_WINDOW, SecurityWriteAccess)))
client, stuff->window, XRT_WINDOW, DixWriteAccess)))
return BadWindow;
FOR_NSCREENS_FORWARD(j) {
@ -533,10 +531,14 @@ int PanoramiXGetGeometry(ClientPtr client)
{
xGetGeometryReply rep;
DrawablePtr pDraw;
int rc;
REQUEST(xResourceReq);
REQUEST_SIZE_MATCH(xResourceReq);
VERIFY_GEOMETRABLE (pDraw, stuff->id, client);
rc = dixLookupDrawable(&pDraw, stuff->id, client, M_ANY, DixUnknownAccess);
if (rc != Success)
return rc;
rep.type = X_Reply;
rep.length = 0;
rep.sequenceNumber = client->sequence;
@ -575,19 +577,17 @@ int PanoramiXTranslateCoords(ClientPtr client)
{
INT16 x, y;
REQUEST(xTranslateCoordsReq);
register WindowPtr pWin, pDst;
int rc;
WindowPtr pWin, pDst;
xTranslateCoordsReply rep;
REQUEST_SIZE_MATCH(xTranslateCoordsReq);
pWin = (WindowPtr)SecurityLookupWindow(stuff->srcWid, client,
SecurityReadAccess);
if (!pWin)
return(BadWindow);
pDst = (WindowPtr)SecurityLookupWindow(stuff->dstWid, client,
SecurityReadAccess);
if (!pDst)
return(BadWindow);
rc = dixLookupWindow(&pWin, stuff->srcWid, client, DixReadAccess);
if (rc != Success)
return rc;
rc = dixLookupWindow(&pDst, stuff->dstWid, client, DixReadAccess);
if (rc != Success)
return rc;
rep.type = X_Reply;
rep.length = 0;
rep.sequenceNumber = client->sequence;
@ -657,7 +657,7 @@ int PanoramiXCreatePixmap(ClientPtr client)
client->errorValue = stuff->pid;
if(!(refDraw = (PanoramiXRes *)SecurityLookupIDByClass(
client, stuff->drawable, XRC_DRAWABLE, SecurityReadAccess)))
client, stuff->drawable, XRC_DRAWABLE, DixReadAccess)))
return BadDrawable;
if(!(newPix = (PanoramiXRes *) xalloc(sizeof(PanoramiXRes))))
@ -696,7 +696,7 @@ int PanoramiXFreePixmap(ClientPtr client)
client->errorValue = stuff->id;
if(!(pix = (PanoramiXRes *)SecurityLookupIDByType(
client, stuff->id, XRT_PIXMAP, SecurityDestroyAccess)))
client, stuff->id, XRT_PIXMAP, DixDestroyAccess)))
return BadPixmap;
FOR_NSCREENS_BACKWARD(j) {
@ -732,14 +732,14 @@ int PanoramiXCreateGC(ClientPtr client)
return BadLength;
if (!(refDraw = (PanoramiXRes *)SecurityLookupIDByClass(
client, stuff->drawable, XRC_DRAWABLE, SecurityReadAccess)))
client, stuff->drawable, XRC_DRAWABLE, DixReadAccess)))
return BadDrawable;
if ((Mask)stuff->mask & GCTile) {
tile_offset = Ones((Mask)stuff->mask & (GCTile - 1));
if ((tmp = *((CARD32 *) &stuff[1] + tile_offset))) {
if(!(tile = (PanoramiXRes*) SecurityLookupIDByType(
client, tmp, XRT_PIXMAP, SecurityReadAccess)))
client, tmp, XRT_PIXMAP, DixReadAccess)))
return BadPixmap;
}
}
@ -747,7 +747,7 @@ int PanoramiXCreateGC(ClientPtr client)
stip_offset = Ones((Mask)stuff->mask & (GCStipple - 1));
if ((tmp = *((CARD32 *) &stuff[1] + stip_offset))) {
if(!(stip = (PanoramiXRes*) SecurityLookupIDByType(
client, tmp, XRT_PIXMAP, SecurityReadAccess)))
client, tmp, XRT_PIXMAP, DixReadAccess)))
return BadPixmap;
}
}
@ -755,7 +755,7 @@ int PanoramiXCreateGC(ClientPtr client)
clip_offset = Ones((Mask)stuff->mask & (GCClipMask - 1));
if ((tmp = *((CARD32 *) &stuff[1] + clip_offset))) {
if(!(clip = (PanoramiXRes*) SecurityLookupIDByType(
client, tmp, XRT_PIXMAP, SecurityReadAccess)))
client, tmp, XRT_PIXMAP, DixReadAccess)))
return BadPixmap;
}
}
@ -807,14 +807,14 @@ int PanoramiXChangeGC(ClientPtr client)
return BadLength;
if (!(gc = (PanoramiXRes *)SecurityLookupIDByType(
client, stuff->gc, XRT_GC, SecurityReadAccess)))
client, stuff->gc, XRT_GC, DixReadAccess)))
return BadGC;
if ((Mask)stuff->mask & GCTile) {
tile_offset = Ones((Mask)stuff->mask & (GCTile - 1));
if ((tmp = *((CARD32 *) &stuff[1] + tile_offset))) {
if(!(tile = (PanoramiXRes*) SecurityLookupIDByType(
client, tmp, XRT_PIXMAP, SecurityReadAccess)))
client, tmp, XRT_PIXMAP, DixReadAccess)))
return BadPixmap;
}
}
@ -822,7 +822,7 @@ int PanoramiXChangeGC(ClientPtr client)
stip_offset = Ones((Mask)stuff->mask & (GCStipple - 1));
if ((tmp = *((CARD32 *) &stuff[1] + stip_offset))) {
if(!(stip = (PanoramiXRes*) SecurityLookupIDByType(
client, tmp, XRT_PIXMAP, SecurityReadAccess)))
client, tmp, XRT_PIXMAP, DixReadAccess)))
return BadPixmap;
}
}
@ -830,7 +830,7 @@ int PanoramiXChangeGC(ClientPtr client)
clip_offset = Ones((Mask)stuff->mask & (GCClipMask - 1));
if ((tmp = *((CARD32 *) &stuff[1] + clip_offset))) {
if(!(clip = (PanoramiXRes*) SecurityLookupIDByType(
client, tmp, XRT_PIXMAP, SecurityReadAccess)))
client, tmp, XRT_PIXMAP, DixReadAccess)))
return BadPixmap;
}
}
@ -861,11 +861,11 @@ int PanoramiXCopyGC(ClientPtr client)
REQUEST_SIZE_MATCH(xCopyGCReq);
if(!(srcGC = (PanoramiXRes *)SecurityLookupIDByType(
client, stuff->srcGC, XRT_GC, SecurityReadAccess)))
client, stuff->srcGC, XRT_GC, DixReadAccess)))
return BadGC;
if(!(dstGC = (PanoramiXRes *)SecurityLookupIDByType(
client, stuff->dstGC, XRT_GC, SecurityWriteAccess)))
client, stuff->dstGC, XRT_GC, DixWriteAccess)))
return BadGC;
FOR_NSCREENS(j) {
@ -888,7 +888,7 @@ int PanoramiXSetDashes(ClientPtr client)
REQUEST_FIXED_SIZE(xSetDashesReq, stuff->nDashes);
if(!(gc = (PanoramiXRes *)SecurityLookupIDByType(
client, stuff->gc, XRT_GC, SecurityWriteAccess)))
client, stuff->gc, XRT_GC, DixWriteAccess)))
return BadGC;
FOR_NSCREENS_BACKWARD(j) {
@ -910,7 +910,7 @@ int PanoramiXSetClipRectangles(ClientPtr client)
REQUEST_AT_LEAST_SIZE(xSetClipRectanglesReq);
if(!(gc = (PanoramiXRes *)SecurityLookupIDByType(
client, stuff->gc, XRT_GC, SecurityWriteAccess)))
client, stuff->gc, XRT_GC, DixWriteAccess)))
return BadGC;
FOR_NSCREENS_BACKWARD(j) {
@ -932,7 +932,7 @@ int PanoramiXFreeGC(ClientPtr client)
REQUEST_SIZE_MATCH(xResourceReq);
if(!(gc = (PanoramiXRes *)SecurityLookupIDByType(
client, stuff->id, XRT_GC, SecurityDestroyAccess)))
client, stuff->id, XRT_GC, DixDestroyAccess)))
return BadGC;
FOR_NSCREENS_BACKWARD(j) {
@ -958,7 +958,7 @@ int PanoramiXClearToBackground(ClientPtr client)
REQUEST_SIZE_MATCH(xClearAreaReq);
if(!(win = (PanoramiXRes *)SecurityLookupIDByType(
client, stuff->window, XRT_WINDOW, SecurityWriteAccess)))
client, stuff->window, XRT_WINDOW, DixWriteAccess)))
return BadWindow;
x = stuff->x;
@ -1000,13 +1000,13 @@ int PanoramiXCopyArea(ClientPtr client)
REQUEST_SIZE_MATCH(xCopyAreaReq);
if(!(src = (PanoramiXRes *)SecurityLookupIDByClass(
client, stuff->srcDrawable, XRC_DRAWABLE, SecurityReadAccess)))
client, stuff->srcDrawable, XRC_DRAWABLE, DixReadAccess)))
return BadDrawable;
srcShared = IS_SHARED_PIXMAP(src);
if(!(dst = (PanoramiXRes *)SecurityLookupIDByClass(
client, stuff->dstDrawable, XRC_DRAWABLE, SecurityWriteAccess)))
client, stuff->dstDrawable, XRC_DRAWABLE, DixWriteAccess)))
return BadDrawable;
dstShared = IS_SHARED_PIXMAP(dst);
@ -1015,7 +1015,7 @@ int PanoramiXCopyArea(ClientPtr client)
return (* SavedProcVector[X_CopyArea])(client);
if(!(gc = (PanoramiXRes *)SecurityLookupIDByType(
client, stuff->gc, XRT_GC, SecurityReadAccess)))
client, stuff->gc, XRT_GC, DixReadAccess)))
return BadGC;
if((dst->type == XRT_WINDOW) && dst->u.win.root)
@ -1030,10 +1030,14 @@ int PanoramiXCopyArea(ClientPtr client)
DrawablePtr pDst;
GCPtr pGC;
char *data;
int pitch;
int pitch, rc;
FOR_NSCREENS(j)
VERIFY_DRAWABLE(drawables[j], src->info[j].id, client);
FOR_NSCREENS(j) {
rc = dixLookupDrawable(drawables+j, src->info[j].id, client, 0,
DixUnknownAccess);
if (rc != Success)
return rc;
}
pitch = PixmapBytePad(stuff->width, drawables[0]->depth);
if(!(data = xcalloc(1, stuff->height * pitch)))
@ -1067,6 +1071,7 @@ int PanoramiXCopyArea(ClientPtr client)
DrawablePtr pDst = NULL, pSrc = NULL;
GCPtr pGC = NULL;
RegionPtr pRgn[MAXSCREENS];
int rc;
FOR_NSCREENS_BACKWARD(j) {
stuff->dstDrawable = dst->info[j].id;
@ -1083,8 +1088,11 @@ int PanoramiXCopyArea(ClientPtr client)
VALIDATE_DRAWABLE_AND_GC(stuff->dstDrawable, pDst, pGC, client);
if (stuff->dstDrawable != stuff->srcDrawable) {
SECURITY_VERIFY_DRAWABLE(pSrc, stuff->srcDrawable, client,
SecurityReadAccess);
rc = dixLookupDrawable(&pSrc, stuff->srcDrawable, client, 0,
DixReadAccess);
if (rc != Success)
return rc;
if ((pDst->pScreen != pSrc->pScreen) ||
(pDst->depth != pSrc->depth)) {
client->errorValue = stuff->dstDrawable;
@ -1135,7 +1143,7 @@ int PanoramiXCopyArea(ClientPtr client)
int PanoramiXCopyPlane(ClientPtr client)
{
int j, srcx, srcy, dstx, dsty;
int j, srcx, srcy, dstx, dsty, rc;
PanoramiXRes *gc, *src, *dst;
Bool srcIsRoot = FALSE;
Bool dstIsRoot = FALSE;
@ -1148,13 +1156,13 @@ int PanoramiXCopyPlane(ClientPtr client)
REQUEST_SIZE_MATCH(xCopyPlaneReq);
if(!(src = (PanoramiXRes *)SecurityLookupIDByClass(
client, stuff->srcDrawable, XRC_DRAWABLE, SecurityReadAccess)))
client, stuff->srcDrawable, XRC_DRAWABLE, DixReadAccess)))
return BadDrawable;
srcShared = IS_SHARED_PIXMAP(src);
if(!(dst = (PanoramiXRes *)SecurityLookupIDByClass(
client, stuff->dstDrawable, XRC_DRAWABLE, SecurityWriteAccess)))
client, stuff->dstDrawable, XRC_DRAWABLE, DixWriteAccess)))
return BadDrawable;
dstShared = IS_SHARED_PIXMAP(dst);
@ -1163,7 +1171,7 @@ int PanoramiXCopyPlane(ClientPtr client)
return (* SavedProcVector[X_CopyPlane])(client);
if(!(gc = (PanoramiXRes *)SecurityLookupIDByType(
client, stuff->gc, XRT_GC, SecurityReadAccess)))
client, stuff->gc, XRT_GC, DixReadAccess)))
return BadGC;
if((dst->type == XRT_WINDOW) && dst->u.win.root)
@ -1189,8 +1197,11 @@ int PanoramiXCopyPlane(ClientPtr client)
VALIDATE_DRAWABLE_AND_GC(stuff->dstDrawable, pdstDraw, pGC, client);
if (stuff->dstDrawable != stuff->srcDrawable) {
SECURITY_VERIFY_DRAWABLE(psrcDraw, stuff->srcDrawable, client,
SecurityReadAccess);
rc = dixLookupDrawable(&psrcDraw, stuff->srcDrawable, client, 0,
DixReadAccess);
if (rc != Success)
return rc;
if (pdstDraw->pScreen != psrcDraw->pScreen) {
client->errorValue = stuff->dstDrawable;
return (BadMatch);
@ -1248,14 +1259,14 @@ int PanoramiXPolyPoint(ClientPtr client)
REQUEST_AT_LEAST_SIZE(xPolyPointReq);
if(!(draw = (PanoramiXRes *)SecurityLookupIDByClass(
client, stuff->drawable, XRC_DRAWABLE, SecurityWriteAccess)))
client, stuff->drawable, XRC_DRAWABLE, DixWriteAccess)))
return BadDrawable;
if(IS_SHARED_PIXMAP(draw))
return (*SavedProcVector[X_PolyPoint])(client);
if(!(gc = (PanoramiXRes *)SecurityLookupIDByType(
client, stuff->gc, XRT_GC, SecurityReadAccess)))
client, stuff->gc, XRT_GC, DixReadAccess)))
return BadGC;
isRoot = (draw->type == XRT_WINDOW) && draw->u.win.root;
@ -1306,14 +1317,14 @@ int PanoramiXPolyLine(ClientPtr client)
REQUEST_AT_LEAST_SIZE(xPolyLineReq);
if(!(draw = (PanoramiXRes *)SecurityLookupIDByClass(
client, stuff->drawable, XRC_DRAWABLE, SecurityWriteAccess)))
client, stuff->drawable, XRC_DRAWABLE, DixWriteAccess)))
return BadDrawable;
if(IS_SHARED_PIXMAP(draw))
return (*SavedProcVector[X_PolyLine])(client);
if(!(gc = (PanoramiXRes *)SecurityLookupIDByType(
client, stuff->gc, XRT_GC, SecurityReadAccess)))
client, stuff->gc, XRT_GC, DixReadAccess)))
return BadGC;
isRoot = (draw->type == XRT_WINDOW) && draw->u.win.root;
@ -1364,14 +1375,14 @@ int PanoramiXPolySegment(ClientPtr client)
REQUEST_AT_LEAST_SIZE(xPolySegmentReq);
if(!(draw = (PanoramiXRes *)SecurityLookupIDByClass(
client, stuff->drawable, XRC_DRAWABLE, SecurityWriteAccess)))
client, stuff->drawable, XRC_DRAWABLE, DixWriteAccess)))
return BadDrawable;
if(IS_SHARED_PIXMAP(draw))
return (*SavedProcVector[X_PolySegment])(client);
if(!(gc = (PanoramiXRes *)SecurityLookupIDByType(
client, stuff->gc, XRT_GC, SecurityReadAccess)))
client, stuff->gc, XRT_GC, DixReadAccess)))
return BadGC;
isRoot = (draw->type == XRT_WINDOW) && draw->u.win.root;
@ -1426,14 +1437,14 @@ int PanoramiXPolyRectangle(ClientPtr client)
if(!(draw = (PanoramiXRes *)SecurityLookupIDByClass(
client, stuff->drawable, XRC_DRAWABLE, SecurityWriteAccess)))
client, stuff->drawable, XRC_DRAWABLE, DixWriteAccess)))
return BadDrawable;
if(IS_SHARED_PIXMAP(draw))
return (*SavedProcVector[X_PolyRectangle])(client);
if(!(gc = (PanoramiXRes *)SecurityLookupIDByType(
client, stuff->gc, XRT_GC, SecurityReadAccess)))
client, stuff->gc, XRT_GC, DixReadAccess)))
return BadGC;
isRoot = (draw->type == XRT_WINDOW) && draw->u.win.root;
@ -1486,14 +1497,14 @@ int PanoramiXPolyArc(ClientPtr client)
REQUEST_AT_LEAST_SIZE(xPolyArcReq);
if(!(draw = (PanoramiXRes *)SecurityLookupIDByClass(
client, stuff->drawable, XRC_DRAWABLE, SecurityWriteAccess)))
client, stuff->drawable, XRC_DRAWABLE, DixWriteAccess)))
return BadDrawable;
if(IS_SHARED_PIXMAP(draw))
return (*SavedProcVector[X_PolyArc])(client);
if(!(gc = (PanoramiXRes *)SecurityLookupIDByType(
client, stuff->gc, XRT_GC, SecurityReadAccess)))
client, stuff->gc, XRT_GC, DixReadAccess)))
return BadGC;
isRoot = (draw->type == XRT_WINDOW) && draw->u.win.root;
@ -1544,14 +1555,14 @@ int PanoramiXFillPoly(ClientPtr client)
REQUEST_AT_LEAST_SIZE(xFillPolyReq);
if(!(draw = (PanoramiXRes *)SecurityLookupIDByClass(
client, stuff->drawable, XRC_DRAWABLE, SecurityWriteAccess)))
client, stuff->drawable, XRC_DRAWABLE, DixWriteAccess)))
return BadDrawable;
if(IS_SHARED_PIXMAP(draw))
return (*SavedProcVector[X_FillPoly])(client);
if(!(gc = (PanoramiXRes *)SecurityLookupIDByType(
client, stuff->gc, XRT_GC, SecurityReadAccess)))
client, stuff->gc, XRT_GC, DixReadAccess)))
return BadGC;
isRoot = (draw->type == XRT_WINDOW) && draw->u.win.root;
@ -1603,14 +1614,14 @@ int PanoramiXPolyFillRectangle(ClientPtr client)
REQUEST_AT_LEAST_SIZE(xPolyFillRectangleReq);
if(!(draw = (PanoramiXRes *)SecurityLookupIDByClass(
client, stuff->drawable, XRC_DRAWABLE, SecurityWriteAccess)))
client, stuff->drawable, XRC_DRAWABLE, DixWriteAccess)))
return BadDrawable;
if(IS_SHARED_PIXMAP(draw))
return (*SavedProcVector[X_PolyFillRectangle])(client);
if(!(gc = (PanoramiXRes *)SecurityLookupIDByType(
client, stuff->gc, XRT_GC, SecurityReadAccess)))
client, stuff->gc, XRT_GC, DixReadAccess)))
return BadGC;
isRoot = (draw->type == XRT_WINDOW) && draw->u.win.root;
@ -1662,14 +1673,14 @@ int PanoramiXPolyFillArc(ClientPtr client)
REQUEST_AT_LEAST_SIZE(xPolyFillArcReq);
if(!(draw = (PanoramiXRes *)SecurityLookupIDByClass(
client, stuff->drawable, XRC_DRAWABLE, SecurityWriteAccess)))
client, stuff->drawable, XRC_DRAWABLE, DixWriteAccess)))
return BadDrawable;
if(IS_SHARED_PIXMAP(draw))
return (*SavedProcVector[X_PolyFillArc])(client);
if(!(gc = (PanoramiXRes *)SecurityLookupIDByType(
client, stuff->gc, XRT_GC, SecurityReadAccess)))
client, stuff->gc, XRT_GC, DixReadAccess)))
return BadGC;
isRoot = (draw->type == XRT_WINDOW) && draw->u.win.root;
@ -1720,14 +1731,14 @@ int PanoramiXPutImage(ClientPtr client)
REQUEST_AT_LEAST_SIZE(xPutImageReq);
if(!(draw = (PanoramiXRes *)SecurityLookupIDByClass(
client, stuff->drawable, XRC_DRAWABLE, SecurityWriteAccess)))
client, stuff->drawable, XRC_DRAWABLE, DixWriteAccess)))
return BadDrawable;
if(IS_SHARED_PIXMAP(draw))
return (*SavedProcVector[X_PutImage])(client);
if(!(gc = (PanoramiXRes *)SecurityLookupIDByType(
client, stuff->gc, XRT_GC, SecurityReadAccess)))
client, stuff->gc, XRT_GC, DixReadAccess)))
return BadGC;
isRoot = (draw->type == XRT_WINDOW) && draw->u.win.root;
@ -1756,7 +1767,7 @@ int PanoramiXGetImage(ClientPtr client)
xGetImageReply xgi;
Bool isRoot;
char *pBuf;
int i, x, y, w, h, format;
int i, x, y, w, h, format, rc;
Mask plane = 0, planemask;
int linesDone, nlines, linesPerBuf;
long widthBytesLine, length;
@ -1771,13 +1782,16 @@ int PanoramiXGetImage(ClientPtr client)
}
if(!(draw = (PanoramiXRes *)SecurityLookupIDByClass(
client, stuff->drawable, XRC_DRAWABLE, SecurityWriteAccess)))
client, stuff->drawable, XRC_DRAWABLE, DixWriteAccess)))
return BadDrawable;
if(draw->type == XRT_PIXMAP)
return (*SavedProcVector[X_GetImage])(client);
VERIFY_DRAWABLE(pDraw, stuff->drawable, client);
rc = dixLookupDrawable(&pDraw, stuff->drawable, client, 0,
DixUnknownAccess);
if (rc != Success)
return rc;
if(!((WindowPtr)pDraw)->realized)
return(BadMatch);
@ -1811,8 +1825,12 @@ int PanoramiXGetImage(ClientPtr client)
}
drawables[0] = pDraw;
for(i = 1; i < PanoramiXNumScreens; i++)
VERIFY_DRAWABLE(drawables[i], draw->info[i].id, client);
for(i = 1; i < PanoramiXNumScreens; i++) {
rc = dixLookupDrawable(drawables+i, draw->info[i].id, client, 0,
DixUnknownAccess);
if (rc != Success)
return rc;
}
xgi.visual = wVisual (((WindowPtr) pDraw));
xgi.type = X_Reply;
@ -1911,14 +1929,14 @@ PanoramiXPolyText8(ClientPtr client)
REQUEST_AT_LEAST_SIZE(xPolyTextReq);
if(!(draw = (PanoramiXRes *)SecurityLookupIDByClass(
client, stuff->drawable, XRC_DRAWABLE, SecurityWriteAccess)))
client, stuff->drawable, XRC_DRAWABLE, DixWriteAccess)))
return BadDrawable;
if(IS_SHARED_PIXMAP(draw))
return (*SavedProcVector[X_PolyText8])(client);
if(!(gc = (PanoramiXRes *)SecurityLookupIDByType(
client, stuff->gc, XRT_GC, SecurityReadAccess)))
client, stuff->gc, XRT_GC, DixReadAccess)))
return BadGC;
isRoot = (draw->type == XRT_WINDOW) && draw->u.win.root;
@ -1950,14 +1968,14 @@ PanoramiXPolyText16(ClientPtr client)
REQUEST_AT_LEAST_SIZE(xPolyTextReq);
if(!(draw = (PanoramiXRes *)SecurityLookupIDByClass(
client, stuff->drawable, XRC_DRAWABLE, SecurityWriteAccess)))
client, stuff->drawable, XRC_DRAWABLE, DixWriteAccess)))
return BadDrawable;
if(IS_SHARED_PIXMAP(draw))
return (*SavedProcVector[X_PolyText16])(client);
if(!(gc = (PanoramiXRes *)SecurityLookupIDByType(
client, stuff->gc, XRT_GC, SecurityReadAccess)))
client, stuff->gc, XRT_GC, DixReadAccess)))
return BadGC;
isRoot = (draw->type == XRT_WINDOW) && draw->u.win.root;
@ -1989,14 +2007,14 @@ int PanoramiXImageText8(ClientPtr client)
REQUEST_FIXED_SIZE(xImageTextReq, stuff->nChars);
if(!(draw = (PanoramiXRes *)SecurityLookupIDByClass(
client, stuff->drawable, XRC_DRAWABLE, SecurityWriteAccess)))
client, stuff->drawable, XRC_DRAWABLE, DixWriteAccess)))
return BadDrawable;
if(IS_SHARED_PIXMAP(draw))
return (*SavedProcVector[X_ImageText8])(client);
if(!(gc = (PanoramiXRes *)SecurityLookupIDByType(
client, stuff->gc, XRT_GC, SecurityReadAccess)))
client, stuff->gc, XRT_GC, DixReadAccess)))
return BadGC;
isRoot = (draw->type == XRT_WINDOW) && draw->u.win.root;
@ -2028,14 +2046,14 @@ int PanoramiXImageText16(ClientPtr client)
REQUEST_FIXED_SIZE(xImageTextReq, stuff->nChars << 1);
if(!(draw = (PanoramiXRes *)SecurityLookupIDByClass(
client, stuff->drawable, XRC_DRAWABLE, SecurityWriteAccess)))
client, stuff->drawable, XRC_DRAWABLE, DixWriteAccess)))
return BadDrawable;
if(IS_SHARED_PIXMAP(draw))
return (*SavedProcVector[X_ImageText16])(client);
if(!(gc = (PanoramiXRes *)SecurityLookupIDByType(
client, stuff->gc, XRT_GC, SecurityReadAccess)))
client, stuff->gc, XRT_GC, DixReadAccess)))
return BadGC;
isRoot = (draw->type == XRT_WINDOW) && draw->u.win.root;
@ -2066,7 +2084,7 @@ int PanoramiXCreateColormap(ClientPtr client)
REQUEST_SIZE_MATCH(xCreateColormapReq);
if(!(win = (PanoramiXRes *)SecurityLookupIDByType(
client, stuff->window, XRT_WINDOW, SecurityReadAccess)))
client, stuff->window, XRT_WINDOW, DixReadAccess)))
return BadWindow;
if(!stuff->visual || (stuff->visual > 255))
@ -2109,7 +2127,7 @@ int PanoramiXFreeColormap(ClientPtr client)
client->errorValue = stuff->id;
if(!(cmap = (PanoramiXRes *)SecurityLookupIDByType(
client, stuff->id, XRT_COLORMAP, SecurityDestroyAccess)))
client, stuff->id, XRT_COLORMAP, DixDestroyAccess)))
return BadColor;
FOR_NSCREENS_BACKWARD(j) {
@ -2138,7 +2156,7 @@ PanoramiXCopyColormapAndFree(ClientPtr client)
if(!(cmap = (PanoramiXRes *)SecurityLookupIDByType(
client, stuff->srcCmap, XRT_COLORMAP,
SecurityReadAccess | SecurityWriteAccess)))
DixReadAccess | DixWriteAccess)))
return BadColor;
if(!(newCmap = (PanoramiXRes *) xalloc(sizeof(PanoramiXRes))))
@ -2176,7 +2194,7 @@ int PanoramiXInstallColormap(ClientPtr client)
client->errorValue = stuff->id;
if(!(cmap = (PanoramiXRes *)SecurityLookupIDByType(
client, stuff->id, XRT_COLORMAP, SecurityReadAccess)))
client, stuff->id, XRT_COLORMAP, DixReadAccess)))
return BadColor;
FOR_NSCREENS_BACKWARD(j){
@ -2199,7 +2217,7 @@ int PanoramiXUninstallColormap(ClientPtr client)
client->errorValue = stuff->id;
if(!(cmap = (PanoramiXRes *)SecurityLookupIDByType(
client, stuff->id, XRT_COLORMAP, SecurityReadAccess)))
client, stuff->id, XRT_COLORMAP, DixReadAccess)))
return BadColor;
FOR_NSCREENS_BACKWARD(j) {
@ -2222,7 +2240,7 @@ int PanoramiXAllocColor(ClientPtr client)
client->errorValue = stuff->cmap;
if(!(cmap = (PanoramiXRes *)SecurityLookupIDByType(
client, stuff->cmap, XRT_COLORMAP, SecurityWriteAccess)))
client, stuff->cmap, XRT_COLORMAP, DixWriteAccess)))
return BadColor;
FOR_NSCREENS_BACKWARD(j){
@ -2245,7 +2263,7 @@ int PanoramiXAllocNamedColor(ClientPtr client)
client->errorValue = stuff->cmap;
if(!(cmap = (PanoramiXRes *)SecurityLookupIDByType(
client, stuff->cmap, XRT_COLORMAP, SecurityWriteAccess)))
client, stuff->cmap, XRT_COLORMAP, DixWriteAccess)))
return BadColor;
FOR_NSCREENS_BACKWARD(j){
@ -2268,7 +2286,7 @@ int PanoramiXAllocColorCells(ClientPtr client)
client->errorValue = stuff->cmap;
if(!(cmap = (PanoramiXRes *)SecurityLookupIDByType(
client, stuff->cmap, XRT_COLORMAP, SecurityWriteAccess)))
client, stuff->cmap, XRT_COLORMAP, DixWriteAccess)))
return BadColor;
FOR_NSCREENS_BACKWARD(j){
@ -2291,7 +2309,7 @@ int PanoramiXAllocColorPlanes(ClientPtr client)
client->errorValue = stuff->cmap;
if(!(cmap = (PanoramiXRes *)SecurityLookupIDByType(
client, stuff->cmap, XRT_COLORMAP, SecurityWriteAccess)))
client, stuff->cmap, XRT_COLORMAP, DixWriteAccess)))
return BadColor;
FOR_NSCREENS_BACKWARD(j){
@ -2315,7 +2333,7 @@ int PanoramiXFreeColors(ClientPtr client)
client->errorValue = stuff->cmap;
if(!(cmap = (PanoramiXRes *)SecurityLookupIDByType(
client, stuff->cmap, XRT_COLORMAP, SecurityWriteAccess)))
client, stuff->cmap, XRT_COLORMAP, DixWriteAccess)))
return BadColor;
FOR_NSCREENS_BACKWARD(j) {
@ -2337,7 +2355,7 @@ int PanoramiXStoreColors(ClientPtr client)
client->errorValue = stuff->cmap;
if(!(cmap = (PanoramiXRes *)SecurityLookupIDByType(
client, stuff->cmap, XRT_COLORMAP, SecurityWriteAccess)))
client, stuff->cmap, XRT_COLORMAP, DixWriteAccess)))
return BadColor;
FOR_NSCREENS_BACKWARD(j){
@ -2360,7 +2378,7 @@ int PanoramiXStoreNamedColor(ClientPtr client)
client->errorValue = stuff->cmap;
if(!(cmap = (PanoramiXRes *)SecurityLookupIDByType(
client, stuff->cmap, XRT_COLORMAP, SecurityWriteAccess)))
client, stuff->cmap, XRT_COLORMAP, DixWriteAccess)))
return BadColor;
FOR_NSCREENS_BACKWARD(j){

View File

@ -1,4 +1,3 @@
/* $XFree86: xc/programs/Xserver/Xext/panoramiXsrv.h,v 1.8 2001/08/01 00:44:44 tsi Exp $ */
#ifdef HAVE_DIX_CONFIG_H
#include <dix-config.h>

View File

@ -1,4 +1,3 @@
/* $Xorg: sampleEVI.c,v 1.3 2000/08/17 19:47:58 cpqbld Exp $ */
/************************************************************
Copyright (c) 1997 by Silicon Graphics Computer Systems, Inc.
Permission to use, copy, modify, and distribute this

View File

@ -1,6 +1,4 @@
/* $XdotOrg: xserver/xorg/Xext/saver.c,v 1.12 2006/03/31 18:49:38 fredrik Exp $ */
/*
* $XConsortium: saver.c,v 1.12 94/04/17 20:59:36 dpw Exp $
*
Copyright (c) 1992 X Consortium
@ -28,7 +26,6 @@ in this Software without prior written authorization from the X Consortium.
* Author: Keith Packard, MIT X Consortium
*/
/* $XFree86: xc/programs/Xserver/Xext/saver.c,v 3.7 2003/10/28 23:08:43 tsi Exp $ */
#define NEED_REPLIES
#define NEED_EVENTS
@ -783,16 +780,17 @@ ProcScreenSaverQueryInfo (client)
{
REQUEST(xScreenSaverQueryInfoReq);
xScreenSaverQueryInfoReply rep;
register int n;
register int n, rc;
ScreenSaverStuffPtr pSaver;
DrawablePtr pDraw;
CARD32 lastInput;
ScreenSaverScreenPrivatePtr pPriv;
REQUEST_SIZE_MATCH (xScreenSaverQueryInfoReq);
pDraw = (DrawablePtr) LookupDrawable (stuff->drawable, client);
if (!pDraw)
return BadDrawable;
rc = dixLookupDrawable(&pDraw, stuff->drawable, client, 0,
DixUnknownAccess);
if (rc != Success)
return rc;
pSaver = &savedScreenInfo[pDraw->pScreen->myNum];
pPriv = GetScreenPrivate (pDraw->pScreen);
@ -855,11 +853,13 @@ ProcScreenSaverSelectInput (client)
{
REQUEST(xScreenSaverSelectInputReq);
DrawablePtr pDraw;
int rc;
REQUEST_SIZE_MATCH (xScreenSaverSelectInputReq);
pDraw = (DrawablePtr) LookupDrawable (stuff->drawable, client);
if (!pDraw)
return BadDrawable;
rc = dixLookupDrawable (&pDraw, stuff->drawable, client, 0,
DixUnknownAccess);
if (rc != Success)
return rc;
if (!setEventMask (pDraw->pScreen, client, stuff->eventMask))
return BadAlloc;
return Success;
@ -874,9 +874,7 @@ ScreenSaverSetAttributes (ClientPtr client)
ScreenPtr pScreen;
ScreenSaverScreenPrivatePtr pPriv = 0;
ScreenSaverAttrPtr pAttr = 0;
int ret;
int len;
int class, bw, depth;
int ret, len, class, bw, depth;
unsigned long visual;
int idepth, ivisual;
Bool fOK;
@ -894,9 +892,10 @@ ScreenSaverSetAttributes (ClientPtr client)
ColormapPtr pCmap;
REQUEST_AT_LEAST_SIZE (xScreenSaverSetAttributesReq);
pDraw = (DrawablePtr) LookupDrawable (stuff->drawable, client);
if (!pDraw)
return BadDrawable;
ret = dixLookupDrawable(&pDraw, stuff->drawable, client, 0,
DixUnknownAccess);
if (ret != Success)
return ret;
pScreen = pDraw->pScreen;
pParent = WindowTable[pScreen->myNum];
@ -1249,11 +1248,13 @@ ScreenSaverUnsetAttributes (ClientPtr client)
REQUEST(xScreenSaverSetAttributesReq);
DrawablePtr pDraw;
ScreenSaverScreenPrivatePtr pPriv;
int rc;
REQUEST_SIZE_MATCH (xScreenSaverUnsetAttributesReq);
pDraw = (DrawablePtr) LookupDrawable (stuff->drawable, client);
if (!pDraw)
return BadDrawable;
rc = dixLookupDrawable(&pDraw, stuff->drawable, client, 0,
DixUnknownAccess);
if (rc != Success)
return rc;
pPriv = GetScreenPrivate (pDraw->pScreen);
if (pPriv && pPriv->attr && pPriv->attr->client == client)
{
@ -1282,7 +1283,7 @@ ProcScreenSaverSetAttributes (ClientPtr client)
REQUEST_AT_LEAST_SIZE (xScreenSaverSetAttributesReq);
if(!(draw = (PanoramiXRes *)SecurityLookupIDByClass(
client, stuff->drawable, XRC_DRAWABLE, SecurityWriteAccess)))
client, stuff->drawable, XRC_DRAWABLE, DixWriteAccess)))
return BadDrawable;
len = stuff->length - (sizeof(xScreenSaverSetAttributesReq) >> 2);
@ -1294,7 +1295,7 @@ ProcScreenSaverSetAttributes (ClientPtr client)
tmp = *((CARD32 *) &stuff[1] + pback_offset);
if ((tmp != None) && (tmp != ParentRelative)) {
if(!(backPix = (PanoramiXRes*) SecurityLookupIDByType(
client, tmp, XRT_PIXMAP, SecurityReadAccess)))
client, tmp, XRT_PIXMAP, DixReadAccess)))
return BadPixmap;
}
}
@ -1304,7 +1305,7 @@ ProcScreenSaverSetAttributes (ClientPtr client)
tmp = *((CARD32 *) &stuff[1] + pbord_offset);
if (tmp != CopyFromParent) {
if(!(bordPix = (PanoramiXRes*) SecurityLookupIDByType(
client, tmp, XRT_PIXMAP, SecurityReadAccess)))
client, tmp, XRT_PIXMAP, DixReadAccess)))
return BadPixmap;
}
}
@ -1314,7 +1315,7 @@ ProcScreenSaverSetAttributes (ClientPtr client)
tmp = *((CARD32 *) &stuff[1] + cmap_offset);
if ((tmp != CopyFromParent) && (tmp != None)) {
if(!(cmap = (PanoramiXRes*) SecurityLookupIDByType(
client, tmp, XRT_COLORMAP, SecurityReadAccess)))
client, tmp, XRT_COLORMAP, DixReadAccess)))
return BadColor;
}
}
@ -1354,7 +1355,7 @@ ProcScreenSaverUnsetAttributes (ClientPtr client)
int i;
if(!(draw = (PanoramiXRes *)SecurityLookupIDByClass(
client, stuff->drawable, XRC_DRAWABLE, SecurityWriteAccess)))
client, stuff->drawable, XRC_DRAWABLE, DixWriteAccess)))
return BadDrawable;
for(i = PanoramiXNumScreens - 1; i > 0; i--) {

View File

@ -1,5 +1,3 @@
/* $XdotOrg: xserver/xorg/Xext/security.c,v 1.6 2006/03/28 01:20:59 ajax Exp $ */
/* $Xorg: security.c,v 1.4 2001/02/09 02:04:32 xorgcvs Exp $ */
/*
Copyright 1996, 1998 The Open Group
@ -25,7 +23,6 @@ used in advertising or otherwise to promote the sale, use or other dealings
in this Software without prior written authorization from The Open Group.
*/
/* $XFree86: xc/programs/Xserver/Xext/security.c,v 1.16tsi Exp $ */
#ifdef HAVE_DIX_CONFIG_H
#include <dix-config.h>
@ -39,12 +36,13 @@ in this Software without prior written authorization from The Open Group.
#include "gcstruct.h"
#include "colormapst.h"
#include "propertyst.h"
#define _SECURITY_SERVER
#include "xacestr.h"
#include "securitysrv.h"
#include <X11/extensions/securstr.h>
#include <assert.h>
#include <stdarg.h>
#ifdef XAPPGROUP
#include <X11/extensions/Xagsrv.h>
#include "appgroup.h"
#endif
#include <stdio.h> /* for file reading operations */
#include <X11/Xatom.h> /* for XA_STRING */
@ -61,6 +59,23 @@ in this Software without prior written authorization from The Open Group.
static int SecurityErrorBase; /* first Security error number */
static int SecurityEventBase; /* first Security event number */
static int securityClientPrivateIndex;
static int securityExtnsnPrivateIndex;
/* this is what we store as client security state */
typedef struct {
unsigned int trustLevel;
XID authId;
} SecurityClientStateRec;
#define STATEVAL(extnsn) \
((extnsn)->devPrivates[securityExtnsnPrivateIndex].val)
#define STATEPTR(client) \
((client)->devPrivates[securityClientPrivateIndex].ptr)
#define TRUSTLEVEL(client) \
(((SecurityClientStateRec*)STATEPTR(client))->trustLevel)
#define AUTHID(client) \
(((SecurityClientStateRec*)STATEPTR(client))->authId)
CallbackListPtr SecurityValidateGroupCallback = NULL; /* see security.h */
@ -68,19 +83,8 @@ RESTYPE SecurityAuthorizationResType; /* resource type for authorizations */
static RESTYPE RTEventClient;
/* Proc vectors for untrusted clients, swapped and unswapped versions.
* These are the same as the normal proc vectors except that extensions
* that haven't declared themselves secure will have ProcBadRequest plugged
* in for their major opcode dispatcher. This prevents untrusted clients
* from guessing extension major opcodes and using the extension even though
* the extension can't be listed or queried.
*/
int (*UntrustedProcVector[256])(
ClientPtr /*client*/
);
int (*SwappedUntrustedProcVector[256])(
ClientPtr /*client*/
);
#define CALLBACK(name) static void \
name(CallbackListPtr *pcbl, pointer nulldata, pointer calldata)
/* SecurityAudit
*
@ -94,7 +98,7 @@ int (*SwappedUntrustedProcVector[256])(
* Writes the message to the log file if security logging is on.
*/
void
static void
SecurityAudit(char *format, ...)
{
va_list args;
@ -167,7 +171,7 @@ SecurityDeleteAuthorization(
for (i = 1; i<currentMaxClients; i++)
{
if (clients[i] && (clients[i]->authId == pAuth->id))
if (clients[i] && (AUTHID(clients[i]) == pAuth->id))
CloseDownClient(clients[i]);
}
@ -321,7 +325,7 @@ ProcSecurityQueryVersion(
/* paranoia: this "can't happen" because this extension is hidden
* from untrusted clients, but just in case...
*/
if (client->trustLevel != XSecurityClientTrusted)
if (TRUSTLEVEL(client) != XSecurityClientTrusted)
return BadRequest;
REQUEST_SIZE_MATCH(xSecurityQueryVersionReq);
@ -407,7 +411,7 @@ ProcSecurityGenerateAuthorization(
/* paranoia: this "can't happen" because this extension is hidden
* from untrusted clients, but just in case...
*/
if (client->trustLevel != XSecurityClientTrusted)
if (TRUSTLEVEL(client) != XSecurityClientTrusted)
return BadRequest;
/* check request length */
@ -590,13 +594,13 @@ ProcSecurityRevokeAuthorization(
/* paranoia: this "can't happen" because this extension is hidden
* from untrusted clients, but just in case...
*/
if (client->trustLevel != XSecurityClientTrusted)
if (TRUSTLEVEL(client) != XSecurityClientTrusted)
return BadRequest;
REQUEST_SIZE_MATCH(xSecurityRevokeAuthorizationReq);
pAuth = (SecurityAuthorizationPtr)SecurityLookupIDByType(client,
stuff->authId, SecurityAuthorizationResType, SecurityDestroyAccess);
stuff->authId, SecurityAuthorizationResType, DixDestroyAccess);
if (!pAuth)
return SecurityErrorBase + XSecurityBadAuthorization;
@ -775,12 +779,12 @@ SecurityDetermineEventPropogationLimits(
* An audit message is generated if access is denied.
*/
Bool
SecurityCheckDeviceAccess(client, dev, fromRequest)
ClientPtr client;
DeviceIntPtr dev;
Bool fromRequest;
CALLBACK(SecurityCheckDeviceAccess)
{
XaceDeviceAccessRec *rec = (XaceDeviceAccessRec*)calldata;
ClientPtr client = rec->client;
DeviceIntPtr dev = rec->dev;
Bool fromRequest = rec->fromRequest;
WindowPtr pWin, pStopWin;
Bool untrusted_got_event;
Bool found_event_window;
@ -788,12 +792,12 @@ SecurityCheckDeviceAccess(client, dev, fromRequest)
int reqtype = 0;
/* trusted clients always allowed to do anything */
if (client->trustLevel == XSecurityClientTrusted)
return TRUE;
if (TRUSTLEVEL(client) == XSecurityClientTrusted)
return;
/* device security other than keyboard is not implemented yet */
if (dev != inputInfo.keyboard)
return TRUE;
return;
/* some untrusted client wants access */
@ -808,7 +812,8 @@ SecurityCheckDeviceAccess(client, dev, fromRequest)
case X_SetModifierMapping:
SecurityAudit("client %d attempted request %d\n",
client->index, reqtype);
return FALSE;
rec->rval = FALSE;
return;
default:
break;
}
@ -820,7 +825,7 @@ SecurityCheckDeviceAccess(client, dev, fromRequest)
if (dev->grab)
{
untrusted_got_event =
((rClient(dev->grab))->trustLevel != XSecurityClientTrusted);
(TRUSTLEVEL(rClient(dev->grab)) != XSecurityClientTrusted);
}
else
{
@ -835,7 +840,7 @@ SecurityCheckDeviceAccess(client, dev, fromRequest)
{
found_event_window = TRUE;
client = wClient(pWin);
if (client->trustLevel != XSecurityClientTrusted)
if (TRUSTLEVEL(client) != XSecurityClientTrusted)
{
untrusted_got_event = TRUE;
}
@ -848,7 +853,7 @@ SecurityCheckDeviceAccess(client, dev, fromRequest)
if (other->mask & eventmask)
{
client = rClient(other);
if (client->trustLevel != XSecurityClientTrusted)
if (TRUSTLEVEL(client) != XSecurityClientTrusted)
{
untrusted_got_event = TRUE;
break;
@ -876,8 +881,9 @@ SecurityCheckDeviceAccess(client, dev, fromRequest)
else
SecurityAudit("client %d attempted to access device %d (%s)\n",
client->index, dev->id, devname);
rec->rval = FALSE;
}
return untrusted_got_event;
return;
} /* SecurityCheckDeviceAccess */
@ -949,20 +955,22 @@ SecurityAuditResourceIDAccess(
* Disallowed resource accesses are audited.
*/
static pointer
SecurityCheckResourceIDAccess(
ClientPtr client,
XID id,
RESTYPE rtype,
Mask access_mode,
pointer rval)
CALLBACK(SecurityCheckResourceIDAccess)
{
int cid = CLIENT_ID(id);
int reqtype = ((xReq *)client->requestBuffer)->reqType;
XaceResourceAccessRec *rec = (XaceResourceAccessRec*)calldata;
ClientPtr client = rec->client;
XID id = rec->id;
RESTYPE rtype = rec->rtype;
Mask access_mode = rec->access_mode;
pointer rval = rec->res;
int cid, reqtype;
if (SecurityUnknownAccess == access_mode)
return rval; /* for compatibility, we have to allow access */
if (TRUSTLEVEL(client) == XSecurityClientTrusted ||
DixUnknownAccess == access_mode)
return; /* for compatibility, we have to allow access */
cid = CLIENT_ID(id);
reqtype = ((xReq *)client->requestBuffer)->reqType;
switch (reqtype)
{ /* these are always allowed */
case X_QueryTree:
@ -974,7 +982,7 @@ SecurityCheckResourceIDAccess(
case X_DeleteProperty:
case X_RotateProperties:
case X_ListProperties:
return rval;
return;
default:
break;
}
@ -994,15 +1002,15 @@ SecurityCheckResourceIDAccess(
* competing alternative for grouping clients for security purposes is to
* use app groups. dpw
*/
if (client->trustLevel == clients[cid]->trustLevel
if (TRUSTLEVEL(client) == TRUSTLEVEL(clients[cid])
#ifdef XAPPGROUP
|| (RT_COLORMAP == rtype &&
XagDefaultColormap (client) == (Colormap) id)
#endif
)
return rval;
return;
else
return SecurityAuditResourceIDAccess(client, id);
goto deny;
}
else /* server-owned resource - probably a default colormap or root window */
{
@ -1038,7 +1046,7 @@ SecurityCheckResourceIDAccess(
)
)
{ /* not an ICCCM event */
return SecurityAuditResourceIDAccess(client, id);
goto deny;
}
break;
} /* case X_SendEvent on root */
@ -1056,28 +1064,31 @@ SecurityCheckResourceIDAccess(
~(PropertyChangeMask|StructureNotifyMask)) == 0)
break;
}
return SecurityAuditResourceIDAccess(client, id);
goto deny;
} /* case X_ChangeWindowAttributes on root */
default:
{
/* others not allowed */
return SecurityAuditResourceIDAccess(client, id);
goto deny;
}
}
} /* end server-owned window or drawable */
else if (SecurityAuthorizationResType == rtype)
{
SecurityAuthorizationPtr pAuth = (SecurityAuthorizationPtr)rval;
if (pAuth->trustLevel != client->trustLevel)
return SecurityAuditResourceIDAccess(client, id);
if (pAuth->trustLevel != TRUSTLEVEL(client))
goto deny;
}
else if (RT_COLORMAP != rtype)
{ /* don't allow anything else besides colormaps */
return SecurityAuditResourceIDAccess(client, id);
goto deny;
}
}
return rval;
return;
deny:
SecurityAuditResourceIDAccess(client, id);
rec->rval = FALSE; /* deny access */
} /* SecurityCheckResourceIDAccess */
@ -1096,30 +1107,32 @@ SecurityCheckResourceIDAccess(
* If a new client is connecting, its authorization ID is copied to
* client->authID. If this is a generated authorization, its reference
* count is bumped, its timer is cancelled if it was running, and its
* trustlevel is copied to client->trustLevel.
* trustlevel is copied to TRUSTLEVEL(client).
*
* If a client is disconnecting and the client was using a generated
* authorization, the authorization's reference count is decremented, and
* if it is now zero, the timer for this authorization is started.
*/
static void
SecurityClientStateCallback(
CallbackListPtr *pcbl,
pointer nulldata,
pointer calldata)
CALLBACK(SecurityClientStateCallback)
{
NewClientInfoRec *pci = (NewClientInfoRec *)calldata;
ClientPtr client = pci->client;
switch (client->clientState)
{
case ClientStateRunning:
case ClientStateInitial:
TRUSTLEVEL(client) = XSecurityClientTrusted;
AUTHID(client) = None;
break;
case ClientStateRunning:
{
XID authId = AuthorizationIDOfClient(client);
SecurityAuthorizationPtr pAuth;
client->authId = authId;
TRUSTLEVEL(client) = XSecurityClientTrusted;
AUTHID(client) = authId;
pAuth = (SecurityAuthorizationPtr)LookupIDByType(authId,
SecurityAuthorizationResType);
if (pAuth)
@ -1129,23 +1142,20 @@ SecurityClientStateCallback(
{
if (pAuth->timer) TimerCancel(pAuth->timer);
}
client->trustLevel = pAuth->trustLevel;
if (client->trustLevel != XSecurityClientTrusted)
{
client->CheckAccess = SecurityCheckResourceIDAccess;
client->requestVector = client->swapped ?
SwappedUntrustedProcVector : UntrustedProcVector;
}
TRUSTLEVEL(client) = pAuth->trustLevel;
}
break;
}
case ClientStateGone:
case ClientStateRetained: /* client disconnected */
case ClientStateGone:
case ClientStateRetained: /* client disconnected */
{
XID authId = client->authId;
SecurityAuthorizationPtr pAuth;
pAuth = (SecurityAuthorizationPtr)LookupIDByType(authId,
/* client may not have any state (bad authorization) */
if (!STATEPTR(client))
break;
pAuth = (SecurityAuthorizationPtr)LookupIDByType(AUTHID(client),
SecurityAuthorizationResType);
if (pAuth)
{ /* it is a generated authorization */
@ -1157,128 +1167,72 @@ SecurityClientStateCallback(
}
break;
}
default: break;
default: break;
}
} /* SecurityClientStateCallback */
/* SecurityCensorImage
*
* Called after pScreen->GetImage to prevent pieces or trusted windows from
* being returned in image data from an untrusted window.
*
* Arguments:
* client is the client doing the GetImage.
* pVisibleRegion is the visible region of the window.
* widthBytesLine is the width in bytes of one horizontal line in pBuf.
* pDraw is the source window.
* x, y, w, h is the rectangle of image data from pDraw in pBuf.
* format is the format of the image data in pBuf: ZPixmap or XYPixmap.
* pBuf is the image data.
*
* Returns: nothing.
*
* Side Effects:
* Any part of the rectangle (x, y, w, h) that is outside the visible
* region of the window will be destroyed (overwritten) in pBuf.
*/
void
SecurityCensorImage(client, pVisibleRegion, widthBytesLine, pDraw, x, y, w, h,
format, pBuf)
ClientPtr client;
RegionPtr pVisibleRegion;
long widthBytesLine;
DrawablePtr pDraw;
int x, y, w, h;
unsigned int format;
char * pBuf;
CALLBACK(SecurityCheckDrawableAccess)
{
RegionRec imageRegion; /* region representing x,y,w,h */
RegionRec censorRegion; /* region to obliterate */
BoxRec imageBox;
int nRects;
XaceDrawableAccessRec *rec = (XaceDrawableAccessRec*)calldata;
imageBox.x1 = x;
imageBox.y1 = y;
imageBox.x2 = x + w;
imageBox.y2 = y + h;
REGION_INIT(pScreen, &imageRegion, &imageBox, 1);
REGION_NULL(pScreen, &censorRegion);
if (TRUSTLEVEL(rec->client) != XSecurityClientTrusted)
rec->rval = FALSE;
}
/* censorRegion = imageRegion - visibleRegion */
REGION_SUBTRACT(pScreen, &censorRegion, &imageRegion, pVisibleRegion);
nRects = REGION_NUM_RECTS(&censorRegion);
if (nRects > 0)
{ /* we have something to censor */
GCPtr pScratchGC = NULL;
PixmapPtr pPix = NULL;
xRectangle *pRects = NULL;
Bool failed = FALSE;
int depth = 1;
int bitsPerPixel = 1;
int i;
BoxPtr pBox;
CALLBACK(SecurityCheckMapAccess)
{
XaceMapAccessRec *rec = (XaceMapAccessRec*)calldata;
WindowPtr pWin = rec->pWin;
/* convert region to list-of-rectangles for PolyFillRect */
if (STATEPTR(rec->client) &&
(TRUSTLEVEL(rec->client) != XSecurityClientTrusted) &&
(pWin->drawable.class == InputOnly) &&
(TRUSTLEVEL(wClient(pWin->parent)) == XSecurityClientTrusted))
pRects = (xRectangle *)ALLOCATE_LOCAL(nRects * sizeof(xRectangle *));
if (!pRects)
{
failed = TRUE;
goto failSafe;
}
for (pBox = REGION_RECTS(&censorRegion), i = 0;
i < nRects;
i++, pBox++)
{
pRects[i].x = pBox->x1;
pRects[i].y = pBox->y1 - imageBox.y1;
pRects[i].width = pBox->x2 - pBox->x1;
pRects[i].height = pBox->y2 - pBox->y1;
}
rec->rval = FALSE;
}
/* use pBuf as a fake pixmap */
CALLBACK(SecurityCheckBackgrndAccess)
{
XaceMapAccessRec *rec = (XaceMapAccessRec*)calldata;
if (format == ZPixmap)
{
depth = pDraw->depth;
bitsPerPixel = pDraw->bitsPerPixel;
}
if (TRUSTLEVEL(rec->client) != XSecurityClientTrusted)
rec->rval = FALSE;
}
pPix = GetScratchPixmapHeader(pDraw->pScreen, w, h,
depth, bitsPerPixel,
widthBytesLine, (pointer)pBuf);
if (!pPix)
{
failed = TRUE;
goto failSafe;
}
CALLBACK(SecurityCheckExtAccess)
{
XaceExtAccessRec *rec = (XaceExtAccessRec*)calldata;
pScratchGC = GetScratchGC(depth, pPix->drawable.pScreen);
if (!pScratchGC)
{
failed = TRUE;
goto failSafe;
}
if ((TRUSTLEVEL(rec->client) != XSecurityClientTrusted) &&
!STATEVAL(rec->ext))
ValidateGC(&pPix->drawable, pScratchGC);
(* pScratchGC->ops->PolyFillRect)(&pPix->drawable,
pScratchGC, nRects, pRects);
rec->rval = FALSE;
}
failSafe:
if (failed)
{
/* Censoring was not completed above. To be safe, wipe out
* all the image data so that nothing trusted gets out.
*/
bzero(pBuf, (int)(widthBytesLine * h));
}
if (pRects) DEALLOCATE_LOCAL(pRects);
if (pScratchGC) FreeScratchGC(pScratchGC);
if (pPix) FreeScratchPixmapHeader(pPix);
CALLBACK(SecurityCheckHostlistAccess)
{
XaceHostlistAccessRec *rec = (XaceHostlistAccessRec*)calldata;
if (TRUSTLEVEL(rec->client) != XSecurityClientTrusted)
{
rec->rval = FALSE;
if (rec->access_mode == DixWriteAccess)
SecurityAudit("client %d attempted to change host access\n",
rec->client->index);
else
SecurityAudit("client %d attempted to list hosts\n",
rec->client->index);
}
REGION_UNINIT(pScreen, &imageRegion);
REGION_UNINIT(pScreen, &censorRegion);
} /* SecurityCensorImage */
}
CALLBACK(SecurityDeclareExtSecure)
{
XaceDeclareExtSecureRec *rec = (XaceDeclareExtSecureRec*)calldata;
/* security state for extensions is simply a boolean trust value */
STATEVAL(rec->ext) = rec->secure;
}
/**********************************************************************/
@ -1297,7 +1251,7 @@ typedef struct _PropertyAccessRec {
} PropertyAccessRec, *PropertyAccessPtr;
static PropertyAccessPtr PropertyAccessList = NULL;
static char SecurityDefaultAction = SecurityErrorOperation;
static char SecurityDefaultAction = XaceErrorOperation;
static char *SecurityPolicyFile = DEFAULTPOLICYFILE;
static ATOM SecurityMaxPropertyName = 0;
@ -1456,9 +1410,9 @@ SecurityParsePropertyAccessRule(
{
switch (c)
{
case 'i': action = SecurityIgnoreOperation; break;
case 'a': action = SecurityAllowOperation; break;
case 'e': action = SecurityErrorOperation; break;
case 'i': action = XaceIgnoreOperation; break;
case 'a': action = XaceAllowOperation; break;
case 'e': action = XaceErrorOperation; break;
case 'r': readAction = action; break;
case 'w': writeAction = action; break;
@ -1737,21 +1691,21 @@ SecurityMatchString(
#endif
char
SecurityCheckPropertyAccess(client, pWin, propertyName, access_mode)
ClientPtr client;
WindowPtr pWin;
ATOM propertyName;
Mask access_mode;
{
CALLBACK(SecurityCheckPropertyAccess)
{
XacePropertyAccessRec *rec = (XacePropertyAccessRec*)calldata;
ClientPtr client = rec->client;
WindowPtr pWin = rec->pWin;
ATOM propertyName = rec->propertyName;
Mask access_mode = rec->access_mode;
PropertyAccessPtr pacl;
char action = SecurityDefaultAction;
/* if client trusted or window untrusted, allow operation */
if ( (client->trustLevel == XSecurityClientTrusted) ||
(wClient(pWin)->trustLevel != XSecurityClientTrusted) )
return SecurityAllowOperation;
if ( (TRUSTLEVEL(client) == XSecurityClientTrusted) ||
(TRUSTLEVEL(wClient(pWin)) != XSecurityClientTrusted) )
return;
#ifdef PROPDEBUG
/* For testing, it's more convenient if the property rules file gets
@ -1843,28 +1797,30 @@ SecurityCheckPropertyAccess(client, pWin, propertyName, access_mode)
* If pacl doesn't apply, something above should have
* executed a continue, which will skip the follwing code.
*/
action = SecurityAllowOperation;
if (access_mode & SecurityReadAccess)
action = XaceAllowOperation;
if (access_mode & DixReadAccess)
action = max(action, pacl->readAction);
if (access_mode & SecurityWriteAccess)
if (access_mode & DixWriteAccess)
action = max(action, pacl->writeAction);
if (access_mode & SecurityDestroyAccess)
if (access_mode & DixDestroyAccess)
action = max(action, pacl->destroyAction);
break;
} /* end for each pacl */
} /* end if propertyName <= SecurityMaxPropertyName */
if (SecurityAllowOperation != action)
if (XaceAllowOperation != action)
{ /* audit the access violation */
int cid = CLIENT_ID(pWin->drawable.id);
int reqtype = ((xReq *)client->requestBuffer)->reqType;
char *actionstr = (SecurityIgnoreOperation == action) ?
char *actionstr = (XaceIgnoreOperation == action) ?
"ignored" : "error";
SecurityAudit("client %d attempted request %d with window 0x%x property %s (atom 0x%x) of client %d, %s\n",
client->index, reqtype, pWin->drawable.id,
NameForAtom(propertyName), propertyName, cid, actionstr);
}
return action;
/* return codes increase with strictness */
if (action > rec->rval)
rec->rval = action;
} /* SecurityCheckPropertyAccess */
@ -1904,6 +1860,46 @@ XSecurityOptions(argc, argv, i)
} /* XSecurityOptions */
/* SecurityExtensionSetup
*
* Arguments: none.
*
* Returns: nothing.
*
* Side Effects:
* Sets up the Security extension if possible.
* This function contains things that need to be done
* before any other extension init functions get called.
*/
void
SecurityExtensionSetup(INITARGS)
{
/* Allocate the client private index */
securityClientPrivateIndex = AllocateClientPrivateIndex();
if (!AllocateClientPrivate(securityClientPrivateIndex,
sizeof (SecurityClientStateRec)))
FatalError("SecurityExtensionSetup: Can't allocate client private.\n");
/* Allocate the extension private index */
securityExtnsnPrivateIndex = AllocateExtensionPrivateIndex();
if (!AllocateExtensionPrivate(securityExtnsnPrivateIndex, 0))
FatalError("SecurityExtensionSetup: Can't allocate extnsn private.\n");
/* register callbacks */
#define XaceRC XaceRegisterCallback
XaceRC(XACE_RESOURCE_ACCESS, SecurityCheckResourceIDAccess, NULL);
XaceRC(XACE_DEVICE_ACCESS, SecurityCheckDeviceAccess, NULL);
XaceRC(XACE_PROPERTY_ACCESS, SecurityCheckPropertyAccess, NULL);
XaceRC(XACE_DRAWABLE_ACCESS, SecurityCheckDrawableAccess, NULL);
XaceRC(XACE_MAP_ACCESS, SecurityCheckMapAccess, NULL);
XaceRC(XACE_BACKGRND_ACCESS, SecurityCheckBackgrndAccess, NULL);
XaceRC(XACE_EXT_DISPATCH, SecurityCheckExtAccess, NULL);
XaceRC(XACE_EXT_ACCESS, SecurityCheckExtAccess, NULL);
XaceRC(XACE_HOSTLIST_ACCESS, SecurityCheckHostlistAccess, NULL);
XaceRC(XACE_DECLARE_EXT_SECURE, SecurityDeclareExtSecure, NULL);
} /* SecurityExtensionSetup */
/* SecurityExtensionInit
*
@ -1919,7 +1915,6 @@ void
SecurityExtensionInit(INITARGS)
{
ExtensionEntry *extEntry;
int i;
SecurityAuthorizationResType =
CreateNewResourceType(SecurityDeleteAuthorization);
@ -1946,25 +1941,6 @@ SecurityExtensionInit(INITARGS)
EventSwapVector[SecurityEventBase + XSecurityAuthorizationRevoked] =
(EventSwapPtr)SwapSecurityAuthorizationRevokedEvent;
/* initialize untrusted proc vectors */
for (i = 0; i < 128; i++)
{
UntrustedProcVector[i] = ProcVector[i];
SwappedUntrustedProcVector[i] = SwappedProcVector[i];
}
/* make sure insecure extensions are not allowed */
for (i = 128; i < 256; i++)
{
if (!UntrustedProcVector[i])
{
UntrustedProcVector[i] = ProcBadRequest;
SwappedUntrustedProcVector[i] = ProcBadRequest;
}
}
SecurityLoadPropertyAccessList();
} /* SecurityExtensionInit */

Some files were not shown because too many files have changed in this diff Show More