diff --git a/.gitignore b/.gitignore new file mode 100644 index 000000000..62b5fd6b4 --- /dev/null +++ b/.gitignore @@ -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 diff --git a/GL/Makefile.am b/GL/Makefile.am index e8e080df1..b9337ba69 100644 --- a/GL/Makefile.am +++ b/GL/Makefile.am @@ -1,4 +1,4 @@ -SUBDIRS = glx mesa include +SUBDIRS = glx mesa # someone could get really crazy someday and add support for the SI... diff --git a/GL/apple/aglGlx.c b/GL/apple/aglGlx.c index be846be83..900a9a96e 100644 --- a/GL/apple/aglGlx.c +++ b/GL/apple/aglGlx.c @@ -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 diff --git a/GL/apple/indirect.c b/GL/apple/indirect.c index 448b1f76a..8cba1c63d 100644 --- a/GL/apple/indirect.c +++ b/GL/apple/indirect.c @@ -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 diff --git a/GL/glx/.gitignore b/GL/glx/.gitignore new file mode 100644 index 000000000..5cf6f0a44 --- /dev/null +++ b/GL/glx/.gitignore @@ -0,0 +1,5 @@ +indirect_size.h +glcontextmodes.c +glcontextmodes.h +glapi.c +glthread.c diff --git a/GL/glx/Makefile.am b/GL/glx/Makefile.am index fd8a59bd0..8184f605f 100644 --- a/GL/glx/Makefile.am +++ b/GL/glx/Makefile.am @@ -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 diff --git a/GL/glx/extension_string.c b/GL/glx/extension_string.c new file mode 100644 index 000000000..a4b202af3 --- /dev/null +++ b/GL/glx/extension_string.c @@ -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 + */ + +#include +#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); + } + } +} diff --git a/GL/glx/extension_string.h b/GL/glx/extension_string.h new file mode 100644 index 000000000..98e91bc18 --- /dev/null +++ b/GL/glx/extension_string.h @@ -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 + */ + +#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 */ diff --git a/GL/glx/g_disptab.c b/GL/glx/g_disptab.c deleted file mode 100644 index c41c45e9f..000000000 --- a/GL/glx/g_disptab.c +++ /dev/null @@ -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 -#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 -}; diff --git a/GL/glx/g_disptab.h b/GL/glx/g_disptab.h index 9ae901c1d..f9a09ccd6 100644 --- a/GL/glx/g_disptab.h +++ b/GL/glx/g_disptab.h @@ -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 @@ -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_ */ diff --git a/GL/glx/g_disptab_EXT.c b/GL/glx/g_disptab_EXT.c deleted file mode 100644 index 255f3832c..000000000 --- a/GL/glx/g_disptab_EXT.c +++ /dev/null @@ -1,4657 +0,0 @@ -/* $XFree86: xc/programs/Xserver/GL/glx/g_disptab_EXT.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 -#endif - -#include "glxserver.h" -#include "glxext.h" -#include "g_disptab_EXT.h" -#include "indirect_dispatch.h" - -__GLXdispatchRenderProcPtr __glXRenderTable_EXT[__GLX_MAX_RENDER_OPCODE_EXT - __GLX_MIN_RENDER_OPCODE_EXT + 1] = { - __glXDisp_ColorTable, /* 2053 */ - __glXDisp_ColorTableParameterfv, /* 2054 */ - __glXDisp_ColorTableParameteriv, - __glXDisp_CopyColorTable, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, /* 2060 */ - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, -#ifndef MISSING_GL_EXTS - __glXDisp_PointParameterfEXT, /* 2065 */ - __glXDisp_PointParameterfvEXT, /* 2066 */ -#else - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, -#endif - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, /* 2070 */ - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXDisp_BlendColor, /* 4096 */ - __glXDisp_BlendEquation, /* 4097 */ - __glXNoSuchRenderOpcode, /* 4098 */ - __glXDisp_TexSubImage1D, /* 4099 */ - __glXDisp_TexSubImage2D, /* 4100 */ - __glXDisp_ConvolutionFilter1D, - __glXDisp_ConvolutionFilter2D, - __glXDisp_ConvolutionParameterf, - __glXDisp_ConvolutionParameterfv, - __glXDisp_ConvolutionParameteri, - __glXDisp_ConvolutionParameteriv, - __glXDisp_CopyConvolutionFilter1D, - __glXDisp_CopyConvolutionFilter2D, - __glXDisp_SeparableFilter2D, - __glXDisp_Histogram, /* 4110 */ - __glXDisp_Minmax, - __glXDisp_ResetHistogram, - __glXDisp_ResetMinmax, - __glXDisp_TexImage3D, - __glXDisp_TexSubImage3D, - __glXDisp_DrawArrays, - __glXDisp_BindTexture, - __glXDisp_PrioritizeTextures, - __glXDisp_CopyTexImage1D, - __glXDisp_CopyTexImage2D, /* 4120 */ - __glXDisp_CopyTexSubImage1D, /* 4121 */ - __glXDisp_CopyTexSubImage2D, /* 4122 */ - __glXDisp_CopyTexSubImage3D, /* 4123 */ -#ifndef MISSING_GL_EXTS - __glXDisp_FogCoordfvEXT, /* 4124 */ - __glXDisp_FogCoorddvEXT, /* 4125 */ - __glXDisp_SecondaryColor3bvEXT, /* 4126 */ - __glXDisp_SecondaryColor3svEXT, /* 4127 */ - __glXDisp_SecondaryColor3ivEXT, /* 4128 */ - __glXDisp_SecondaryColor3fvEXT, /* 4129 */ - __glXDisp_SecondaryColor3dvEXT, /* 4130 */ - __glXDisp_SecondaryColor3ubvEXT, /* 4131 */ - __glXDisp_SecondaryColor3usvEXT, /* 4132 */ - __glXDisp_SecondaryColor3uivEXT, /* 4133 */ - __glXDisp_BlendFuncSeparateEXT, /* 4134 */ -#else - __glXNoSuchRenderOpcode, /* 4124 */ - __glXNoSuchRenderOpcode, /* 4125 */ - __glXNoSuchRenderOpcode, /* 4126 */ - __glXNoSuchRenderOpcode, /* 4127 */ - __glXNoSuchRenderOpcode, /* 4128 */ - __glXNoSuchRenderOpcode, /* 4129 */ - __glXNoSuchRenderOpcode, /* 4130 */ - __glXNoSuchRenderOpcode, /* 4131 */ - __glXNoSuchRenderOpcode, /* 4132 */ - __glXNoSuchRenderOpcode, /* 4133 */ - __glXNoSuchRenderOpcode, /* 4134 */ -#endif - __glXNoSuchRenderOpcode, /* 4135 */ - __glXNoSuchRenderOpcode, /* 4136 */ - __glXNoSuchRenderOpcode, /* 4137 */ - __glXNoSuchRenderOpcode, /* 4138 */ - __glXNoSuchRenderOpcode, /* 4139 */ - __glXNoSuchRenderOpcode, /* 4140 */ - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, /* 4150 */ - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, /* 4160 */ - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, /* 4170 */ - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, /* 4180 */ - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, /* 4190 */ - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, /* 4200 */ - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, /* 4210 */ - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, /* 4219 */ -#ifndef MISSING_GL_EXTS - __glXDisp_ActiveStencilFaceEXT, /* 4220 */ - __glXDisp_PointParameteriNV, /* 4221 */ - __glXDisp_PointParameterivNV, /* 4222 */ -#else - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, -#endif - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - - __glXDisp_BindRenderbufferEXT, /* 4316 */ - __glXDisp_DeleteRenderbuffersEXT, /* 4317 */ - __glXDisp_RenderbufferStorageEXT, /* 4318 */ - __glXDisp_BindFramebufferEXT, /* 4319 */ - __glXDisp_DeleteFramebuffersEXT, /* 4320 */ - __glXDisp_FramebufferTexture1DEXT, /* 4321 */ - __glXDisp_FramebufferTexture2DEXT, /* 4322 */ - __glXDisp_FramebufferTexture3DEXT, /* 4323 */ - __glXDisp_FramebufferRenderbufferEXT, /* 4324 */ - __glXDisp_GenerateMipmapEXT /* 4325 */ -}; -__GLXdispatchVendorPrivProcPtr __glXVendorPrivTable_EXT[__GLX_MAX_VENDPRIV_OPCODE_EXT - __GLX_MIN_VENDPRIV_OPCODE_EXT + 1] = { - __glXDisp_AreTexturesResidentEXT, /* 11 */ - __glXDisp_DeleteTextures, /* 12 */ - __glXDisp_GenTexturesEXT, /* 13 */ - __glXDisp_IsTextureEXT, /* 14 */ -}; - - -__GLXdispatchRenderProcPtr __glXSwapRenderTable_EXT[__GLX_MAX_RENDER_OPCODE_EXT - __GLX_MIN_RENDER_OPCODE_EXT + 1] = { - __glXDispSwap_ColorTable, /* 2053 */ - __glXDispSwap_ColorTableParameterfv, /* 2054 */ - __glXDispSwap_ColorTableParameteriv, - __glXDispSwap_CopyColorTable, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, /* 2060 */ - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, -#ifndef MISSING_GL_EXTS - __glXDispSwap_PointParameterfEXT, /* 2065 */ - __glXDispSwap_PointParameterfvEXT, /* 2066 */ -#else - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, -#endif - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, /* 2070 */ - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXDispSwap_BlendColor, - __glXDispSwap_BlendEquation, - __glXNoSuchRenderOpcode, - __glXDispSwap_TexSubImage1D, - __glXDispSwap_TexSubImage2D, - __glXDispSwap_ConvolutionFilter1D, - __glXDispSwap_ConvolutionFilter2D, - __glXDispSwap_ConvolutionParameterf, - __glXDispSwap_ConvolutionParameterfv, - __glXDispSwap_ConvolutionParameteri, - __glXDispSwap_ConvolutionParameteriv, - __glXDispSwap_CopyConvolutionFilter1D, - __glXDispSwap_CopyConvolutionFilter2D, - __glXDispSwap_SeparableFilter2D, - __glXDispSwap_Histogram, - __glXDispSwap_Minmax, - __glXDispSwap_ResetHistogram, - __glXDispSwap_ResetMinmax, - __glXDispSwap_TexImage3D, - __glXDispSwap_TexSubImage3D, - __glXDispSwap_DrawArrays, - __glXDispSwap_BindTexture, - __glXDispSwap_PrioritizeTextures, - __glXDispSwap_CopyTexImage1D, - __glXDispSwap_CopyTexImage2D, /* 4120 */ - __glXDispSwap_CopyTexSubImage1D, /* 4121 */ - __glXDispSwap_CopyTexSubImage2D, /* 4122 */ - __glXDispSwap_CopyTexSubImage3D, /* 4123 */ -#ifndef MISSING_GL_EXTS - __glXDispSwap_FogCoordfvEXT, /* 4124 */ - __glXDispSwap_FogCoorddvEXT, /* 4125 */ - __glXDispSwap_SecondaryColor3bvEXT, /* 4126 */ - __glXDispSwap_SecondaryColor3svEXT, /* 4127 */ - __glXDispSwap_SecondaryColor3ivEXT, /* 4128 */ - __glXDispSwap_SecondaryColor3fvEXT, /* 4129 */ - __glXDispSwap_SecondaryColor3dvEXT, /* 4130 */ - __glXDispSwap_SecondaryColor3ubvEXT, /* 4131 */ - __glXDispSwap_SecondaryColor3usvEXT, /* 4132 */ - __glXDispSwap_SecondaryColor3uivEXT, /* 4133 */ - __glXDisp_BlendFuncSeparateEXT, /* 4134 */ -#else - __glXNoSuchRenderOpcode, /* 4124 */ - __glXNoSuchRenderOpcode, /* 4125 */ - __glXNoSuchRenderOpcode, /* 4126 */ - __glXNoSuchRenderOpcode, /* 4127 */ - __glXNoSuchRenderOpcode, /* 4128 */ - __glXNoSuchRenderOpcode, /* 4129 */ - __glXNoSuchRenderOpcode, /* 4130 */ - __glXNoSuchRenderOpcode, /* 4131 */ - __glXNoSuchRenderOpcode, /* 4132 */ - __glXNoSuchRenderOpcode, /* 4133 */ - __glXNoSuchRenderOpcode, /* 4134 */ -#endif - __glXNoSuchRenderOpcode, /* 4135 */ - __glXNoSuchRenderOpcode, /* 4136 */ - __glXNoSuchRenderOpcode, /* 4137 */ - __glXNoSuchRenderOpcode, /* 4138 */ - __glXNoSuchRenderOpcode, /* 4139 */ - __glXNoSuchRenderOpcode, /* 4140 */ - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, /* 4150 */ - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, /* 4160 */ - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, /* 4170 */ - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, /* 4180 */ - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, /* 4190 */ - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, /* 4200 */ - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, /* 4210 */ - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, /* 4219 */ -#ifndef MISSING_GL_EXTS - __glXDispSwap_ActiveStencilFaceEXT, /* 4220 */ - __glXDispSwap_PointParameteriNV, /* 4221 */ - __glXDispSwap_PointParameterivNV, /* 4222 */ -#else - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, -#endif - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - __glXNoSuchRenderOpcode, - - __glXDispSwap_BindRenderbufferEXT, /* 4316 */ - __glXDispSwap_DeleteRenderbuffersEXT, /* 4317 */ - __glXDispSwap_RenderbufferStorageEXT, /* 4318 */ - __glXDispSwap_BindFramebufferEXT, /* 4319 */ - __glXDispSwap_DeleteFramebuffersEXT, /* 4320 */ - __glXDispSwap_FramebufferTexture1DEXT, /* 4321 */ - __glXDispSwap_FramebufferTexture2DEXT, /* 4322 */ - __glXDispSwap_FramebufferTexture3DEXT, /* 4323 */ - __glXDispSwap_FramebufferRenderbufferEXT, /* 4324 */ - __glXDispSwap_GenerateMipmapEXT /* 4325 */ -}; -__GLXdispatchVendorPrivProcPtr __glXSwapVendorPrivTable_EXT[__GLX_MAX_VENDPRIV_OPCODE_EXT - __GLX_MIN_VENDPRIV_OPCODE_EXT + 1] = { - __glXDispSwap_AreTexturesResidentEXT, /* 11 */ - __glXDispSwap_DeleteTextures, /* 12 */ - __glXDispSwap_GenTexturesEXT, /* 13 */ - __glXDispSwap_IsTextureEXT, /* 14 */ -}; - diff --git a/GL/glx/g_disptab_EXT.h b/GL/glx/g_disptab_EXT.h deleted file mode 100644 index b5ecc6995..000000000 --- a/GL/glx/g_disptab_EXT.h +++ /dev/null @@ -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 -#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_ */ diff --git a/GL/glx/global.c b/GL/glx/global.c deleted file mode 100644 index 28030ec03..000000000 --- a/GL/glx/global.c +++ /dev/null @@ -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 -#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]; - diff --git a/GL/glx/glxcmds.c b/GL/glx/glxcmds.c index 3202f75dc..6273edc56 100644 --- a/GL/glx/glxcmds.c +++ b/GL/glx/glxcmds.c @@ -1,4 +1,3 @@ -/* $XFree86: xc/programs/Xserver/GL/glx/glxcmds.c,v 1.12 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 @@ -49,7 +48,6 @@ #include "g_disptab.h" #include #include -#include "g_disptab_EXT.h" #include "glxutil.h" #include "glxext.h" #include "glcontextmodes.h" @@ -58,6 +56,8 @@ #include "glthread.h" #include "dispatch.h" #include "indirect_dispatch.h" +#include "indirect_table.h" +#include "indirect_util.h" /************************************************************************/ @@ -67,18 +67,6 @@ GlxSetRenderTables (struct _glapi_table *table) _glapi_set_dispatch (table); } -static int __glXGetFBConfigsSGIX(__GLXclientState *cl, GLbyte *pc); -static int __glXCreateContextWithConfigSGIX(__GLXclientState *cl, GLbyte *pc); -static int __glXCreateGLXPixmapWithConfigSGIX(__GLXclientState *cl, GLbyte *pc); -static int __glXMakeCurrentReadSGI(__GLXclientState *cl, GLbyte *pc); - -static int __glXBindSwapBarrierSGIX(__GLXclientState *cl, GLbyte *pc); -static int __glXQueryMaxSwapBarriersSGIX(__GLXclientState *cl, GLbyte *pc); -static int __glxQueryHyperpipeNetworkSGIX(__GLXclientState *cl, GLbyte *pc); -static int __glxDestroyHyperpipeConfigSGIX (__GLXclientState *cl, GLbyte *pc); -static int __glxQueryHyperpipeConfigSGIX(__GLXclientState *cl, GLbyte *pc); -static int __glxHyperpipeConfigSGIX(__GLXclientState *cl, GLbyte *pc); - /************************************************************************/ @@ -188,7 +176,7 @@ int DoCreateContext(__GLXclientState *cl, GLXContextID gcId, shareglxc = (__GLXcontext *) LookupIDByType(shareList, __glXContextRes); if (!shareglxc) { client->errorValue = shareList; - return __glXBadContext; + return __glXError(GLXBadContext); } if (shareglxc->isDirect) { /* @@ -255,7 +243,7 @@ int DoCreateContext(__GLXclientState *cl, GLXContextID gcId, } -int __glXCreateContext(__GLXclientState *cl, GLbyte *pc) +int __glXDisp_CreateContext(__GLXclientState *cl, GLbyte *pc) { xGLXCreateContextReq *req = (xGLXCreateContextReq *) pc; return DoCreateContext( cl, req->context, req->shareList, req->visual, @@ -263,7 +251,7 @@ int __glXCreateContext(__GLXclientState *cl, GLbyte *pc) } -int __glXCreateNewContext(__GLXclientState *cl, GLbyte *pc) +int __glXDisp_CreateNewContext(__GLXclientState *cl, GLbyte *pc) { xGLXCreateNewContextReq *req = (xGLXCreateNewContextReq *) pc; return DoCreateContext( cl, req->context, req->shareList, req->fbconfig, @@ -271,7 +259,7 @@ int __glXCreateNewContext(__GLXclientState *cl, GLbyte *pc) } -int __glXCreateContextWithConfigSGIX(__GLXclientState *cl, GLbyte *pc) +int __glXDisp_CreateContextWithConfigSGIX(__GLXclientState *cl, GLbyte *pc) { xGLXCreateContextWithConfigSGIXReq *req = (xGLXCreateContextWithConfigSGIXReq *) pc; @@ -282,7 +270,7 @@ int __glXCreateContextWithConfigSGIX(__GLXclientState *cl, GLbyte *pc) /* ** Destroy a GL context as an X resource. */ -int __glXDestroyContext(__GLXclientState *cl, GLbyte *pc) +int __glXDisp_DestroyContext(__GLXclientState *cl, GLbyte *pc) { ClientPtr client = cl->client; xGLXDestroyContextReq *req = (xGLXDestroyContextReq *) pc; @@ -301,7 +289,7 @@ int __glXDestroyContext(__GLXclientState *cl, GLbyte *pc) return Success; } else { client->errorValue = gcId; - return __glXBadContext; + return __glXError(GLXBadContext); } } @@ -400,7 +388,7 @@ static void StartUsingContext(__GLXclientState *cl, __GLXcontext *glxc) ** Make an OpenGL context and drawable current. */ -int __glXMakeCurrent(__GLXclientState *cl, GLbyte *pc) +int __glXDisp_MakeCurrent(__GLXclientState *cl, GLbyte *pc) { xGLXMakeCurrentReq *req = (xGLXMakeCurrentReq *) pc; @@ -408,7 +396,7 @@ int __glXMakeCurrent(__GLXclientState *cl, GLbyte *pc) req->context, req->oldContextTag ); } -int __glXMakeContextCurrent(__GLXclientState *cl, GLbyte *pc) +int __glXDisp_MakeContextCurrent(__GLXclientState *cl, GLbyte *pc) { xGLXMakeContextCurrentReq *req = (xGLXMakeContextCurrentReq *) pc; @@ -416,7 +404,7 @@ int __glXMakeContextCurrent(__GLXclientState *cl, GLbyte *pc) req->context, req->oldContextTag ); } -int __glXMakeCurrentReadSGI(__GLXclientState *cl, GLbyte *pc) +int __glXDisp_MakeCurrentReadSGI(__GLXclientState *cl, GLbyte *pc) { xGLXMakeCurrentReadSGIReq *req = (xGLXMakeCurrentReadSGIReq *) pc; @@ -445,61 +433,96 @@ int __glXMakeCurrentReadSGI(__GLXclientState *cl, GLbyte *pc) * is added. */ static int GetDrawableOrPixmap( __GLXcontext *glxc, GLXDrawable drawId, - DrawablePtr *ppDraw, __GLXpixmap **ppPixmap, + __GLXdrawable **ppGlxDraw, + __GLXpixmap **ppPixmap, ClientPtr client ) { DrawablePtr pDraw; + __GLcontextModes *modes; + __GLXdrawable *pGlxDraw; __GLXpixmap *drawPixmap = NULL; + int rc; - pDraw = (DrawablePtr) LookupDrawable(drawId, client); - if (pDraw) { + /* This is the GLX 1.3 case - the client passes in a GLXWindow and + * we just return the __GLXdrawable. The first time a GLXPixmap + * comes in, it doesn't have a corresponding __GLXdrawable, so it + * falls through to the else-case below, but after that it'll have + * a __GLXdrawable and we'll handle it here. */ + pGlxDraw = (__GLXdrawable *) LookupIDByType(drawId, __glXDrawableRes); + if (pGlxDraw != NULL) { + if (glxc != NULL && pGlxDraw->modes != glxc->modes) { + client->errorValue = drawId; + return BadMatch; + } + + *ppGlxDraw = pGlxDraw; + *ppPixmap = pGlxDraw->pGlxPixmap; + return Success; + } + + /* The drawId wasn't a GLXWindow, so presumably it's a regular X + * window. In that case, we create a shadow GLXWindow for it on + * demand here for pre GLX 1.3 compatibility and use the X Window + * XID as its GLXWindow XID. The client can't explicitly create a + * GLXWindow with the same XID as an X Window, so we wont get any + * resource ID clashes. Effectively, the X Window is now also a + * GLXWindow. */ + rc = dixLookupDrawable(&pDraw, drawId, client, 0, DixUnknownAccess); + if (rc == Success) { if (pDraw->type == DRAWABLE_WINDOW) { - /* - ** Drawable is an X Window. - */ - WindowPtr pWin = (WindowPtr)pDraw; - VisualID vid = wVisual(pWin); + VisualID vid = wVisual((WindowPtr)pDraw); - /* - ** Check if window and context are similar. - */ - if ((vid != glxc->pVisual->vid) || - (pWin->drawable.pScreen != glxc->pScreen)) { - client->errorValue = drawId; - return BadMatch; - } + modes = _gl_context_modes_find_visual(glxc->pGlxScreen->modes, + vid); } else { /* ** An X Pixmap is not allowed as a parameter (a GLX Pixmap ** is, but it must first be created with glxCreateGLXPixmap). */ client->errorValue = drawId; - return __glXBadDrawable; + return __glXError(GLXBadDrawable); } } else { drawPixmap = (__GLXpixmap *) LookupIDByType(drawId, __glXPixmapRes); if (drawPixmap) { - /* - ** Check if pixmap and context are similar. - */ - if (drawPixmap->pScreen != glxc->pScreen || - drawPixmap->modes->visualID != glxc->modes->visualID) { - client->errorValue = drawId; - return BadMatch; - } pDraw = drawPixmap->pDraw; - + modes = drawPixmap->modes; } else { /* ** Drawable is neither a Window nor a GLXPixmap. */ client->errorValue = drawId; - return __glXBadDrawable; + return __glXError(GLXBadDrawable); } } + /* If we're not given a context, don't create the __GLXdrawable */ + if (glxc == NULL) { + *ppPixmap = NULL; + *ppGlxDraw = NULL; + return Success; + } + + /* We're binding an X Window or a GLX Pixmap for the first time + * and need to create a GLX drawable for it. First check that the + * drawable screen and fbconfig matches the context ditto. */ + if (pDraw->pScreen != glxc->pScreen || modes != glxc->modes) { + client->errorValue = drawId; + return BadMatch; + } + + pGlxDraw = + glxc->pGlxScreen->createDrawable(glxc->pGlxScreen, + pDraw, drawId, modes); + + /* since we are creating the drawablePrivate, drawId should be new */ + if (!AddResource(drawId, __glXDrawableRes, pGlxDraw)) { + pGlxDraw->destroy (pGlxDraw); + return BadAlloc; + } + *ppPixmap = drawPixmap; - *ppDraw = pDraw; + *ppGlxDraw = pGlxDraw; return 0; } @@ -510,8 +533,6 @@ int DoMakeCurrent( __GLXclientState *cl, GLXContextID contextId, GLXContextTag tag ) { ClientPtr client = cl->client; - DrawablePtr pDraw; - DrawablePtr pRead; xGLXMakeCurrentReply reply; __GLXpixmap *drawPixmap = NULL; __GLXpixmap *readPixmap = NULL; @@ -542,12 +563,12 @@ int DoMakeCurrent( __GLXclientState *cl, /* ** Tag for previous context is invalid. */ - return __glXBadContextTag; + return __glXError(GLXBadContextTag); } if (prevglxc->renderMode != GL_RENDER) { /* Oops. Not in render mode render. */ client->errorValue = prevglxc->id; - return __glXBadContextState; + return __glXError(GLXBadContextState); } } else { prevglxc = 0; @@ -562,7 +583,7 @@ int DoMakeCurrent( __GLXclientState *cl, glxc = (__GLXcontext *) LookupIDByType(contextId, __glXContextRes); if (!glxc) { client->errorValue = contextId; - return __glXBadContext; + return __glXError(GLXBadContext); } if ((glxc != prevglxc) && glxc->isCurrent) { /* Context is current to somebody else */ @@ -572,36 +593,18 @@ int DoMakeCurrent( __GLXclientState *cl, assert( drawId != None ); assert( readId != None ); - status = GetDrawableOrPixmap( glxc, drawId, & pDraw, & drawPixmap, - client ); + status = GetDrawableOrPixmap(glxc, drawId, &drawPriv, &drawPixmap, + client); if ( status != 0 ) { return status; } if ( readId != drawId ) { - status = GetDrawableOrPixmap( glxc, readId, & pRead, & readPixmap, - client ); + status = GetDrawableOrPixmap(glxc, readId, &readPriv, &readPixmap, + client); if ( status != 0 ) { return status; } - } else { - pRead = pDraw; - } - - /* FIXME: Finish refactoring this. - idr */ - /* get the drawable private */ - if (pDraw) { - drawPriv = __glXGetDrawable(glxc, pDraw, drawId); - if (drawPriv == NULL) { - return __glXBadDrawable; - } - } - - if (pRead != pDraw) { - readPriv = __glXGetDrawable(glxc, pRead, readId); - if (readPriv == NULL) { - return __glXBadDrawable; - } } else { readPriv = drawPriv; } @@ -609,8 +612,8 @@ int DoMakeCurrent( __GLXclientState *cl, } else { /* Switching to no context. Ignore new drawable. */ glxc = 0; - pDraw = 0; - pRead = 0; + drawPriv = 0; + readPriv = 0; } @@ -631,7 +634,7 @@ int DoMakeCurrent( __GLXclientState *cl, ** Make the previous context not current. */ if (!(*prevglxc->loseCurrent)(prevglxc)) { - return __glXBadContext; + return __glXError(GLXBadContext); } __glXFlushContextCache(); __glXDeassociateContext(prevglxc); @@ -647,7 +650,7 @@ int DoMakeCurrent( __GLXclientState *cl, if (!(*glxc->makeCurrent)(glxc)) { glxc->drawPriv = NULL; glxc->readPriv = NULL; - return __glXBadContext; + return __glXError(GLXBadContext); } /* resize the buffers */ @@ -656,7 +659,7 @@ int DoMakeCurrent( __GLXclientState *cl, (*glxc->loseCurrent)(glxc); glxc->drawPriv = NULL; glxc->readPriv = NULL; - return __glXBadContext; + return __glXError(GLXBadContext); } glxc->isCurrent = GL_TRUE; @@ -737,7 +740,7 @@ int DoMakeCurrent( __GLXclientState *cl, return Success; } -int __glXIsDirect(__GLXclientState *cl, GLbyte *pc) +int __glXDisp_IsDirect(__GLXclientState *cl, GLbyte *pc) { ClientPtr client = cl->client; xGLXIsDirectReq *req = (xGLXIsDirectReq *) pc; @@ -750,7 +753,7 @@ int __glXIsDirect(__GLXclientState *cl, GLbyte *pc) glxc = (__GLXcontext *) LookupIDByType(req->context, __glXContextRes); if (!glxc) { client->errorValue = req->context; - return __glXBadContext; + return __glXError(GLXBadContext); } reply.isDirect = glxc->isDirect; @@ -767,7 +770,7 @@ int __glXIsDirect(__GLXclientState *cl, GLbyte *pc) return Success; } -int __glXQueryVersion(__GLXclientState *cl, GLbyte *pc) +int __glXDisp_QueryVersion(__GLXclientState *cl, GLbyte *pc) { ClientPtr client = cl->client; xGLXQueryVersionReq *req = (xGLXQueryVersionReq *) pc; @@ -798,7 +801,7 @@ int __glXQueryVersion(__GLXclientState *cl, GLbyte *pc) return Success; } -int __glXWaitGL(__GLXclientState *cl, GLbyte *pc) +int __glXDisp_WaitGL(__GLXclientState *cl, GLbyte *pc) { xGLXWaitGLReq *req = (xGLXWaitGLReq *)pc; int error; @@ -810,7 +813,7 @@ int __glXWaitGL(__GLXclientState *cl, GLbyte *pc) return Success; } -int __glXWaitX(__GLXclientState *cl, GLbyte *pc) +int __glXDisp_WaitX(__GLXclientState *cl, GLbyte *pc) { xGLXWaitXReq *req = (xGLXWaitXReq *)pc; int error; @@ -827,7 +830,7 @@ int __glXWaitX(__GLXclientState *cl, GLbyte *pc) return Success; } -int __glXCopyContext(__GLXclientState *cl, GLbyte *pc) +int __glXDisp_CopyContext(__GLXclientState *cl, GLbyte *pc) { ClientPtr client = cl->client; xGLXCopyContextReq *req = (xGLXCopyContextReq *) pc; @@ -844,12 +847,12 @@ int __glXCopyContext(__GLXclientState *cl, GLbyte *pc) src = (__GLXcontext *) LookupIDByType(source, __glXContextRes); if (!src) { client->errorValue = source; - return __glXBadContext; + return __glXError(GLXBadContext); } dst = (__GLXcontext *) LookupIDByType(dest, __glXContextRes); if (!dst) { client->errorValue = dest; - return __glXBadContext; + return __glXError(GLXBadContext); } /* @@ -874,7 +877,7 @@ int __glXCopyContext(__GLXclientState *cl, GLbyte *pc) __GLXcontext *tagcx = __glXLookupContextByTag(cl, tag); if (!tagcx) { - return __glXBadContextTag; + return __glXError(GLXBadContextTag); } if (tagcx != src) { /* @@ -998,7 +1001,7 @@ int DoGetVisualConfigs(__GLXclientState *cl, unsigned screen, return Success; } -int __glXGetVisualConfigs(__GLXclientState *cl, GLbyte *pc) +int __glXDisp_GetVisualConfigs(__GLXclientState *cl, GLbyte *pc) { xGLXGetVisualConfigsReq *req = (xGLXGetVisualConfigsReq *) pc; return DoGetVisualConfigs( cl, req->screen, GL_FALSE ); @@ -1174,95 +1177,97 @@ int DoGetFBConfigs(__GLXclientState *cl, unsigned screen, GLboolean do_swap) } -int __glXGetFBConfigs(__GLXclientState *cl, GLbyte *pc) +int __glXDisp_GetFBConfigs(__GLXclientState *cl, GLbyte *pc) { xGLXGetFBConfigsReq *req = (xGLXGetFBConfigsReq *) pc; return DoGetFBConfigs( cl, req->screen, GL_FALSE ); } -int __glXGetFBConfigsSGIX(__GLXclientState *cl, GLbyte *pc) +int __glXDisp_GetFBConfigsSGIX(__GLXclientState *cl, GLbyte *pc) { xGLXGetFBConfigsSGIXReq *req = (xGLXGetFBConfigsSGIXReq *) pc; return DoGetFBConfigs( cl, req->screen, GL_FALSE ); } - -/* -** Create a GLX Pixmap from an X Pixmap. -*/ -int DoCreateGLXPixmap(__GLXclientState *cl, VisualID visual, - GLuint screenNum, XID pixmapId, XID glxpixmapId) +static int ValidateCreateDrawable(ClientPtr client, + int screenNum, XID fbconfigId, + XID drawablId, XID glxDrawableId, + int type, __GLcontextModes **modes, + DrawablePtr *ppDraw) { - ClientPtr client = cl->client; DrawablePtr pDraw; ScreenPtr pScreen; VisualPtr pVisual; - __GLXpixmap *pGlxPixmap; __GLXscreen *pGlxScreen; - __GLcontextModes *modes; - int i; + int i, rc; - LEGAL_NEW_RESOURCE(glxpixmapId, client); - - pDraw = (DrawablePtr) LookupDrawable(pixmapId, client); - if (!pDraw || pDraw->type != DRAWABLE_PIXMAP) { - client->errorValue = pixmapId; - return BadPixmap; + LEGAL_NEW_RESOURCE(glxDrawableId, client); + + rc = dixLookupDrawable(&pDraw, drawablId, client, 0, DixUnknownAccess); + if (rc != Success || pDraw->type != type) { + client->errorValue = drawablId; + return type == DRAWABLE_WINDOW ? BadWindow : BadPixmap; } - /* - ** Check if screen of visual matches screen of pixmap. - */ + /* Check if screen of the fbconfig matches screen of drawable. */ pScreen = pDraw->pScreen; if (screenNum != pScreen->myNum) { return BadMatch; } - /* - ** Find the VisualRec for this visual. - */ + /* If this fbconfig has a corresponding VisualRec the number of + * planes must match the drawable depth. */ pVisual = pScreen->visuals; - for (i=0; i < pScreen->numVisuals; i++, pVisual++) { - if (pVisual->vid == visual) { - break; - } - } - if (i == pScreen->numVisuals) { - client->errorValue = visual; - return BadValue; - } - /* - ** Check if depth of visual matches depth of pixmap. - */ - if (pVisual->nplanes != pDraw->depth) { - return BadMatch; + for (i = 0; i < pScreen->numVisuals; i++, pVisual++) { + if (pVisual->vid == fbconfigId && pVisual->nplanes != pDraw->depth) + return BadMatch; } - /* - ** Get configuration of the visual. - */ - pGlxScreen = __glXActiveScreens[screenNum]; - modes = _gl_context_modes_find_visual( pGlxScreen->modes, visual ); - if (modes == NULL) { - /* - ** Visual not support on this screen by this OpenGL implementation. - */ - client->errorValue = visual; + /* Get configuration of the visual. */ + pGlxScreen = __glXgetActiveScreen(screenNum); + *modes = _gl_context_modes_find_visual(pGlxScreen->modes, fbconfigId); + if (*modes == NULL) { + /* Visual not support on this screen by this OpenGL implementation. */ + client->errorValue = fbconfigId; return BadValue; } + *ppDraw = pDraw; + + return Success; +} + +/* +** Create a GLX Pixmap from an X Pixmap. +*/ +int DoCreateGLXPixmap(__GLXclientState *cl, XID fbconfigId, + GLuint screenNum, XID pixmapId, XID glxPixmapId) +{ + ClientPtr client = cl->client; + DrawablePtr pDraw; + __GLXpixmap *pGlxPixmap; + __GLcontextModes *modes; + int retval; + + retval = ValidateCreateDrawable (client, screenNum, fbconfigId, + pixmapId, glxPixmapId, + DRAWABLE_PIXMAP, &modes, &pDraw); + if (retval != Success) + return retval; + pGlxPixmap = (__GLXpixmap *) xalloc(sizeof(__GLXpixmap)); if (!pGlxPixmap) { return BadAlloc; } - if (!(AddResource(glxpixmapId, __glXPixmapRes, pGlxPixmap))) { + if (!(AddResource(glxPixmapId, __glXPixmapRes, pGlxPixmap))) { return BadAlloc; } pGlxPixmap->pDraw = pDraw; - pGlxPixmap->pGlxScreen = pGlxScreen; - pGlxPixmap->pScreen = pScreen; + pGlxPixmap->pGlxScreen = __glXgetActiveScreen(screenNum); + pGlxPixmap->pScreen = pDraw->pScreen; pGlxPixmap->idExists = True; + pGlxPixmap->pDamage = NULL; pGlxPixmap->refcnt = 0; pGlxPixmap->modes = modes; @@ -1275,21 +1280,21 @@ int DoCreateGLXPixmap(__GLXclientState *cl, VisualID visual, return Success; } -int __glXCreateGLXPixmap(__GLXclientState *cl, GLbyte *pc) +int __glXDisp_CreateGLXPixmap(__GLXclientState *cl, GLbyte *pc) { xGLXCreateGLXPixmapReq *req = (xGLXCreateGLXPixmapReq *) pc; return DoCreateGLXPixmap( cl, req->visual, req->screen, req->pixmap, req->glxpixmap ); } -int __glXCreatePixmap(__GLXclientState *cl, GLbyte *pc) +int __glXDisp_CreatePixmap(__GLXclientState *cl, GLbyte *pc) { xGLXCreatePixmapReq *req = (xGLXCreatePixmapReq *) pc; return DoCreateGLXPixmap( cl, req->fbconfig, req->screen, req->pixmap, req->glxpixmap ); } -int __glXCreateGLXPixmapWithConfigSGIX(__GLXclientState *cl, GLbyte *pc) +int __glXDisp_CreateGLXPixmapWithConfigSGIX(__GLXclientState *cl, GLbyte *pc) { xGLXCreateGLXPixmapWithConfigSGIXReq *req = (xGLXCreateGLXPixmapWithConfigSGIXReq *) pc; @@ -1298,28 +1303,114 @@ int __glXCreateGLXPixmapWithConfigSGIX(__GLXclientState *cl, GLbyte *pc) } -/** - * Destroy a GLX pixmap. This function is used for both - * \c glXDestroyGLXPixmap and \c glXDestroyPixmap. - */ - -int __glXDestroyGLXPixmap(__GLXclientState *cl, GLbyte *pc) +int DoDestroyPixmap(__GLXclientState *cl, XID glxpixmap) { ClientPtr client = cl->client; - xGLXDestroyGLXPixmapReq *req = (xGLXDestroyGLXPixmapReq *) pc; - XID glxpixmap = req->glxpixmap; /* ** Check if it's a valid GLX pixmap. */ if (!LookupIDByType(glxpixmap, __glXPixmapRes)) { client->errorValue = glxpixmap; - return __glXBadPixmap; + return __glXError(GLXBadPixmap); } FreeResource(glxpixmap, FALSE); + return Success; } +int __glXDisp_DestroyGLXPixmap(__GLXclientState *cl, GLbyte *pc) +{ + xGLXDestroyGLXPixmapReq *req = (xGLXDestroyGLXPixmapReq *) pc; + + return DoDestroyPixmap(cl, req->glxpixmap); +} + +int __glXDisp_DestroyPixmap(__GLXclientState *cl, GLbyte *pc) +{ + xGLXDestroyPixmapReq *req = (xGLXDestroyPixmapReq *) pc; + + return DoDestroyPixmap(cl, req->glxpixmap); +} + +int __glXDisp_CreatePbuffer(__GLXclientState *cl, GLbyte *pc) +{ + xGLXCreatePbufferReq *req = (xGLXCreatePbufferReq *) pc; + + (void) req; + + return BadRequest; +} + +int __glXDisp_DestroyPbuffer(__GLXclientState *cl, GLbyte *pc) +{ + xGLXDestroyPbufferReq *req = (xGLXDestroyPbufferReq *) pc; + + (void) req; + + return BadRequest; +} + +int __glXDisp_ChangeDrawableAttributes(__GLXclientState *cl, GLbyte *pc) +{ + xGLXChangeDrawableAttributesReq *req = + (xGLXChangeDrawableAttributesReq *) pc; + + (void) req; + + return BadRequest; +} + +int __glXDisp_CreateWindow(__GLXclientState *cl, GLbyte *pc) +{ + xGLXCreateWindowReq *req = (xGLXCreateWindowReq *) pc; + ClientPtr client = cl->client; + DrawablePtr pDraw; + __GLXdrawable *glxPriv; + __GLXscreen *screen; + __GLcontextModes *modes; + int retval; + + retval = ValidateCreateDrawable (client, req->screen, req->fbconfig, + req->window, req->glxwindow, + DRAWABLE_WINDOW, &modes, &pDraw); + if (retval != Success) + return retval; + + /* FIXME: We need to check that the window visual is compatible + * with the specified fbconfig. */ + + screen = __glXgetActiveScreen(req->screen); + glxPriv = screen->createDrawable(screen, pDraw, req->glxwindow, modes); + if (glxPriv == NULL) + return BadAlloc; + + if (!AddResource(req->glxwindow, __glXDrawableRes, glxPriv)) { + glxPriv->destroy (glxPriv); + return BadAlloc; + } + + return Success; +} + +int __glXDisp_DestroyWindow(__GLXclientState *cl, GLbyte *pc) +{ + xGLXDestroyWindowReq *req = (xGLXDestroyWindowReq *) pc; + ClientPtr client = cl->client; + + /* + ** Check if it's a valid GLX window. + */ + if (!LookupIDByType(req->glxwindow, __glXDrawableRes)) { + client->errorValue = req->glxwindow; + return __glXError(GLXBadWindow); + } + FreeResource(req->glxwindow, FALSE); + + return Success; +} + + /*****************************************************************************/ /* @@ -1327,53 +1418,21 @@ int __glXDestroyGLXPixmap(__GLXclientState *cl, GLbyte *pc) ** this time that is of value. Consequently, this code must be ** implemented by somebody other than SGI. */ -int __glXSwapBuffers(__GLXclientState *cl, GLbyte *pc) +int __glXDisp_SwapBuffers(__GLXclientState *cl, GLbyte *pc) { ClientPtr client = cl->client; - DrawablePtr pDraw; xGLXSwapBuffersReq *req = (xGLXSwapBuffersReq *) pc; GLXContextTag tag = req->contextTag; XID drawId = req->drawable; - __GLXpixmap *pGlxPixmap; __GLXcontext *glxc = NULL; + __GLXdrawable *pGlxDraw; + __GLXpixmap *pPixmap; int error; - - /* - ** Check that the GLX drawable is valid. - */ - pDraw = (DrawablePtr) LookupDrawable(drawId, client); - if (pDraw) { - if (pDraw->type == DRAWABLE_WINDOW) { - /* - ** Drawable is an X window. - */ - } else { - /* - ** Drawable is an X pixmap, which is not allowed. - */ - client->errorValue = drawId; - return __glXBadDrawable; - } - } else { - pGlxPixmap = (__GLXpixmap *) LookupIDByType(drawId, - __glXPixmapRes); - if (pGlxPixmap) { - /* - ** Drawable is a GLX pixmap. - */ - } else { - /* - ** Drawable is neither a X window nor a GLX pixmap. - */ - client->errorValue = drawId; - return __glXBadDrawable; - } - } if (tag) { glxc = __glXLookupContextByTag(cl, tag); if (!glxc) { - return __glXBadContextTag; + return __glXError(GLXBadContextTag); } /* ** The calling thread is swapping its current drawable. In this case, @@ -1392,47 +1451,31 @@ int __glXSwapBuffers(__GLXclientState *cl, GLbyte *pc) } } - if (pDraw) { - __GLXdrawable *glxPriv; + error = GetDrawableOrPixmap(glxc, drawId, &pGlxDraw, &pPixmap, client); + if (error != Success) + return error; - if (glxc) { - glxPriv = __glXGetDrawable(glxc, pDraw, drawId); - if (glxPriv == NULL) { - return __glXBadDrawable; - } - } - else { - glxPriv = __glXFindDrawable(drawId); - if (glxPriv == NULL) { - /* This is a window we've never seen before, do nothing */ - return Success; - } - } - - if ((*glxPriv->swapBuffers)(glxPriv) == GL_FALSE) { - return __glXBadDrawable; - } - } + if (pGlxDraw != NULL && pGlxDraw->type == DRAWABLE_WINDOW && + (*pGlxDraw->swapBuffers)(pGlxDraw) == GL_FALSE) + return __glXError(GLXBadDrawable); return Success; } -int __glXQueryContextInfoEXT(__GLXclientState *cl, GLbyte *pc) +int DoQueryContext(__GLXclientState *cl, GLXContextID gcId) { ClientPtr client = cl->client; __GLXcontext *ctx; - xGLXQueryContextInfoEXTReq *req; xGLXQueryContextInfoEXTReply reply; int nProps; int *sendBuf, *pSendBuf; int nReplyBytes; - req = (xGLXQueryContextInfoEXTReq *)pc; - ctx = (__GLXcontext *) LookupIDByType(req->context, __glXContextRes); + ctx = (__GLXcontext *) LookupIDByType(gcId, __glXContextRes); if (!ctx) { - client->errorValue = req->context; - return __glXBadContext; + client->errorValue = gcId; + return __glXError(GLXBadContext); } nProps = 3; @@ -1444,7 +1487,7 @@ int __glXQueryContextInfoEXT(__GLXclientState *cl, GLbyte *pc) nReplyBytes = reply.length << 2; sendBuf = (int *)xalloc((size_t)nReplyBytes); if (sendBuf == NULL) { - return __glXBadContext; /* XXX: Is this correct? */ + return __glXError(GLXBadContext); /* XXX: Is this correct? */ } pSendBuf = sendBuf; *pSendBuf++ = GLX_SHARE_CONTEXT_EXT; @@ -1465,8 +1508,21 @@ int __glXQueryContextInfoEXT(__GLXclientState *cl, GLbyte *pc) return Success; } +int __glXDisp_QueryContextInfoEXT(__GLXclientState *cl, GLbyte *pc) +{ + xGLXQueryContextInfoEXTReq *req = (xGLXQueryContextInfoEXTReq *) pc; -int __glXBindTexImageEXT(__GLXclientState *cl, GLbyte *pc) + return DoQueryContext(cl, req->context); +} + +int __glXDisp_QueryContext(__GLXclientState *cl, GLbyte *pc) +{ + xGLXQueryContextReq *req = (xGLXQueryContextReq *) pc; + + return DoQueryContext(cl, req->context); +} + +int __glXDisp_BindTexImageEXT(__GLXclientState *cl, GLbyte *pc) { xGLXVendorPrivateReq *req = (xGLXVendorPrivateReq *) pc; ClientPtr client = cl->client; @@ -1482,7 +1538,7 @@ int __glXBindTexImageEXT(__GLXclientState *cl, GLbyte *pc) buffer = *((INT32 *) (pc + 4)); if (buffer != GLX_FRONT_LEFT_EXT) - return __glXBadPixmap; + return __glXError(GLXBadPixmap); context = __glXForceCurrent (cl, req->contextTag, &error); if (!context) @@ -1491,18 +1547,18 @@ int __glXBindTexImageEXT(__GLXclientState *cl, GLbyte *pc) pGlxPixmap = (__GLXpixmap *)LookupIDByType(drawId, __glXPixmapRes); if (!pGlxPixmap) { client->errorValue = drawId; - return __glXBadPixmap; + return __glXError(GLXBadPixmap); } if (!context->textureFromPixmap) - return __glXUnsupportedPrivateRequest; + return __glXError(GLXUnsupportedPrivateRequest); return context->textureFromPixmap->bindTexImage(context, buffer, pGlxPixmap); } -int __glXReleaseTexImageEXT(__GLXclientState *cl, GLbyte *pc) +int __glXDisp_ReleaseTexImageEXT(__GLXclientState *cl, GLbyte *pc) { xGLXVendorPrivateReq *req = (xGLXVendorPrivateReq *) pc; ClientPtr client = cl->client; @@ -1524,17 +1580,76 @@ int __glXReleaseTexImageEXT(__GLXclientState *cl, GLbyte *pc) pGlxPixmap = (__GLXpixmap *)LookupIDByType(drawId, __glXPixmapRes); if (!pGlxPixmap) { client->errorValue = drawId; - return __glXBadDrawable; + return __glXError(GLXBadDrawable); } if (!context->textureFromPixmap) - return __glXUnsupportedPrivateRequest; + return __glXError(GLXUnsupportedPrivateRequest); return context->textureFromPixmap->releaseTexImage(context, buffer, pGlxPixmap); } +int __glXDisp_CopySubBufferMESA(__GLXclientState *cl, GLbyte *pc) +{ + xGLXVendorPrivateReq *req = (xGLXVendorPrivateReq *) pc; + GLXContextTag tag = req->contextTag; + __GLXcontext *glxc = NULL; + __GLXdrawable *pGlxDraw; + __GLXpixmap *pPixmap; + ClientPtr client = cl->client; + GLXDrawable drawId; + int error; + int x, y, width, height; + + (void) client; + (void) req; + + pc += __GLX_VENDPRIV_HDR_SIZE; + + drawId = *((CARD32 *) (pc)); + x = *((INT32 *) (pc + 4)); + y = *((INT32 *) (pc + 8)); + width = *((INT32 *) (pc + 12)); + height = *((INT32 *) (pc + 16)); + + if (tag) { + glxc = __glXLookupContextByTag(cl, tag); + if (!glxc) { + return __glXError(GLXBadContextTag); + } + /* + ** The calling thread is swapping its current drawable. In this case, + ** glxSwapBuffers is in both GL and X streams, in terms of + ** sequentiality. + */ + if (__glXForceCurrent(cl, tag, &error)) { + /* + ** Do whatever is needed to make sure that all preceding requests + ** in both streams are completed before the swap is executed. + */ + CALL_Finish( GET_DISPATCH(), () ); + __GLX_NOTE_FLUSHED_CMDS(glxc); + } else { + return error; + } + } + + error = GetDrawableOrPixmap(glxc, drawId, &pGlxDraw, &pPixmap, client); + if (error != Success) + return error; + + if (pGlxDraw == NULL || + pGlxDraw->type != DRAWABLE_WINDOW || + pGlxDraw->copySubBuffer == NULL) + return __glXError(GLXBadDrawable); + + (*pGlxDraw->copySubBuffer)(pGlxDraw, x, y, width, height); + + return Success; +} + /* ** Get drawable attributes */ @@ -1550,7 +1665,7 @@ DoGetDrawableAttributes(__GLXclientState *cl, XID drawId) glxPixmap = (__GLXpixmap *)LookupIDByType(drawId, __glXPixmapRes); if (!glxPixmap) { client->errorValue = drawId; - return __glXBadPixmap; + return __glXError(GLXBadPixmap); } numAttribs = 2; @@ -1576,7 +1691,7 @@ DoGetDrawableAttributes(__GLXclientState *cl, XID drawId) return Success; } -int __glXGetDrawableAttributesSGIX(__GLXclientState *cl, GLbyte *pc) +int __glXDisp_GetDrawableAttributesSGIX(__GLXclientState *cl, GLbyte *pc) { xGLXVendorPrivateWithReplyReq *req = (xGLXVendorPrivateWithReplyReq *)pc; CARD32 *data; @@ -1588,6 +1703,13 @@ int __glXGetDrawableAttributesSGIX(__GLXclientState *cl, GLbyte *pc) return DoGetDrawableAttributes(cl, drawable); } +int __glXDisp_GetDrawableAttributes(__GLXclientState *cl, GLbyte *pc) +{ + xGLXGetDrawableAttributesReq *req = (xGLXGetDrawableAttributesReq *)pc; + + return DoGetDrawableAttributes(cl, req->drawable); +} + /************************************************************************/ /* @@ -1595,10 +1717,7 @@ int __glXGetDrawableAttributesSGIX(__GLXclientState *cl, GLbyte *pc) ** client library to send batches of GL rendering commands. */ -/* -** Execute all the drawing commands in a request. -*/ -int __glXRender(__GLXclientState *cl, GLbyte *pc) +int DoRender(__GLXclientState *cl, GLbyte *pc, int do_swap) { xGLXRenderReq *req; ClientPtr client= cl->client; @@ -1607,14 +1726,15 @@ int __glXRender(__GLXclientState *cl, GLbyte *pc) CARD16 opcode; __GLXrenderHeader *hdr; __GLXcontext *glxc; + __GLX_DECLARE_SWAP_VARIABLES; - /* - ** NOTE: much of this code also appears in the byteswapping version of this - ** routine, __glXSwapRender(). Any changes made here should also be - ** duplicated there. - */ req = (xGLXRenderReq *) pc; + if (do_swap) { + __GLX_SWAP_SHORT(&req->length); + __GLX_SWAP_INT(&req->contextTag); + } + glxc = __glXForceCurrent(cl, req->contextTag, &error); if (!glxc) { return error; @@ -1624,56 +1744,47 @@ int __glXRender(__GLXclientState *cl, GLbyte *pc) pc += sz_xGLXRenderReq; left = (req->length << 2) - sz_xGLXRenderReq; while (left > 0) { - __GLXrenderSizeData *entry; + __GLXrenderSizeData entry; int extra; - void (* proc)(GLbyte *); + __GLXdispatchRenderProcPtr proc; + int err; /* ** Verify that the header length and the overall length agree. ** Also, each command must be word aligned. */ hdr = (__GLXrenderHeader *) pc; + if (do_swap) { + __GLX_SWAP_SHORT(&hdr->length); + __GLX_SWAP_SHORT(&hdr->opcode); + } cmdlen = hdr->length; opcode = hdr->opcode; /* ** Check for core opcodes and grab entry data. */ - if ( (opcode >= __GLX_MIN_RENDER_OPCODE) && - (opcode <= __GLX_MAX_RENDER_OPCODE) ) { - entry = &__glXRenderSizeTable[opcode]; - proc = __glXRenderTable[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) ) { - entry = - &__glXRenderSizeTable_EXT[opcode - - __GLX_MIN_RENDER_OPCODE_EXT]; - proc = __glXRenderTable_EXT[opcode - - __GLX_MIN_RENDER_OPCODE_EXT]; -#endif /* __GLX_MAX_RENDER_OPCODE_EXT > __GLX_MIN_RENDER_OPCODE_EXT */ - } else { + err = __glXGetProtocolSizeData(& Render_dispatch_info, opcode, & entry); + proc = (__GLXdispatchRenderProcPtr) + __glXGetProtocolDecodeFunction(& Render_dispatch_info, opcode, do_swap); + + if ((err < 0) || (proc == NULL)) { client->errorValue = commandsDone; - return __glXBadRenderRequest; + return __glXError(GLXBadRenderRequest); } - if (!entry->bytes) { - /* unused opcode */ - client->errorValue = commandsDone; - return __glXBadRenderRequest; - } - if (entry->varsize) { + if (entry.varsize) { /* variable size command */ - extra = (*entry->varsize)(pc + __GLX_RENDER_HDR_SIZE, False); + extra = (*entry.varsize)(pc + __GLX_RENDER_HDR_SIZE, do_swap); if (extra < 0) { extra = 0; } - if (cmdlen != __GLX_PAD(entry->bytes + extra)) { + if (cmdlen != __GLX_PAD(entry.bytes + extra)) { return BadLength; } } else { /* constant size command */ - if (cmdlen != __GLX_PAD(entry->bytes)) { + if (cmdlen != __GLX_PAD(entry.bytes)) { return BadLength; } } @@ -1698,26 +1809,34 @@ int __glXRender(__GLXclientState *cl, GLbyte *pc) } /* -** Execute a large rendering request (one that spans multiple X requests). +** Execute all the drawing commands in a request. */ -int __glXRenderLarge(__GLXclientState *cl, GLbyte *pc) +int __glXDisp_Render(__GLXclientState *cl, GLbyte *pc) +{ + return DoRender(cl, pc, False); +} + +int DoRenderLarge(__GLXclientState *cl, GLbyte *pc, int do_swap) { xGLXRenderLargeReq *req; ClientPtr client= cl->client; - GLuint dataBytes; - void (*proc)(GLbyte *); + size_t dataBytes; __GLXrenderLargeHeader *hdr; __GLXcontext *glxc; int error; CARD16 opcode; + __GLX_DECLARE_SWAP_VARIABLES; - /* - ** NOTE: much of this code also appears in the byteswapping version of this - ** routine, __glXSwapRenderLarge(). Any changes made here should also be - ** duplicated there. - */ req = (xGLXRenderLargeReq *) pc; + if (do_swap) { + __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); + } + glxc = __glXForceCurrent(cl, req->contextTag, &error); if (!glxc) { /* Reset in case this isn't 1st request. */ @@ -1738,60 +1857,54 @@ int __glXRenderLarge(__GLXclientState *cl, GLbyte *pc) pc += sz_xGLXRenderLargeReq; if (cl->largeCmdRequestsSoFar == 0) { - __GLXrenderSizeData *entry; - int extra, cmdlen; + __GLXrenderSizeData entry; + int extra; + size_t cmdlen; + int err; + /* ** 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; + return __glXError(GLXBadLargeRequest); } hdr = (__GLXrenderLargeHeader *) pc; + if (do_swap) { + __GLX_SWAP_INT(&hdr->length); + __GLX_SWAP_INT(&hdr->opcode); + } cmdlen = hdr->length; opcode = hdr->opcode; /* ** Check for core opcodes and grab entry data. */ - if ( (opcode >= __GLX_MIN_RENDER_OPCODE) && - (opcode <= __GLX_MAX_RENDER_OPCODE) ) { - entry = &__glXRenderSizeTable[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) ) { - opcode -= __GLX_MIN_RENDER_OPCODE_EXT; - entry = &__glXRenderSizeTable_EXT[opcode]; -#endif /* __GLX_MAX_RENDER_OPCODE_EXT > __GLX_MIN_RENDER_OPCODE_EXT */ - } else { + err = __glXGetProtocolSizeData(& Render_dispatch_info, opcode, & entry); + if (err < 0) { client->errorValue = opcode; - return __glXBadLargeRequest; + return __glXError(GLXBadLargeRequest); } - if (!entry->bytes) { - /* unused opcode */ - client->errorValue = opcode; - return __glXBadLargeRequest; - } - if (entry->varsize) { + 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, False); + extra = (*entry.varsize)(pc + __GLX_RENDER_LARGE_HDR_SIZE, do_swap); if (extra < 0) { extra = 0; } /* large command's header is 4 bytes longer, so add 4 */ - if (cmdlen != __GLX_PAD(entry->bytes + 4 + extra)) { + if (cmdlen != __GLX_PAD(entry.bytes + 4 + extra)) { return BadLength; } } else { /* constant size command */ - if (cmdlen != __GLX_PAD(entry->bytes + 4)) { + if (cmdlen != __GLX_PAD(entry.bytes + 4)) { return BadLength; } } @@ -1800,10 +1913,9 @@ int __glXRenderLarge(__GLXclientState *cl, GLbyte *pc) */ if (cl->largeCmdBufSize < cmdlen) { if (!cl->largeCmdBuf) { - cl->largeCmdBuf = (GLbyte *) xalloc((size_t)cmdlen); + cl->largeCmdBuf = (GLbyte *) xalloc(cmdlen); } else { - cl->largeCmdBuf = (GLbyte *) xrealloc(cl->largeCmdBuf, - (size_t)cmdlen); + cl->largeCmdBuf = (GLbyte *) xrealloc(cl->largeCmdBuf, cmdlen); } if (!cl->largeCmdBuf) { return BadAlloc; @@ -1830,12 +1942,12 @@ int __glXRenderLarge(__GLXclientState *cl, GLbyte *pc) if (req->requestNumber != cl->largeCmdRequestsSoFar + 1) { client->errorValue = req->requestNumber; __glXResetLargeCommandStatus(cl); - return __glXBadLargeRequest; + return __glXError(GLXBadLargeRequest); } if (req->requestTotal != cl->largeCmdRequestsTotal) { client->errorValue = req->requestTotal; __glXResetLargeCommandStatus(cl); - return __glXBadLargeRequest; + return __glXError(GLXBadLargeRequest); } /* @@ -1844,13 +1956,15 @@ int __glXRenderLarge(__GLXclientState *cl, GLbyte *pc) if ((cl->largeCmdBytesSoFar + dataBytes) > cl->largeCmdBytesTotal) { client->errorValue = dataBytes; __glXResetLargeCommandStatus(cl); - return __glXBadLargeRequest; + return __glXError(GLXBadLargeRequest); } memcpy(cl->largeCmdBuf + cl->largeCmdBytesSoFar, pc, dataBytes); cl->largeCmdBytesSoFar += dataBytes; cl->largeCmdRequestsSoFar++; if (req->requestNumber == cl->largeCmdRequestsTotal) { + __GLXdispatchRenderProcPtr proc; + /* ** This is the last request; it must have enough bytes to complete ** the command. @@ -1868,26 +1982,22 @@ int __glXRenderLarge(__GLXclientState *cl, GLbyte *pc) __GLX_PAD(cl->largeCmdBytesTotal)) { client->errorValue = dataBytes; __glXResetLargeCommandStatus(cl); - return __glXBadLargeRequest; + return __glXError(GLXBadLargeRequest); } hdr = (__GLXrenderLargeHeader *) cl->largeCmdBuf; - opcode = hdr->opcode; - /* + ** 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. */ - if ( (opcode >= __GLX_MIN_RENDER_OPCODE) && - (opcode <= __GLX_MAX_RENDER_OPCODE) ) { - proc = __glXRenderTable[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) ) { - opcode -= __GLX_MIN_RENDER_OPCODE_EXT; - proc = __glXRenderTable_EXT[opcode]; -#endif /* __GLX_MAX_RENDER_OPCODE_EXT > __GLX_MIN_RENDER_OPCODE_EXT */ - } else { + opcode = hdr->opcode; + + proc = (__GLXdispatchRenderProcPtr) + __glXGetProtocolDecodeFunction(& Render_dispatch_info, opcode, do_swap); + if (proc == NULL) { client->errorValue = opcode; - return __glXBadLargeRequest; + return __glXError(GLXBadLargeRequest); } /* @@ -1909,18 +2019,27 @@ int __glXRenderLarge(__GLXclientState *cl, GLbyte *pc) } } +/* +** Execute a large rendering request (one that spans multiple X requests). +*/ +int __glXDisp_RenderLarge(__GLXclientState *cl, GLbyte *pc) +{ + return DoRenderLarge(cl, pc, False); +} + extern RESTYPE __glXSwapBarrierRes; -static int __glXBindSwapBarrierSGIX(__GLXclientState *cl, GLbyte *pc) +int __glXDisp_BindSwapBarrierSGIX(__GLXclientState *cl, GLbyte *pc) { ClientPtr client = cl->client; xGLXBindSwapBarrierSGIXReq *req = (xGLXBindSwapBarrierSGIXReq *) pc; XID drawable = req->drawable; int barrier = req->barrier; - DrawablePtr pDraw = (DrawablePtr) LookupDrawable(drawable, client); - int screen; + DrawablePtr pDraw; + int screen, rc; - if (pDraw && (pDraw->type == DRAWABLE_WINDOW)) { + rc = dixLookupDrawable(&pDraw, drawable, client, 0, DixUnknownAccess); + if (rc == Success && (pDraw->type == DRAWABLE_WINDOW)) { screen = pDraw->pScreen->myNum; if (__glXSwapBarrierFuncs && __glXSwapBarrierFuncs[screen].bindSwapBarrierFunc) { @@ -1937,11 +2056,11 @@ static int __glXBindSwapBarrierSGIX(__GLXclientState *cl, GLbyte *pc) } } client->errorValue = drawable; - return __glXBadDrawable; + return __glXError(GLXBadDrawable); } -static int __glXQueryMaxSwapBarriersSGIX(__GLXclientState *cl, GLbyte *pc) +int __glXDisp_QueryMaxSwapBarriersSGIX(__GLXclientState *cl, GLbyte *pc) { ClientPtr client = cl->client; xGLXQueryMaxSwapBarriersSGIXReq *req = @@ -1972,7 +2091,7 @@ static int __glXQueryMaxSwapBarriersSGIX(__GLXclientState *cl, GLbyte *pc) #define GLX_BAD_HYPERPIPE_SGIX 92 -static int __glxQueryHyperpipeNetworkSGIX(__GLXclientState *cl, GLbyte *pc) +int __glXDisp_QueryHyperpipeNetworkSGIX(__GLXclientState *cl, GLbyte *pc) { ClientPtr client = cl->client; xGLXQueryHyperpipeNetworkSGIXReq * req = (xGLXQueryHyperpipeNetworkSGIXReq *) pc; @@ -2012,7 +2131,7 @@ static int __glxQueryHyperpipeNetworkSGIX(__GLXclientState *cl, GLbyte *pc) return Success; } -static int __glxDestroyHyperpipeConfigSGIX (__GLXclientState *cl, GLbyte *pc) +int __glXDisp_DestroyHyperpipeConfigSGIX (__GLXclientState *cl, GLbyte *pc) { ClientPtr client = cl->client; xGLXDestroyHyperpipeConfigSGIXReq * req = @@ -2047,7 +2166,7 @@ static int __glxDestroyHyperpipeConfigSGIX (__GLXclientState *cl, GLbyte *pc) return Success; } -static int __glxQueryHyperpipeConfigSGIX(__GLXclientState *cl, GLbyte *pc) +int __glXDisp_QueryHyperpipeConfigSGIX(__GLXclientState *cl, GLbyte *pc) { ClientPtr client = cl->client; xGLXQueryHyperpipeConfigSGIXReq * req = @@ -2091,7 +2210,7 @@ static int __glxQueryHyperpipeConfigSGIX(__GLXclientState *cl, GLbyte *pc) return Success; } -static int __glxHyperpipeConfigSGIX(__GLXclientState *cl, GLbyte *pc) +int __glXDisp_HyperpipeConfigSGIX(__GLXclientState *cl, GLbyte *pc) { ClientPtr client = cl->client; xGLXHyperpipeConfigSGIXReq * req = @@ -2142,106 +2261,44 @@ static int __glxHyperpipeConfigSGIX(__GLXclientState *cl, GLbyte *pc) ** allocating the entry points in the dispatch table. */ -int __glXVendorPrivate(__GLXclientState *cl, GLbyte *pc) +int __glXDisp_VendorPrivate(__GLXclientState *cl, GLbyte *pc) { - xGLXVendorPrivateReq *req; - GLint vendorcode; + xGLXVendorPrivateReq *req = (xGLXVendorPrivateReq *) pc; + GLint vendorcode = req->vendorCode; + __GLXdispatchVendorPrivProcPtr proc; - req = (xGLXVendorPrivateReq *) pc; - vendorcode = req->vendorCode; -#ifndef __DARWIN__ - switch( vendorcode ) { - case X_GLvop_SampleMaskSGIS: - CALL_SampleMaskSGIS( GET_DISPATCH(), - (*(GLfloat *)(pc + 4), *(GLboolean *)(pc + 8)) ); - return Success; - case X_GLvop_SamplePatternSGIS: - CALL_SamplePatternSGIS( GET_DISPATCH(), (*(GLenum *)(pc + 4)) ); - return Success; - case X_GLXvop_BindSwapBarrierSGIX: - return __glXBindSwapBarrierSGIX(cl, pc); - case X_GLXvop_BindTexImageEXT: - return __glXBindTexImageEXT(cl, pc); - case X_GLXvop_ReleaseTexImageEXT: - return __glXReleaseTexImageEXT(cl, pc); - } -#endif - - if ((vendorcode >= __GLX_MIN_VENDPRIV_OPCODE_EXT) && - (vendorcode <= __GLX_MAX_VENDPRIV_OPCODE_EXT)) { - (*__glXVendorPrivTable_EXT[vendorcode-__GLX_MIN_VENDPRIV_OPCODE_EXT]) - (cl, (GLbyte*)req); + proc = (__GLXdispatchVendorPrivProcPtr) + __glXGetProtocolDecodeFunction(& VendorPriv_dispatch_info, + vendorcode, 0); + if (proc != NULL) { + (*proc)(cl, (GLbyte*)req); return Success; } - /* - ** This sample implemention does not support any private requests. - */ + cl->client->errorValue = req->vendorCode; - return __glXUnsupportedPrivateRequest; + return __glXError(GLXUnsupportedPrivateRequest); } -int __glXVendorPrivateWithReply(__GLXclientState *cl, GLbyte *pc) +int __glXDisp_VendorPrivateWithReply(__GLXclientState *cl, GLbyte *pc) { - xGLXVendorPrivateWithReplyReq *req; - GLint vendorcode; + xGLXVendorPrivateReq *req = (xGLXVendorPrivateReq *) pc; + GLint vendorcode = req->vendorCode; + __GLXdispatchVendorPrivProcPtr proc; - req = (xGLXVendorPrivateWithReplyReq *) pc; - vendorcode = req->vendorCode; - switch (vendorcode) { - case X_GLXvop_QueryContextInfoEXT: - return __glXQueryContextInfoEXT(cl, pc); - case X_GLXvop_MakeCurrentReadSGI: - return __glXMakeCurrentReadSGI(cl, pc); - case X_GLXvop_QueryMaxSwapBarriersSGIX: - return __glXQueryMaxSwapBarriersSGIX(cl, pc); - case X_GLXvop_QueryHyperpipeNetworkSGIX: - return __glxQueryHyperpipeNetworkSGIX(cl, pc); - case X_GLXvop_QueryHyperpipeConfigSGIX: - return __glxQueryHyperpipeConfigSGIX(cl, pc); - case X_GLXvop_DestroyHyperpipeConfigSGIX: - return __glxDestroyHyperpipeConfigSGIX(cl, pc); - case X_GLXvop_HyperpipeConfigSGIX: - return __glxHyperpipeConfigSGIX(cl, pc); - case X_GLXvop_GetFBConfigsSGIX: - return __glXGetFBConfigsSGIX(cl, pc); - case X_GLXvop_CreateContextWithConfigSGIX: - return __glXCreateContextWithConfigSGIX(cl, pc); - case X_GLXvop_CreateGLXPixmapWithConfigSGIX: - return __glXCreateGLXPixmapWithConfigSGIX(cl, pc); - case X_GLXvop_GetDrawableAttributesSGIX: - return __glXGetDrawableAttributesSGIX(cl, pc); - case X_GLvop_IsRenderbufferEXT: - return __glXDisp_IsRenderbufferEXT(cl, pc); - case X_GLvop_GenRenderbuffersEXT: - return __glXDisp_GenRenderbuffersEXT(cl, pc); - case X_GLvop_GetRenderbufferParameterivEXT: - return __glXDisp_GetRenderbufferParameterivEXT(cl, pc); - case X_GLvop_IsFramebufferEXT: - return __glXDisp_IsFramebufferEXT(cl, pc); - case X_GLvop_GenFramebuffersEXT: - return __glXDisp_GenFramebuffersEXT(cl, pc); - case X_GLvop_CheckFramebufferStatusEXT: - return __glXDisp_CheckFramebufferStatusEXT(cl, pc); - case X_GLvop_GetFramebufferAttachmentParameterivEXT: - return __glXDisp_GetFramebufferAttachmentParameterivEXT(cl, pc); - default: - break; - } - - if ((vendorcode >= __GLX_MIN_VENDPRIV_OPCODE_EXT) && - (vendorcode <= __GLX_MAX_VENDPRIV_OPCODE_EXT)) { - return - (*__glXVendorPrivTable_EXT[vendorcode-__GLX_MIN_VENDPRIV_OPCODE_EXT]) - (cl, (GLbyte*)req); + proc = (__GLXdispatchVendorPrivProcPtr) + __glXGetProtocolDecodeFunction(& VendorPriv_dispatch_info, + vendorcode, 0); + if (proc != NULL) { + return (*proc)(cl, (GLbyte*)req); } cl->client->errorValue = vendorcode; - return __glXUnsupportedPrivateRequest; + return __glXError(GLXUnsupportedPrivateRequest); } -int __glXQueryExtensionsString(__GLXclientState *cl, GLbyte *pc) +int __glXDisp_QueryExtensionsString(__GLXclientState *cl, GLbyte *pc) { ClientPtr client = cl->client; xGLXQueryExtensionsStringReq *req = (xGLXQueryExtensionsStringReq *) pc; @@ -2286,7 +2343,7 @@ int __glXQueryExtensionsString(__GLXclientState *cl, GLbyte *pc) return Success; } -int __glXQueryServerString(__GLXclientState *cl, GLbyte *pc) +int __glXDisp_QueryServerString(__GLXclientState *cl, GLbyte *pc) { ClientPtr client = cl->client; xGLXQueryServerStringReq *req = (xGLXQueryServerStringReq *) pc; @@ -2344,7 +2401,7 @@ int __glXQueryServerString(__GLXclientState *cl, GLbyte *pc) return Success; } -int __glXClientInfo(__GLXclientState *cl, GLbyte *pc) +int __glXDisp_ClientInfo(__GLXclientState *cl, GLbyte *pc) { xGLXClientInfoReq *req = (xGLXClientInfoReq *) pc; const char *buf; @@ -2358,4 +2415,3 @@ int __glXClientInfo(__GLXclientState *cl, GLbyte *pc) return Success; } - diff --git a/GL/glx/glxcmdsswap.c b/GL/glx/glxcmdsswap.c index 0f8b67496..d59dfdb4c 100644 --- a/GL/glx/glxcmdsswap.c +++ b/GL/glx/glxcmdsswap.c @@ -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 #include -#include -#include +#include "g_disptab.h" #include #include #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); } diff --git a/GL/glx/glxcontext.h b/GL/glx/glxcontext.h index d57745a25..a54e323cc 100644 --- a/GL/glx/glxcontext.h +++ b/GL/glx/glxcontext.h @@ -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 #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; /* diff --git a/GL/glx/glxdrawable.h b/GL/glx/glxdrawable.h index 2d5d07a79..20e9b437f 100644 --- a/GL/glx/glxdrawable.h +++ b/GL/glx/glxdrawable.h @@ -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 #endif @@ -41,6 +40,8 @@ ** */ +#include + 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 diff --git a/GL/glx/glxdri.c b/GL/glx/glxdri.c index 4935b0aca..170662c7e 100644 --- a/GL/glx/glxdri.c +++ b/GL/glx/glxdri.c @@ -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); diff --git a/GL/glx/glxerror.h b/GL/glx/glxerror.h deleted file mode 100644 index 2c6d6d863..000000000 --- a/GL/glx/glxerror.h +++ /dev/null @@ -1,58 +0,0 @@ -/* $XFree86$ */ -#ifdef HAVE_DIX_CONFIG_H -#include -#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 diff --git a/GL/glx/glxext.c b/GL/glx/glxext.c index c2a165efe..1f6c7f376 100644 --- a/GL/glx/glxext.c +++ b/GL/glx/glxext.c @@ -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; -} - diff --git a/GL/glx/glxext.h b/GL/glx/glxext.h index 5d569899f..edd66a8f0 100644 --- a/GL/glx/glxext.h +++ b/GL/glx/glxext.h @@ -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 #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); diff --git a/GL/glx/glxscreens.c b/GL/glx/glxscreens.c index 77654d3ab..43447a4e4 100644 --- a/GL/glx/glxscreens.c +++ b/GL/glx/glxscreens.c @@ -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; diff --git a/GL/glx/glxscreens.h b/GL/glx/glxscreens.h index 8a2b2388f..a7700f649 100644 --- a/GL/glx/glxscreens.h +++ b/GL/glx/glxscreens.h @@ -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; diff --git a/GL/glx/glxserver.h b/GL/glx/glxserver.h index a41720f54..49cad7328 100644 --- a/GL/glx/glxserver.h +++ b/GL/glx/glxserver.h @@ -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 #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__ */ diff --git a/GL/glx/glxutil.c b/GL/glx/glxutil.c index f1f9c06c5..1f172929f 100644 --- a/GL/glx/glxutil.c +++ b/GL/glx/glxutil.c @@ -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; -} diff --git a/GL/glx/glxutil.h b/GL/glx/glxutil.h index d5cfa20b5..1937ef2cf 100644 --- a/GL/glx/glxutil.h +++ b/GL/glx/glxutil.h @@ -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 #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_ */ - diff --git a/GL/glx/indirect_dispatch.c b/GL/glx/indirect_dispatch.c index fa794ac9b..d86dedfd5 100644 --- a/GL/glx/indirect_dispatch.c +++ b/GL/glx/indirect_dispatch.c @@ -2756,6 +2756,31 @@ int __glXDisp_AreTexturesResident(__GLXclientState *cl, GLbyte *pc) return error; } +int __glXDisp_AreTexturesResidentEXT(__GLXclientState *cl, GLbyte *pc) +{ + xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error); + + pc += __GLX_VENDPRIV_HDR_SIZE; + if ( cx != NULL ) { + const GLsizei n = *(GLsizei *)(pc + 0); + + GLboolean retval; + GLboolean answerBuffer[200]; + GLboolean * residences = __glXGetAnswerBuffer(cl, n, answerBuffer, sizeof(answerBuffer), 1); + retval = CALL_AreTexturesResident( GET_DISPATCH(), ( + n, + (const GLuint *)(pc + 4), + residences + ) ); + __glXSendReply(cl->client, residences, n, 1, GL_TRUE, retval); + error = Success; + } + + return error; +} + void __glXDisp_CopyTexImage1D(GLbyte * pc) { CALL_CopyTexImage1D( GET_DISPATCH(), ( @@ -2810,6 +2835,26 @@ void __glXDisp_CopyTexSubImage2D(GLbyte * pc) } int __glXDisp_DeleteTextures(__GLXclientState *cl, GLbyte *pc) +{ + xGLXSingleReq * const req = (xGLXSingleReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error); + + pc += __GLX_SINGLE_HDR_SIZE; + if ( cx != NULL ) { + const GLsizei n = *(GLsizei *)(pc + 0); + + CALL_DeleteTextures( GET_DISPATCH(), ( + n, + (const GLuint *)(pc + 4) + ) ); + error = Success; + } + + return error; +} + +int __glXDisp_DeleteTexturesEXT(__GLXclientState *cl, GLbyte *pc) { xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc; int error; @@ -2852,6 +2897,29 @@ int __glXDisp_GenTextures(__GLXclientState *cl, GLbyte *pc) return error; } +int __glXDisp_GenTexturesEXT(__GLXclientState *cl, GLbyte *pc) +{ + xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error); + + pc += __GLX_VENDPRIV_HDR_SIZE; + if ( cx != NULL ) { + const GLsizei n = *(GLsizei *)(pc + 0); + + GLuint answerBuffer[200]; + GLuint * textures = __glXGetAnswerBuffer(cl, n * 4, answerBuffer, sizeof(answerBuffer), 4); + CALL_GenTextures( GET_DISPATCH(), ( + n, + textures + ) ); + __glXSendReply(cl->client, textures, n, 4, GL_TRUE, 0); + error = Success; + } + + return error; +} + int __glXDisp_IsTexture(__GLXclientState *cl, GLbyte *pc) { xGLXSingleReq * const req = (xGLXSingleReq *) pc; @@ -2871,6 +2939,25 @@ int __glXDisp_IsTexture(__GLXclientState *cl, GLbyte *pc) return error; } +int __glXDisp_IsTextureEXT(__GLXclientState *cl, GLbyte *pc) +{ + xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error); + + pc += __GLX_VENDPRIV_HDR_SIZE; + if ( cx != NULL ) { + GLboolean retval; + retval = CALL_IsTexture( GET_DISPATCH(), ( + *(GLuint *)(pc + 0) + ) ); + __glXSendReply(cl->client, dummy_answer, 0, 0, GL_FALSE, retval); + error = Success; + } + + return error; +} + void __glXDisp_PrioritizeTextures(GLbyte * pc) { const GLsizei n = *(GLsizei *)(pc + 0); @@ -3039,6 +3126,35 @@ int __glXDisp_GetColorTableParameterfv(__GLXclientState *cl, GLbyte *pc) return error; } +int __glXDisp_GetColorTableParameterfvSGI(__GLXclientState *cl, GLbyte *pc) +{ + xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error); + + pc += __GLX_VENDPRIV_HDR_SIZE; + if ( cx != NULL ) { + const GLenum pname = *(GLenum *)(pc + 4); + + const GLuint compsize = __glGetColorTableParameterfv_size(pname); + GLfloat answerBuffer[200]; + GLfloat * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); + + if (params == NULL) return BadAlloc; + __glXClearErrorOccured(); + + CALL_GetColorTableParameterfv( GET_DISPATCH(), ( + *(GLenum *)(pc + 0), + pname, + params + ) ); + __glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0); + error = Success; + } + + return error; +} + int __glXDisp_GetColorTableParameteriv(__GLXclientState *cl, GLbyte *pc) { xGLXSingleReq * const req = (xGLXSingleReq *) pc; @@ -3068,6 +3184,35 @@ int __glXDisp_GetColorTableParameteriv(__GLXclientState *cl, GLbyte *pc) return error; } +int __glXDisp_GetColorTableParameterivSGI(__GLXclientState *cl, GLbyte *pc) +{ + xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error); + + pc += __GLX_VENDPRIV_HDR_SIZE; + if ( cx != NULL ) { + const GLenum pname = *(GLenum *)(pc + 4); + + const GLuint compsize = __glGetColorTableParameteriv_size(pname); + GLint answerBuffer[200]; + GLint * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); + + if (params == NULL) return BadAlloc; + __glXClearErrorOccured(); + + CALL_GetColorTableParameteriv( GET_DISPATCH(), ( + *(GLenum *)(pc + 0), + pname, + params + ) ); + __glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0); + error = Success; + } + + return error; +} + void __glXDisp_ColorSubTable(GLbyte * pc) { const GLvoid * const data = (const GLvoid *) (pc + 40); @@ -3244,6 +3389,35 @@ int __glXDisp_GetConvolutionParameterfv(__GLXclientState *cl, GLbyte *pc) return error; } +int __glXDisp_GetConvolutionParameterfvEXT(__GLXclientState *cl, GLbyte *pc) +{ + xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error); + + pc += __GLX_VENDPRIV_HDR_SIZE; + if ( cx != NULL ) { + const GLenum pname = *(GLenum *)(pc + 4); + + const GLuint compsize = __glGetConvolutionParameterfv_size(pname); + GLfloat answerBuffer[200]; + GLfloat * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); + + if (params == NULL) return BadAlloc; + __glXClearErrorOccured(); + + CALL_GetConvolutionParameterfv( GET_DISPATCH(), ( + *(GLenum *)(pc + 0), + pname, + params + ) ); + __glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0); + error = Success; + } + + return error; +} + int __glXDisp_GetConvolutionParameteriv(__GLXclientState *cl, GLbyte *pc) { xGLXSingleReq * const req = (xGLXSingleReq *) pc; @@ -3273,6 +3447,35 @@ int __glXDisp_GetConvolutionParameteriv(__GLXclientState *cl, GLbyte *pc) return error; } +int __glXDisp_GetConvolutionParameterivEXT(__GLXclientState *cl, GLbyte *pc) +{ + xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error); + + pc += __GLX_VENDPRIV_HDR_SIZE; + if ( cx != NULL ) { + const GLenum pname = *(GLenum *)(pc + 4); + + const GLuint compsize = __glGetConvolutionParameteriv_size(pname); + GLint answerBuffer[200]; + GLint * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); + + if (params == NULL) return BadAlloc; + __glXClearErrorOccured(); + + CALL_GetConvolutionParameteriv( GET_DISPATCH(), ( + *(GLenum *)(pc + 0), + pname, + params + ) ); + __glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0); + error = Success; + } + + return error; +} + int __glXDisp_GetHistogramParameterfv(__GLXclientState *cl, GLbyte *pc) { xGLXSingleReq * const req = (xGLXSingleReq *) pc; @@ -3302,6 +3505,35 @@ int __glXDisp_GetHistogramParameterfv(__GLXclientState *cl, GLbyte *pc) return error; } +int __glXDisp_GetHistogramParameterfvEXT(__GLXclientState *cl, GLbyte *pc) +{ + xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error); + + pc += __GLX_VENDPRIV_HDR_SIZE; + if ( cx != NULL ) { + const GLenum pname = *(GLenum *)(pc + 4); + + const GLuint compsize = __glGetHistogramParameterfv_size(pname); + GLfloat answerBuffer[200]; + GLfloat * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); + + if (params == NULL) return BadAlloc; + __glXClearErrorOccured(); + + CALL_GetHistogramParameterfv( GET_DISPATCH(), ( + *(GLenum *)(pc + 0), + pname, + params + ) ); + __glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0); + error = Success; + } + + return error; +} + int __glXDisp_GetHistogramParameteriv(__GLXclientState *cl, GLbyte *pc) { xGLXSingleReq * const req = (xGLXSingleReq *) pc; @@ -3331,6 +3563,35 @@ int __glXDisp_GetHistogramParameteriv(__GLXclientState *cl, GLbyte *pc) return error; } +int __glXDisp_GetHistogramParameterivEXT(__GLXclientState *cl, GLbyte *pc) +{ + xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error); + + pc += __GLX_VENDPRIV_HDR_SIZE; + if ( cx != NULL ) { + const GLenum pname = *(GLenum *)(pc + 4); + + const GLuint compsize = __glGetHistogramParameteriv_size(pname); + GLint answerBuffer[200]; + GLint * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); + + if (params == NULL) return BadAlloc; + __glXClearErrorOccured(); + + CALL_GetHistogramParameteriv( GET_DISPATCH(), ( + *(GLenum *)(pc + 0), + pname, + params + ) ); + __glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0); + error = Success; + } + + return error; +} + int __glXDisp_GetMinmaxParameterfv(__GLXclientState *cl, GLbyte *pc) { xGLXSingleReq * const req = (xGLXSingleReq *) pc; @@ -3360,6 +3621,35 @@ int __glXDisp_GetMinmaxParameterfv(__GLXclientState *cl, GLbyte *pc) return error; } +int __glXDisp_GetMinmaxParameterfvEXT(__GLXclientState *cl, GLbyte *pc) +{ + xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error); + + pc += __GLX_VENDPRIV_HDR_SIZE; + if ( cx != NULL ) { + const GLenum pname = *(GLenum *)(pc + 4); + + const GLuint compsize = __glGetMinmaxParameterfv_size(pname); + GLfloat answerBuffer[200]; + GLfloat * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); + + if (params == NULL) return BadAlloc; + __glXClearErrorOccured(); + + CALL_GetMinmaxParameterfv( GET_DISPATCH(), ( + *(GLenum *)(pc + 0), + pname, + params + ) ); + __glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0); + error = Success; + } + + return error; +} + int __glXDisp_GetMinmaxParameteriv(__GLXclientState *cl, GLbyte *pc) { xGLXSingleReq * const req = (xGLXSingleReq *) pc; @@ -3389,6 +3679,35 @@ int __glXDisp_GetMinmaxParameteriv(__GLXclientState *cl, GLbyte *pc) return error; } +int __glXDisp_GetMinmaxParameterivEXT(__GLXclientState *cl, GLbyte *pc) +{ + xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error); + + pc += __GLX_VENDPRIV_HDR_SIZE; + if ( cx != NULL ) { + const GLenum pname = *(GLenum *)(pc + 4); + + const GLuint compsize = __glGetMinmaxParameteriv_size(pname); + GLint answerBuffer[200]; + GLint * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); + + if (params == NULL) return BadAlloc; + __glXClearErrorOccured(); + + CALL_GetMinmaxParameteriv( GET_DISPATCH(), ( + *(GLenum *)(pc + 0), + pname, + params + ) ); + __glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0); + error = Success; + } + + return error; +} + void __glXDisp_Histogram(GLbyte * pc) { CALL_Histogram( GET_DISPATCH(), ( @@ -3667,6 +3986,743 @@ void __glXDisp_SampleCoverageARB(GLbyte * pc) ) ); } +void __glXDisp_CompressedTexImage1DARB(GLbyte * pc) +{ + const GLsizei imageSize = *(GLsizei *)(pc + 20); + + CALL_CompressedTexImage1DARB( GET_DISPATCH(), ( + *(GLenum *)(pc + 0), + *(GLint *)(pc + 4), + *(GLenum *)(pc + 8), + *(GLsizei *)(pc + 12), + *(GLint *)(pc + 16), + imageSize, + (const GLvoid *)(pc + 24) + ) ); +} + +void __glXDisp_CompressedTexImage2DARB(GLbyte * pc) +{ + const GLsizei imageSize = *(GLsizei *)(pc + 24); + + CALL_CompressedTexImage2DARB( GET_DISPATCH(), ( + *(GLenum *)(pc + 0), + *(GLint *)(pc + 4), + *(GLenum *)(pc + 8), + *(GLsizei *)(pc + 12), + *(GLsizei *)(pc + 16), + *(GLint *)(pc + 20), + imageSize, + (const GLvoid *)(pc + 28) + ) ); +} + +void __glXDisp_CompressedTexImage3DARB(GLbyte * pc) +{ + const GLsizei imageSize = *(GLsizei *)(pc + 28); + + CALL_CompressedTexImage3DARB( GET_DISPATCH(), ( + *(GLenum *)(pc + 0), + *(GLint *)(pc + 4), + *(GLenum *)(pc + 8), + *(GLsizei *)(pc + 12), + *(GLsizei *)(pc + 16), + *(GLsizei *)(pc + 20), + *(GLint *)(pc + 24), + imageSize, + (const GLvoid *)(pc + 32) + ) ); +} + +void __glXDisp_CompressedTexSubImage1DARB(GLbyte * pc) +{ + const GLsizei imageSize = *(GLsizei *)(pc + 20); + + CALL_CompressedTexSubImage1DARB( GET_DISPATCH(), ( + *(GLenum *)(pc + 0), + *(GLint *)(pc + 4), + *(GLint *)(pc + 8), + *(GLsizei *)(pc + 12), + *(GLenum *)(pc + 16), + imageSize, + (const GLvoid *)(pc + 24) + ) ); +} + +void __glXDisp_CompressedTexSubImage2DARB(GLbyte * pc) +{ + const GLsizei imageSize = *(GLsizei *)(pc + 28); + + CALL_CompressedTexSubImage2DARB( GET_DISPATCH(), ( + *(GLenum *)(pc + 0), + *(GLint *)(pc + 4), + *(GLint *)(pc + 8), + *(GLint *)(pc + 12), + *(GLsizei *)(pc + 16), + *(GLsizei *)(pc + 20), + *(GLenum *)(pc + 24), + imageSize, + (const GLvoid *)(pc + 32) + ) ); +} + +void __glXDisp_CompressedTexSubImage3DARB(GLbyte * pc) +{ + const GLsizei imageSize = *(GLsizei *)(pc + 36); + + CALL_CompressedTexSubImage3DARB( GET_DISPATCH(), ( + *(GLenum *)(pc + 0), + *(GLint *)(pc + 4), + *(GLint *)(pc + 8), + *(GLint *)(pc + 12), + *(GLint *)(pc + 16), + *(GLsizei *)(pc + 20), + *(GLsizei *)(pc + 24), + *(GLsizei *)(pc + 28), + *(GLenum *)(pc + 32), + imageSize, + (const GLvoid *)(pc + 40) + ) ); +} + +int __glXDisp_GetProgramEnvParameterdvARB(__GLXclientState *cl, GLbyte *pc) +{ + xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error); + + pc += __GLX_VENDPRIV_HDR_SIZE; + if ( cx != NULL ) { + GLdouble params[4]; + CALL_GetProgramEnvParameterdvARB( GET_DISPATCH(), ( + *(GLenum *)(pc + 0), + *(GLuint *)(pc + 4), + params + ) ); + __glXSendReply(cl->client, params, 4, 8, GL_FALSE, 0); + error = Success; + } + + return error; +} + +int __glXDisp_GetProgramEnvParameterfvARB(__GLXclientState *cl, GLbyte *pc) +{ + xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error); + + pc += __GLX_VENDPRIV_HDR_SIZE; + if ( cx != NULL ) { + GLfloat params[4]; + CALL_GetProgramEnvParameterfvARB( GET_DISPATCH(), ( + *(GLenum *)(pc + 0), + *(GLuint *)(pc + 4), + params + ) ); + __glXSendReply(cl->client, params, 4, 4, GL_FALSE, 0); + error = Success; + } + + return error; +} + +int __glXDisp_GetProgramLocalParameterdvARB(__GLXclientState *cl, GLbyte *pc) +{ + xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error); + + pc += __GLX_VENDPRIV_HDR_SIZE; + if ( cx != NULL ) { + GLdouble params[4]; + CALL_GetProgramLocalParameterdvARB( GET_DISPATCH(), ( + *(GLenum *)(pc + 0), + *(GLuint *)(pc + 4), + params + ) ); + __glXSendReply(cl->client, params, 4, 8, GL_FALSE, 0); + error = Success; + } + + return error; +} + +int __glXDisp_GetProgramLocalParameterfvARB(__GLXclientState *cl, GLbyte *pc) +{ + xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error); + + pc += __GLX_VENDPRIV_HDR_SIZE; + if ( cx != NULL ) { + GLfloat params[4]; + CALL_GetProgramLocalParameterfvARB( GET_DISPATCH(), ( + *(GLenum *)(pc + 0), + *(GLuint *)(pc + 4), + params + ) ); + __glXSendReply(cl->client, params, 4, 4, GL_FALSE, 0); + error = Success; + } + + return error; +} + +int __glXDisp_GetProgramivARB(__GLXclientState *cl, GLbyte *pc) +{ + xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error); + + pc += __GLX_VENDPRIV_HDR_SIZE; + if ( cx != NULL ) { + const GLenum pname = *(GLenum *)(pc + 4); + + const GLuint compsize = __glGetProgramivARB_size(pname); + GLint answerBuffer[200]; + GLint * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); + + if (params == NULL) return BadAlloc; + __glXClearErrorOccured(); + + CALL_GetProgramivARB( GET_DISPATCH(), ( + *(GLenum *)(pc + 0), + pname, + params + ) ); + __glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0); + error = Success; + } + + return error; +} + +int __glXDisp_GetVertexAttribdvARB(__GLXclientState *cl, GLbyte *pc) +{ + xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error); + + pc += __GLX_VENDPRIV_HDR_SIZE; + if ( cx != NULL ) { + const GLenum pname = *(GLenum *)(pc + 4); + + const GLuint compsize = __glGetVertexAttribdvARB_size(pname); + GLdouble answerBuffer[200]; + GLdouble * params = __glXGetAnswerBuffer(cl, compsize * 8, answerBuffer, sizeof(answerBuffer), 8); + + if (params == NULL) return BadAlloc; + __glXClearErrorOccured(); + + CALL_GetVertexAttribdvARB( GET_DISPATCH(), ( + *(GLuint *)(pc + 0), + pname, + params + ) ); + __glXSendReply(cl->client, params, compsize, 8, GL_FALSE, 0); + error = Success; + } + + return error; +} + +int __glXDisp_GetVertexAttribfvARB(__GLXclientState *cl, GLbyte *pc) +{ + xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error); + + pc += __GLX_VENDPRIV_HDR_SIZE; + if ( cx != NULL ) { + const GLenum pname = *(GLenum *)(pc + 4); + + const GLuint compsize = __glGetVertexAttribfvARB_size(pname); + GLfloat answerBuffer[200]; + GLfloat * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); + + if (params == NULL) return BadAlloc; + __glXClearErrorOccured(); + + CALL_GetVertexAttribfvARB( GET_DISPATCH(), ( + *(GLuint *)(pc + 0), + pname, + params + ) ); + __glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0); + error = Success; + } + + return error; +} + +int __glXDisp_GetVertexAttribivARB(__GLXclientState *cl, GLbyte *pc) +{ + xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error); + + pc += __GLX_VENDPRIV_HDR_SIZE; + if ( cx != NULL ) { + const GLenum pname = *(GLenum *)(pc + 4); + + const GLuint compsize = __glGetVertexAttribivARB_size(pname); + GLint answerBuffer[200]; + GLint * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); + + if (params == NULL) return BadAlloc; + __glXClearErrorOccured(); + + CALL_GetVertexAttribivARB( GET_DISPATCH(), ( + *(GLuint *)(pc + 0), + pname, + params + ) ); + __glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0); + error = Success; + } + + return error; +} + +void __glXDisp_ProgramEnvParameter4dvARB(GLbyte * pc) +{ +#ifdef __GLX_ALIGN64 + if ((unsigned long)(pc) & 7) { + (void) memmove(pc-4, pc, 40); + pc -= 4; + } +#endif + + CALL_ProgramEnvParameter4dvARB( GET_DISPATCH(), ( + *(GLenum *)(pc + 0), + *(GLuint *)(pc + 4), + (const GLdouble *)(pc + 8) + ) ); +} + +void __glXDisp_ProgramEnvParameter4fvARB(GLbyte * pc) +{ + CALL_ProgramEnvParameter4fvARB( GET_DISPATCH(), ( + *(GLenum *)(pc + 0), + *(GLuint *)(pc + 4), + (const GLfloat *)(pc + 8) + ) ); +} + +void __glXDisp_ProgramLocalParameter4dvARB(GLbyte * pc) +{ +#ifdef __GLX_ALIGN64 + if ((unsigned long)(pc) & 7) { + (void) memmove(pc-4, pc, 40); + pc -= 4; + } +#endif + + CALL_ProgramLocalParameter4dvARB( GET_DISPATCH(), ( + *(GLenum *)(pc + 0), + *(GLuint *)(pc + 4), + (const GLdouble *)(pc + 8) + ) ); +} + +void __glXDisp_ProgramLocalParameter4fvARB(GLbyte * pc) +{ + CALL_ProgramLocalParameter4fvARB( GET_DISPATCH(), ( + *(GLenum *)(pc + 0), + *(GLuint *)(pc + 4), + (const GLfloat *)(pc + 8) + ) ); +} + +void __glXDisp_ProgramStringARB(GLbyte * pc) +{ + const GLsizei len = *(GLsizei *)(pc + 8); + + CALL_ProgramStringARB( GET_DISPATCH(), ( + *(GLenum *)(pc + 0), + *(GLenum *)(pc + 4), + len, + (const GLvoid *)(pc + 12) + ) ); +} + +void __glXDisp_VertexAttrib1dvARB(GLbyte * pc) +{ +#ifdef __GLX_ALIGN64 + if ((unsigned long)(pc) & 7) { + (void) memmove(pc-4, pc, 12); + pc -= 4; + } +#endif + + CALL_VertexAttrib1dvARB( GET_DISPATCH(), ( + *(GLuint *)(pc + 0), + (const GLdouble *)(pc + 4) + ) ); +} + +void __glXDisp_VertexAttrib1fvARB(GLbyte * pc) +{ + CALL_VertexAttrib1fvARB( GET_DISPATCH(), ( + *(GLuint *)(pc + 0), + (const GLfloat *)(pc + 4) + ) ); +} + +void __glXDisp_VertexAttrib1svARB(GLbyte * pc) +{ + CALL_VertexAttrib1svARB( GET_DISPATCH(), ( + *(GLuint *)(pc + 0), + (const GLshort *)(pc + 4) + ) ); +} + +void __glXDisp_VertexAttrib2dvARB(GLbyte * pc) +{ +#ifdef __GLX_ALIGN64 + if ((unsigned long)(pc) & 7) { + (void) memmove(pc-4, pc, 20); + pc -= 4; + } +#endif + + CALL_VertexAttrib2dvARB( GET_DISPATCH(), ( + *(GLuint *)(pc + 0), + (const GLdouble *)(pc + 4) + ) ); +} + +void __glXDisp_VertexAttrib2fvARB(GLbyte * pc) +{ + CALL_VertexAttrib2fvARB( GET_DISPATCH(), ( + *(GLuint *)(pc + 0), + (const GLfloat *)(pc + 4) + ) ); +} + +void __glXDisp_VertexAttrib2svARB(GLbyte * pc) +{ + CALL_VertexAttrib2svARB( GET_DISPATCH(), ( + *(GLuint *)(pc + 0), + (const GLshort *)(pc + 4) + ) ); +} + +void __glXDisp_VertexAttrib3dvARB(GLbyte * pc) +{ +#ifdef __GLX_ALIGN64 + if ((unsigned long)(pc) & 7) { + (void) memmove(pc-4, pc, 28); + pc -= 4; + } +#endif + + CALL_VertexAttrib3dvARB( GET_DISPATCH(), ( + *(GLuint *)(pc + 0), + (const GLdouble *)(pc + 4) + ) ); +} + +void __glXDisp_VertexAttrib3fvARB(GLbyte * pc) +{ + CALL_VertexAttrib3fvARB( GET_DISPATCH(), ( + *(GLuint *)(pc + 0), + (const GLfloat *)(pc + 4) + ) ); +} + +void __glXDisp_VertexAttrib3svARB(GLbyte * pc) +{ + CALL_VertexAttrib3svARB( GET_DISPATCH(), ( + *(GLuint *)(pc + 0), + (const GLshort *)(pc + 4) + ) ); +} + +void __glXDisp_VertexAttrib4NbvARB(GLbyte * pc) +{ + CALL_VertexAttrib4NbvARB( GET_DISPATCH(), ( + *(GLuint *)(pc + 0), + (const GLbyte *)(pc + 4) + ) ); +} + +void __glXDisp_VertexAttrib4NivARB(GLbyte * pc) +{ + CALL_VertexAttrib4NivARB( GET_DISPATCH(), ( + *(GLuint *)(pc + 0), + (const GLint *)(pc + 4) + ) ); +} + +void __glXDisp_VertexAttrib4NsvARB(GLbyte * pc) +{ + CALL_VertexAttrib4NsvARB( GET_DISPATCH(), ( + *(GLuint *)(pc + 0), + (const GLshort *)(pc + 4) + ) ); +} + +void __glXDisp_VertexAttrib4NubvARB(GLbyte * pc) +{ + CALL_VertexAttrib4NubvARB( GET_DISPATCH(), ( + *(GLuint *)(pc + 0), + (const GLubyte *)(pc + 4) + ) ); +} + +void __glXDisp_VertexAttrib4NuivARB(GLbyte * pc) +{ + CALL_VertexAttrib4NuivARB( GET_DISPATCH(), ( + *(GLuint *)(pc + 0), + (const GLuint *)(pc + 4) + ) ); +} + +void __glXDisp_VertexAttrib4NusvARB(GLbyte * pc) +{ + CALL_VertexAttrib4NusvARB( GET_DISPATCH(), ( + *(GLuint *)(pc + 0), + (const GLushort *)(pc + 4) + ) ); +} + +void __glXDisp_VertexAttrib4bvARB(GLbyte * pc) +{ + CALL_VertexAttrib4bvARB( GET_DISPATCH(), ( + *(GLuint *)(pc + 0), + (const GLbyte *)(pc + 4) + ) ); +} + +void __glXDisp_VertexAttrib4dvARB(GLbyte * pc) +{ +#ifdef __GLX_ALIGN64 + if ((unsigned long)(pc) & 7) { + (void) memmove(pc-4, pc, 36); + pc -= 4; + } +#endif + + CALL_VertexAttrib4dvARB( GET_DISPATCH(), ( + *(GLuint *)(pc + 0), + (const GLdouble *)(pc + 4) + ) ); +} + +void __glXDisp_VertexAttrib4fvARB(GLbyte * pc) +{ + CALL_VertexAttrib4fvARB( GET_DISPATCH(), ( + *(GLuint *)(pc + 0), + (const GLfloat *)(pc + 4) + ) ); +} + +void __glXDisp_VertexAttrib4ivARB(GLbyte * pc) +{ + CALL_VertexAttrib4ivARB( GET_DISPATCH(), ( + *(GLuint *)(pc + 0), + (const GLint *)(pc + 4) + ) ); +} + +void __glXDisp_VertexAttrib4svARB(GLbyte * pc) +{ + CALL_VertexAttrib4svARB( GET_DISPATCH(), ( + *(GLuint *)(pc + 0), + (const GLshort *)(pc + 4) + ) ); +} + +void __glXDisp_VertexAttrib4ubvARB(GLbyte * pc) +{ + CALL_VertexAttrib4ubvARB( GET_DISPATCH(), ( + *(GLuint *)(pc + 0), + (const GLubyte *)(pc + 4) + ) ); +} + +void __glXDisp_VertexAttrib4uivARB(GLbyte * pc) +{ + CALL_VertexAttrib4uivARB( GET_DISPATCH(), ( + *(GLuint *)(pc + 0), + (const GLuint *)(pc + 4) + ) ); +} + +void __glXDisp_VertexAttrib4usvARB(GLbyte * pc) +{ + CALL_VertexAttrib4usvARB( GET_DISPATCH(), ( + *(GLuint *)(pc + 0), + (const GLushort *)(pc + 4) + ) ); +} + +void __glXDisp_BeginQueryARB(GLbyte * pc) +{ + CALL_BeginQueryARB( GET_DISPATCH(), ( + *(GLenum *)(pc + 0), + *(GLuint *)(pc + 4) + ) ); +} + +int __glXDisp_DeleteQueriesARB(__GLXclientState *cl, GLbyte *pc) +{ + xGLXSingleReq * const req = (xGLXSingleReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error); + + pc += __GLX_SINGLE_HDR_SIZE; + if ( cx != NULL ) { + const GLsizei n = *(GLsizei *)(pc + 0); + + CALL_DeleteQueriesARB( GET_DISPATCH(), ( + n, + (const GLuint *)(pc + 4) + ) ); + error = Success; + } + + return error; +} + +void __glXDisp_EndQueryARB(GLbyte * pc) +{ + CALL_EndQueryARB( GET_DISPATCH(), ( + *(GLenum *)(pc + 0) + ) ); +} + +int __glXDisp_GenQueriesARB(__GLXclientState *cl, GLbyte *pc) +{ + xGLXSingleReq * const req = (xGLXSingleReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error); + + pc += __GLX_SINGLE_HDR_SIZE; + if ( cx != NULL ) { + const GLsizei n = *(GLsizei *)(pc + 0); + + GLuint answerBuffer[200]; + GLuint * ids = __glXGetAnswerBuffer(cl, n * 4, answerBuffer, sizeof(answerBuffer), 4); + CALL_GenQueriesARB( GET_DISPATCH(), ( + n, + ids + ) ); + __glXSendReply(cl->client, ids, n, 4, GL_TRUE, 0); + error = Success; + } + + return error; +} + +int __glXDisp_GetQueryObjectivARB(__GLXclientState *cl, GLbyte *pc) +{ + xGLXSingleReq * const req = (xGLXSingleReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error); + + pc += __GLX_SINGLE_HDR_SIZE; + if ( cx != NULL ) { + const GLenum pname = *(GLenum *)(pc + 4); + + const GLuint compsize = __glGetQueryObjectivARB_size(pname); + GLint answerBuffer[200]; + GLint * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); + + if (params == NULL) return BadAlloc; + __glXClearErrorOccured(); + + CALL_GetQueryObjectivARB( GET_DISPATCH(), ( + *(GLuint *)(pc + 0), + pname, + params + ) ); + __glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0); + error = Success; + } + + return error; +} + +int __glXDisp_GetQueryObjectuivARB(__GLXclientState *cl, GLbyte *pc) +{ + xGLXSingleReq * const req = (xGLXSingleReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error); + + pc += __GLX_SINGLE_HDR_SIZE; + if ( cx != NULL ) { + const GLenum pname = *(GLenum *)(pc + 4); + + const GLuint compsize = __glGetQueryObjectuivARB_size(pname); + GLuint answerBuffer[200]; + GLuint * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); + + if (params == NULL) return BadAlloc; + __glXClearErrorOccured(); + + CALL_GetQueryObjectuivARB( GET_DISPATCH(), ( + *(GLuint *)(pc + 0), + pname, + params + ) ); + __glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0); + error = Success; + } + + return error; +} + +int __glXDisp_GetQueryivARB(__GLXclientState *cl, GLbyte *pc) +{ + xGLXSingleReq * const req = (xGLXSingleReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error); + + pc += __GLX_SINGLE_HDR_SIZE; + if ( cx != NULL ) { + const GLenum pname = *(GLenum *)(pc + 4); + + const GLuint compsize = __glGetQueryivARB_size(pname); + GLint answerBuffer[200]; + GLint * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); + + if (params == NULL) return BadAlloc; + __glXClearErrorOccured(); + + CALL_GetQueryivARB( GET_DISPATCH(), ( + *(GLenum *)(pc + 0), + pname, + params + ) ); + __glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0); + error = Success; + } + + return error; +} + +int __glXDisp_IsQueryARB(__GLXclientState *cl, GLbyte *pc) +{ + xGLXSingleReq * const req = (xGLXSingleReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error); + + pc += __GLX_SINGLE_HDR_SIZE; + if ( cx != NULL ) { + GLboolean retval; + retval = CALL_IsQueryARB( GET_DISPATCH(), ( + *(GLuint *)(pc + 0) + ) ); + __glXSendReply(cl->client, dummy_answer, 0, 0, GL_FALSE, retval); + error = Success; + } + + return error; +} + void __glXDisp_DrawBuffersARB(GLbyte * pc) { const GLsizei n = *(GLsizei *)(pc + 0); @@ -3677,73 +4733,6 @@ void __glXDisp_DrawBuffersARB(GLbyte * pc) ) ); } -int __glXDisp_AreTexturesResidentEXT(__GLXclientState *cl, GLbyte *pc) -{ - xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc; - int error; - __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error); - - pc += __GLX_VENDPRIV_HDR_SIZE; - if ( cx != NULL ) { - const GLsizei n = *(GLsizei *)(pc + 0); - - GLboolean retval; - GLboolean answerBuffer[200]; - GLboolean * residences = __glXGetAnswerBuffer(cl, n, answerBuffer, sizeof(answerBuffer), 1); - retval = CALL_AreTexturesResidentEXT( GET_DISPATCH(), ( - n, - (const GLuint *)(pc + 4), - residences - ) ); - __glXSendReply(cl->client, residences, n, 1, GL_TRUE, retval); - error = Success; - } - - return error; -} - -int __glXDisp_GenTexturesEXT(__GLXclientState *cl, GLbyte *pc) -{ - xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc; - int error; - __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error); - - pc += __GLX_VENDPRIV_HDR_SIZE; - if ( cx != NULL ) { - const GLsizei n = *(GLsizei *)(pc + 0); - - GLuint answerBuffer[200]; - GLuint * textures = __glXGetAnswerBuffer(cl, n * 4, answerBuffer, sizeof(answerBuffer), 4); - CALL_GenTexturesEXT( GET_DISPATCH(), ( - n, - textures - ) ); - __glXSendReply(cl->client, textures, n, 4, GL_TRUE, 0); - error = Success; - } - - return error; -} - -int __glXDisp_IsTextureEXT(__GLXclientState *cl, GLbyte *pc) -{ - xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc; - int error; - __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error); - - pc += __GLX_VENDPRIV_HDR_SIZE; - if ( cx != NULL ) { - GLboolean retval; - retval = CALL_IsTextureEXT( GET_DISPATCH(), ( - *(GLuint *)(pc + 0) - ) ); - __glXSendReply(cl->client, dummy_answer, 0, 0, GL_FALSE, retval); - error = Success; - } - - return error; -} - void __glXDisp_SampleMaskSGIS(GLbyte * pc) { CALL_SampleMaskSGIS( GET_DISPATCH(), ( @@ -3780,143 +4769,6 @@ void __glXDisp_PointParameterfvEXT(GLbyte * pc) ) ); } -void __glXDisp_WindowPos3fvMESA(GLbyte * pc) -{ - CALL_WindowPos3fvMESA( GET_DISPATCH(), ( - (const GLfloat *)(pc + 0) - ) ); -} - -void __glXDisp_BlendFuncSeparateEXT(GLbyte * pc) -{ - CALL_BlendFuncSeparateEXT( GET_DISPATCH(), ( - *(GLenum *)(pc + 0), - *(GLenum *)(pc + 4), - *(GLenum *)(pc + 8), - *(GLenum *)(pc + 12) - ) ); -} - -void __glXDisp_FogCoordfvEXT(GLbyte * pc) -{ - CALL_FogCoordfvEXT( GET_DISPATCH(), ( - (const GLfloat *)(pc + 0) - ) ); -} - -void __glXDisp_FogCoorddvEXT(GLbyte * pc) -{ -#ifdef __GLX_ALIGN64 - if ((unsigned long)(pc) & 7) { - (void) memmove(pc-4, pc, 8); - pc -= 4; - } -#endif - - CALL_FogCoorddvEXT( GET_DISPATCH(), ( - (const GLdouble *)(pc + 0) - ) ); -} - -void __glXDisp_CompressedTexImage3DARB(GLbyte * pc) -{ - const GLsizei imageSize = *(GLsizei *)(pc + 28); - - CALL_CompressedTexImage3DARB( GET_DISPATCH(), ( - *(GLenum *)(pc + 0), - *(GLint *)(pc + 4), - *(GLenum *)(pc + 8), - *(GLsizei *)(pc + 12), - *(GLsizei *)(pc + 16), - *(GLsizei *)(pc + 20), - *(GLint *)(pc + 24), - imageSize, - (const GLvoid *)(pc + 32) - ) ); -} - -void __glXDisp_CompressedTexImage2DARB(GLbyte * pc) -{ - const GLsizei imageSize = *(GLsizei *)(pc + 24); - - CALL_CompressedTexImage2DARB( GET_DISPATCH(), ( - *(GLenum *)(pc + 0), - *(GLint *)(pc + 4), - *(GLenum *)(pc + 8), - *(GLsizei *)(pc + 12), - *(GLsizei *)(pc + 16), - *(GLint *)(pc + 20), - imageSize, - (const GLvoid *)(pc + 28) - ) ); -} - -void __glXDisp_CompressedTexImage1DARB(GLbyte * pc) -{ - const GLsizei imageSize = *(GLsizei *)(pc + 20); - - CALL_CompressedTexImage1DARB( GET_DISPATCH(), ( - *(GLenum *)(pc + 0), - *(GLint *)(pc + 4), - *(GLenum *)(pc + 8), - *(GLsizei *)(pc + 12), - *(GLint *)(pc + 16), - imageSize, - (const GLvoid *)(pc + 24) - ) ); -} - -void __glXDisp_CompressedTexSubImage3DARB(GLbyte * pc) -{ - const GLsizei imageSize = *(GLsizei *)(pc + 36); - - CALL_CompressedTexSubImage3DARB( GET_DISPATCH(), ( - *(GLenum *)(pc + 0), - *(GLint *)(pc + 4), - *(GLint *)(pc + 8), - *(GLint *)(pc + 12), - *(GLint *)(pc + 16), - *(GLsizei *)(pc + 20), - *(GLsizei *)(pc + 24), - *(GLsizei *)(pc + 28), - *(GLenum *)(pc + 32), - imageSize, - (const GLvoid *)(pc + 40) - ) ); -} - -void __glXDisp_CompressedTexSubImage2DARB(GLbyte * pc) -{ - const GLsizei imageSize = *(GLsizei *)(pc + 28); - - CALL_CompressedTexSubImage2DARB( GET_DISPATCH(), ( - *(GLenum *)(pc + 0), - *(GLint *)(pc + 4), - *(GLint *)(pc + 8), - *(GLint *)(pc + 12), - *(GLsizei *)(pc + 16), - *(GLsizei *)(pc + 20), - *(GLenum *)(pc + 24), - imageSize, - (const GLvoid *)(pc + 32) - ) ); -} - -void __glXDisp_CompressedTexSubImage1DARB(GLbyte * pc) -{ - const GLsizei imageSize = *(GLsizei *)(pc + 20); - - CALL_CompressedTexSubImage1DARB( GET_DISPATCH(), ( - *(GLenum *)(pc + 0), - *(GLint *)(pc + 4), - *(GLint *)(pc + 8), - *(GLsizei *)(pc + 12), - *(GLenum *)(pc + 16), - imageSize, - (const GLvoid *)(pc + 24) - ) ); -} - void __glXDisp_SecondaryColor3bvEXT(GLbyte * pc) { CALL_SecondaryColor3bvEXT( GET_DISPATCH(), ( @@ -3980,6 +4832,44 @@ void __glXDisp_SecondaryColor3usvEXT(GLbyte * pc) ) ); } +void __glXDisp_FogCoorddvEXT(GLbyte * pc) +{ +#ifdef __GLX_ALIGN64 + if ((unsigned long)(pc) & 7) { + (void) memmove(pc-4, pc, 8); + pc -= 4; + } +#endif + + CALL_FogCoorddvEXT( GET_DISPATCH(), ( + (const GLdouble *)(pc + 0) + ) ); +} + +void __glXDisp_FogCoordfvEXT(GLbyte * pc) +{ + CALL_FogCoordfvEXT( GET_DISPATCH(), ( + (const GLfloat *)(pc + 0) + ) ); +} + +void __glXDisp_BlendFuncSeparateEXT(GLbyte * pc) +{ + CALL_BlendFuncSeparateEXT( GET_DISPATCH(), ( + *(GLenum *)(pc + 0), + *(GLenum *)(pc + 4), + *(GLenum *)(pc + 8), + *(GLenum *)(pc + 12) + ) ); +} + +void __glXDisp_WindowPos3fvMESA(GLbyte * pc) +{ + CALL_WindowPos3fvMESA( GET_DISPATCH(), ( + (const GLfloat *)(pc + 0) + ) ); +} + int __glXDisp_AreProgramsResidentNV(__GLXclientState *cl, GLbyte *pc) { xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc; @@ -4160,7 +5050,7 @@ int __glXDisp_GetTrackMatrixivNV(__GLXclientState *cl, GLbyte *pc) return error; } -int __glXDisp_GetVertexAttribdvARB(__GLXclientState *cl, GLbyte *pc) +int __glXDisp_GetVertexAttribdvNV(__GLXclientState *cl, GLbyte *pc) { xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc; int error; @@ -4170,14 +5060,14 @@ int __glXDisp_GetVertexAttribdvARB(__GLXclientState *cl, GLbyte *pc) if ( cx != NULL ) { const GLenum pname = *(GLenum *)(pc + 4); - const GLuint compsize = __glGetVertexAttribdvARB_size(pname); + const GLuint compsize = __glGetVertexAttribdvNV_size(pname); GLdouble answerBuffer[200]; GLdouble * params = __glXGetAnswerBuffer(cl, compsize * 8, answerBuffer, sizeof(answerBuffer), 8); if (params == NULL) return BadAlloc; __glXClearErrorOccured(); - CALL_GetVertexAttribdvARB( GET_DISPATCH(), ( + CALL_GetVertexAttribdvNV( GET_DISPATCH(), ( *(GLuint *)(pc + 0), pname, params @@ -4189,7 +5079,7 @@ int __glXDisp_GetVertexAttribdvARB(__GLXclientState *cl, GLbyte *pc) return error; } -int __glXDisp_GetVertexAttribfvARB(__GLXclientState *cl, GLbyte *pc) +int __glXDisp_GetVertexAttribfvNV(__GLXclientState *cl, GLbyte *pc) { xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc; int error; @@ -4199,14 +5089,14 @@ int __glXDisp_GetVertexAttribfvARB(__GLXclientState *cl, GLbyte *pc) if ( cx != NULL ) { const GLenum pname = *(GLenum *)(pc + 4); - const GLuint compsize = __glGetVertexAttribfvARB_size(pname); + const GLuint compsize = __glGetVertexAttribfvNV_size(pname); GLfloat answerBuffer[200]; GLfloat * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); if (params == NULL) return BadAlloc; __glXClearErrorOccured(); - CALL_GetVertexAttribfvARB( GET_DISPATCH(), ( + CALL_GetVertexAttribfvNV( GET_DISPATCH(), ( *(GLuint *)(pc + 0), pname, params @@ -4218,7 +5108,7 @@ int __glXDisp_GetVertexAttribfvARB(__GLXclientState *cl, GLbyte *pc) return error; } -int __glXDisp_GetVertexAttribivARB(__GLXclientState *cl, GLbyte *pc) +int __glXDisp_GetVertexAttribivNV(__GLXclientState *cl, GLbyte *pc) { xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc; int error; @@ -4228,14 +5118,14 @@ int __glXDisp_GetVertexAttribivARB(__GLXclientState *cl, GLbyte *pc) if ( cx != NULL ) { const GLenum pname = *(GLenum *)(pc + 4); - const GLuint compsize = __glGetVertexAttribivARB_size(pname); + const GLuint compsize = __glGetVertexAttribivNV_size(pname); GLint answerBuffer[200]; GLint * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); if (params == NULL) return BadAlloc; __glXClearErrorOccured(); - CALL_GetVertexAttribivARB( GET_DISPATCH(), ( + CALL_GetVertexAttribivNV( GET_DISPATCH(), ( *(GLuint *)(pc + 0), pname, params @@ -4355,7 +5245,7 @@ void __glXDisp_TrackMatrixNV(GLbyte * pc) ) ); } -void __glXDisp_VertexAttrib1dvARB(GLbyte * pc) +void __glXDisp_VertexAttrib1dvNV(GLbyte * pc) { #ifdef __GLX_ALIGN64 if ((unsigned long)(pc) & 7) { @@ -4364,29 +5254,29 @@ void __glXDisp_VertexAttrib1dvARB(GLbyte * pc) } #endif - CALL_VertexAttrib1dvARB( GET_DISPATCH(), ( - *(GLuint *)(pc + 8), - (const GLdouble *)(pc + 0) + CALL_VertexAttrib1dvNV( GET_DISPATCH(), ( + *(GLuint *)(pc + 0), + (const GLdouble *)(pc + 4) ) ); } -void __glXDisp_VertexAttrib1fvARB(GLbyte * pc) +void __glXDisp_VertexAttrib1fvNV(GLbyte * pc) { - CALL_VertexAttrib1fvARB( GET_DISPATCH(), ( + CALL_VertexAttrib1fvNV( GET_DISPATCH(), ( *(GLuint *)(pc + 0), (const GLfloat *)(pc + 4) ) ); } -void __glXDisp_VertexAttrib1svARB(GLbyte * pc) +void __glXDisp_VertexAttrib1svNV(GLbyte * pc) { - CALL_VertexAttrib1svARB( GET_DISPATCH(), ( + CALL_VertexAttrib1svNV( GET_DISPATCH(), ( *(GLuint *)(pc + 0), (const GLshort *)(pc + 4) ) ); } -void __glXDisp_VertexAttrib2dvARB(GLbyte * pc) +void __glXDisp_VertexAttrib2dvNV(GLbyte * pc) { #ifdef __GLX_ALIGN64 if ((unsigned long)(pc) & 7) { @@ -4395,29 +5285,29 @@ void __glXDisp_VertexAttrib2dvARB(GLbyte * pc) } #endif - CALL_VertexAttrib2dvARB( GET_DISPATCH(), ( - *(GLuint *)(pc + 16), - (const GLdouble *)(pc + 0) + CALL_VertexAttrib2dvNV( GET_DISPATCH(), ( + *(GLuint *)(pc + 0), + (const GLdouble *)(pc + 4) ) ); } -void __glXDisp_VertexAttrib2fvARB(GLbyte * pc) +void __glXDisp_VertexAttrib2fvNV(GLbyte * pc) { - CALL_VertexAttrib2fvARB( GET_DISPATCH(), ( + CALL_VertexAttrib2fvNV( GET_DISPATCH(), ( *(GLuint *)(pc + 0), (const GLfloat *)(pc + 4) ) ); } -void __glXDisp_VertexAttrib2svARB(GLbyte * pc) +void __glXDisp_VertexAttrib2svNV(GLbyte * pc) { - CALL_VertexAttrib2svARB( GET_DISPATCH(), ( + CALL_VertexAttrib2svNV( GET_DISPATCH(), ( *(GLuint *)(pc + 0), (const GLshort *)(pc + 4) ) ); } -void __glXDisp_VertexAttrib3dvARB(GLbyte * pc) +void __glXDisp_VertexAttrib3dvNV(GLbyte * pc) { #ifdef __GLX_ALIGN64 if ((unsigned long)(pc) & 7) { @@ -4426,29 +5316,29 @@ void __glXDisp_VertexAttrib3dvARB(GLbyte * pc) } #endif - CALL_VertexAttrib3dvARB( GET_DISPATCH(), ( - *(GLuint *)(pc + 24), - (const GLdouble *)(pc + 0) + CALL_VertexAttrib3dvNV( GET_DISPATCH(), ( + *(GLuint *)(pc + 0), + (const GLdouble *)(pc + 4) ) ); } -void __glXDisp_VertexAttrib3fvARB(GLbyte * pc) +void __glXDisp_VertexAttrib3fvNV(GLbyte * pc) { - CALL_VertexAttrib3fvARB( GET_DISPATCH(), ( + CALL_VertexAttrib3fvNV( GET_DISPATCH(), ( *(GLuint *)(pc + 0), (const GLfloat *)(pc + 4) ) ); } -void __glXDisp_VertexAttrib3svARB(GLbyte * pc) +void __glXDisp_VertexAttrib3svNV(GLbyte * pc) { - CALL_VertexAttrib3svARB( GET_DISPATCH(), ( + CALL_VertexAttrib3svNV( GET_DISPATCH(), ( *(GLuint *)(pc + 0), (const GLshort *)(pc + 4) ) ); } -void __glXDisp_VertexAttrib4dvARB(GLbyte * pc) +void __glXDisp_VertexAttrib4dvNV(GLbyte * pc) { #ifdef __GLX_ALIGN64 if ((unsigned long)(pc) & 7) { @@ -4457,31 +5347,31 @@ void __glXDisp_VertexAttrib4dvARB(GLbyte * pc) } #endif - CALL_VertexAttrib4dvARB( GET_DISPATCH(), ( - *(GLuint *)(pc + 32), - (const GLdouble *)(pc + 0) + CALL_VertexAttrib4dvNV( GET_DISPATCH(), ( + *(GLuint *)(pc + 0), + (const GLdouble *)(pc + 4) ) ); } -void __glXDisp_VertexAttrib4fvARB(GLbyte * pc) +void __glXDisp_VertexAttrib4fvNV(GLbyte * pc) { - CALL_VertexAttrib4fvARB( GET_DISPATCH(), ( + CALL_VertexAttrib4fvNV( GET_DISPATCH(), ( *(GLuint *)(pc + 0), (const GLfloat *)(pc + 4) ) ); } -void __glXDisp_VertexAttrib4svARB(GLbyte * pc) +void __glXDisp_VertexAttrib4svNV(GLbyte * pc) { - CALL_VertexAttrib4svARB( GET_DISPATCH(), ( + CALL_VertexAttrib4svNV( GET_DISPATCH(), ( *(GLuint *)(pc + 0), (const GLshort *)(pc + 4) ) ); } -void __glXDisp_VertexAttrib4NubvARB(GLbyte * pc) +void __glXDisp_VertexAttrib4ubvNV(GLbyte * pc) { - CALL_VertexAttrib4NubvARB( GET_DISPATCH(), ( + CALL_VertexAttrib4ubvNV( GET_DISPATCH(), ( *(GLuint *)(pc + 0), (const GLubyte *)(pc + 4) ) ); @@ -4690,149 +5580,7 @@ void __glXDisp_ActiveStencilFaceEXT(GLbyte * pc) ) ); } -void __glXDisp_VertexAttrib4bvARB(GLbyte * pc) -{ - CALL_VertexAttrib4bvARB( GET_DISPATCH(), ( - *(GLuint *)(pc + 0), - (const GLbyte *)(pc + 4) - ) ); -} - -void __glXDisp_VertexAttrib4ivARB(GLbyte * pc) -{ - CALL_VertexAttrib4ivARB( GET_DISPATCH(), ( - *(GLuint *)(pc + 0), - (const GLint *)(pc + 4) - ) ); -} - -void __glXDisp_VertexAttrib4ubvARB(GLbyte * pc) -{ - CALL_VertexAttrib4ubvARB( GET_DISPATCH(), ( - *(GLuint *)(pc + 0), - (const GLubyte *)(pc + 4) - ) ); -} - -void __glXDisp_VertexAttrib4usvARB(GLbyte * pc) -{ - CALL_VertexAttrib4usvARB( GET_DISPATCH(), ( - *(GLuint *)(pc + 0), - (const GLushort *)(pc + 4) - ) ); -} - -void __glXDisp_VertexAttrib4uivARB(GLbyte * pc) -{ - CALL_VertexAttrib4uivARB( GET_DISPATCH(), ( - *(GLuint *)(pc + 0), - (const GLuint *)(pc + 4) - ) ); -} - -void __glXDisp_VertexAttrib4NbvARB(GLbyte * pc) -{ - CALL_VertexAttrib4NbvARB( GET_DISPATCH(), ( - *(GLuint *)(pc + 0), - (const GLbyte *)(pc + 4) - ) ); -} - -void __glXDisp_VertexAttrib4NsvARB(GLbyte * pc) -{ - CALL_VertexAttrib4NsvARB( GET_DISPATCH(), ( - *(GLuint *)(pc + 0), - (const GLshort *)(pc + 4) - ) ); -} - -void __glXDisp_VertexAttrib4NivARB(GLbyte * pc) -{ - CALL_VertexAttrib4NivARB( GET_DISPATCH(), ( - *(GLuint *)(pc + 0), - (const GLint *)(pc + 4) - ) ); -} - -void __glXDisp_VertexAttrib4NusvARB(GLbyte * pc) -{ - CALL_VertexAttrib4NusvARB( GET_DISPATCH(), ( - *(GLuint *)(pc + 0), - (const GLushort *)(pc + 4) - ) ); -} - -void __glXDisp_VertexAttrib4NuivARB(GLbyte * pc) -{ - CALL_VertexAttrib4NuivARB( GET_DISPATCH(), ( - *(GLuint *)(pc + 0), - (const GLuint *)(pc + 4) - ) ); -} - -void __glXDisp_ProgramStringARB(GLbyte * pc) -{ - const GLsizei len = *(GLsizei *)(pc + 8); - - CALL_ProgramStringARB( GET_DISPATCH(), ( - *(GLenum *)(pc + 0), - *(GLenum *)(pc + 4), - len, - (const GLvoid *)(pc + 12) - ) ); -} - -void __glXDisp_ProgramEnvParameter4dvARB(GLbyte * pc) -{ -#ifdef __GLX_ALIGN64 - if ((unsigned long)(pc) & 7) { - (void) memmove(pc-4, pc, 40); - pc -= 4; - } -#endif - - CALL_ProgramEnvParameter4dvARB( GET_DISPATCH(), ( - *(GLenum *)(pc + 0), - *(GLuint *)(pc + 4), - (const GLdouble *)(pc + 8) - ) ); -} - -void __glXDisp_ProgramEnvParameter4fvARB(GLbyte * pc) -{ - CALL_ProgramEnvParameter4fvARB( GET_DISPATCH(), ( - *(GLenum *)(pc + 0), - *(GLuint *)(pc + 4), - (const GLfloat *)(pc + 8) - ) ); -} - -void __glXDisp_ProgramLocalParameter4dvARB(GLbyte * pc) -{ -#ifdef __GLX_ALIGN64 - if ((unsigned long)(pc) & 7) { - (void) memmove(pc-4, pc, 40); - pc -= 4; - } -#endif - - CALL_ProgramLocalParameter4dvARB( GET_DISPATCH(), ( - *(GLenum *)(pc + 0), - *(GLuint *)(pc + 4), - (const GLdouble *)(pc + 8) - ) ); -} - -void __glXDisp_ProgramLocalParameter4fvARB(GLbyte * pc) -{ - CALL_ProgramLocalParameter4fvARB( GET_DISPATCH(), ( - *(GLenum *)(pc + 0), - *(GLuint *)(pc + 4), - (const GLfloat *)(pc + 8) - ) ); -} - -int __glXDisp_GetProgramEnvParameterdvARB(__GLXclientState *cl, GLbyte *pc) +int __glXDisp_GetProgramNamedParameterdvNV(__GLXclientState *cl, GLbyte *pc) { xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc; int error; @@ -4840,143 +5588,22 @@ int __glXDisp_GetProgramEnvParameterdvARB(__GLXclientState *cl, GLbyte *pc) pc += __GLX_VENDPRIV_HDR_SIZE; if ( cx != NULL ) { + const GLsizei len = *(GLsizei *)(pc + 4); + GLdouble params[4]; - CALL_GetProgramEnvParameterdvARB( GET_DISPATCH(), ( - *(GLenum *)(pc + 0), - *(GLuint *)(pc + 4), + CALL_GetProgramNamedParameterdvNV( GET_DISPATCH(), ( + *(GLuint *)(pc + 0), + len, + (const GLubyte *)(pc + 8), params ) ); - __glXSendReply(cl->client, params, 4, 8, GL_FALSE, 0); + __glXSendReply(cl->client, params, 4, 8, GL_TRUE, 0); error = Success; } return error; } -int __glXDisp_GetProgramEnvParameterfvARB(__GLXclientState *cl, GLbyte *pc) -{ - xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc; - int error; - __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error); - - pc += __GLX_VENDPRIV_HDR_SIZE; - if ( cx != NULL ) { - GLfloat params[4]; - CALL_GetProgramEnvParameterfvARB( GET_DISPATCH(), ( - *(GLenum *)(pc + 0), - *(GLuint *)(pc + 4), - params - ) ); - __glXSendReply(cl->client, params, 4, 4, GL_FALSE, 0); - error = Success; - } - - return error; -} - -int __glXDisp_GetProgramLocalParameterdvARB(__GLXclientState *cl, GLbyte *pc) -{ - xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc; - int error; - __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error); - - pc += __GLX_VENDPRIV_HDR_SIZE; - if ( cx != NULL ) { - GLdouble params[4]; - CALL_GetProgramLocalParameterdvARB( GET_DISPATCH(), ( - *(GLenum *)(pc + 0), - *(GLuint *)(pc + 4), - params - ) ); - __glXSendReply(cl->client, params, 4, 8, GL_FALSE, 0); - error = Success; - } - - return error; -} - -int __glXDisp_GetProgramLocalParameterfvARB(__GLXclientState *cl, GLbyte *pc) -{ - xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc; - int error; - __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error); - - pc += __GLX_VENDPRIV_HDR_SIZE; - if ( cx != NULL ) { - GLfloat params[4]; - CALL_GetProgramLocalParameterfvARB( GET_DISPATCH(), ( - *(GLenum *)(pc + 0), - *(GLuint *)(pc + 4), - params - ) ); - __glXSendReply(cl->client, params, 4, 4, GL_FALSE, 0); - error = Success; - } - - return error; -} - -int __glXDisp_GetProgramivARB(__GLXclientState *cl, GLbyte *pc) -{ - xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc; - int error; - __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error); - - pc += __GLX_VENDPRIV_HDR_SIZE; - if ( cx != NULL ) { - const GLenum pname = *(GLenum *)(pc + 4); - - const GLuint compsize = __glGetProgramivARB_size(pname); - GLint answerBuffer[200]; - GLint * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); - - if (params == NULL) return BadAlloc; - __glXClearErrorOccured(); - - CALL_GetProgramivARB( GET_DISPATCH(), ( - *(GLenum *)(pc + 0), - pname, - params - ) ); - __glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0); - error = Success; - } - - return error; -} - -void __glXDisp_ProgramNamedParameter4fvNV(GLbyte * pc) -{ - const GLsizei len = *(GLsizei *)(pc + 4); - - CALL_ProgramNamedParameter4fvNV( GET_DISPATCH(), ( - *(GLuint *)(pc + 0), - len, - (const GLubyte *)(pc + 24), - (const GLfloat *)(pc + 8) - ) ); -} - -void __glXDisp_ProgramNamedParameter4dvNV(GLbyte * pc) -{ - const GLsizei len = *(GLsizei *)(pc + 36); - -#ifdef __GLX_ALIGN64 - const GLuint cmdlen = 44 + __GLX_PAD(len) - 4; - if ((unsigned long)(pc) & 7) { - (void) memmove(pc-4, pc, cmdlen); - pc -= 4; - } -#endif - - CALL_ProgramNamedParameter4dvNV( GET_DISPATCH(), ( - *(GLuint *)(pc + 32), - len, - (const GLubyte *)(pc + 40), - (const GLdouble *)(pc + 0) - ) ); -} - int __glXDisp_GetProgramNamedParameterfvNV(__GLXclientState *cl, GLbyte *pc) { xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc; @@ -5001,432 +5628,54 @@ int __glXDisp_GetProgramNamedParameterfvNV(__GLXclientState *cl, GLbyte *pc) return error; } -int __glXDisp_GetProgramNamedParameterdvNV(__GLXclientState *cl, GLbyte *pc) +void __glXDisp_ProgramNamedParameter4dvNV(GLbyte * pc) { - xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc; - int error; - __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error); + const GLsizei len = *(GLsizei *)(pc + 36); - pc += __GLX_VENDPRIV_HDR_SIZE; - if ( cx != NULL ) { - const GLsizei len = *(GLsizei *)(pc + 4); - - GLdouble params[4]; - CALL_GetProgramNamedParameterdvNV( GET_DISPATCH(), ( - *(GLuint *)(pc + 0), - len, - (const GLubyte *)(pc + 8), - params - ) ); - __glXSendReply(cl->client, params, 4, 8, GL_TRUE, 0); - error = Success; +#ifdef __GLX_ALIGN64 + const GLuint cmdlen = 44 + __GLX_PAD(len) - 4; + if ((unsigned long)(pc) & 7) { + (void) memmove(pc-4, pc, cmdlen); + pc -= 4; } +#endif - return error; + CALL_ProgramNamedParameter4dvNV( GET_DISPATCH(), ( + *(GLuint *)(pc + 32), + len, + (const GLubyte *)(pc + 40), + (const GLdouble *)(pc + 0) + ) ); } -int __glXDisp_GenQueriesARB(__GLXclientState *cl, GLbyte *pc) +void __glXDisp_ProgramNamedParameter4fvNV(GLbyte * pc) { - xGLXSingleReq * const req = (xGLXSingleReq *) pc; - int error; - __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error); + const GLsizei len = *(GLsizei *)(pc + 4); - pc += __GLX_SINGLE_HDR_SIZE; - if ( cx != NULL ) { - const GLsizei n = *(GLsizei *)(pc + 0); - - GLuint answerBuffer[200]; - GLuint * ids = __glXGetAnswerBuffer(cl, n * 4, answerBuffer, sizeof(answerBuffer), 4); - CALL_GenQueriesARB( GET_DISPATCH(), ( - n, - ids - ) ); - __glXSendReply(cl->client, ids, n, 4, GL_TRUE, 0); - error = Success; - } - - return error; + CALL_ProgramNamedParameter4fvNV( GET_DISPATCH(), ( + *(GLuint *)(pc + 0), + len, + (const GLubyte *)(pc + 24), + (const GLfloat *)(pc + 8) + ) ); } -int __glXDisp_DeleteQueriesARB(__GLXclientState *cl, GLbyte *pc) +void __glXDisp_BlendEquationSeparateEXT(GLbyte * pc) { - xGLXSingleReq * const req = (xGLXSingleReq *) pc; - int error; - __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error); - - pc += __GLX_SINGLE_HDR_SIZE; - if ( cx != NULL ) { - const GLsizei n = *(GLsizei *)(pc + 0); - - CALL_DeleteQueriesARB( GET_DISPATCH(), ( - n, - (const GLuint *)(pc + 4) - ) ); - error = Success; - } - - return error; + CALL_BlendEquationSeparateEXT( GET_DISPATCH(), ( + *(GLenum *)(pc + 0), + *(GLenum *)(pc + 4) + ) ); } -int __glXDisp_IsQueryARB(__GLXclientState *cl, GLbyte *pc) +void __glXDisp_BindFramebufferEXT(GLbyte * pc) { - xGLXSingleReq * const req = (xGLXSingleReq *) pc; - int error; - __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error); - - pc += __GLX_SINGLE_HDR_SIZE; - if ( cx != NULL ) { - GLboolean retval; - retval = CALL_IsQueryARB( GET_DISPATCH(), ( - *(GLuint *)(pc + 0) - ) ); - __glXSendReply(cl->client, dummy_answer, 0, 0, GL_FALSE, retval); - error = Success; - } - - return error; -} - -void __glXDisp_BeginQueryARB(GLbyte * pc) -{ - CALL_BeginQueryARB( GET_DISPATCH(), ( + CALL_BindFramebufferEXT( GET_DISPATCH(), ( *(GLenum *)(pc + 0), *(GLuint *)(pc + 4) ) ); } -void __glXDisp_EndQueryARB(GLbyte * pc) -{ - CALL_EndQueryARB( GET_DISPATCH(), ( - *(GLenum *)(pc + 0) - ) ); -} - -int __glXDisp_GetQueryivARB(__GLXclientState *cl, GLbyte *pc) -{ - xGLXSingleReq * const req = (xGLXSingleReq *) pc; - int error; - __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error); - - pc += __GLX_SINGLE_HDR_SIZE; - if ( cx != NULL ) { - const GLenum pname = *(GLenum *)(pc + 4); - - const GLuint compsize = __glGetQueryivARB_size(pname); - GLint answerBuffer[200]; - GLint * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); - - if (params == NULL) return BadAlloc; - __glXClearErrorOccured(); - - CALL_GetQueryivARB( GET_DISPATCH(), ( - *(GLenum *)(pc + 0), - pname, - params - ) ); - __glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0); - error = Success; - } - - return error; -} - -int __glXDisp_GetQueryObjectivARB(__GLXclientState *cl, GLbyte *pc) -{ - xGLXSingleReq * const req = (xGLXSingleReq *) pc; - int error; - __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error); - - pc += __GLX_SINGLE_HDR_SIZE; - if ( cx != NULL ) { - const GLenum pname = *(GLenum *)(pc + 4); - - const GLuint compsize = __glGetQueryObjectivARB_size(pname); - GLint answerBuffer[200]; - GLint * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); - - if (params == NULL) return BadAlloc; - __glXClearErrorOccured(); - - CALL_GetQueryObjectivARB( GET_DISPATCH(), ( - *(GLuint *)(pc + 0), - pname, - params - ) ); - __glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0); - error = Success; - } - - return error; -} - -int __glXDisp_GetQueryObjectuivARB(__GLXclientState *cl, GLbyte *pc) -{ - xGLXSingleReq * const req = (xGLXSingleReq *) pc; - int error; - __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error); - - pc += __GLX_SINGLE_HDR_SIZE; - if ( cx != NULL ) { - const GLenum pname = *(GLenum *)(pc + 4); - - const GLuint compsize = __glGetQueryObjectuivARB_size(pname); - GLuint answerBuffer[200]; - GLuint * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); - - if (params == NULL) return BadAlloc; - __glXClearErrorOccured(); - - CALL_GetQueryObjectuivARB( GET_DISPATCH(), ( - *(GLuint *)(pc + 0), - pname, - params - ) ); - __glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0); - error = Success; - } - - return error; -} - -int __glXDisp_GetVertexAttribdvNV(__GLXclientState *cl, GLbyte *pc) -{ - xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc; - int error; - __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error); - - pc += __GLX_VENDPRIV_HDR_SIZE; - if ( cx != NULL ) { - const GLenum pname = *(GLenum *)(pc + 4); - - const GLuint compsize = __glGetVertexAttribdvNV_size(pname); - GLdouble answerBuffer[200]; - GLdouble * params = __glXGetAnswerBuffer(cl, compsize * 8, answerBuffer, sizeof(answerBuffer), 8); - - if (params == NULL) return BadAlloc; - __glXClearErrorOccured(); - - CALL_GetVertexAttribdvNV( GET_DISPATCH(), ( - *(GLuint *)(pc + 0), - pname, - params - ) ); - __glXSendReply(cl->client, params, compsize, 8, GL_FALSE, 0); - error = Success; - } - - return error; -} - -int __glXDisp_GetVertexAttribfvNV(__GLXclientState *cl, GLbyte *pc) -{ - xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc; - int error; - __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error); - - pc += __GLX_VENDPRIV_HDR_SIZE; - if ( cx != NULL ) { - const GLenum pname = *(GLenum *)(pc + 4); - - const GLuint compsize = __glGetVertexAttribfvNV_size(pname); - GLfloat answerBuffer[200]; - GLfloat * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); - - if (params == NULL) return BadAlloc; - __glXClearErrorOccured(); - - CALL_GetVertexAttribfvNV( GET_DISPATCH(), ( - *(GLuint *)(pc + 0), - pname, - params - ) ); - __glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0); - error = Success; - } - - return error; -} - -int __glXDisp_GetVertexAttribivNV(__GLXclientState *cl, GLbyte *pc) -{ - xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc; - int error; - __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error); - - pc += __GLX_VENDPRIV_HDR_SIZE; - if ( cx != NULL ) { - const GLenum pname = *(GLenum *)(pc + 4); - - const GLuint compsize = __glGetVertexAttribivNV_size(pname); - GLint answerBuffer[200]; - GLint * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); - - if (params == NULL) return BadAlloc; - __glXClearErrorOccured(); - - CALL_GetVertexAttribivNV( GET_DISPATCH(), ( - *(GLuint *)(pc + 0), - pname, - params - ) ); - __glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0); - error = Success; - } - - return error; -} - -void __glXDisp_VertexAttrib1dvNV(GLbyte * pc) -{ -#ifdef __GLX_ALIGN64 - if ((unsigned long)(pc) & 7) { - (void) memmove(pc-4, pc, 12); - pc -= 4; - } -#endif - - CALL_VertexAttrib1dvNV( GET_DISPATCH(), ( - *(GLuint *)(pc + 0), - (const GLdouble *)(pc + 4) - ) ); -} - -void __glXDisp_VertexAttrib1fvNV(GLbyte * pc) -{ - CALL_VertexAttrib1fvNV( GET_DISPATCH(), ( - *(GLuint *)(pc + 0), - (const GLfloat *)(pc + 4) - ) ); -} - -void __glXDisp_VertexAttrib1svNV(GLbyte * pc) -{ - CALL_VertexAttrib1svNV( GET_DISPATCH(), ( - *(GLuint *)(pc + 0), - (const GLshort *)(pc + 4) - ) ); -} - -void __glXDisp_VertexAttrib2dvNV(GLbyte * pc) -{ -#ifdef __GLX_ALIGN64 - if ((unsigned long)(pc) & 7) { - (void) memmove(pc-4, pc, 20); - pc -= 4; - } -#endif - - CALL_VertexAttrib2dvNV( GET_DISPATCH(), ( - *(GLuint *)(pc + 0), - (const GLdouble *)(pc + 4) - ) ); -} - -void __glXDisp_VertexAttrib2fvNV(GLbyte * pc) -{ - CALL_VertexAttrib2fvNV( GET_DISPATCH(), ( - *(GLuint *)(pc + 0), - (const GLfloat *)(pc + 4) - ) ); -} - -void __glXDisp_VertexAttrib2svNV(GLbyte * pc) -{ - CALL_VertexAttrib2svNV( GET_DISPATCH(), ( - *(GLuint *)(pc + 0), - (const GLshort *)(pc + 4) - ) ); -} - -void __glXDisp_VertexAttrib3dvNV(GLbyte * pc) -{ -#ifdef __GLX_ALIGN64 - if ((unsigned long)(pc) & 7) { - (void) memmove(pc-4, pc, 28); - pc -= 4; - } -#endif - - CALL_VertexAttrib3dvNV( GET_DISPATCH(), ( - *(GLuint *)(pc + 0), - (const GLdouble *)(pc + 4) - ) ); -} - -void __glXDisp_VertexAttrib3fvNV(GLbyte * pc) -{ - CALL_VertexAttrib3fvNV( GET_DISPATCH(), ( - *(GLuint *)(pc + 0), - (const GLfloat *)(pc + 4) - ) ); -} - -void __glXDisp_VertexAttrib3svNV(GLbyte * pc) -{ - CALL_VertexAttrib3svNV( GET_DISPATCH(), ( - *(GLuint *)(pc + 0), - (const GLshort *)(pc + 4) - ) ); -} - -void __glXDisp_VertexAttrib4dvNV(GLbyte * pc) -{ -#ifdef __GLX_ALIGN64 - if ((unsigned long)(pc) & 7) { - (void) memmove(pc-4, pc, 36); - pc -= 4; - } -#endif - - CALL_VertexAttrib4dvNV( GET_DISPATCH(), ( - *(GLuint *)(pc + 0), - (const GLdouble *)(pc + 4) - ) ); -} - -void __glXDisp_VertexAttrib4fvNV(GLbyte * pc) -{ - CALL_VertexAttrib4fvNV( GET_DISPATCH(), ( - *(GLuint *)(pc + 0), - (const GLfloat *)(pc + 4) - ) ); -} - -void __glXDisp_VertexAttrib4svNV(GLbyte * pc) -{ - CALL_VertexAttrib4svNV( GET_DISPATCH(), ( - *(GLuint *)(pc + 0), - (const GLshort *)(pc + 4) - ) ); -} - -void __glXDisp_VertexAttrib4ubvNV(GLbyte * pc) -{ - CALL_VertexAttrib4ubvNV( GET_DISPATCH(), ( - *(GLuint *)(pc + 0), - (const GLubyte *)(pc + 4) - ) ); -} - -int __glXDisp_IsRenderbufferEXT(__GLXclientState *cl, GLbyte *pc) -{ - xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc; - int error; - __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error); - - pc += __GLX_VENDPRIV_HDR_SIZE; - if ( cx != NULL ) { - GLboolean retval; - retval = CALL_IsRenderbufferEXT( GET_DISPATCH(), ( - *(GLuint *)(pc + 0) - ) ); - __glXSendReply(cl->client, dummy_answer, 0, 0, GL_FALSE, retval); - error = Success; - } - - return error; -} - void __glXDisp_BindRenderbufferEXT(GLbyte * pc) { CALL_BindRenderbufferEXT( GET_DISPATCH(), ( @@ -5435,6 +5684,35 @@ void __glXDisp_BindRenderbufferEXT(GLbyte * pc) ) ); } +int __glXDisp_CheckFramebufferStatusEXT(__GLXclientState *cl, GLbyte *pc) +{ + xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error); + + pc += __GLX_VENDPRIV_HDR_SIZE; + if ( cx != NULL ) { + GLenum retval; + retval = CALL_CheckFramebufferStatusEXT( GET_DISPATCH(), ( + *(GLenum *)(pc + 0) + ) ); + __glXSendReply(cl->client, dummy_answer, 0, 0, GL_FALSE, retval); + error = Success; + } + + return error; +} + +void __glXDisp_DeleteFramebuffersEXT(GLbyte * pc) +{ + const GLsizei n = *(GLsizei *)(pc + 0); + + CALL_DeleteFramebuffersEXT( GET_DISPATCH(), ( + n, + (const GLuint *)(pc + 4) + ) ); +} + void __glXDisp_DeleteRenderbuffersEXT(GLbyte * pc) { const GLsizei n = *(GLsizei *)(pc + 0); @@ -5445,6 +5723,73 @@ void __glXDisp_DeleteRenderbuffersEXT(GLbyte * pc) ) ); } +void __glXDisp_FramebufferRenderbufferEXT(GLbyte * pc) +{ + CALL_FramebufferRenderbufferEXT( GET_DISPATCH(), ( + *(GLenum *)(pc + 0), + *(GLenum *)(pc + 4), + *(GLenum *)(pc + 8), + *(GLuint *)(pc + 12) + ) ); +} + +void __glXDisp_FramebufferTexture1DEXT(GLbyte * pc) +{ + CALL_FramebufferTexture1DEXT( GET_DISPATCH(), ( + *(GLenum *)(pc + 0), + *(GLenum *)(pc + 4), + *(GLenum *)(pc + 8), + *(GLuint *)(pc + 12), + *(GLint *)(pc + 16) + ) ); +} + +void __glXDisp_FramebufferTexture2DEXT(GLbyte * pc) +{ + CALL_FramebufferTexture2DEXT( GET_DISPATCH(), ( + *(GLenum *)(pc + 0), + *(GLenum *)(pc + 4), + *(GLenum *)(pc + 8), + *(GLuint *)(pc + 12), + *(GLint *)(pc + 16) + ) ); +} + +void __glXDisp_FramebufferTexture3DEXT(GLbyte * pc) +{ + CALL_FramebufferTexture3DEXT( GET_DISPATCH(), ( + *(GLenum *)(pc + 0), + *(GLenum *)(pc + 4), + *(GLenum *)(pc + 8), + *(GLuint *)(pc + 12), + *(GLint *)(pc + 16), + *(GLint *)(pc + 20) + ) ); +} + +int __glXDisp_GenFramebuffersEXT(__GLXclientState *cl, GLbyte *pc) +{ + xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error); + + pc += __GLX_VENDPRIV_HDR_SIZE; + if ( cx != NULL ) { + const GLsizei n = *(GLsizei *)(pc + 0); + + GLuint answerBuffer[200]; + GLuint * framebuffers = __glXGetAnswerBuffer(cl, n * 4, answerBuffer, sizeof(answerBuffer), 4); + CALL_GenFramebuffersEXT( GET_DISPATCH(), ( + n, + framebuffers + ) ); + __glXSendReply(cl->client, framebuffers, n, 4, GL_TRUE, 0); + error = Success; + } + + return error; +} + int __glXDisp_GenRenderbuffersEXT(__GLXclientState *cl, GLbyte *pc) { xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc; @@ -5468,16 +5813,35 @@ int __glXDisp_GenRenderbuffersEXT(__GLXclientState *cl, GLbyte *pc) return error; } -void __glXDisp_RenderbufferStorageEXT(GLbyte * pc) +void __glXDisp_GenerateMipmapEXT(GLbyte * pc) { - CALL_RenderbufferStorageEXT( GET_DISPATCH(), ( - *(GLenum *)(pc + 0), - *(GLenum *)(pc + 4), - *(GLsizei *)(pc + 8), - *(GLsizei *)(pc + 12) + CALL_GenerateMipmapEXT( GET_DISPATCH(), ( + *(GLenum *)(pc + 0) ) ); } +int __glXDisp_GetFramebufferAttachmentParameterivEXT(__GLXclientState *cl, GLbyte *pc) +{ + xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error); + + pc += __GLX_VENDPRIV_HDR_SIZE; + if ( cx != NULL ) { + GLint params[1]; + CALL_GetFramebufferAttachmentParameterivEXT( GET_DISPATCH(), ( + *(GLenum *)(pc + 0), + *(GLenum *)(pc + 4), + *(GLenum *)(pc + 8), + params + ) ); + __glXSendReply(cl->client, params, 1, 4, GL_FALSE, 0); + error = Success; + } + + return error; +} + int __glXDisp_GetRenderbufferParameterivEXT(__GLXclientState *cl, GLbyte *pc) { xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc; @@ -5518,25 +5882,7 @@ int __glXDisp_IsFramebufferEXT(__GLXclientState *cl, GLbyte *pc) return error; } -void __glXDisp_BindFramebufferEXT(GLbyte * pc) -{ - CALL_BindFramebufferEXT( GET_DISPATCH(), ( - *(GLenum *)(pc + 0), - *(GLuint *)(pc + 4) - ) ); -} - -void __glXDisp_DeleteFramebuffersEXT(GLbyte * pc) -{ - const GLsizei n = *(GLsizei *)(pc + 0); - - CALL_DeleteFramebuffersEXT( GET_DISPATCH(), ( - n, - (const GLuint *)(pc + 4) - ) ); -} - -int __glXDisp_GenFramebuffersEXT(__GLXclientState *cl, GLbyte *pc) +int __glXDisp_IsRenderbufferEXT(__GLXclientState *cl, GLbyte *pc) { xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc; int error; @@ -5544,32 +5890,9 @@ int __glXDisp_GenFramebuffersEXT(__GLXclientState *cl, GLbyte *pc) pc += __GLX_VENDPRIV_HDR_SIZE; if ( cx != NULL ) { - const GLsizei n = *(GLsizei *)(pc + 0); - - GLuint answerBuffer[200]; - GLuint * framebuffers = __glXGetAnswerBuffer(cl, n * 4, answerBuffer, sizeof(answerBuffer), 4); - CALL_GenFramebuffersEXT( GET_DISPATCH(), ( - n, - framebuffers - ) ); - __glXSendReply(cl->client, framebuffers, n, 4, GL_TRUE, 0); - error = Success; - } - - return error; -} - -int __glXDisp_CheckFramebufferStatusEXT(__GLXclientState *cl, GLbyte *pc) -{ - xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc; - int error; - __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error); - - pc += __GLX_VENDPRIV_HDR_SIZE; - if ( cx != NULL ) { - GLenum retval; - retval = CALL_CheckFramebufferStatusEXT( GET_DISPATCH(), ( - *(GLenum *)(pc + 0) + GLboolean retval; + retval = CALL_IsRenderbufferEXT( GET_DISPATCH(), ( + *(GLuint *)(pc + 0) ) ); __glXSendReply(cl->client, dummy_answer, 0, 0, GL_FALSE, retval); error = Success; @@ -5578,76 +5901,13 @@ int __glXDisp_CheckFramebufferStatusEXT(__GLXclientState *cl, GLbyte *pc) return error; } -void __glXDisp_FramebufferTexture1DEXT(GLbyte * pc) +void __glXDisp_RenderbufferStorageEXT(GLbyte * pc) { - CALL_FramebufferTexture1DEXT( GET_DISPATCH(), ( + CALL_RenderbufferStorageEXT( GET_DISPATCH(), ( *(GLenum *)(pc + 0), *(GLenum *)(pc + 4), - *(GLenum *)(pc + 8), - *(GLuint *)(pc + 12), - *(GLint *)(pc + 16) - ) ); -} - -void __glXDisp_FramebufferTexture2DEXT(GLbyte * pc) -{ - CALL_FramebufferTexture2DEXT( GET_DISPATCH(), ( - *(GLenum *)(pc + 0), - *(GLenum *)(pc + 4), - *(GLenum *)(pc + 8), - *(GLuint *)(pc + 12), - *(GLint *)(pc + 16) - ) ); -} - -void __glXDisp_FramebufferTexture3DEXT(GLbyte * pc) -{ - CALL_FramebufferTexture3DEXT( GET_DISPATCH(), ( - *(GLenum *)(pc + 0), - *(GLenum *)(pc + 4), - *(GLenum *)(pc + 8), - *(GLuint *)(pc + 12), - *(GLint *)(pc + 16), - *(GLint *)(pc + 20) - ) ); -} - -void __glXDisp_FramebufferRenderbufferEXT(GLbyte * pc) -{ - CALL_FramebufferRenderbufferEXT( GET_DISPATCH(), ( - *(GLenum *)(pc + 0), - *(GLenum *)(pc + 4), - *(GLenum *)(pc + 8), - *(GLuint *)(pc + 12) - ) ); -} - -int __glXDisp_GetFramebufferAttachmentParameterivEXT(__GLXclientState *cl, GLbyte *pc) -{ - xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc; - int error; - __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error); - - pc += __GLX_VENDPRIV_HDR_SIZE; - if ( cx != NULL ) { - GLint params[1]; - CALL_GetFramebufferAttachmentParameterivEXT( GET_DISPATCH(), ( - *(GLenum *)(pc + 0), - *(GLenum *)(pc + 4), - *(GLenum *)(pc + 8), - params - ) ); - __glXSendReply(cl->client, params, 1, 4, GL_FALSE, 0); - error = Success; - } - - return error; -} - -void __glXDisp_GenerateMipmapEXT(GLbyte * pc) -{ - CALL_GenerateMipmapEXT( GET_DISPATCH(), ( - *(GLenum *)(pc + 0) + *(GLsizei *)(pc + 8), + *(GLsizei *)(pc + 12) ) ); } diff --git a/GL/glx/indirect_dispatch.h b/GL/glx/indirect_dispatch.h index 950d484bd..17a372f91 100644 --- a/GL/glx/indirect_dispatch.h +++ b/GL/glx/indirect_dispatch.h @@ -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); diff --git a/GL/glx/indirect_dispatch_swap.c b/GL/glx/indirect_dispatch_swap.c index f5ed1009a..136f0d010 100644 --- a/GL/glx/indirect_dispatch_swap.c +++ b/GL/glx/indirect_dispatch_swap.c @@ -28,7 +28,7 @@ #include #include #include -#ifdef __linux__ +#if defined(__linux__) || defined (__GLIBC__) || defined(__GNU__) #include #elif defined(__OpenBSD__) #include @@ -2887,6 +2887,31 @@ int __glXDispSwap_AreTexturesResident(__GLXclientState *cl, GLbyte *pc) return error; } +int __glXDispSwap_AreTexturesResidentEXT(__GLXclientState *cl, GLbyte *pc) +{ + xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error); + + pc += __GLX_VENDPRIV_HDR_SIZE; + if ( cx != NULL ) { + const GLsizei n = (GLsizei )bswap_CARD32 ( pc + 0 ); + + GLboolean retval; + GLboolean answerBuffer[200]; + GLboolean * residences = __glXGetAnswerBuffer(cl, n, answerBuffer, sizeof(answerBuffer), 1); + retval = CALL_AreTexturesResident( GET_DISPATCH(), ( + n, + (const GLuint *)bswap_32_array( (uint32_t *) (pc + 4), 0 ), + residences + ) ); + __glXSendReplySwap(cl->client, residences, n, 1, GL_TRUE, retval); + error = Success; + } + + return error; +} + void __glXDispSwap_CopyTexImage1D(GLbyte * pc) { CALL_CopyTexImage1D( GET_DISPATCH(), ( @@ -2941,6 +2966,26 @@ void __glXDispSwap_CopyTexSubImage2D(GLbyte * pc) } int __glXDispSwap_DeleteTextures(__GLXclientState *cl, GLbyte *pc) +{ + xGLXSingleReq * const req = (xGLXSingleReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error); + + pc += __GLX_SINGLE_HDR_SIZE; + if ( cx != NULL ) { + const GLsizei n = (GLsizei )bswap_CARD32 ( pc + 0 ); + + CALL_DeleteTextures( GET_DISPATCH(), ( + n, + (const GLuint *)bswap_32_array( (uint32_t *) (pc + 4), 0 ) + ) ); + error = Success; + } + + return error; +} + +int __glXDispSwap_DeleteTexturesEXT(__GLXclientState *cl, GLbyte *pc) { xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc; int error; @@ -2984,6 +3029,30 @@ int __glXDispSwap_GenTextures(__GLXclientState *cl, GLbyte *pc) return error; } +int __glXDispSwap_GenTexturesEXT(__GLXclientState *cl, GLbyte *pc) +{ + xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error); + + pc += __GLX_VENDPRIV_HDR_SIZE; + if ( cx != NULL ) { + const GLsizei n = (GLsizei )bswap_CARD32 ( pc + 0 ); + + GLuint answerBuffer[200]; + GLuint * textures = __glXGetAnswerBuffer(cl, n * 4, answerBuffer, sizeof(answerBuffer), 4); + CALL_GenTextures( GET_DISPATCH(), ( + n, + textures + ) ); + (void) bswap_32_array( (uint32_t *) textures, n ); + __glXSendReplySwap(cl->client, textures, n, 4, GL_TRUE, 0); + error = Success; + } + + return error; +} + int __glXDispSwap_IsTexture(__GLXclientState *cl, GLbyte *pc) { xGLXSingleReq * const req = (xGLXSingleReq *) pc; @@ -3003,6 +3072,25 @@ int __glXDispSwap_IsTexture(__GLXclientState *cl, GLbyte *pc) return error; } +int __glXDispSwap_IsTextureEXT(__GLXclientState *cl, GLbyte *pc) +{ + xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error); + + pc += __GLX_VENDPRIV_HDR_SIZE; + if ( cx != NULL ) { + GLboolean retval; + retval = CALL_IsTexture( GET_DISPATCH(), ( + (GLuint )bswap_CARD32 ( pc + 0 ) + ) ); + __glXSendReplySwap(cl->client, dummy_answer, 0, 0, GL_FALSE, retval); + error = Success; + } + + return error; +} + void __glXDispSwap_PrioritizeTextures(GLbyte * pc) { const GLsizei n = (GLsizei )bswap_CARD32 ( pc + 0 ); @@ -3172,6 +3260,36 @@ int __glXDispSwap_GetColorTableParameterfv(__GLXclientState *cl, GLbyte *pc) return error; } +int __glXDispSwap_GetColorTableParameterfvSGI(__GLXclientState *cl, GLbyte *pc) +{ + xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error); + + pc += __GLX_VENDPRIV_HDR_SIZE; + if ( cx != NULL ) { + const GLenum pname = (GLenum )bswap_ENUM ( pc + 4 ); + + const GLuint compsize = __glGetColorTableParameterfv_size(pname); + GLfloat answerBuffer[200]; + GLfloat * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); + + if (params == NULL) return BadAlloc; + __glXClearErrorOccured(); + + CALL_GetColorTableParameterfv( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 0 ), + pname, + params + ) ); + (void) bswap_32_array( (uint32_t *) params, compsize ); + __glXSendReplySwap(cl->client, params, compsize, 4, GL_FALSE, 0); + error = Success; + } + + return error; +} + int __glXDispSwap_GetColorTableParameteriv(__GLXclientState *cl, GLbyte *pc) { xGLXSingleReq * const req = (xGLXSingleReq *) pc; @@ -3202,6 +3320,36 @@ int __glXDispSwap_GetColorTableParameteriv(__GLXclientState *cl, GLbyte *pc) return error; } +int __glXDispSwap_GetColorTableParameterivSGI(__GLXclientState *cl, GLbyte *pc) +{ + xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error); + + pc += __GLX_VENDPRIV_HDR_SIZE; + if ( cx != NULL ) { + const GLenum pname = (GLenum )bswap_ENUM ( pc + 4 ); + + const GLuint compsize = __glGetColorTableParameteriv_size(pname); + GLint answerBuffer[200]; + GLint * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); + + if (params == NULL) return BadAlloc; + __glXClearErrorOccured(); + + CALL_GetColorTableParameteriv( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 0 ), + pname, + params + ) ); + (void) bswap_32_array( (uint32_t *) params, compsize ); + __glXSendReplySwap(cl->client, params, compsize, 4, GL_FALSE, 0); + error = Success; + } + + return error; +} + void __glXDispSwap_ColorSubTable(GLbyte * pc) { const GLvoid * const data = (const GLvoid *) (pc + 40); @@ -3379,6 +3527,36 @@ int __glXDispSwap_GetConvolutionParameterfv(__GLXclientState *cl, GLbyte *pc) return error; } +int __glXDispSwap_GetConvolutionParameterfvEXT(__GLXclientState *cl, GLbyte *pc) +{ + xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error); + + pc += __GLX_VENDPRIV_HDR_SIZE; + if ( cx != NULL ) { + const GLenum pname = (GLenum )bswap_ENUM ( pc + 4 ); + + const GLuint compsize = __glGetConvolutionParameterfv_size(pname); + GLfloat answerBuffer[200]; + GLfloat * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); + + if (params == NULL) return BadAlloc; + __glXClearErrorOccured(); + + CALL_GetConvolutionParameterfv( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 0 ), + pname, + params + ) ); + (void) bswap_32_array( (uint32_t *) params, compsize ); + __glXSendReplySwap(cl->client, params, compsize, 4, GL_FALSE, 0); + error = Success; + } + + return error; +} + int __glXDispSwap_GetConvolutionParameteriv(__GLXclientState *cl, GLbyte *pc) { xGLXSingleReq * const req = (xGLXSingleReq *) pc; @@ -3409,6 +3587,36 @@ int __glXDispSwap_GetConvolutionParameteriv(__GLXclientState *cl, GLbyte *pc) return error; } +int __glXDispSwap_GetConvolutionParameterivEXT(__GLXclientState *cl, GLbyte *pc) +{ + xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error); + + pc += __GLX_VENDPRIV_HDR_SIZE; + if ( cx != NULL ) { + const GLenum pname = (GLenum )bswap_ENUM ( pc + 4 ); + + const GLuint compsize = __glGetConvolutionParameteriv_size(pname); + GLint answerBuffer[200]; + GLint * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); + + if (params == NULL) return BadAlloc; + __glXClearErrorOccured(); + + CALL_GetConvolutionParameteriv( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 0 ), + pname, + params + ) ); + (void) bswap_32_array( (uint32_t *) params, compsize ); + __glXSendReplySwap(cl->client, params, compsize, 4, GL_FALSE, 0); + error = Success; + } + + return error; +} + int __glXDispSwap_GetHistogramParameterfv(__GLXclientState *cl, GLbyte *pc) { xGLXSingleReq * const req = (xGLXSingleReq *) pc; @@ -3439,6 +3647,36 @@ int __glXDispSwap_GetHistogramParameterfv(__GLXclientState *cl, GLbyte *pc) return error; } +int __glXDispSwap_GetHistogramParameterfvEXT(__GLXclientState *cl, GLbyte *pc) +{ + xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error); + + pc += __GLX_VENDPRIV_HDR_SIZE; + if ( cx != NULL ) { + const GLenum pname = (GLenum )bswap_ENUM ( pc + 4 ); + + const GLuint compsize = __glGetHistogramParameterfv_size(pname); + GLfloat answerBuffer[200]; + GLfloat * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); + + if (params == NULL) return BadAlloc; + __glXClearErrorOccured(); + + CALL_GetHistogramParameterfv( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 0 ), + pname, + params + ) ); + (void) bswap_32_array( (uint32_t *) params, compsize ); + __glXSendReplySwap(cl->client, params, compsize, 4, GL_FALSE, 0); + error = Success; + } + + return error; +} + int __glXDispSwap_GetHistogramParameteriv(__GLXclientState *cl, GLbyte *pc) { xGLXSingleReq * const req = (xGLXSingleReq *) pc; @@ -3469,6 +3707,36 @@ int __glXDispSwap_GetHistogramParameteriv(__GLXclientState *cl, GLbyte *pc) return error; } +int __glXDispSwap_GetHistogramParameterivEXT(__GLXclientState *cl, GLbyte *pc) +{ + xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error); + + pc += __GLX_VENDPRIV_HDR_SIZE; + if ( cx != NULL ) { + const GLenum pname = (GLenum )bswap_ENUM ( pc + 4 ); + + const GLuint compsize = __glGetHistogramParameteriv_size(pname); + GLint answerBuffer[200]; + GLint * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); + + if (params == NULL) return BadAlloc; + __glXClearErrorOccured(); + + CALL_GetHistogramParameteriv( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 0 ), + pname, + params + ) ); + (void) bswap_32_array( (uint32_t *) params, compsize ); + __glXSendReplySwap(cl->client, params, compsize, 4, GL_FALSE, 0); + error = Success; + } + + return error; +} + int __glXDispSwap_GetMinmaxParameterfv(__GLXclientState *cl, GLbyte *pc) { xGLXSingleReq * const req = (xGLXSingleReq *) pc; @@ -3499,6 +3767,36 @@ int __glXDispSwap_GetMinmaxParameterfv(__GLXclientState *cl, GLbyte *pc) return error; } +int __glXDispSwap_GetMinmaxParameterfvEXT(__GLXclientState *cl, GLbyte *pc) +{ + xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error); + + pc += __GLX_VENDPRIV_HDR_SIZE; + if ( cx != NULL ) { + const GLenum pname = (GLenum )bswap_ENUM ( pc + 4 ); + + const GLuint compsize = __glGetMinmaxParameterfv_size(pname); + GLfloat answerBuffer[200]; + GLfloat * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); + + if (params == NULL) return BadAlloc; + __glXClearErrorOccured(); + + CALL_GetMinmaxParameterfv( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 0 ), + pname, + params + ) ); + (void) bswap_32_array( (uint32_t *) params, compsize ); + __glXSendReplySwap(cl->client, params, compsize, 4, GL_FALSE, 0); + error = Success; + } + + return error; +} + int __glXDispSwap_GetMinmaxParameteriv(__GLXclientState *cl, GLbyte *pc) { xGLXSingleReq * const req = (xGLXSingleReq *) pc; @@ -3529,6 +3827,36 @@ int __glXDispSwap_GetMinmaxParameteriv(__GLXclientState *cl, GLbyte *pc) return error; } +int __glXDispSwap_GetMinmaxParameterivEXT(__GLXclientState *cl, GLbyte *pc) +{ + xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error); + + pc += __GLX_VENDPRIV_HDR_SIZE; + if ( cx != NULL ) { + const GLenum pname = (GLenum )bswap_ENUM ( pc + 4 ); + + const GLuint compsize = __glGetMinmaxParameteriv_size(pname); + GLint answerBuffer[200]; + GLint * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); + + if (params == NULL) return BadAlloc; + __glXClearErrorOccured(); + + CALL_GetMinmaxParameteriv( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 0 ), + pname, + params + ) ); + (void) bswap_32_array( (uint32_t *) params, compsize ); + __glXSendReplySwap(cl->client, params, compsize, 4, GL_FALSE, 0); + error = Success; + } + + return error; +} + void __glXDispSwap_Histogram(GLbyte * pc) { CALL_Histogram( GET_DISPATCH(), ( @@ -3807,6 +4135,755 @@ void __glXDispSwap_SampleCoverageARB(GLbyte * pc) ) ); } +void __glXDispSwap_CompressedTexImage1DARB(GLbyte * pc) +{ + const GLsizei imageSize = (GLsizei )bswap_CARD32 ( pc + 20 ); + + CALL_CompressedTexImage1DARB( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 0 ), + (GLint )bswap_CARD32 ( pc + 4 ), + (GLenum )bswap_ENUM ( pc + 8 ), + (GLsizei )bswap_CARD32 ( pc + 12 ), + (GLint )bswap_CARD32 ( pc + 16 ), + imageSize, + (const GLvoid *)(pc + 24) + ) ); +} + +void __glXDispSwap_CompressedTexImage2DARB(GLbyte * pc) +{ + const GLsizei imageSize = (GLsizei )bswap_CARD32 ( pc + 24 ); + + CALL_CompressedTexImage2DARB( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 0 ), + (GLint )bswap_CARD32 ( pc + 4 ), + (GLenum )bswap_ENUM ( pc + 8 ), + (GLsizei )bswap_CARD32 ( pc + 12 ), + (GLsizei )bswap_CARD32 ( pc + 16 ), + (GLint )bswap_CARD32 ( pc + 20 ), + imageSize, + (const GLvoid *)(pc + 28) + ) ); +} + +void __glXDispSwap_CompressedTexImage3DARB(GLbyte * pc) +{ + const GLsizei imageSize = (GLsizei )bswap_CARD32 ( pc + 28 ); + + CALL_CompressedTexImage3DARB( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 0 ), + (GLint )bswap_CARD32 ( pc + 4 ), + (GLenum )bswap_ENUM ( pc + 8 ), + (GLsizei )bswap_CARD32 ( pc + 12 ), + (GLsizei )bswap_CARD32 ( pc + 16 ), + (GLsizei )bswap_CARD32 ( pc + 20 ), + (GLint )bswap_CARD32 ( pc + 24 ), + imageSize, + (const GLvoid *)(pc + 32) + ) ); +} + +void __glXDispSwap_CompressedTexSubImage1DARB(GLbyte * pc) +{ + const GLsizei imageSize = (GLsizei )bswap_CARD32 ( pc + 20 ); + + CALL_CompressedTexSubImage1DARB( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 0 ), + (GLint )bswap_CARD32 ( pc + 4 ), + (GLint )bswap_CARD32 ( pc + 8 ), + (GLsizei )bswap_CARD32 ( pc + 12 ), + (GLenum )bswap_ENUM ( pc + 16 ), + imageSize, + (const GLvoid *)(pc + 24) + ) ); +} + +void __glXDispSwap_CompressedTexSubImage2DARB(GLbyte * pc) +{ + const GLsizei imageSize = (GLsizei )bswap_CARD32 ( pc + 28 ); + + CALL_CompressedTexSubImage2DARB( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 0 ), + (GLint )bswap_CARD32 ( pc + 4 ), + (GLint )bswap_CARD32 ( pc + 8 ), + (GLint )bswap_CARD32 ( pc + 12 ), + (GLsizei )bswap_CARD32 ( pc + 16 ), + (GLsizei )bswap_CARD32 ( pc + 20 ), + (GLenum )bswap_ENUM ( pc + 24 ), + imageSize, + (const GLvoid *)(pc + 32) + ) ); +} + +void __glXDispSwap_CompressedTexSubImage3DARB(GLbyte * pc) +{ + const GLsizei imageSize = (GLsizei )bswap_CARD32 ( pc + 36 ); + + CALL_CompressedTexSubImage3DARB( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 0 ), + (GLint )bswap_CARD32 ( pc + 4 ), + (GLint )bswap_CARD32 ( pc + 8 ), + (GLint )bswap_CARD32 ( pc + 12 ), + (GLint )bswap_CARD32 ( pc + 16 ), + (GLsizei )bswap_CARD32 ( pc + 20 ), + (GLsizei )bswap_CARD32 ( pc + 24 ), + (GLsizei )bswap_CARD32 ( pc + 28 ), + (GLenum )bswap_ENUM ( pc + 32 ), + imageSize, + (const GLvoid *)(pc + 40) + ) ); +} + +int __glXDispSwap_GetProgramEnvParameterdvARB(__GLXclientState *cl, GLbyte *pc) +{ + xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error); + + pc += __GLX_VENDPRIV_HDR_SIZE; + if ( cx != NULL ) { + GLdouble params[4]; + CALL_GetProgramEnvParameterdvARB( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 0 ), + (GLuint )bswap_CARD32 ( pc + 4 ), + params + ) ); + (void) bswap_64_array( (uint64_t *) params, 4 ); + __glXSendReplySwap(cl->client, params, 4, 8, GL_FALSE, 0); + error = Success; + } + + return error; +} + +int __glXDispSwap_GetProgramEnvParameterfvARB(__GLXclientState *cl, GLbyte *pc) +{ + xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error); + + pc += __GLX_VENDPRIV_HDR_SIZE; + if ( cx != NULL ) { + GLfloat params[4]; + CALL_GetProgramEnvParameterfvARB( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 0 ), + (GLuint )bswap_CARD32 ( pc + 4 ), + params + ) ); + (void) bswap_32_array( (uint32_t *) params, 4 ); + __glXSendReplySwap(cl->client, params, 4, 4, GL_FALSE, 0); + error = Success; + } + + return error; +} + +int __glXDispSwap_GetProgramLocalParameterdvARB(__GLXclientState *cl, GLbyte *pc) +{ + xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error); + + pc += __GLX_VENDPRIV_HDR_SIZE; + if ( cx != NULL ) { + GLdouble params[4]; + CALL_GetProgramLocalParameterdvARB( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 0 ), + (GLuint )bswap_CARD32 ( pc + 4 ), + params + ) ); + (void) bswap_64_array( (uint64_t *) params, 4 ); + __glXSendReplySwap(cl->client, params, 4, 8, GL_FALSE, 0); + error = Success; + } + + return error; +} + +int __glXDispSwap_GetProgramLocalParameterfvARB(__GLXclientState *cl, GLbyte *pc) +{ + xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error); + + pc += __GLX_VENDPRIV_HDR_SIZE; + if ( cx != NULL ) { + GLfloat params[4]; + CALL_GetProgramLocalParameterfvARB( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 0 ), + (GLuint )bswap_CARD32 ( pc + 4 ), + params + ) ); + (void) bswap_32_array( (uint32_t *) params, 4 ); + __glXSendReplySwap(cl->client, params, 4, 4, GL_FALSE, 0); + error = Success; + } + + return error; +} + +int __glXDispSwap_GetProgramivARB(__GLXclientState *cl, GLbyte *pc) +{ + xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error); + + pc += __GLX_VENDPRIV_HDR_SIZE; + if ( cx != NULL ) { + const GLenum pname = (GLenum )bswap_ENUM ( pc + 4 ); + + const GLuint compsize = __glGetProgramivARB_size(pname); + GLint answerBuffer[200]; + GLint * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); + + if (params == NULL) return BadAlloc; + __glXClearErrorOccured(); + + CALL_GetProgramivARB( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 0 ), + pname, + params + ) ); + (void) bswap_32_array( (uint32_t *) params, compsize ); + __glXSendReplySwap(cl->client, params, compsize, 4, GL_FALSE, 0); + error = Success; + } + + return error; +} + +int __glXDispSwap_GetVertexAttribdvARB(__GLXclientState *cl, GLbyte *pc) +{ + xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error); + + pc += __GLX_VENDPRIV_HDR_SIZE; + if ( cx != NULL ) { + const GLenum pname = (GLenum )bswap_ENUM ( pc + 4 ); + + const GLuint compsize = __glGetVertexAttribdvARB_size(pname); + GLdouble answerBuffer[200]; + GLdouble * params = __glXGetAnswerBuffer(cl, compsize * 8, answerBuffer, sizeof(answerBuffer), 8); + + if (params == NULL) return BadAlloc; + __glXClearErrorOccured(); + + CALL_GetVertexAttribdvARB( GET_DISPATCH(), ( + (GLuint )bswap_CARD32 ( pc + 0 ), + pname, + params + ) ); + (void) bswap_64_array( (uint64_t *) params, compsize ); + __glXSendReplySwap(cl->client, params, compsize, 8, GL_FALSE, 0); + error = Success; + } + + return error; +} + +int __glXDispSwap_GetVertexAttribfvARB(__GLXclientState *cl, GLbyte *pc) +{ + xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error); + + pc += __GLX_VENDPRIV_HDR_SIZE; + if ( cx != NULL ) { + const GLenum pname = (GLenum )bswap_ENUM ( pc + 4 ); + + const GLuint compsize = __glGetVertexAttribfvARB_size(pname); + GLfloat answerBuffer[200]; + GLfloat * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); + + if (params == NULL) return BadAlloc; + __glXClearErrorOccured(); + + CALL_GetVertexAttribfvARB( GET_DISPATCH(), ( + (GLuint )bswap_CARD32 ( pc + 0 ), + pname, + params + ) ); + (void) bswap_32_array( (uint32_t *) params, compsize ); + __glXSendReplySwap(cl->client, params, compsize, 4, GL_FALSE, 0); + error = Success; + } + + return error; +} + +int __glXDispSwap_GetVertexAttribivARB(__GLXclientState *cl, GLbyte *pc) +{ + xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error); + + pc += __GLX_VENDPRIV_HDR_SIZE; + if ( cx != NULL ) { + const GLenum pname = (GLenum )bswap_ENUM ( pc + 4 ); + + const GLuint compsize = __glGetVertexAttribivARB_size(pname); + GLint answerBuffer[200]; + GLint * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); + + if (params == NULL) return BadAlloc; + __glXClearErrorOccured(); + + CALL_GetVertexAttribivARB( GET_DISPATCH(), ( + (GLuint )bswap_CARD32 ( pc + 0 ), + pname, + params + ) ); + (void) bswap_32_array( (uint32_t *) params, compsize ); + __glXSendReplySwap(cl->client, params, compsize, 4, GL_FALSE, 0); + error = Success; + } + + return error; +} + +void __glXDispSwap_ProgramEnvParameter4dvARB(GLbyte * pc) +{ +#ifdef __GLX_ALIGN64 + if ((unsigned long)(pc) & 7) { + (void) memmove(pc-4, pc, 40); + pc -= 4; + } +#endif + + CALL_ProgramEnvParameter4dvARB( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 0 ), + (GLuint )bswap_CARD32 ( pc + 4 ), + (const GLdouble *)bswap_64_array( (uint64_t *) (pc + 8), 4 ) + ) ); +} + +void __glXDispSwap_ProgramEnvParameter4fvARB(GLbyte * pc) +{ + CALL_ProgramEnvParameter4fvARB( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 0 ), + (GLuint )bswap_CARD32 ( pc + 4 ), + (const GLfloat *)bswap_32_array( (uint32_t *) (pc + 8), 4 ) + ) ); +} + +void __glXDispSwap_ProgramLocalParameter4dvARB(GLbyte * pc) +{ +#ifdef __GLX_ALIGN64 + if ((unsigned long)(pc) & 7) { + (void) memmove(pc-4, pc, 40); + pc -= 4; + } +#endif + + CALL_ProgramLocalParameter4dvARB( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 0 ), + (GLuint )bswap_CARD32 ( pc + 4 ), + (const GLdouble *)bswap_64_array( (uint64_t *) (pc + 8), 4 ) + ) ); +} + +void __glXDispSwap_ProgramLocalParameter4fvARB(GLbyte * pc) +{ + CALL_ProgramLocalParameter4fvARB( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 0 ), + (GLuint )bswap_CARD32 ( pc + 4 ), + (const GLfloat *)bswap_32_array( (uint32_t *) (pc + 8), 4 ) + ) ); +} + +void __glXDispSwap_ProgramStringARB(GLbyte * pc) +{ + const GLsizei len = (GLsizei )bswap_CARD32 ( pc + 8 ); + + CALL_ProgramStringARB( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 0 ), + (GLenum )bswap_ENUM ( pc + 4 ), + len, + (const GLvoid *)(pc + 12) + ) ); +} + +void __glXDispSwap_VertexAttrib1dvARB(GLbyte * pc) +{ +#ifdef __GLX_ALIGN64 + if ((unsigned long)(pc) & 7) { + (void) memmove(pc-4, pc, 12); + pc -= 4; + } +#endif + + CALL_VertexAttrib1dvARB( GET_DISPATCH(), ( + (GLuint )bswap_CARD32 ( pc + 0 ), + (const GLdouble *)bswap_64_array( (uint64_t *) (pc + 4), 1 ) + ) ); +} + +void __glXDispSwap_VertexAttrib1fvARB(GLbyte * pc) +{ + CALL_VertexAttrib1fvARB( GET_DISPATCH(), ( + (GLuint )bswap_CARD32 ( pc + 0 ), + (const GLfloat *)bswap_32_array( (uint32_t *) (pc + 4), 1 ) + ) ); +} + +void __glXDispSwap_VertexAttrib1svARB(GLbyte * pc) +{ + CALL_VertexAttrib1svARB( GET_DISPATCH(), ( + (GLuint )bswap_CARD32 ( pc + 0 ), + (const GLshort *)bswap_16_array( (uint16_t *) (pc + 4), 1 ) + ) ); +} + +void __glXDispSwap_VertexAttrib2dvARB(GLbyte * pc) +{ +#ifdef __GLX_ALIGN64 + if ((unsigned long)(pc) & 7) { + (void) memmove(pc-4, pc, 20); + pc -= 4; + } +#endif + + CALL_VertexAttrib2dvARB( GET_DISPATCH(), ( + (GLuint )bswap_CARD32 ( pc + 0 ), + (const GLdouble *)bswap_64_array( (uint64_t *) (pc + 4), 2 ) + ) ); +} + +void __glXDispSwap_VertexAttrib2fvARB(GLbyte * pc) +{ + CALL_VertexAttrib2fvARB( GET_DISPATCH(), ( + (GLuint )bswap_CARD32 ( pc + 0 ), + (const GLfloat *)bswap_32_array( (uint32_t *) (pc + 4), 2 ) + ) ); +} + +void __glXDispSwap_VertexAttrib2svARB(GLbyte * pc) +{ + CALL_VertexAttrib2svARB( GET_DISPATCH(), ( + (GLuint )bswap_CARD32 ( pc + 0 ), + (const GLshort *)bswap_16_array( (uint16_t *) (pc + 4), 2 ) + ) ); +} + +void __glXDispSwap_VertexAttrib3dvARB(GLbyte * pc) +{ +#ifdef __GLX_ALIGN64 + if ((unsigned long)(pc) & 7) { + (void) memmove(pc-4, pc, 28); + pc -= 4; + } +#endif + + CALL_VertexAttrib3dvARB( GET_DISPATCH(), ( + (GLuint )bswap_CARD32 ( pc + 0 ), + (const GLdouble *)bswap_64_array( (uint64_t *) (pc + 4), 3 ) + ) ); +} + +void __glXDispSwap_VertexAttrib3fvARB(GLbyte * pc) +{ + CALL_VertexAttrib3fvARB( GET_DISPATCH(), ( + (GLuint )bswap_CARD32 ( pc + 0 ), + (const GLfloat *)bswap_32_array( (uint32_t *) (pc + 4), 3 ) + ) ); +} + +void __glXDispSwap_VertexAttrib3svARB(GLbyte * pc) +{ + CALL_VertexAttrib3svARB( GET_DISPATCH(), ( + (GLuint )bswap_CARD32 ( pc + 0 ), + (const GLshort *)bswap_16_array( (uint16_t *) (pc + 4), 3 ) + ) ); +} + +void __glXDispSwap_VertexAttrib4NbvARB(GLbyte * pc) +{ + CALL_VertexAttrib4NbvARB( GET_DISPATCH(), ( + (GLuint )bswap_CARD32 ( pc + 0 ), + (const GLbyte *)(pc + 4) + ) ); +} + +void __glXDispSwap_VertexAttrib4NivARB(GLbyte * pc) +{ + CALL_VertexAttrib4NivARB( GET_DISPATCH(), ( + (GLuint )bswap_CARD32 ( pc + 0 ), + (const GLint *)bswap_32_array( (uint32_t *) (pc + 4), 4 ) + ) ); +} + +void __glXDispSwap_VertexAttrib4NsvARB(GLbyte * pc) +{ + CALL_VertexAttrib4NsvARB( GET_DISPATCH(), ( + (GLuint )bswap_CARD32 ( pc + 0 ), + (const GLshort *)bswap_16_array( (uint16_t *) (pc + 4), 4 ) + ) ); +} + +void __glXDispSwap_VertexAttrib4NubvARB(GLbyte * pc) +{ + CALL_VertexAttrib4NubvARB( GET_DISPATCH(), ( + (GLuint )bswap_CARD32 ( pc + 0 ), + (const GLubyte *)(pc + 4) + ) ); +} + +void __glXDispSwap_VertexAttrib4NuivARB(GLbyte * pc) +{ + CALL_VertexAttrib4NuivARB( GET_DISPATCH(), ( + (GLuint )bswap_CARD32 ( pc + 0 ), + (const GLuint *)bswap_32_array( (uint32_t *) (pc + 4), 4 ) + ) ); +} + +void __glXDispSwap_VertexAttrib4NusvARB(GLbyte * pc) +{ + CALL_VertexAttrib4NusvARB( GET_DISPATCH(), ( + (GLuint )bswap_CARD32 ( pc + 0 ), + (const GLushort *)bswap_16_array( (uint16_t *) (pc + 4), 4 ) + ) ); +} + +void __glXDispSwap_VertexAttrib4bvARB(GLbyte * pc) +{ + CALL_VertexAttrib4bvARB( GET_DISPATCH(), ( + (GLuint )bswap_CARD32 ( pc + 0 ), + (const GLbyte *)(pc + 4) + ) ); +} + +void __glXDispSwap_VertexAttrib4dvARB(GLbyte * pc) +{ +#ifdef __GLX_ALIGN64 + if ((unsigned long)(pc) & 7) { + (void) memmove(pc-4, pc, 36); + pc -= 4; + } +#endif + + CALL_VertexAttrib4dvARB( GET_DISPATCH(), ( + (GLuint )bswap_CARD32 ( pc + 0 ), + (const GLdouble *)bswap_64_array( (uint64_t *) (pc + 4), 4 ) + ) ); +} + +void __glXDispSwap_VertexAttrib4fvARB(GLbyte * pc) +{ + CALL_VertexAttrib4fvARB( GET_DISPATCH(), ( + (GLuint )bswap_CARD32 ( pc + 0 ), + (const GLfloat *)bswap_32_array( (uint32_t *) (pc + 4), 4 ) + ) ); +} + +void __glXDispSwap_VertexAttrib4ivARB(GLbyte * pc) +{ + CALL_VertexAttrib4ivARB( GET_DISPATCH(), ( + (GLuint )bswap_CARD32 ( pc + 0 ), + (const GLint *)bswap_32_array( (uint32_t *) (pc + 4), 4 ) + ) ); +} + +void __glXDispSwap_VertexAttrib4svARB(GLbyte * pc) +{ + CALL_VertexAttrib4svARB( GET_DISPATCH(), ( + (GLuint )bswap_CARD32 ( pc + 0 ), + (const GLshort *)bswap_16_array( (uint16_t *) (pc + 4), 4 ) + ) ); +} + +void __glXDispSwap_VertexAttrib4ubvARB(GLbyte * pc) +{ + CALL_VertexAttrib4ubvARB( GET_DISPATCH(), ( + (GLuint )bswap_CARD32 ( pc + 0 ), + (const GLubyte *)(pc + 4) + ) ); +} + +void __glXDispSwap_VertexAttrib4uivARB(GLbyte * pc) +{ + CALL_VertexAttrib4uivARB( GET_DISPATCH(), ( + (GLuint )bswap_CARD32 ( pc + 0 ), + (const GLuint *)bswap_32_array( (uint32_t *) (pc + 4), 4 ) + ) ); +} + +void __glXDispSwap_VertexAttrib4usvARB(GLbyte * pc) +{ + CALL_VertexAttrib4usvARB( GET_DISPATCH(), ( + (GLuint )bswap_CARD32 ( pc + 0 ), + (const GLushort *)bswap_16_array( (uint16_t *) (pc + 4), 4 ) + ) ); +} + +void __glXDispSwap_BeginQueryARB(GLbyte * pc) +{ + CALL_BeginQueryARB( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 0 ), + (GLuint )bswap_CARD32 ( pc + 4 ) + ) ); +} + +int __glXDispSwap_DeleteQueriesARB(__GLXclientState *cl, GLbyte *pc) +{ + xGLXSingleReq * const req = (xGLXSingleReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error); + + pc += __GLX_SINGLE_HDR_SIZE; + if ( cx != NULL ) { + const GLsizei n = (GLsizei )bswap_CARD32 ( pc + 0 ); + + CALL_DeleteQueriesARB( GET_DISPATCH(), ( + n, + (const GLuint *)bswap_32_array( (uint32_t *) (pc + 4), 0 ) + ) ); + error = Success; + } + + return error; +} + +void __glXDispSwap_EndQueryARB(GLbyte * pc) +{ + CALL_EndQueryARB( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 0 ) + ) ); +} + +int __glXDispSwap_GenQueriesARB(__GLXclientState *cl, GLbyte *pc) +{ + xGLXSingleReq * const req = (xGLXSingleReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error); + + pc += __GLX_SINGLE_HDR_SIZE; + if ( cx != NULL ) { + const GLsizei n = (GLsizei )bswap_CARD32 ( pc + 0 ); + + GLuint answerBuffer[200]; + GLuint * ids = __glXGetAnswerBuffer(cl, n * 4, answerBuffer, sizeof(answerBuffer), 4); + CALL_GenQueriesARB( GET_DISPATCH(), ( + n, + ids + ) ); + (void) bswap_32_array( (uint32_t *) ids, n ); + __glXSendReplySwap(cl->client, ids, n, 4, GL_TRUE, 0); + error = Success; + } + + return error; +} + +int __glXDispSwap_GetQueryObjectivARB(__GLXclientState *cl, GLbyte *pc) +{ + xGLXSingleReq * const req = (xGLXSingleReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error); + + pc += __GLX_SINGLE_HDR_SIZE; + if ( cx != NULL ) { + const GLenum pname = (GLenum )bswap_ENUM ( pc + 4 ); + + const GLuint compsize = __glGetQueryObjectivARB_size(pname); + GLint answerBuffer[200]; + GLint * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); + + if (params == NULL) return BadAlloc; + __glXClearErrorOccured(); + + CALL_GetQueryObjectivARB( GET_DISPATCH(), ( + (GLuint )bswap_CARD32 ( pc + 0 ), + pname, + params + ) ); + (void) bswap_32_array( (uint32_t *) params, compsize ); + __glXSendReplySwap(cl->client, params, compsize, 4, GL_FALSE, 0); + error = Success; + } + + return error; +} + +int __glXDispSwap_GetQueryObjectuivARB(__GLXclientState *cl, GLbyte *pc) +{ + xGLXSingleReq * const req = (xGLXSingleReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error); + + pc += __GLX_SINGLE_HDR_SIZE; + if ( cx != NULL ) { + const GLenum pname = (GLenum )bswap_ENUM ( pc + 4 ); + + const GLuint compsize = __glGetQueryObjectuivARB_size(pname); + GLuint answerBuffer[200]; + GLuint * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); + + if (params == NULL) return BadAlloc; + __glXClearErrorOccured(); + + CALL_GetQueryObjectuivARB( GET_DISPATCH(), ( + (GLuint )bswap_CARD32 ( pc + 0 ), + pname, + params + ) ); + (void) bswap_32_array( (uint32_t *) params, compsize ); + __glXSendReplySwap(cl->client, params, compsize, 4, GL_FALSE, 0); + error = Success; + } + + return error; +} + +int __glXDispSwap_GetQueryivARB(__GLXclientState *cl, GLbyte *pc) +{ + xGLXSingleReq * const req = (xGLXSingleReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error); + + pc += __GLX_SINGLE_HDR_SIZE; + if ( cx != NULL ) { + const GLenum pname = (GLenum )bswap_ENUM ( pc + 4 ); + + const GLuint compsize = __glGetQueryivARB_size(pname); + GLint answerBuffer[200]; + GLint * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); + + if (params == NULL) return BadAlloc; + __glXClearErrorOccured(); + + CALL_GetQueryivARB( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 0 ), + pname, + params + ) ); + (void) bswap_32_array( (uint32_t *) params, compsize ); + __glXSendReplySwap(cl->client, params, compsize, 4, GL_FALSE, 0); + error = Success; + } + + return error; +} + +int __glXDispSwap_IsQueryARB(__GLXclientState *cl, GLbyte *pc) +{ + xGLXSingleReq * const req = (xGLXSingleReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error); + + pc += __GLX_SINGLE_HDR_SIZE; + if ( cx != NULL ) { + GLboolean retval; + retval = CALL_IsQueryARB( GET_DISPATCH(), ( + (GLuint )bswap_CARD32 ( pc + 0 ) + ) ); + __glXSendReplySwap(cl->client, dummy_answer, 0, 0, GL_FALSE, retval); + error = Success; + } + + return error; +} + void __glXDispSwap_DrawBuffersARB(GLbyte * pc) { const GLsizei n = (GLsizei )bswap_CARD32 ( pc + 0 ); @@ -3817,74 +4894,6 @@ void __glXDispSwap_DrawBuffersARB(GLbyte * pc) ) ); } -int __glXDispSwap_AreTexturesResidentEXT(__GLXclientState *cl, GLbyte *pc) -{ - xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc; - int error; - __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error); - - pc += __GLX_VENDPRIV_HDR_SIZE; - if ( cx != NULL ) { - const GLsizei n = (GLsizei )bswap_CARD32 ( pc + 0 ); - - GLboolean retval; - GLboolean answerBuffer[200]; - GLboolean * residences = __glXGetAnswerBuffer(cl, n, answerBuffer, sizeof(answerBuffer), 1); - retval = CALL_AreTexturesResidentEXT( GET_DISPATCH(), ( - n, - (const GLuint *)bswap_32_array( (uint32_t *) (pc + 4), 0 ), - residences - ) ); - __glXSendReplySwap(cl->client, residences, n, 1, GL_TRUE, retval); - error = Success; - } - - return error; -} - -int __glXDispSwap_GenTexturesEXT(__GLXclientState *cl, GLbyte *pc) -{ - xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc; - int error; - __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error); - - pc += __GLX_VENDPRIV_HDR_SIZE; - if ( cx != NULL ) { - const GLsizei n = (GLsizei )bswap_CARD32 ( pc + 0 ); - - GLuint answerBuffer[200]; - GLuint * textures = __glXGetAnswerBuffer(cl, n * 4, answerBuffer, sizeof(answerBuffer), 4); - CALL_GenTexturesEXT( GET_DISPATCH(), ( - n, - textures - ) ); - (void) bswap_32_array( (uint32_t *) textures, n ); - __glXSendReplySwap(cl->client, textures, n, 4, GL_TRUE, 0); - error = Success; - } - - return error; -} - -int __glXDispSwap_IsTextureEXT(__GLXclientState *cl, GLbyte *pc) -{ - xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc; - int error; - __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error); - - pc += __GLX_VENDPRIV_HDR_SIZE; - if ( cx != NULL ) { - GLboolean retval; - retval = CALL_IsTextureEXT( GET_DISPATCH(), ( - (GLuint )bswap_CARD32 ( pc + 0 ) - ) ); - __glXSendReplySwap(cl->client, dummy_answer, 0, 0, GL_FALSE, retval); - error = Success; - } - - return error; -} - void __glXDispSwap_SampleMaskSGIS(GLbyte * pc) { CALL_SampleMaskSGIS( GET_DISPATCH(), ( @@ -3921,143 +4930,6 @@ void __glXDispSwap_PointParameterfvEXT(GLbyte * pc) ) ); } -void __glXDispSwap_WindowPos3fvMESA(GLbyte * pc) -{ - CALL_WindowPos3fvMESA( GET_DISPATCH(), ( - (const GLfloat *)bswap_32_array( (uint32_t *) (pc + 0), 3 ) - ) ); -} - -void __glXDispSwap_BlendFuncSeparateEXT(GLbyte * pc) -{ - CALL_BlendFuncSeparateEXT( GET_DISPATCH(), ( - (GLenum )bswap_ENUM ( pc + 0 ), - (GLenum )bswap_ENUM ( pc + 4 ), - (GLenum )bswap_ENUM ( pc + 8 ), - (GLenum )bswap_ENUM ( pc + 12 ) - ) ); -} - -void __glXDispSwap_FogCoordfvEXT(GLbyte * pc) -{ - CALL_FogCoordfvEXT( GET_DISPATCH(), ( - (const GLfloat *)bswap_32_array( (uint32_t *) (pc + 0), 1 ) - ) ); -} - -void __glXDispSwap_FogCoorddvEXT(GLbyte * pc) -{ -#ifdef __GLX_ALIGN64 - if ((unsigned long)(pc) & 7) { - (void) memmove(pc-4, pc, 8); - pc -= 4; - } -#endif - - CALL_FogCoorddvEXT( GET_DISPATCH(), ( - (const GLdouble *)bswap_64_array( (uint64_t *) (pc + 0), 1 ) - ) ); -} - -void __glXDispSwap_CompressedTexImage3DARB(GLbyte * pc) -{ - const GLsizei imageSize = (GLsizei )bswap_CARD32 ( pc + 28 ); - - CALL_CompressedTexImage3DARB( GET_DISPATCH(), ( - (GLenum )bswap_ENUM ( pc + 0 ), - (GLint )bswap_CARD32 ( pc + 4 ), - (GLenum )bswap_ENUM ( pc + 8 ), - (GLsizei )bswap_CARD32 ( pc + 12 ), - (GLsizei )bswap_CARD32 ( pc + 16 ), - (GLsizei )bswap_CARD32 ( pc + 20 ), - (GLint )bswap_CARD32 ( pc + 24 ), - imageSize, - (const GLvoid *)(pc + 32) - ) ); -} - -void __glXDispSwap_CompressedTexImage2DARB(GLbyte * pc) -{ - const GLsizei imageSize = (GLsizei )bswap_CARD32 ( pc + 24 ); - - CALL_CompressedTexImage2DARB( GET_DISPATCH(), ( - (GLenum )bswap_ENUM ( pc + 0 ), - (GLint )bswap_CARD32 ( pc + 4 ), - (GLenum )bswap_ENUM ( pc + 8 ), - (GLsizei )bswap_CARD32 ( pc + 12 ), - (GLsizei )bswap_CARD32 ( pc + 16 ), - (GLint )bswap_CARD32 ( pc + 20 ), - imageSize, - (const GLvoid *)(pc + 28) - ) ); -} - -void __glXDispSwap_CompressedTexImage1DARB(GLbyte * pc) -{ - const GLsizei imageSize = (GLsizei )bswap_CARD32 ( pc + 20 ); - - CALL_CompressedTexImage1DARB( GET_DISPATCH(), ( - (GLenum )bswap_ENUM ( pc + 0 ), - (GLint )bswap_CARD32 ( pc + 4 ), - (GLenum )bswap_ENUM ( pc + 8 ), - (GLsizei )bswap_CARD32 ( pc + 12 ), - (GLint )bswap_CARD32 ( pc + 16 ), - imageSize, - (const GLvoid *)(pc + 24) - ) ); -} - -void __glXDispSwap_CompressedTexSubImage3DARB(GLbyte * pc) -{ - const GLsizei imageSize = (GLsizei )bswap_CARD32 ( pc + 36 ); - - CALL_CompressedTexSubImage3DARB( GET_DISPATCH(), ( - (GLenum )bswap_ENUM ( pc + 0 ), - (GLint )bswap_CARD32 ( pc + 4 ), - (GLint )bswap_CARD32 ( pc + 8 ), - (GLint )bswap_CARD32 ( pc + 12 ), - (GLint )bswap_CARD32 ( pc + 16 ), - (GLsizei )bswap_CARD32 ( pc + 20 ), - (GLsizei )bswap_CARD32 ( pc + 24 ), - (GLsizei )bswap_CARD32 ( pc + 28 ), - (GLenum )bswap_ENUM ( pc + 32 ), - imageSize, - (const GLvoid *)(pc + 40) - ) ); -} - -void __glXDispSwap_CompressedTexSubImage2DARB(GLbyte * pc) -{ - const GLsizei imageSize = (GLsizei )bswap_CARD32 ( pc + 28 ); - - CALL_CompressedTexSubImage2DARB( GET_DISPATCH(), ( - (GLenum )bswap_ENUM ( pc + 0 ), - (GLint )bswap_CARD32 ( pc + 4 ), - (GLint )bswap_CARD32 ( pc + 8 ), - (GLint )bswap_CARD32 ( pc + 12 ), - (GLsizei )bswap_CARD32 ( pc + 16 ), - (GLsizei )bswap_CARD32 ( pc + 20 ), - (GLenum )bswap_ENUM ( pc + 24 ), - imageSize, - (const GLvoid *)(pc + 32) - ) ); -} - -void __glXDispSwap_CompressedTexSubImage1DARB(GLbyte * pc) -{ - const GLsizei imageSize = (GLsizei )bswap_CARD32 ( pc + 20 ); - - CALL_CompressedTexSubImage1DARB( GET_DISPATCH(), ( - (GLenum )bswap_ENUM ( pc + 0 ), - (GLint )bswap_CARD32 ( pc + 4 ), - (GLint )bswap_CARD32 ( pc + 8 ), - (GLsizei )bswap_CARD32 ( pc + 12 ), - (GLenum )bswap_ENUM ( pc + 16 ), - imageSize, - (const GLvoid *)(pc + 24) - ) ); -} - void __glXDispSwap_SecondaryColor3bvEXT(GLbyte * pc) { CALL_SecondaryColor3bvEXT( GET_DISPATCH(), ( @@ -4121,6 +4993,44 @@ void __glXDispSwap_SecondaryColor3usvEXT(GLbyte * pc) ) ); } +void __glXDispSwap_FogCoorddvEXT(GLbyte * pc) +{ +#ifdef __GLX_ALIGN64 + if ((unsigned long)(pc) & 7) { + (void) memmove(pc-4, pc, 8); + pc -= 4; + } +#endif + + CALL_FogCoorddvEXT( GET_DISPATCH(), ( + (const GLdouble *)bswap_64_array( (uint64_t *) (pc + 0), 1 ) + ) ); +} + +void __glXDispSwap_FogCoordfvEXT(GLbyte * pc) +{ + CALL_FogCoordfvEXT( GET_DISPATCH(), ( + (const GLfloat *)bswap_32_array( (uint32_t *) (pc + 0), 1 ) + ) ); +} + +void __glXDispSwap_BlendFuncSeparateEXT(GLbyte * pc) +{ + CALL_BlendFuncSeparateEXT( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 0 ), + (GLenum )bswap_ENUM ( pc + 4 ), + (GLenum )bswap_ENUM ( pc + 8 ), + (GLenum )bswap_ENUM ( pc + 12 ) + ) ); +} + +void __glXDispSwap_WindowPos3fvMESA(GLbyte * pc) +{ + CALL_WindowPos3fvMESA( GET_DISPATCH(), ( + (const GLfloat *)bswap_32_array( (uint32_t *) (pc + 0), 3 ) + ) ); +} + int __glXDispSwap_AreProgramsResidentNV(__GLXclientState *cl, GLbyte *pc) { xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc; @@ -4306,7 +5216,7 @@ int __glXDispSwap_GetTrackMatrixivNV(__GLXclientState *cl, GLbyte *pc) return error; } -int __glXDispSwap_GetVertexAttribdvARB(__GLXclientState *cl, GLbyte *pc) +int __glXDispSwap_GetVertexAttribdvNV(__GLXclientState *cl, GLbyte *pc) { xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc; int error; @@ -4316,14 +5226,14 @@ int __glXDispSwap_GetVertexAttribdvARB(__GLXclientState *cl, GLbyte *pc) if ( cx != NULL ) { const GLenum pname = (GLenum )bswap_ENUM ( pc + 4 ); - const GLuint compsize = __glGetVertexAttribdvARB_size(pname); + const GLuint compsize = __glGetVertexAttribdvNV_size(pname); GLdouble answerBuffer[200]; GLdouble * params = __glXGetAnswerBuffer(cl, compsize * 8, answerBuffer, sizeof(answerBuffer), 8); if (params == NULL) return BadAlloc; __glXClearErrorOccured(); - CALL_GetVertexAttribdvARB( GET_DISPATCH(), ( + CALL_GetVertexAttribdvNV( GET_DISPATCH(), ( (GLuint )bswap_CARD32 ( pc + 0 ), pname, params @@ -4336,7 +5246,7 @@ int __glXDispSwap_GetVertexAttribdvARB(__GLXclientState *cl, GLbyte *pc) return error; } -int __glXDispSwap_GetVertexAttribfvARB(__GLXclientState *cl, GLbyte *pc) +int __glXDispSwap_GetVertexAttribfvNV(__GLXclientState *cl, GLbyte *pc) { xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc; int error; @@ -4346,14 +5256,14 @@ int __glXDispSwap_GetVertexAttribfvARB(__GLXclientState *cl, GLbyte *pc) if ( cx != NULL ) { const GLenum pname = (GLenum )bswap_ENUM ( pc + 4 ); - const GLuint compsize = __glGetVertexAttribfvARB_size(pname); + const GLuint compsize = __glGetVertexAttribfvNV_size(pname); GLfloat answerBuffer[200]; GLfloat * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); if (params == NULL) return BadAlloc; __glXClearErrorOccured(); - CALL_GetVertexAttribfvARB( GET_DISPATCH(), ( + CALL_GetVertexAttribfvNV( GET_DISPATCH(), ( (GLuint )bswap_CARD32 ( pc + 0 ), pname, params @@ -4366,7 +5276,7 @@ int __glXDispSwap_GetVertexAttribfvARB(__GLXclientState *cl, GLbyte *pc) return error; } -int __glXDispSwap_GetVertexAttribivARB(__GLXclientState *cl, GLbyte *pc) +int __glXDispSwap_GetVertexAttribivNV(__GLXclientState *cl, GLbyte *pc) { xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc; int error; @@ -4376,14 +5286,14 @@ int __glXDispSwap_GetVertexAttribivARB(__GLXclientState *cl, GLbyte *pc) if ( cx != NULL ) { const GLenum pname = (GLenum )bswap_ENUM ( pc + 4 ); - const GLuint compsize = __glGetVertexAttribivARB_size(pname); + const GLuint compsize = __glGetVertexAttribivNV_size(pname); GLint answerBuffer[200]; GLint * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); if (params == NULL) return BadAlloc; __glXClearErrorOccured(); - CALL_GetVertexAttribivARB( GET_DISPATCH(), ( + CALL_GetVertexAttribivNV( GET_DISPATCH(), ( (GLuint )bswap_CARD32 ( pc + 0 ), pname, params @@ -4504,7 +5414,7 @@ void __glXDispSwap_TrackMatrixNV(GLbyte * pc) ) ); } -void __glXDispSwap_VertexAttrib1dvARB(GLbyte * pc) +void __glXDispSwap_VertexAttrib1dvNV(GLbyte * pc) { #ifdef __GLX_ALIGN64 if ((unsigned long)(pc) & 7) { @@ -4513,29 +5423,29 @@ void __glXDispSwap_VertexAttrib1dvARB(GLbyte * pc) } #endif - CALL_VertexAttrib1dvARB( GET_DISPATCH(), ( - (GLuint )bswap_CARD32 ( pc + 8 ), - (const GLdouble *)bswap_64_array( (uint64_t *) (pc + 0), 1 ) + CALL_VertexAttrib1dvNV( GET_DISPATCH(), ( + (GLuint )bswap_CARD32 ( pc + 0 ), + (const GLdouble *)bswap_64_array( (uint64_t *) (pc + 4), 1 ) ) ); } -void __glXDispSwap_VertexAttrib1fvARB(GLbyte * pc) +void __glXDispSwap_VertexAttrib1fvNV(GLbyte * pc) { - CALL_VertexAttrib1fvARB( GET_DISPATCH(), ( + CALL_VertexAttrib1fvNV( GET_DISPATCH(), ( (GLuint )bswap_CARD32 ( pc + 0 ), (const GLfloat *)bswap_32_array( (uint32_t *) (pc + 4), 1 ) ) ); } -void __glXDispSwap_VertexAttrib1svARB(GLbyte * pc) +void __glXDispSwap_VertexAttrib1svNV(GLbyte * pc) { - CALL_VertexAttrib1svARB( GET_DISPATCH(), ( + CALL_VertexAttrib1svNV( GET_DISPATCH(), ( (GLuint )bswap_CARD32 ( pc + 0 ), (const GLshort *)bswap_16_array( (uint16_t *) (pc + 4), 1 ) ) ); } -void __glXDispSwap_VertexAttrib2dvARB(GLbyte * pc) +void __glXDispSwap_VertexAttrib2dvNV(GLbyte * pc) { #ifdef __GLX_ALIGN64 if ((unsigned long)(pc) & 7) { @@ -4544,29 +5454,29 @@ void __glXDispSwap_VertexAttrib2dvARB(GLbyte * pc) } #endif - CALL_VertexAttrib2dvARB( GET_DISPATCH(), ( - (GLuint )bswap_CARD32 ( pc + 16 ), - (const GLdouble *)bswap_64_array( (uint64_t *) (pc + 0), 2 ) + CALL_VertexAttrib2dvNV( GET_DISPATCH(), ( + (GLuint )bswap_CARD32 ( pc + 0 ), + (const GLdouble *)bswap_64_array( (uint64_t *) (pc + 4), 2 ) ) ); } -void __glXDispSwap_VertexAttrib2fvARB(GLbyte * pc) +void __glXDispSwap_VertexAttrib2fvNV(GLbyte * pc) { - CALL_VertexAttrib2fvARB( GET_DISPATCH(), ( + CALL_VertexAttrib2fvNV( GET_DISPATCH(), ( (GLuint )bswap_CARD32 ( pc + 0 ), (const GLfloat *)bswap_32_array( (uint32_t *) (pc + 4), 2 ) ) ); } -void __glXDispSwap_VertexAttrib2svARB(GLbyte * pc) +void __glXDispSwap_VertexAttrib2svNV(GLbyte * pc) { - CALL_VertexAttrib2svARB( GET_DISPATCH(), ( + CALL_VertexAttrib2svNV( GET_DISPATCH(), ( (GLuint )bswap_CARD32 ( pc + 0 ), (const GLshort *)bswap_16_array( (uint16_t *) (pc + 4), 2 ) ) ); } -void __glXDispSwap_VertexAttrib3dvARB(GLbyte * pc) +void __glXDispSwap_VertexAttrib3dvNV(GLbyte * pc) { #ifdef __GLX_ALIGN64 if ((unsigned long)(pc) & 7) { @@ -4575,29 +5485,29 @@ void __glXDispSwap_VertexAttrib3dvARB(GLbyte * pc) } #endif - CALL_VertexAttrib3dvARB( GET_DISPATCH(), ( - (GLuint )bswap_CARD32 ( pc + 24 ), - (const GLdouble *)bswap_64_array( (uint64_t *) (pc + 0), 3 ) + CALL_VertexAttrib3dvNV( GET_DISPATCH(), ( + (GLuint )bswap_CARD32 ( pc + 0 ), + (const GLdouble *)bswap_64_array( (uint64_t *) (pc + 4), 3 ) ) ); } -void __glXDispSwap_VertexAttrib3fvARB(GLbyte * pc) +void __glXDispSwap_VertexAttrib3fvNV(GLbyte * pc) { - CALL_VertexAttrib3fvARB( GET_DISPATCH(), ( + CALL_VertexAttrib3fvNV( GET_DISPATCH(), ( (GLuint )bswap_CARD32 ( pc + 0 ), (const GLfloat *)bswap_32_array( (uint32_t *) (pc + 4), 3 ) ) ); } -void __glXDispSwap_VertexAttrib3svARB(GLbyte * pc) +void __glXDispSwap_VertexAttrib3svNV(GLbyte * pc) { - CALL_VertexAttrib3svARB( GET_DISPATCH(), ( + CALL_VertexAttrib3svNV( GET_DISPATCH(), ( (GLuint )bswap_CARD32 ( pc + 0 ), (const GLshort *)bswap_16_array( (uint16_t *) (pc + 4), 3 ) ) ); } -void __glXDispSwap_VertexAttrib4dvARB(GLbyte * pc) +void __glXDispSwap_VertexAttrib4dvNV(GLbyte * pc) { #ifdef __GLX_ALIGN64 if ((unsigned long)(pc) & 7) { @@ -4606,31 +5516,31 @@ void __glXDispSwap_VertexAttrib4dvARB(GLbyte * pc) } #endif - CALL_VertexAttrib4dvARB( GET_DISPATCH(), ( - (GLuint )bswap_CARD32 ( pc + 32 ), - (const GLdouble *)bswap_64_array( (uint64_t *) (pc + 0), 4 ) + CALL_VertexAttrib4dvNV( GET_DISPATCH(), ( + (GLuint )bswap_CARD32 ( pc + 0 ), + (const GLdouble *)bswap_64_array( (uint64_t *) (pc + 4), 4 ) ) ); } -void __glXDispSwap_VertexAttrib4fvARB(GLbyte * pc) +void __glXDispSwap_VertexAttrib4fvNV(GLbyte * pc) { - CALL_VertexAttrib4fvARB( GET_DISPATCH(), ( + CALL_VertexAttrib4fvNV( GET_DISPATCH(), ( (GLuint )bswap_CARD32 ( pc + 0 ), (const GLfloat *)bswap_32_array( (uint32_t *) (pc + 4), 4 ) ) ); } -void __glXDispSwap_VertexAttrib4svARB(GLbyte * pc) +void __glXDispSwap_VertexAttrib4svNV(GLbyte * pc) { - CALL_VertexAttrib4svARB( GET_DISPATCH(), ( + CALL_VertexAttrib4svNV( GET_DISPATCH(), ( (GLuint )bswap_CARD32 ( pc + 0 ), (const GLshort *)bswap_16_array( (uint16_t *) (pc + 4), 4 ) ) ); } -void __glXDispSwap_VertexAttrib4NubvARB(GLbyte * pc) +void __glXDispSwap_VertexAttrib4ubvNV(GLbyte * pc) { - CALL_VertexAttrib4NubvARB( GET_DISPATCH(), ( + CALL_VertexAttrib4ubvNV( GET_DISPATCH(), ( (GLuint )bswap_CARD32 ( pc + 0 ), (const GLubyte *)(pc + 4) ) ); @@ -4839,149 +5749,7 @@ void __glXDispSwap_ActiveStencilFaceEXT(GLbyte * pc) ) ); } -void __glXDispSwap_VertexAttrib4bvARB(GLbyte * pc) -{ - CALL_VertexAttrib4bvARB( GET_DISPATCH(), ( - (GLuint )bswap_CARD32 ( pc + 0 ), - (const GLbyte *)(pc + 4) - ) ); -} - -void __glXDispSwap_VertexAttrib4ivARB(GLbyte * pc) -{ - CALL_VertexAttrib4ivARB( GET_DISPATCH(), ( - (GLuint )bswap_CARD32 ( pc + 0 ), - (const GLint *)bswap_32_array( (uint32_t *) (pc + 4), 4 ) - ) ); -} - -void __glXDispSwap_VertexAttrib4ubvARB(GLbyte * pc) -{ - CALL_VertexAttrib4ubvARB( GET_DISPATCH(), ( - (GLuint )bswap_CARD32 ( pc + 0 ), - (const GLubyte *)(pc + 4) - ) ); -} - -void __glXDispSwap_VertexAttrib4usvARB(GLbyte * pc) -{ - CALL_VertexAttrib4usvARB( GET_DISPATCH(), ( - (GLuint )bswap_CARD32 ( pc + 0 ), - (const GLushort *)bswap_16_array( (uint16_t *) (pc + 4), 4 ) - ) ); -} - -void __glXDispSwap_VertexAttrib4uivARB(GLbyte * pc) -{ - CALL_VertexAttrib4uivARB( GET_DISPATCH(), ( - (GLuint )bswap_CARD32 ( pc + 0 ), - (const GLuint *)bswap_32_array( (uint32_t *) (pc + 4), 4 ) - ) ); -} - -void __glXDispSwap_VertexAttrib4NbvARB(GLbyte * pc) -{ - CALL_VertexAttrib4NbvARB( GET_DISPATCH(), ( - (GLuint )bswap_CARD32 ( pc + 0 ), - (const GLbyte *)(pc + 4) - ) ); -} - -void __glXDispSwap_VertexAttrib4NsvARB(GLbyte * pc) -{ - CALL_VertexAttrib4NsvARB( GET_DISPATCH(), ( - (GLuint )bswap_CARD32 ( pc + 0 ), - (const GLshort *)bswap_16_array( (uint16_t *) (pc + 4), 4 ) - ) ); -} - -void __glXDispSwap_VertexAttrib4NivARB(GLbyte * pc) -{ - CALL_VertexAttrib4NivARB( GET_DISPATCH(), ( - (GLuint )bswap_CARD32 ( pc + 0 ), - (const GLint *)bswap_32_array( (uint32_t *) (pc + 4), 4 ) - ) ); -} - -void __glXDispSwap_VertexAttrib4NusvARB(GLbyte * pc) -{ - CALL_VertexAttrib4NusvARB( GET_DISPATCH(), ( - (GLuint )bswap_CARD32 ( pc + 0 ), - (const GLushort *)bswap_16_array( (uint16_t *) (pc + 4), 4 ) - ) ); -} - -void __glXDispSwap_VertexAttrib4NuivARB(GLbyte * pc) -{ - CALL_VertexAttrib4NuivARB( GET_DISPATCH(), ( - (GLuint )bswap_CARD32 ( pc + 0 ), - (const GLuint *)bswap_32_array( (uint32_t *) (pc + 4), 4 ) - ) ); -} - -void __glXDispSwap_ProgramStringARB(GLbyte * pc) -{ - const GLsizei len = (GLsizei )bswap_CARD32 ( pc + 8 ); - - CALL_ProgramStringARB( GET_DISPATCH(), ( - (GLenum )bswap_ENUM ( pc + 0 ), - (GLenum )bswap_ENUM ( pc + 4 ), - len, - (const GLvoid *)(pc + 12) - ) ); -} - -void __glXDispSwap_ProgramEnvParameter4dvARB(GLbyte * pc) -{ -#ifdef __GLX_ALIGN64 - if ((unsigned long)(pc) & 7) { - (void) memmove(pc-4, pc, 40); - pc -= 4; - } -#endif - - CALL_ProgramEnvParameter4dvARB( GET_DISPATCH(), ( - (GLenum )bswap_ENUM ( pc + 0 ), - (GLuint )bswap_CARD32 ( pc + 4 ), - (const GLdouble *)bswap_64_array( (uint64_t *) (pc + 8), 4 ) - ) ); -} - -void __glXDispSwap_ProgramEnvParameter4fvARB(GLbyte * pc) -{ - CALL_ProgramEnvParameter4fvARB( GET_DISPATCH(), ( - (GLenum )bswap_ENUM ( pc + 0 ), - (GLuint )bswap_CARD32 ( pc + 4 ), - (const GLfloat *)bswap_32_array( (uint32_t *) (pc + 8), 4 ) - ) ); -} - -void __glXDispSwap_ProgramLocalParameter4dvARB(GLbyte * pc) -{ -#ifdef __GLX_ALIGN64 - if ((unsigned long)(pc) & 7) { - (void) memmove(pc-4, pc, 40); - pc -= 4; - } -#endif - - CALL_ProgramLocalParameter4dvARB( GET_DISPATCH(), ( - (GLenum )bswap_ENUM ( pc + 0 ), - (GLuint )bswap_CARD32 ( pc + 4 ), - (const GLdouble *)bswap_64_array( (uint64_t *) (pc + 8), 4 ) - ) ); -} - -void __glXDispSwap_ProgramLocalParameter4fvARB(GLbyte * pc) -{ - CALL_ProgramLocalParameter4fvARB( GET_DISPATCH(), ( - (GLenum )bswap_ENUM ( pc + 0 ), - (GLuint )bswap_CARD32 ( pc + 4 ), - (const GLfloat *)bswap_32_array( (uint32_t *) (pc + 8), 4 ) - ) ); -} - -int __glXDispSwap_GetProgramEnvParameterdvARB(__GLXclientState *cl, GLbyte *pc) +int __glXDispSwap_GetProgramNamedParameterdvNV(__GLXclientState *cl, GLbyte *pc) { xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc; int error; @@ -4989,148 +5757,23 @@ int __glXDispSwap_GetProgramEnvParameterdvARB(__GLXclientState *cl, GLbyte *pc) pc += __GLX_VENDPRIV_HDR_SIZE; if ( cx != NULL ) { + const GLsizei len = (GLsizei )bswap_CARD32 ( pc + 4 ); + GLdouble params[4]; - CALL_GetProgramEnvParameterdvARB( GET_DISPATCH(), ( - (GLenum )bswap_ENUM ( pc + 0 ), - (GLuint )bswap_CARD32 ( pc + 4 ), + CALL_GetProgramNamedParameterdvNV( GET_DISPATCH(), ( + (GLuint )bswap_CARD32 ( pc + 0 ), + len, + (const GLubyte *)(pc + 8), params ) ); (void) bswap_64_array( (uint64_t *) params, 4 ); - __glXSendReplySwap(cl->client, params, 4, 8, GL_FALSE, 0); + __glXSendReplySwap(cl->client, params, 4, 8, GL_TRUE, 0); error = Success; } return error; } -int __glXDispSwap_GetProgramEnvParameterfvARB(__GLXclientState *cl, GLbyte *pc) -{ - xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc; - int error; - __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error); - - pc += __GLX_VENDPRIV_HDR_SIZE; - if ( cx != NULL ) { - GLfloat params[4]; - CALL_GetProgramEnvParameterfvARB( GET_DISPATCH(), ( - (GLenum )bswap_ENUM ( pc + 0 ), - (GLuint )bswap_CARD32 ( pc + 4 ), - params - ) ); - (void) bswap_32_array( (uint32_t *) params, 4 ); - __glXSendReplySwap(cl->client, params, 4, 4, GL_FALSE, 0); - error = Success; - } - - return error; -} - -int __glXDispSwap_GetProgramLocalParameterdvARB(__GLXclientState *cl, GLbyte *pc) -{ - xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc; - int error; - __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error); - - pc += __GLX_VENDPRIV_HDR_SIZE; - if ( cx != NULL ) { - GLdouble params[4]; - CALL_GetProgramLocalParameterdvARB( GET_DISPATCH(), ( - (GLenum )bswap_ENUM ( pc + 0 ), - (GLuint )bswap_CARD32 ( pc + 4 ), - params - ) ); - (void) bswap_64_array( (uint64_t *) params, 4 ); - __glXSendReplySwap(cl->client, params, 4, 8, GL_FALSE, 0); - error = Success; - } - - return error; -} - -int __glXDispSwap_GetProgramLocalParameterfvARB(__GLXclientState *cl, GLbyte *pc) -{ - xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc; - int error; - __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error); - - pc += __GLX_VENDPRIV_HDR_SIZE; - if ( cx != NULL ) { - GLfloat params[4]; - CALL_GetProgramLocalParameterfvARB( GET_DISPATCH(), ( - (GLenum )bswap_ENUM ( pc + 0 ), - (GLuint )bswap_CARD32 ( pc + 4 ), - params - ) ); - (void) bswap_32_array( (uint32_t *) params, 4 ); - __glXSendReplySwap(cl->client, params, 4, 4, GL_FALSE, 0); - error = Success; - } - - return error; -} - -int __glXDispSwap_GetProgramivARB(__GLXclientState *cl, GLbyte *pc) -{ - xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc; - int error; - __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error); - - pc += __GLX_VENDPRIV_HDR_SIZE; - if ( cx != NULL ) { - const GLenum pname = (GLenum )bswap_ENUM ( pc + 4 ); - - const GLuint compsize = __glGetProgramivARB_size(pname); - GLint answerBuffer[200]; - GLint * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); - - if (params == NULL) return BadAlloc; - __glXClearErrorOccured(); - - CALL_GetProgramivARB( GET_DISPATCH(), ( - (GLenum )bswap_ENUM ( pc + 0 ), - pname, - params - ) ); - (void) bswap_32_array( (uint32_t *) params, compsize ); - __glXSendReplySwap(cl->client, params, compsize, 4, GL_FALSE, 0); - error = Success; - } - - return error; -} - -void __glXDispSwap_ProgramNamedParameter4fvNV(GLbyte * pc) -{ - const GLsizei len = (GLsizei )bswap_CARD32 ( pc + 4 ); - - CALL_ProgramNamedParameter4fvNV( GET_DISPATCH(), ( - (GLuint )bswap_CARD32 ( pc + 0 ), - len, - (const GLubyte *)(pc + 24), - (const GLfloat *)bswap_32_array( (uint32_t *) (pc + 8), 4 ) - ) ); -} - -void __glXDispSwap_ProgramNamedParameter4dvNV(GLbyte * pc) -{ - const GLsizei len = (GLsizei )bswap_CARD32 ( pc + 36 ); - -#ifdef __GLX_ALIGN64 - const GLuint cmdlen = 44 + __GLX_PAD(len) - 4; - if ((unsigned long)(pc) & 7) { - (void) memmove(pc-4, pc, cmdlen); - pc -= 4; - } -#endif - - CALL_ProgramNamedParameter4dvNV( GET_DISPATCH(), ( - (GLuint )bswap_CARD32 ( pc + 32 ), - len, - (const GLubyte *)(pc + 40), - (const GLdouble *)bswap_64_array( (uint64_t *) (pc + 0), 4 ) - ) ); -} - int __glXDispSwap_GetProgramNamedParameterfvNV(__GLXclientState *cl, GLbyte *pc) { xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc; @@ -5156,440 +5799,54 @@ int __glXDispSwap_GetProgramNamedParameterfvNV(__GLXclientState *cl, GLbyte *pc) return error; } -int __glXDispSwap_GetProgramNamedParameterdvNV(__GLXclientState *cl, GLbyte *pc) +void __glXDispSwap_ProgramNamedParameter4dvNV(GLbyte * pc) { - xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc; - int error; - __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error); + const GLsizei len = (GLsizei )bswap_CARD32 ( pc + 36 ); - pc += __GLX_VENDPRIV_HDR_SIZE; - if ( cx != NULL ) { - const GLsizei len = (GLsizei )bswap_CARD32 ( pc + 4 ); - - GLdouble params[4]; - CALL_GetProgramNamedParameterdvNV( GET_DISPATCH(), ( - (GLuint )bswap_CARD32 ( pc + 0 ), - len, - (const GLubyte *)(pc + 8), - params - ) ); - (void) bswap_64_array( (uint64_t *) params, 4 ); - __glXSendReplySwap(cl->client, params, 4, 8, GL_TRUE, 0); - error = Success; +#ifdef __GLX_ALIGN64 + const GLuint cmdlen = 44 + __GLX_PAD(len) - 4; + if ((unsigned long)(pc) & 7) { + (void) memmove(pc-4, pc, cmdlen); + pc -= 4; } +#endif - return error; + CALL_ProgramNamedParameter4dvNV( GET_DISPATCH(), ( + (GLuint )bswap_CARD32 ( pc + 32 ), + len, + (const GLubyte *)(pc + 40), + (const GLdouble *)bswap_64_array( (uint64_t *) (pc + 0), 4 ) + ) ); } -int __glXDispSwap_GenQueriesARB(__GLXclientState *cl, GLbyte *pc) +void __glXDispSwap_ProgramNamedParameter4fvNV(GLbyte * pc) { - xGLXSingleReq * const req = (xGLXSingleReq *) pc; - int error; - __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error); + const GLsizei len = (GLsizei )bswap_CARD32 ( pc + 4 ); - pc += __GLX_SINGLE_HDR_SIZE; - if ( cx != NULL ) { - const GLsizei n = (GLsizei )bswap_CARD32 ( pc + 0 ); - - GLuint answerBuffer[200]; - GLuint * ids = __glXGetAnswerBuffer(cl, n * 4, answerBuffer, sizeof(answerBuffer), 4); - CALL_GenQueriesARB( GET_DISPATCH(), ( - n, - ids - ) ); - (void) bswap_32_array( (uint32_t *) ids, n ); - __glXSendReplySwap(cl->client, ids, n, 4, GL_TRUE, 0); - error = Success; - } - - return error; + CALL_ProgramNamedParameter4fvNV( GET_DISPATCH(), ( + (GLuint )bswap_CARD32 ( pc + 0 ), + len, + (const GLubyte *)(pc + 24), + (const GLfloat *)bswap_32_array( (uint32_t *) (pc + 8), 4 ) + ) ); } -int __glXDispSwap_DeleteQueriesARB(__GLXclientState *cl, GLbyte *pc) +void __glXDispSwap_BlendEquationSeparateEXT(GLbyte * pc) { - xGLXSingleReq * const req = (xGLXSingleReq *) pc; - int error; - __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error); - - pc += __GLX_SINGLE_HDR_SIZE; - if ( cx != NULL ) { - const GLsizei n = (GLsizei )bswap_CARD32 ( pc + 0 ); - - CALL_DeleteQueriesARB( GET_DISPATCH(), ( - n, - (const GLuint *)bswap_32_array( (uint32_t *) (pc + 4), 0 ) - ) ); - error = Success; - } - - return error; + CALL_BlendEquationSeparateEXT( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 0 ), + (GLenum )bswap_ENUM ( pc + 4 ) + ) ); } -int __glXDispSwap_IsQueryARB(__GLXclientState *cl, GLbyte *pc) +void __glXDispSwap_BindFramebufferEXT(GLbyte * pc) { - xGLXSingleReq * const req = (xGLXSingleReq *) pc; - int error; - __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error); - - pc += __GLX_SINGLE_HDR_SIZE; - if ( cx != NULL ) { - GLboolean retval; - retval = CALL_IsQueryARB( GET_DISPATCH(), ( - (GLuint )bswap_CARD32 ( pc + 0 ) - ) ); - __glXSendReplySwap(cl->client, dummy_answer, 0, 0, GL_FALSE, retval); - error = Success; - } - - return error; -} - -void __glXDispSwap_BeginQueryARB(GLbyte * pc) -{ - CALL_BeginQueryARB( GET_DISPATCH(), ( + CALL_BindFramebufferEXT( GET_DISPATCH(), ( (GLenum )bswap_ENUM ( pc + 0 ), (GLuint )bswap_CARD32 ( pc + 4 ) ) ); } -void __glXDispSwap_EndQueryARB(GLbyte * pc) -{ - CALL_EndQueryARB( GET_DISPATCH(), ( - (GLenum )bswap_ENUM ( pc + 0 ) - ) ); -} - -int __glXDispSwap_GetQueryivARB(__GLXclientState *cl, GLbyte *pc) -{ - xGLXSingleReq * const req = (xGLXSingleReq *) pc; - int error; - __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error); - - pc += __GLX_SINGLE_HDR_SIZE; - if ( cx != NULL ) { - const GLenum pname = (GLenum )bswap_ENUM ( pc + 4 ); - - const GLuint compsize = __glGetQueryivARB_size(pname); - GLint answerBuffer[200]; - GLint * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); - - if (params == NULL) return BadAlloc; - __glXClearErrorOccured(); - - CALL_GetQueryivARB( GET_DISPATCH(), ( - (GLenum )bswap_ENUM ( pc + 0 ), - pname, - params - ) ); - (void) bswap_32_array( (uint32_t *) params, compsize ); - __glXSendReplySwap(cl->client, params, compsize, 4, GL_FALSE, 0); - error = Success; - } - - return error; -} - -int __glXDispSwap_GetQueryObjectivARB(__GLXclientState *cl, GLbyte *pc) -{ - xGLXSingleReq * const req = (xGLXSingleReq *) pc; - int error; - __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error); - - pc += __GLX_SINGLE_HDR_SIZE; - if ( cx != NULL ) { - const GLenum pname = (GLenum )bswap_ENUM ( pc + 4 ); - - const GLuint compsize = __glGetQueryObjectivARB_size(pname); - GLint answerBuffer[200]; - GLint * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); - - if (params == NULL) return BadAlloc; - __glXClearErrorOccured(); - - CALL_GetQueryObjectivARB( GET_DISPATCH(), ( - (GLuint )bswap_CARD32 ( pc + 0 ), - pname, - params - ) ); - (void) bswap_32_array( (uint32_t *) params, compsize ); - __glXSendReplySwap(cl->client, params, compsize, 4, GL_FALSE, 0); - error = Success; - } - - return error; -} - -int __glXDispSwap_GetQueryObjectuivARB(__GLXclientState *cl, GLbyte *pc) -{ - xGLXSingleReq * const req = (xGLXSingleReq *) pc; - int error; - __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error); - - pc += __GLX_SINGLE_HDR_SIZE; - if ( cx != NULL ) { - const GLenum pname = (GLenum )bswap_ENUM ( pc + 4 ); - - const GLuint compsize = __glGetQueryObjectuivARB_size(pname); - GLuint answerBuffer[200]; - GLuint * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); - - if (params == NULL) return BadAlloc; - __glXClearErrorOccured(); - - CALL_GetQueryObjectuivARB( GET_DISPATCH(), ( - (GLuint )bswap_CARD32 ( pc + 0 ), - pname, - params - ) ); - (void) bswap_32_array( (uint32_t *) params, compsize ); - __glXSendReplySwap(cl->client, params, compsize, 4, GL_FALSE, 0); - error = Success; - } - - return error; -} - -int __glXDispSwap_GetVertexAttribdvNV(__GLXclientState *cl, GLbyte *pc) -{ - xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc; - int error; - __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error); - - pc += __GLX_VENDPRIV_HDR_SIZE; - if ( cx != NULL ) { - const GLenum pname = (GLenum )bswap_ENUM ( pc + 4 ); - - const GLuint compsize = __glGetVertexAttribdvNV_size(pname); - GLdouble answerBuffer[200]; - GLdouble * params = __glXGetAnswerBuffer(cl, compsize * 8, answerBuffer, sizeof(answerBuffer), 8); - - if (params == NULL) return BadAlloc; - __glXClearErrorOccured(); - - CALL_GetVertexAttribdvNV( GET_DISPATCH(), ( - (GLuint )bswap_CARD32 ( pc + 0 ), - pname, - params - ) ); - (void) bswap_64_array( (uint64_t *) params, compsize ); - __glXSendReplySwap(cl->client, params, compsize, 8, GL_FALSE, 0); - error = Success; - } - - return error; -} - -int __glXDispSwap_GetVertexAttribfvNV(__GLXclientState *cl, GLbyte *pc) -{ - xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc; - int error; - __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error); - - pc += __GLX_VENDPRIV_HDR_SIZE; - if ( cx != NULL ) { - const GLenum pname = (GLenum )bswap_ENUM ( pc + 4 ); - - const GLuint compsize = __glGetVertexAttribfvNV_size(pname); - GLfloat answerBuffer[200]; - GLfloat * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); - - if (params == NULL) return BadAlloc; - __glXClearErrorOccured(); - - CALL_GetVertexAttribfvNV( GET_DISPATCH(), ( - (GLuint )bswap_CARD32 ( pc + 0 ), - pname, - params - ) ); - (void) bswap_32_array( (uint32_t *) params, compsize ); - __glXSendReplySwap(cl->client, params, compsize, 4, GL_FALSE, 0); - error = Success; - } - - return error; -} - -int __glXDispSwap_GetVertexAttribivNV(__GLXclientState *cl, GLbyte *pc) -{ - xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc; - int error; - __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error); - - pc += __GLX_VENDPRIV_HDR_SIZE; - if ( cx != NULL ) { - const GLenum pname = (GLenum )bswap_ENUM ( pc + 4 ); - - const GLuint compsize = __glGetVertexAttribivNV_size(pname); - GLint answerBuffer[200]; - GLint * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4); - - if (params == NULL) return BadAlloc; - __glXClearErrorOccured(); - - CALL_GetVertexAttribivNV( GET_DISPATCH(), ( - (GLuint )bswap_CARD32 ( pc + 0 ), - pname, - params - ) ); - (void) bswap_32_array( (uint32_t *) params, compsize ); - __glXSendReplySwap(cl->client, params, compsize, 4, GL_FALSE, 0); - error = Success; - } - - return error; -} - -void __glXDispSwap_VertexAttrib1dvNV(GLbyte * pc) -{ -#ifdef __GLX_ALIGN64 - if ((unsigned long)(pc) & 7) { - (void) memmove(pc-4, pc, 12); - pc -= 4; - } -#endif - - CALL_VertexAttrib1dvNV( GET_DISPATCH(), ( - (GLuint )bswap_CARD32 ( pc + 0 ), - (const GLdouble *)bswap_64_array( (uint64_t *) (pc + 4), 1 ) - ) ); -} - -void __glXDispSwap_VertexAttrib1fvNV(GLbyte * pc) -{ - CALL_VertexAttrib1fvNV( GET_DISPATCH(), ( - (GLuint )bswap_CARD32 ( pc + 0 ), - (const GLfloat *)bswap_32_array( (uint32_t *) (pc + 4), 1 ) - ) ); -} - -void __glXDispSwap_VertexAttrib1svNV(GLbyte * pc) -{ - CALL_VertexAttrib1svNV( GET_DISPATCH(), ( - (GLuint )bswap_CARD32 ( pc + 0 ), - (const GLshort *)bswap_16_array( (uint16_t *) (pc + 4), 1 ) - ) ); -} - -void __glXDispSwap_VertexAttrib2dvNV(GLbyte * pc) -{ -#ifdef __GLX_ALIGN64 - if ((unsigned long)(pc) & 7) { - (void) memmove(pc-4, pc, 20); - pc -= 4; - } -#endif - - CALL_VertexAttrib2dvNV( GET_DISPATCH(), ( - (GLuint )bswap_CARD32 ( pc + 0 ), - (const GLdouble *)bswap_64_array( (uint64_t *) (pc + 4), 2 ) - ) ); -} - -void __glXDispSwap_VertexAttrib2fvNV(GLbyte * pc) -{ - CALL_VertexAttrib2fvNV( GET_DISPATCH(), ( - (GLuint )bswap_CARD32 ( pc + 0 ), - (const GLfloat *)bswap_32_array( (uint32_t *) (pc + 4), 2 ) - ) ); -} - -void __glXDispSwap_VertexAttrib2svNV(GLbyte * pc) -{ - CALL_VertexAttrib2svNV( GET_DISPATCH(), ( - (GLuint )bswap_CARD32 ( pc + 0 ), - (const GLshort *)bswap_16_array( (uint16_t *) (pc + 4), 2 ) - ) ); -} - -void __glXDispSwap_VertexAttrib3dvNV(GLbyte * pc) -{ -#ifdef __GLX_ALIGN64 - if ((unsigned long)(pc) & 7) { - (void) memmove(pc-4, pc, 28); - pc -= 4; - } -#endif - - CALL_VertexAttrib3dvNV( GET_DISPATCH(), ( - (GLuint )bswap_CARD32 ( pc + 0 ), - (const GLdouble *)bswap_64_array( (uint64_t *) (pc + 4), 3 ) - ) ); -} - -void __glXDispSwap_VertexAttrib3fvNV(GLbyte * pc) -{ - CALL_VertexAttrib3fvNV( GET_DISPATCH(), ( - (GLuint )bswap_CARD32 ( pc + 0 ), - (const GLfloat *)bswap_32_array( (uint32_t *) (pc + 4), 3 ) - ) ); -} - -void __glXDispSwap_VertexAttrib3svNV(GLbyte * pc) -{ - CALL_VertexAttrib3svNV( GET_DISPATCH(), ( - (GLuint )bswap_CARD32 ( pc + 0 ), - (const GLshort *)bswap_16_array( (uint16_t *) (pc + 4), 3 ) - ) ); -} - -void __glXDispSwap_VertexAttrib4dvNV(GLbyte * pc) -{ -#ifdef __GLX_ALIGN64 - if ((unsigned long)(pc) & 7) { - (void) memmove(pc-4, pc, 36); - pc -= 4; - } -#endif - - CALL_VertexAttrib4dvNV( GET_DISPATCH(), ( - (GLuint )bswap_CARD32 ( pc + 0 ), - (const GLdouble *)bswap_64_array( (uint64_t *) (pc + 4), 4 ) - ) ); -} - -void __glXDispSwap_VertexAttrib4fvNV(GLbyte * pc) -{ - CALL_VertexAttrib4fvNV( GET_DISPATCH(), ( - (GLuint )bswap_CARD32 ( pc + 0 ), - (const GLfloat *)bswap_32_array( (uint32_t *) (pc + 4), 4 ) - ) ); -} - -void __glXDispSwap_VertexAttrib4svNV(GLbyte * pc) -{ - CALL_VertexAttrib4svNV( GET_DISPATCH(), ( - (GLuint )bswap_CARD32 ( pc + 0 ), - (const GLshort *)bswap_16_array( (uint16_t *) (pc + 4), 4 ) - ) ); -} - -void __glXDispSwap_VertexAttrib4ubvNV(GLbyte * pc) -{ - CALL_VertexAttrib4ubvNV( GET_DISPATCH(), ( - (GLuint )bswap_CARD32 ( pc + 0 ), - (const GLubyte *)(pc + 4) - ) ); -} - -int __glXDispSwap_IsRenderbufferEXT(__GLXclientState *cl, GLbyte *pc) -{ - xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc; - int error; - __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error); - - pc += __GLX_VENDPRIV_HDR_SIZE; - if ( cx != NULL ) { - GLboolean retval; - retval = CALL_IsRenderbufferEXT( GET_DISPATCH(), ( - (GLuint )bswap_CARD32 ( pc + 0 ) - ) ); - __glXSendReplySwap(cl->client, dummy_answer, 0, 0, GL_FALSE, retval); - error = Success; - } - - return error; -} - void __glXDispSwap_BindRenderbufferEXT(GLbyte * pc) { CALL_BindRenderbufferEXT( GET_DISPATCH(), ( @@ -5598,6 +5855,35 @@ void __glXDispSwap_BindRenderbufferEXT(GLbyte * pc) ) ); } +int __glXDispSwap_CheckFramebufferStatusEXT(__GLXclientState *cl, GLbyte *pc) +{ + xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error); + + pc += __GLX_VENDPRIV_HDR_SIZE; + if ( cx != NULL ) { + GLenum retval; + retval = CALL_CheckFramebufferStatusEXT( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 0 ) + ) ); + __glXSendReplySwap(cl->client, dummy_answer, 0, 0, GL_FALSE, retval); + error = Success; + } + + return error; +} + +void __glXDispSwap_DeleteFramebuffersEXT(GLbyte * pc) +{ + const GLsizei n = (GLsizei )bswap_CARD32 ( pc + 0 ); + + CALL_DeleteFramebuffersEXT( GET_DISPATCH(), ( + n, + (const GLuint *)bswap_32_array( (uint32_t *) (pc + 4), 0 ) + ) ); +} + void __glXDispSwap_DeleteRenderbuffersEXT(GLbyte * pc) { const GLsizei n = (GLsizei )bswap_CARD32 ( pc + 0 ); @@ -5608,6 +5894,74 @@ void __glXDispSwap_DeleteRenderbuffersEXT(GLbyte * pc) ) ); } +void __glXDispSwap_FramebufferRenderbufferEXT(GLbyte * pc) +{ + CALL_FramebufferRenderbufferEXT( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 0 ), + (GLenum )bswap_ENUM ( pc + 4 ), + (GLenum )bswap_ENUM ( pc + 8 ), + (GLuint )bswap_CARD32 ( pc + 12 ) + ) ); +} + +void __glXDispSwap_FramebufferTexture1DEXT(GLbyte * pc) +{ + CALL_FramebufferTexture1DEXT( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 0 ), + (GLenum )bswap_ENUM ( pc + 4 ), + (GLenum )bswap_ENUM ( pc + 8 ), + (GLuint )bswap_CARD32 ( pc + 12 ), + (GLint )bswap_CARD32 ( pc + 16 ) + ) ); +} + +void __glXDispSwap_FramebufferTexture2DEXT(GLbyte * pc) +{ + CALL_FramebufferTexture2DEXT( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 0 ), + (GLenum )bswap_ENUM ( pc + 4 ), + (GLenum )bswap_ENUM ( pc + 8 ), + (GLuint )bswap_CARD32 ( pc + 12 ), + (GLint )bswap_CARD32 ( pc + 16 ) + ) ); +} + +void __glXDispSwap_FramebufferTexture3DEXT(GLbyte * pc) +{ + CALL_FramebufferTexture3DEXT( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 0 ), + (GLenum )bswap_ENUM ( pc + 4 ), + (GLenum )bswap_ENUM ( pc + 8 ), + (GLuint )bswap_CARD32 ( pc + 12 ), + (GLint )bswap_CARD32 ( pc + 16 ), + (GLint )bswap_CARD32 ( pc + 20 ) + ) ); +} + +int __glXDispSwap_GenFramebuffersEXT(__GLXclientState *cl, GLbyte *pc) +{ + xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error); + + pc += __GLX_VENDPRIV_HDR_SIZE; + if ( cx != NULL ) { + const GLsizei n = (GLsizei )bswap_CARD32 ( pc + 0 ); + + GLuint answerBuffer[200]; + GLuint * framebuffers = __glXGetAnswerBuffer(cl, n * 4, answerBuffer, sizeof(answerBuffer), 4); + CALL_GenFramebuffersEXT( GET_DISPATCH(), ( + n, + framebuffers + ) ); + (void) bswap_32_array( (uint32_t *) framebuffers, n ); + __glXSendReplySwap(cl->client, framebuffers, n, 4, GL_TRUE, 0); + error = Success; + } + + return error; +} + int __glXDispSwap_GenRenderbuffersEXT(__GLXclientState *cl, GLbyte *pc) { xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc; @@ -5632,16 +5986,36 @@ int __glXDispSwap_GenRenderbuffersEXT(__GLXclientState *cl, GLbyte *pc) return error; } -void __glXDispSwap_RenderbufferStorageEXT(GLbyte * pc) +void __glXDispSwap_GenerateMipmapEXT(GLbyte * pc) { - CALL_RenderbufferStorageEXT( GET_DISPATCH(), ( - (GLenum )bswap_ENUM ( pc + 0 ), - (GLenum )bswap_ENUM ( pc + 4 ), - (GLsizei )bswap_CARD32 ( pc + 8 ), - (GLsizei )bswap_CARD32 ( pc + 12 ) + CALL_GenerateMipmapEXT( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 0 ) ) ); } +int __glXDispSwap_GetFramebufferAttachmentParameterivEXT(__GLXclientState *cl, GLbyte *pc) +{ + xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc; + int error; + __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error); + + pc += __GLX_VENDPRIV_HDR_SIZE; + if ( cx != NULL ) { + GLint params[1]; + CALL_GetFramebufferAttachmentParameterivEXT( GET_DISPATCH(), ( + (GLenum )bswap_ENUM ( pc + 0 ), + (GLenum )bswap_ENUM ( pc + 4 ), + (GLenum )bswap_ENUM ( pc + 8 ), + params + ) ); + (void) bswap_32_array( (uint32_t *) params, 1 ); + __glXSendReplySwap(cl->client, params, 1, 4, GL_FALSE, 0); + error = Success; + } + + return error; +} + int __glXDispSwap_GetRenderbufferParameterivEXT(__GLXclientState *cl, GLbyte *pc) { xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc; @@ -5683,25 +6057,7 @@ int __glXDispSwap_IsFramebufferEXT(__GLXclientState *cl, GLbyte *pc) return error; } -void __glXDispSwap_BindFramebufferEXT(GLbyte * pc) -{ - CALL_BindFramebufferEXT( GET_DISPATCH(), ( - (GLenum )bswap_ENUM ( pc + 0 ), - (GLuint )bswap_CARD32 ( pc + 4 ) - ) ); -} - -void __glXDispSwap_DeleteFramebuffersEXT(GLbyte * pc) -{ - const GLsizei n = (GLsizei )bswap_CARD32 ( pc + 0 ); - - CALL_DeleteFramebuffersEXT( GET_DISPATCH(), ( - n, - (const GLuint *)bswap_32_array( (uint32_t *) (pc + 4), 0 ) - ) ); -} - -int __glXDispSwap_GenFramebuffersEXT(__GLXclientState *cl, GLbyte *pc) +int __glXDispSwap_IsRenderbufferEXT(__GLXclientState *cl, GLbyte *pc) { xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc; int error; @@ -5709,33 +6065,9 @@ int __glXDispSwap_GenFramebuffersEXT(__GLXclientState *cl, GLbyte *pc) pc += __GLX_VENDPRIV_HDR_SIZE; if ( cx != NULL ) { - const GLsizei n = (GLsizei )bswap_CARD32 ( pc + 0 ); - - GLuint answerBuffer[200]; - GLuint * framebuffers = __glXGetAnswerBuffer(cl, n * 4, answerBuffer, sizeof(answerBuffer), 4); - CALL_GenFramebuffersEXT( GET_DISPATCH(), ( - n, - framebuffers - ) ); - (void) bswap_32_array( (uint32_t *) framebuffers, n ); - __glXSendReplySwap(cl->client, framebuffers, n, 4, GL_TRUE, 0); - error = Success; - } - - return error; -} - -int __glXDispSwap_CheckFramebufferStatusEXT(__GLXclientState *cl, GLbyte *pc) -{ - xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc; - int error; - __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error); - - pc += __GLX_VENDPRIV_HDR_SIZE; - if ( cx != NULL ) { - GLenum retval; - retval = CALL_CheckFramebufferStatusEXT( GET_DISPATCH(), ( - (GLenum )bswap_ENUM ( pc + 0 ) + GLboolean retval; + retval = CALL_IsRenderbufferEXT( GET_DISPATCH(), ( + (GLuint )bswap_CARD32 ( pc + 0 ) ) ); __glXSendReplySwap(cl->client, dummy_answer, 0, 0, GL_FALSE, retval); error = Success; @@ -5744,77 +6076,13 @@ int __glXDispSwap_CheckFramebufferStatusEXT(__GLXclientState *cl, GLbyte *pc) return error; } -void __glXDispSwap_FramebufferTexture1DEXT(GLbyte * pc) +void __glXDispSwap_RenderbufferStorageEXT(GLbyte * pc) { - CALL_FramebufferTexture1DEXT( GET_DISPATCH(), ( + CALL_RenderbufferStorageEXT( GET_DISPATCH(), ( (GLenum )bswap_ENUM ( pc + 0 ), (GLenum )bswap_ENUM ( pc + 4 ), - (GLenum )bswap_ENUM ( pc + 8 ), - (GLuint )bswap_CARD32 ( pc + 12 ), - (GLint )bswap_CARD32 ( pc + 16 ) - ) ); -} - -void __glXDispSwap_FramebufferTexture2DEXT(GLbyte * pc) -{ - CALL_FramebufferTexture2DEXT( GET_DISPATCH(), ( - (GLenum )bswap_ENUM ( pc + 0 ), - (GLenum )bswap_ENUM ( pc + 4 ), - (GLenum )bswap_ENUM ( pc + 8 ), - (GLuint )bswap_CARD32 ( pc + 12 ), - (GLint )bswap_CARD32 ( pc + 16 ) - ) ); -} - -void __glXDispSwap_FramebufferTexture3DEXT(GLbyte * pc) -{ - CALL_FramebufferTexture3DEXT( GET_DISPATCH(), ( - (GLenum )bswap_ENUM ( pc + 0 ), - (GLenum )bswap_ENUM ( pc + 4 ), - (GLenum )bswap_ENUM ( pc + 8 ), - (GLuint )bswap_CARD32 ( pc + 12 ), - (GLint )bswap_CARD32 ( pc + 16 ), - (GLint )bswap_CARD32 ( pc + 20 ) - ) ); -} - -void __glXDispSwap_FramebufferRenderbufferEXT(GLbyte * pc) -{ - CALL_FramebufferRenderbufferEXT( GET_DISPATCH(), ( - (GLenum )bswap_ENUM ( pc + 0 ), - (GLenum )bswap_ENUM ( pc + 4 ), - (GLenum )bswap_ENUM ( pc + 8 ), - (GLuint )bswap_CARD32 ( pc + 12 ) - ) ); -} - -int __glXDispSwap_GetFramebufferAttachmentParameterivEXT(__GLXclientState *cl, GLbyte *pc) -{ - xGLXVendorPrivateReq * const req = (xGLXVendorPrivateReq *) pc; - int error; - __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error); - - pc += __GLX_VENDPRIV_HDR_SIZE; - if ( cx != NULL ) { - GLint params[1]; - CALL_GetFramebufferAttachmentParameterivEXT( GET_DISPATCH(), ( - (GLenum )bswap_ENUM ( pc + 0 ), - (GLenum )bswap_ENUM ( pc + 4 ), - (GLenum )bswap_ENUM ( pc + 8 ), - params - ) ); - (void) bswap_32_array( (uint32_t *) params, 1 ); - __glXSendReplySwap(cl->client, params, 1, 4, GL_FALSE, 0); - error = Success; - } - - return error; -} - -void __glXDispSwap_GenerateMipmapEXT(GLbyte * pc) -{ - CALL_GenerateMipmapEXT( GET_DISPATCH(), ( - (GLenum )bswap_ENUM ( pc + 0 ) + (GLsizei )bswap_CARD32 ( pc + 8 ), + (GLsizei )bswap_CARD32 ( pc + 12 ) ) ); } diff --git a/GL/glx/indirect_program.c b/GL/glx/indirect_program.c new file mode 100644 index 000000000..8d5f0e60f --- /dev/null +++ b/GL/glx/indirect_program.c @@ -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 + */ + +#define NEED_REPLIES +#ifdef HAVE_DIX_CONFIG_H +#include +#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 +#elif defined(__OpenBSD__) +#include +#define bswap_16 __swap16 +#define bswap_32 __swap32 +#define bswap_64 __swap64 +#else +#include +#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); +} diff --git a/GL/glx/indirect_reqsize.c b/GL/glx/indirect_reqsize.c index 3906bd11d..d3e2bc516 100644 --- a/GL/glx/indirect_reqsize.c +++ b/GL/glx/indirect_reqsize.c @@ -31,7 +31,7 @@ #include "indirect_size.h" #include "indirect_reqsize.h" -#if defined(linux) +#if defined(__linux__) || defined (__GLIBC__) || defined(__GNU__) # include # define SWAP_32(v) do { (v) = bswap_32(v); } while(0) #else diff --git a/GL/glx/indirect_size_get.c b/GL/glx/indirect_size_get.c index 85b5cfba6..150c6a182 100644 --- a/GL/glx/indirect_size_get.c +++ b/GL/glx/indirect_size_get.c @@ -67,1097 +67,1124 @@ INTERNAL PURE FASTCALL GLint -__glCallLists_size( GLenum e ) +__glCallLists_size(GLenum e) { - switch( e ) { - case GL_BYTE: - case GL_UNSIGNED_BYTE: - return 1; - case GL_SHORT: - case GL_UNSIGNED_SHORT: - case GL_2_BYTES: - return 2; - case GL_3_BYTES: - return 3; - case GL_INT: - case GL_UNSIGNED_INT: - case GL_FLOAT: - case GL_4_BYTES: - return 4; - default: return 0; + switch (e) { + case GL_BYTE: + case GL_UNSIGNED_BYTE: + return 1; + case GL_SHORT: + case GL_UNSIGNED_SHORT: + case GL_2_BYTES: + return 2; + case GL_3_BYTES: + return 3; + case GL_INT: + case GL_UNSIGNED_INT: + case GL_FLOAT: + case GL_4_BYTES: + return 4; + default: + return 0; } } INTERNAL PURE FASTCALL GLint -__glFogfv_size( GLenum e ) +__glFogfv_size(GLenum e) { - switch( e ) { - case GL_FOG_INDEX: - case GL_FOG_DENSITY: - case GL_FOG_START: - case GL_FOG_END: - case GL_FOG_MODE: - case GL_FOG_OFFSET_VALUE_SGIX: - case GL_FOG_DISTANCE_MODE_NV: - return 1; - case GL_FOG_COLOR: - return 4; - default: return 0; + switch (e) { + case GL_FOG_INDEX: + case GL_FOG_DENSITY: + case GL_FOG_START: + case GL_FOG_END: + case GL_FOG_MODE: + case GL_FOG_OFFSET_VALUE_SGIX: + case GL_FOG_DISTANCE_MODE_NV: + return 1; + case GL_FOG_COLOR: + return 4; + default: + return 0; } } INTERNAL PURE FASTCALL GLint -__glLightfv_size( GLenum e ) +__glLightfv_size(GLenum e) { - switch( e ) { - case GL_SPOT_EXPONENT: - case GL_SPOT_CUTOFF: - case GL_CONSTANT_ATTENUATION: - case GL_LINEAR_ATTENUATION: - case GL_QUADRATIC_ATTENUATION: - return 1; - case GL_SPOT_DIRECTION: - return 3; - case GL_AMBIENT: - case GL_DIFFUSE: - case GL_SPECULAR: - case GL_POSITION: - return 4; - default: return 0; + switch (e) { + case GL_SPOT_EXPONENT: + case GL_SPOT_CUTOFF: + case GL_CONSTANT_ATTENUATION: + case GL_LINEAR_ATTENUATION: + case GL_QUADRATIC_ATTENUATION: + return 1; + case GL_SPOT_DIRECTION: + return 3; + case GL_AMBIENT: + case GL_DIFFUSE: + case GL_SPECULAR: + case GL_POSITION: + return 4; + default: + return 0; } } INTERNAL PURE FASTCALL GLint -__glLightModelfv_size( GLenum e ) +__glLightModelfv_size(GLenum e) { - switch( e ) { - case GL_LIGHT_MODEL_LOCAL_VIEWER: - case GL_LIGHT_MODEL_TWO_SIDE: - case GL_LIGHT_MODEL_COLOR_CONTROL: + switch (e) { + case GL_LIGHT_MODEL_LOCAL_VIEWER: + case GL_LIGHT_MODEL_TWO_SIDE: + case GL_LIGHT_MODEL_COLOR_CONTROL: /* case GL_LIGHT_MODEL_COLOR_CONTROL_EXT:*/ - return 1; - case GL_LIGHT_MODEL_AMBIENT: - return 4; - default: return 0; + return 1; + case GL_LIGHT_MODEL_AMBIENT: + return 4; + default: + return 0; } } INTERNAL PURE FASTCALL GLint -__glMaterialfv_size( GLenum e ) +__glMaterialfv_size(GLenum e) { - switch( e ) { - case GL_SHININESS: - return 1; - case GL_COLOR_INDEXES: - return 3; - case GL_AMBIENT: - case GL_DIFFUSE: - case GL_SPECULAR: - case GL_EMISSION: - case GL_AMBIENT_AND_DIFFUSE: - return 4; - default: return 0; + switch (e) { + case GL_SHININESS: + return 1; + case GL_COLOR_INDEXES: + return 3; + case GL_AMBIENT: + case GL_DIFFUSE: + case GL_SPECULAR: + case GL_EMISSION: + case GL_AMBIENT_AND_DIFFUSE: + return 4; + default: + return 0; } } INTERNAL PURE FASTCALL GLint -__glTexParameterfv_size( GLenum e ) +__glTexParameterfv_size(GLenum e) { - switch( e ) { - case GL_TEXTURE_MAG_FILTER: - case GL_TEXTURE_MIN_FILTER: - case GL_TEXTURE_WRAP_S: - case GL_TEXTURE_WRAP_T: - case GL_TEXTURE_PRIORITY: - case GL_TEXTURE_WRAP_R: - case GL_TEXTURE_COMPARE_FAIL_VALUE_ARB: + switch (e) { + case GL_TEXTURE_MAG_FILTER: + case GL_TEXTURE_MIN_FILTER: + case GL_TEXTURE_WRAP_S: + case GL_TEXTURE_WRAP_T: + case GL_TEXTURE_PRIORITY: + case GL_TEXTURE_WRAP_R: + case GL_TEXTURE_COMPARE_FAIL_VALUE_ARB: /* case GL_SHADOW_AMBIENT_SGIX:*/ - case GL_TEXTURE_MIN_LOD: - case GL_TEXTURE_MAX_LOD: - case GL_TEXTURE_BASE_LEVEL: - case GL_TEXTURE_MAX_LEVEL: - case GL_TEXTURE_CLIPMAP_FRAME_SGIX: - case GL_TEXTURE_LOD_BIAS_S_SGIX: - case GL_TEXTURE_LOD_BIAS_T_SGIX: - case GL_TEXTURE_LOD_BIAS_R_SGIX: - case GL_GENERATE_MIPMAP: + case GL_TEXTURE_MIN_LOD: + case GL_TEXTURE_MAX_LOD: + case GL_TEXTURE_BASE_LEVEL: + case GL_TEXTURE_MAX_LEVEL: + case GL_TEXTURE_CLIPMAP_FRAME_SGIX: + case GL_TEXTURE_LOD_BIAS_S_SGIX: + case GL_TEXTURE_LOD_BIAS_T_SGIX: + case GL_TEXTURE_LOD_BIAS_R_SGIX: + case GL_GENERATE_MIPMAP: /* case GL_GENERATE_MIPMAP_SGIS:*/ - case GL_TEXTURE_COMPARE_SGIX: - case GL_TEXTURE_COMPARE_OPERATOR_SGIX: - case GL_TEXTURE_MAX_CLAMP_S_SGIX: - case GL_TEXTURE_MAX_CLAMP_T_SGIX: - case GL_TEXTURE_MAX_CLAMP_R_SGIX: - case GL_TEXTURE_MAX_ANISOTROPY_EXT: - case GL_TEXTURE_LOD_BIAS: + case GL_TEXTURE_COMPARE_SGIX: + case GL_TEXTURE_COMPARE_OPERATOR_SGIX: + case GL_TEXTURE_MAX_CLAMP_S_SGIX: + case GL_TEXTURE_MAX_CLAMP_T_SGIX: + case GL_TEXTURE_MAX_CLAMP_R_SGIX: + case GL_TEXTURE_MAX_ANISOTROPY_EXT: + case GL_TEXTURE_LOD_BIAS: /* case GL_TEXTURE_LOD_BIAS_EXT:*/ - case GL_DEPTH_TEXTURE_MODE: + case GL_DEPTH_TEXTURE_MODE: /* case GL_DEPTH_TEXTURE_MODE_ARB:*/ - case GL_TEXTURE_COMPARE_MODE: + case GL_TEXTURE_COMPARE_MODE: /* case GL_TEXTURE_COMPARE_MODE_ARB:*/ - case GL_TEXTURE_COMPARE_FUNC: + case GL_TEXTURE_COMPARE_FUNC: /* case GL_TEXTURE_COMPARE_FUNC_ARB:*/ - case GL_TEXTURE_UNSIGNED_REMAP_MODE_NV: - return 1; - case GL_TEXTURE_CLIPMAP_CENTER_SGIX: - case GL_TEXTURE_CLIPMAP_OFFSET_SGIX: - return 2; - case GL_TEXTURE_CLIPMAP_VIRTUAL_DEPTH_SGIX: - return 3; - case GL_TEXTURE_BORDER_COLOR: - case GL_POST_TEXTURE_FILTER_BIAS_SGIX: - case GL_POST_TEXTURE_FILTER_SCALE_SGIX: - return 4; - default: return 0; + case GL_TEXTURE_UNSIGNED_REMAP_MODE_NV: + return 1; + case GL_TEXTURE_CLIPMAP_CENTER_SGIX: + case GL_TEXTURE_CLIPMAP_OFFSET_SGIX: + return 2; + case GL_TEXTURE_CLIPMAP_VIRTUAL_DEPTH_SGIX: + return 3; + case GL_TEXTURE_BORDER_COLOR: + case GL_POST_TEXTURE_FILTER_BIAS_SGIX: + case GL_POST_TEXTURE_FILTER_SCALE_SGIX: + return 4; + default: + return 0; } } INTERNAL PURE FASTCALL GLint -__glTexEnvfv_size( GLenum e ) +__glTexEnvfv_size(GLenum e) { - switch( e ) { - case GL_ALPHA_SCALE: - case GL_TEXTURE_ENV_MODE: - case GL_TEXTURE_LOD_BIAS: - case GL_COMBINE_RGB: - case GL_COMBINE_ALPHA: - case GL_RGB_SCALE: - case GL_SOURCE0_RGB: - case GL_SOURCE1_RGB: - case GL_SOURCE2_RGB: - case GL_SOURCE3_RGB_NV: - case GL_SOURCE0_ALPHA: - case GL_SOURCE1_ALPHA: - case GL_SOURCE2_ALPHA: - case GL_SOURCE3_ALPHA_NV: - case GL_OPERAND0_RGB: - case GL_OPERAND1_RGB: - case GL_OPERAND2_RGB: - case GL_OPERAND3_RGB_NV: - case GL_OPERAND0_ALPHA: - case GL_OPERAND1_ALPHA: - case GL_OPERAND2_ALPHA: - case GL_OPERAND3_ALPHA_NV: - case GL_COORD_REPLACE_ARB: + switch (e) { + case GL_ALPHA_SCALE: + case GL_TEXTURE_ENV_MODE: + case GL_TEXTURE_LOD_BIAS: + case GL_COMBINE_RGB: + case GL_COMBINE_ALPHA: + case GL_RGB_SCALE: + case GL_SOURCE0_RGB: + case GL_SOURCE1_RGB: + case GL_SOURCE2_RGB: + case GL_SOURCE3_RGB_NV: + case GL_SOURCE0_ALPHA: + case GL_SOURCE1_ALPHA: + case GL_SOURCE2_ALPHA: + case GL_SOURCE3_ALPHA_NV: + case GL_OPERAND0_RGB: + case GL_OPERAND1_RGB: + case GL_OPERAND2_RGB: + case GL_OPERAND3_RGB_NV: + case GL_OPERAND0_ALPHA: + case GL_OPERAND1_ALPHA: + case GL_OPERAND2_ALPHA: + case GL_OPERAND3_ALPHA_NV: + case GL_COORD_REPLACE_ARB: /* case GL_COORD_REPLACE_NV:*/ - return 1; - case GL_TEXTURE_ENV_COLOR: - return 4; - default: return 0; + return 1; + case GL_TEXTURE_ENV_COLOR: + return 4; + default: + return 0; } } INTERNAL PURE FASTCALL GLint -__glTexGendv_size( GLenum e ) +__glTexGendv_size(GLenum e) { - switch( e ) { - case GL_TEXTURE_GEN_MODE: - return 1; - case GL_OBJECT_PLANE: - case GL_EYE_PLANE: - return 4; - default: return 0; + switch (e) { + case GL_TEXTURE_GEN_MODE: + return 1; + case GL_OBJECT_PLANE: + case GL_EYE_PLANE: + return 4; + default: + return 0; } } INTERNAL PURE FASTCALL GLint -__glMap1d_size( GLenum e ) +__glMap1d_size(GLenum e) { - switch( e ) { - case GL_MAP1_INDEX: - case GL_MAP1_TEXTURE_COORD_1: - return 1; - case GL_MAP1_TEXTURE_COORD_2: - return 2; - case GL_MAP1_NORMAL: - case GL_MAP1_TEXTURE_COORD_3: - case GL_MAP1_VERTEX_3: - return 3; - case GL_MAP1_COLOR_4: - case GL_MAP1_TEXTURE_COORD_4: - case GL_MAP1_VERTEX_4: - return 4; - default: return 0; + switch (e) { + case GL_MAP1_INDEX: + case GL_MAP1_TEXTURE_COORD_1: + return 1; + case GL_MAP1_TEXTURE_COORD_2: + return 2; + case GL_MAP1_NORMAL: + case GL_MAP1_TEXTURE_COORD_3: + case GL_MAP1_VERTEX_3: + return 3; + case GL_MAP1_COLOR_4: + case GL_MAP1_TEXTURE_COORD_4: + case GL_MAP1_VERTEX_4: + return 4; + default: + return 0; } } INTERNAL PURE FASTCALL GLint -__glMap2d_size( GLenum e ) +__glMap2d_size(GLenum e) { - switch( e ) { - case GL_MAP2_INDEX: - case GL_MAP2_TEXTURE_COORD_1: - return 1; - case GL_MAP2_TEXTURE_COORD_2: - return 2; - case GL_MAP2_NORMAL: - case GL_MAP2_TEXTURE_COORD_3: - case GL_MAP2_VERTEX_3: - return 3; - case GL_MAP2_COLOR_4: - case GL_MAP2_TEXTURE_COORD_4: - case GL_MAP2_VERTEX_4: - return 4; - default: return 0; + switch (e) { + case GL_MAP2_INDEX: + case GL_MAP2_TEXTURE_COORD_1: + return 1; + case GL_MAP2_TEXTURE_COORD_2: + return 2; + case GL_MAP2_NORMAL: + case GL_MAP2_TEXTURE_COORD_3: + case GL_MAP2_VERTEX_3: + return 3; + case GL_MAP2_COLOR_4: + case GL_MAP2_TEXTURE_COORD_4: + case GL_MAP2_VERTEX_4: + return 4; + default: + return 0; } } INTERNAL PURE FASTCALL GLint -__glGetBooleanv_size( GLenum e ) +__glGetBooleanv_size(GLenum e) { - switch( e ) { - case GL_CURRENT_INDEX: - case GL_CURRENT_RASTER_INDEX: - case GL_CURRENT_RASTER_POSITION_VALID: - case GL_CURRENT_RASTER_DISTANCE: - case GL_POINT_SMOOTH: - case GL_POINT_SIZE: - case GL_SMOOTH_POINT_SIZE_GRANULARITY: - case GL_LINE_SMOOTH: - case GL_LINE_WIDTH: - case GL_LINE_WIDTH_GRANULARITY: - case GL_LINE_STIPPLE: - case GL_LINE_STIPPLE_PATTERN: - case GL_LINE_STIPPLE_REPEAT: - case GL_LIST_MODE: - case GL_MAX_LIST_NESTING: - case GL_LIST_BASE: - case GL_LIST_INDEX: - case GL_POLYGON_SMOOTH: - case GL_POLYGON_STIPPLE: - case GL_EDGE_FLAG: - case GL_CULL_FACE: - case GL_CULL_FACE_MODE: - case GL_FRONT_FACE: - case GL_LIGHTING: - case GL_LIGHT_MODEL_LOCAL_VIEWER: - case GL_LIGHT_MODEL_TWO_SIDE: - case GL_SHADE_MODEL: - case GL_COLOR_MATERIAL_FACE: - case GL_COLOR_MATERIAL_PARAMETER: - case GL_COLOR_MATERIAL: - case GL_FOG: - case GL_FOG_INDEX: - case GL_FOG_DENSITY: - case GL_FOG_START: - case GL_FOG_END: - case GL_FOG_MODE: - case GL_DEPTH_TEST: - case GL_DEPTH_WRITEMASK: - case GL_DEPTH_CLEAR_VALUE: - case GL_DEPTH_FUNC: - case GL_STENCIL_TEST: - case GL_STENCIL_CLEAR_VALUE: - case GL_STENCIL_FUNC: - case GL_STENCIL_VALUE_MASK: - case GL_STENCIL_FAIL: - case GL_STENCIL_PASS_DEPTH_FAIL: - case GL_STENCIL_PASS_DEPTH_PASS: - case GL_STENCIL_REF: - case GL_STENCIL_WRITEMASK: - case GL_MATRIX_MODE: - case GL_NORMALIZE: - case GL_MODELVIEW_STACK_DEPTH: - case GL_PROJECTION_STACK_DEPTH: - case GL_TEXTURE_STACK_DEPTH: - case GL_ATTRIB_STACK_DEPTH: - case GL_ALPHA_TEST: - case GL_ALPHA_TEST_FUNC: - case GL_ALPHA_TEST_REF: - case GL_DITHER: - case GL_BLEND_DST: - case GL_BLEND_SRC: - case GL_BLEND: - case GL_LOGIC_OP_MODE: - case GL_LOGIC_OP: - case GL_AUX_BUFFERS: - case GL_DRAW_BUFFER: - case GL_READ_BUFFER: - case GL_SCISSOR_TEST: - case GL_INDEX_CLEAR_VALUE: - case GL_INDEX_WRITEMASK: - case GL_INDEX_MODE: - case GL_RGBA_MODE: - case GL_DOUBLEBUFFER: - case GL_STEREO: - case GL_RENDER_MODE: - case GL_PERSPECTIVE_CORRECTION_HINT: - case GL_POINT_SMOOTH_HINT: - case GL_LINE_SMOOTH_HINT: - case GL_POLYGON_SMOOTH_HINT: - case GL_FOG_HINT: - case GL_TEXTURE_GEN_S: - case GL_TEXTURE_GEN_T: - case GL_TEXTURE_GEN_R: - case GL_TEXTURE_GEN_Q: - case GL_PIXEL_MAP_I_TO_I: - case GL_PIXEL_MAP_I_TO_I_SIZE: - case GL_PIXEL_MAP_S_TO_S_SIZE: - case GL_PIXEL_MAP_I_TO_R_SIZE: - case GL_PIXEL_MAP_I_TO_G_SIZE: - case GL_PIXEL_MAP_I_TO_B_SIZE: - case GL_PIXEL_MAP_I_TO_A_SIZE: - case GL_PIXEL_MAP_R_TO_R_SIZE: - case GL_PIXEL_MAP_G_TO_G_SIZE: - case GL_PIXEL_MAP_B_TO_B_SIZE: - case GL_PIXEL_MAP_A_TO_A_SIZE: - case GL_UNPACK_SWAP_BYTES: - case GL_UNPACK_LSB_FIRST: - case GL_UNPACK_ROW_LENGTH: - case GL_UNPACK_SKIP_ROWS: - case GL_UNPACK_SKIP_PIXELS: - case GL_UNPACK_ALIGNMENT: - case GL_PACK_SWAP_BYTES: - case GL_PACK_LSB_FIRST: - case GL_PACK_ROW_LENGTH: - case GL_PACK_SKIP_ROWS: - case GL_PACK_SKIP_PIXELS: - case GL_PACK_ALIGNMENT: - case GL_MAP_COLOR: - case GL_MAP_STENCIL: - case GL_INDEX_SHIFT: - case GL_INDEX_OFFSET: - case GL_RED_SCALE: - case GL_RED_BIAS: - case GL_ZOOM_X: - case GL_ZOOM_Y: - case GL_GREEN_SCALE: - case GL_GREEN_BIAS: - case GL_BLUE_SCALE: - case GL_BLUE_BIAS: - case GL_ALPHA_SCALE: - case GL_ALPHA_BIAS: - case GL_DEPTH_SCALE: - case GL_DEPTH_BIAS: - case GL_MAX_EVAL_ORDER: - case GL_MAX_LIGHTS: - case GL_MAX_CLIP_PLANES: - case GL_MAX_TEXTURE_SIZE: - case GL_MAX_PIXEL_MAP_TABLE: - case GL_MAX_ATTRIB_STACK_DEPTH: - case GL_MAX_MODELVIEW_STACK_DEPTH: - case GL_MAX_NAME_STACK_DEPTH: - case GL_MAX_PROJECTION_STACK_DEPTH: - case GL_MAX_TEXTURE_STACK_DEPTH: - case GL_SUBPIXEL_BITS: - case GL_INDEX_BITS: - case GL_RED_BITS: - case GL_GREEN_BITS: - case GL_BLUE_BITS: - case GL_ALPHA_BITS: - case GL_DEPTH_BITS: - case GL_STENCIL_BITS: - case GL_ACCUM_RED_BITS: - case GL_ACCUM_GREEN_BITS: - case GL_ACCUM_BLUE_BITS: - case GL_ACCUM_ALPHA_BITS: - case GL_NAME_STACK_DEPTH: - case GL_AUTO_NORMAL: - case GL_MAP1_COLOR_4: - case GL_MAP1_INDEX: - case GL_MAP1_NORMAL: - case GL_MAP1_TEXTURE_COORD_1: - case GL_MAP1_TEXTURE_COORD_2: - case GL_MAP1_TEXTURE_COORD_3: - case GL_MAP1_TEXTURE_COORD_4: - case GL_MAP1_VERTEX_3: - case GL_MAP1_VERTEX_4: - case GL_MAP2_COLOR_4: - case GL_MAP2_INDEX: - case GL_MAP2_NORMAL: - case GL_MAP2_TEXTURE_COORD_1: - case GL_MAP2_TEXTURE_COORD_2: - case GL_MAP2_TEXTURE_COORD_3: - case GL_MAP2_TEXTURE_COORD_4: - case GL_MAP2_VERTEX_3: - case GL_MAP2_VERTEX_4: - case GL_MAP1_GRID_SEGMENTS: - case GL_TEXTURE_1D: - case GL_TEXTURE_2D: - case GL_POLYGON_OFFSET_UNITS: - case GL_CLIP_PLANE0: - case GL_CLIP_PLANE1: - case GL_CLIP_PLANE2: - case GL_CLIP_PLANE3: - case GL_CLIP_PLANE4: - case GL_CLIP_PLANE5: - case GL_LIGHT0: - case GL_LIGHT1: - case GL_LIGHT2: - case GL_LIGHT3: - case GL_LIGHT4: - case GL_LIGHT5: - case GL_LIGHT6: - case GL_LIGHT7: - case GL_BLEND_EQUATION: + switch (e) { + case GL_CURRENT_INDEX: + case GL_CURRENT_RASTER_INDEX: + case GL_CURRENT_RASTER_POSITION_VALID: + case GL_CURRENT_RASTER_DISTANCE: + case GL_POINT_SMOOTH: + case GL_POINT_SIZE: + case GL_SMOOTH_POINT_SIZE_GRANULARITY: + case GL_LINE_SMOOTH: + case GL_LINE_WIDTH: + case GL_LINE_WIDTH_GRANULARITY: + case GL_LINE_STIPPLE: + case GL_LINE_STIPPLE_PATTERN: + case GL_LINE_STIPPLE_REPEAT: + case GL_LIST_MODE: + case GL_MAX_LIST_NESTING: + case GL_LIST_BASE: + case GL_LIST_INDEX: + case GL_POLYGON_SMOOTH: + case GL_POLYGON_STIPPLE: + case GL_EDGE_FLAG: + case GL_CULL_FACE: + case GL_CULL_FACE_MODE: + case GL_FRONT_FACE: + case GL_LIGHTING: + case GL_LIGHT_MODEL_LOCAL_VIEWER: + case GL_LIGHT_MODEL_TWO_SIDE: + case GL_SHADE_MODEL: + case GL_COLOR_MATERIAL_FACE: + case GL_COLOR_MATERIAL_PARAMETER: + case GL_COLOR_MATERIAL: + case GL_FOG: + case GL_FOG_INDEX: + case GL_FOG_DENSITY: + case GL_FOG_START: + case GL_FOG_END: + case GL_FOG_MODE: + case GL_DEPTH_TEST: + case GL_DEPTH_WRITEMASK: + case GL_DEPTH_CLEAR_VALUE: + case GL_DEPTH_FUNC: + case GL_STENCIL_TEST: + case GL_STENCIL_CLEAR_VALUE: + case GL_STENCIL_FUNC: + case GL_STENCIL_VALUE_MASK: + case GL_STENCIL_FAIL: + case GL_STENCIL_PASS_DEPTH_FAIL: + case GL_STENCIL_PASS_DEPTH_PASS: + case GL_STENCIL_REF: + case GL_STENCIL_WRITEMASK: + case GL_MATRIX_MODE: + case GL_NORMALIZE: + case GL_MODELVIEW_STACK_DEPTH: + case GL_PROJECTION_STACK_DEPTH: + case GL_TEXTURE_STACK_DEPTH: + case GL_ATTRIB_STACK_DEPTH: + case GL_ALPHA_TEST: + case GL_ALPHA_TEST_FUNC: + case GL_ALPHA_TEST_REF: + case GL_DITHER: + case GL_BLEND_DST: + case GL_BLEND_SRC: + case GL_BLEND: + case GL_LOGIC_OP_MODE: + case GL_LOGIC_OP: + case GL_AUX_BUFFERS: + case GL_DRAW_BUFFER: + case GL_READ_BUFFER: + case GL_SCISSOR_TEST: + case GL_INDEX_CLEAR_VALUE: + case GL_INDEX_WRITEMASK: + case GL_INDEX_MODE: + case GL_RGBA_MODE: + case GL_DOUBLEBUFFER: + case GL_STEREO: + case GL_RENDER_MODE: + case GL_PERSPECTIVE_CORRECTION_HINT: + case GL_POINT_SMOOTH_HINT: + case GL_LINE_SMOOTH_HINT: + case GL_POLYGON_SMOOTH_HINT: + case GL_FOG_HINT: + case GL_TEXTURE_GEN_S: + case GL_TEXTURE_GEN_T: + case GL_TEXTURE_GEN_R: + case GL_TEXTURE_GEN_Q: + case GL_PIXEL_MAP_I_TO_I: + case GL_PIXEL_MAP_I_TO_I_SIZE: + case GL_PIXEL_MAP_S_TO_S_SIZE: + case GL_PIXEL_MAP_I_TO_R_SIZE: + case GL_PIXEL_MAP_I_TO_G_SIZE: + case GL_PIXEL_MAP_I_TO_B_SIZE: + case GL_PIXEL_MAP_I_TO_A_SIZE: + case GL_PIXEL_MAP_R_TO_R_SIZE: + case GL_PIXEL_MAP_G_TO_G_SIZE: + case GL_PIXEL_MAP_B_TO_B_SIZE: + case GL_PIXEL_MAP_A_TO_A_SIZE: + case GL_UNPACK_SWAP_BYTES: + case GL_UNPACK_LSB_FIRST: + case GL_UNPACK_ROW_LENGTH: + case GL_UNPACK_SKIP_ROWS: + case GL_UNPACK_SKIP_PIXELS: + case GL_UNPACK_ALIGNMENT: + case GL_PACK_SWAP_BYTES: + case GL_PACK_LSB_FIRST: + case GL_PACK_ROW_LENGTH: + case GL_PACK_SKIP_ROWS: + case GL_PACK_SKIP_PIXELS: + case GL_PACK_ALIGNMENT: + case GL_MAP_COLOR: + case GL_MAP_STENCIL: + case GL_INDEX_SHIFT: + case GL_INDEX_OFFSET: + case GL_RED_SCALE: + case GL_RED_BIAS: + case GL_ZOOM_X: + case GL_ZOOM_Y: + case GL_GREEN_SCALE: + case GL_GREEN_BIAS: + case GL_BLUE_SCALE: + case GL_BLUE_BIAS: + case GL_ALPHA_SCALE: + case GL_ALPHA_BIAS: + case GL_DEPTH_SCALE: + case GL_DEPTH_BIAS: + case GL_MAX_EVAL_ORDER: + case GL_MAX_LIGHTS: + case GL_MAX_CLIP_PLANES: + case GL_MAX_TEXTURE_SIZE: + case GL_MAX_PIXEL_MAP_TABLE: + case GL_MAX_ATTRIB_STACK_DEPTH: + case GL_MAX_MODELVIEW_STACK_DEPTH: + case GL_MAX_NAME_STACK_DEPTH: + case GL_MAX_PROJECTION_STACK_DEPTH: + case GL_MAX_TEXTURE_STACK_DEPTH: + case GL_SUBPIXEL_BITS: + case GL_INDEX_BITS: + case GL_RED_BITS: + case GL_GREEN_BITS: + case GL_BLUE_BITS: + case GL_ALPHA_BITS: + case GL_DEPTH_BITS: + case GL_STENCIL_BITS: + case GL_ACCUM_RED_BITS: + case GL_ACCUM_GREEN_BITS: + case GL_ACCUM_BLUE_BITS: + case GL_ACCUM_ALPHA_BITS: + case GL_NAME_STACK_DEPTH: + case GL_AUTO_NORMAL: + case GL_MAP1_COLOR_4: + case GL_MAP1_INDEX: + case GL_MAP1_NORMAL: + case GL_MAP1_TEXTURE_COORD_1: + case GL_MAP1_TEXTURE_COORD_2: + case GL_MAP1_TEXTURE_COORD_3: + case GL_MAP1_TEXTURE_COORD_4: + case GL_MAP1_VERTEX_3: + case GL_MAP1_VERTEX_4: + case GL_MAP2_COLOR_4: + case GL_MAP2_INDEX: + case GL_MAP2_NORMAL: + case GL_MAP2_TEXTURE_COORD_1: + case GL_MAP2_TEXTURE_COORD_2: + case GL_MAP2_TEXTURE_COORD_3: + case GL_MAP2_TEXTURE_COORD_4: + case GL_MAP2_VERTEX_3: + case GL_MAP2_VERTEX_4: + case GL_MAP1_GRID_SEGMENTS: + case GL_TEXTURE_1D: + case GL_TEXTURE_2D: + case GL_POLYGON_OFFSET_UNITS: + case GL_CLIP_PLANE0: + case GL_CLIP_PLANE1: + case GL_CLIP_PLANE2: + case GL_CLIP_PLANE3: + case GL_CLIP_PLANE4: + case GL_CLIP_PLANE5: + case GL_LIGHT0: + case GL_LIGHT1: + case GL_LIGHT2: + case GL_LIGHT3: + case GL_LIGHT4: + case GL_LIGHT5: + case GL_LIGHT6: + case GL_LIGHT7: + case GL_BLEND_EQUATION: /* case GL_BLEND_EQUATION_EXT:*/ - case GL_CONVOLUTION_1D: - case GL_CONVOLUTION_2D: - case GL_SEPARABLE_2D: - case GL_MAX_CONVOLUTION_WIDTH: + case GL_CONVOLUTION_1D: + case GL_CONVOLUTION_2D: + case GL_SEPARABLE_2D: + case GL_MAX_CONVOLUTION_WIDTH: /* case GL_MAX_CONVOLUTION_WIDTH_EXT:*/ - case GL_MAX_CONVOLUTION_HEIGHT: + case GL_MAX_CONVOLUTION_HEIGHT: /* case GL_MAX_CONVOLUTION_HEIGHT_EXT:*/ - case GL_POST_CONVOLUTION_RED_SCALE: + case GL_POST_CONVOLUTION_RED_SCALE: /* case GL_POST_CONVOLUTION_RED_SCALE_EXT:*/ - case GL_POST_CONVOLUTION_GREEN_SCALE: + case GL_POST_CONVOLUTION_GREEN_SCALE: /* case GL_POST_CONVOLUTION_GREEN_SCALE_EXT:*/ - case GL_POST_CONVOLUTION_BLUE_SCALE: + case GL_POST_CONVOLUTION_BLUE_SCALE: /* case GL_POST_CONVOLUTION_BLUE_SCALE_EXT:*/ - case GL_POST_CONVOLUTION_ALPHA_SCALE: + case GL_POST_CONVOLUTION_ALPHA_SCALE: /* case GL_POST_CONVOLUTION_ALPHA_SCALE_EXT:*/ - case GL_POST_CONVOLUTION_RED_BIAS: + case GL_POST_CONVOLUTION_RED_BIAS: /* case GL_POST_CONVOLUTION_RED_BIAS_EXT:*/ - case GL_POST_CONVOLUTION_GREEN_BIAS: + case GL_POST_CONVOLUTION_GREEN_BIAS: /* case GL_POST_CONVOLUTION_GREEN_BIAS_EXT:*/ - case GL_POST_CONVOLUTION_BLUE_BIAS: + case GL_POST_CONVOLUTION_BLUE_BIAS: /* case GL_POST_CONVOLUTION_BLUE_BIAS_EXT:*/ - case GL_POST_CONVOLUTION_ALPHA_BIAS: + case GL_POST_CONVOLUTION_ALPHA_BIAS: /* case GL_POST_CONVOLUTION_ALPHA_BIAS_EXT:*/ - case GL_HISTOGRAM: - case GL_MINMAX: - case GL_POLYGON_OFFSET_FACTOR: - case GL_RESCALE_NORMAL: + case GL_HISTOGRAM: + case GL_MINMAX: + case GL_POLYGON_OFFSET_FACTOR: + case GL_RESCALE_NORMAL: /* case GL_RESCALE_NORMAL_EXT:*/ - case GL_TEXTURE_BINDING_1D: - case GL_TEXTURE_BINDING_2D: - case GL_TEXTURE_BINDING_3D: - case GL_PACK_SKIP_IMAGES: - case GL_PACK_IMAGE_HEIGHT: - case GL_UNPACK_SKIP_IMAGES: - case GL_UNPACK_IMAGE_HEIGHT: - case GL_TEXTURE_3D: - case GL_VERTEX_ARRAY: - case GL_NORMAL_ARRAY: - case GL_COLOR_ARRAY: - case GL_INDEX_ARRAY: - case GL_TEXTURE_COORD_ARRAY: - case GL_EDGE_FLAG_ARRAY: - case GL_VERTEX_ARRAY_SIZE: - case GL_VERTEX_ARRAY_TYPE: - case GL_VERTEX_ARRAY_STRIDE: - case GL_NORMAL_ARRAY_TYPE: - case GL_NORMAL_ARRAY_STRIDE: - case GL_COLOR_ARRAY_SIZE: - case GL_COLOR_ARRAY_TYPE: - case GL_COLOR_ARRAY_STRIDE: - case GL_INDEX_ARRAY_TYPE: - case GL_INDEX_ARRAY_STRIDE: - case GL_TEXTURE_COORD_ARRAY_SIZE: - case GL_TEXTURE_COORD_ARRAY_TYPE: - case GL_TEXTURE_COORD_ARRAY_STRIDE: - case GL_EDGE_FLAG_ARRAY_STRIDE: - case GL_MULTISAMPLE: + case GL_TEXTURE_BINDING_1D: + case GL_TEXTURE_BINDING_2D: + case GL_TEXTURE_BINDING_3D: + case GL_PACK_SKIP_IMAGES: + case GL_PACK_IMAGE_HEIGHT: + case GL_UNPACK_SKIP_IMAGES: + case GL_UNPACK_IMAGE_HEIGHT: + case GL_TEXTURE_3D: + case GL_VERTEX_ARRAY: + case GL_NORMAL_ARRAY: + case GL_COLOR_ARRAY: + case GL_INDEX_ARRAY: + case GL_TEXTURE_COORD_ARRAY: + case GL_EDGE_FLAG_ARRAY: + case GL_VERTEX_ARRAY_SIZE: + case GL_VERTEX_ARRAY_TYPE: + case GL_VERTEX_ARRAY_STRIDE: + case GL_NORMAL_ARRAY_TYPE: + case GL_NORMAL_ARRAY_STRIDE: + case GL_COLOR_ARRAY_SIZE: + case GL_COLOR_ARRAY_TYPE: + case GL_COLOR_ARRAY_STRIDE: + case GL_INDEX_ARRAY_TYPE: + case GL_INDEX_ARRAY_STRIDE: + case GL_TEXTURE_COORD_ARRAY_SIZE: + case GL_TEXTURE_COORD_ARRAY_TYPE: + case GL_TEXTURE_COORD_ARRAY_STRIDE: + case GL_EDGE_FLAG_ARRAY_STRIDE: + case GL_MULTISAMPLE: /* case GL_MULTISAMPLE_ARB:*/ - case GL_SAMPLE_ALPHA_TO_COVERAGE: + case GL_SAMPLE_ALPHA_TO_COVERAGE: /* case GL_SAMPLE_ALPHA_TO_COVERAGE_ARB:*/ - case GL_SAMPLE_ALPHA_TO_ONE: + case GL_SAMPLE_ALPHA_TO_ONE: /* case GL_SAMPLE_ALPHA_TO_ONE_ARB:*/ - case GL_SAMPLE_COVERAGE: + case GL_SAMPLE_COVERAGE: /* case GL_SAMPLE_COVERAGE_ARB:*/ - case GL_SAMPLE_BUFFERS: + case GL_SAMPLE_BUFFERS: /* case GL_SAMPLE_BUFFERS_ARB:*/ - case GL_SAMPLES: + case GL_SAMPLES: /* case GL_SAMPLES_ARB:*/ - case GL_SAMPLE_COVERAGE_VALUE: + case GL_SAMPLE_COVERAGE_VALUE: /* case GL_SAMPLE_COVERAGE_VALUE_ARB:*/ - case GL_SAMPLE_COVERAGE_INVERT: + case GL_SAMPLE_COVERAGE_INVERT: /* case GL_SAMPLE_COVERAGE_INVERT_ARB:*/ - case GL_COLOR_MATRIX_STACK_DEPTH: - case GL_MAX_COLOR_MATRIX_STACK_DEPTH: - case GL_POST_COLOR_MATRIX_RED_SCALE: - case GL_POST_COLOR_MATRIX_GREEN_SCALE: - case GL_POST_COLOR_MATRIX_BLUE_SCALE: - case GL_POST_COLOR_MATRIX_ALPHA_SCALE: - case GL_POST_COLOR_MATRIX_RED_BIAS: - case GL_POST_COLOR_MATRIX_GREEN_BIAS: - case GL_POST_COLOR_MATRIX_BLUE_BIAS: - case GL_POST_COLOR_MATRIX_ALPHA_BIAS: - case GL_BLEND_DST_RGB: - case GL_BLEND_SRC_RGB: - case GL_BLEND_DST_ALPHA: - case GL_BLEND_SRC_ALPHA: - case GL_COLOR_TABLE: - case GL_POST_CONVOLUTION_COLOR_TABLE: - case GL_POST_COLOR_MATRIX_COLOR_TABLE: - case GL_MAX_ELEMENTS_VERTICES: - case GL_MAX_ELEMENTS_INDICES: - case GL_CLIP_VOLUME_CLIPPING_HINT_EXT: - case GL_OCCLUSION_TEST_HP: - case GL_OCCLUSION_TEST_RESULT_HP: - case GL_LIGHT_MODEL_COLOR_CONTROL: - case GL_CURRENT_FOG_COORD: - case GL_FOG_COORDINATE_ARRAY_TYPE: - case GL_FOG_COORDINATE_ARRAY_STRIDE: - case GL_FOG_COORD_ARRAY: - case GL_COLOR_SUM_ARB: - case GL_SECONDARY_COLOR_ARRAY_SIZE: - case GL_SECONDARY_COLOR_ARRAY_TYPE: - case GL_SECONDARY_COLOR_ARRAY_STRIDE: - case GL_SECONDARY_COLOR_ARRAY: - case GL_ACTIVE_TEXTURE: + case GL_COLOR_MATRIX_STACK_DEPTH: + case GL_MAX_COLOR_MATRIX_STACK_DEPTH: + case GL_POST_COLOR_MATRIX_RED_SCALE: + case GL_POST_COLOR_MATRIX_GREEN_SCALE: + case GL_POST_COLOR_MATRIX_BLUE_SCALE: + case GL_POST_COLOR_MATRIX_ALPHA_SCALE: + case GL_POST_COLOR_MATRIX_RED_BIAS: + case GL_POST_COLOR_MATRIX_GREEN_BIAS: + case GL_POST_COLOR_MATRIX_BLUE_BIAS: + case GL_POST_COLOR_MATRIX_ALPHA_BIAS: + case GL_BLEND_DST_RGB: + case GL_BLEND_SRC_RGB: + case GL_BLEND_DST_ALPHA: + case GL_BLEND_SRC_ALPHA: + case GL_COLOR_TABLE: + case GL_POST_CONVOLUTION_COLOR_TABLE: + case GL_POST_COLOR_MATRIX_COLOR_TABLE: + case GL_MAX_ELEMENTS_VERTICES: + case GL_MAX_ELEMENTS_INDICES: + case GL_CLIP_VOLUME_CLIPPING_HINT_EXT: + case GL_OCCLUSION_TEST_HP: + case GL_OCCLUSION_TEST_RESULT_HP: + case GL_LIGHT_MODEL_COLOR_CONTROL: + case GL_CURRENT_FOG_COORD: + case GL_FOG_COORDINATE_ARRAY_TYPE: + case GL_FOG_COORDINATE_ARRAY_STRIDE: + case GL_FOG_COORD_ARRAY: + case GL_COLOR_SUM_ARB: + case GL_SECONDARY_COLOR_ARRAY_SIZE: + case GL_SECONDARY_COLOR_ARRAY_TYPE: + case GL_SECONDARY_COLOR_ARRAY_STRIDE: + case GL_SECONDARY_COLOR_ARRAY: + case GL_ACTIVE_TEXTURE: /* case GL_ACTIVE_TEXTURE_ARB:*/ - case GL_CLIENT_ACTIVE_TEXTURE: + case GL_CLIENT_ACTIVE_TEXTURE: /* case GL_CLIENT_ACTIVE_TEXTURE_ARB:*/ - case GL_MAX_TEXTURE_UNITS: + case GL_MAX_TEXTURE_UNITS: /* case GL_MAX_TEXTURE_UNITS_ARB:*/ - case GL_TEXTURE_COMPRESSION_HINT: + case GL_TEXTURE_COMPRESSION_HINT: /* case GL_TEXTURE_COMPRESSION_HINT_ARB:*/ - case GL_TEXTURE_RECTANGLE_ARB: + case GL_TEXTURE_RECTANGLE_ARB: /* case GL_TEXTURE_RECTANGLE_NV:*/ - case GL_TEXTURE_BINDING_RECTANGLE_ARB: + case GL_TEXTURE_BINDING_RECTANGLE_ARB: /* case GL_TEXTURE_BINDING_RECTANGLE_NV:*/ - case GL_MAX_RECTANGLE_TEXTURE_SIZE_ARB: + case GL_MAX_RECTANGLE_TEXTURE_SIZE_ARB: /* case GL_MAX_RECTANGLE_TEXTURE_SIZE_NV:*/ - case GL_MAX_TEXTURE_LOD_BIAS: - case GL_MAX_SHININESS_NV: - case GL_MAX_SPOT_EXPONENT_NV: - case GL_TEXTURE_CUBE_MAP: + case GL_MAX_TEXTURE_LOD_BIAS: + case GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT: + case GL_MAX_SHININESS_NV: + case GL_MAX_SPOT_EXPONENT_NV: + case GL_TEXTURE_CUBE_MAP: /* case GL_TEXTURE_CUBE_MAP_ARB:*/ - case GL_TEXTURE_BINDING_CUBE_MAP: + case GL_TEXTURE_BINDING_CUBE_MAP: /* case GL_TEXTURE_BINDING_CUBE_MAP_ARB:*/ - case GL_MAX_CUBE_MAP_TEXTURE_SIZE: + case GL_MAX_CUBE_MAP_TEXTURE_SIZE: /* case GL_MAX_CUBE_MAP_TEXTURE_SIZE_ARB:*/ - case GL_MULTISAMPLE_FILTER_HINT_NV: - case GL_FOG_DISTANCE_MODE_NV: - case GL_VERTEX_PROGRAM_ARB: - case GL_MAX_PROGRAM_MATRIX_STACK_DEPTH_ARB: - case GL_MAX_PROGRAM_MATRICES_ARB: - case GL_CURRENT_MATRIX_STACK_DEPTH_ARB: - case GL_VERTEX_PROGRAM_POINT_SIZE_ARB: - case GL_VERTEX_PROGRAM_TWO_SIDE_ARB: - case GL_PROGRAM_ERROR_POSITION_ARB: - case GL_DEPTH_CLAMP_NV: - case GL_NUM_COMPRESSED_TEXTURE_FORMATS: + case GL_MULTISAMPLE_FILTER_HINT_NV: + case GL_FOG_DISTANCE_MODE_NV: + case GL_VERTEX_PROGRAM_ARB: + case GL_MAX_PROGRAM_MATRIX_STACK_DEPTH_ARB: + case GL_MAX_PROGRAM_MATRICES_ARB: + case GL_CURRENT_MATRIX_STACK_DEPTH_ARB: + case GL_VERTEX_PROGRAM_POINT_SIZE_ARB: + case GL_VERTEX_PROGRAM_TWO_SIDE_ARB: + case GL_PROGRAM_ERROR_POSITION_ARB: + case GL_DEPTH_CLAMP_NV: + case GL_NUM_COMPRESSED_TEXTURE_FORMATS: /* case GL_NUM_TEXTURE_COMPRESSED_FORMATS_ARB:*/ - case GL_MAX_VERTEX_UNITS_ARB: - case GL_ACTIVE_VERTEX_UNITS_ARB: - case GL_WEIGHT_SUM_UNITY_ARB: - case GL_VERTEX_BLEND_ARB: - case GL_CURRENT_WEIGHT_ARB: - case GL_WEIGHT_ARRAY_TYPE_ARB: - case GL_WEIGHT_ARRAY_STRIDE_ARB: - case GL_WEIGHT_ARRAY_SIZE_ARB: - case GL_WEIGHT_ARRAY_ARB: - case GL_PACK_INVERT_MESA: - case GL_FRAGMENT_PROGRAM_ARB: - case GL_MAX_DRAW_BUFFERS_ARB: + case GL_MAX_VERTEX_UNITS_ARB: + case GL_ACTIVE_VERTEX_UNITS_ARB: + case GL_WEIGHT_SUM_UNITY_ARB: + case GL_VERTEX_BLEND_ARB: + case GL_CURRENT_WEIGHT_ARB: + case GL_WEIGHT_ARRAY_TYPE_ARB: + case GL_WEIGHT_ARRAY_STRIDE_ARB: + case GL_WEIGHT_ARRAY_SIZE_ARB: + case GL_WEIGHT_ARRAY_ARB: + case GL_PACK_INVERT_MESA: + case GL_FRAGMENT_PROGRAM_ARB: + case GL_MAX_DRAW_BUFFERS_ARB: /* case GL_MAX_DRAW_BUFFERS_ATI:*/ - case GL_DRAW_BUFFER0_ARB: + case GL_DRAW_BUFFER0_ARB: /* case GL_DRAW_BUFFER0_ATI:*/ - case GL_DRAW_BUFFER1_ARB: + case GL_DRAW_BUFFER1_ARB: /* case GL_DRAW_BUFFER1_ATI:*/ - case GL_DRAW_BUFFER2_ARB: + case GL_DRAW_BUFFER2_ARB: /* case GL_DRAW_BUFFER2_ATI:*/ - case GL_DRAW_BUFFER3_ARB: + case GL_DRAW_BUFFER3_ARB: /* case GL_DRAW_BUFFER3_ATI:*/ - case GL_DRAW_BUFFER4_ARB: + case GL_DRAW_BUFFER4_ARB: /* case GL_DRAW_BUFFER4_ATI:*/ - case GL_DRAW_BUFFER5_ARB: + case GL_DRAW_BUFFER5_ARB: /* case GL_DRAW_BUFFER5_ATI:*/ - case GL_DRAW_BUFFER6_ARB: + case GL_DRAW_BUFFER6_ARB: /* case GL_DRAW_BUFFER6_ATI:*/ - case GL_DRAW_BUFFER7_ARB: + case GL_DRAW_BUFFER7_ARB: /* case GL_DRAW_BUFFER7_ATI:*/ - case GL_DRAW_BUFFER8_ARB: + case GL_DRAW_BUFFER8_ARB: /* case GL_DRAW_BUFFER8_ATI:*/ - case GL_DRAW_BUFFER9_ARB: + case GL_DRAW_BUFFER9_ARB: /* case GL_DRAW_BUFFER9_ATI:*/ - case GL_DRAW_BUFFER10_ARB: + case GL_DRAW_BUFFER10_ARB: /* case GL_DRAW_BUFFER10_ATI:*/ - case GL_DRAW_BUFFER11_ARB: + case GL_DRAW_BUFFER11_ARB: /* case GL_DRAW_BUFFER11_ATI:*/ - case GL_DRAW_BUFFER12_ARB: + case GL_DRAW_BUFFER12_ARB: /* case GL_DRAW_BUFFER12_ATI:*/ - case GL_DRAW_BUFFER13_ARB: + case GL_DRAW_BUFFER13_ARB: /* case GL_DRAW_BUFFER13_ATI:*/ - case GL_DRAW_BUFFER14_ARB: + case GL_DRAW_BUFFER14_ARB: /* case GL_DRAW_BUFFER14_ATI:*/ - case GL_DRAW_BUFFER15_ARB: + case GL_DRAW_BUFFER15_ARB: /* case GL_DRAW_BUFFER15_ATI:*/ - case GL_BLEND_EQUATION_ALPHA_EXT: - case GL_MATRIX_PALETTE_ARB: - case GL_MAX_MATRIX_PALETTE_STACK_DEPTH_ARB: - case GL_MAX_PALETTE_MATRICES_ARB: - case GL_CURRENT_PALETTE_MATRIX_ARB: - case GL_MATRIX_INDEX_ARRAY_ARB: - case GL_CURRENT_MATRIX_INDEX_ARB: - case GL_MATRIX_INDEX_ARRAY_SIZE_ARB: - case GL_MATRIX_INDEX_ARRAY_TYPE_ARB: - case GL_MATRIX_INDEX_ARRAY_STRIDE_ARB: - case GL_POINT_SPRITE_ARB: + case GL_BLEND_EQUATION_ALPHA_EXT: + case GL_MATRIX_PALETTE_ARB: + case GL_MAX_MATRIX_PALETTE_STACK_DEPTH_ARB: + case GL_MAX_PALETTE_MATRICES_ARB: + case GL_CURRENT_PALETTE_MATRIX_ARB: + case GL_MATRIX_INDEX_ARRAY_ARB: + case GL_CURRENT_MATRIX_INDEX_ARB: + case GL_MATRIX_INDEX_ARRAY_SIZE_ARB: + case GL_MATRIX_INDEX_ARRAY_TYPE_ARB: + case GL_MATRIX_INDEX_ARRAY_STRIDE_ARB: + case GL_POINT_SPRITE_ARB: /* case GL_POINT_SPRITE_NV:*/ - case GL_POINT_SPRITE_R_MODE_NV: - case GL_MAX_VERTEX_ATTRIBS_ARB: - case GL_DEPTH_BOUNDS_TEST_EXT: - case GL_STENCIL_TEST_TWO_SIDE_EXT: - case GL_ACTIVE_STENCIL_FACE_EXT: - case GL_RASTER_POSITION_UNCLIPPED_IBM: - return 1; - case GL_SMOOTH_POINT_SIZE_RANGE: - case GL_LINE_WIDTH_RANGE: - case GL_POLYGON_MODE: - case GL_DEPTH_RANGE: - case GL_MAX_VIEWPORT_DIMS: - case GL_MAP1_GRID_DOMAIN: - case GL_MAP2_GRID_SEGMENTS: - case GL_ALIASED_POINT_SIZE_RANGE: - case GL_ALIASED_LINE_WIDTH_RANGE: - case GL_DEPTH_BOUNDS_EXT: - return 2; - case GL_CURRENT_NORMAL: - return 3; - case GL_CURRENT_COLOR: - case GL_CURRENT_TEXTURE_COORDS: - case GL_CURRENT_RASTER_COLOR: - case GL_CURRENT_RASTER_TEXTURE_COORDS: - case GL_CURRENT_RASTER_POSITION: - case GL_LIGHT_MODEL_AMBIENT: - case GL_FOG_COLOR: - case GL_ACCUM_CLEAR_VALUE: - case GL_VIEWPORT: - case GL_SCISSOR_BOX: - case GL_COLOR_CLEAR_VALUE: - case GL_COLOR_WRITEMASK: - case GL_MAP2_GRID_DOMAIN: - case GL_BLEND_COLOR: + case GL_POINT_SPRITE_R_MODE_NV: + case GL_MAX_VERTEX_ATTRIBS_ARB: + case GL_DEPTH_BOUNDS_TEST_EXT: + case GL_STENCIL_TEST_TWO_SIDE_EXT: + case GL_ACTIVE_STENCIL_FACE_EXT: + case GL_RASTER_POSITION_UNCLIPPED_IBM: + return 1; + case GL_SMOOTH_POINT_SIZE_RANGE: + case GL_LINE_WIDTH_RANGE: + case GL_POLYGON_MODE: + case GL_DEPTH_RANGE: + case GL_MAX_VIEWPORT_DIMS: + case GL_MAP1_GRID_DOMAIN: + case GL_MAP2_GRID_SEGMENTS: + case GL_ALIASED_POINT_SIZE_RANGE: + case GL_ALIASED_LINE_WIDTH_RANGE: + case GL_DEPTH_BOUNDS_EXT: + return 2; + case GL_CURRENT_NORMAL: + return 3; + case GL_CURRENT_COLOR: + case GL_CURRENT_TEXTURE_COORDS: + case GL_CURRENT_RASTER_COLOR: + case GL_CURRENT_RASTER_TEXTURE_COORDS: + case GL_CURRENT_RASTER_POSITION: + case GL_LIGHT_MODEL_AMBIENT: + case GL_FOG_COLOR: + case GL_ACCUM_CLEAR_VALUE: + case GL_VIEWPORT: + case GL_SCISSOR_BOX: + case GL_COLOR_CLEAR_VALUE: + case GL_COLOR_WRITEMASK: + case GL_MAP2_GRID_DOMAIN: + case GL_BLEND_COLOR: /* case GL_BLEND_COLOR_EXT:*/ - case GL_CURRENT_SECONDARY_COLOR: - return 4; - case GL_MODELVIEW_MATRIX: - case GL_PROJECTION_MATRIX: - case GL_TEXTURE_MATRIX: - case GL_MODELVIEW0_ARB: - case GL_COLOR_MATRIX: - case GL_MODELVIEW1_ARB: - case GL_CURRENT_MATRIX_ARB: - case GL_MODELVIEW2_ARB: - case GL_MODELVIEW3_ARB: - case GL_MODELVIEW4_ARB: - case GL_MODELVIEW5_ARB: - case GL_MODELVIEW6_ARB: - case GL_MODELVIEW7_ARB: - case GL_MODELVIEW8_ARB: - case GL_MODELVIEW9_ARB: - case GL_MODELVIEW10_ARB: - case GL_MODELVIEW11_ARB: - case GL_MODELVIEW12_ARB: - case GL_MODELVIEW13_ARB: - case GL_MODELVIEW14_ARB: - case GL_MODELVIEW15_ARB: - case GL_MODELVIEW16_ARB: - case GL_MODELVIEW17_ARB: - case GL_MODELVIEW18_ARB: - case GL_MODELVIEW19_ARB: - case GL_MODELVIEW20_ARB: - case GL_MODELVIEW21_ARB: - case GL_MODELVIEW22_ARB: - case GL_MODELVIEW23_ARB: - case GL_MODELVIEW24_ARB: - case GL_MODELVIEW25_ARB: - case GL_MODELVIEW26_ARB: - case GL_MODELVIEW27_ARB: - case GL_MODELVIEW28_ARB: - case GL_MODELVIEW29_ARB: - case GL_MODELVIEW30_ARB: - case GL_MODELVIEW31_ARB: - case GL_TRANSPOSE_CURRENT_MATRIX_ARB: - return 16; - case GL_FOG_COORDINATE_SOURCE: - case GL_COMPRESSED_TEXTURE_FORMATS: - return __glGetBooleanv_variable_size( e ); - default: return 0; + case GL_CURRENT_SECONDARY_COLOR: + return 4; + case GL_MODELVIEW_MATRIX: + case GL_PROJECTION_MATRIX: + case GL_TEXTURE_MATRIX: + case GL_MODELVIEW0_ARB: + case GL_COLOR_MATRIX: + case GL_MODELVIEW1_ARB: + case GL_CURRENT_MATRIX_ARB: + case GL_MODELVIEW2_ARB: + case GL_MODELVIEW3_ARB: + case GL_MODELVIEW4_ARB: + case GL_MODELVIEW5_ARB: + case GL_MODELVIEW6_ARB: + case GL_MODELVIEW7_ARB: + case GL_MODELVIEW8_ARB: + case GL_MODELVIEW9_ARB: + case GL_MODELVIEW10_ARB: + case GL_MODELVIEW11_ARB: + case GL_MODELVIEW12_ARB: + case GL_MODELVIEW13_ARB: + case GL_MODELVIEW14_ARB: + case GL_MODELVIEW15_ARB: + case GL_MODELVIEW16_ARB: + case GL_MODELVIEW17_ARB: + case GL_MODELVIEW18_ARB: + case GL_MODELVIEW19_ARB: + case GL_MODELVIEW20_ARB: + case GL_MODELVIEW21_ARB: + case GL_MODELVIEW22_ARB: + case GL_MODELVIEW23_ARB: + case GL_MODELVIEW24_ARB: + case GL_MODELVIEW25_ARB: + case GL_MODELVIEW26_ARB: + case GL_MODELVIEW27_ARB: + case GL_MODELVIEW28_ARB: + case GL_MODELVIEW29_ARB: + case GL_MODELVIEW30_ARB: + case GL_MODELVIEW31_ARB: + case GL_TRANSPOSE_CURRENT_MATRIX_ARB: + return 16; + case GL_FOG_COORDINATE_SOURCE: + case GL_COMPRESSED_TEXTURE_FORMATS: + return __glGetBooleanv_variable_size(e); + default: + return 0; } } INTERNAL PURE FASTCALL GLint -__glGetTexParameterfv_size( GLenum e ) +__glGetTexParameterfv_size(GLenum e) { - switch( e ) { - case GL_TEXTURE_MAG_FILTER: - case GL_TEXTURE_MIN_FILTER: - case GL_TEXTURE_WRAP_S: - case GL_TEXTURE_WRAP_T: - case GL_TEXTURE_PRIORITY: - case GL_TEXTURE_RESIDENT: - case GL_TEXTURE_WRAP_R: - case GL_TEXTURE_COMPARE_FAIL_VALUE_ARB: + switch (e) { + case GL_TEXTURE_MAG_FILTER: + case GL_TEXTURE_MIN_FILTER: + case GL_TEXTURE_WRAP_S: + case GL_TEXTURE_WRAP_T: + case GL_TEXTURE_PRIORITY: + case GL_TEXTURE_RESIDENT: + case GL_TEXTURE_WRAP_R: + case GL_TEXTURE_COMPARE_FAIL_VALUE_ARB: /* case GL_SHADOW_AMBIENT_SGIX:*/ - case GL_TEXTURE_MIN_LOD: - case GL_TEXTURE_MAX_LOD: - case GL_TEXTURE_BASE_LEVEL: - case GL_TEXTURE_MAX_LEVEL: - case GL_TEXTURE_CLIPMAP_FRAME_SGIX: - case GL_TEXTURE_LOD_BIAS_S_SGIX: - case GL_TEXTURE_LOD_BIAS_T_SGIX: - case GL_TEXTURE_LOD_BIAS_R_SGIX: - case GL_GENERATE_MIPMAP: + case GL_TEXTURE_MIN_LOD: + case GL_TEXTURE_MAX_LOD: + case GL_TEXTURE_BASE_LEVEL: + case GL_TEXTURE_MAX_LEVEL: + case GL_TEXTURE_CLIPMAP_FRAME_SGIX: + case GL_TEXTURE_LOD_BIAS_S_SGIX: + case GL_TEXTURE_LOD_BIAS_T_SGIX: + case GL_TEXTURE_LOD_BIAS_R_SGIX: + case GL_GENERATE_MIPMAP: /* case GL_GENERATE_MIPMAP_SGIS:*/ - case GL_TEXTURE_COMPARE_SGIX: - case GL_TEXTURE_COMPARE_OPERATOR_SGIX: - case GL_TEXTURE_MAX_CLAMP_S_SGIX: - case GL_TEXTURE_MAX_CLAMP_T_SGIX: - case GL_TEXTURE_MAX_CLAMP_R_SGIX: - case GL_TEXTURE_MAX_ANISOTROPY_EXT: - case GL_TEXTURE_LOD_BIAS: + case GL_TEXTURE_COMPARE_SGIX: + case GL_TEXTURE_COMPARE_OPERATOR_SGIX: + case GL_TEXTURE_MAX_CLAMP_S_SGIX: + case GL_TEXTURE_MAX_CLAMP_T_SGIX: + case GL_TEXTURE_MAX_CLAMP_R_SGIX: + case GL_TEXTURE_MAX_ANISOTROPY_EXT: + case GL_TEXTURE_LOD_BIAS: /* case GL_TEXTURE_LOD_BIAS_EXT:*/ - case GL_DEPTH_TEXTURE_MODE: + case GL_DEPTH_TEXTURE_MODE: /* case GL_DEPTH_TEXTURE_MODE_ARB:*/ - case GL_TEXTURE_COMPARE_MODE: + case GL_TEXTURE_COMPARE_MODE: /* case GL_TEXTURE_COMPARE_MODE_ARB:*/ - case GL_TEXTURE_COMPARE_FUNC: + case GL_TEXTURE_COMPARE_FUNC: /* case GL_TEXTURE_COMPARE_FUNC_ARB:*/ - case GL_TEXTURE_UNSIGNED_REMAP_MODE_NV: - return 1; - case GL_TEXTURE_CLIPMAP_CENTER_SGIX: - case GL_TEXTURE_CLIPMAP_OFFSET_SGIX: - return 2; - case GL_TEXTURE_CLIPMAP_VIRTUAL_DEPTH_SGIX: - return 3; - case GL_TEXTURE_BORDER_COLOR: - case GL_POST_TEXTURE_FILTER_BIAS_SGIX: - case GL_POST_TEXTURE_FILTER_SCALE_SGIX: - return 4; - default: return 0; + case GL_TEXTURE_UNSIGNED_REMAP_MODE_NV: + return 1; + case GL_TEXTURE_CLIPMAP_CENTER_SGIX: + case GL_TEXTURE_CLIPMAP_OFFSET_SGIX: + return 2; + case GL_TEXTURE_CLIPMAP_VIRTUAL_DEPTH_SGIX: + return 3; + case GL_TEXTURE_BORDER_COLOR: + case GL_POST_TEXTURE_FILTER_BIAS_SGIX: + case GL_POST_TEXTURE_FILTER_SCALE_SGIX: + return 4; + default: + return 0; } } INTERNAL PURE FASTCALL GLint -__glGetTexLevelParameterfv_size( GLenum e ) +__glGetTexLevelParameterfv_size(GLenum e) { - switch( e ) { - case GL_TEXTURE_WIDTH: - case GL_TEXTURE_HEIGHT: - case GL_TEXTURE_COMPONENTS: - case GL_TEXTURE_BORDER: - case GL_TEXTURE_RED_SIZE: + switch (e) { + case GL_TEXTURE_WIDTH: + case GL_TEXTURE_HEIGHT: + case GL_TEXTURE_COMPONENTS: + case GL_TEXTURE_BORDER: + case GL_TEXTURE_RED_SIZE: /* case GL_TEXTURE_RED_SIZE_EXT:*/ - case GL_TEXTURE_GREEN_SIZE: + case GL_TEXTURE_GREEN_SIZE: /* case GL_TEXTURE_GREEN_SIZE_EXT:*/ - case GL_TEXTURE_BLUE_SIZE: + case GL_TEXTURE_BLUE_SIZE: /* case GL_TEXTURE_BLUE_SIZE_EXT:*/ - case GL_TEXTURE_ALPHA_SIZE: + case GL_TEXTURE_ALPHA_SIZE: /* case GL_TEXTURE_ALPHA_SIZE_EXT:*/ - case GL_TEXTURE_LUMINANCE_SIZE: + case GL_TEXTURE_LUMINANCE_SIZE: /* case GL_TEXTURE_LUMINANCE_SIZE_EXT:*/ - case GL_TEXTURE_INTENSITY_SIZE: + case GL_TEXTURE_INTENSITY_SIZE: /* case GL_TEXTURE_INTENSITY_SIZE_EXT:*/ - case GL_TEXTURE_DEPTH: - case GL_TEXTURE_INDEX_SIZE_EXT: - case GL_TEXTURE_COMPRESSED_IMAGE_SIZE: + case GL_TEXTURE_DEPTH: + case GL_TEXTURE_INDEX_SIZE_EXT: + case GL_TEXTURE_COMPRESSED_IMAGE_SIZE: /* case GL_TEXTURE_COMPRESSED_IMAGE_SIZE_ARB:*/ - case GL_TEXTURE_COMPRESSED: + case GL_TEXTURE_COMPRESSED: /* case GL_TEXTURE_COMPRESSED_ARB:*/ - case GL_TEXTURE_DEPTH_SIZE: + case GL_TEXTURE_DEPTH_SIZE: /* case GL_TEXTURE_DEPTH_SIZE_ARB:*/ - return 1; - default: return 0; + return 1; + default: + return 0; } } INTERNAL PURE FASTCALL GLint -__glColorTableParameterfv_size( GLenum e ) +__glColorTableParameterfv_size(GLenum e) { - switch( e ) { - case GL_COLOR_TABLE_SCALE: - case GL_COLOR_TABLE_BIAS: - return 4; - default: return 0; + switch (e) { + case GL_COLOR_TABLE_SCALE: + case GL_COLOR_TABLE_BIAS: + return 4; + default: + return 0; } } INTERNAL PURE FASTCALL GLint -__glGetColorTableParameterfv_size( GLenum e ) +__glGetColorTableParameterfv_size(GLenum e) { - switch( e ) { - case GL_COLOR_TABLE_FORMAT: + switch (e) { + case GL_COLOR_TABLE_FORMAT: /* case GL_COLOR_TABLE_FORMAT_EXT:*/ - case GL_COLOR_TABLE_WIDTH: + case GL_COLOR_TABLE_WIDTH: /* case GL_COLOR_TABLE_WIDTH_EXT:*/ - case GL_COLOR_TABLE_RED_SIZE: + case GL_COLOR_TABLE_RED_SIZE: /* case GL_COLOR_TABLE_RED_SIZE_EXT:*/ - case GL_COLOR_TABLE_GREEN_SIZE: + case GL_COLOR_TABLE_GREEN_SIZE: /* case GL_COLOR_TABLE_GREEN_SIZE_EXT:*/ - case GL_COLOR_TABLE_BLUE_SIZE: + case GL_COLOR_TABLE_BLUE_SIZE: /* case GL_COLOR_TABLE_BLUE_SIZE_EXT:*/ - case GL_COLOR_TABLE_ALPHA_SIZE: + case GL_COLOR_TABLE_ALPHA_SIZE: /* case GL_COLOR_TABLE_ALPHA_SIZE_EXT:*/ - case GL_COLOR_TABLE_LUMINANCE_SIZE: + case GL_COLOR_TABLE_LUMINANCE_SIZE: /* case GL_COLOR_TABLE_LUMINANCE_SIZE_EXT:*/ - case GL_COLOR_TABLE_INTENSITY_SIZE: + case GL_COLOR_TABLE_INTENSITY_SIZE: /* case GL_COLOR_TABLE_INTENSITY_SIZE_EXT:*/ - return 1; - case GL_COLOR_TABLE_SCALE: - case GL_COLOR_TABLE_BIAS: - return 4; - default: return 0; + return 1; + case GL_COLOR_TABLE_SCALE: + case GL_COLOR_TABLE_BIAS: + return 4; + default: + return 0; } } INTERNAL PURE FASTCALL GLint -__glConvolutionParameterfv_size( GLenum e ) +__glConvolutionParameterfv_size(GLenum e) { - switch( e ) { - case GL_CONVOLUTION_BORDER_MODE: + switch (e) { + case GL_CONVOLUTION_BORDER_MODE: /* case GL_CONVOLUTION_BORDER_MODE_EXT:*/ - return 1; - case GL_CONVOLUTION_FILTER_SCALE: + return 1; + case GL_CONVOLUTION_FILTER_SCALE: /* case GL_CONVOLUTION_FILTER_SCALE_EXT:*/ - case GL_CONVOLUTION_FILTER_BIAS: + case GL_CONVOLUTION_FILTER_BIAS: /* case GL_CONVOLUTION_FILTER_BIAS_EXT:*/ - case GL_CONVOLUTION_BORDER_COLOR: + case GL_CONVOLUTION_BORDER_COLOR: /* case GL_CONVOLUTION_BORDER_COLOR_HP:*/ - return 4; - default: return 0; + return 4; + default: + return 0; } } INTERNAL PURE FASTCALL GLint -__glGetConvolutionParameterfv_size( GLenum e ) +__glGetConvolutionParameterfv_size(GLenum e) { - switch( e ) { - case GL_CONVOLUTION_BORDER_MODE: + switch (e) { + case GL_CONVOLUTION_BORDER_MODE: /* case GL_CONVOLUTION_BORDER_MODE_EXT:*/ - case GL_CONVOLUTION_FORMAT: + case GL_CONVOLUTION_FORMAT: /* case GL_CONVOLUTION_FORMAT_EXT:*/ - case GL_CONVOLUTION_WIDTH: + case GL_CONVOLUTION_WIDTH: /* case GL_CONVOLUTION_WIDTH_EXT:*/ - case GL_CONVOLUTION_HEIGHT: + case GL_CONVOLUTION_HEIGHT: /* case GL_CONVOLUTION_HEIGHT_EXT:*/ - case GL_MAX_CONVOLUTION_WIDTH: + case GL_MAX_CONVOLUTION_WIDTH: /* case GL_MAX_CONVOLUTION_WIDTH_EXT:*/ - case GL_MAX_CONVOLUTION_HEIGHT: + case GL_MAX_CONVOLUTION_HEIGHT: /* case GL_MAX_CONVOLUTION_HEIGHT_EXT:*/ - return 1; - case GL_CONVOLUTION_FILTER_SCALE: + return 1; + case GL_CONVOLUTION_FILTER_SCALE: /* case GL_CONVOLUTION_FILTER_SCALE_EXT:*/ - case GL_CONVOLUTION_FILTER_BIAS: + case GL_CONVOLUTION_FILTER_BIAS: /* case GL_CONVOLUTION_FILTER_BIAS_EXT:*/ - case GL_CONVOLUTION_BORDER_COLOR: + case GL_CONVOLUTION_BORDER_COLOR: /* case GL_CONVOLUTION_BORDER_COLOR_HP:*/ - return 4; - default: return 0; + return 4; + default: + return 0; } } INTERNAL PURE FASTCALL GLint -__glGetHistogramParameterfv_size( GLenum e ) +__glGetHistogramParameterfv_size(GLenum e) { - switch( e ) { - case GL_HISTOGRAM_WIDTH: - case GL_HISTOGRAM_FORMAT: - case GL_HISTOGRAM_RED_SIZE: - case GL_HISTOGRAM_GREEN_SIZE: - case GL_HISTOGRAM_BLUE_SIZE: - case GL_HISTOGRAM_ALPHA_SIZE: - case GL_HISTOGRAM_LUMINANCE_SIZE: - case GL_HISTOGRAM_SINK: - return 1; - default: return 0; + switch (e) { + case GL_HISTOGRAM_WIDTH: + case GL_HISTOGRAM_FORMAT: + case GL_HISTOGRAM_RED_SIZE: + case GL_HISTOGRAM_GREEN_SIZE: + case GL_HISTOGRAM_BLUE_SIZE: + case GL_HISTOGRAM_ALPHA_SIZE: + case GL_HISTOGRAM_LUMINANCE_SIZE: + case GL_HISTOGRAM_SINK: + return 1; + default: + return 0; } } INTERNAL PURE FASTCALL GLint -__glGetMinmaxParameterfv_size( GLenum e ) +__glGetMinmaxParameterfv_size(GLenum e) { - switch( e ) { - case GL_MINMAX_FORMAT: - case GL_MINMAX_SINK: - return 1; - default: return 0; + switch (e) { + case GL_MINMAX_FORMAT: + case GL_MINMAX_SINK: + return 1; + default: + return 0; } } INTERNAL PURE FASTCALL GLint -__glPointParameterfvEXT_size( GLenum e ) +__glGetProgramivARB_size(GLenum e) { - switch( e ) { - case GL_POINT_SIZE_MIN: + switch (e) { + case GL_PROGRAM_LENGTH_ARB: + case GL_PROGRAM_BINDING_ARB: + case GL_PROGRAM_ALU_INSTRUCTIONS_ARB: + case GL_PROGRAM_TEX_INSTRUCTIONS_ARB: + case GL_PROGRAM_TEX_INDIRECTIONS_ARB: + case GL_PROGRAM_NATIVE_ALU_INSTRUCTIONS_ARB: + case GL_PROGRAM_NATIVE_TEX_INSTRUCTIONS_ARB: + case GL_PROGRAM_NATIVE_TEX_INDIRECTIONS_ARB: + case GL_MAX_PROGRAM_ALU_INSTRUCTIONS_ARB: + case GL_MAX_PROGRAM_TEX_INSTRUCTIONS_ARB: + case GL_MAX_PROGRAM_TEX_INDIRECTIONS_ARB: + case GL_MAX_PROGRAM_NATIVE_ALU_INSTRUCTIONS_ARB: + case GL_MAX_PROGRAM_NATIVE_TEX_INSTRUCTIONS_ARB: + case GL_MAX_PROGRAM_NATIVE_TEX_INDIRECTIONS_ARB: + case GL_MAX_TEXTURE_COORDS_ARB: + case GL_MAX_TEXTURE_IMAGE_UNITS_ARB: + case GL_PROGRAM_FORMAT_ARB: + case GL_PROGRAM_INSTRUCTIONS_ARB: + case GL_MAX_PROGRAM_INSTRUCTIONS_ARB: + case GL_PROGRAM_NATIVE_INSTRUCTIONS_ARB: + case GL_MAX_PROGRAM_NATIVE_INSTRUCTIONS_ARB: + case GL_PROGRAM_TEMPORARIES_ARB: + case GL_MAX_PROGRAM_TEMPORARIES_ARB: + case GL_PROGRAM_NATIVE_TEMPORARIES_ARB: + case GL_MAX_PROGRAM_NATIVE_TEMPORARIES_ARB: + case GL_PROGRAM_PARAMETERS_ARB: + case GL_MAX_PROGRAM_PARAMETERS_ARB: + case GL_PROGRAM_NATIVE_PARAMETERS_ARB: + case GL_MAX_PROGRAM_NATIVE_PARAMETERS_ARB: + case GL_PROGRAM_ATTRIBS_ARB: + case GL_MAX_PROGRAM_ATTRIBS_ARB: + case GL_PROGRAM_NATIVE_ATTRIBS_ARB: + case GL_MAX_PROGRAM_NATIVE_ATTRIBS_ARB: + case GL_PROGRAM_ADDRESS_REGISTERS_ARB: + case GL_MAX_PROGRAM_ADDRESS_REGISTERS_ARB: + case GL_PROGRAM_NATIVE_ADDRESS_REGISTERS_ARB: + case GL_MAX_PROGRAM_NATIVE_ADDRESS_REGISTERS_ARB: + case GL_MAX_PROGRAM_LOCAL_PARAMETERS_ARB: + case GL_MAX_PROGRAM_ENV_PARAMETERS_ARB: + case GL_PROGRAM_UNDER_NATIVE_LIMITS_ARB: + case GL_MAX_PROGRAM_EXEC_INSTRUCTIONS_NV: + case GL_MAX_PROGRAM_CALL_DEPTH_NV: + case GL_MAX_PROGRAM_IF_DEPTH_NV: + case GL_MAX_PROGRAM_LOOP_DEPTH_NV: + case GL_MAX_PROGRAM_LOOP_COUNT_NV: + return 1; + default: + return 0; + } +} + +INTERNAL PURE FASTCALL GLint +__glGetVertexAttribdvARB_size(GLenum e) +{ + switch (e) { + case GL_VERTEX_PROGRAM_ARB: + case GL_VERTEX_ATTRIB_ARRAY_ENABLED_ARB: + case GL_VERTEX_ATTRIB_ARRAY_SIZE_ARB: + case GL_VERTEX_ATTRIB_ARRAY_STRIDE_ARB: + case GL_VERTEX_ATTRIB_ARRAY_TYPE_ARB: + case GL_CURRENT_VERTEX_ATTRIB_ARB: + return 1; + default: + return 0; + } +} + +INTERNAL PURE FASTCALL GLint +__glGetQueryObjectivARB_size(GLenum e) +{ + switch (e) { + case GL_QUERY_RESULT_ARB: + case GL_QUERY_RESULT_AVAILABLE_ARB: + return 1; + default: + return 0; + } +} + +INTERNAL PURE FASTCALL GLint +__glGetQueryivARB_size(GLenum e) +{ + switch (e) { + case GL_QUERY_COUNTER_BITS_ARB: + case GL_CURRENT_QUERY_ARB: + return 1; + default: + return 0; + } +} + +INTERNAL PURE FASTCALL GLint +__glPointParameterfvEXT_size(GLenum e) +{ + switch (e) { + case GL_POINT_SIZE_MIN: /* case GL_POINT_SIZE_MIN_ARB:*/ /* case GL_POINT_SIZE_MIN_SGIS:*/ - case GL_POINT_SIZE_MAX: + case GL_POINT_SIZE_MAX: /* case GL_POINT_SIZE_MAX_ARB:*/ /* case GL_POINT_SIZE_MAX_SGIS:*/ - case GL_POINT_FADE_THRESHOLD_SIZE: + case GL_POINT_FADE_THRESHOLD_SIZE: /* case GL_POINT_FADE_THRESHOLD_SIZE_ARB:*/ /* case GL_POINT_FADE_THRESHOLD_SIZE_SGIS:*/ - case GL_POINT_SPRITE_R_MODE_NV: - case GL_POINT_SPRITE_COORD_ORIGIN: - return 1; - case GL_POINT_DISTANCE_ATTENUATION: + case GL_POINT_SPRITE_R_MODE_NV: + case GL_POINT_SPRITE_COORD_ORIGIN: + return 1; + case GL_POINT_DISTANCE_ATTENUATION: /* case GL_POINT_DISTANCE_ATTENUATION_ARB:*/ /* case GL_POINT_DISTANCE_ATTENUATION_SGIS:*/ - return 3; - default: return 0; + return 3; + default: + return 0; } } INTERNAL PURE FASTCALL GLint -__glGetProgramivNV_size( GLenum e ) +__glGetProgramivNV_size(GLenum e) { - switch( e ) { - case GL_PROGRAM_LENGTH_NV: - case GL_PROGRAM_TARGET_NV: - case GL_PROGRAM_RESIDENT_NV: - return 1; - default: return 0; + switch (e) { + case GL_PROGRAM_LENGTH_NV: + case GL_PROGRAM_TARGET_NV: + case GL_PROGRAM_RESIDENT_NV: + return 1; + default: + return 0; } } INTERNAL PURE FASTCALL GLint -__glGetVertexAttribdvARB_size( GLenum e ) +__glGetVertexAttribdvNV_size(GLenum e) { - switch( e ) { - case GL_VERTEX_PROGRAM_ARB: - case GL_VERTEX_ATTRIB_ARRAY_ENABLED_ARB: - case GL_VERTEX_ATTRIB_ARRAY_SIZE_ARB: - case GL_VERTEX_ATTRIB_ARRAY_STRIDE_ARB: - case GL_VERTEX_ATTRIB_ARRAY_TYPE_ARB: - case GL_CURRENT_VERTEX_ATTRIB_ARB: - return 1; - default: return 0; + switch (e) { + case GL_ATTRIB_ARRAY_SIZE_NV: + case GL_ATTRIB_ARRAY_STRIDE_NV: + case GL_ATTRIB_ARRAY_TYPE_NV: + case GL_CURRENT_ATTRIB_NV: + return 1; + default: + return 0; } } INTERNAL PURE FASTCALL GLint -__glGetProgramivARB_size( GLenum e ) +__glGetFramebufferAttachmentParameterivEXT_size(GLenum e) { - switch( e ) { - case GL_PROGRAM_LENGTH_ARB: - case GL_PROGRAM_BINDING_ARB: - case GL_PROGRAM_ALU_INSTRUCTIONS_ARB: - case GL_PROGRAM_TEX_INSTRUCTIONS_ARB: - case GL_PROGRAM_TEX_INDIRECTIONS_ARB: - case GL_PROGRAM_NATIVE_ALU_INSTRUCTIONS_ARB: - case GL_PROGRAM_NATIVE_TEX_INSTRUCTIONS_ARB: - case GL_PROGRAM_NATIVE_TEX_INDIRECTIONS_ARB: - case GL_MAX_PROGRAM_ALU_INSTRUCTIONS_ARB: - case GL_MAX_PROGRAM_TEX_INSTRUCTIONS_ARB: - case GL_MAX_PROGRAM_TEX_INDIRECTIONS_ARB: - case GL_MAX_PROGRAM_NATIVE_ALU_INSTRUCTIONS_ARB: - case GL_MAX_PROGRAM_NATIVE_TEX_INSTRUCTIONS_ARB: - case GL_MAX_PROGRAM_NATIVE_TEX_INDIRECTIONS_ARB: - case GL_MAX_TEXTURE_COORDS_ARB: - case GL_MAX_TEXTURE_IMAGE_UNITS_ARB: - case GL_PROGRAM_FORMAT_ARB: - case GL_PROGRAM_INSTRUCTIONS_ARB: - case GL_MAX_PROGRAM_INSTRUCTIONS_ARB: - case GL_PROGRAM_NATIVE_INSTRUCTIONS_ARB: - case GL_MAX_PROGRAM_NATIVE_INSTRUCTIONS_ARB: - case GL_PROGRAM_TEMPORARIES_ARB: - case GL_MAX_PROGRAM_TEMPORARIES_ARB: - case GL_PROGRAM_NATIVE_TEMPORARIES_ARB: - case GL_MAX_PROGRAM_NATIVE_TEMPORARIES_ARB: - case GL_PROGRAM_PARAMETERS_ARB: - case GL_MAX_PROGRAM_PARAMETERS_ARB: - case GL_PROGRAM_NATIVE_PARAMETERS_ARB: - case GL_MAX_PROGRAM_NATIVE_PARAMETERS_ARB: - case GL_PROGRAM_ATTRIBS_ARB: - case GL_MAX_PROGRAM_ATTRIBS_ARB: - case GL_PROGRAM_NATIVE_ATTRIBS_ARB: - case GL_MAX_PROGRAM_NATIVE_ATTRIBS_ARB: - case GL_PROGRAM_ADDRESS_REGISTERS_ARB: - case GL_MAX_PROGRAM_ADDRESS_REGISTERS_ARB: - case GL_PROGRAM_NATIVE_ADDRESS_REGISTERS_ARB: - case GL_MAX_PROGRAM_NATIVE_ADDRESS_REGISTERS_ARB: - case GL_MAX_PROGRAM_LOCAL_PARAMETERS_ARB: - case GL_MAX_PROGRAM_ENV_PARAMETERS_ARB: - case GL_PROGRAM_UNDER_NATIVE_LIMITS_ARB: - case GL_MAX_PROGRAM_EXEC_INSTRUCTIONS_NV: - case GL_MAX_PROGRAM_CALL_DEPTH_NV: - case GL_MAX_PROGRAM_IF_DEPTH_NV: - case GL_MAX_PROGRAM_LOOP_DEPTH_NV: - case GL_MAX_PROGRAM_LOOP_COUNT_NV: - return 1; - default: return 0; + switch (e) { + case GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE_EXT: + case GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME_EXT: + case GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL_EXT: + case GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE_EXT: + case GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_3D_ZOFFSET_EXT: + return 1; + default: + return 0; } } -INTERNAL PURE FASTCALL GLint -__glGetQueryivARB_size( GLenum e ) -{ - switch( e ) { - case GL_QUERY_COUNTER_BITS_ARB: - case GL_CURRENT_QUERY_ARB: - return 1; - default: return 0; - } -} - -INTERNAL PURE FASTCALL GLint -__glGetQueryObjectivARB_size( GLenum e ) -{ - switch( e ) { - case GL_QUERY_RESULT_ARB: - case GL_QUERY_RESULT_AVAILABLE_ARB: - return 1; - default: return 0; - } -} - -INTERNAL PURE FASTCALL GLint -__glGetVertexAttribdvNV_size( GLenum e ) -{ - switch( e ) { - case GL_ATTRIB_ARRAY_SIZE_NV: - case GL_ATTRIB_ARRAY_STRIDE_NV: - case GL_ATTRIB_ARRAY_TYPE_NV: - case GL_CURRENT_ATTRIB_NV: - return 1; - default: return 0; - } -} - -INTERNAL PURE FASTCALL GLint -__glGetFramebufferAttachmentParameterivEXT_size( GLenum e ) -{ - switch( e ) { - case GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE_EXT: - case GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME_EXT: - case GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL_EXT: - case GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE_EXT: - case GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_3D_ZOFFSET_EXT: - return 1; - default: return 0; - } -} - -ALIAS( Fogiv, Fogfv ) -ALIAS( Lightiv, Lightfv ) -ALIAS( LightModeliv, LightModelfv ) -ALIAS( Materialiv, Materialfv ) -ALIAS( TexParameteriv, TexParameterfv ) -ALIAS( TexEnviv, TexEnvfv ) -ALIAS( TexGenfv, TexGendv ) -ALIAS( TexGeniv, TexGendv ) -ALIAS( Map1f, Map1d ) -ALIAS( Map2f, Map2d ) -ALIAS( GetDoublev, GetBooleanv ) -ALIAS( GetFloatv, GetBooleanv ) -ALIAS( GetIntegerv, GetBooleanv ) -ALIAS( GetLightfv, Lightfv ) -ALIAS( GetLightiv, Lightfv ) -ALIAS( GetMaterialfv, Materialfv ) -ALIAS( GetMaterialiv, Materialfv ) -ALIAS( GetTexEnvfv, TexEnvfv ) -ALIAS( GetTexEnviv, TexEnvfv ) -ALIAS( GetTexGendv, TexGendv ) -ALIAS( GetTexGenfv, TexGendv ) -ALIAS( GetTexGeniv, TexGendv ) -ALIAS( GetTexParameteriv, GetTexParameterfv ) -ALIAS( GetTexLevelParameteriv, GetTexLevelParameterfv ) -ALIAS( ColorTableParameteriv, ColorTableParameterfv ) -ALIAS( GetColorTableParameteriv, GetColorTableParameterfv ) -ALIAS( ConvolutionParameteriv, ConvolutionParameterfv ) -ALIAS( GetConvolutionParameteriv, GetConvolutionParameterfv ) -ALIAS( GetHistogramParameteriv, GetHistogramParameterfv ) -ALIAS( GetMinmaxParameteriv, GetMinmaxParameterfv ) -ALIAS( GetVertexAttribfvARB, GetVertexAttribdvARB ) -ALIAS( GetVertexAttribivARB, GetVertexAttribdvARB ) -ALIAS( PointParameterivNV, PointParameterfvEXT ) -ALIAS( GetQueryObjectuivARB, GetQueryObjectivARB ) -ALIAS( GetVertexAttribfvNV, GetVertexAttribdvNV ) -ALIAS( GetVertexAttribivNV, GetVertexAttribdvNV ) - +ALIAS(Fogiv, Fogfv) + ALIAS(Lightiv, Lightfv) + ALIAS(LightModeliv, LightModelfv) + ALIAS(Materialiv, Materialfv) + ALIAS(TexParameteriv, TexParameterfv) + ALIAS(TexEnviv, TexEnvfv) + ALIAS(TexGenfv, TexGendv) + ALIAS(TexGeniv, TexGendv) + ALIAS(Map1f, Map1d) + ALIAS(Map2f, Map2d) + ALIAS(GetDoublev, GetBooleanv) + ALIAS(GetFloatv, GetBooleanv) + ALIAS(GetIntegerv, GetBooleanv) + ALIAS(GetLightfv, Lightfv) + ALIAS(GetLightiv, Lightfv) + ALIAS(GetMaterialfv, Materialfv) + ALIAS(GetMaterialiv, Materialfv) + ALIAS(GetTexEnvfv, TexEnvfv) + ALIAS(GetTexEnviv, TexEnvfv) + ALIAS(GetTexGendv, TexGendv) + ALIAS(GetTexGenfv, TexGendv) + ALIAS(GetTexGeniv, TexGendv) + ALIAS(GetTexParameteriv, GetTexParameterfv) + ALIAS(GetTexLevelParameteriv, GetTexLevelParameterfv) + ALIAS(ColorTableParameteriv, ColorTableParameterfv) + ALIAS(GetColorTableParameteriv, GetColorTableParameterfv) + ALIAS(ConvolutionParameteriv, ConvolutionParameterfv) + ALIAS(GetConvolutionParameteriv, GetConvolutionParameterfv) + ALIAS(GetHistogramParameteriv, GetHistogramParameterfv) + ALIAS(GetMinmaxParameteriv, GetMinmaxParameterfv) + ALIAS(GetVertexAttribfvARB, GetVertexAttribdvARB) + ALIAS(GetVertexAttribivARB, GetVertexAttribdvARB) + ALIAS(GetQueryObjectuivARB, GetQueryObjectivARB) + ALIAS(GetVertexAttribfvNV, GetVertexAttribdvNV) + ALIAS(GetVertexAttribivNV, GetVertexAttribdvNV) + ALIAS(PointParameterivNV, PointParameterfvEXT) # undef PURE # undef FASTCALL # undef INTERNAL diff --git a/GL/glx/indirect_size_get.h b/GL/glx/indirect_size_get.h index 5329d41bf..4fcb55b4e 100644 --- a/GL/glx/indirect_size_get.h +++ b/GL/glx/indirect_size_get.h @@ -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 diff --git a/GL/glx/indirect_table.c b/GL/glx/indirect_table.c new file mode 100644 index 000000000..60d676064 --- /dev/null +++ b/GL/glx/indirect_table.c @@ -0,0 +1,1593 @@ +/* DO NOT EDIT - This file generated automatically by glX_server_table.py (from Mesa) script */ + +/* + * (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. + */ + +#include +#include "glxserver.h" +#include "glxext.h" +#include "indirect_dispatch.h" +#include "indirect_reqsize.h" +#include "g_disptab.h" +#include "indirect_table.h" + +/*****************************************************************/ +/* tree depth = 3 */ +static const int_fast16_t Single_dispatch_tree[24] = { + /* [0] -> opcode range [0, 256], node depth 1 */ + 2, + 5, + 13, + 16, + EMPTY_LEAF, + + /* [5] -> opcode range [0, 64], node depth 2 */ + 2, + LEAF(0), + LEAF(16), + 10, + EMPTY_LEAF, + + /* [10] -> opcode range [32, 48], node depth 3 */ + 1, + LEAF(32), + EMPTY_LEAF, + + /* [13] -> opcode range [64, 128], node depth 2 */ + 1, + EMPTY_LEAF, + LEAF(40), + + /* [16] -> opcode range [128, 192], node depth 2 */ + 2, + LEAF(72), + LEAF(88), + 21, + EMPTY_LEAF, + + /* [21] -> opcode range [160, 176], node depth 3 */ + 1, + LEAF(104), + EMPTY_LEAF, + +}; + +static const void *Single_function_table[112][2] = { + /* [ 0] = 0 */ {NULL, NULL}, + /* [ 1] = 1 */ {__glXDisp_Render, __glXDispSwap_Render}, + /* [ 2] = 2 */ {__glXDisp_RenderLarge, __glXDispSwap_RenderLarge}, + /* [ 3] = 3 */ {__glXDisp_CreateContext, __glXDispSwap_CreateContext}, + /* [ 4] = 4 */ {__glXDisp_DestroyContext, __glXDispSwap_DestroyContext}, + /* [ 5] = 5 */ {__glXDisp_MakeCurrent, __glXDispSwap_MakeCurrent}, + /* [ 6] = 6 */ {__glXDisp_IsDirect, __glXDispSwap_IsDirect}, + /* [ 7] = 7 */ {__glXDisp_QueryVersion, __glXDispSwap_QueryVersion}, + /* [ 8] = 8 */ {__glXDisp_WaitGL, __glXDispSwap_WaitGL}, + /* [ 9] = 9 */ {__glXDisp_WaitX, __glXDispSwap_WaitX}, + /* [ 10] = 10 */ {__glXDisp_CopyContext, __glXDispSwap_CopyContext}, + /* [ 11] = 11 */ {__glXDisp_SwapBuffers, __glXDispSwap_SwapBuffers}, + /* [ 12] = 12 */ {__glXDisp_UseXFont, __glXDispSwap_UseXFont}, + /* [ 13] = 13 */ {__glXDisp_CreateGLXPixmap, __glXDispSwap_CreateGLXPixmap}, + /* [ 14] = 14 */ {__glXDisp_GetVisualConfigs, __glXDispSwap_GetVisualConfigs}, + /* [ 15] = 15 */ {__glXDisp_DestroyGLXPixmap, __glXDispSwap_DestroyGLXPixmap}, + /* [ 16] = 16 */ {__glXDisp_VendorPrivate, __glXDispSwap_VendorPrivate}, + /* [ 17] = 17 */ {__glXDisp_VendorPrivateWithReply, __glXDispSwap_VendorPrivateWithReply}, + /* [ 18] = 18 */ {__glXDisp_QueryExtensionsString, __glXDispSwap_QueryExtensionsString}, + /* [ 19] = 19 */ {__glXDisp_QueryServerString, __glXDispSwap_QueryServerString}, + /* [ 20] = 20 */ {__glXDisp_ClientInfo, __glXDispSwap_ClientInfo}, + /* [ 21] = 21 */ {__glXDisp_GetFBConfigs, __glXDispSwap_GetFBConfigs}, + /* [ 22] = 22 */ {__glXDisp_CreatePixmap, __glXDispSwap_CreatePixmap}, + /* [ 23] = 23 */ {__glXDisp_DestroyPixmap, __glXDispSwap_DestroyPixmap}, + /* [ 24] = 24 */ {__glXDisp_CreateNewContext, __glXDispSwap_CreateNewContext}, + /* [ 25] = 25 */ {__glXDisp_QueryContext, __glXDispSwap_QueryContext}, + /* [ 26] = 26 */ {__glXDisp_MakeContextCurrent, __glXDispSwap_MakeContextCurrent}, + /* [ 27] = 27 */ {__glXDisp_CreatePbuffer, __glXDispSwap_CreatePbuffer}, + /* [ 28] = 28 */ {__glXDisp_DestroyPbuffer, __glXDispSwap_DestroyPbuffer}, + /* [ 29] = 29 */ {__glXDisp_GetDrawableAttributes, __glXDispSwap_GetDrawableAttributes}, + /* [ 30] = 30 */ {__glXDisp_ChangeDrawableAttributes, __glXDispSwap_ChangeDrawableAttributes}, + /* [ 31] = 31 */ {__glXDisp_CreateWindow, __glXDispSwap_CreateWindow}, + /* [ 32] = 32 */ {__glXDisp_DestroyWindow, __glXDispSwap_DestroyWindow}, + /* [ 33] = 33 */ {NULL, NULL}, + /* [ 34] = 34 */ {NULL, NULL}, + /* [ 35] = 35 */ {NULL, NULL}, + /* [ 36] = 36 */ {NULL, NULL}, + /* [ 37] = 37 */ {NULL, NULL}, + /* [ 38] = 38 */ {NULL, NULL}, + /* [ 39] = 39 */ {NULL, NULL}, + /* [ 40] = 96 */ {NULL, NULL}, + /* [ 41] = 97 */ {NULL, NULL}, + /* [ 42] = 98 */ {NULL, NULL}, + /* [ 43] = 99 */ {NULL, NULL}, + /* [ 44] = 100 */ {NULL, NULL}, + /* [ 45] = 101 */ {__glXDisp_NewList, __glXDispSwap_NewList}, + /* [ 46] = 102 */ {__glXDisp_EndList, __glXDispSwap_EndList}, + /* [ 47] = 103 */ {__glXDisp_DeleteLists, __glXDispSwap_DeleteLists}, + /* [ 48] = 104 */ {__glXDisp_GenLists, __glXDispSwap_GenLists}, + /* [ 49] = 105 */ {__glXDisp_FeedbackBuffer, __glXDispSwap_FeedbackBuffer}, + /* [ 50] = 106 */ {__glXDisp_SelectBuffer, __glXDispSwap_SelectBuffer}, + /* [ 51] = 107 */ {__glXDisp_RenderMode, __glXDispSwap_RenderMode}, + /* [ 52] = 108 */ {__glXDisp_Finish, __glXDispSwap_Finish}, + /* [ 53] = 109 */ {__glXDisp_PixelStoref, __glXDispSwap_PixelStoref}, + /* [ 54] = 110 */ {__glXDisp_PixelStorei, __glXDispSwap_PixelStorei}, + /* [ 55] = 111 */ {__glXDisp_ReadPixels, __glXDispSwap_ReadPixels}, + /* [ 56] = 112 */ {__glXDisp_GetBooleanv, __glXDispSwap_GetBooleanv}, + /* [ 57] = 113 */ {__glXDisp_GetClipPlane, __glXDispSwap_GetClipPlane}, + /* [ 58] = 114 */ {__glXDisp_GetDoublev, __glXDispSwap_GetDoublev}, + /* [ 59] = 115 */ {__glXDisp_GetError, __glXDispSwap_GetError}, + /* [ 60] = 116 */ {__glXDisp_GetFloatv, __glXDispSwap_GetFloatv}, + /* [ 61] = 117 */ {__glXDisp_GetIntegerv, __glXDispSwap_GetIntegerv}, + /* [ 62] = 118 */ {__glXDisp_GetLightfv, __glXDispSwap_GetLightfv}, + /* [ 63] = 119 */ {__glXDisp_GetLightiv, __glXDispSwap_GetLightiv}, + /* [ 64] = 120 */ {__glXDisp_GetMapdv, __glXDispSwap_GetMapdv}, + /* [ 65] = 121 */ {__glXDisp_GetMapfv, __glXDispSwap_GetMapfv}, + /* [ 66] = 122 */ {__glXDisp_GetMapiv, __glXDispSwap_GetMapiv}, + /* [ 67] = 123 */ {__glXDisp_GetMaterialfv, __glXDispSwap_GetMaterialfv}, + /* [ 68] = 124 */ {__glXDisp_GetMaterialiv, __glXDispSwap_GetMaterialiv}, + /* [ 69] = 125 */ {__glXDisp_GetPixelMapfv, __glXDispSwap_GetPixelMapfv}, + /* [ 70] = 126 */ {__glXDisp_GetPixelMapuiv, __glXDispSwap_GetPixelMapuiv}, + /* [ 71] = 127 */ {__glXDisp_GetPixelMapusv, __glXDispSwap_GetPixelMapusv}, + /* [ 72] = 128 */ {__glXDisp_GetPolygonStipple, __glXDispSwap_GetPolygonStipple}, + /* [ 73] = 129 */ {__glXDisp_GetString, __glXDispSwap_GetString}, + /* [ 74] = 130 */ {__glXDisp_GetTexEnvfv, __glXDispSwap_GetTexEnvfv}, + /* [ 75] = 131 */ {__glXDisp_GetTexEnviv, __glXDispSwap_GetTexEnviv}, + /* [ 76] = 132 */ {__glXDisp_GetTexGendv, __glXDispSwap_GetTexGendv}, + /* [ 77] = 133 */ {__glXDisp_GetTexGenfv, __glXDispSwap_GetTexGenfv}, + /* [ 78] = 134 */ {__glXDisp_GetTexGeniv, __glXDispSwap_GetTexGeniv}, + /* [ 79] = 135 */ {__glXDisp_GetTexImage, __glXDispSwap_GetTexImage}, + /* [ 80] = 136 */ {__glXDisp_GetTexParameterfv, __glXDispSwap_GetTexParameterfv}, + /* [ 81] = 137 */ {__glXDisp_GetTexParameteriv, __glXDispSwap_GetTexParameteriv}, + /* [ 82] = 138 */ {__glXDisp_GetTexLevelParameterfv, __glXDispSwap_GetTexLevelParameterfv}, + /* [ 83] = 139 */ {__glXDisp_GetTexLevelParameteriv, __glXDispSwap_GetTexLevelParameteriv}, + /* [ 84] = 140 */ {__glXDisp_IsEnabled, __glXDispSwap_IsEnabled}, + /* [ 85] = 141 */ {__glXDisp_IsList, __glXDispSwap_IsList}, + /* [ 86] = 142 */ {__glXDisp_Flush, __glXDispSwap_Flush}, + /* [ 87] = 143 */ {__glXDisp_AreTexturesResident, __glXDispSwap_AreTexturesResident}, + /* [ 88] = 144 */ {__glXDisp_DeleteTextures, __glXDispSwap_DeleteTextures}, + /* [ 89] = 145 */ {__glXDisp_GenTextures, __glXDispSwap_GenTextures}, + /* [ 90] = 146 */ {__glXDisp_IsTexture, __glXDispSwap_IsTexture}, + /* [ 91] = 147 */ {__glXDisp_GetColorTable, __glXDispSwap_GetColorTable}, + /* [ 92] = 148 */ {__glXDisp_GetColorTableParameterfv, __glXDispSwap_GetColorTableParameterfv}, + /* [ 93] = 149 */ {__glXDisp_GetColorTableParameteriv, __glXDispSwap_GetColorTableParameteriv}, + /* [ 94] = 150 */ {__glXDisp_GetConvolutionFilter, __glXDispSwap_GetConvolutionFilter}, + /* [ 95] = 151 */ {__glXDisp_GetConvolutionParameterfv, __glXDispSwap_GetConvolutionParameterfv}, + /* [ 96] = 152 */ {__glXDisp_GetConvolutionParameteriv, __glXDispSwap_GetConvolutionParameteriv}, + /* [ 97] = 153 */ {__glXDisp_GetSeparableFilter, __glXDispSwap_GetSeparableFilter}, + /* [ 98] = 154 */ {__glXDisp_GetHistogram, __glXDispSwap_GetHistogram}, + /* [ 99] = 155 */ {__glXDisp_GetHistogramParameterfv, __glXDispSwap_GetHistogramParameterfv}, + /* [ 100] = 156 */ {__glXDisp_GetHistogramParameteriv, __glXDispSwap_GetHistogramParameteriv}, + /* [ 101] = 157 */ {__glXDisp_GetMinmax, __glXDispSwap_GetMinmax}, + /* [ 102] = 158 */ {__glXDisp_GetMinmaxParameterfv, __glXDispSwap_GetMinmaxParameterfv}, + /* [ 103] = 159 */ {__glXDisp_GetMinmaxParameteriv, __glXDispSwap_GetMinmaxParameteriv}, + /* [ 104] = 160 */ {__glXDisp_GetCompressedTexImageARB, __glXDispSwap_GetCompressedTexImageARB}, + /* [ 105] = 161 */ {__glXDisp_DeleteQueriesARB, __glXDispSwap_DeleteQueriesARB}, + /* [ 106] = 162 */ {__glXDisp_GenQueriesARB, __glXDispSwap_GenQueriesARB}, + /* [ 107] = 163 */ {__glXDisp_IsQueryARB, __glXDispSwap_IsQueryARB}, + /* [ 108] = 164 */ {__glXDisp_GetQueryivARB, __glXDispSwap_GetQueryivARB}, + /* [ 109] = 165 */ {__glXDisp_GetQueryObjectivARB, __glXDispSwap_GetQueryObjectivARB}, + /* [ 110] = 166 */ {__glXDisp_GetQueryObjectuivARB, __glXDispSwap_GetQueryObjectuivARB}, + /* [ 111] = 167 */ {NULL, NULL}, +}; + +const struct __glXDispatchInfo Single_dispatch_info = { + 8, + Single_dispatch_tree, + Single_function_table, + NULL, + NULL +}; + +/*****************************************************************/ +/* tree depth = 8 */ +static const int_fast16_t Render_dispatch_tree[95] = { + /* [0] -> opcode range [0, 8192], node depth 1 */ + 2, + 5, + 31, + 54, + EMPTY_LEAF, + + /* [5] -> opcode range [0, 2048], node depth 2 */ + 1, + 8, + EMPTY_LEAF, + + /* [8] -> opcode range [0, 1024], node depth 3 */ + 1, + 11, + EMPTY_LEAF, + + /* [11] -> opcode range [0, 512], node depth 4 */ + 1, + 14, + EMPTY_LEAF, + + /* [14] -> opcode range [0, 256], node depth 5 */ + 4, + LEAF(0), + LEAF(16), + LEAF(32), + LEAF(48), + LEAF(64), + LEAF(80), + LEAF(96), + LEAF(112), + LEAF(128), + LEAF(144), + LEAF(160), + LEAF(176), + LEAF(192), + LEAF(208), + LEAF(224), + EMPTY_LEAF, + + /* [31] -> opcode range [2048, 4096], node depth 2 */ + 1, + 34, + EMPTY_LEAF, + + /* [34] -> opcode range [2048, 3072], node depth 3 */ + 1, + 37, + EMPTY_LEAF, + + /* [37] -> opcode range [2048, 2560], node depth 4 */ + 1, + 40, + EMPTY_LEAF, + + /* [40] -> opcode range [2048, 2304], node depth 5 */ + 1, + 43, + EMPTY_LEAF, + + /* [43] -> opcode range [2048, 2176], node depth 6 */ + 1, + 46, + EMPTY_LEAF, + + /* [46] -> opcode range [2048, 2112], node depth 7 */ + 1, + 49, + EMPTY_LEAF, + + /* [49] -> opcode range [2048, 2080], node depth 8 */ + 2, + LEAF(240), + LEAF(248), + LEAF(256), + EMPTY_LEAF, + + /* [54] -> opcode range [4096, 6144], node depth 2 */ + 1, + 57, + EMPTY_LEAF, + + /* [57] -> opcode range [4096, 5120], node depth 3 */ + 1, + 60, + EMPTY_LEAF, + + /* [60] -> opcode range [4096, 4608], node depth 4 */ + 1, + 63, + EMPTY_LEAF, + + /* [63] -> opcode range [4096, 4352], node depth 5 */ + 4, + LEAF(264), + LEAF(280), + 80, + EMPTY_LEAF, + EMPTY_LEAF, + LEAF(296), + LEAF(312), + LEAF(328), + LEAF(344), + EMPTY_LEAF, + 83, + 86, + EMPTY_LEAF, + 89, + 92, + EMPTY_LEAF, + + /* [80] -> opcode range [4128, 4144], node depth 6 */ + 1, + LEAF(360), + EMPTY_LEAF, + + /* [83] -> opcode range [4256, 4272], node depth 6 */ + 1, + EMPTY_LEAF, + LEAF(368), + + /* [86] -> opcode range [4272, 4288], node depth 6 */ + 1, + LEAF(376), + EMPTY_LEAF, + + /* [89] -> opcode range [4304, 4320], node depth 6 */ + 1, + EMPTY_LEAF, + LEAF(384), + + /* [92] -> opcode range [4320, 4336], node depth 6 */ + 1, + LEAF(392), + EMPTY_LEAF, + +}; + +static const void *Render_function_table[400][2] = { + /* [ 0] = 0 */ {NULL, NULL}, + /* [ 1] = 1 */ {__glXDisp_CallList, __glXDispSwap_CallList}, + /* [ 2] = 2 */ {__glXDisp_CallLists, __glXDispSwap_CallLists}, + /* [ 3] = 3 */ {__glXDisp_ListBase, __glXDispSwap_ListBase}, + /* [ 4] = 4 */ {__glXDisp_Begin, __glXDispSwap_Begin}, + /* [ 5] = 5 */ {__glXDisp_Bitmap, __glXDispSwap_Bitmap}, + /* [ 6] = 6 */ {__glXDisp_Color3bv, __glXDispSwap_Color3bv}, + /* [ 7] = 7 */ {__glXDisp_Color3dv, __glXDispSwap_Color3dv}, + /* [ 8] = 8 */ {__glXDisp_Color3fv, __glXDispSwap_Color3fv}, + /* [ 9] = 9 */ {__glXDisp_Color3iv, __glXDispSwap_Color3iv}, + /* [ 10] = 10 */ {__glXDisp_Color3sv, __glXDispSwap_Color3sv}, + /* [ 11] = 11 */ {__glXDisp_Color3ubv, __glXDispSwap_Color3ubv}, + /* [ 12] = 12 */ {__glXDisp_Color3uiv, __glXDispSwap_Color3uiv}, + /* [ 13] = 13 */ {__glXDisp_Color3usv, __glXDispSwap_Color3usv}, + /* [ 14] = 14 */ {__glXDisp_Color4bv, __glXDispSwap_Color4bv}, + /* [ 15] = 15 */ {__glXDisp_Color4dv, __glXDispSwap_Color4dv}, + /* [ 16] = 16 */ {__glXDisp_Color4fv, __glXDispSwap_Color4fv}, + /* [ 17] = 17 */ {__glXDisp_Color4iv, __glXDispSwap_Color4iv}, + /* [ 18] = 18 */ {__glXDisp_Color4sv, __glXDispSwap_Color4sv}, + /* [ 19] = 19 */ {__glXDisp_Color4ubv, __glXDispSwap_Color4ubv}, + /* [ 20] = 20 */ {__glXDisp_Color4uiv, __glXDispSwap_Color4uiv}, + /* [ 21] = 21 */ {__glXDisp_Color4usv, __glXDispSwap_Color4usv}, + /* [ 22] = 22 */ {__glXDisp_EdgeFlagv, __glXDispSwap_EdgeFlagv}, + /* [ 23] = 23 */ {__glXDisp_End, __glXDispSwap_End}, + /* [ 24] = 24 */ {__glXDisp_Indexdv, __glXDispSwap_Indexdv}, + /* [ 25] = 25 */ {__glXDisp_Indexfv, __glXDispSwap_Indexfv}, + /* [ 26] = 26 */ {__glXDisp_Indexiv, __glXDispSwap_Indexiv}, + /* [ 27] = 27 */ {__glXDisp_Indexsv, __glXDispSwap_Indexsv}, + /* [ 28] = 28 */ {__glXDisp_Normal3bv, __glXDispSwap_Normal3bv}, + /* [ 29] = 29 */ {__glXDisp_Normal3dv, __glXDispSwap_Normal3dv}, + /* [ 30] = 30 */ {__glXDisp_Normal3fv, __glXDispSwap_Normal3fv}, + /* [ 31] = 31 */ {__glXDisp_Normal3iv, __glXDispSwap_Normal3iv}, + /* [ 32] = 32 */ {__glXDisp_Normal3sv, __glXDispSwap_Normal3sv}, + /* [ 33] = 33 */ {__glXDisp_RasterPos2dv, __glXDispSwap_RasterPos2dv}, + /* [ 34] = 34 */ {__glXDisp_RasterPos2fv, __glXDispSwap_RasterPos2fv}, + /* [ 35] = 35 */ {__glXDisp_RasterPos2iv, __glXDispSwap_RasterPos2iv}, + /* [ 36] = 36 */ {__glXDisp_RasterPos2sv, __glXDispSwap_RasterPos2sv}, + /* [ 37] = 37 */ {__glXDisp_RasterPos3dv, __glXDispSwap_RasterPos3dv}, + /* [ 38] = 38 */ {__glXDisp_RasterPos3fv, __glXDispSwap_RasterPos3fv}, + /* [ 39] = 39 */ {__glXDisp_RasterPos3iv, __glXDispSwap_RasterPos3iv}, + /* [ 40] = 40 */ {__glXDisp_RasterPos3sv, __glXDispSwap_RasterPos3sv}, + /* [ 41] = 41 */ {__glXDisp_RasterPos4dv, __glXDispSwap_RasterPos4dv}, + /* [ 42] = 42 */ {__glXDisp_RasterPos4fv, __glXDispSwap_RasterPos4fv}, + /* [ 43] = 43 */ {__glXDisp_RasterPos4iv, __glXDispSwap_RasterPos4iv}, + /* [ 44] = 44 */ {__glXDisp_RasterPos4sv, __glXDispSwap_RasterPos4sv}, + /* [ 45] = 45 */ {__glXDisp_Rectdv, __glXDispSwap_Rectdv}, + /* [ 46] = 46 */ {__glXDisp_Rectfv, __glXDispSwap_Rectfv}, + /* [ 47] = 47 */ {__glXDisp_Rectiv, __glXDispSwap_Rectiv}, + /* [ 48] = 48 */ {__glXDisp_Rectsv, __glXDispSwap_Rectsv}, + /* [ 49] = 49 */ {__glXDisp_TexCoord1dv, __glXDispSwap_TexCoord1dv}, + /* [ 50] = 50 */ {__glXDisp_TexCoord1fv, __glXDispSwap_TexCoord1fv}, + /* [ 51] = 51 */ {__glXDisp_TexCoord1iv, __glXDispSwap_TexCoord1iv}, + /* [ 52] = 52 */ {__glXDisp_TexCoord1sv, __glXDispSwap_TexCoord1sv}, + /* [ 53] = 53 */ {__glXDisp_TexCoord2dv, __glXDispSwap_TexCoord2dv}, + /* [ 54] = 54 */ {__glXDisp_TexCoord2fv, __glXDispSwap_TexCoord2fv}, + /* [ 55] = 55 */ {__glXDisp_TexCoord2iv, __glXDispSwap_TexCoord2iv}, + /* [ 56] = 56 */ {__glXDisp_TexCoord2sv, __glXDispSwap_TexCoord2sv}, + /* [ 57] = 57 */ {__glXDisp_TexCoord3dv, __glXDispSwap_TexCoord3dv}, + /* [ 58] = 58 */ {__glXDisp_TexCoord3fv, __glXDispSwap_TexCoord3fv}, + /* [ 59] = 59 */ {__glXDisp_TexCoord3iv, __glXDispSwap_TexCoord3iv}, + /* [ 60] = 60 */ {__glXDisp_TexCoord3sv, __glXDispSwap_TexCoord3sv}, + /* [ 61] = 61 */ {__glXDisp_TexCoord4dv, __glXDispSwap_TexCoord4dv}, + /* [ 62] = 62 */ {__glXDisp_TexCoord4fv, __glXDispSwap_TexCoord4fv}, + /* [ 63] = 63 */ {__glXDisp_TexCoord4iv, __glXDispSwap_TexCoord4iv}, + /* [ 64] = 64 */ {__glXDisp_TexCoord4sv, __glXDispSwap_TexCoord4sv}, + /* [ 65] = 65 */ {__glXDisp_Vertex2dv, __glXDispSwap_Vertex2dv}, + /* [ 66] = 66 */ {__glXDisp_Vertex2fv, __glXDispSwap_Vertex2fv}, + /* [ 67] = 67 */ {__glXDisp_Vertex2iv, __glXDispSwap_Vertex2iv}, + /* [ 68] = 68 */ {__glXDisp_Vertex2sv, __glXDispSwap_Vertex2sv}, + /* [ 69] = 69 */ {__glXDisp_Vertex3dv, __glXDispSwap_Vertex3dv}, + /* [ 70] = 70 */ {__glXDisp_Vertex3fv, __glXDispSwap_Vertex3fv}, + /* [ 71] = 71 */ {__glXDisp_Vertex3iv, __glXDispSwap_Vertex3iv}, + /* [ 72] = 72 */ {__glXDisp_Vertex3sv, __glXDispSwap_Vertex3sv}, + /* [ 73] = 73 */ {__glXDisp_Vertex4dv, __glXDispSwap_Vertex4dv}, + /* [ 74] = 74 */ {__glXDisp_Vertex4fv, __glXDispSwap_Vertex4fv}, + /* [ 75] = 75 */ {__glXDisp_Vertex4iv, __glXDispSwap_Vertex4iv}, + /* [ 76] = 76 */ {__glXDisp_Vertex4sv, __glXDispSwap_Vertex4sv}, + /* [ 77] = 77 */ {__glXDisp_ClipPlane, __glXDispSwap_ClipPlane}, + /* [ 78] = 78 */ {__glXDisp_ColorMaterial, __glXDispSwap_ColorMaterial}, + /* [ 79] = 79 */ {__glXDisp_CullFace, __glXDispSwap_CullFace}, + /* [ 80] = 80 */ {__glXDisp_Fogf, __glXDispSwap_Fogf}, + /* [ 81] = 81 */ {__glXDisp_Fogfv, __glXDispSwap_Fogfv}, + /* [ 82] = 82 */ {__glXDisp_Fogi, __glXDispSwap_Fogi}, + /* [ 83] = 83 */ {__glXDisp_Fogiv, __glXDispSwap_Fogiv}, + /* [ 84] = 84 */ {__glXDisp_FrontFace, __glXDispSwap_FrontFace}, + /* [ 85] = 85 */ {__glXDisp_Hint, __glXDispSwap_Hint}, + /* [ 86] = 86 */ {__glXDisp_Lightf, __glXDispSwap_Lightf}, + /* [ 87] = 87 */ {__glXDisp_Lightfv, __glXDispSwap_Lightfv}, + /* [ 88] = 88 */ {__glXDisp_Lighti, __glXDispSwap_Lighti}, + /* [ 89] = 89 */ {__glXDisp_Lightiv, __glXDispSwap_Lightiv}, + /* [ 90] = 90 */ {__glXDisp_LightModelf, __glXDispSwap_LightModelf}, + /* [ 91] = 91 */ {__glXDisp_LightModelfv, __glXDispSwap_LightModelfv}, + /* [ 92] = 92 */ {__glXDisp_LightModeli, __glXDispSwap_LightModeli}, + /* [ 93] = 93 */ {__glXDisp_LightModeliv, __glXDispSwap_LightModeliv}, + /* [ 94] = 94 */ {__glXDisp_LineStipple, __glXDispSwap_LineStipple}, + /* [ 95] = 95 */ {__glXDisp_LineWidth, __glXDispSwap_LineWidth}, + /* [ 96] = 96 */ {__glXDisp_Materialf, __glXDispSwap_Materialf}, + /* [ 97] = 97 */ {__glXDisp_Materialfv, __glXDispSwap_Materialfv}, + /* [ 98] = 98 */ {__glXDisp_Materiali, __glXDispSwap_Materiali}, + /* [ 99] = 99 */ {__glXDisp_Materialiv, __glXDispSwap_Materialiv}, + /* [ 100] = 100 */ {__glXDisp_PointSize, __glXDispSwap_PointSize}, + /* [ 101] = 101 */ {__glXDisp_PolygonMode, __glXDispSwap_PolygonMode}, + /* [ 102] = 102 */ {__glXDisp_PolygonStipple, __glXDispSwap_PolygonStipple}, + /* [ 103] = 103 */ {__glXDisp_Scissor, __glXDispSwap_Scissor}, + /* [ 104] = 104 */ {__glXDisp_ShadeModel, __glXDispSwap_ShadeModel}, + /* [ 105] = 105 */ {__glXDisp_TexParameterf, __glXDispSwap_TexParameterf}, + /* [ 106] = 106 */ {__glXDisp_TexParameterfv, __glXDispSwap_TexParameterfv}, + /* [ 107] = 107 */ {__glXDisp_TexParameteri, __glXDispSwap_TexParameteri}, + /* [ 108] = 108 */ {__glXDisp_TexParameteriv, __glXDispSwap_TexParameteriv}, + /* [ 109] = 109 */ {__glXDisp_TexImage1D, __glXDispSwap_TexImage1D}, + /* [ 110] = 110 */ {__glXDisp_TexImage2D, __glXDispSwap_TexImage2D}, + /* [ 111] = 111 */ {__glXDisp_TexEnvf, __glXDispSwap_TexEnvf}, + /* [ 112] = 112 */ {__glXDisp_TexEnvfv, __glXDispSwap_TexEnvfv}, + /* [ 113] = 113 */ {__glXDisp_TexEnvi, __glXDispSwap_TexEnvi}, + /* [ 114] = 114 */ {__glXDisp_TexEnviv, __glXDispSwap_TexEnviv}, + /* [ 115] = 115 */ {__glXDisp_TexGend, __glXDispSwap_TexGend}, + /* [ 116] = 116 */ {__glXDisp_TexGendv, __glXDispSwap_TexGendv}, + /* [ 117] = 117 */ {__glXDisp_TexGenf, __glXDispSwap_TexGenf}, + /* [ 118] = 118 */ {__glXDisp_TexGenfv, __glXDispSwap_TexGenfv}, + /* [ 119] = 119 */ {__glXDisp_TexGeni, __glXDispSwap_TexGeni}, + /* [ 120] = 120 */ {__glXDisp_TexGeniv, __glXDispSwap_TexGeniv}, + /* [ 121] = 121 */ {__glXDisp_InitNames, __glXDispSwap_InitNames}, + /* [ 122] = 122 */ {__glXDisp_LoadName, __glXDispSwap_LoadName}, + /* [ 123] = 123 */ {__glXDisp_PassThrough, __glXDispSwap_PassThrough}, + /* [ 124] = 124 */ {__glXDisp_PopName, __glXDispSwap_PopName}, + /* [ 125] = 125 */ {__glXDisp_PushName, __glXDispSwap_PushName}, + /* [ 126] = 126 */ {__glXDisp_DrawBuffer, __glXDispSwap_DrawBuffer}, + /* [ 127] = 127 */ {__glXDisp_Clear, __glXDispSwap_Clear}, + /* [ 128] = 128 */ {__glXDisp_ClearAccum, __glXDispSwap_ClearAccum}, + /* [ 129] = 129 */ {__glXDisp_ClearIndex, __glXDispSwap_ClearIndex}, + /* [ 130] = 130 */ {__glXDisp_ClearColor, __glXDispSwap_ClearColor}, + /* [ 131] = 131 */ {__glXDisp_ClearStencil, __glXDispSwap_ClearStencil}, + /* [ 132] = 132 */ {__glXDisp_ClearDepth, __glXDispSwap_ClearDepth}, + /* [ 133] = 133 */ {__glXDisp_StencilMask, __glXDispSwap_StencilMask}, + /* [ 134] = 134 */ {__glXDisp_ColorMask, __glXDispSwap_ColorMask}, + /* [ 135] = 135 */ {__glXDisp_DepthMask, __glXDispSwap_DepthMask}, + /* [ 136] = 136 */ {__glXDisp_IndexMask, __glXDispSwap_IndexMask}, + /* [ 137] = 137 */ {__glXDisp_Accum, __glXDispSwap_Accum}, + /* [ 138] = 138 */ {__glXDisp_Disable, __glXDispSwap_Disable}, + /* [ 139] = 139 */ {__glXDisp_Enable, __glXDispSwap_Enable}, + /* [ 140] = 140 */ {NULL, NULL}, + /* [ 141] = 141 */ {__glXDisp_PopAttrib, __glXDispSwap_PopAttrib}, + /* [ 142] = 142 */ {__glXDisp_PushAttrib, __glXDispSwap_PushAttrib}, + /* [ 143] = 143 */ {__glXDisp_Map1d, __glXDispSwap_Map1d}, + /* [ 144] = 144 */ {__glXDisp_Map1f, __glXDispSwap_Map1f}, + /* [ 145] = 145 */ {__glXDisp_Map2d, __glXDispSwap_Map2d}, + /* [ 146] = 146 */ {__glXDisp_Map2f, __glXDispSwap_Map2f}, + /* [ 147] = 147 */ {__glXDisp_MapGrid1d, __glXDispSwap_MapGrid1d}, + /* [ 148] = 148 */ {__glXDisp_MapGrid1f, __glXDispSwap_MapGrid1f}, + /* [ 149] = 149 */ {__glXDisp_MapGrid2d, __glXDispSwap_MapGrid2d}, + /* [ 150] = 150 */ {__glXDisp_MapGrid2f, __glXDispSwap_MapGrid2f}, + /* [ 151] = 151 */ {__glXDisp_EvalCoord1dv, __glXDispSwap_EvalCoord1dv}, + /* [ 152] = 152 */ {__glXDisp_EvalCoord1fv, __glXDispSwap_EvalCoord1fv}, + /* [ 153] = 153 */ {__glXDisp_EvalCoord2dv, __glXDispSwap_EvalCoord2dv}, + /* [ 154] = 154 */ {__glXDisp_EvalCoord2fv, __glXDispSwap_EvalCoord2fv}, + /* [ 155] = 155 */ {__glXDisp_EvalMesh1, __glXDispSwap_EvalMesh1}, + /* [ 156] = 156 */ {__glXDisp_EvalPoint1, __glXDispSwap_EvalPoint1}, + /* [ 157] = 157 */ {__glXDisp_EvalMesh2, __glXDispSwap_EvalMesh2}, + /* [ 158] = 158 */ {__glXDisp_EvalPoint2, __glXDispSwap_EvalPoint2}, + /* [ 159] = 159 */ {__glXDisp_AlphaFunc, __glXDispSwap_AlphaFunc}, + /* [ 160] = 160 */ {__glXDisp_BlendFunc, __glXDispSwap_BlendFunc}, + /* [ 161] = 161 */ {__glXDisp_LogicOp, __glXDispSwap_LogicOp}, + /* [ 162] = 162 */ {__glXDisp_StencilFunc, __glXDispSwap_StencilFunc}, + /* [ 163] = 163 */ {__glXDisp_StencilOp, __glXDispSwap_StencilOp}, + /* [ 164] = 164 */ {__glXDisp_DepthFunc, __glXDispSwap_DepthFunc}, + /* [ 165] = 165 */ {__glXDisp_PixelZoom, __glXDispSwap_PixelZoom}, + /* [ 166] = 166 */ {__glXDisp_PixelTransferf, __glXDispSwap_PixelTransferf}, + /* [ 167] = 167 */ {__glXDisp_PixelTransferi, __glXDispSwap_PixelTransferi}, + /* [ 168] = 168 */ {__glXDisp_PixelMapfv, __glXDispSwap_PixelMapfv}, + /* [ 169] = 169 */ {__glXDisp_PixelMapuiv, __glXDispSwap_PixelMapuiv}, + /* [ 170] = 170 */ {__glXDisp_PixelMapusv, __glXDispSwap_PixelMapusv}, + /* [ 171] = 171 */ {__glXDisp_ReadBuffer, __glXDispSwap_ReadBuffer}, + /* [ 172] = 172 */ {__glXDisp_CopyPixels, __glXDispSwap_CopyPixels}, + /* [ 173] = 173 */ {__glXDisp_DrawPixels, __glXDispSwap_DrawPixels}, + /* [ 174] = 174 */ {__glXDisp_DepthRange, __glXDispSwap_DepthRange}, + /* [ 175] = 175 */ {__glXDisp_Frustum, __glXDispSwap_Frustum}, + /* [ 176] = 176 */ {__glXDisp_LoadIdentity, __glXDispSwap_LoadIdentity}, + /* [ 177] = 177 */ {__glXDisp_LoadMatrixf, __glXDispSwap_LoadMatrixf}, + /* [ 178] = 178 */ {__glXDisp_LoadMatrixd, __glXDispSwap_LoadMatrixd}, + /* [ 179] = 179 */ {__glXDisp_MatrixMode, __glXDispSwap_MatrixMode}, + /* [ 180] = 180 */ {__glXDisp_MultMatrixf, __glXDispSwap_MultMatrixf}, + /* [ 181] = 181 */ {__glXDisp_MultMatrixd, __glXDispSwap_MultMatrixd}, + /* [ 182] = 182 */ {__glXDisp_Ortho, __glXDispSwap_Ortho}, + /* [ 183] = 183 */ {__glXDisp_PopMatrix, __glXDispSwap_PopMatrix}, + /* [ 184] = 184 */ {__glXDisp_PushMatrix, __glXDispSwap_PushMatrix}, + /* [ 185] = 185 */ {__glXDisp_Rotated, __glXDispSwap_Rotated}, + /* [ 186] = 186 */ {__glXDisp_Rotatef, __glXDispSwap_Rotatef}, + /* [ 187] = 187 */ {__glXDisp_Scaled, __glXDispSwap_Scaled}, + /* [ 188] = 188 */ {__glXDisp_Scalef, __glXDispSwap_Scalef}, + /* [ 189] = 189 */ {__glXDisp_Translated, __glXDispSwap_Translated}, + /* [ 190] = 190 */ {__glXDisp_Translatef, __glXDispSwap_Translatef}, + /* [ 191] = 191 */ {__glXDisp_Viewport, __glXDispSwap_Viewport}, + /* [ 192] = 192 */ {__glXDisp_PolygonOffset, __glXDispSwap_PolygonOffset}, + /* [ 193] = 193 */ {__glXDisp_DrawArrays, __glXDispSwap_DrawArrays}, + /* [ 194] = 194 */ {__glXDisp_Indexubv, __glXDispSwap_Indexubv}, + /* [ 195] = 195 */ {__glXDisp_ColorSubTable, __glXDispSwap_ColorSubTable}, + /* [ 196] = 196 */ {__glXDisp_CopyColorSubTable, __glXDispSwap_CopyColorSubTable}, + /* [ 197] = 197 */ {__glXDisp_ActiveTextureARB, __glXDispSwap_ActiveTextureARB}, + /* [ 198] = 198 */ {__glXDisp_MultiTexCoord1dvARB, __glXDispSwap_MultiTexCoord1dvARB}, + /* [ 199] = 199 */ {__glXDisp_MultiTexCoord1fvARB, __glXDispSwap_MultiTexCoord1fvARB}, + /* [ 200] = 200 */ {__glXDisp_MultiTexCoord1ivARB, __glXDispSwap_MultiTexCoord1ivARB}, + /* [ 201] = 201 */ {__glXDisp_MultiTexCoord1svARB, __glXDispSwap_MultiTexCoord1svARB}, + /* [ 202] = 202 */ {__glXDisp_MultiTexCoord2dvARB, __glXDispSwap_MultiTexCoord2dvARB}, + /* [ 203] = 203 */ {__glXDisp_MultiTexCoord2fvARB, __glXDispSwap_MultiTexCoord2fvARB}, + /* [ 204] = 204 */ {__glXDisp_MultiTexCoord2ivARB, __glXDispSwap_MultiTexCoord2ivARB}, + /* [ 205] = 205 */ {__glXDisp_MultiTexCoord2svARB, __glXDispSwap_MultiTexCoord2svARB}, + /* [ 206] = 206 */ {__glXDisp_MultiTexCoord3dvARB, __glXDispSwap_MultiTexCoord3dvARB}, + /* [ 207] = 207 */ {__glXDisp_MultiTexCoord3fvARB, __glXDispSwap_MultiTexCoord3fvARB}, + /* [ 208] = 208 */ {__glXDisp_MultiTexCoord3ivARB, __glXDispSwap_MultiTexCoord3ivARB}, + /* [ 209] = 209 */ {__glXDisp_MultiTexCoord3svARB, __glXDispSwap_MultiTexCoord3svARB}, + /* [ 210] = 210 */ {__glXDisp_MultiTexCoord4dvARB, __glXDispSwap_MultiTexCoord4dvARB}, + /* [ 211] = 211 */ {__glXDisp_MultiTexCoord4fvARB, __glXDispSwap_MultiTexCoord4fvARB}, + /* [ 212] = 212 */ {__glXDisp_MultiTexCoord4ivARB, __glXDispSwap_MultiTexCoord4ivARB}, + /* [ 213] = 213 */ {__glXDisp_MultiTexCoord4svARB, __glXDispSwap_MultiTexCoord4svARB}, + /* [ 214] = 214 */ {__glXDisp_CompressedTexImage1DARB, __glXDispSwap_CompressedTexImage1DARB}, + /* [ 215] = 215 */ {__glXDisp_CompressedTexImage2DARB, __glXDispSwap_CompressedTexImage2DARB}, + /* [ 216] = 216 */ {__glXDisp_CompressedTexImage3DARB, __glXDispSwap_CompressedTexImage3DARB}, + /* [ 217] = 217 */ {__glXDisp_CompressedTexSubImage1DARB, __glXDispSwap_CompressedTexSubImage1DARB}, + /* [ 218] = 218 */ {__glXDisp_CompressedTexSubImage2DARB, __glXDispSwap_CompressedTexSubImage2DARB}, + /* [ 219] = 219 */ {__glXDisp_CompressedTexSubImage3DARB, __glXDispSwap_CompressedTexSubImage3DARB}, + /* [ 220] = 220 */ {NULL, NULL}, + /* [ 221] = 221 */ {NULL, NULL}, + /* [ 222] = 222 */ {NULL, NULL}, + /* [ 223] = 223 */ {NULL, NULL}, + /* [ 224] = 224 */ {NULL, NULL}, + /* [ 225] = 225 */ {NULL, NULL}, + /* [ 226] = 226 */ {NULL, NULL}, + /* [ 227] = 227 */ {NULL, NULL}, + /* [ 228] = 228 */ {NULL, NULL}, + /* [ 229] = 229 */ {__glXDisp_SampleCoverageARB, __glXDispSwap_SampleCoverageARB}, + /* [ 230] = 230 */ {__glXDisp_WindowPos3fvMESA, __glXDispSwap_WindowPos3fvMESA}, + /* [ 231] = 231 */ {__glXDisp_BeginQueryARB, __glXDispSwap_BeginQueryARB}, + /* [ 232] = 232 */ {__glXDisp_EndQueryARB, __glXDispSwap_EndQueryARB}, + /* [ 233] = 233 */ {__glXDisp_DrawBuffersARB, __glXDispSwap_DrawBuffersARB}, + /* [ 234] = 234 */ {NULL, NULL}, + /* [ 235] = 235 */ {NULL, NULL}, + /* [ 236] = 236 */ {NULL, NULL}, + /* [ 237] = 237 */ {NULL, NULL}, + /* [ 238] = 238 */ {NULL, NULL}, + /* [ 239] = 239 */ {NULL, NULL}, + /* [ 240] = 2048 */ {__glXDisp_SampleMaskSGIS, __glXDispSwap_SampleMaskSGIS}, + /* [ 241] = 2049 */ {__glXDisp_SamplePatternSGIS, __glXDispSwap_SamplePatternSGIS}, + /* [ 242] = 2050 */ {NULL, NULL}, + /* [ 243] = 2051 */ {NULL, NULL}, + /* [ 244] = 2052 */ {NULL, NULL}, + /* [ 245] = 2053 */ {__glXDisp_ColorTable, __glXDispSwap_ColorTable}, + /* [ 246] = 2054 */ {__glXDisp_ColorTableParameterfv, __glXDispSwap_ColorTableParameterfv}, + /* [ 247] = 2055 */ {__glXDisp_ColorTableParameteriv, __glXDispSwap_ColorTableParameteriv}, + /* [ 248] = 2056 */ {__glXDisp_CopyColorTable, __glXDispSwap_CopyColorTable}, + /* [ 249] = 2057 */ {NULL, NULL}, + /* [ 250] = 2058 */ {NULL, NULL}, + /* [ 251] = 2059 */ {NULL, NULL}, + /* [ 252] = 2060 */ {NULL, NULL}, + /* [ 253] = 2061 */ {NULL, NULL}, + /* [ 254] = 2062 */ {NULL, NULL}, + /* [ 255] = 2063 */ {NULL, NULL}, + /* [ 256] = 2064 */ {NULL, NULL}, + /* [ 257] = 2065 */ {__glXDisp_PointParameterfEXT, __glXDispSwap_PointParameterfEXT}, + /* [ 258] = 2066 */ {__glXDisp_PointParameterfvEXT, __glXDispSwap_PointParameterfvEXT}, + /* [ 259] = 2067 */ {NULL, NULL}, + /* [ 260] = 2068 */ {NULL, NULL}, + /* [ 261] = 2069 */ {NULL, NULL}, + /* [ 262] = 2070 */ {NULL, NULL}, + /* [ 263] = 2071 */ {NULL, NULL}, + /* [ 264] = 4096 */ {__glXDisp_BlendColor, __glXDispSwap_BlendColor}, + /* [ 265] = 4097 */ {__glXDisp_BlendEquation, __glXDispSwap_BlendEquation}, + /* [ 266] = 4098 */ {NULL, NULL}, + /* [ 267] = 4099 */ {__glXDisp_TexSubImage1D, __glXDispSwap_TexSubImage1D}, + /* [ 268] = 4100 */ {__glXDisp_TexSubImage2D, __glXDispSwap_TexSubImage2D}, + /* [ 269] = 4101 */ {__glXDisp_ConvolutionFilter1D, __glXDispSwap_ConvolutionFilter1D}, + /* [ 270] = 4102 */ {__glXDisp_ConvolutionFilter2D, __glXDispSwap_ConvolutionFilter2D}, + /* [ 271] = 4103 */ {__glXDisp_ConvolutionParameterf, __glXDispSwap_ConvolutionParameterf}, + /* [ 272] = 4104 */ {__glXDisp_ConvolutionParameterfv, __glXDispSwap_ConvolutionParameterfv}, + /* [ 273] = 4105 */ {__glXDisp_ConvolutionParameteri, __glXDispSwap_ConvolutionParameteri}, + /* [ 274] = 4106 */ {__glXDisp_ConvolutionParameteriv, __glXDispSwap_ConvolutionParameteriv}, + /* [ 275] = 4107 */ {__glXDisp_CopyConvolutionFilter1D, __glXDispSwap_CopyConvolutionFilter1D}, + /* [ 276] = 4108 */ {__glXDisp_CopyConvolutionFilter2D, __glXDispSwap_CopyConvolutionFilter2D}, + /* [ 277] = 4109 */ {__glXDisp_SeparableFilter2D, __glXDispSwap_SeparableFilter2D}, + /* [ 278] = 4110 */ {__glXDisp_Histogram, __glXDispSwap_Histogram}, + /* [ 279] = 4111 */ {__glXDisp_Minmax, __glXDispSwap_Minmax}, + /* [ 280] = 4112 */ {__glXDisp_ResetHistogram, __glXDispSwap_ResetHistogram}, + /* [ 281] = 4113 */ {__glXDisp_ResetMinmax, __glXDispSwap_ResetMinmax}, + /* [ 282] = 4114 */ {__glXDisp_TexImage3D, __glXDispSwap_TexImage3D}, + /* [ 283] = 4115 */ {__glXDisp_TexSubImage3D, __glXDispSwap_TexSubImage3D}, + /* [ 284] = 4116 */ {NULL, NULL}, + /* [ 285] = 4117 */ {__glXDisp_BindTexture, __glXDispSwap_BindTexture}, + /* [ 286] = 4118 */ {__glXDisp_PrioritizeTextures, __glXDispSwap_PrioritizeTextures}, + /* [ 287] = 4119 */ {__glXDisp_CopyTexImage1D, __glXDispSwap_CopyTexImage1D}, + /* [ 288] = 4120 */ {__glXDisp_CopyTexImage2D, __glXDispSwap_CopyTexImage2D}, + /* [ 289] = 4121 */ {__glXDisp_CopyTexSubImage1D, __glXDispSwap_CopyTexSubImage1D}, + /* [ 290] = 4122 */ {__glXDisp_CopyTexSubImage2D, __glXDispSwap_CopyTexSubImage2D}, + /* [ 291] = 4123 */ {__glXDisp_CopyTexSubImage3D, __glXDispSwap_CopyTexSubImage3D}, + /* [ 292] = 4124 */ {__glXDisp_FogCoordfvEXT, __glXDispSwap_FogCoordfvEXT}, + /* [ 293] = 4125 */ {__glXDisp_FogCoorddvEXT, __glXDispSwap_FogCoorddvEXT}, + /* [ 294] = 4126 */ {__glXDisp_SecondaryColor3bvEXT, __glXDispSwap_SecondaryColor3bvEXT}, + /* [ 295] = 4127 */ {__glXDisp_SecondaryColor3svEXT, __glXDispSwap_SecondaryColor3svEXT}, + /* [ 296] = 4176 */ {NULL, NULL}, + /* [ 297] = 4177 */ {NULL, NULL}, + /* [ 298] = 4178 */ {NULL, NULL}, + /* [ 299] = 4179 */ {NULL, NULL}, + /* [ 300] = 4180 */ {__glXDisp_BindProgramNV, __glXDispSwap_BindProgramNV}, + /* [ 301] = 4181 */ {__glXDisp_ExecuteProgramNV, __glXDispSwap_ExecuteProgramNV}, + /* [ 302] = 4182 */ {__glXDisp_RequestResidentProgramsNV, __glXDispSwap_RequestResidentProgramsNV}, + /* [ 303] = 4183 */ {__glXDisp_LoadProgramNV, __glXDispSwap_LoadProgramNV}, + /* [ 304] = 4184 */ {__glXDisp_ProgramParameter4fvNV, __glXDispSwap_ProgramParameter4fvNV}, + /* [ 305] = 4185 */ {__glXDisp_ProgramEnvParameter4dvARB, __glXDispSwap_ProgramEnvParameter4dvARB}, + /* [ 306] = 4186 */ {__glXDisp_ProgramParameters4fvNV, __glXDispSwap_ProgramParameters4fvNV}, + /* [ 307] = 4187 */ {__glXDisp_ProgramParameters4dvNV, __glXDispSwap_ProgramParameters4dvNV}, + /* [ 308] = 4188 */ {__glXDisp_TrackMatrixNV, __glXDispSwap_TrackMatrixNV}, + /* [ 309] = 4189 */ {__glXDisp_VertexAttrib1svARB, __glXDispSwap_VertexAttrib1svARB}, + /* [ 310] = 4190 */ {__glXDisp_VertexAttrib2svARB, __glXDispSwap_VertexAttrib2svARB}, + /* [ 311] = 4191 */ {__glXDisp_VertexAttrib3svARB, __glXDispSwap_VertexAttrib3svARB}, + /* [ 312] = 4192 */ {__glXDisp_VertexAttrib4svARB, __glXDispSwap_VertexAttrib4svARB}, + /* [ 313] = 4193 */ {__glXDisp_VertexAttrib1fvARB, __glXDispSwap_VertexAttrib1fvARB}, + /* [ 314] = 4194 */ {__glXDisp_VertexAttrib2fvARB, __glXDispSwap_VertexAttrib2fvARB}, + /* [ 315] = 4195 */ {__glXDisp_VertexAttrib3fvARB, __glXDispSwap_VertexAttrib3fvARB}, + /* [ 316] = 4196 */ {__glXDisp_VertexAttrib4fvARB, __glXDispSwap_VertexAttrib4fvARB}, + /* [ 317] = 4197 */ {__glXDisp_VertexAttrib1dvARB, __glXDispSwap_VertexAttrib1dvARB}, + /* [ 318] = 4198 */ {__glXDisp_VertexAttrib2dvARB, __glXDispSwap_VertexAttrib2dvARB}, + /* [ 319] = 4199 */ {__glXDisp_VertexAttrib3dvARB, __glXDispSwap_VertexAttrib3dvARB}, + /* [ 320] = 4200 */ {__glXDisp_VertexAttrib4dvARB, __glXDispSwap_VertexAttrib4dvARB}, + /* [ 321] = 4201 */ {__glXDisp_VertexAttrib4NubvARB, __glXDispSwap_VertexAttrib4NubvARB}, + /* [ 322] = 4202 */ {__glXDisp_VertexAttribs1svNV, __glXDispSwap_VertexAttribs1svNV}, + /* [ 323] = 4203 */ {__glXDisp_VertexAttribs2svNV, __glXDispSwap_VertexAttribs2svNV}, + /* [ 324] = 4204 */ {__glXDisp_VertexAttribs3svNV, __glXDispSwap_VertexAttribs3svNV}, + /* [ 325] = 4205 */ {__glXDisp_VertexAttribs4svNV, __glXDispSwap_VertexAttribs4svNV}, + /* [ 326] = 4206 */ {__glXDisp_VertexAttribs1fvNV, __glXDispSwap_VertexAttribs1fvNV}, + /* [ 327] = 4207 */ {__glXDisp_VertexAttribs2fvNV, __glXDispSwap_VertexAttribs2fvNV}, + /* [ 328] = 4208 */ {__glXDisp_VertexAttribs3fvNV, __glXDispSwap_VertexAttribs3fvNV}, + /* [ 329] = 4209 */ {__glXDisp_VertexAttribs4fvNV, __glXDispSwap_VertexAttribs4fvNV}, + /* [ 330] = 4210 */ {__glXDisp_VertexAttribs1dvNV, __glXDispSwap_VertexAttribs1dvNV}, + /* [ 331] = 4211 */ {__glXDisp_VertexAttribs2dvNV, __glXDispSwap_VertexAttribs2dvNV}, + /* [ 332] = 4212 */ {__glXDisp_VertexAttribs3dvNV, __glXDispSwap_VertexAttribs3dvNV}, + /* [ 333] = 4213 */ {__glXDisp_VertexAttribs4dvNV, __glXDispSwap_VertexAttribs4dvNV}, + /* [ 334] = 4214 */ {__glXDisp_VertexAttribs4ubvNV, __glXDispSwap_VertexAttribs4ubvNV}, + /* [ 335] = 4215 */ {__glXDisp_ProgramLocalParameter4fvARB, __glXDispSwap_ProgramLocalParameter4fvARB}, + /* [ 336] = 4216 */ {__glXDisp_ProgramLocalParameter4dvARB, __glXDispSwap_ProgramLocalParameter4dvARB}, + /* [ 337] = 4217 */ {__glXDisp_ProgramStringARB, __glXDispSwap_ProgramStringARB}, + /* [ 338] = 4218 */ {__glXDisp_ProgramNamedParameter4fvNV, __glXDispSwap_ProgramNamedParameter4fvNV}, + /* [ 339] = 4219 */ {__glXDisp_ProgramNamedParameter4dvNV, __glXDispSwap_ProgramNamedParameter4dvNV}, + /* [ 340] = 4220 */ {__glXDisp_ActiveStencilFaceEXT, __glXDispSwap_ActiveStencilFaceEXT}, + /* [ 341] = 4221 */ {__glXDisp_PointParameteriNV, __glXDispSwap_PointParameteriNV}, + /* [ 342] = 4222 */ {__glXDisp_PointParameterivNV, __glXDispSwap_PointParameterivNV}, + /* [ 343] = 4223 */ {NULL, NULL}, + /* [ 344] = 4224 */ {NULL, NULL}, + /* [ 345] = 4225 */ {NULL, NULL}, + /* [ 346] = 4226 */ {NULL, NULL}, + /* [ 347] = 4227 */ {NULL, NULL}, + /* [ 348] = 4228 */ {__glXDisp_BlendEquationSeparateEXT, __glXDispSwap_BlendEquationSeparateEXT}, + /* [ 349] = 4229 */ {NULL, NULL}, + /* [ 350] = 4230 */ {__glXDisp_VertexAttrib4bvARB, __glXDispSwap_VertexAttrib4bvARB}, + /* [ 351] = 4231 */ {__glXDisp_VertexAttrib4ivARB, __glXDispSwap_VertexAttrib4ivARB}, + /* [ 352] = 4232 */ {__glXDisp_VertexAttrib4ubvARB, __glXDispSwap_VertexAttrib4ubvARB}, + /* [ 353] = 4233 */ {__glXDisp_VertexAttrib4usvARB, __glXDispSwap_VertexAttrib4usvARB}, + /* [ 354] = 4234 */ {__glXDisp_VertexAttrib4uivARB, __glXDispSwap_VertexAttrib4uivARB}, + /* [ 355] = 4235 */ {__glXDisp_VertexAttrib4NbvARB, __glXDispSwap_VertexAttrib4NbvARB}, + /* [ 356] = 4236 */ {__glXDisp_VertexAttrib4NsvARB, __glXDispSwap_VertexAttrib4NsvARB}, + /* [ 357] = 4237 */ {__glXDisp_VertexAttrib4NivARB, __glXDispSwap_VertexAttrib4NivARB}, + /* [ 358] = 4238 */ {__glXDisp_VertexAttrib4NusvARB, __glXDispSwap_VertexAttrib4NusvARB}, + /* [ 359] = 4239 */ {__glXDisp_VertexAttrib4NuivARB, __glXDispSwap_VertexAttrib4NuivARB}, + /* [ 360] = 4128 */ {__glXDisp_SecondaryColor3ivEXT, __glXDispSwap_SecondaryColor3ivEXT}, + /* [ 361] = 4129 */ {__glXDisp_SecondaryColor3fvEXT, __glXDispSwap_SecondaryColor3fvEXT}, + /* [ 362] = 4130 */ {__glXDisp_SecondaryColor3dvEXT, __glXDispSwap_SecondaryColor3dvEXT}, + /* [ 363] = 4131 */ {__glXDisp_SecondaryColor3ubvEXT, __glXDispSwap_SecondaryColor3ubvEXT}, + /* [ 364] = 4132 */ {__glXDisp_SecondaryColor3usvEXT, __glXDispSwap_SecondaryColor3usvEXT}, + /* [ 365] = 4133 */ {__glXDisp_SecondaryColor3uivEXT, __glXDispSwap_SecondaryColor3uivEXT}, + /* [ 366] = 4134 */ {__glXDisp_BlendFuncSeparateEXT, __glXDispSwap_BlendFuncSeparateEXT}, + /* [ 367] = 4135 */ {NULL, NULL}, + /* [ 368] = 4264 */ {NULL, NULL}, + /* [ 369] = 4265 */ {__glXDisp_VertexAttrib1svNV, __glXDispSwap_VertexAttrib1svNV}, + /* [ 370] = 4266 */ {__glXDisp_VertexAttrib2svNV, __glXDispSwap_VertexAttrib2svNV}, + /* [ 371] = 4267 */ {__glXDisp_VertexAttrib3svNV, __glXDispSwap_VertexAttrib3svNV}, + /* [ 372] = 4268 */ {__glXDisp_VertexAttrib4svNV, __glXDispSwap_VertexAttrib4svNV}, + /* [ 373] = 4269 */ {__glXDisp_VertexAttrib1fvNV, __glXDispSwap_VertexAttrib1fvNV}, + /* [ 374] = 4270 */ {__glXDisp_VertexAttrib2fvNV, __glXDispSwap_VertexAttrib2fvNV}, + /* [ 375] = 4271 */ {__glXDisp_VertexAttrib3fvNV, __glXDispSwap_VertexAttrib3fvNV}, + /* [ 376] = 4272 */ {__glXDisp_VertexAttrib4fvNV, __glXDispSwap_VertexAttrib4fvNV}, + /* [ 377] = 4273 */ {__glXDisp_VertexAttrib1dvNV, __glXDispSwap_VertexAttrib1dvNV}, + /* [ 378] = 4274 */ {__glXDisp_VertexAttrib2dvNV, __glXDispSwap_VertexAttrib2dvNV}, + /* [ 379] = 4275 */ {__glXDisp_VertexAttrib3dvNV, __glXDispSwap_VertexAttrib3dvNV}, + /* [ 380] = 4276 */ {__glXDisp_VertexAttrib4dvNV, __glXDispSwap_VertexAttrib4dvNV}, + /* [ 381] = 4277 */ {__glXDisp_VertexAttrib4ubvNV, __glXDispSwap_VertexAttrib4ubvNV}, + /* [ 382] = 4278 */ {NULL, NULL}, + /* [ 383] = 4279 */ {NULL, NULL}, + /* [ 384] = 4312 */ {NULL, NULL}, + /* [ 385] = 4313 */ {NULL, NULL}, + /* [ 386] = 4314 */ {NULL, NULL}, + /* [ 387] = 4315 */ {NULL, NULL}, + /* [ 388] = 4316 */ {__glXDisp_BindRenderbufferEXT, __glXDispSwap_BindRenderbufferEXT}, + /* [ 389] = 4317 */ {__glXDisp_DeleteRenderbuffersEXT, __glXDispSwap_DeleteRenderbuffersEXT}, + /* [ 390] = 4318 */ {__glXDisp_RenderbufferStorageEXT, __glXDispSwap_RenderbufferStorageEXT}, + /* [ 391] = 4319 */ {__glXDisp_BindFramebufferEXT, __glXDispSwap_BindFramebufferEXT}, + /* [ 392] = 4320 */ {__glXDisp_DeleteFramebuffersEXT, __glXDispSwap_DeleteFramebuffersEXT}, + /* [ 393] = 4321 */ {__glXDisp_FramebufferTexture1DEXT, __glXDispSwap_FramebufferTexture1DEXT}, + /* [ 394] = 4322 */ {__glXDisp_FramebufferTexture2DEXT, __glXDispSwap_FramebufferTexture2DEXT}, + /* [ 395] = 4323 */ {__glXDisp_FramebufferTexture3DEXT, __glXDispSwap_FramebufferTexture3DEXT}, + /* [ 396] = 4324 */ {__glXDisp_FramebufferRenderbufferEXT, __glXDispSwap_FramebufferRenderbufferEXT}, + /* [ 397] = 4325 */ {__glXDisp_GenerateMipmapEXT, __glXDispSwap_GenerateMipmapEXT}, + /* [ 398] = 4326 */ {NULL, NULL}, + /* [ 399] = 4327 */ {NULL, NULL}, +}; + +static const int_fast16_t Render_size_table[400][2] = { + /* [ 0] = 0 */ { 0, ~0}, + /* [ 1] = 1 */ { 8, ~0}, + /* [ 2] = 2 */ { 12, 0}, + /* [ 3] = 3 */ { 8, ~0}, + /* [ 4] = 4 */ { 8, ~0}, + /* [ 5] = 5 */ { 48, 1}, + /* [ 6] = 6 */ { 8, ~0}, + /* [ 7] = 7 */ { 28, ~0}, + /* [ 8] = 8 */ { 16, ~0}, + /* [ 9] = 9 */ { 16, ~0}, + /* [ 10] = 10 */ { 12, ~0}, + /* [ 11] = 11 */ { 8, ~0}, + /* [ 12] = 12 */ { 16, ~0}, + /* [ 13] = 13 */ { 12, ~0}, + /* [ 14] = 14 */ { 8, ~0}, + /* [ 15] = 15 */ { 36, ~0}, + /* [ 16] = 16 */ { 20, ~0}, + /* [ 17] = 17 */ { 20, ~0}, + /* [ 18] = 18 */ { 12, ~0}, + /* [ 19] = 19 */ { 8, ~0}, + /* [ 20] = 20 */ { 20, ~0}, + /* [ 21] = 21 */ { 12, ~0}, + /* [ 22] = 22 */ { 8, ~0}, + /* [ 23] = 23 */ { 4, ~0}, + /* [ 24] = 24 */ { 12, ~0}, + /* [ 25] = 25 */ { 8, ~0}, + /* [ 26] = 26 */ { 8, ~0}, + /* [ 27] = 27 */ { 8, ~0}, + /* [ 28] = 28 */ { 8, ~0}, + /* [ 29] = 29 */ { 28, ~0}, + /* [ 30] = 30 */ { 16, ~0}, + /* [ 31] = 31 */ { 16, ~0}, + /* [ 32] = 32 */ { 12, ~0}, + /* [ 33] = 33 */ { 20, ~0}, + /* [ 34] = 34 */ { 12, ~0}, + /* [ 35] = 35 */ { 12, ~0}, + /* [ 36] = 36 */ { 8, ~0}, + /* [ 37] = 37 */ { 28, ~0}, + /* [ 38] = 38 */ { 16, ~0}, + /* [ 39] = 39 */ { 16, ~0}, + /* [ 40] = 40 */ { 12, ~0}, + /* [ 41] = 41 */ { 36, ~0}, + /* [ 42] = 42 */ { 20, ~0}, + /* [ 43] = 43 */ { 20, ~0}, + /* [ 44] = 44 */ { 12, ~0}, + /* [ 45] = 45 */ { 36, ~0}, + /* [ 46] = 46 */ { 20, ~0}, + /* [ 47] = 47 */ { 20, ~0}, + /* [ 48] = 48 */ { 12, ~0}, + /* [ 49] = 49 */ { 12, ~0}, + /* [ 50] = 50 */ { 8, ~0}, + /* [ 51] = 51 */ { 8, ~0}, + /* [ 52] = 52 */ { 8, ~0}, + /* [ 53] = 53 */ { 20, ~0}, + /* [ 54] = 54 */ { 12, ~0}, + /* [ 55] = 55 */ { 12, ~0}, + /* [ 56] = 56 */ { 8, ~0}, + /* [ 57] = 57 */ { 28, ~0}, + /* [ 58] = 58 */ { 16, ~0}, + /* [ 59] = 59 */ { 16, ~0}, + /* [ 60] = 60 */ { 12, ~0}, + /* [ 61] = 61 */ { 36, ~0}, + /* [ 62] = 62 */ { 20, ~0}, + /* [ 63] = 63 */ { 20, ~0}, + /* [ 64] = 64 */ { 12, ~0}, + /* [ 65] = 65 */ { 20, ~0}, + /* [ 66] = 66 */ { 12, ~0}, + /* [ 67] = 67 */ { 12, ~0}, + /* [ 68] = 68 */ { 8, ~0}, + /* [ 69] = 69 */ { 28, ~0}, + /* [ 70] = 70 */ { 16, ~0}, + /* [ 71] = 71 */ { 16, ~0}, + /* [ 72] = 72 */ { 12, ~0}, + /* [ 73] = 73 */ { 36, ~0}, + /* [ 74] = 74 */ { 20, ~0}, + /* [ 75] = 75 */ { 20, ~0}, + /* [ 76] = 76 */ { 12, ~0}, + /* [ 77] = 77 */ { 40, ~0}, + /* [ 78] = 78 */ { 12, ~0}, + /* [ 79] = 79 */ { 8, ~0}, + /* [ 80] = 80 */ { 12, ~0}, + /* [ 81] = 81 */ { 8, 2}, + /* [ 82] = 82 */ { 12, ~0}, + /* [ 83] = 83 */ { 8, 3}, + /* [ 84] = 84 */ { 8, ~0}, + /* [ 85] = 85 */ { 12, ~0}, + /* [ 86] = 86 */ { 16, ~0}, + /* [ 87] = 87 */ { 12, 4}, + /* [ 88] = 88 */ { 16, ~0}, + /* [ 89] = 89 */ { 12, 5}, + /* [ 90] = 90 */ { 12, ~0}, + /* [ 91] = 91 */ { 8, 6}, + /* [ 92] = 92 */ { 12, ~0}, + /* [ 93] = 93 */ { 8, 7}, + /* [ 94] = 94 */ { 12, ~0}, + /* [ 95] = 95 */ { 8, ~0}, + /* [ 96] = 96 */ { 16, ~0}, + /* [ 97] = 97 */ { 12, 8}, + /* [ 98] = 98 */ { 16, ~0}, + /* [ 99] = 99 */ { 12, 9}, + /* [100] = 100 */ { 8, ~0}, + /* [101] = 101 */ { 12, ~0}, + /* [102] = 102 */ { 24, 10}, + /* [103] = 103 */ { 20, ~0}, + /* [104] = 104 */ { 8, ~0}, + /* [105] = 105 */ { 16, ~0}, + /* [106] = 106 */ { 12, 11}, + /* [107] = 107 */ { 16, ~0}, + /* [108] = 108 */ { 12, 12}, + /* [109] = 109 */ { 56, 13}, + /* [110] = 110 */ { 56, 14}, + /* [111] = 111 */ { 16, ~0}, + /* [112] = 112 */ { 12, 15}, + /* [113] = 113 */ { 16, ~0}, + /* [114] = 114 */ { 12, 16}, + /* [115] = 115 */ { 20, ~0}, + /* [116] = 116 */ { 12, 17}, + /* [117] = 117 */ { 16, ~0}, + /* [118] = 118 */ { 12, 18}, + /* [119] = 119 */ { 16, ~0}, + /* [120] = 120 */ { 12, 19}, + /* [121] = 121 */ { 4, ~0}, + /* [122] = 122 */ { 8, ~0}, + /* [123] = 123 */ { 8, ~0}, + /* [124] = 124 */ { 4, ~0}, + /* [125] = 125 */ { 8, ~0}, + /* [126] = 126 */ { 8, ~0}, + /* [127] = 127 */ { 8, ~0}, + /* [128] = 128 */ { 20, ~0}, + /* [129] = 129 */ { 8, ~0}, + /* [130] = 130 */ { 20, ~0}, + /* [131] = 131 */ { 8, ~0}, + /* [132] = 132 */ { 12, ~0}, + /* [133] = 133 */ { 8, ~0}, + /* [134] = 134 */ { 8, ~0}, + /* [135] = 135 */ { 8, ~0}, + /* [136] = 136 */ { 8, ~0}, + /* [137] = 137 */ { 12, ~0}, + /* [138] = 138 */ { 8, ~0}, + /* [139] = 139 */ { 8, ~0}, + /* [140] = 140 */ { 0, ~0}, + /* [141] = 141 */ { 4, ~0}, + /* [142] = 142 */ { 8, ~0}, + /* [143] = 143 */ { 28, 20}, + /* [144] = 144 */ { 20, 21}, + /* [145] = 145 */ { 48, 22}, + /* [146] = 146 */ { 32, 23}, + /* [147] = 147 */ { 24, ~0}, + /* [148] = 148 */ { 16, ~0}, + /* [149] = 149 */ { 44, ~0}, + /* [150] = 150 */ { 28, ~0}, + /* [151] = 151 */ { 12, ~0}, + /* [152] = 152 */ { 8, ~0}, + /* [153] = 153 */ { 20, ~0}, + /* [154] = 154 */ { 12, ~0}, + /* [155] = 155 */ { 16, ~0}, + /* [156] = 156 */ { 8, ~0}, + /* [157] = 157 */ { 24, ~0}, + /* [158] = 158 */ { 12, ~0}, + /* [159] = 159 */ { 12, ~0}, + /* [160] = 160 */ { 12, ~0}, + /* [161] = 161 */ { 8, ~0}, + /* [162] = 162 */ { 16, ~0}, + /* [163] = 163 */ { 16, ~0}, + /* [164] = 164 */ { 8, ~0}, + /* [165] = 165 */ { 12, ~0}, + /* [166] = 166 */ { 12, ~0}, + /* [167] = 167 */ { 12, ~0}, + /* [168] = 168 */ { 12, 24}, + /* [169] = 169 */ { 12, 25}, + /* [170] = 170 */ { 12, 26}, + /* [171] = 171 */ { 8, ~0}, + /* [172] = 172 */ { 24, ~0}, + /* [173] = 173 */ { 40, 27}, + /* [174] = 174 */ { 20, ~0}, + /* [175] = 175 */ { 52, ~0}, + /* [176] = 176 */ { 4, ~0}, + /* [177] = 177 */ { 68, ~0}, + /* [178] = 178 */ {132, ~0}, + /* [179] = 179 */ { 8, ~0}, + /* [180] = 180 */ { 68, ~0}, + /* [181] = 181 */ {132, ~0}, + /* [182] = 182 */ { 52, ~0}, + /* [183] = 183 */ { 4, ~0}, + /* [184] = 184 */ { 4, ~0}, + /* [185] = 185 */ { 36, ~0}, + /* [186] = 186 */ { 20, ~0}, + /* [187] = 187 */ { 28, ~0}, + /* [188] = 188 */ { 16, ~0}, + /* [189] = 189 */ { 28, ~0}, + /* [190] = 190 */ { 16, ~0}, + /* [191] = 191 */ { 20, ~0}, + /* [192] = 192 */ { 12, ~0}, + /* [193] = 193 */ { 16, 28}, + /* [194] = 194 */ { 8, ~0}, + /* [195] = 195 */ { 44, 29}, + /* [196] = 196 */ { 24, ~0}, + /* [197] = 197 */ { 8, ~0}, + /* [198] = 198 */ { 16, ~0}, + /* [199] = 199 */ { 12, ~0}, + /* [200] = 200 */ { 12, ~0}, + /* [201] = 201 */ { 12, ~0}, + /* [202] = 202 */ { 24, ~0}, + /* [203] = 203 */ { 16, ~0}, + /* [204] = 204 */ { 16, ~0}, + /* [205] = 205 */ { 12, ~0}, + /* [206] = 206 */ { 32, ~0}, + /* [207] = 207 */ { 20, ~0}, + /* [208] = 208 */ { 20, ~0}, + /* [209] = 209 */ { 16, ~0}, + /* [210] = 210 */ { 40, ~0}, + /* [211] = 211 */ { 24, ~0}, + /* [212] = 212 */ { 24, ~0}, + /* [213] = 213 */ { 16, ~0}, + /* [214] = 214 */ { 28, 30}, + /* [215] = 215 */ { 32, 31}, + /* [216] = 216 */ { 36, 32}, + /* [217] = 217 */ { 28, 33}, + /* [218] = 218 */ { 36, 34}, + /* [219] = 219 */ { 44, 35}, + /* [220] = 220 */ { 0, ~0}, + /* [221] = 221 */ { 0, ~0}, + /* [222] = 222 */ { 0, ~0}, + /* [223] = 223 */ { 0, ~0}, + /* [224] = 224 */ { 0, ~0}, + /* [225] = 225 */ { 0, ~0}, + /* [226] = 226 */ { 0, ~0}, + /* [227] = 227 */ { 0, ~0}, + /* [228] = 228 */ { 0, ~0}, + /* [229] = 229 */ { 12, ~0}, + /* [230] = 230 */ { 16, ~0}, + /* [231] = 231 */ { 12, ~0}, + /* [232] = 232 */ { 8, ~0}, + /* [233] = 233 */ { 8, 36}, + /* [234] = 234 */ { 0, ~0}, + /* [235] = 235 */ { 0, ~0}, + /* [236] = 236 */ { 0, ~0}, + /* [237] = 237 */ { 0, ~0}, + /* [238] = 238 */ { 0, ~0}, + /* [239] = 239 */ { 0, ~0}, + /* [240] = 2048 */ { 12, ~0}, + /* [241] = 2049 */ { 8, ~0}, + /* [242] = 2050 */ { 0, ~0}, + /* [243] = 2051 */ { 0, ~0}, + /* [244] = 2052 */ { 0, ~0}, + /* [245] = 2053 */ { 44, 37}, + /* [246] = 2054 */ { 12, 38}, + /* [247] = 2055 */ { 12, 39}, + /* [248] = 2056 */ { 24, ~0}, + /* [249] = 2057 */ { 0, ~0}, + /* [250] = 2058 */ { 0, ~0}, + /* [251] = 2059 */ { 0, ~0}, + /* [252] = 2060 */ { 0, ~0}, + /* [253] = 2061 */ { 0, ~0}, + /* [254] = 2062 */ { 0, ~0}, + /* [255] = 2063 */ { 0, ~0}, + /* [256] = 2064 */ { 0, ~0}, + /* [257] = 2065 */ { 12, ~0}, + /* [258] = 2066 */ { 8, 40}, + /* [259] = 2067 */ { 0, ~0}, + /* [260] = 2068 */ { 0, ~0}, + /* [261] = 2069 */ { 0, ~0}, + /* [262] = 2070 */ { 0, ~0}, + /* [263] = 2071 */ { 0, ~0}, + /* [264] = 4096 */ { 20, ~0}, + /* [265] = 4097 */ { 8, ~0}, + /* [266] = 4098 */ { 0, ~0}, + /* [267] = 4099 */ { 60, 41}, + /* [268] = 4100 */ { 60, 42}, + /* [269] = 4101 */ { 48, 43}, + /* [270] = 4102 */ { 48, 44}, + /* [271] = 4103 */ { 16, ~0}, + /* [272] = 4104 */ { 12, 45}, + /* [273] = 4105 */ { 16, ~0}, + /* [274] = 4106 */ { 12, 46}, + /* [275] = 4107 */ { 24, ~0}, + /* [276] = 4108 */ { 28, ~0}, + /* [277] = 4109 */ { 32, 47}, + /* [278] = 4110 */ { 20, ~0}, + /* [279] = 4111 */ { 16, ~0}, + /* [280] = 4112 */ { 8, ~0}, + /* [281] = 4113 */ { 8, ~0}, + /* [282] = 4114 */ { 84, 48}, + /* [283] = 4115 */ { 92, 49}, + /* [284] = 4116 */ { 0, ~0}, + /* [285] = 4117 */ { 12, ~0}, + /* [286] = 4118 */ { 8, 50}, + /* [287] = 4119 */ { 32, ~0}, + /* [288] = 4120 */ { 36, ~0}, + /* [289] = 4121 */ { 28, ~0}, + /* [290] = 4122 */ { 36, ~0}, + /* [291] = 4123 */ { 40, ~0}, + /* [292] = 4124 */ { 8, ~0}, + /* [293] = 4125 */ { 12, ~0}, + /* [294] = 4126 */ { 8, ~0}, + /* [295] = 4127 */ { 12, ~0}, + /* [296] = 4176 */ { 0, ~0}, + /* [297] = 4177 */ { 0, ~0}, + /* [298] = 4178 */ { 0, ~0}, + /* [299] = 4179 */ { 0, ~0}, + /* [300] = 4180 */ { 12, ~0}, + /* [301] = 4181 */ { 28, ~0}, + /* [302] = 4182 */ { 8, 51}, + /* [303] = 4183 */ { 16, 52}, + /* [304] = 4184 */ { 28, ~0}, + /* [305] = 4185 */ { 44, ~0}, + /* [306] = 4186 */ { 16, 53}, + /* [307] = 4187 */ { 16, 54}, + /* [308] = 4188 */ { 20, ~0}, + /* [309] = 4189 */ { 12, ~0}, + /* [310] = 4190 */ { 12, ~0}, + /* [311] = 4191 */ { 16, ~0}, + /* [312] = 4192 */ { 16, ~0}, + /* [313] = 4193 */ { 12, ~0}, + /* [314] = 4194 */ { 16, ~0}, + /* [315] = 4195 */ { 20, ~0}, + /* [316] = 4196 */ { 24, ~0}, + /* [317] = 4197 */ { 16, ~0}, + /* [318] = 4198 */ { 24, ~0}, + /* [319] = 4199 */ { 32, ~0}, + /* [320] = 4200 */ { 40, ~0}, + /* [321] = 4201 */ { 12, ~0}, + /* [322] = 4202 */ { 12, 55}, + /* [323] = 4203 */ { 12, 56}, + /* [324] = 4204 */ { 12, 57}, + /* [325] = 4205 */ { 12, 58}, + /* [326] = 4206 */ { 12, 59}, + /* [327] = 4207 */ { 12, 60}, + /* [328] = 4208 */ { 12, 61}, + /* [329] = 4209 */ { 12, 62}, + /* [330] = 4210 */ { 12, 63}, + /* [331] = 4211 */ { 12, 64}, + /* [332] = 4212 */ { 12, 65}, + /* [333] = 4213 */ { 12, 66}, + /* [334] = 4214 */ { 12, 67}, + /* [335] = 4215 */ { 28, ~0}, + /* [336] = 4216 */ { 44, ~0}, + /* [337] = 4217 */ { 16, 68}, + /* [338] = 4218 */ { 28, 69}, + /* [339] = 4219 */ { 44, 70}, + /* [340] = 4220 */ { 8, ~0}, + /* [341] = 4221 */ { 12, ~0}, + /* [342] = 4222 */ { 8, 71}, + /* [343] = 4223 */ { 0, ~0}, + /* [344] = 4224 */ { 0, ~0}, + /* [345] = 4225 */ { 0, ~0}, + /* [346] = 4226 */ { 0, ~0}, + /* [347] = 4227 */ { 0, ~0}, + /* [348] = 4228 */ { 12, ~0}, + /* [349] = 4229 */ { 0, ~0}, + /* [350] = 4230 */ { 12, ~0}, + /* [351] = 4231 */ { 24, ~0}, + /* [352] = 4232 */ { 12, ~0}, + /* [353] = 4233 */ { 16, ~0}, + /* [354] = 4234 */ { 24, ~0}, + /* [355] = 4235 */ { 12, ~0}, + /* [356] = 4236 */ { 16, ~0}, + /* [357] = 4237 */ { 24, ~0}, + /* [358] = 4238 */ { 16, ~0}, + /* [359] = 4239 */ { 24, ~0}, + /* [360] = 4128 */ { 16, ~0}, + /* [361] = 4129 */ { 16, ~0}, + /* [362] = 4130 */ { 28, ~0}, + /* [363] = 4131 */ { 8, ~0}, + /* [364] = 4132 */ { 12, ~0}, + /* [365] = 4133 */ { 16, ~0}, + /* [366] = 4134 */ { 20, ~0}, + /* [367] = 4135 */ { 0, ~0}, + /* [368] = 4264 */ { 0, ~0}, + /* [369] = 4265 */ { 12, ~0}, + /* [370] = 4266 */ { 12, ~0}, + /* [371] = 4267 */ { 16, ~0}, + /* [372] = 4268 */ { 16, ~0}, + /* [373] = 4269 */ { 12, ~0}, + /* [374] = 4270 */ { 16, ~0}, + /* [375] = 4271 */ { 20, ~0}, + /* [376] = 4272 */ { 24, ~0}, + /* [377] = 4273 */ { 16, ~0}, + /* [378] = 4274 */ { 24, ~0}, + /* [379] = 4275 */ { 32, ~0}, + /* [380] = 4276 */ { 40, ~0}, + /* [381] = 4277 */ { 12, ~0}, + /* [382] = 4278 */ { 0, ~0}, + /* [383] = 4279 */ { 0, ~0}, + /* [384] = 4312 */ { 0, ~0}, + /* [385] = 4313 */ { 0, ~0}, + /* [386] = 4314 */ { 0, ~0}, + /* [387] = 4315 */ { 0, ~0}, + /* [388] = 4316 */ { 12, ~0}, + /* [389] = 4317 */ { 8, 72}, + /* [390] = 4318 */ { 20, ~0}, + /* [391] = 4319 */ { 12, ~0}, + /* [392] = 4320 */ { 8, 73}, + /* [393] = 4321 */ { 24, ~0}, + /* [394] = 4322 */ { 24, ~0}, + /* [395] = 4323 */ { 28, ~0}, + /* [396] = 4324 */ { 20, ~0}, + /* [397] = 4325 */ { 8, ~0}, + /* [398] = 4326 */ { 0, ~0}, + /* [399] = 4327 */ { 0, ~0}, +}; + +static const gl_proto_size_func Render_size_func_table[74] = { + __glXCallListsReqSize, + __glXBitmapReqSize, + __glXFogfvReqSize, + __glXFogivReqSize, + __glXLightfvReqSize, + __glXLightivReqSize, + __glXLightModelfvReqSize, + __glXLightModelivReqSize, + __glXMaterialfvReqSize, + __glXMaterialivReqSize, + __glXPolygonStippleReqSize, + __glXTexParameterfvReqSize, + __glXTexParameterivReqSize, + __glXTexImage1DReqSize, + __glXTexImage2DReqSize, + __glXTexEnvfvReqSize, + __glXTexEnvivReqSize, + __glXTexGendvReqSize, + __glXTexGenfvReqSize, + __glXTexGenivReqSize, + __glXMap1dReqSize, + __glXMap1fReqSize, + __glXMap2dReqSize, + __glXMap2fReqSize, + __glXPixelMapfvReqSize, + __glXPixelMapuivReqSize, + __glXPixelMapusvReqSize, + __glXDrawPixelsReqSize, + __glXDrawArraysReqSize, + __glXColorSubTableReqSize, + __glXCompressedTexImage1DARBReqSize, + __glXCompressedTexImage2DARBReqSize, + __glXCompressedTexImage3DARBReqSize, + __glXCompressedTexSubImage1DARBReqSize, + __glXCompressedTexSubImage2DARBReqSize, + __glXCompressedTexSubImage3DARBReqSize, + __glXDrawBuffersARBReqSize, + __glXColorTableReqSize, + __glXColorTableParameterfvReqSize, + __glXColorTableParameterivReqSize, + __glXPointParameterfvEXTReqSize, + __glXTexSubImage1DReqSize, + __glXTexSubImage2DReqSize, + __glXConvolutionFilter1DReqSize, + __glXConvolutionFilter2DReqSize, + __glXConvolutionParameterfvReqSize, + __glXConvolutionParameterivReqSize, + __glXSeparableFilter2DReqSize, + __glXTexImage3DReqSize, + __glXTexSubImage3DReqSize, + __glXPrioritizeTexturesReqSize, + __glXRequestResidentProgramsNVReqSize, + __glXLoadProgramNVReqSize, + __glXProgramParameters4fvNVReqSize, + __glXProgramParameters4dvNVReqSize, + __glXVertexAttribs1svNVReqSize, + __glXVertexAttribs2svNVReqSize, + __glXVertexAttribs3svNVReqSize, + __glXVertexAttribs4svNVReqSize, + __glXVertexAttribs1fvNVReqSize, + __glXVertexAttribs2fvNVReqSize, + __glXVertexAttribs3fvNVReqSize, + __glXVertexAttribs4fvNVReqSize, + __glXVertexAttribs1dvNVReqSize, + __glXVertexAttribs2dvNVReqSize, + __glXVertexAttribs3dvNVReqSize, + __glXVertexAttribs4dvNVReqSize, + __glXVertexAttribs4ubvNVReqSize, + __glXProgramStringARBReqSize, + __glXProgramNamedParameter4fvNVReqSize, + __glXProgramNamedParameter4dvNVReqSize, + __glXPointParameterivNVReqSize, + __glXDeleteRenderbuffersEXTReqSize, + __glXDeleteFramebuffersEXTReqSize, +}; + +const struct __glXDispatchInfo Render_dispatch_info = { + 13, + Render_dispatch_tree, + Render_function_table, + Render_size_table, + Render_size_func_table +}; + +/*****************************************************************/ +/* tree depth = 13 */ +static const int_fast16_t VendorPriv_dispatch_tree[155] = { + /* [0] -> opcode range [0, 131072], node depth 1 */ + 2, + 5, + EMPTY_LEAF, + 119, + EMPTY_LEAF, + + /* [5] -> opcode range [0, 32768], node depth 2 */ + 1, + 8, + EMPTY_LEAF, + + /* [8] -> opcode range [0, 16384], node depth 3 */ + 1, + 11, + EMPTY_LEAF, + + /* [11] -> opcode range [0, 8192], node depth 4 */ + 2, + 16, + EMPTY_LEAF, + 78, + EMPTY_LEAF, + + /* [16] -> opcode range [0, 2048], node depth 5 */ + 2, + 21, + EMPTY_LEAF, + 36, + EMPTY_LEAF, + + /* [21] -> opcode range [0, 512], node depth 6 */ + 1, + 24, + EMPTY_LEAF, + + /* [24] -> opcode range [0, 256], node depth 7 */ + 1, + 27, + EMPTY_LEAF, + + /* [27] -> opcode range [0, 128], node depth 8 */ + 1, + 30, + EMPTY_LEAF, + + /* [30] -> opcode range [0, 64], node depth 9 */ + 1, + 33, + EMPTY_LEAF, + + /* [33] -> opcode range [0, 32], node depth 10 */ + 1, + LEAF(0), + EMPTY_LEAF, + + /* [36] -> opcode range [1024, 1536], node depth 6 */ + 2, + 41, + EMPTY_LEAF, + 53, + 67, + + /* [41] -> opcode range [1024, 1152], node depth 7 */ + 1, + 44, + EMPTY_LEAF, + + /* [44] -> opcode range [1024, 1088], node depth 8 */ + 1, + 47, + EMPTY_LEAF, + + /* [47] -> opcode range [1024, 1056], node depth 9 */ + 1, + 50, + EMPTY_LEAF, + + /* [50] -> opcode range [1024, 1040], node depth 10 */ + 1, + LEAF(16), + EMPTY_LEAF, + + /* [53] -> opcode range [1280, 1408], node depth 7 */ + 1, + 56, + EMPTY_LEAF, + + /* [56] -> opcode range [1280, 1344], node depth 8 */ + 2, + 61, + LEAF(24), + EMPTY_LEAF, + 64, + + /* [61] -> opcode range [1280, 1296], node depth 9 */ + 1, + EMPTY_LEAF, + LEAF(40), + + /* [64] -> opcode range [1328, 1344], node depth 9 */ + 1, + LEAF(48), + EMPTY_LEAF, + + /* [67] -> opcode range [1408, 1536], node depth 7 */ + 1, + 70, + EMPTY_LEAF, + + /* [70] -> opcode range [1408, 1472], node depth 8 */ + 1, + 73, + EMPTY_LEAF, + + /* [73] -> opcode range [1408, 1440], node depth 9 */ + 2, + EMPTY_LEAF, + LEAF(56), + LEAF(64), + EMPTY_LEAF, + + /* [78] -> opcode range [4096, 6144], node depth 5 */ + 2, + 83, + EMPTY_LEAF, + 101, + EMPTY_LEAF, + + /* [83] -> opcode range [4096, 4608], node depth 6 */ + 1, + 86, + EMPTY_LEAF, + + /* [86] -> opcode range [4096, 4352], node depth 7 */ + 1, + 89, + EMPTY_LEAF, + + /* [89] -> opcode range [4096, 4224], node depth 8 */ + 1, + 92, + EMPTY_LEAF, + + /* [92] -> opcode range [4096, 4160], node depth 9 */ + 1, + 95, + EMPTY_LEAF, + + /* [95] -> opcode range [4096, 4128], node depth 10 */ + 1, + 98, + EMPTY_LEAF, + + /* [98] -> opcode range [4096, 4112], node depth 11 */ + 1, + LEAF(72), + EMPTY_LEAF, + + /* [101] -> opcode range [5120, 5632], node depth 6 */ + 1, + 104, + EMPTY_LEAF, + + /* [104] -> opcode range [5120, 5376], node depth 7 */ + 1, + 107, + EMPTY_LEAF, + + /* [107] -> opcode range [5120, 5248], node depth 8 */ + 1, + 110, + EMPTY_LEAF, + + /* [110] -> opcode range [5120, 5184], node depth 9 */ + 1, + EMPTY_LEAF, + 113, + + /* [113] -> opcode range [5152, 5184], node depth 10 */ + 1, + 116, + EMPTY_LEAF, + + /* [116] -> opcode range [5152, 5168], node depth 11 */ + 1, + LEAF(80), + EMPTY_LEAF, + + /* [119] -> opcode range [65536, 98304], node depth 2 */ + 1, + 122, + EMPTY_LEAF, + + /* [122] -> opcode range [65536, 81920], node depth 3 */ + 1, + 125, + EMPTY_LEAF, + + /* [125] -> opcode range [65536, 73728], node depth 4 */ + 1, + 128, + EMPTY_LEAF, + + /* [128] -> opcode range [65536, 69632], node depth 5 */ + 1, + 131, + EMPTY_LEAF, + + /* [131] -> opcode range [65536, 67584], node depth 6 */ + 1, + 134, + EMPTY_LEAF, + + /* [134] -> opcode range [65536, 66560], node depth 7 */ + 1, + 137, + EMPTY_LEAF, + + /* [137] -> opcode range [65536, 66048], node depth 8 */ + 1, + 140, + EMPTY_LEAF, + + /* [140] -> opcode range [65536, 65792], node depth 9 */ + 1, + 143, + EMPTY_LEAF, + + /* [143] -> opcode range [65536, 65664], node depth 10 */ + 1, + 146, + EMPTY_LEAF, + + /* [146] -> opcode range [65536, 65600], node depth 11 */ + 1, + 149, + EMPTY_LEAF, + + /* [149] -> opcode range [65536, 65568], node depth 12 */ + 1, + 152, + EMPTY_LEAF, + + /* [152] -> opcode range [65536, 65552], node depth 13 */ + 1, + LEAF(88), + EMPTY_LEAF, + +}; + +static const void *VendorPriv_function_table[96][2] = { + /* [ 0] = 0 */ {NULL, NULL}, + /* [ 1] = 1 */ {__glXDisp_GetConvolutionFilterEXT, __glXDispSwap_GetConvolutionFilterEXT}, + /* [ 2] = 2 */ {__glXDisp_GetConvolutionParameterfvEXT, __glXDispSwap_GetConvolutionParameterfvEXT}, + /* [ 3] = 3 */ {__glXDisp_GetConvolutionParameterivEXT, __glXDispSwap_GetConvolutionParameterivEXT}, + /* [ 4] = 4 */ {__glXDisp_GetSeparableFilterEXT, __glXDispSwap_GetSeparableFilterEXT}, + /* [ 5] = 5 */ {__glXDisp_GetHistogramEXT, __glXDispSwap_GetHistogramEXT}, + /* [ 6] = 6 */ {__glXDisp_GetHistogramParameterfvEXT, __glXDispSwap_GetHistogramParameterfvEXT}, + /* [ 7] = 7 */ {__glXDisp_GetHistogramParameterivEXT, __glXDispSwap_GetHistogramParameterivEXT}, + /* [ 8] = 8 */ {__glXDisp_GetMinmaxEXT, __glXDispSwap_GetMinmaxEXT}, + /* [ 9] = 9 */ {__glXDisp_GetMinmaxParameterfvEXT, __glXDispSwap_GetMinmaxParameterfvEXT}, + /* [ 10] = 10 */ {__glXDisp_GetMinmaxParameterivEXT, __glXDispSwap_GetMinmaxParameterivEXT}, + /* [ 11] = 11 */ {__glXDisp_AreTexturesResidentEXT, __glXDispSwap_AreTexturesResidentEXT}, + /* [ 12] = 12 */ {__glXDisp_DeleteTexturesEXT, __glXDispSwap_DeleteTexturesEXT}, + /* [ 13] = 13 */ {__glXDisp_GenTexturesEXT, __glXDispSwap_GenTexturesEXT}, + /* [ 14] = 14 */ {__glXDisp_IsTextureEXT, __glXDispSwap_IsTextureEXT}, + /* [ 15] = 15 */ {NULL, NULL}, + /* [ 16] = 1024 */ {__glXDisp_QueryContextInfoEXT, __glXDispSwap_QueryContextInfoEXT}, + /* [ 17] = 1025 */ {NULL, NULL}, + /* [ 18] = 1026 */ {NULL, NULL}, + /* [ 19] = 1027 */ {NULL, NULL}, + /* [ 20] = 1028 */ {NULL, NULL}, + /* [ 21] = 1029 */ {NULL, NULL}, + /* [ 22] = 1030 */ {NULL, NULL}, + /* [ 23] = 1031 */ {NULL, NULL}, + /* [ 24] = 1296 */ {__glXDisp_GetProgramEnvParameterfvARB, __glXDispSwap_GetProgramEnvParameterfvARB}, + /* [ 25] = 1297 */ {__glXDisp_GetProgramEnvParameterdvARB, __glXDispSwap_GetProgramEnvParameterdvARB}, + /* [ 26] = 1298 */ {__glXDisp_GetProgramivNV, __glXDispSwap_GetProgramivNV}, + /* [ 27] = 1299 */ {__glXDisp_GetProgramStringNV, __glXDispSwap_GetProgramStringNV}, + /* [ 28] = 1300 */ {__glXDisp_GetTrackMatrixivNV, __glXDispSwap_GetTrackMatrixivNV}, + /* [ 29] = 1301 */ {__glXDisp_GetVertexAttribdvARB, __glXDispSwap_GetVertexAttribdvARB}, + /* [ 30] = 1302 */ {__glXDisp_GetVertexAttribfvNV, __glXDispSwap_GetVertexAttribfvNV}, + /* [ 31] = 1303 */ {__glXDisp_GetVertexAttribivNV, __glXDispSwap_GetVertexAttribivNV}, + /* [ 32] = 1304 */ {__glXDisp_IsProgramNV, __glXDispSwap_IsProgramNV}, + /* [ 33] = 1305 */ {__glXDisp_GetProgramLocalParameterfvARB, __glXDispSwap_GetProgramLocalParameterfvARB}, + /* [ 34] = 1306 */ {__glXDisp_GetProgramLocalParameterdvARB, __glXDispSwap_GetProgramLocalParameterdvARB}, + /* [ 35] = 1307 */ {__glXDisp_GetProgramivARB, __glXDispSwap_GetProgramivARB}, + /* [ 36] = 1308 */ {__glXDisp_GetProgramStringARB, __glXDispSwap_GetProgramStringARB}, + /* [ 37] = 1309 */ {NULL, NULL}, + /* [ 38] = 1310 */ {__glXDisp_GetProgramNamedParameterfvNV, __glXDispSwap_GetProgramNamedParameterfvNV}, + /* [ 39] = 1311 */ {__glXDisp_GetProgramNamedParameterdvNV, __glXDispSwap_GetProgramNamedParameterdvNV}, + /* [ 40] = 1288 */ {NULL, NULL}, + /* [ 41] = 1289 */ {NULL, NULL}, + /* [ 42] = 1290 */ {NULL, NULL}, + /* [ 43] = 1291 */ {NULL, NULL}, + /* [ 44] = 1292 */ {NULL, NULL}, + /* [ 45] = 1293 */ {__glXDisp_AreProgramsResidentNV, __glXDispSwap_AreProgramsResidentNV}, + /* [ 46] = 1294 */ {__glXDisp_DeleteProgramsNV, __glXDispSwap_DeleteProgramsNV}, + /* [ 47] = 1295 */ {__glXDisp_GenProgramsNV, __glXDispSwap_GenProgramsNV}, + /* [ 48] = 1328 */ {NULL, NULL}, + /* [ 49] = 1329 */ {NULL, NULL}, + /* [ 50] = 1330 */ {__glXDisp_BindTexImageEXT, __glXDispSwap_BindTexImageEXT}, + /* [ 51] = 1331 */ {__glXDisp_ReleaseTexImageEXT, __glXDispSwap_ReleaseTexImageEXT}, + /* [ 52] = 1332 */ {NULL, NULL}, + /* [ 53] = 1333 */ {NULL, NULL}, + /* [ 54] = 1334 */ {NULL, NULL}, + /* [ 55] = 1335 */ {NULL, NULL}, + /* [ 56] = 1416 */ {NULL, NULL}, + /* [ 57] = 1417 */ {NULL, NULL}, + /* [ 58] = 1418 */ {NULL, NULL}, + /* [ 59] = 1419 */ {NULL, NULL}, + /* [ 60] = 1420 */ {NULL, NULL}, + /* [ 61] = 1421 */ {NULL, NULL}, + /* [ 62] = 1422 */ {__glXDisp_IsRenderbufferEXT, __glXDispSwap_IsRenderbufferEXT}, + /* [ 63] = 1423 */ {__glXDisp_GenRenderbuffersEXT, __glXDispSwap_GenRenderbuffersEXT}, + /* [ 64] = 1424 */ {__glXDisp_GetRenderbufferParameterivEXT, __glXDispSwap_GetRenderbufferParameterivEXT}, + /* [ 65] = 1425 */ {__glXDisp_IsFramebufferEXT, __glXDispSwap_IsFramebufferEXT}, + /* [ 66] = 1426 */ {__glXDisp_GenFramebuffersEXT, __glXDispSwap_GenFramebuffersEXT}, + /* [ 67] = 1427 */ {__glXDisp_CheckFramebufferStatusEXT, __glXDispSwap_CheckFramebufferStatusEXT}, + /* [ 68] = 1428 */ {__glXDisp_GetFramebufferAttachmentParameterivEXT, __glXDispSwap_GetFramebufferAttachmentParameterivEXT}, + /* [ 69] = 1429 */ {NULL, NULL}, + /* [ 70] = 1430 */ {NULL, NULL}, + /* [ 71] = 1431 */ {NULL, NULL}, + /* [ 72] = 4096 */ {NULL, NULL}, + /* [ 73] = 4097 */ {NULL, NULL}, + /* [ 74] = 4098 */ {__glXDisp_GetColorTableSGI, __glXDispSwap_GetColorTableSGI}, + /* [ 75] = 4099 */ {__glXDisp_GetColorTableParameterfvSGI, __glXDispSwap_GetColorTableParameterfvSGI}, + /* [ 76] = 4100 */ {__glXDisp_GetColorTableParameterivSGI, __glXDispSwap_GetColorTableParameterivSGI}, + /* [ 77] = 4101 */ {NULL, NULL}, + /* [ 78] = 4102 */ {NULL, NULL}, + /* [ 79] = 4103 */ {NULL, NULL}, + /* [ 80] = 5152 */ {NULL, NULL}, + /* [ 81] = 5153 */ {NULL, NULL}, + /* [ 82] = 5154 */ {__glXDisp_CopySubBufferMESA, __glXDispSwap_CopySubBufferMESA}, + /* [ 83] = 5155 */ {NULL, NULL}, + /* [ 84] = 5156 */ {NULL, NULL}, + /* [ 85] = 5157 */ {NULL, NULL}, + /* [ 86] = 5158 */ {NULL, NULL}, + /* [ 87] = 5159 */ {NULL, NULL}, + /* [ 88] = 65536 */ {__glXDisp_SwapIntervalSGI, __glXDispSwap_SwapIntervalSGI}, + /* [ 89] = 65537 */ {__glXDisp_MakeCurrentReadSGI, __glXDispSwap_MakeCurrentReadSGI}, + /* [ 90] = 65538 */ {NULL, NULL}, + /* [ 91] = 65539 */ {NULL, NULL}, + /* [ 92] = 65540 */ {__glXDisp_GetFBConfigsSGIX, __glXDispSwap_GetFBConfigsSGIX}, + /* [ 93] = 65541 */ {__glXDisp_CreateContextWithConfigSGIX, __glXDispSwap_CreateContextWithConfigSGIX}, + /* [ 94] = 65542 */ {__glXDisp_CreateGLXPixmapWithConfigSGIX, __glXDispSwap_CreateGLXPixmapWithConfigSGIX}, + /* [ 95] = 65543 */ {NULL, NULL}, +}; + +const struct __glXDispatchInfo VendorPriv_dispatch_info = { + 17, + VendorPriv_dispatch_tree, + VendorPriv_function_table, + NULL, + NULL +}; + diff --git a/GL/glx/indirect_table.h b/GL/glx/indirect_table.h new file mode 100644 index 000000000..4af1ccbea --- /dev/null +++ b/GL/glx/indirect_table.h @@ -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 + */ + +#ifndef INDIRECT_TABLE_H +#define INDIRECT_TABLE_H + +#include + +/** + */ +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 */ diff --git a/GL/glx/indirect_texture_compression.c b/GL/glx/indirect_texture_compression.c new file mode 100644 index 000000000..35af1d235 --- /dev/null +++ b/GL/glx/indirect_texture_compression.c @@ -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 +#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 +#elif defined(__OpenBSD__) +#include +#define bswap_16 __swap16 +#define bswap_32 __swap32 +#define bswap_64 __swap64 +#else +#include +#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; +} diff --git a/GL/glx/indirect_util.c b/GL/glx/indirect_util.c index c9d8600c8..09b7ab87c 100644 --- a/GL/glx/indirect_util.c +++ b/GL/glx/indirect_util.c @@ -28,7 +28,7 @@ #include #include #include -#ifdef __linux__ +#if defined(__linux__) || defined (__GLIBC__) || defined(__GNU__) #include #elif defined(__OpenBSD__) #include @@ -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; +} diff --git a/GL/glx/indirect_util.h b/GL/glx/indirect_util.h index 3abe81f13..b00727a4d 100644 --- a/GL/glx/indirect_util.h +++ b/GL/glx/indirect_util.h @@ -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__ */ diff --git a/GL/glx/render2.c b/GL/glx/render2.c index b126638a1..5b3d3e6d0 100644 --- a/GL/glx/render2.c +++ b/GL/glx/render2.c @@ -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 diff --git a/GL/glx/render2swap.c b/GL/glx/render2swap.c index 81de81ff9..23b7ebd37 100644 --- a/GL/glx/render2swap.c +++ b/GL/glx/render2swap.c @@ -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 diff --git a/GL/glx/rensize.c b/GL/glx/rensize.c index d37958207..c69619a61 100644 --- a/GL/glx/rensize.c +++ b/GL/glx/rensize.c @@ -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; diff --git a/GL/glx/rensizetab.c b/GL/glx/rensizetab.c deleted file mode 100644 index c9bd1a73b..000000000 --- a/GL/glx/rensizetab.c +++ /dev/null @@ -1,2553 +0,0 @@ -/* $XFree86: xc/programs/Xserver/GL/glx/rensizetab.c,v 1.5 2004/01/28 18:11:53 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 -** 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. -** -*/ - -#ifdef HAVE_DIX_CONFIG_H -#include -#endif - -#include "glxserver.h" -#include "indirect_reqsize.h" -#include "g_disptab_EXT.h" - -__GLXrenderSizeData __glXRenderSizeTable[__GLX_MAX_RENDER_OPCODE_EXT - __GLX_MIN_RENDER_OPCODE_EXT + 1] = { - /* no such opcode */ { 0, 0 }, - /* CallList */ { 8, 0 }, - /* CallLists */ { 12, __glXCallListsReqSize }, - /* ListBase */ { 8, 0 }, - /* Begin */ { 8, 0 }, - /* Bitmap */ { 48, __glXBitmapReqSize }, - /* Color3bv */ { 8, 0 }, - /* Color3dv */ { 28, 0 }, - /* Color3fv */ { 16, 0 }, - /* Color3iv */ { 16, 0 }, - /* Color3sv */ { 12, 0 }, - /* Color3ubv */ { 8, 0 }, - /* Color3uiv */ { 16, 0 }, - /* Color3usv */ { 12, 0 }, - /* Color4bv */ { 8, 0 }, - /* Color4dv */ { 36, 0 }, - /* Color4fv */ { 20, 0 }, - /* Color4iv */ { 20, 0 }, - /* Color4sv */ { 12, 0 }, - /* Color4ubv */ { 8, 0 }, - /* Color4uiv */ { 20, 0 }, - /* Color4usv */ { 12, 0 }, - /* EdgeFlagv */ { 8, 0 }, - /* End */ { 4, 0 }, - /* Indexdv */ { 12, 0 }, - /* Indexfv */ { 8, 0 }, - /* Indexiv */ { 8, 0 }, - /* Indexsv */ { 8, 0 }, - /* Normal3bv */ { 8, 0 }, - /* Normal3dv */ { 28, 0 }, - /* Normal3fv */ { 16, 0 }, - /* Normal3iv */ { 16, 0 }, - /* Normal3sv */ { 12, 0 }, - /* RasterPos2dv */ { 20, 0 }, - /* RasterPos2fv */ { 12, 0 }, - /* RasterPos2iv */ { 12, 0 }, - /* RasterPos2sv */ { 8, 0 }, - /* RasterPos3dv */ { 28, 0 }, - /* RasterPos3fv */ { 16, 0 }, - /* RasterPos3iv */ { 16, 0 }, - /* RasterPos3sv */ { 12, 0 }, - /* RasterPos4dv */ { 36, 0 }, - /* RasterPos4fv */ { 20, 0 }, - /* RasterPos4iv */ { 20, 0 }, - /* RasterPos4sv */ { 12, 0 }, - /* Rectdv */ { 36, 0 }, - /* Rectfv */ { 20, 0 }, - /* Rectiv */ { 20, 0 }, - /* Rectsv */ { 12, 0 }, - /* TexCoord1dv */ { 12, 0 }, - /* TexCoord1fv */ { 8, 0 }, - /* TexCoord1iv */ { 8, 0 }, - /* TexCoord1sv */ { 8, 0 }, - /* TexCoord2dv */ { 20, 0 }, - /* TexCoord2fv */ { 12, 0 }, - /* TexCoord2iv */ { 12, 0 }, - /* TexCoord2sv */ { 8, 0 }, - /* TexCoord3dv */ { 28, 0 }, - /* TexCoord3fv */ { 16, 0 }, - /* TexCoord3iv */ { 16, 0 }, - /* TexCoord3sv */ { 12, 0 }, - /* TexCoord4dv */ { 36, 0 }, - /* TexCoord4fv */ { 20, 0 }, - /* TexCoord4iv */ { 20, 0 }, - /* TexCoord4sv */ { 12, 0 }, - /* Vertex2dv */ { 20, 0 }, - /* Vertex2fv */ { 12, 0 }, - /* Vertex2iv */ { 12, 0 }, - /* Vertex2sv */ { 8, 0 }, - /* Vertex3dv */ { 28, 0 }, - /* Vertex3fv */ { 16, 0 }, - /* Vertex3iv */ { 16, 0 }, - /* Vertex3sv */ { 12, 0 }, - /* Vertex4dv */ { 36, 0 }, - /* Vertex4fv */ { 20, 0 }, - /* Vertex4iv */ { 20, 0 }, - /* Vertex4sv */ { 12, 0 }, - /* ClipPlane */ { 40, 0 }, - /* ColorMaterial */ { 12, 0 }, - /* CullFace */ { 8, 0 }, - /* Fogf */ { 12, 0 }, - /* Fogfv */ { 8, __glXFogfvReqSize }, - /* Fogi */ { 12, 0 }, - /* Fogiv */ { 8, __glXFogivReqSize }, - /* FrontFace */ { 8, 0 }, - /* Hint */ { 12, 0 }, - /* Lightf */ { 16, 0 }, - /* Lightfv */ { 12, __glXLightfvReqSize }, - /* Lighti */ { 16, 0 }, - /* Lightiv */ { 12, __glXLightivReqSize }, - /* LightModelf */ { 12, 0 }, - /* LightModelfv */ { 8, __glXLightModelfvReqSize }, - /* LightModeli */ { 12, 0 }, - /* LightModeliv */ { 8, __glXLightModelivReqSize }, - /* LineStipple */ { 12, 0 }, - /* LineWidth */ { 8, 0 }, - /* Materialf */ { 16, 0 }, - /* Materialfv */ { 12, __glXMaterialfvReqSize }, - /* Materiali */ { 16, 0 }, - /* Materialiv */ { 12, __glXMaterialivReqSize }, - /* PointSize */ { 8, 0 }, - /* PolygonMode */ { 12, 0 }, - /* PolygonStipple */ { 152, 0 }, - /* Scissor */ { 20, 0 }, - /* ShadeModel */ { 8, 0 }, - /* TexParameterf */ { 16, 0 }, - /* TexParameterfv */ { 12, __glXTexParameterfvReqSize }, - /* TexParameteri */ { 16, 0 }, - /* TexParameteriv */ { 12, __glXTexParameterivReqSize }, - /* TexImage1D */ { 56, __glXTexImage1DReqSize }, - /* TexImage2D */ { 56, __glXTexImage2DReqSize }, - /* TexEnvf */ { 16, 0 }, - /* TexEnvfv */ { 12, __glXTexEnvfvReqSize }, - /* TexEnvi */ { 16, 0 }, - /* TexEnviv */ { 12, __glXTexEnvivReqSize }, - /* TexGend */ { 20, 0 }, - /* TexGendv */ { 12, __glXTexGendvReqSize }, - /* TexGenf */ { 16, 0 }, - /* TexGenfv */ { 12, __glXTexGenfvReqSize }, - /* TexGeni */ { 16, 0 }, - /* TexGeniv */ { 12, __glXTexGenivReqSize }, - /* InitNames */ { 4, 0 }, - /* LoadName */ { 8, 0 }, - /* PassThrough */ { 8, 0 }, - /* PopName */ { 4, 0 }, - /* PushName */ { 8, 0 }, - /* DrawBuffer */ { 8, 0 }, - /* Clear */ { 8, 0 }, - /* ClearAccum */ { 20, 0 }, - /* ClearIndex */ { 8, 0 }, - /* ClearColor */ { 20, 0 }, - /* ClearStencil */ { 8, 0 }, - /* ClearDepth */ { 12, 0 }, - /* StencilMask */ { 8, 0 }, - /* ColorMask */ { 8, 0 }, - /* DepthMask */ { 8, 0 }, - /* IndexMask */ { 8, 0 }, - /* Accum */ { 12, 0 }, - /* Disable */ { 8, 0 }, - /* Enable */ { 8, 0 }, - /* no such opcode */ { 0, 0 }, - /* PopAttrib */ { 4, 0 }, - /* PushAttrib */ { 8, 0 }, - /* Map1d */ { 28, __glXMap1dReqSize }, - /* Map1f */ { 20, __glXMap1fReqSize }, - /* Map2d */ { 48, __glXMap2dReqSize }, - /* Map2f */ { 32, __glXMap2fReqSize }, - /* MapGrid1d */ { 24, 0 }, - /* MapGrid1f */ { 16, 0 }, - /* MapGrid2d */ { 44, 0 }, - /* MapGrid2f */ { 28, 0 }, - /* EvalCoord1dv */ { 12, 0 }, - /* EvalCoord1fv */ { 8, 0 }, - /* EvalCoord2dv */ { 20, 0 }, - /* EvalCoord2fv */ { 12, 0 }, - /* EvalMesh1 */ { 16, 0 }, - /* EvalPoint1 */ { 8, 0 }, - /* EvalMesh2 */ { 24, 0 }, - /* EvalPoint2 */ { 12, 0 }, - /* AlphaFunc */ { 12, 0 }, - /* BlendFunc */ { 12, 0 }, - /* LogicOp */ { 8, 0 }, - /* StencilFunc */ { 16, 0 }, - /* StencilOp */ { 16, 0 }, - /* DepthFunc */ { 8, 0 }, - /* PixelZoom */ { 12, 0 }, - /* PixelTransferf */ { 12, 0 }, - /* PixelTransferi */ { 12, 0 }, - /* PixelMapfv */ { 12, __glXPixelMapfvReqSize }, - /* PixelMapuiv */ { 12, __glXPixelMapuivReqSize }, - /* PixelMapusv */ { 12, __glXPixelMapusvReqSize }, - /* ReadBuffer */ { 8, 0 }, - /* CopyPixels */ { 24, 0 }, - /* DrawPixels */ { 40, __glXDrawPixelsReqSize }, - /* DepthRange */ { 20, 0 }, - /* Frustum */ { 52, 0 }, - /* LoadIdentity */ { 4, 0 }, - /* LoadMatrixf */ { 68, 0 }, - /* LoadMatrixd */ { 132, 0 }, - /* MatrixMode */ { 8, 0 }, - /* MultMatrixf */ { 68, 0 }, - /* MultMatrixd */ { 132, 0 }, - /* Ortho */ { 52, 0 }, - /* PopMatrix */ { 4, 0 }, - /* PushMatrix */ { 4, 0 }, - /* Rotated */ { 36, 0 }, - /* Rotatef */ { 20, 0 }, - /* Scaled */ { 28, 0 }, - /* Scalef */ { 16, 0 }, - /* Translated */ { 28, 0 }, - /* Translatef */ { 16, 0 }, - /* Viewport */ { 20, 0 }, - /* PolygonOffset */ { 12, 0 }, - /* DrawArrays */ { 16, __glXDrawArraysSize }, - /* Indexubv */ { 8, 0 }, - /* ColorSubTable */ { 44, __glXColorSubTableReqSize }, - /* CopyColorSubTable */ { 24, 0 }, - /* ActiveTextureARB */ { 8, 0 }, - /* MultiTexCoord1dvARB */ { 16, 0 }, - /* MultiTexCoord1fvARB */ { 12, 0 }, - /* MultiTexCoord1ivARB */ { 12, 0 }, - /* MultiTexCoord1svARB */ { 12, 0 }, - /* MultiTexCoord2dvARB */ { 24, 0 }, - /* MultiTexCoord2fvARB */ { 16, 0 }, - /* MultiTexCoord2ivARB */ { 16, 0 }, - /* MultiTexCoord2svARB */ { 12, 0 }, - /* MultiTexCoord3dvARB */ { 32, 0 }, - /* MultiTexCoord3fvARB */ { 20, 0 }, - /* MultiTexCoord3ivARB */ { 20, 0 }, - /* MultiTexCoord3svARB */ { 16, 0 }, - /* MultiTexCoord4dvARB */ { 40, 0 }, - /* MultiTexCoord4fvARB */ { 24, 0 }, - /* MultiTexCoord4ivARB */ { 24, 0 }, - /* MultiTexCoord4svARB 213 */ { 16, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode 220 */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* WindowPos3fvMESA 230 */ { 16, 0 }, -}; -__GLXrenderSizeData __glXRenderSizeTable_EXT[__GLX_MAX_RENDER_OPCODE_EXT - __GLX_MIN_RENDER_OPCODE_EXT + 1] = { - /* ColorTable 2053 */ { 44, __glXColorTableReqSize }, - /* ColorTableParameterfv */ { 12, __glXColorTableParameterfvReqSize }, - /* ColorTableParameteriv */ { 12, __glXColorTableParameterivReqSize }, - /* CopyColorTable */ { 24, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* PointParameterfEXT 2065 */ { 12, 0 }, - /* PointParameterfvEXT 2066 */ { 8, __glXPointParameterfvEXTReqSize }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* BlendColor */ { 20, 0 }, - /* BlendEquation */ { 8, 0 }, - /* no such opcode */ { 0, 0 }, - /* TexSubImage1D */ { 60, __glXTexSubImage1DReqSize }, - /* TexSubImage2D */ { 60, __glXTexSubImage2DReqSize }, - /* ConvolutionFilter1D */ { 48, __glXConvolutionFilter1DReqSize }, - /* ConvolutionFilter2D */ { 48, __glXConvolutionFilter2DReqSize }, - /* ConvolutionParameterf */ { 16, 0 }, - /* ConvolutionParameterfv */ { 12, __glXConvolutionParameterfvReqSize }, - /* ConvolutionParameteri */ { 16, 0 }, - /* ConvolutionParameteriv */ { 12, __glXConvolutionParameterivReqSize }, - /* CopyConvolutionFilter1D */ { 24, }, - /* CopyConvolutionFilter2D */ { 28, }, - /* SeparableFilter2D */ { 48, __glXSeparableFilter2DReqSize }, - /* Histogram */ { 20, }, - /* Minmax */ { 16, }, - /* ResetHistogram */ { 8, }, - /* ResetMinmax */ { 8, }, - /* TexImage3D */ { 84, __glXTexImage3DReqSize }, - /* TexSubImage3D */ { 92, __glXTexSubImage3DReqSize }, - /* DrawArrays */ { 16, __glXDrawArraysSize }, - /* BindTexture */ { 12, 0 }, - /* PrioritizeTextures */ { 8, __glXPrioritizeTexturesReqSize }, - /* CopyTexImage1D */ { 32, 0 }, - /* CopyTexImage2D */ { 36, 0 }, - /* CopyTexSubImage1D */ { 28, 0 }, - /* CopyTexSubImage2D */ { 36, 0 }, - /* CopyTexSubImage3D 4123 */ { 40, 0 }, - /* FogCoordfv 4124 */ { 8, 0 }, - /* FogCoorddv 4125 */ { 12, 0 }, - /* SecondaryColor3bv 4126 */ { 8, 0 }, - /* SecondaryColor3sv 4127 */ { 12, 0 }, - /* SecondaryColor3iv 4128 */ { 16, 0 }, - /* SecondaryColor3fv 4129 */ { 16, 0 }, - /* SecondaryColor3dv 4130 */ { 28, 0 }, - /* SecondaryColor3ubv 4131 */ { 8, 0 }, - /* SecondaryColor3usv 4132 */ { 12, 0 }, - /* SecondaryColor3uiv 4133 */ { 16, 0 }, - /* BlendFuncSeparate 4134 */ { 20, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* ActiveStencilFaceEXT 4220 */ { 8, 0 }, - /* PointParameteriNV 4221 */ { 12, 0 }, - /* PointParameterivNV 4222 */ { 8, __glXPointParameterivNVReqSize }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - /* no such opcode */ { 0, 0 }, - - /* BindRenderbufferEXT */ { 12, 0 }, - /* DeleteRenderbuffersEXT */ { 8, __glXDeleteRenderbuffersEXTReqSize }, - /* RenderbufferStorageEXT */ { 20, 0 }, - /* BindFramebufferEXT */ { 12, 0 }, - /* DeleteFramebuffersEXT */ { 8, __glXDeleteFramebuffersEXTReqSize }, - /* FramebufferTexture1DEXT */ { 24, 0 }, - /* FramebufferTexture2DEXT */ { 24, 0 }, - /* FramebufferTexture3DEXT */ { 28, 0 }, - /* FramebufferRenderbufferTexture3DEXT */ { 20, 0 }, - /* GenerateMipmapEXT */ { 8, 0 } -}; diff --git a/GL/glx/single2.c b/GL/glx/single2.c index efc7220f3..3387af2a2 100644 --- a/GL/glx/single2.c +++ b/GL/glx/single2.c @@ -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 diff --git a/GL/glx/single2swap.c b/GL/glx/single2swap.c index d1f56c2c2..41a42bb0f 100644 --- a/GL/glx/single2swap.c +++ b/GL/glx/single2swap.c @@ -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 diff --git a/GL/glx/singlepix.c b/GL/glx/singlepix.c index ae64db4ca..98898aa3a 100644 --- a/GL/glx/singlepix.c +++ b/GL/glx/singlepix.c @@ -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); +} diff --git a/GL/glx/singlepixswap.c b/GL/glx/singlepixswap.c index 91cebff46..032b42765 100644 --- a/GL/glx/singlepixswap.c +++ b/GL/glx/singlepixswap.c @@ -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); +} diff --git a/GL/glx/singlesize.c b/GL/glx/singlesize.c index 116c6dc41..b5a74f30d 100644 --- a/GL/glx/singlesize.c +++ b/GL/glx/singlesize.c @@ -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 diff --git a/GL/glx/swap_interval.c b/GL/glx/swap_interval.c new file mode 100644 index 000000000..c4137c1aa --- /dev/null +++ b/GL/glx/swap_interval.c @@ -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 +#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 +#elif defined(__OpenBSD__) +#include +#define bswap_16 __swap16 +#define bswap_32 __swap32 +#define bswap_64 __swap64 +#else +#include +#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); +} diff --git a/GL/glx/unpack.h b/GL/glx/unpack.h index 723fb85f3..70ba1a893 100644 --- a/GL/glx/unpack.h +++ b/GL/glx/unpack.h @@ -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 #endif diff --git a/GL/glx/xfont.c b/GL/glx/xfont.c index 795671534..b24c77d44 100644 --- a/GL/glx/xfont.c +++ b/GL/glx/xfont.c @@ -47,6 +47,7 @@ #include "glapi.h" #include "glthread.h" #include "dispatch.h" +#include "indirect_dispatch.h" #include #include #include @@ -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); } /* diff --git a/GL/include/GL/Makefile.am b/GL/include/GL/Makefile.am deleted file mode 100644 index f2a902396..000000000 --- a/GL/include/GL/Makefile.am +++ /dev/null @@ -1 +0,0 @@ -EXTRA_DIST = glx_ansic.h xf86glx.h diff --git a/GL/include/GL/glx_ansic.h b/GL/include/GL/glx_ansic.h deleted file mode 100644 index 9085a08fe..000000000 --- a/GL/include/GL/glx_ansic.h +++ /dev/null @@ -1,112 +0,0 @@ -#ifdef HAVE_DIX_CONFIG_H -#include -#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 - -#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_ */ - diff --git a/GL/include/GL/xf86glx.h b/GL/include/GL/xf86glx.h deleted file mode 100644 index 5d018d72b..000000000 --- a/GL/include/GL/xf86glx.h +++ /dev/null @@ -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 - * - */ - -#ifdef HAVE_DIX_CONFIG_H -#include -#endif - -#include "miscstruct.h" diff --git a/GL/include/Makefile.am b/GL/include/Makefile.am deleted file mode 100644 index 1367fb437..000000000 --- a/GL/include/Makefile.am +++ /dev/null @@ -1 +0,0 @@ -SUBDIRS = GL diff --git a/GL/mesa/.gitignore b/GL/mesa/.gitignore new file mode 100644 index 000000000..82ab82747 --- /dev/null +++ b/GL/mesa/.gitignore @@ -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 diff --git a/GL/mesa/X/Makefile.am b/GL/mesa/X/Makefile.am index 1f740ee90..2a9f4225a 100644 --- a/GL/mesa/X/Makefile.am +++ b/GL/mesa/X/Makefile.am @@ -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 diff --git a/GL/mesa/X/xf86glx.c b/GL/mesa/X/xf86glx.c index b1125a733..94959d628 100644 --- a/GL/mesa/X/xf86glx.c +++ b/GL/mesa/X/xf86glx.c @@ -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 #include "context.h" #include "xmesaP.h" -#include #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; /* diff --git a/GL/mesa/X/xf86glx_util.c b/GL/mesa/X/xf86glx_util.c index d8afcbcb5..ffb528003 100644 --- a/GL/mesa/X/xf86glx_util.c +++ b/GL/mesa/X/xf86glx_util.c @@ -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 -#include "GL/xf86glx.h" #ifdef ROUNDUP #undef ROUNDUP diff --git a/GL/mesa/X/xf86glx_util.h b/GL/mesa/X/xf86glx_util.h index 809c1550f..bb314128d 100644 --- a/GL/mesa/X/xf86glx_util.h +++ b/GL/mesa/X/xf86glx_util.h @@ -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. diff --git a/GL/mesa/X/xf86glxint.h b/GL/mesa/X/xf86glxint.h index 4e51215bc..8c7e91327 100644 --- a/GL/mesa/X/xf86glxint.h +++ b/GL/mesa/X/xf86glxint.h @@ -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. diff --git a/GL/mesa/array_cache/Makefile.am b/GL/mesa/array_cache/Makefile.am index 4169f3df3..5016b73b0 100644 --- a/GL/mesa/array_cache/Makefile.am +++ b/GL/mesa/array_cache/Makefile.am @@ -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 \ diff --git a/GL/mesa/glapi/Makefile.am b/GL/mesa/glapi/Makefile.am index 223f0c213..de457b988 100644 --- a/GL/mesa/glapi/Makefile.am +++ b/GL/mesa/glapi/Makefile.am @@ -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 \ diff --git a/GL/mesa/main/Makefile.am b/GL/mesa/main/Makefile.am index 1c466a92a..64b383dc9 100644 --- a/GL/mesa/main/Makefile.am +++ b/GL/mesa/main/Makefile.am @@ -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 \ diff --git a/GL/mesa/math/Makefile.am b/GL/mesa/math/Makefile.am index 4b157c394..5e99d90c4 100644 --- a/GL/mesa/math/Makefile.am +++ b/GL/mesa/math/Makefile.am @@ -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 \ diff --git a/GL/mesa/shader/Makefile.am b/GL/mesa/shader/Makefile.am index dd0ed712f..4bd57363f 100644 --- a/GL/mesa/shader/Makefile.am +++ b/GL/mesa/shader/Makefile.am @@ -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 \ diff --git a/GL/mesa/shader/grammar/Makefile.am b/GL/mesa/shader/grammar/Makefile.am index 9f9e5f61e..0974d5b95 100644 --- a/GL/mesa/shader/grammar/Makefile.am +++ b/GL/mesa/shader/grammar/Makefile.am @@ -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 \ diff --git a/GL/mesa/shader/slang/Makefile.am b/GL/mesa/shader/slang/Makefile.am index 7088ee15c..8f2636ea4 100644 --- a/GL/mesa/shader/slang/Makefile.am +++ b/GL/mesa/shader/slang/Makefile.am @@ -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 \ diff --git a/GL/mesa/swrast/Makefile.am b/GL/mesa/swrast/Makefile.am index 904b772dc..d972af6eb 100644 --- a/GL/mesa/swrast/Makefile.am +++ b/GL/mesa/swrast/Makefile.am @@ -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 \ diff --git a/GL/mesa/swrast_setup/Makefile.am b/GL/mesa/swrast_setup/Makefile.am index c52575d1e..8d7040880 100644 --- a/GL/mesa/swrast_setup/Makefile.am +++ b/GL/mesa/swrast_setup/Makefile.am @@ -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 \ diff --git a/GL/mesa/tnl/Makefile.am b/GL/mesa/tnl/Makefile.am index cbf46fda3..717e6fd53 100644 --- a/GL/mesa/tnl/Makefile.am +++ b/GL/mesa/tnl/Makefile.am @@ -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 \ diff --git a/GL/symlink-mesa.sh b/GL/symlink-mesa.sh index 326e4f055..9687ce85b 100755 --- a/GL/symlink-mesa.sh +++ b/GL/symlink-mesa.sh @@ -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 diff --git a/Makefile.am b/Makefile.am index 773e7690f..f35539e49 100644 --- a/Makefile.am +++ b/Makefile.am @@ -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 diff --git a/XTrap/Makefile.am b/XTrap/Makefile.am index cdbfe111c..1eddd4f56 100644 --- a/XTrap/Makefile.am +++ b/XTrap/Makefile.am @@ -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 diff --git a/XTrap/xtrapddmi.c b/XTrap/xtrapddmi.c index 1b598b79d..73a20c1f6 100644 --- a/XTrap/xtrapddmi.c +++ b/XTrap/xtrapddmi.c @@ -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 diff --git a/XTrap/xtrapdi.c b/XTrap/xtrapdi.c index 26da8cbb4..23d3bde7f 100644 --- a/XTrap/xtrapdi.c +++ b/XTrap/xtrapdi.c @@ -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; diff --git a/XTrap/xtrapdiswp.c b/XTrap/xtrapdiswp.c index b0fa43957..dc2a3383a 100644 --- a/XTrap/xtrapdiswp.c +++ b/XTrap/xtrapdiswp.c @@ -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); diff --git a/Xext/EVI.c b/Xext/EVI.c index b59180685..8fe3481d4 100644 --- a/Xext/EVI.c +++ b/Xext/EVI.c @@ -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 diff --git a/Xext/EVIstruct.h b/Xext/EVIstruct.h index 857e7565a..e6581909f 100644 --- a/Xext/EVIstruct.h +++ b/Xext/EVIstruct.h @@ -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 diff --git a/Xext/Makefile.am b/Xext/Makefile.am index 56c50538b..6ea3d7445 100644 --- a/Xext/Makefile.am +++ b/Xext/Makefile.am @@ -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) \ diff --git a/Xext/appgroup.c b/Xext/appgroup.c index 86bd36ecd..bb7a73ce1 100644 --- a/Xext/appgroup.c +++ b/Xext/appgroup.c @@ -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 -#include -#define _SECURITY_SERVER -#include +#include "xacestr.h" +#include "securitysrv.h" #include #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); } } diff --git a/Xext/appgroup.h b/Xext/appgroup.h index 05c9ef124..a875068fc 100644 --- a/Xext/appgroup.h +++ b/Xext/appgroup.h @@ -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 + +_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_ */ + + + diff --git a/Xext/bigreq.c b/Xext/bigreq.c index 1af8a930b..fcd848aec 100644 --- a/Xext/bigreq.c +++ b/Xext/bigreq.c @@ -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 diff --git a/Xext/cup.c b/Xext/cup.c index 879130ece..6bfa27837 100644 --- a/Xext/cup.c +++ b/Xext/cup.c @@ -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; diff --git a/Xext/dpms.c b/Xext/dpms.c index ea0a1ccdf..aced40639 100644 --- a/Xext/dpms.c +++ b/Xext/dpms.c @@ -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 diff --git a/Xext/dpmsproc.h b/Xext/dpmsproc.h index ae1e6e25a..f5485ea79 100644 --- a/Xext/dpmsproc.h +++ b/Xext/dpmsproc.h @@ -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 */ diff --git a/Xext/dpmsstubs.c b/Xext/dpmsstubs.c index 128c57bb0..9f99a2d22 100644 --- a/Xext/dpmsstubs.c +++ b/Xext/dpmsstubs.c @@ -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; diff --git a/Xext/fontcache.c b/Xext/fontcache.c index 9ab23a122..db0348144 100644 --- a/Xext/fontcache.c +++ b/Xext/fontcache.c @@ -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 +#include #include #include "swaprep.h" diff --git a/Xext/mbuf.c b/Xext/mbuf.c index 9933fe0fd..ed352e21b 100644 --- a/Xext/mbuf.c +++ b/Xext/mbuf.c @@ -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++) diff --git a/Xext/mbufbf.c b/Xext/mbufbf.c index 8585c52d2..04fc487d8 100644 --- a/Xext/mbufbf.c +++ b/Xext/mbufbf.c @@ -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 diff --git a/Xext/mbufpx.c b/Xext/mbufpx.c index c986217ee..16717d330 100644 --- a/Xext/mbufpx.c +++ b/Xext/mbufpx.c @@ -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 diff --git a/Xext/mitmisc.c b/Xext/mitmisc.c index f7b0ee55c..924b88063 100644 --- a/Xext/mitmisc.c +++ b/Xext/mitmisc.c @@ -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 #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); diff --git a/Xext/panoramiX.c b/Xext/panoramiX.c index d1e726804..85f591356 100644 --- a/Xext/panoramiX.c +++ b/Xext/panoramiX.c @@ -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 @@ -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 diff --git a/Xext/panoramiX.h b/Xext/panoramiX.h index 6cbb94dd3..7b3339204 100644 --- a/Xext/panoramiX.h +++ b/Xext/panoramiX.h @@ -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 */ diff --git a/Xext/panoramiXSwap.c b/Xext/panoramiXSwap.c index e0548df7b..da445ffe1 100644 --- a/Xext/panoramiXSwap.c +++ b/Xext/panoramiXSwap.c @@ -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 diff --git a/Xext/panoramiXh.h b/Xext/panoramiXh.h index 9da5876fd..6cee650ac 100644 --- a/Xext/panoramiXh.h +++ b/Xext/panoramiXh.h @@ -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 diff --git a/Xext/panoramiXprocs.c b/Xext/panoramiXprocs.c index 79a5a3290..1c53a1e1a 100644 --- a/Xext/panoramiXprocs.c +++ b/Xext/panoramiXprocs.c @@ -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 */ -/* $XFree86: xc/programs/Xserver/Xext/panoramiXprocs.c,v 3.36tsi Exp $ */ #ifdef HAVE_DIX_CONFIG_H #include @@ -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){ diff --git a/Xext/panoramiXsrv.h b/Xext/panoramiXsrv.h index dc3b3d805..bb032cfae 100644 --- a/Xext/panoramiXsrv.h +++ b/Xext/panoramiXsrv.h @@ -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 diff --git a/Xext/sampleEVI.c b/Xext/sampleEVI.c index 67caa5613..d9c569609 100644 --- a/Xext/sampleEVI.c +++ b/Xext/sampleEVI.c @@ -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 diff --git a/Xext/saver.c b/Xext/saver.c index d873ffde6..7e3ebf408 100644 --- a/Xext/saver.c +++ b/Xext/saver.c @@ -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--) { diff --git a/Xext/security.c b/Xext/security.c index 48a45d0a2..4fbf6f283 100644 --- a/Xext/security.c +++ b/Xext/security.c @@ -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 @@ -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 #include #include #ifdef XAPPGROUP -#include +#include "appgroup.h" #endif #include /* for file reading operations */ #include /* 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; iauthId == 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 */ diff --git a/Xext/securitysrv.h b/Xext/securitysrv.h new file mode 100644 index 000000000..7c6f432fe --- /dev/null +++ b/Xext/securitysrv.h @@ -0,0 +1,98 @@ +/* +Copyright 1996, 1998 The Open Group + +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. +*/ + +/* Xserver internals for Security extension - moved here from + _SECURITY_SERVER section of */ + +#ifndef _SECURITY_SRV_H +#define _SECURITY_SRV_H + +/* Allow client side portions of to compile */ +#ifndef Status +# define Status int +# define NEED_UNDEF_Status +#endif +#ifndef Display +# define Display void +# define NEED_UNDEF_Display +#endif + +#include + +#ifdef NEED_UNDEF_Status +# undef Status +# undef NEED_UNDEF_Status +#endif +#ifdef NEED_UNDEF_Display +# undef Display +# undef NEED_UNDEF_Display +#endif + + +#include "input.h" /* for DeviceIntPtr */ +#include "property.h" /* for PropertyPtr */ +#include "pixmap.h" /* for DrawablePtr */ +#include "resource.h" /* for RESTYPE */ + +/* resource type to pass in LookupIDByType for authorizations */ +extern RESTYPE SecurityAuthorizationResType; + +/* this is what we store for an authorization */ +typedef struct { + XID id; /* resource ID */ + CARD32 timeout; /* how long to live in seconds after refcnt == 0 */ + unsigned int trustLevel; /* trusted/untrusted */ + XID group; /* see embedding extension */ + unsigned int refcnt; /* how many clients connected with this auth */ + unsigned int secondsRemaining; /* overflow time amount for >49 days */ + OsTimerPtr timer; /* timer for this auth */ + struct _OtherClients *eventClients; /* clients wanting events */ +} SecurityAuthorizationRec, *SecurityAuthorizationPtr; + +/* The following callback is called when a GenerateAuthorization request + * is processed to sanity check the group argument. The call data will + * be a pointer to a SecurityValidateGroupInfoRec (below). + * Functions registered on this callback are expected to examine the + * group and set the valid field to TRUE if they recognize the group as a + * legitimate group. If they don't recognize it, they should not change the + * valid field. + */ +extern CallbackListPtr SecurityValidateGroupCallback; +typedef struct { + XID group; /* the group that was sent in GenerateAuthorization */ + Bool valid; /* did anyone recognize it? if so, set to TRUE */ +} SecurityValidateGroupInfoRec; + +extern int XSecurityOptions(int argc, char **argv, int i); + +/* Give this value or higher to the -audit option to get security messages */ +#define SECURITY_AUDIT_LEVEL 4 + +#define SECURITY_POLICY_FILE_VERSION "version-1" + +extern char **SecurityGetSitePolicyStrings(int *n); + +#endif /* _SECURITY_SRV_H */ diff --git a/Xext/shape.c b/Xext/shape.c index c5bb4e38c..928eeee31 100644 --- a/Xext/shape.c +++ b/Xext/shape.c @@ -1,5 +1,3 @@ -/* $XdotOrg: xserver/xorg/Xext/shape.c,v 1.9 2005/07/03 08:53:36 daniels Exp $ */ -/* $XFree86: xc/programs/Xserver/Xext/shape.c,v 3.18 2003/10/28 23:08:43 tsi Exp $ */ /************************************************************ Copyright 1989, 1998 The Open Group @@ -26,7 +24,6 @@ in this Software without prior written authorization from The Open Group. ********************************************************/ -/* $Xorg: shape.c,v 1.4 2001/02/09 02:04:32 xorgcvs Exp $ */ #define NEED_REPLIES #define NEED_EVENTS #ifdef HAVE_DIX_CONFIG_H @@ -146,7 +143,7 @@ typedef struct _ShapeEvent { ****************/ void -ShapeExtensionInit(INITARGS) +ShapeExtensionInit(void) { ExtensionEntry *extEntry; @@ -319,16 +316,16 @@ ProcShapeRectangles (client) ScreenPtr pScreen; REQUEST(xShapeRectanglesReq); xRectangle *prects; - int nrects, ctype; + int nrects, ctype, rc; RegionPtr srcRgn; RegionPtr *destRgn; CreateDftPtr createDefault; REQUEST_AT_LEAST_SIZE (xShapeRectanglesReq); UpdateCurrentTime(); - pWin = LookupWindow (stuff->dest, client); - if (!pWin) - return BadWindow; + rc = dixLookupWindow(&pWin, stuff->dest, client, DixUnknownAccess); + if (rc != Success) + return rc; switch (stuff->destKind) { case ShapeBounding: createDefault = CreateBoundingShape; @@ -393,7 +390,7 @@ ProcPanoramiXShapeRectangles( REQUEST_AT_LEAST_SIZE (xShapeRectanglesReq); if(!(win = (PanoramiXRes *)SecurityLookupIDByType( - client, stuff->dest, XRT_WINDOW, SecurityWriteAccess))) + client, stuff->dest, XRT_WINDOW, DixWriteAccess))) return BadWindow; FOR_NSCREENS(j) { @@ -422,12 +419,13 @@ ProcShapeMask (client) RegionPtr *destRgn; PixmapPtr pPixmap; CreateDftPtr createDefault; + int rc; REQUEST_SIZE_MATCH (xShapeMaskReq); UpdateCurrentTime(); - pWin = SecurityLookupWindow (stuff->dest, client, SecurityWriteAccess); - if (!pWin) - return BadWindow; + rc = dixLookupWindow(&pWin, stuff->dest, client, DixWriteAccess); + if (rc != Success) + return rc; switch (stuff->destKind) { case ShapeBounding: createDefault = CreateBoundingShape; @@ -447,7 +445,7 @@ ProcShapeMask (client) srcRgn = 0; else { pPixmap = (PixmapPtr) SecurityLookupIDByType(client, stuff->src, - RT_PIXMAP, SecurityReadAccess); + RT_PIXMAP, DixReadAccess); if (!pPixmap) return BadPixmap; if (pPixmap->drawable.pScreen != pScreen || @@ -491,12 +489,12 @@ ProcPanoramiXShapeMask( REQUEST_SIZE_MATCH (xShapeMaskReq); if(!(win = (PanoramiXRes *)SecurityLookupIDByType( - client, stuff->dest, XRT_WINDOW, SecurityWriteAccess))) + client, stuff->dest, XRT_WINDOW, DixWriteAccess))) return BadWindow; if(stuff->src != None) { if(!(pmap = (PanoramiXRes *)SecurityLookupIDByType( - client, stuff->src, XRT_PIXMAP, SecurityReadAccess))) + client, stuff->src, XRT_PIXMAP, DixReadAccess))) return BadPixmap; } else pmap = NULL; @@ -529,12 +527,13 @@ ProcShapeCombine (client) CreateDftPtr createDefault; CreateDftPtr createSrc; RegionPtr tmp; + int rc; REQUEST_SIZE_MATCH (xShapeCombineReq); UpdateCurrentTime(); - pDestWin = LookupWindow (stuff->dest, client); - if (!pDestWin) - return BadWindow; + rc = dixLookupWindow(&pDestWin, stuff->dest, client, DixUnknownAccess); + if (rc != Success) + return rc; if (!pDestWin->optional) MakeWindowOptional (pDestWin); switch (stuff->destKind) { @@ -553,9 +552,9 @@ ProcShapeCombine (client) } pScreen = pDestWin->drawable.pScreen; - pSrcWin = LookupWindow (stuff->src, client); - if (!pSrcWin) - return BadWindow; + rc = dixLookupWindow(&pSrcWin, stuff->src, client, DixUnknownAccess); + if (rc != Success) + return rc; switch (stuff->srcKind) { case ShapeBounding: srcRgn = wBoundingShape (pSrcWin); @@ -619,11 +618,11 @@ ProcPanoramiXShapeCombine( REQUEST_AT_LEAST_SIZE (xShapeCombineReq); if(!(win = (PanoramiXRes *)SecurityLookupIDByType( - client, stuff->dest, XRT_WINDOW, SecurityWriteAccess))) + client, stuff->dest, XRT_WINDOW, DixWriteAccess))) return BadWindow; if(!(win2 = (PanoramiXRes *)SecurityLookupIDByType( - client, stuff->src, XRT_WINDOW, SecurityReadAccess))) + client, stuff->src, XRT_WINDOW, DixReadAccess))) return BadWindow; FOR_NSCREENS(j) { @@ -648,12 +647,13 @@ ProcShapeOffset (client) ScreenPtr pScreen; REQUEST(xShapeOffsetReq); RegionPtr srcRgn; + int rc; REQUEST_SIZE_MATCH (xShapeOffsetReq); UpdateCurrentTime(); - pWin = LookupWindow (stuff->dest, client); - if (!pWin) - return BadWindow; + rc = dixLookupWindow(&pWin, stuff->dest, client, DixUnknownAccess); + if (rc != Success) + return rc; switch (stuff->destKind) { case ShapeBounding: srcRgn = wBoundingShape (pWin); @@ -691,7 +691,7 @@ ProcPanoramiXShapeOffset( REQUEST_AT_LEAST_SIZE (xShapeOffsetReq); if(!(win = (PanoramiXRes *)SecurityLookupIDByType( - client, stuff->dest, XRT_WINDOW, SecurityWriteAccess))) + client, stuff->dest, XRT_WINDOW, DixWriteAccess))) return BadWindow; FOR_NSCREENS(j) { @@ -712,13 +712,13 @@ ProcShapeQueryExtents (client) WindowPtr pWin; xShapeQueryExtentsReply rep; BoxRec extents, *pExtents; - register int n; + register int n, rc; RegionPtr region; REQUEST_SIZE_MATCH (xShapeQueryExtentsReq); - 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; @@ -823,13 +823,14 @@ ProcShapeSelectInput (client) WindowPtr pWin; ShapeEventPtr pShapeEvent, pNewShapeEvent, *pHead; XID clientResource; + int rc; REQUEST_SIZE_MATCH (xShapeSelectInputReq); - pWin = SecurityLookupWindow (stuff->window, client, SecurityWriteAccess); - if (!pWin) - return BadWindow; + rc = dixLookupWindow(&pWin, stuff->window, client, DixWriteAccess); + if (rc != Success) + return rc; pHead = (ShapeEventPtr *)SecurityLookupIDByType(client, - pWin->drawable.id, EventType, SecurityWriteAccess); + pWin->drawable.id, EventType, DixWriteAccess); switch (stuff->enable) { case xTrue: if (pHead) { @@ -993,16 +994,16 @@ ProcShapeInputSelected (client) REQUEST(xShapeInputSelectedReq); WindowPtr pWin; ShapeEventPtr pShapeEvent, *pHead; - int enabled; + int enabled, rc; xShapeInputSelectedReply rep; register int n; REQUEST_SIZE_MATCH (xShapeInputSelectedReq); - pWin = LookupWindow (stuff->window, client); - if (!pWin) - return BadWindow; + rc = dixLookupWindow(&pWin, stuff->window, client, DixUnknownAccess); + if (rc != Success) + return rc; pHead = (ShapeEventPtr *) SecurityLookupIDByType(client, - pWin->drawable.id, EventType, SecurityReadAccess); + pWin->drawable.id, EventType, DixReadAccess); enabled = xFalse; if (pHead) { for (pShapeEvent = *pHead; @@ -1035,14 +1036,14 @@ ProcShapeGetRectangles (client) WindowPtr pWin; xShapeGetRectanglesReply rep; xRectangle *rects; - int nrects, i; + int nrects, i, rc; RegionPtr region; register int n; REQUEST_SIZE_MATCH(xShapeGetRectanglesReq); - pWin = LookupWindow (stuff->window, client); - if (!pWin) - return BadWindow; + rc = dixLookupWindow(&pWin, stuff->window, client, DixUnknownAccess); + if (rc != Success) + return rc; switch (stuff->kind) { case ShapeBounding: region = wBoundingShape(pWin); diff --git a/Xext/shm.c b/Xext/shm.c index e56d45e8e..7cfaa6808 100644 --- a/Xext/shm.c +++ b/Xext/shm.c @@ -1,4 +1,3 @@ -/* $XFree86: xc/programs/Xserver/Xext/shm.c,v 3.41 2003/12/17 23:28:56 alanh Exp $ */ /************************************************************ Copyright 1989, 1998 The Open Group @@ -27,7 +26,6 @@ in this Software without prior written authorization from The Open Group. /* THIS IS NOT AN X CONSORTIUM STANDARD OR AN X PROJECT TEAM SPECIFICATION */ -/* $Xorg: shm.c,v 1.4 2001/02/09 02:04:33 xorgcvs Exp $ */ #define SHM @@ -573,11 +571,11 @@ ProcPanoramiXShmPutImage(register ClientPtr client) REQUEST_SIZE_MATCH(xShmPutImageReq); if(!(draw = (PanoramiXRes *)SecurityLookupIDByClass( - client, stuff->drawable, XRC_DRAWABLE, SecurityWriteAccess))) + client, stuff->drawable, XRC_DRAWABLE, DixWriteAccess))) return BadDrawable; 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; @@ -608,7 +606,7 @@ ProcPanoramiXShmGetImage(ClientPtr client) DrawablePtr pDraw; xShmGetImageReply xgi; ShmDescPtr shmdesc; - int i, x, y, w, h, format; + int i, x, y, w, h, format, rc; Mask plane = 0, planemask; long lenPer = 0, length, widthBytesLine; Bool isRoot; @@ -623,13 +621,16 @@ ProcPanoramiXShmGetImage(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 ProcShmGetImage(client); - VERIFY_DRAWABLE(pDraw, stuff->drawable, client); + rc = dixLookupDrawable(&pDraw, stuff->drawable, client, 0, + DixUnknownAccess); + if (rc != Success) + return rc; VERIFY_SHMPTR(stuff->shmseg, stuff->offset, TRUE, shmdesc, client); @@ -662,8 +663,12 @@ ProcPanoramiXShmGetImage(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; @@ -722,7 +727,7 @@ ProcPanoramiXShmCreatePixmap( PixmapPtr pMap = NULL; DrawablePtr pDraw; DepthPtr pDepth; - int i, j, result; + int i, j, result, rc; ShmDescPtr shmdesc; REQUEST(xShmCreatePixmapReq); PanoramiXRes *newPix; @@ -732,7 +737,11 @@ ProcPanoramiXShmCreatePixmap( if (!sharedPixmaps) return BadImplementation; LEGAL_NEW_RESOURCE(stuff->pid, client); - VERIFY_GEOMETRABLE(pDraw, stuff->drawable, client); + rc = dixLookupDrawable(&pDraw, stuff->drawable, client, M_ANY, + DixUnknownAccess); + if (rc != Success) + return rc; + VERIFY_SHMPTR(stuff->shmseg, stuff->offset, TRUE, shmdesc, client); if (!stuff->width || !stuff->height) { @@ -807,8 +816,8 @@ static int ProcShmPutImage(client) register ClientPtr client; { - register GCPtr pGC; - register DrawablePtr pDraw; + GCPtr pGC; + DrawablePtr pDraw; long length; ShmDescPtr shmdesc; REQUEST(xShmPutImageReq); @@ -911,12 +920,12 @@ static int ProcShmGetImage(client) register ClientPtr client; { - register DrawablePtr pDraw; + DrawablePtr pDraw; long lenPer = 0, length; Mask plane = 0; xShmGetImageReply xgi; ShmDescPtr shmdesc; - int n; + int n, rc; REQUEST(xShmGetImageReq); @@ -926,7 +935,10 @@ ProcShmGetImage(client) client->errorValue = stuff->format; return(BadValue); } - VERIFY_DRAWABLE(pDraw, stuff->drawable, client); + rc = dixLookupDrawable(&pDraw, stuff->drawable, client, 0, + DixUnknownAccess); + if (rc != Success) + return rc; VERIFY_SHMPTR(stuff->shmseg, stuff->offset, TRUE, shmdesc, client); if (pDraw->type == DRAWABLE_WINDOW) { @@ -1044,9 +1056,9 @@ ProcShmCreatePixmap(client) register ClientPtr client; { PixmapPtr pMap; - register DrawablePtr pDraw; + DrawablePtr pDraw; DepthPtr pDepth; - register int i; + register int i, rc; ShmDescPtr shmdesc; REQUEST(xShmCreatePixmapReq); @@ -1055,7 +1067,11 @@ ProcShmCreatePixmap(client) if (!sharedPixmaps) return BadImplementation; LEGAL_NEW_RESOURCE(stuff->pid, client); - VERIFY_GEOMETRABLE(pDraw, stuff->drawable, client); + rc = dixLookupDrawable(&pDraw, stuff->drawable, client, M_ANY, + DixUnknownAccess); + if (rc != Success) + return rc; + VERIFY_SHMPTR(stuff->shmseg, stuff->offset, TRUE, shmdesc, client); if (!stuff->width || !stuff->height) { diff --git a/Xext/sleepuntil.c b/Xext/sleepuntil.c index 30be8c001..f8cedbe6e 100644 --- a/Xext/sleepuntil.c +++ b/Xext/sleepuntil.c @@ -1,5 +1,4 @@ /* - * $Xorg: sleepuntil.c,v 1.4 2001/02/09 02:04:33 xorgcvs Exp $ * Copyright 1992, 1998 The Open Group @@ -25,7 +24,6 @@ in this Software without prior written authorization from The Open Group. * * Author: Keith Packard, MIT X Consortium */ -/* $XFree86: xc/programs/Xserver/Xext/sleepuntil.c,v 3.6 2003/07/16 01:38:30 dawes Exp $ */ /* dixsleep.c - implement millisecond timeouts for X clients */ diff --git a/Xext/sleepuntil.h b/Xext/sleepuntil.h index 0b99148a4..a3618d99c 100644 --- a/Xext/sleepuntil.h +++ b/Xext/sleepuntil.h @@ -1,4 +1,3 @@ -/* $XFree86: xc/programs/Xserver/Xext/sleepuntil.h,v 1.2 2003/11/17 22:20:27 dawes Exp $ */ /* * Copyright (C) 2001 The XFree86 Project, Inc. All Rights Reserved. * diff --git a/Xext/sync.c b/Xext/sync.c index e1383cea3..531b48cc1 100644 --- a/Xext/sync.c +++ b/Xext/sync.c @@ -1,4 +1,3 @@ -/* $Xorg: sync.c,v 1.4 2001/02/09 02:04:33 xorgcvs Exp $ */ /* Copyright 1991, 1993, 1998 The Open Group @@ -50,7 +49,6 @@ OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -/* $XFree86: xc/programs/Xserver/Xext/sync.c,v 3.13 2003/09/02 18:19:01 tsi Exp $ */ #define NEED_REPLIES #define NEED_EVENTS @@ -438,7 +436,7 @@ SyncInitTrigger(client, pTrigger, counter, changes) if (counter == None) pCounter = NULL; else if (!(pCounter = (SyncCounter *)SecurityLookupIDByType( - client, counter, RTCounter, SecurityReadAccess))) + client, counter, RTCounter, DixReadAccess))) { client->errorValue = counter; return SyncErrorBase + XSyncBadCounter; @@ -1454,15 +1452,17 @@ ProcSyncSetPriority(client) { REQUEST(xSyncSetPriorityReq); ClientPtr priorityclient; + int rc; REQUEST_SIZE_MATCH(xSyncSetPriorityReq); if (stuff->id == None) priorityclient = client; - else if (!(priorityclient = LookupClient(stuff->id, client))) - { - client->errorValue = stuff->id; - return BadMatch; + else { + rc = dixLookupClient(&priorityclient, stuff->id, client, + DixUnknownAccess); + if (rc != Success) + return rc; } if (priorityclient->priority != stuff->priority) @@ -1489,15 +1489,17 @@ ProcSyncGetPriority(client) REQUEST(xSyncGetPriorityReq); xSyncGetPriorityReply rep; ClientPtr priorityclient; + int rc; REQUEST_SIZE_MATCH(xSyncGetPriorityReq); if (stuff->id == None) priorityclient = client; - else if (!(priorityclient = LookupClient(stuff->id, client))) - { - client->errorValue = stuff->id; - return BadMatch; + else { + rc = dixLookupClient(&priorityclient, stuff->id, client, + DixUnknownAccess); + if (rc != Success) + return rc; } rep.type = X_Reply; @@ -1552,7 +1554,7 @@ ProcSyncSetCounter(client) REQUEST_SIZE_MATCH(xSyncSetCounterReq); pCounter = (SyncCounter *)SecurityLookupIDByType(client, stuff->cid, - RTCounter, SecurityWriteAccess); + RTCounter, DixWriteAccess); if (pCounter == NULL) { client->errorValue = stuff->cid; @@ -1585,7 +1587,7 @@ ProcSyncChangeCounter(client) REQUEST_SIZE_MATCH(xSyncChangeCounterReq); pCounter = (SyncCounter *) SecurityLookupIDByType(client, stuff->cid, - RTCounter, SecurityWriteAccess); + RTCounter, DixWriteAccess); if (pCounter == NULL) { client->errorValue = stuff->cid; @@ -1623,7 +1625,7 @@ ProcSyncDestroyCounter(client) REQUEST_SIZE_MATCH(xSyncDestroyCounterReq); pCounter = (SyncCounter *)SecurityLookupIDByType(client, stuff->counter, - RTCounter, SecurityDestroyAccess); + RTCounter, DixDestroyAccess); if (pCounter == NULL) { client->errorValue = stuff->counter; @@ -1769,7 +1771,7 @@ ProcSyncQueryCounter(client) REQUEST_SIZE_MATCH(xSyncQueryCounterReq); pCounter = (SyncCounter *)SecurityLookupIDByType(client, stuff->counter, - RTCounter, SecurityReadAccess); + RTCounter, DixReadAccess); if (pCounter == NULL) { client->errorValue = stuff->counter; @@ -1898,7 +1900,7 @@ ProcSyncChangeAlarm(client) REQUEST_AT_LEAST_SIZE(xSyncChangeAlarmReq); if (!(pAlarm = (SyncAlarm *)SecurityLookupIDByType(client, stuff->alarm, - RTAlarm, SecurityWriteAccess))) + RTAlarm, DixWriteAccess))) { client->errorValue = stuff->alarm; return SyncErrorBase + XSyncBadAlarm; @@ -1939,7 +1941,7 @@ ProcSyncQueryAlarm(client) REQUEST_SIZE_MATCH(xSyncQueryAlarmReq); pAlarm = (SyncAlarm *)SecurityLookupIDByType(client, stuff->alarm, - RTAlarm, SecurityReadAccess); + RTAlarm, DixReadAccess); if (!pAlarm) { client->errorValue = stuff->alarm; @@ -1999,7 +2001,7 @@ ProcSyncDestroyAlarm(client) REQUEST_SIZE_MATCH(xSyncDestroyAlarmReq); if (!((SyncAlarm *)SecurityLookupIDByType(client, stuff->alarm, - RTAlarm, SecurityDestroyAccess))) + RTAlarm, DixDestroyAccess))) { client->errorValue = stuff->alarm; return SyncErrorBase + XSyncBadAlarm; diff --git a/Xext/xace.c b/Xext/xace.c new file mode 100644 index 000000000..6fc5c12ee --- /dev/null +++ b/Xext/xace.c @@ -0,0 +1,498 @@ +/************************************************************ + +Author: Eamon Walsh + +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +this permission notice appear in supporting documentation. 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 +AUTHOR 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. + +********************************************************/ + +#ifdef HAVE_DIX_CONFIG_H +#include +#endif + +#include +#include "windowstr.h" +#include "scrnintstr.h" +#include "gcstruct.h" +#include "xacestr.h" +#include "modinit.h" + +CallbackListPtr XaceHooks[XACE_NUM_HOOKS] = {0}; + +/* 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*/ +); + +/* Entry point for hook functions. Called by Xserver. + */ +int XaceHook(int hook, ...) +{ + pointer calldata; /* data passed to callback */ + int *prv = NULL; /* points to return value from callback */ + va_list ap; /* argument list */ + va_start(ap, hook); + + /* Marshal arguments for passing to callback. + * Each callback has its own case, which sets up a structure to hold + * the arguments and integer return parameter, or in some cases just + * sets calldata directly to a single argument (with no return result) + */ + switch (hook) + { + case XACE_CORE_DISPATCH: { + XaceCoreDispatchRec rec = { + va_arg(ap, ClientPtr), + TRUE /* default allow */ + }; + calldata = &rec; + prv = &rec.rval; + break; + } + case XACE_RESOURCE_ACCESS: { + XaceResourceAccessRec rec = { + va_arg(ap, ClientPtr), + va_arg(ap, XID), + va_arg(ap, RESTYPE), + va_arg(ap, Mask), + va_arg(ap, pointer), + TRUE /* default allow */ + }; + calldata = &rec; + prv = &rec.rval; + break; + } + case XACE_DEVICE_ACCESS: { + XaceDeviceAccessRec rec = { + va_arg(ap, ClientPtr), + va_arg(ap, DeviceIntPtr), + va_arg(ap, Bool), + TRUE /* default allow */ + }; + calldata = &rec; + prv = &rec.rval; + break; + } + case XACE_PROPERTY_ACCESS: { + XacePropertyAccessRec rec = { + va_arg(ap, ClientPtr), + va_arg(ap, WindowPtr), + va_arg(ap, Atom), + va_arg(ap, Mask), + XaceAllowOperation /* default allow */ + }; + calldata = &rec; + prv = &rec.rval; + break; + } + case XACE_DRAWABLE_ACCESS: { + XaceDrawableAccessRec rec = { + va_arg(ap, ClientPtr), + va_arg(ap, DrawablePtr), + TRUE /* default allow */ + }; + calldata = &rec; + prv = &rec.rval; + break; + } + case XACE_MAP_ACCESS: + case XACE_BACKGRND_ACCESS: { + XaceMapAccessRec rec = { + va_arg(ap, ClientPtr), + va_arg(ap, WindowPtr), + TRUE /* default allow */ + }; + calldata = &rec; + prv = &rec.rval; + break; + } + case XACE_EXT_DISPATCH: + case XACE_EXT_ACCESS: { + XaceExtAccessRec rec = { + va_arg(ap, ClientPtr), + va_arg(ap, ExtensionEntry*), + TRUE /* default allow */ + }; + calldata = &rec; + prv = &rec.rval; + break; + } + case XACE_HOSTLIST_ACCESS: { + XaceHostlistAccessRec rec = { + va_arg(ap, ClientPtr), + va_arg(ap, Mask), + TRUE /* default allow */ + }; + calldata = &rec; + prv = &rec.rval; + break; + } + case XACE_SITE_POLICY: { + XaceSitePolicyRec rec = { + va_arg(ap, char*), + va_arg(ap, int), + FALSE /* default unrecognized */ + }; + calldata = &rec; + prv = &rec.rval; + break; + } + case XACE_DECLARE_EXT_SECURE: { + XaceDeclareExtSecureRec rec = { + va_arg(ap, ExtensionEntry*), + va_arg(ap, Bool) + }; + calldata = &rec; + break; + } + case XACE_AUTH_AVAIL: { + XaceAuthAvailRec rec = { + va_arg(ap, ClientPtr), + va_arg(ap, XID) + }; + calldata = &rec; + break; + } + case XACE_KEY_AVAIL: { + XaceKeyAvailRec rec = { + va_arg(ap, xEventPtr), + va_arg(ap, DeviceIntPtr), + va_arg(ap, int) + }; + calldata = &rec; + break; + } + case XACE_WINDOW_INIT: { + XaceWindowRec rec = { + va_arg(ap, ClientPtr), + va_arg(ap, WindowPtr) + }; + calldata = &rec; + break; + } + case XACE_AUDIT_BEGIN: { + XaceAuditRec rec = { + va_arg(ap, ClientPtr), + 0 + }; + calldata = &rec; + break; + } + case XACE_AUDIT_END: { + XaceAuditRec rec = { + va_arg(ap, ClientPtr), + va_arg(ap, int) + }; + calldata = &rec; + break; + } + default: { + va_end(ap); + return 0; /* unimplemented hook number */ + } + } + va_end(ap); + + /* call callbacks and return result, if any. */ + CallCallbacks(&XaceHooks[hook], calldata); + return prv ? *prv : 0; +} + +static int +ProcXaceDispatch(ClientPtr client) +{ + REQUEST(xReq); + + switch (stuff->data) + { + default: + return BadRequest; + } +} /* ProcXaceDispatch */ + +static int +SProcXaceDispatch(ClientPtr client) +{ + REQUEST(xReq); + + switch (stuff->data) + { + default: + return BadRequest; + } +} /* SProcXaceDispatch */ + + +/* XaceResetProc + * + * Arguments: + * extEntry is the extension information for the XACE extension. + * + * Returns: nothing. + * + * Side Effects: + * Performs any cleanup needed by XACE at server shutdown time. + */ +static void +XaceResetProc(ExtensionEntry *extEntry) +{ + int i; + + for (i=0; ireqType; + + if (!ProcVector[major]) + return (BadRequest); + + if (!XaceHook(XACE_CORE_DISPATCH, client)) + return (BadAccess); + + return client->swapped ? + (* SwappedProcVector[major])(client) : + (* ProcVector[major])(client); +} + +static int +XaceCatchExtProc(ClientPtr client) +{ + REQUEST(xReq); + int major = stuff->reqType; + ExtensionEntry *ext = GetExtensionEntry(major); + + if (!ext || !ProcVector[major]) + return (BadRequest); + + if (!XaceHook(XACE_EXT_DISPATCH, client, ext)) + return (BadRequest); /* pretend extension doesn't exist */ + + return client->swapped ? + (* SwappedProcVector[major])(client) : + (* ProcVector[major])(client); +} + + +/* SecurityClientStateCallback + * + * Arguments: + * pcbl is &ClientStateCallback. + * nullata is NULL. + * calldata is a pointer to a NewClientInfoRec (include/dixstruct.h) + * which contains information about client state changes. + * + * Returns: nothing. + * + * Side Effects: + * + * 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 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 +XaceClientStateCallback( + CallbackListPtr *pcbl, + pointer nulldata, + pointer calldata) +{ + NewClientInfoRec *pci = (NewClientInfoRec *)calldata; + ClientPtr client = pci->client; + + switch (client->clientState) + { + case ClientStateRunning: + { + client->requestVector = client->swapped ? + SwappedUntrustedProcVector : UntrustedProcVector; + break; + } + default: break; + } +} /* XaceClientStateCallback */ + +/* XaceExtensionInit + * + * Initialize the XACE Extension + */ +void XaceExtensionInit(INITARGS) +{ + ExtensionEntry *extEntry; + int i; + + if (!AddCallback(&ClientStateCallback, XaceClientStateCallback, NULL)) + return; + + extEntry = AddExtension(XACE_EXTENSION_NAME, + XaceNumberEvents, XaceNumberErrors, + ProcXaceDispatch, SProcXaceDispatch, + XaceResetProc, StandardMinorOpcode); + + /* initialize dispatching intercept functions */ + for (i = 0; i < 128; i++) + { + UntrustedProcVector[i] = XaceCatchDispatchProc; + SwappedUntrustedProcVector[i] = XaceCatchDispatchProc; + } + for (i = 128; i < 256; i++) + { + UntrustedProcVector[i] = XaceCatchExtProc; + SwappedUntrustedProcVector[i] = XaceCatchExtProc; + } +} + +/* XaceCensorImage + * + * 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 +XaceCensorImage(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; +{ + ScreenPtr pScreen; + RegionRec imageRegion; /* region representing x,y,w,h */ + RegionRec censorRegion; /* region to obliterate */ + BoxRec imageBox; + int nRects; + + pScreen = pDraw->pScreen; + + imageBox.x1 = x; + imageBox.y1 = y; + imageBox.x2 = x + w; + imageBox.y2 = y + h; + REGION_INIT(pScreen, &imageRegion, &imageBox, 1); + REGION_NULL(pScreen, &censorRegion); + + /* 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; + + /* convert region to list-of-rectangles for PolyFillRect */ + + 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; + } + + /* use pBuf as a fake pixmap */ + + if (format == ZPixmap) + { + depth = pDraw->depth; + bitsPerPixel = pDraw->bitsPerPixel; + } + + pPix = GetScratchPixmapHeader(pDraw->pScreen, w, h, + depth, bitsPerPixel, + widthBytesLine, (pointer)pBuf); + if (!pPix) + { + failed = TRUE; + goto failSafe; + } + + pScratchGC = GetScratchGC(depth, pPix->drawable.pScreen); + if (!pScratchGC) + { + failed = TRUE; + goto failSafe; + } + + ValidateGC(&pPix->drawable, pScratchGC); + (* pScratchGC->ops->PolyFillRect)(&pPix->drawable, + pScratchGC, nRects, pRects); + + 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); + } + REGION_UNINIT(pScreen, &imageRegion); + REGION_UNINIT(pScreen, &censorRegion); +} /* XaceCensorImage */ diff --git a/Xext/xace.h b/Xext/xace.h new file mode 100644 index 000000000..7231b04bc --- /dev/null +++ b/Xext/xace.h @@ -0,0 +1,119 @@ +/************************************************************ + +Author: Eamon Walsh + +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +this permission notice appear in supporting documentation. 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 +AUTHOR 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. + +********************************************************/ + +#ifndef _XACE_H +#define _XACE_H + +/* Hook return codes */ +#define XaceErrorOperation 0 +#define XaceAllowOperation 1 +#define XaceIgnoreOperation 2 + +#ifdef XACE + +#define XACE_EXTENSION_NAME "XAccessControlExtension" +#define XACE_MAJOR_VERSION 1 +#define XACE_MINOR_VERSION 0 + +#include "pixmap.h" /* for DrawablePtr */ +#include "regionstr.h" /* for RegionPtr */ + +#define XaceNumberEvents 0 +#define XaceNumberErrors 0 + +/* security hooks */ +/* Constants used to identify the available security hooks + */ +#define XACE_CORE_DISPATCH 0 +#define XACE_EXT_DISPATCH 1 +#define XACE_RESOURCE_ACCESS 2 +#define XACE_DEVICE_ACCESS 3 +#define XACE_PROPERTY_ACCESS 4 +#define XACE_DRAWABLE_ACCESS 5 +#define XACE_MAP_ACCESS 6 +#define XACE_BACKGRND_ACCESS 7 +#define XACE_EXT_ACCESS 8 +#define XACE_HOSTLIST_ACCESS 9 +#define XACE_SITE_POLICY 10 +#define XACE_DECLARE_EXT_SECURE 11 +#define XACE_AUTH_AVAIL 12 +#define XACE_KEY_AVAIL 13 +#define XACE_WINDOW_INIT 14 +#define XACE_AUDIT_BEGIN 15 +#define XACE_AUDIT_END 16 +#define XACE_NUM_HOOKS 17 + +extern CallbackListPtr XaceHooks[XACE_NUM_HOOKS]; + +/* Entry point for hook functions. Called by Xserver. + */ +extern int XaceHook( + int /*hook*/, + ... /*appropriate args for hook*/ + ); + +/* Register a callback for a given hook. + */ +#define XaceRegisterCallback(hook,callback,data) \ + AddCallback(XaceHooks+(hook), callback, data) + +/* Unregister an existing callback for a given hook. + */ +#define XaceDeleteCallback(hook,callback,data) \ + DeleteCallback(XaceHooks+(hook), callback, data) + + +/* From the original Security extension... + */ + +/* 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. + */ +extern int (*UntrustedProcVector[256])(ClientPtr client); +extern int (*SwappedUntrustedProcVector[256])(ClientPtr client); + +extern void XaceCensorImage( + ClientPtr client, + RegionPtr pVisibleRegion, + long widthBytesLine, + DrawablePtr pDraw, + int x, int y, int w, int h, + unsigned int format, + char * pBuf + ); + +#else /* XACE */ + +/* Define calls away when XACE is not being built. */ + +#ifdef __GNUC__ +#define XaceHook(args...) XaceAllowOperation +#define XaceCensorImage(args...) { ; } +#else +#define XaceHook(...) XaceAllowOperation +#define XaceCensorImage(...) { ; } +#endif + +#endif /* XACE */ + +#endif /* _XACE_H */ diff --git a/Xext/xacestr.h b/Xext/xacestr.h new file mode 100644 index 000000000..7114d066b --- /dev/null +++ b/Xext/xacestr.h @@ -0,0 +1,135 @@ +/************************************************************ + +Author: Eamon Walsh + +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +this permission notice appear in supporting documentation. 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 +AUTHOR 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. + +********************************************************/ + +#ifndef _XACESTR_H +#define _XACESTR_H + +#include +#include "dixstruct.h" +#include "resource.h" +#include "extnsionst.h" +#include "gcstruct.h" +#include "windowstr.h" +#include "inputstr.h" +#include "xace.h" + +/* XACE_CORE_DISPATCH */ +typedef struct { + ClientPtr client; + int rval; +} XaceCoreDispatchRec; + +/* XACE_RESOURCE_ACCESS */ +/* XACE_RESOURCE_CREATE */ +typedef struct { + ClientPtr client; + XID id; + RESTYPE rtype; + Mask access_mode; + pointer res; + int rval; +} XaceResourceAccessRec; + +/* XACE_DEVICE_ACCESS */ +typedef struct { + ClientPtr client; + DeviceIntPtr dev; + Bool fromRequest; + int rval; +} XaceDeviceAccessRec; + +/* XACE_PROPERTY_ACCESS */ +typedef struct { + ClientPtr client; + WindowPtr pWin; + Atom propertyName; + Mask access_mode; + int rval; +} XacePropertyAccessRec; + +/* XACE_DRAWABLE_ACCESS */ +typedef struct { + ClientPtr client; + DrawablePtr pDraw; + int rval; +} XaceDrawableAccessRec; + +/* XACE_MAP_ACCESS */ +/* XACE_BACKGRND_ACCESS */ +typedef struct { + ClientPtr client; + WindowPtr pWin; + int rval; +} XaceMapAccessRec; + +/* XACE_EXT_DISPATCH_ACCESS */ +/* XACE_EXT_ACCESS */ +typedef struct { + ClientPtr client; + ExtensionEntry *ext; + int rval; +} XaceExtAccessRec; + +/* XACE_HOSTLIST_ACCESS */ +typedef struct { + ClientPtr client; + Mask access_mode; + int rval; +} XaceHostlistAccessRec; + +/* XACE_SITE_POLICY */ +typedef struct { + char *policyString; + int len; + int rval; +} XaceSitePolicyRec; + +/* XACE_DECLARE_EXT_SECURE */ +typedef struct { + ExtensionEntry *ext; + Bool secure; +} XaceDeclareExtSecureRec; + +/* XACE_AUTH_AVAIL */ +typedef struct { + ClientPtr client; + XID authId; +} XaceAuthAvailRec; + +/* XACE_KEY_AVAIL */ +typedef struct { + xEventPtr event; + DeviceIntPtr keybd; + int count; +} XaceKeyAvailRec; + +/* XACE_WINDOW_INIT */ +typedef struct { + ClientPtr client; + WindowPtr pWin; +} XaceWindowRec; + +/* XACE_AUDIT_BEGIN */ +/* XACE_AUDIT_END */ +typedef struct { + ClientPtr client; + int requestResult; +} XaceAuditRec; + +#endif /* _XACESTR_H */ diff --git a/Xext/xcalibrate.c b/Xext/xcalibrate.c new file mode 100644 index 000000000..e273c5313 --- /dev/null +++ b/Xext/xcalibrate.c @@ -0,0 +1,262 @@ +/* + * $Id: xcalibrate.c,v 3.1 2004/06/02 20:49:50 pb Exp $ + * + * Copyright © 2003 Philip Blundell + * + * 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, and that the name of Philip Blundell not be used in + * advertising or publicity pertaining to distribution of the software without + * specific, written prior permission. Philip Blundell makes no + * representations about the suitability of this software for any purpose. It + * is provided "as is" without express or implied warranty. + * + * PHILIP BLUNDELL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, + * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO + * EVENT SHALL PHILIP BLUNDELL BE LIABLE FOR ANY SPECIAL, INDIRECT OR + * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, + * 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. + */ + +#ifdef HAVE_KDRIVE_CONFIG_H +#include +#endif + +#define NEED_EVENTS +#define NEED_REPLIES + +#include +#include +#include "misc.h" +#include "os.h" +#include "dixstruct.h" +#include "extnsionst.h" +#include "swaprep.h" + +#include +#include + +extern void (*tslib_raw_event_hook)(int x, int y, int pressure, void *closure); +extern void *tslib_raw_event_closure; + +static CARD8 XCalibrateReqCode; +int XCalibrateEventBase; +int XCalibrateReqBase; +int XCalibrateErrorBase; + +static ClientPtr xcalibrate_client; + +static void +xcalibrate_event_hook (int x, int y, int pressure, void *closure) +{ + ClientPtr pClient = (ClientPtr) closure; + xXCalibrateRawTouchscreenEvent ev; + + ev.type = XCalibrateEventBase + X_XCalibrateRawTouchscreen; + ev.sequenceNumber = pClient->sequence; + ev.x = x; + ev.y = y; + ev.pressure = pressure; + + if (!pClient->clientGone) + WriteEventsToClient (pClient, 1, (xEvent *) &ev); +} + +static int +ProcXCalibrateQueryVersion (ClientPtr client) +{ + REQUEST(xXCalibrateQueryVersionReq); + xXCalibrateQueryVersionReply rep; + CARD16 client_major, client_minor; /* not used */ + + REQUEST_SIZE_MATCH (xXCalibrateQueryVersionReq); + + client_major = stuff->majorVersion; + client_minor = stuff->minorVersion; + + fprintf(stderr, "%s(): called\n", __func__); + + rep.type = X_Reply; + rep.length = 0; + rep.sequenceNumber = client->sequence; + rep.majorVersion = XCALIBRATE_MAJOR_VERSION; + rep.minorVersion = XCALIBRATE_MINOR_VERSION; + if (client->swapped) { + int n; + swaps(&rep.sequenceNumber, n); + swapl(&rep.length, n); + swaps(&rep.majorVersion, n); + swaps(&rep.minorVersion, n); + } + WriteToClient(client, sizeof (xXCalibrateQueryVersionReply), (char *)&rep); + return (client->noClientException); +} + +static int +SProcXCalibrateQueryVersion (ClientPtr client) +{ + REQUEST(xXCalibrateQueryVersionReq); + int n; + + REQUEST_SIZE_MATCH (xXCalibrateQueryVersionReq); + swaps(&stuff->majorVersion,n); + swaps(&stuff->minorVersion,n); + return ProcXCalibrateQueryVersion(client); +} + +static int +ProcXCalibrateSetRawMode (ClientPtr client) +{ + REQUEST(xXCalibrateRawModeReq); + xXCalibrateRawModeReply rep; + + REQUEST_SIZE_MATCH (xXCalibrateRawModeReq); + + memset (&rep, 0, sizeof (rep)); + rep.type = X_Reply; + rep.sequenceNumber = client->sequence; + + if (stuff->on) + { + if (xcalibrate_client == NULL) + { + /* Start calibrating. */ + xcalibrate_client = client; + tslib_raw_event_hook = xcalibrate_event_hook; + tslib_raw_event_closure = client; + rep.status = GrabSuccess; + } + else + { + rep.status = AlreadyGrabbed; + } + } + else + { + if (xcalibrate_client == client) + { + /* Stop calibrating. */ + xcalibrate_client = NULL; + tslib_raw_event_hook = NULL; + tslib_raw_event_closure = NULL; + rep.status = GrabSuccess; + + /* Cycle input off and on to reload configuration. */ + KdDisableInput (); + KdEnableInput (); + } + else + { + rep.status = AlreadyGrabbed; + } + } + + if (client->swapped) + { + int n; + + swaps (&rep.sequenceNumber, n); + swaps (&rep.status, n); + } + WriteToClient(client, sizeof (rep), (char *) &rep); + return (client->noClientException); +} + + +static int +SProcXCalibrateSetRawMode (ClientPtr client) +{ + REQUEST(xXCalibrateRawModeReq); + int n; + + REQUEST_SIZE_MATCH (xXCalibrateRawModeReq); + + swaps(&stuff->on, n); + + return ProcXCalibrateSetRawMode(client); +} + +static void +XCalibrateResetProc (ExtensionEntry *extEntry) +{ +} + +static int +ProcXCalibrateDispatch (ClientPtr client) +{ + REQUEST(xReq); + switch (stuff->data) { + case X_XCalibrateQueryVersion: + return ProcXCalibrateQueryVersion(client); + case X_XCalibrateRawMode: + return ProcXCalibrateSetRawMode(client); + default: break; + } + + return BadRequest; +} + +static int +SProcXCalibrateDispatch (ClientPtr client) +{ + REQUEST(xReq); + int n; + + swaps(&stuff->length,n); + + switch (stuff->data) { + case X_XCalibrateQueryVersion: + return SProcXCalibrateQueryVersion(client); + case X_XCalibrateRawMode: + return SProcXCalibrateSetRawMode(client); + + default: break; + } + + return BadRequest; +} + +static void +XCalibrateClientCallback (CallbackListPtr *list, + pointer closure, + pointer data) +{ + NewClientInfoRec *clientinfo = (NewClientInfoRec *) data; + ClientPtr pClient = clientinfo->client; + + if (clientinfo->setup == NULL + && xcalibrate_client != NULL + && xcalibrate_client == pClient) + { + /* Stop calibrating. */ + xcalibrate_client = NULL; + tslib_raw_event_hook = NULL; + tslib_raw_event_closure = NULL; + } +} + +void +XCalibrateExtensionInit(void) +{ + ExtensionEntry *extEntry; + + if (!AddCallback (&ClientStateCallback, XCalibrateClientCallback, 0)) + return; + + extEntry = AddExtension(XCALIBRATE_NAME, XCalibrateNumberEvents, XCalibrateNumberErrors, + ProcXCalibrateDispatch, SProcXCalibrateDispatch, + XCalibrateResetProc, StandardMinorOpcode); + + if (!extEntry) + return; + + XCalibrateReqCode = (unsigned char)extEntry->base; + XCalibrateEventBase = extEntry->eventBase; + XCalibrateErrorBase = extEntry->errorBase; + + xcalibrate_client = 0; +} diff --git a/Xext/xcmisc.c b/Xext/xcmisc.c index 45629e660..f26218e97 100644 --- a/Xext/xcmisc.c +++ b/Xext/xcmisc.c @@ -1,4 +1,3 @@ -/* $Xorg: xcmisc.c,v 1.4 2001/02/09 02:04:33 xorgcvs Exp $ */ /* Copyright 1993, 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/xcmisc.c,v 3.7 2003/10/28 23:08:43 tsi Exp $ */ #define NEED_EVENTS #define NEED_REPLIES diff --git a/Xext/xevie.c b/Xext/xevie.c index a468affcc..e979e7e4d 100644 --- a/Xext/xevie.c +++ b/Xext/xevie.c @@ -30,7 +30,6 @@ or other dealings in this Software without prior written authorization of the copyright holder. ************************************************************/ -/* $XdotOrg: xserver/xorg/Xext/xevie.c,v 1.11 2005/10/06 17:55:54 alanc Exp $ */ #define NEED_REPLIES #define NEED_EVENTS @@ -59,7 +58,9 @@ of the copyright holder. #define NoSuchEvent 0x80000000 +#ifdef XKB extern Bool noXkbExtension; +#endif extern int xeviegrabState; static int ProcDispatch (register ClientPtr client), SProcDispatch (register ClientPtr client); @@ -104,7 +105,7 @@ typedef struct { } xevieKeycQueueRec, *xevieKeycQueuePtr; #define KEYC_QUEUE_SIZE 100 -xevieKeycQueueRec keycq[KEYC_QUEUE_SIZE] = {0, NULL}; +xevieKeycQueueRec keycq[KEYC_QUEUE_SIZE] = {{0, NULL}}; static int keycqHead = 0, keycqTail = 0; static int ProcDispatch (ClientPtr), SProcDispatch (ClientPtr); @@ -165,7 +166,6 @@ void ResetProc (ExtensionEntry *extEntry) static int ProcQueryVersion (register ClientPtr client) { - REQUEST (xXevieQueryVersionReq); xXevieQueryVersionReply rep; REQUEST_SIZE_MATCH (xXevieQueryVersionReq); @@ -181,7 +181,6 @@ int ProcQueryVersion (register ClientPtr client) static int ProcStart (register ClientPtr client) { - REQUEST (xXevieStartReq); xXevieStartReply rep; REQUEST_SIZE_MATCH (xXevieStartReq); @@ -203,12 +202,14 @@ int ProcStart (register ClientPtr client) return BadAlloc; } else return BadAccess; +#ifdef XKB if (!noXkbExtension) { if (!XevieStart()) { DeleteCallback(&ClientStateCallback,XevieClientStateCallback,NULL); return BadAlloc; } } +#endif xevieModifiersOn = FALSE; @@ -257,19 +258,23 @@ int ProcSend (register ClientPtr client) case KeyPress: case KeyRelease: xevieKBEventSent = 1; - if(noXkbExtension) - CoreProcessKeyboardEvent (xE, xeviekb, 1); - else +#ifdef XKB + if(!noXkbExtension) doSendEvent(xE, inputInfo.keyboard); + else +#endif + CoreProcessKeyboardEvent (xE, xeviekb, 1); break; case ButtonPress: case ButtonRelease: case MotionNotify: xevieEventSent = 1; - if(noXkbExtension) - CoreProcessPointerEvent(xE, xeviemouse, 1); - else +#ifdef XKB + if(!noXkbExtension) doSendEvent(xE, inputInfo.pointer); + else +#endif + CoreProcessPointerEvent(xE, xeviemouse, 1); break; default: break; @@ -466,6 +471,7 @@ XevieKbdProcessInputProc(xEvent *xE, DeviceIntPtr dev, int count) xE->u.keyButtonPointer.state = keyc->state | inputInfo.pointer->button->state; /* fix bug: sequence lost in Xlib */ xE->u.u.sequenceNumber = clients[xevieClientIndex]->sequence; +#ifdef XKB /* fix for bug5092586 */ if(!noXkbExtension) { switch(xE->u.u.type) { @@ -473,6 +479,7 @@ XevieKbdProcessInputProc(xEvent *xE, DeviceIntPtr dev, int count) case KeyRelease: *kptr &= ~bit; break; } } +#endif keycq[keycqHead].time = xE->u.keyButtonPointer.time; memcpy(keycq[keycqHead].keyc, keyc, sizeof(KeyClassRec) - sizeof(KeyClassPtr)); memcpy(keycq[keycqHead].keyc->xkbInfo, keyc->xkbInfo, sizeof(XkbSrvInfoRec)); @@ -527,6 +534,7 @@ XevieEnd(int clientIndex) { if (!clientIndex || clientIndex == xevieClientIndex) { +#ifdef XKB if(!noXkbExtension) { XevieRemove(inputInfo.keyboard,NULL); @@ -542,6 +550,7 @@ XevieEnd(int clientIndex) inputInfo.pointer->public.realInputProc = CoreProcessPointerEvent; XkbSetExtension(inputInfo.pointer,ProcessPointerEvent); } +#endif xevieFlag = 0; xevieClientIndex = 0; diff --git a/Xext/xf86bigfont.c b/Xext/xf86bigfont.c index 36af17622..f50481f78 100644 --- a/Xext/xf86bigfont.c +++ b/Xext/xf86bigfont.c @@ -1,4 +1,3 @@ -/* $XFree86: xc/programs/Xserver/Xext/xf86bigfont.c,v 1.17 2003/10/28 23:08:43 tsi Exp $ */ /* * BIGFONT extension for sharing font metrics between clients (if possible) * and for transmitting font metrics to clients in a compressed form. @@ -446,11 +445,10 @@ ProcXF86BigfontQueryFont( #endif client->errorValue = stuff->id; /* EITHER font or gc */ pFont = (FontPtr)SecurityLookupIDByType(client, stuff->id, RT_FONT, - SecurityReadAccess); + DixReadAccess); if (!pFont) { - /* can't use VERIFY_GC because it might return BadGC */ GC *pGC = (GC *) SecurityLookupIDByType(client, stuff->id, RT_GC, - SecurityReadAccess); + DixReadAccess); if (!pGC) { client->errorValue = stuff->id; return BadFont; /* procotol spec says only error is BadFont */ diff --git a/Xext/xprint.c b/Xext/xprint.c index 60512d372..4ac13e6d1 100644 --- a/Xext/xprint.c +++ b/Xext/xprint.c @@ -1,4 +1,3 @@ -/* $Xorg: xprint.c,v 1.5 2001/03/05 20:42:26 pookie Exp $ */ /* (c) Copyright 1996 Hewlett-Packard Company (c) Copyright 1996 International Business Machines Corp. @@ -64,7 +63,6 @@ copyright holders. ** ********************************************************* ** ********************************************************************/ -/* $XFree86: xc/programs/Xserver/Xext/xprint.c,v 1.14tsi Exp $ */ #define _XP_PRINT_SERVER_ #ifdef HAVE_DIX_CONFIG_H @@ -85,8 +83,8 @@ copyright holders. #include #include #include -#include "../Xprint/DiPrint.h" -#include "../Xprint/attributes.h" +#include "../hw/xprint/DiPrint.h" +#include "../hw/xprint/attributes.h" #include "modinit.h" static void XpResetProc(ExtensionEntry *); @@ -751,7 +749,7 @@ ProcXpGetPageDimensions(ClientPtr client) if((pContext =(XpContextPtr)SecurityLookupIDByType(client, stuff->printContext, RTcontext, - SecurityReadAccess)) + DixReadAccess)) == (XpContextPtr)NULL) { client->errorValue = stuff->printContext; @@ -813,7 +811,7 @@ ProcXpSetImageResolution(ClientPtr client) if((pContext =(XpContextPtr)SecurityLookupIDByType(client, stuff->printContext, RTcontext, - SecurityWriteAccess)) + DixWriteAccess)) == (XpContextPtr)NULL) { client->errorValue = stuff->printContext; @@ -861,7 +859,7 @@ ProcXpGetImageResolution(ClientPtr client) if((pContext =(XpContextPtr)SecurityLookupIDByType(client, stuff->printContext, RTcontext, - SecurityReadAccess)) + DixReadAccess)) == (XpContextPtr)NULL) { client->errorValue = stuff->printContext; @@ -1070,7 +1068,7 @@ ProcXpSetContext(ClientPtr client) if((pContext =(XpContextPtr)SecurityLookupIDByType(client, stuff->printContext, RTcontext, - SecurityWriteAccess)) + DixWriteAccess)) == (XpContextPtr)NULL) { client->errorValue = stuff->printContext; @@ -1143,7 +1141,7 @@ ProcXpDestroyContext(ClientPtr client) if((pContext =(XpContextPtr)SecurityLookupIDByType(client, stuff->printContext, RTcontext, - SecurityDestroyAccess)) + DixDestroyAccess)) == (XpContextPtr)NULL) { client->errorValue = stuff->printContext; @@ -1169,7 +1167,7 @@ ProcXpGetContextScreen(ClientPtr client) if((pContext =(XpContextPtr)SecurityLookupIDByType(client, stuff->printContext, RTcontext, - SecurityReadAccess)) + DixReadAccess)) == (XpContextPtr)NULL) return XpErrorBase+XPBadContext; @@ -1854,9 +1852,10 @@ ProcXpStartPage(ClientPtr client) if(pContext->state & PAGE_STARTED) return XpErrorBase+XPBadSequence; - pWin = (WindowPtr)SecurityLookupWindow(stuff->window, client, - SecurityWriteAccess); - if (!pWin || pWin->drawable.pScreen->myNum != pContext->screenNum) + result = dixLookupWindow(&pWin, stuff->window, client, DixWriteAccess); + if (result != Success) + return result; + if (pWin->drawable.pScreen->myNum != pContext->screenNum) return BadWindow; if((c = (XpStPagePtr)xalloc(sizeof(XpStPageRec))) == (XpStPagePtr)NULL) @@ -1945,8 +1944,11 @@ ProcXpPutDocumentData(ClientPtr client) if (stuff->drawable) { if (pContext->state & DOC_RAW_STARTED) return BadDrawable; - pDraw = (DrawablePtr)LookupDrawable(stuff->drawable, client); - if (!pDraw || pDraw->pScreen->myNum != pContext->screenNum) + result = dixLookupDrawable(&pDraw, stuff->drawable, client, 0, + DixUnknownAccess); + if (result != Success) + return result; + if (pDraw->pScreen->myNum != pContext->screenNum) return BadDrawable; } else { if (pContext->state & DOC_COOKED_STARTED) @@ -1996,7 +1998,7 @@ ProcXpGetDocumentData(ClientPtr client) if((pContext = (XpContextPtr)SecurityLookupIDByType(client, stuff->printContext, RTcontext, - SecurityWriteAccess)) + DixWriteAccess)) == (XpContextPtr)NULL) { client->errorValue = stuff->printContext; @@ -2079,7 +2081,7 @@ ProcXpGetAttributes(ClientPtr client) client, stuff->printContext, RTcontext, - SecurityReadAccess)) + DixReadAccess)) == (XpContextPtr)NULL) { client->errorValue = stuff->printContext; @@ -2151,7 +2153,7 @@ ProcXpSetAttributes(ClientPtr client) client, stuff->printContext, RTcontext, - SecurityWriteAccess)) + DixWriteAccess)) == (XpContextPtr)NULL) { client->errorValue = stuff->printContext; @@ -2231,7 +2233,7 @@ ProcXpGetOneAttribute(ClientPtr client) client, stuff->printContext, RTcontext, - SecurityReadAccess)) + DixReadAccess)) == (XpContextPtr)NULL) { client->errorValue = stuff->printContext; @@ -2302,7 +2304,7 @@ ProcXpSelectInput(ClientPtr client) if((pContext=(XpContextPtr)SecurityLookupIDByType(client, stuff->printContext, RTcontext, - SecurityWriteAccess)) + DixWriteAccess)) == (XpContextPtr)NULL) { client->errorValue = stuff->printContext; @@ -2338,7 +2340,7 @@ ProcXpInputSelected(ClientPtr client) if((pContext=(XpContextPtr)SecurityLookupIDByType(client, stuff->printContext, RTcontext, - SecurityReadAccess)) + DixReadAccess)) == (XpContextPtr)NULL) { client->errorValue = stuff->printContext; diff --git a/Xext/xres.c b/Xext/xres.c index 9f3624ba5..1617337bf 100644 --- a/Xext/xres.c +++ b/Xext/xres.c @@ -1,8 +1,6 @@ /* Copyright (c) 2002 XFree86 Inc */ -/* $XFree86: xc/programs/Xserver/Xext/xres.c,v 1.7tsi Exp $ */ -/* $XdotOrg: xserver/xorg/Xext/xres.c,v 1.8 2006/02/11 19:16:50 alanc Exp $ */ #define NEED_EVENTS #define NEED_REPLIES @@ -21,6 +19,8 @@ #include "swaprep.h" #include #include "pixmapstr.h" +#include "windowstr.h" +#include "gcstruct.h" #include "modinit.h" static int @@ -156,6 +156,7 @@ ProcXResQueryClientResources (ClientPtr client) swapl (&rep.length, n); swapl (&rep.num_types, n); } + WriteToClient (client,sizeof(xXResQueryClientResourcesReply),(char*)&rep); if(num_types) { @@ -187,13 +188,54 @@ ProcXResQueryClientResources (ClientPtr client) return (client->noClientException); } +static unsigned long +ResGetApproxPixmapBytes (PixmapPtr pix) +{ + unsigned long nPixels; + int bytesPerPixel; + + bytesPerPixel = pix->drawable.bitsPerPixel>>3; + nPixels = pix->drawable.width * pix->drawable.height; + + /* Divide by refcnt as pixmap could be shared between clients, + * so total pixmap mem is shared between these. + */ + return ( nPixels * bytesPerPixel ) / pix->refcnt; +} + static void ResFindPixmaps (pointer value, XID id, pointer cdata) { unsigned long *bytes = (unsigned long *)cdata; PixmapPtr pix = (PixmapPtr)value; - *bytes += (pix->devKind * pix->drawable.height); + *bytes += ResGetApproxPixmapBytes(pix); +} + +static void +ResFindWindowPixmaps (pointer value, XID id, pointer cdata) +{ + unsigned long *bytes = (unsigned long *)cdata; + WindowPtr pWin = (WindowPtr)value; + + if (pWin->backgroundState == BackgroundPixmap) + *bytes += ResGetApproxPixmapBytes(pWin->background.pixmap); + + if (pWin->border.pixmap != NULL && !pWin->borderIsPixel) + *bytes += ResGetApproxPixmapBytes(pWin->border.pixmap); +} + +static void +ResFindGCPixmaps (pointer value, XID id, pointer cdata) +{ + unsigned long *bytes = (unsigned long *)cdata; + GCPtr pGC = (GCPtr)value; + + if (pGC->stipple != NULL) + *bytes += ResGetApproxPixmapBytes(pGC->stipple); + + if (pGC->tile.pixmap != NULL && !pGC->tileIsPixel) + *bytes += ResGetApproxPixmapBytes(pGC->tile.pixmap); } static int @@ -220,6 +262,24 @@ ProcXResQueryClientPixmapBytes (ClientPtr client) FindClientResourcesByType(clients[clientID], RT_PIXMAP, ResFindPixmaps, (pointer)(&bytes)); + /* + * Make sure win background pixmaps also held to account. + */ + FindClientResourcesByType(clients[clientID], RT_WINDOW, + ResFindWindowPixmaps, + (pointer)(&bytes)); + + /* + * GC Tile & Stipple pixmaps too. + */ + FindClientResourcesByType(clients[clientID], RT_GC, + ResFindGCPixmaps, + (pointer)(&bytes)); + +#ifdef COMPOSITE + /* FIXME: include composite pixmaps too */ +#endif + rep.type = X_Reply; rep.sequenceNumber = client->sequence; rep.length = 0; diff --git a/Xext/xtest.c b/Xext/xtest.c index 6737185aa..c9b511e69 100644 --- a/Xext/xtest.c +++ b/Xext/xtest.c @@ -1,5 +1,3 @@ -/* $XdotOrg: xserver/xorg/Xext/xtest.c,v 1.6 2005/07/03 08:53:36 daniels Exp $ */ -/* $Xorg: xtest.c,v 1.4 2001/02/09 02:04:33 xorgcvs Exp $ */ /* Copyright 1992, 1998 The Open Group @@ -27,7 +25,6 @@ other dealings in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/programs/Xserver/Xext/xtest.c,v 3.10 2003/10/28 23:08:44 tsi Exp $ */ #ifdef HAVE_DIX_CONFIG_H #include @@ -142,12 +139,12 @@ ProcXTestCompareCursor(client) xXTestCompareCursorReply rep; WindowPtr pWin; CursorPtr pCursor; - register int n; + register int n, rc; REQUEST_SIZE_MATCH(xXTestCompareCursorReq); - pWin = (WindowPtr)LookupWindow(stuff->window, client); - if (!pWin) - return(BadWindow); + rc = dixLookupWindow(&pWin, stuff->window, client, DixUnknownAccess); + if (rc != Success) + return rc; if (stuff->cursor == None) pCursor = NullCursor; else if (stuff->cursor == XTestCurrentCursor) @@ -176,12 +173,10 @@ ProcXTestFakeInput(client) register ClientPtr client; { REQUEST(xXTestFakeInputReq); - int nev; - int n; + int nev, n, type, rc; xEvent *ev; DeviceIntPtr dev = NULL; WindowPtr root; - int type; #ifdef XINPUT Bool extension = FALSE; deviceValuator *dv = NULL; @@ -370,9 +365,10 @@ ProcXTestFakeInput(client) root = GetCurrentRootWindow(); else { - root = LookupWindow(ev->u.keyButtonPointer.root, client); - if (!root) - return BadWindow; + rc = dixLookupWindow(&root, ev->u.keyButtonPointer.root, client, + DixUnknownAccess); + if (rc != Success) + return rc; if (root->parent) { client->errorValue = ev->u.keyButtonPointer.root; diff --git a/Xext/xvdisp.c b/Xext/xvdisp.c index 7c490abca..21d00aa7f 100644 --- a/Xext/xvdisp.c +++ b/Xext/xvdisp.c @@ -1,4 +1,3 @@ -/* $XdotOrg: xserver/xorg/Xext/xvdisp.c,v 1.6 2005/07/03 08:53:36 daniels Exp $ */ /*********************************************************** Copyright 1991 by Digital Equipment Corporation, Maynard, Massachusetts, and the Massachusetts Institute of Technology, Cambridge, Massachusetts. @@ -22,7 +21,6 @@ ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ -/* $XFree86: xc/programs/Xserver/Xext/xvdisp.c,v 1.27 2003/07/16 01:38:31 dawes Exp $ */ /* ** File: @@ -375,10 +373,8 @@ ProcXvQueryAdaptors(ClientPtr client) xvFormat format; xvAdaptorInfo ainfo; xvQueryAdaptorsReply rep; - int totalSize; - int na; + int totalSize, na, nf, rc; XvAdaptorPtr pa; - int nf; XvFormatPtr pf; WindowPtr pWin; ScreenPtr pScreen; @@ -387,11 +383,9 @@ ProcXvQueryAdaptors(ClientPtr client) REQUEST(xvQueryAdaptorsReq); REQUEST_SIZE_MATCH(xvQueryAdaptorsReq); - if(!(pWin = (WindowPtr)LookupWindow(stuff->window, client) )) - { - client->errorValue = stuff->window; - return (BadWindow); - } + rc = dixLookupWindow(&pWin, stuff->window, client, DixUnknownAccess); + if (rc != Success) + return rc; pScreen = pWin->drawable.pScreen; pxvs = (XvScreenPtr)pScreen->devPrivates[XvScreenIndex].ptr; @@ -533,9 +527,9 @@ ProcXvQueryEncodings(ClientPtr client) static int ProcXvPutVideo(ClientPtr client) { - register DrawablePtr pDraw; + DrawablePtr pDraw; XvPortPtr pPort; - register GCPtr pGC; + GCPtr pGC; int status; REQUEST(xvPutVideoReq); @@ -579,9 +573,9 @@ ProcXvPutVideo(ClientPtr client) static int ProcXvPutStill(ClientPtr client) { - register DrawablePtr pDraw; + DrawablePtr pDraw; XvPortPtr pPort; - register GCPtr pGC; + GCPtr pGC; int status; REQUEST(xvPutStillReq); @@ -626,9 +620,9 @@ ProcXvPutStill(ClientPtr client) static int ProcXvGetVideo(ClientPtr client) { - register DrawablePtr pDraw; + DrawablePtr pDraw; XvPortPtr pPort; - register GCPtr pGC; + GCPtr pGC; int status; REQUEST(xvGetVideoReq); @@ -673,9 +667,9 @@ ProcXvGetVideo(ClientPtr client) static int ProcXvGetStill(ClientPtr client) { - register DrawablePtr pDraw; + DrawablePtr pDraw; XvPortPtr pPort; - register GCPtr pGC; + GCPtr pGC; int status; REQUEST(xvGetStillReq); @@ -719,15 +713,14 @@ ProcXvGetStill(ClientPtr client) static int ProcXvSelectVideoNotify(ClientPtr client) { - register DrawablePtr pDraw; + DrawablePtr pDraw; + int rc; REQUEST(xvSelectVideoNotifyReq); REQUEST_SIZE_MATCH(xvSelectVideoNotifyReq); - if(!(pDraw = (DrawablePtr)LOOKUP_DRAWABLE(stuff->drawable, client) )) - { - client->errorValue = stuff->drawable; - return (BadWindow); - } + rc = dixLookupDrawable(&pDraw, stuff->drawable, client, 0, DixUnknownAccess); + if (rc != Success) + return rc; return XVCALL(diSelectVideoNotify)(client, pDraw, stuff->onoff); @@ -824,8 +817,8 @@ ProcXvUngrabPort(ClientPtr client) static int ProcXvStopVideo(ClientPtr client) { - int status; - register DrawablePtr pDraw; + int status, rc; + DrawablePtr pDraw; XvPortPtr pPort; REQUEST(xvStopVideoReq); REQUEST_SIZE_MATCH(xvStopVideoReq); @@ -842,11 +835,9 @@ ProcXvStopVideo(ClientPtr client) return (status); } - if(!(pDraw = LOOKUP_DRAWABLE(stuff->drawable, client) )) - { - client->errorValue = stuff->drawable; - return (BadDrawable); - } + rc = dixLookupDrawable(&pDraw, stuff->drawable, client, 0, DixUnknownAccess); + if (rc != Success) + return rc; return XVCALL(diStopVideo)(client, pPort, pDraw); @@ -1879,11 +1870,11 @@ XineramaXvStopVideo(ClientPtr client) REQUEST_SIZE_MATCH(xvStopVideoReq); if(!(draw = (PanoramiXRes *)SecurityLookupIDByClass( - client, stuff->drawable, XRC_DRAWABLE, SecurityWriteAccess))) + client, stuff->drawable, XRC_DRAWABLE, DixWriteAccess))) return BadDrawable; if(!(port = (PanoramiXRes *)SecurityLookupIDByType( - client, stuff->port, XvXRTPort, SecurityReadAccess))) + client, stuff->port, XvXRTPort, DixReadAccess))) return _XvBadPort; FOR_NSCREENS_BACKWARD(i) { @@ -1907,7 +1898,7 @@ XineramaXvSetPortAttribute(ClientPtr client) REQUEST_SIZE_MATCH(xvSetPortAttributeReq); if(!(port = (PanoramiXRes *)SecurityLookupIDByType( - client, stuff->port, XvXRTPort, SecurityReadAccess))) + client, stuff->port, XvXRTPort, DixReadAccess))) return _XvBadPort; FOR_NSCREENS_BACKWARD(i) { @@ -1933,15 +1924,15 @@ XineramaXvShmPutImage(ClientPtr client) REQUEST_SIZE_MATCH(xvShmPutImageReq); if(!(draw = (PanoramiXRes *)SecurityLookupIDByClass( - client, stuff->drawable, XRC_DRAWABLE, SecurityWriteAccess))) + client, stuff->drawable, XRC_DRAWABLE, DixWriteAccess))) return BadDrawable; if(!(gc = (PanoramiXRes *)SecurityLookupIDByType( - client, stuff->gc, XRT_GC, SecurityReadAccess))) + client, stuff->gc, XRT_GC, DixReadAccess))) return BadGC; if(!(port = (PanoramiXRes *)SecurityLookupIDByType( - client, stuff->port, XvXRTPort, SecurityReadAccess))) + client, stuff->port, XvXRTPort, DixReadAccess))) return _XvBadPort; isRoot = (draw->type == XRT_WINDOW) && draw->u.win.root; @@ -1980,15 +1971,15 @@ XineramaXvPutImage(ClientPtr client) REQUEST_AT_LEAST_SIZE(xvPutImageReq); if(!(draw = (PanoramiXRes *)SecurityLookupIDByClass( - client, stuff->drawable, XRC_DRAWABLE, SecurityWriteAccess))) + client, stuff->drawable, XRC_DRAWABLE, DixWriteAccess))) return BadDrawable; if(!(gc = (PanoramiXRes *)SecurityLookupIDByType( - client, stuff->gc, XRT_GC, SecurityReadAccess))) + client, stuff->gc, XRT_GC, DixReadAccess))) return BadGC; if(!(port = (PanoramiXRes *)SecurityLookupIDByType( - client, stuff->port, XvXRTPort, SecurityReadAccess))) + client, stuff->port, XvXRTPort, DixReadAccess))) return _XvBadPort; isRoot = (draw->type == XRT_WINDOW) && draw->u.win.root; @@ -2025,15 +2016,15 @@ XineramaXvPutVideo(ClientPtr client) REQUEST_AT_LEAST_SIZE(xvPutVideoReq); if(!(draw = (PanoramiXRes *)SecurityLookupIDByClass( - client, stuff->drawable, XRC_DRAWABLE, SecurityWriteAccess))) + client, stuff->drawable, XRC_DRAWABLE, DixWriteAccess))) return BadDrawable; if(!(gc = (PanoramiXRes *)SecurityLookupIDByType( - client, stuff->gc, XRT_GC, SecurityReadAccess))) + client, stuff->gc, XRT_GC, DixReadAccess))) return BadGC; if(!(port = (PanoramiXRes *)SecurityLookupIDByType( - client, stuff->port, XvXRTPort, SecurityReadAccess))) + client, stuff->port, XvXRTPort, DixReadAccess))) return _XvBadPort; isRoot = (draw->type == XRT_WINDOW) && draw->u.win.root; @@ -2070,15 +2061,15 @@ XineramaXvPutStill(ClientPtr client) REQUEST_AT_LEAST_SIZE(xvPutImageReq); if(!(draw = (PanoramiXRes *)SecurityLookupIDByClass( - client, stuff->drawable, XRC_DRAWABLE, SecurityWriteAccess))) + client, stuff->drawable, XRC_DRAWABLE, DixWriteAccess))) return BadDrawable; if(!(gc = (PanoramiXRes *)SecurityLookupIDByType( - client, stuff->gc, XRT_GC, SecurityReadAccess))) + client, stuff->gc, XRT_GC, DixReadAccess))) return BadGC; if(!(port = (PanoramiXRes *)SecurityLookupIDByType( - client, stuff->port, XvXRTPort, SecurityReadAccess))) + client, stuff->port, XvXRTPort, DixReadAccess))) return _XvBadPort; isRoot = (draw->type == XRT_WINDOW) && draw->u.win.root; diff --git a/Xext/xvdix.h b/Xext/xvdix.h index 99d918406..9e94e05d5 100644 --- a/Xext/xvdix.h +++ b/Xext/xvdix.h @@ -21,7 +21,6 @@ ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ -/* $XFree86: xc/programs/Xserver/Xext/xvdix.h,v 1.7 2001/05/07 21:37:51 tsi Exp $ */ #ifndef XVDIX_H #define XVDIX_H diff --git a/Xext/xvmain.c b/Xext/xvmain.c index 422032da9..22339011c 100644 --- a/Xext/xvmain.c +++ b/Xext/xvmain.c @@ -1,4 +1,3 @@ -/* $XdotOrg: xserver/xorg/Xext/xvmain.c,v 1.7 2006/02/10 22:00:20 anholt Exp $ */ /*********************************************************** Copyright 1991 by Digital Equipment Corporation, Maynard, Massachusetts, and the Massachusetts Institute of Technology, Cambridge, Massachusetts. @@ -22,7 +21,6 @@ ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ -/* $XFree86: xc/programs/Xserver/Xext/xvmain.c,v 1.15tsi Exp $ */ /* ** File: diff --git a/Xext/xvmc.c b/Xext/xvmc.c index a814f003e..737fc5dfd 100644 --- a/Xext/xvmc.c +++ b/Xext/xvmc.c @@ -1,4 +1,3 @@ -/* $XFree86: xc/programs/Xserver/Xext/xvmc.c,v 1.8 2003/07/16 01:38:31 dawes Exp $ */ #define NEED_REPLIES #define NEED_EVENTS diff --git a/Xext/xvmcext.h b/Xext/xvmcext.h index c7eba30ad..9c019fee6 100644 --- a/Xext/xvmcext.h +++ b/Xext/xvmcext.h @@ -1,4 +1,3 @@ -/* $XFree86: xc/programs/Xserver/Xext/xvmcext.h,v 1.1 2001/04/07 11:04:21 alanh Exp $ */ #ifndef _XVMC_H #define _XVMC_H diff --git a/Xi/Makefile.am b/Xi/Makefile.am index 8eac59bb6..fbe438543 100644 --- a/Xi/Makefile.am +++ b/Xi/Makefile.am @@ -1,6 +1,6 @@ noinst_LTLIBRARIES = libXi.la -AM_CFLAGS = $(DIX_CFLAGS) @SERVER_DEFINES@ @LOADER_DEFINES@ +AM_CFLAGS = $(DIX_CFLAGS) libXi_la_SOURCES = \ allowev.c \ diff --git a/Xi/chgdctl.c b/Xi/chgdctl.c index d507513a9..badd93822 100644 --- a/Xi/chgdctl.c +++ b/Xi/chgdctl.c @@ -66,6 +66,7 @@ SOFTWARE. #include "extnsionst.h" #include "extinit.h" /* LookupDeviceIntRec */ #include "exglobals.h" +#include "exevents.h" #include "chgdctl.h" @@ -98,12 +99,17 @@ int ProcXChangeDeviceControl(ClientPtr client) { unsigned len; - int i, status; + int i, status, ret = BadValue; DeviceIntPtr dev; xDeviceResolutionCtl *r; xChangeDeviceControlReply rep; AxisInfoPtr a; CARD32 *resolution; + xDeviceAbsCalibCtl *calib; + xDeviceAbsAreaCtl *area; + xDeviceCoreCtl *c; + xDeviceEnableCtl *e; + devicePresenceNotify dpn; REQUEST(xChangeDeviceControlReq); REQUEST_AT_LEAST_SIZE(xChangeDeviceControlReq); @@ -111,9 +117,8 @@ ProcXChangeDeviceControl(ClientPtr client) len = stuff->length - (sizeof(xChangeDeviceControlReq) >> 2); dev = LookupDeviceIntRec(stuff->deviceid); if (dev == NULL) { - SendErrorToClient(client, IReqCode, X_ChangeDeviceControl, 0, - BadDevice); - return Success; + ret = BadDevice; + goto out; } rep.repType = X_Reply; @@ -126,25 +131,22 @@ ProcXChangeDeviceControl(ClientPtr client) r = (xDeviceResolutionCtl *) & stuff[1]; if ((len < (sizeof(xDeviceResolutionCtl) >> 2)) || (len != (sizeof(xDeviceResolutionCtl) >> 2) + r->num_valuators)) { - SendErrorToClient(client, IReqCode, X_ChangeDeviceControl, - 0, BadLength); - return Success; + ret = BadLength; + goto out; } if (!dev->valuator) { - SendErrorToClient(client, IReqCode, X_ChangeDeviceControl, 0, - BadMatch); - return Success; + ret = BadMatch; + goto out; } if ((dev->grab) && !SameClient(dev->grab, client)) { rep.status = AlreadyGrabbed; - WriteReplyToClient(client, sizeof(xChangeDeviceControlReply), &rep); - return Success; + ret = Success; + goto out; } resolution = (CARD32 *) (r + 1); if (r->first_valuator + r->num_valuators > dev->valuator->numAxes) { - SendErrorToClient(client, IReqCode, X_ChangeDeviceControl, 0, - BadValue); - return Success; + ret = BadValue; + goto out; } status = ChangeDeviceControl(client, dev, (xDeviceCtl *) r); if (status == Success) { @@ -158,21 +160,119 @@ ProcXChangeDeviceControl(ClientPtr client) } for (i = 0; i < r->num_valuators; i++) (a++)->resolution = *resolution++; + + ret = Success; } else if (status == DeviceBusy) { rep.status = DeviceBusy; - WriteReplyToClient(client, sizeof(xChangeDeviceControlReply), &rep); - return Success; + ret = Success; } else { - SendErrorToClient(client, IReqCode, X_ChangeDeviceControl, 0, - BadMatch); - return Success; + ret = BadMatch; } break; + case DEVICE_ABS_CALIB: + calib = (xDeviceAbsCalibCtl *)&stuff[1]; + + if (calib->button_threshold < 0 || calib->button_threshold > 255) { + ret = BadValue; + goto out; + } + + status = ChangeDeviceControl(client, dev, (xDeviceCtl *) calib); + + if (status == Success) { + dev->absolute->min_x = calib->min_x; + dev->absolute->max_x = calib->max_x; + dev->absolute->min_y = calib->min_y; + dev->absolute->max_y = calib->max_y; + dev->absolute->flip_x = calib->flip_x; + dev->absolute->flip_y = calib->flip_y; + dev->absolute->rotation = calib->rotation; + dev->absolute->button_threshold = calib->button_threshold; + ret = Success; + } else if (status == DeviceBusy || status == BadValue) { + rep.status = status; + ret = Success; + } else { + ret = BadMatch; + } + + break; + case DEVICE_ABS_AREA: + area = (xDeviceAbsAreaCtl *)&stuff[1]; + + status = ChangeDeviceControl(client, dev, (xDeviceCtl *) area); + + if (status == Success) { + dev->absolute->offset_x = area->offset_x; + dev->absolute->offset_y = area->offset_y; + dev->absolute->width = area->width; + dev->absolute->height = area->height; + dev->absolute->screen = area->screen; + dev->absolute->following = area->following; + ret = Success; + } else if (status == DeviceBusy || status == BadValue) { + rep.status = status; + ret = Success; + } else { + ret = Success; + } + + break; + case DEVICE_CORE: + c = (xDeviceCoreCtl *)&stuff[1]; + + status = ChangeDeviceControl(client, dev, (xDeviceCtl *) c); + + if (status == Success) { + dev->coreEvents = c->status; + ret = Success; + } else if (status == DeviceBusy) { + rep.status = DeviceBusy; + ret = Success; + } else { + ret = BadMatch; + } + + break; + case DEVICE_ENABLE: + e = (xDeviceEnableCtl *)&stuff[1]; + + status = ChangeDeviceControl(client, dev, (xDeviceCtl *) e); + + if (status == Success) { + if (e->enable) + EnableDevice(dev); + else + DisableDevice(dev); + ret = Success; + } else if (status == DeviceBusy) { + rep.status = DeviceBusy; + ret = Success; + } else { + ret = BadMatch; + } + + break; default: - SendErrorToClient(client, IReqCode, X_ChangeDeviceControl, 0, BadValue); - return Success; + ret = BadValue; } - WriteReplyToClient(client, sizeof(xChangeDeviceControlReply), &rep); + +out: + if (ret == Success) { + dpn.type = DevicePresenceNotify; + dpn.time = currentTime.milliseconds; + dpn.devchange = 1; + dpn.deviceid = dev->id; + dpn.control = stuff->control; + SendEventToAllWindows(dev, DevicePresenceNotifyMask, + (xEvent *) &dpn, 1); + + WriteReplyToClient(client, sizeof(xChangeDeviceControlReply), &rep); + } + else { + SendErrorToClient(client, IReqCode, X_ChangeDeviceControl, 0, ret); + } + return Success; } diff --git a/Xi/chgkbd.c b/Xi/chgkbd.c index 289bd85af..8134b4060 100644 --- a/Xi/chgkbd.c +++ b/Xi/chgkbd.c @@ -64,7 +64,6 @@ SOFTWARE. #include "XIstubs.h" #include "globals.h" #include "extnsionst.h" -#include "extinit.h" /* LookupDeviceIntRec */ #include "exevents.h" #include "exglobals.h" @@ -99,107 +98,10 @@ SProcXChangeKeyboardDevice(register ClientPtr client) int ProcXChangeKeyboardDevice(register ClientPtr client) { - int i; - DeviceIntPtr xkbd = inputInfo.keyboard; - DeviceIntPtr dev; - FocusClassPtr xf = xkbd->focus; - FocusClassPtr df; - KeyClassPtr k; - xChangeKeyboardDeviceReply rep; - changeDeviceNotify ev; - REQUEST(xChangeKeyboardDeviceReq); REQUEST_SIZE_MATCH(xChangeKeyboardDeviceReq); - rep.repType = X_Reply; - rep.RepType = X_ChangeKeyboardDevice; - rep.length = 0; - rep.sequenceNumber = client->sequence; - - dev = LookupDeviceIntRec(stuff->deviceid); - if (dev == NULL) { - rep.status = -1; - SendErrorToClient(client, IReqCode, X_ChangeKeyboardDevice, 0, - BadDevice); - return Success; - } - - k = dev->key; - if (k == NULL) { - rep.status = -1; - SendErrorToClient(client, IReqCode, X_ChangeKeyboardDevice, 0, - BadMatch); - return Success; - } - - if (((dev->grab) && !SameClient(dev->grab, client)) || - ((xkbd->grab) && !SameClient(xkbd->grab, client))) - rep.status = AlreadyGrabbed; - else if ((dev->sync.frozen && - dev->sync.other && !SameClient(dev->sync.other, client)) || - (xkbd->sync.frozen && - xkbd->sync.other && !SameClient(xkbd->sync.other, client))) - rep.status = GrabFrozen; - else { - if (ChangeKeyboardDevice(xkbd, dev) != Success) { - SendErrorToClient(client, IReqCode, X_ChangeKeyboardDevice, 0, - BadDevice); - return Success; - } - if (!dev->focus) - InitFocusClassDeviceStruct(dev); - if (!dev->kbdfeed) - InitKbdFeedbackClassDeviceStruct(dev, (BellProcPtr) NoopDDA, - (KbdCtrlProcPtr) NoopDDA); - df = dev->focus; - df->win = xf->win; - df->revert = xf->revert; - df->time = xf->time; - df->traceGood = xf->traceGood; - if (df->traceSize != xf->traceSize) { - Must_have_memory = TRUE; /* XXX */ - df->trace = (WindowPtr *) xrealloc(df->trace, - xf->traceSize * - sizeof(WindowPtr)); - Must_have_memory = FALSE; /* XXX */ - } - df->traceSize = xf->traceSize; - for (i = 0; i < df->traceSize; i++) - df->trace[i] = xf->trace[i]; - RegisterOtherDevice(xkbd); - RegisterKeyboardDevice(dev); - - ev.type = ChangeDeviceNotify; - ev.deviceid = stuff->deviceid; - ev.time = currentTime.milliseconds; - ev.request = NewKeyboard; - - SendEventToAllWindows(dev, ChangeDeviceNotifyMask, (xEvent *) & ev, 1); - SendMappingNotify(MappingKeyboard, k->curKeySyms.minKeyCode, - k->curKeySyms.maxKeyCode - k->curKeySyms.minKeyCode + - 1, client); - - rep.status = 0; - } - - WriteReplyToClient(client, sizeof(xChangeKeyboardDeviceReply), &rep); + SendErrorToClient(client, IReqCode, X_ChangeKeyboardDevice, 0, + BadDevice); return Success; } - -/*********************************************************************** - * - * This procedure writes the reply for the XChangeKeyboardDevice - * function, if the client and server have a different byte ordering. - * - */ - -void -SRepXChangeKeyboardDevice(ClientPtr client, int size, - xChangeKeyboardDeviceReply * rep) -{ - register char n; - - swaps(&rep->sequenceNumber, n); - swapl(&rep->length, n); - WriteToClient(client, size, (char *)rep); -} diff --git a/Xi/chgkbd.h b/Xi/chgkbd.h index 7a883b7f0..5f9922336 100644 --- a/Xi/chgkbd.h +++ b/Xi/chgkbd.h @@ -36,9 +36,4 @@ int SProcXChangeKeyboardDevice(ClientPtr /* client */ int ProcXChangeKeyboardDevice(ClientPtr /* client */ ); -void SRepXChangeKeyboardDevice(ClientPtr /* client */ , - int /* size */ , - xChangeKeyboardDeviceReply * /* rep */ - ); - #endif /* CHGKBD_H */ diff --git a/Xi/chgprop.c b/Xi/chgprop.c index 52c38838d..bab4597b8 100644 --- a/Xi/chgprop.c +++ b/Xi/chgprop.c @@ -106,7 +106,7 @@ SProcXChangeDeviceDontPropagateList(register ClientPtr client) int ProcXChangeDeviceDontPropagateList(register ClientPtr client) { - int i; + int i, rc; WindowPtr pWin; struct tmask tmp[EMASKSIZE]; OtherInputMasks *others; @@ -121,11 +121,10 @@ ProcXChangeDeviceDontPropagateList(register ClientPtr client) return Success; } - pWin = (WindowPtr) LookupWindow(stuff->window, client); - if (!pWin) { - client->errorValue = stuff->window; + rc = dixLookupWindow(&pWin, stuff->window, client, DixUnknownAccess); + if (rc != Success) { SendErrorToClient(client, IReqCode, X_ChangeDeviceDontPropagateList, 0, - BadWindow); + rc); return Success; } diff --git a/Xi/chgptr.c b/Xi/chgptr.c index f6f4b8bff..22c8a5f5e 100644 --- a/Xi/chgptr.c +++ b/Xi/chgptr.c @@ -101,138 +101,10 @@ SProcXChangePointerDevice(register ClientPtr client) int ProcXChangePointerDevice(register ClientPtr client) { - DeviceIntPtr xptr = inputInfo.pointer; - DeviceIntPtr dev; - ValuatorClassPtr v; - xChangePointerDeviceReply rep; - changeDeviceNotify ev; - REQUEST(xChangePointerDeviceReq); REQUEST_SIZE_MATCH(xChangePointerDeviceReq); - rep.repType = X_Reply; - rep.RepType = X_ChangePointerDevice; - rep.length = 0; - rep.sequenceNumber = client->sequence; - - dev = LookupDeviceIntRec(stuff->deviceid); - if (dev == NULL) { - rep.status = -1; - SendErrorToClient(client, IReqCode, X_ChangePointerDevice, 0, - BadDevice); - return Success; - } - - v = dev->valuator; - if (v == NULL || v->numAxes < 2 || - stuff->xaxis >= v->numAxes || stuff->yaxis >= v->numAxes) { - rep.status = -1; - SendErrorToClient(client, IReqCode, X_ChangePointerDevice, 0, BadMatch); - return Success; - } - - if (((dev->grab) && !SameClient(dev->grab, client)) || - ((xptr->grab) && !SameClient(xptr->grab, client))) - rep.status = AlreadyGrabbed; - else if ((dev->sync.frozen && - dev->sync.other && !SameClient(dev->sync.other, client)) || - (xptr->sync.frozen && - xptr->sync.other && !SameClient(xptr->sync.other, client))) - rep.status = GrabFrozen; - else { - if (ChangePointerDevice(xptr, dev, stuff->xaxis, stuff->yaxis) != - Success) { - SendErrorToClient(client, IReqCode, X_ChangePointerDevice, 0, - BadDevice); - return Success; - } - if (dev->focus) - DeleteFocusClassDeviceStruct(dev); - if (!dev->button) - InitButtonClassDeviceStruct(dev, 0, NULL); - if (!dev->ptrfeed) - InitPtrFeedbackClassDeviceStruct(dev, (PtrCtrlProcPtr) NoopDDA); - RegisterOtherDevice(xptr); - RegisterPointerDevice(dev); - - ev.type = ChangeDeviceNotify; - ev.deviceid = stuff->deviceid; - ev.time = currentTime.milliseconds; - ev.request = NewPointer; - - SendEventToAllWindows(dev, ChangeDeviceNotifyMask, (xEvent *) & ev, 1); - SendMappingNotify(MappingPointer, 0, 0, client); - - rep.status = 0; - } - - WriteReplyToClient(client, sizeof(xChangePointerDeviceReply), &rep); + SendErrorToClient(client, IReqCode, X_ChangePointerDevice, 0, + BadDevice); return Success; } - -void -DeleteFocusClassDeviceStruct(DeviceIntPtr dev) -{ - xfree(dev->focus->trace); - xfree(dev->focus); - dev->focus = NULL; -} - -/*********************************************************************** - * - * Send an event to interested clients in all windows on all screens. - * - */ - -void -SendEventToAllWindows(DeviceIntPtr dev, Mask mask, xEvent * ev, int count) -{ - int i; - WindowPtr pWin, p1; - - for (i = 0; i < screenInfo.numScreens; i++) { - pWin = WindowTable[i]; - (void)DeliverEventsToWindow(pWin, ev, count, mask, NullGrab, dev->id); - p1 = pWin->firstChild; - FindInterestedChildren(dev, p1, mask, ev, count); - } -} - -/*********************************************************************** - * - * Walk through the window tree, finding all clients that want to know - * about the ChangeDeviceNotify Event. - * - */ - -void -FindInterestedChildren(DeviceIntPtr dev, WindowPtr p1, Mask mask, - xEvent * ev, int count) -{ - WindowPtr p2; - - while (p1) { - p2 = p1->firstChild; - (void)DeliverEventsToWindow(p1, ev, count, mask, NullGrab, dev->id); - FindInterestedChildren(dev, p2, mask, ev, count); - p1 = p1->nextSib; - } -} - -/*********************************************************************** - * - * This procedure writes the reply for the XChangePointerDevice - * function, if the client and server have a different byte ordering. - * - */ - -void -SRepXChangePointerDevice(ClientPtr client, int size, - xChangePointerDeviceReply * rep) -{ - register char n; - - swaps(&rep->sequenceNumber, n); - swapl(&rep->length, n); - WriteToClient(client, size, (char *)rep); -} diff --git a/Xi/chgptr.h b/Xi/chgptr.h index aeda822aa..fb3b5cc39 100644 --- a/Xi/chgptr.h +++ b/Xi/chgptr.h @@ -53,9 +53,4 @@ void FindInterestedChildren( /* FIXME: could be static? */ int /* count */ ); -void SRepXChangePointerDevice(ClientPtr /* client */ , - int /* size */ , - xChangePointerDeviceReply * /* rep */ - ); - #endif /* CHGPTR_H */ diff --git a/Xi/exevents.c b/Xi/exevents.c index 2932ab2d2..b7645f443 100644 --- a/Xi/exevents.c +++ b/Xi/exevents.c @@ -71,8 +71,7 @@ SOFTWARE. #include "exglobals.h" #include "dixevents.h" /* DeliverFocusedEvent */ #include "dixgrabs.h" /* CreateGrab() */ - -#include "chgptr.h" +#include "scrnintstr.h" #define WID(w) ((w) ? ((w)->drawable.id) : 0) #define AllModifiersMask ( \ @@ -302,7 +301,12 @@ _X_EXPORT void InitValuatorAxisStruct(DeviceIntPtr dev, int axnum, int minval, int maxval, int resolution, int min_res, int max_res) { - register AxisInfoPtr ax = dev->valuator->axes + axnum; + register AxisInfoPtr ax; + + if (!dev || !dev->valuator) + return; + + ax = dev->valuator->axes + axnum; ax->min_value = minval; ax->max_value = maxval; @@ -501,6 +505,7 @@ GrabButton(ClientPtr client, DeviceIntPtr dev, BYTE this_device_mode, WindowPtr pWin, confineTo; CursorPtr cursor; GrabPtr grab; + int rc; if ((this_device_mode != GrabModeSync) && (this_device_mode != GrabModeAsync)) { @@ -520,15 +525,15 @@ GrabButton(ClientPtr client, DeviceIntPtr dev, BYTE this_device_mode, client->errorValue = ownerEvents; return BadValue; } - pWin = LookupWindow(grabWindow, client); - if (!pWin) - return BadWindow; + rc = dixLookupWindow(&pWin, grabWindow, client, DixUnknownAccess); + if (rc != Success) + return rc; if (rconfineTo == None) confineTo = NullWindow; else { - confineTo = LookupWindow(rconfineTo, client); - if (!confineTo) - return BadWindow; + rc = dixLookupWindow(&confineTo, rconfineTo, client, DixUnknownAccess); + if (rc != Success) + return rc; } if (rcursor == None) cursor = NullCursor; @@ -558,6 +563,7 @@ GrabKey(ClientPtr client, DeviceIntPtr dev, BYTE this_device_mode, WindowPtr pWin; GrabPtr grab; KeyClassPtr k = dev->key; + int rc; if (k == NULL) return BadMatch; @@ -584,9 +590,9 @@ GrabKey(ClientPtr client, DeviceIntPtr dev, BYTE this_device_mode, client->errorValue = ownerEvents; return BadValue; } - pWin = LookupWindow(grabWindow, client); - if (!pWin) - return BadWindow; + rc = dixLookupWindow(&pWin, grabWindow, client, DixUnknownAccess); + if (rc != Success) + return rc; grab = CreateGrab(client->index, dev, pWin, mask, ownerEvents, this_device_mode, other_devices_mode, @@ -806,7 +812,7 @@ SendEvent(ClientPtr client, DeviceIntPtr d, Window dest, Bool propagate, } else effectiveFocus = pWin = inputFocus; } else - pWin = LookupWindow(dest, client); + dixLookupWindow(&pWin, dest, client, DixUnknownAccess); if (!pWin) return BadWindow; if ((propagate != xFalse) && (propagate != xTrue)) { @@ -898,7 +904,7 @@ SetModifierMapping(ClientPtr client, DeviceIntPtr dev, int len, int rlen, return MappingBusy; } else { for (i = 0; i < inputMapLen; i++) { - if (inputMap[i] && !LegalModifier(inputMap[i], (DevicePtr) dev)) { + if (inputMap[i] && !LegalModifier(inputMap[i], dev)) { return MappingFailed; } } @@ -1209,3 +1215,44 @@ ShouldFreeInputMasks(WindowPtr pWin, Bool ignoreSelectedEvents) else return FALSE; } + +/*********************************************************************** + * + * Walk through the window tree, finding all clients that want to know + * about the Event. + * + */ + +void +FindInterestedChildren(DeviceIntPtr dev, WindowPtr p1, Mask mask, + xEvent * ev, int count) +{ + WindowPtr p2; + + while (p1) { + p2 = p1->firstChild; + (void)DeliverEventsToWindow(p1, ev, count, mask, NullGrab, dev->id); + FindInterestedChildren(dev, p2, mask, ev, count); + p1 = p1->nextSib; + } +} + +/*********************************************************************** + * + * Send an event to interested clients in all windows on all screens. + * + */ + +void +SendEventToAllWindows(DeviceIntPtr dev, Mask mask, xEvent * ev, int count) +{ + int i; + WindowPtr pWin, p1; + + for (i = 0; i < screenInfo.numScreens; i++) { + pWin = WindowTable[i]; + (void)DeliverEventsToWindow(pWin, ev, count, mask, NullGrab, dev->id); + p1 = pWin->firstChild; + FindInterestedChildren(dev, p1, mask, ev, count); + } +} diff --git a/Xi/exglobals.h b/Xi/exglobals.h index c64b84875..3afd1bb9e 100644 --- a/Xi/exglobals.h +++ b/Xi/exglobals.h @@ -51,6 +51,7 @@ extern Mask DeviceMappingNotifyMask; extern Mask DeviceOwnerGrabButtonMask; extern Mask DeviceButtonGrabMask; extern Mask DeviceButtonMotionMask; +extern Mask DevicePresenceNotifyMask; extern Mask PropagateMask[]; extern int DeviceValuator; @@ -68,12 +69,8 @@ extern int DeviceKeyStateNotify; extern int DeviceButtonStateNotify; extern int DeviceMappingNotify; extern int ChangeDeviceNotify; +extern int DevicePresenceNotify; extern int RT_INPUTCLIENT; -#if 0 -/* FIXME: in dix */ -extern InputInfo inputInfo; -#endif - #endif /* EXGLOBALS_H */ diff --git a/Xi/extinit.c b/Xi/extinit.c index f3aabe3a7..454883762 100644 --- a/Xi/extinit.c +++ b/Xi/extinit.c @@ -166,6 +166,7 @@ Mask DeviceMappingNotifyMask; Mask DeviceOwnerGrabButtonMask; Mask DeviceButtonGrabMask; Mask DeviceButtonMotionMask; +Mask DevicePresenceNotifyMask; int DeviceValuator; int DeviceKeyPress; @@ -182,6 +183,7 @@ int DeviceKeyStateNotify; int DeviceButtonStateNotify; int DeviceMappingNotify; int ChangeDeviceNotify; +int DevicePresenceNotify; int RT_INPUTCLIENT; @@ -202,8 +204,8 @@ Mask PropagateMask[MAX_DEVICES]; */ static XExtensionVersion thisversion = { XI_Present, - XI_Add_XChangeDeviceControl_Major, - XI_Add_XChangeDeviceControl_Minor + XI_Add_DevicePresenceNotify_Major, + XI_Add_DevicePresenceNotify_Minor }; /********************************************************************** @@ -463,12 +465,6 @@ SReplyIDispatch(ClientPtr client, int len, xGrabDeviceReply * rep) else if (rep->RepType == X_GetDeviceMotionEvents) SRepXGetDeviceMotionEvents(client, len, (xGetDeviceMotionEventsReply *) rep); - else if (rep->RepType == X_ChangeKeyboardDevice) - SRepXChangeKeyboardDevice(client, len, - (xChangeKeyboardDeviceReply *) rep); - else if (rep->RepType == X_ChangePointerDevice) - SRepXChangePointerDevice(client, len, - (xChangePointerDeviceReply *) rep); else if (rep->RepType == X_GrabDevice) SRepXGrabDevice(client, len, (xGrabDeviceReply *) rep); else if (rep->RepType == X_GetDeviceFocus) @@ -648,6 +644,17 @@ SDeviceMappingNotifyEvent(deviceMappingNotify * from, deviceMappingNotify * to) swapl(&to->time, n); } +void +SDevicePresenceNotifyEvent (devicePresenceNotify *from, devicePresenceNotify *to) +{ + register char n; + + *to = *from; + swaps(&to->sequenceNumber,n); + swapl(&to->time, n); + swaps(&to->control, n); +} + /************************************************************************ * * This function sets up extension event types and masks. @@ -674,6 +681,7 @@ FixExtensionEvents(ExtensionEntry * extEntry) ChangeDeviceNotify = DeviceMappingNotify + 1; DeviceKeyStateNotify = ChangeDeviceNotify + 1; DeviceButtonStateNotify = DeviceKeyStateNotify + 1; + DevicePresenceNotify = DeviceButtonStateNotify + 1; event_base[KeyClass] = DeviceKeyPress; event_base[ButtonClass] = DeviceButtonPress; @@ -746,6 +754,9 @@ FixExtensionEvents(ExtensionEntry * extEntry) DeviceOwnerGrabButtonMask = GetNextExtEventMask(); SetEventInfo(DeviceOwnerGrabButtonMask, _deviceOwnerGrabButton); + + DevicePresenceNotifyMask = GetNextExtEventMask(); + SetEventInfo(DevicePresenceNotifyMask, _devicePresence); SetEventInfo(0, _noExtensionEvent); } @@ -786,6 +797,7 @@ RestoreExtensionEvents(void) ChangeDeviceNotify = 12; DeviceKeyStateNotify = 13; DeviceButtonStateNotify = 13; + DevicePresenceNotify = 14; BadDevice = 0; BadEvent = 1; @@ -823,6 +835,7 @@ IResetProc(ExtensionEntry * unused) EventSwapVector[DeviceButtonStateNotify] = NotImplemented; EventSwapVector[DeviceMappingNotify] = NotImplemented; EventSwapVector[ChangeDeviceNotify] = NotImplemented; + EventSwapVector[DevicePresenceNotify] = NotImplemented; RestoreExtensionEvents(); } @@ -857,9 +870,7 @@ MakeDeviceTypeAtoms(void) } /************************************************************************** - * * Return a DeviceIntPtr corresponding to a specified device id. - * This will not return the pointer or keyboard, or devices that are not on. * */ @@ -869,13 +880,16 @@ LookupDeviceIntRec(CARD8 id) DeviceIntPtr dev; for (dev = inputInfo.devices; dev; dev = dev->next) { - if (dev->id == id) { - if (id == inputInfo.pointer->id || id == inputInfo.keyboard->id) - return (NULL); - return (dev); - } + if (dev->id == id) + return dev; } - return (NULL); + + for (dev = inputInfo.off_devices; dev; dev = dev->next) { + if (dev->id == id) + return dev; + } + + return NULL; } /************************************************************************** diff --git a/Xi/getdctl.c b/Xi/getdctl.c index c2b69fd71..d738ef83b 100644 --- a/Xi/getdctl.c +++ b/Xi/getdctl.c @@ -124,6 +124,30 @@ ProcXGetDeviceControl(ClientPtr client) total_length = sizeof(xDeviceResolutionState) + (3 * sizeof(int) * dev->valuator->numAxes); break; + case DEVICE_ABS_CALIB: + if (!dev->absolute) { + SendErrorToClient(client, IReqCode, X_GetDeviceControl, 0, + BadMatch); + return Success; + } + + total_length = sizeof(xDeviceAbsCalibCtl); + break; + case DEVICE_ABS_AREA: + if (!dev->absolute) { + SendErrorToClient(client, IReqCode, X_GetDeviceControl, 0, + BadMatch); + return Success; + } + + total_length = sizeof(xDeviceAbsAreaCtl); + break; + case DEVICE_CORE: + total_length = sizeof(xDeviceCoreCtl); + break; + case DEVICE_ENABLE: + total_length = sizeof(xDeviceEnableCtl); + break; default: SendErrorToClient(client, IReqCode, X_GetDeviceControl, 0, BadValue); return Success; @@ -140,6 +164,18 @@ ProcXGetDeviceControl(ClientPtr client) case DEVICE_RESOLUTION: CopySwapDeviceResolution(client, dev->valuator, buf, total_length); break; + case DEVICE_ABS_CALIB: + CopySwapDeviceAbsCalib(client, dev->absolute, buf); + break; + case DEVICE_ABS_AREA: + CopySwapDeviceAbsArea(client, dev->absolute, buf); + break; + case DEVICE_CORE: + CopySwapDeviceCore(client, dev, buf); + break; + case DEVICE_ENABLE: + CopySwapDeviceEnable(client, dev, buf); + break; default: break; } @@ -189,6 +225,98 @@ CopySwapDeviceResolution(ClientPtr client, ValuatorClassPtr v, char *buf, } } +void CopySwapDeviceAbsCalib (ClientPtr client, AbsoluteClassPtr dts, + char *buf) +{ + register char n; + xDeviceAbsCalibState *calib = (xDeviceAbsCalibState *) buf; + + calib->control = DEVICE_ABS_CALIB; + calib->length = sizeof(calib); + calib->min_x = dts->min_x; + calib->max_x = dts->max_x; + calib->min_y = dts->min_y; + calib->max_y = dts->max_y; + calib->flip_x = dts->flip_x; + calib->flip_y = dts->flip_y; + calib->rotation = dts->rotation; + calib->button_threshold = dts->button_threshold; + + if (client->swapped) { + swaps(&calib->control, n); + swaps(&calib->length, n); + swapl(&calib->min_x, n); + swapl(&calib->max_x, n); + swapl(&calib->min_y, n); + swapl(&calib->max_y, n); + swapl(&calib->flip_x, n); + swapl(&calib->flip_y, n); + swapl(&calib->rotation, n); + swapl(&calib->button_threshold, n); + } +} + +void CopySwapDeviceAbsArea (ClientPtr client, AbsoluteClassPtr dts, + char *buf) +{ + register char n; + xDeviceAbsAreaState *area = (xDeviceAbsAreaState *) buf; + + area->control = DEVICE_ABS_AREA; + area->length = sizeof(area); + area->offset_x = dts->offset_x; + area->offset_y = dts->offset_y; + area->width = dts->width; + area->height = dts->height; + area->screen = dts->screen; + area->following = dts->following; + + if (client->swapped) { + swaps(&area->control, n); + swaps(&area->length, n); + swapl(&area->offset_x, n); + swapl(&area->offset_y, n); + swapl(&area->width, n); + swapl(&area->height, n); + swapl(&area->screen, n); + swapl(&area->following, n); + } +} + +void CopySwapDeviceCore (ClientPtr client, DeviceIntPtr dev, char *buf) +{ + register char n; + xDeviceCoreState *c = (xDeviceCoreState *) buf; + + c->control = DEVICE_CORE; + c->length = sizeof(c); + c->status = dev->coreEvents; + c->iscore = (dev == inputInfo.keyboard || dev == inputInfo.pointer); + + if (client->swapped) { + swaps(&c->control, n); + swaps(&c->length, n); + swaps(&c->status, n); + } +} + +void CopySwapDeviceEnable (ClientPtr client, DeviceIntPtr dev, char *buf) +{ + register char n; + xDeviceEnableState *e = (xDeviceEnableState *) buf; + + e->control = DEVICE_ENABLE; + e->length = sizeof(e); + e->enable = dev->enabled; + + if (client->swapped) { + swaps(&e->control, n); + swaps(&e->length, n); + swaps(&e->enable, n); + } +} + + /*********************************************************************** * * This procedure writes the reply for the xGetDeviceControl function, diff --git a/Xi/getdctl.h b/Xi/getdctl.h index c7cfb19d2..36868d8be 100644 --- a/Xi/getdctl.h +++ b/Xi/getdctl.h @@ -42,6 +42,24 @@ void CopySwapDeviceResolution(ClientPtr /* client */ , int /* length */ ); +void CopySwapDeviceAbsCalib (ClientPtr client, + AbsoluteClassPtr dts, + char *buf); + +void CopySwapDeviceAbsArea (ClientPtr client, + AbsoluteClassPtr dts, + char *buf); + +void CopySwapDeviceCore(ClientPtr /* client */ , + DeviceIntPtr /* dev */ , + char * /* buf */ + ); + +void CopySwapDeviceEnable(ClientPtr /* client */ , + DeviceIntPtr /* dev */ , + char * /* buf */ + ); + void SRepXGetDeviceControl(ClientPtr /* client */ , int /* size */ , xGetDeviceControlReply * /* rep */ diff --git a/Xi/getprop.c b/Xi/getprop.c index 530841032..058c59514 100644 --- a/Xi/getprop.c +++ b/Xi/getprop.c @@ -100,7 +100,7 @@ int ProcXGetDeviceDontPropagateList(register ClientPtr client) { CARD16 count = 0; - int i; + int i, rc; XEventClass *buf = NULL, *tbuf; WindowPtr pWin; xGetDeviceDontPropagateListReply rep; @@ -115,11 +115,10 @@ ProcXGetDeviceDontPropagateList(register ClientPtr client) rep.length = 0; rep.count = 0; - pWin = (WindowPtr) LookupWindow(stuff->window, client); - if (!pWin) { - client->errorValue = stuff->window; + rc = dixLookupWindow(&pWin, stuff->window, client, DixUnknownAccess); + if (rc != Success) { SendErrorToClient(client, IReqCode, X_GetDeviceDontPropagateList, 0, - BadWindow); + rc); return Success; } diff --git a/Xi/getselev.c b/Xi/getselev.c index a84c33d23..533c66cd7 100644 --- a/Xi/getselev.c +++ b/Xi/getselev.c @@ -98,8 +98,7 @@ SProcXGetSelectedExtensionEvents(register ClientPtr client) int ProcXGetSelectedExtensionEvents(register ClientPtr client) { - int i; - int total_length = 0; + int i, rc, total_length = 0; xGetSelectedExtensionEventsReply rep; WindowPtr pWin; XEventClass *buf = NULL; @@ -118,9 +117,10 @@ ProcXGetSelectedExtensionEvents(register ClientPtr client) rep.this_client_count = 0; rep.all_clients_count = 0; - if (!(pWin = LookupWindow(stuff->window, client))) { + rc = dixLookupWindow(&pWin, stuff->window, client, DixUnknownAccess); + if (rc != Success) { SendErrorToClient(client, IReqCode, X_GetSelectedExtensionEvents, 0, - BadWindow); + rc); return Success; } diff --git a/Xi/listdev.c b/Xi/listdev.c index 13e5ca729..02d55ad4c 100644 --- a/Xi/listdev.c +++ b/Xi/listdev.c @@ -96,7 +96,7 @@ int ProcXListInputDevices(register ClientPtr client) { xListInputDevicesReply rep; - int numdevs; + int numdevs = 0; int namesize = 1; /* need 1 extra byte for strcpy */ int size = 0; int total_length; @@ -115,12 +115,15 @@ ProcXListInputDevices(register ClientPtr client) rep.sequenceNumber = client->sequence; AddOtherInputDevices(); - numdevs = inputInfo.numDevices; - for (d = inputInfo.devices; d; d = d->next) + for (d = inputInfo.devices; d; d = d->next) { SizeDeviceInfo(d, &namesize, &size); - for (d = inputInfo.off_devices; d; d = d->next) + numdevs++; + } + for (d = inputInfo.off_devices; d; d = d->next) { SizeDeviceInfo(d, &namesize, &size); + numdevs++; + } total_length = numdevs * sizeof(xDeviceInfo) + size + namesize; devbuf = (char *)xalloc(total_length); @@ -241,6 +244,10 @@ CopySwapDevice(register ClientPtr client, DeviceIntPtr d, int num_classes, dev->use = IsXKeyboard; else if (d == inputInfo.pointer) dev->use = IsXPointer; + else if (d->key && d->kbdfeed) + dev->use = IsXExtensionKeyboard; + else if (d->valuator && d->button) + dev->use = IsXExtensionPointer; else dev->use = IsXExtensionDevice; if (client->swapped) { diff --git a/Xi/selectev.c b/Xi/selectev.c index 3483804b1..8c893ca1e 100644 --- a/Xi/selectev.c +++ b/Xi/selectev.c @@ -74,6 +74,53 @@ SOFTWARE. extern Mask ExtExclusiveMasks[]; extern Mask ExtValidMasks[]; +static int +HandleDevicePresenceMask(ClientPtr client, WindowPtr win, + XEventClass *cls, CARD16 *count) +{ + int i, j; + Mask mask; + + /* We use the device ID 256 to select events that aren't bound to + * any device. For now we only handle the device presence event, + * but this could be extended to other events that aren't bound to + * a device. + * + * In order not to break in CreateMaskFromList() we remove the + * entries with device ID 256 from the XEventClass array. + */ + + mask = 0; + for (i = 0, j = 0; i < *count; i++) { + if (cls[i] >> 8 != 256) { + cls[j] = cls[i]; + j++; + continue; + } + + switch (cls[i] & 0xff) { + case _devicePresence: + mask |= DevicePresenceNotifyMask; + break; + } + } + + *count = j; + + if (mask == 0) + return Success; + + /* We always only use mksidx = 0 for events not bound to + * devices */ + + if (AddExtensionClient (win, client, mask, 0) != Success) + return BadAlloc; + + RecalculateDeviceDeliverableEvents(win); + + return Success; +} + /*********************************************************************** * * Handle requests from clients with a different byte order. @@ -123,14 +170,19 @@ ProcXSelectExtensionEvent(register ClientPtr client) return Success; } - pWin = (WindowPtr) LookupWindow(stuff->window, client); - if (!pWin) { - client->errorValue = stuff->window; - SendErrorToClient(client, IReqCode, X_SelectExtensionEvent, 0, - BadWindow); + ret = dixLookupWindow(&pWin, stuff->window, client, DixUnknownAccess); + if (ret != Success) { + SendErrorToClient(client, IReqCode, X_SelectExtensionEvent, 0, ret); return Success; } + if (HandleDevicePresenceMask(client, pWin, (XEventClass *) & stuff[1], + &stuff->count) != Success) { + SendErrorToClient(client, IReqCode, X_SelectExtensionEvent, 0, + BadAlloc); + return Success; + } + if ((ret = CreateMaskFromList(client, (XEventClass *) & stuff[1], stuff->count, tmp, NULL, X_SelectExtensionEvent)) != Success) diff --git a/Xi/stubs.c b/Xi/stubs.c index 6b9e682b9..e2ed1ceff 100644 --- a/Xi/stubs.c +++ b/Xi/stubs.c @@ -66,86 +66,6 @@ SOFTWARE. #include #include "XIstubs.h" -/*********************************************************************** - * - * Caller: ProcXChangeKeyboardDevice - * - * This procedure does the implementation-dependent portion of the work - * needed to change the keyboard device. - * - * The X keyboard device has a FocusRec. If the device that has been - * made into the new X keyboard did not have a FocusRec, - * ProcXChangeKeyboardDevice will allocate one for it. - * - * If you do not want clients to be able to focus the old X keyboard - * device, call DeleteFocusClassDeviceStruct to free the FocusRec. - * - * If you support input devices with keys that you do not want to be - * used as the X keyboard, you need to check for them here and return - * a BadDevice error. - * - * The default implementation is to do nothing (assume you do want - * clients to be able to focus the old X keyboard). The commented-out - * sample code shows what you might do if you don't want the default. - * - */ - -int -ChangeKeyboardDevice(DeviceIntPtr old_dev, DeviceIntPtr new_dev) -{ - /*********************************************************************** - DeleteFocusClassDeviceStruct(old_dev); * defined in xchgptr.c * - **********************************************************************/ - return BadMatch; -} - -/*********************************************************************** - * - * Caller: ProcXChangePointerDevice - * - * This procedure does the implementation-dependent portion of the work - * needed to change the pointer device. - * - * The X pointer device does not have a FocusRec. If the device that - * has been made into the new X pointer had a FocusRec, - * ProcXChangePointerDevice will free it. - * - * If you want clients to be able to focus the old pointer device that - * has now become accessible through the input extension, you need to - * add a FocusRec to it here. - * - * The XChangePointerDevice protocol request also allows the client - * to choose which axes of the new pointer device are used to move - * the X cursor in the X- and Y- directions. If the axes are different - * than the default ones, you need to keep track of that here. - * - * If you support input devices with valuators that you do not want to be - * used as the X pointer, you need to check for them here and return a - * BadDevice error. - * - * The default implementation is to do nothing (assume you don't want - * clients to be able to focus the old X pointer). The commented-out - * sample code shows what you might do if you don't want the default. - * - */ - -int -ChangePointerDevice(DeviceIntPtr old_dev, - DeviceIntPtr new_dev, unsigned char x, unsigned char y) -{ - /*********************************************************************** - InitFocusClassDeviceStruct(old_dev); * allow focusing old ptr* - - x_axis = x; * keep track of new x-axis* - y_axis = y; * keep track of new y-axis* - if (x_axis != 0 || y_axis != 1) - axes_changed = TRUE; * remember axes have changed* - else - axes_changed = FALSE; - *************************************************************************/ - return BadMatch; -} - /*********************************************************************** * * Caller: ProcXCloseDevice @@ -287,7 +207,26 @@ ChangeDeviceControl(register ClientPtr client, DeviceIntPtr dev, switch (control->control) { case DEVICE_RESOLUTION: return (BadMatch); + case DEVICE_ABS_CALIB: + case DEVICE_ABS_AREA: + return (BadMatch); + case DEVICE_CORE: + return (BadMatch); default: return (BadMatch); } } + + +/**************************************************************************** + * + * Caller: configAddDevice (and others) + * + * Add a new device with the specified options. + * + */ +int +NewInputDeviceRequest(InputOption *options) +{ + return BadValue; +} diff --git a/Xi/ungrdevb.c b/Xi/ungrdevb.c index 64bb213f5..8db9307ce 100644 --- a/Xi/ungrdevb.c +++ b/Xi/ungrdevb.c @@ -105,6 +105,7 @@ ProcXUngrabDeviceButton(ClientPtr client) DeviceIntPtr mdev; WindowPtr pWin; GrabRec temporaryGrab; + int rc; REQUEST(xUngrabDeviceButtonReq); REQUEST_SIZE_MATCH(xUngrabDeviceButtonReq); @@ -134,9 +135,9 @@ ProcXUngrabDeviceButton(ClientPtr client) } else mdev = (DeviceIntPtr) LookupKeyboardDevice(); - pWin = LookupWindow(stuff->grabWindow, client); - if (!pWin) { - SendErrorToClient(client, IReqCode, X_UngrabDeviceButton, 0, BadWindow); + rc = dixLookupWindow(&pWin, stuff->grabWindow, client, DixUnknownAccess); + if (rc != Success) { + SendErrorToClient(client, IReqCode, X_UngrabDeviceButton, 0, rc); return Success; } diff --git a/Xi/ungrdevk.c b/Xi/ungrdevk.c index 0a6b3b619..ebb83bce7 100644 --- a/Xi/ungrdevk.c +++ b/Xi/ungrdevk.c @@ -105,6 +105,7 @@ ProcXUngrabDeviceKey(ClientPtr client) DeviceIntPtr mdev; WindowPtr pWin; GrabRec temporaryGrab; + int rc; REQUEST(xUngrabDeviceKeyReq); REQUEST_SIZE_MATCH(xUngrabDeviceKeyReq); @@ -133,9 +134,9 @@ ProcXUngrabDeviceKey(ClientPtr client) } else mdev = (DeviceIntPtr) LookupKeyboardDevice(); - pWin = LookupWindow(stuff->grabWindow, client); - if (!pWin) { - SendErrorToClient(client, IReqCode, X_UngrabDeviceKey, 0, BadWindow); + rc = dixLookupWindow(&pWin, stuff->grabWindow, client, DixUnknownAccess); + if (rc != Success) { + SendErrorToClient(client, IReqCode, X_UngrabDeviceKey, 0, rc); return Success; } if (((stuff->key > dev->key->curKeySyms.maxKeyCode) || diff --git a/XpConfig/C/print/models/PS2PDFspooldir-GS/Makefile.am b/XpConfig/C/print/models/PS2PDFspooldir-GS/Makefile.am deleted file mode 100644 index 37b57d7bb..000000000 --- a/XpConfig/C/print/models/PS2PDFspooldir-GS/Makefile.am +++ /dev/null @@ -1,3 +0,0 @@ -xpcdir = @xpconfigdir@/C/print/models/PS2PDFspooldir-GS - -dist_xpc_DATA = model-config ps2pdf_spooltodir.sh diff --git a/XpConfig/C/print/models/PSspooldir/Makefile.am b/XpConfig/C/print/models/PSspooldir/Makefile.am deleted file mode 100644 index 52313aa23..000000000 --- a/XpConfig/C/print/models/PSspooldir/Makefile.am +++ /dev/null @@ -1,3 +0,0 @@ -xpcdir = @xpconfigdir@/C/print/models/PSspooldir - -dist_xpc_DATA = model-config spooltodir.sh diff --git a/Xprint/etc/Xsession.d/Makefile.am b/Xprint/etc/Xsession.d/Makefile.am deleted file mode 100644 index e0277d9d4..000000000 --- a/Xprint/etc/Xsession.d/Makefile.am +++ /dev/null @@ -1 +0,0 @@ -EXTRA_DIST = cde_xsessiond_xprint.sh diff --git a/Xprint/etc/init.d/Makefile.am b/Xprint/etc/init.d/Makefile.am deleted file mode 100644 index cc03cfab4..000000000 --- a/Xprint/etc/init.d/Makefile.am +++ /dev/null @@ -1 +0,0 @@ -EXTRA_DIST = xprint.cpp diff --git a/Xprint/pcl/PclPixmap.c b/Xprint/pcl/PclPixmap.c deleted file mode 100644 index 9449dfdd6..000000000 --- a/Xprint/pcl/PclPixmap.c +++ /dev/null @@ -1,85 +0,0 @@ -/* $Xorg: PclPixmap.c,v 1.3 2000/08/17 19:48:08 cpqbld Exp $ */ -/******************************************************************* -** -** ********************************************************* -** * -** * File: PclPixmap.c -** * -** * Contents: -** * Pixmap handling code for the PCL DDX driver -** * -** * Created: 2/19/96 -** * -** ********************************************************* -** -********************************************************************/ -/* -(c) Copyright 1996 Hewlett-Packard Company -(c) Copyright 1996 International Business Machines Corp. -(c) Copyright 1996 Sun Microsystems, Inc. -(c) Copyright 1996 Novell, Inc. -(c) Copyright 1996 Digital Equipment Corp. -(c) Copyright 1996 Fujitsu Limited -(c) Copyright 1996 Hitachi, Ltd. - -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, sublicense, 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 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 -COPYRIGHT HOLDERS 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 names of the copyright holders shall -not be used in advertising or otherwise to promote the sale, use or other -dealings in this Software without prior written authorization from said -copyright holders. -*/ -/* $XFree86: xc/programs/Xserver/Xprint/pcl/PclPixmap.c,v 1.3 1999/12/16 02:26:27 robin Exp $ */ - -#ifdef HAVE_DIX_CONFIG_H -#include -#endif - -#include "Pcl.h" -#include "cfb.h" -#include "cfb32.h" -#include "mfb.h" -#include "pixmapstr.h" - -PixmapPtr -PclCreatePixmap(ScreenPtr pScreen, - int width, - int height, - int depth) -{ - if( depth == 1 ) - return mfbCreatePixmap( pScreen, width, height, depth ); - else if( depth <= 8 ) - return cfbCreatePixmap( pScreen, width, height, depth ); - else if( depth <= 32 ) - return cfb32CreatePixmap( pScreen, width, height, depth ); - return 0; -} - - -Bool -PclDestroyPixmap(PixmapPtr pPixmap) -{ - if( pPixmap->drawable.depth == 1 ) - return mfbDestroyPixmap( pPixmap ); - else if( pPixmap->drawable.depth <= 8 ) - return cfbDestroyPixmap( pPixmap ); - else if( pPixmap->drawable.depth <= 32 ) - return cfb32DestroyPixmap( pPixmap ); - return 0; -} diff --git a/Xprint/raster/Makefile.am b/Xprint/raster/Makefile.am deleted file mode 100644 index 4a2223115..000000000 --- a/Xprint/raster/Makefile.am +++ /dev/null @@ -1,11 +0,0 @@ -noinst_LTLIBRARIES = libraster.la - -INCLUDES = -I$(top_srcdir)/Xprint - -AM_CFLAGS = @SERVER_DEFINES@ @DIX_CFLAGS@ @XPRINT_CFLAGS@ \ - -D_XP_PRINT_SERVER_ -DPSZ=8 - -libraster_la_SOURCES = \ - RasterAttVal.c \ - Raster.c \ - Raster.h diff --git a/afb/Makefile.am b/afb/Makefile.am index e7dedfabc..d83b67417 100644 --- a/afb/Makefile.am +++ b/afb/Makefile.am @@ -1,6 +1,6 @@ noinst_LTLIBRARIES = libafb.la -AM_CFLAGS = $(DIX_CFLAGS) @SERVER_DEFINES@ @MODULE_DEFINES@ @LOADER_DEFINES@ +AM_CFLAGS = $(DIX_CFLAGS) libafb_gen_sources = afbbltC.c afbbltX.c afbbltCI.c afbbltO.c afbbltG.c afbtileC.c afbtileG.c afbseg.c diff --git a/afb/afb.h b/afb/afb.h index e89d3a088..c05cc5511 100644 --- a/afb/afb.h +++ b/afb/afb.h @@ -1,4 +1,3 @@ -/* $XFree86: xc/programs/Xserver/afb/afb.h,v 3.10 2003/10/29 22:15:19 tsi Exp $ */ /* Combined Purdue/PurduePlus patches, level 2.0, 1/17/89 */ /*********************************************************** @@ -47,7 +46,6 @@ ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ -/* $XConsortium: afb.h,v 5.31 94/04/17 20:28:15 dpw Exp $ */ /* Monochrome Frame Buffer definitions written by drewry, september 1986 */ diff --git a/afb/afbbitblt.c b/afb/afbbitblt.c index 7c4502c93..594e987a8 100644 --- a/afb/afbbitblt.c +++ b/afb/afbbitblt.c @@ -1,4 +1,3 @@ -/* $XFree86: xc/programs/Xserver/afb/afbbitblt.c,v 3.5tsi Exp $ */ /* Combined Purdue/PurduePlus patches, level 2.0, 1/17/89 */ /*********************************************************** @@ -47,7 +46,6 @@ ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ -/* $XConsortium: afbbitblt.c,v 5.25 94/04/17 20:28:16 dpw Exp $ */ #ifdef HAVE_DIX_CONFIG_H #include diff --git a/afb/afbblt.c b/afb/afbblt.c index 9eb0227f2..9eb4e4732 100644 --- a/afb/afbblt.c +++ b/afb/afbblt.c @@ -1,4 +1,3 @@ -/* $XFree86: xc/programs/Xserver/afb/afbblt.c,v 3.0 1996/08/18 01:45:24 dawes Exp $ */ /* * afb copy area */ @@ -31,7 +30,6 @@ in this Software without prior written authorization from the X Consortium. Author: Keith Packard */ -/* $XConsortium: afbblt.c,v 1.11 94/04/17 20:28:16 dpw Exp $ */ #ifdef HAVE_DIX_CONFIG_H #include diff --git a/afb/afbbres.c b/afb/afbbres.c index 6ee09b9e4..e8f1b3b85 100644 --- a/afb/afbbres.c +++ b/afb/afbbres.c @@ -47,7 +47,6 @@ ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ -/* $XConsortium: afbbres.c,v 1.22 94/04/17 20:28:17 dpw Exp $ */ #ifdef HAVE_DIX_CONFIG_H #include diff --git a/afb/afbbresd.c b/afb/afbbresd.c index 52cb62cab..4495c8cf8 100644 --- a/afb/afbbresd.c +++ b/afb/afbbresd.c @@ -46,7 +46,6 @@ ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ -/* $XConsortium: afbbresd.c,v 1.10 94/04/17 20:28:18 dpw Exp $ */ #ifdef HAVE_DIX_CONFIG_H #include diff --git a/afb/afbbstore.c b/afb/afbbstore.c index a74a9d9b8..f7f1062e2 100644 --- a/afb/afbbstore.c +++ b/afb/afbbstore.c @@ -1,5 +1,4 @@ /* $XFree86$ */ -/* $XConsortium: afbbstore.c,v 5.7 94/04/17 20:28:18 dpw Exp $ */ /* Combined Purdue/PurduePlus patches, level 2.0, 1/17/89 */ /* diff --git a/afb/afbclip.c b/afb/afbclip.c index 89314f134..15be4051c 100644 --- a/afb/afbclip.c +++ b/afb/afbclip.c @@ -1,4 +1,3 @@ -/* $XFree86: xc/programs/Xserver/afb/afbclip.c,v 3.2 2001/10/28 03:32:57 tsi Exp $ */ /*********************************************************** Copyright (c) 1987 X Consortium @@ -46,7 +45,6 @@ ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ -/* $XConsortium: afbclip.c,v 5.6 94/04/17 20:28:19 dpw Exp $ */ #ifdef HAVE_DIX_CONFIG_H #include diff --git a/afb/afbcmap.c b/afb/afbcmap.c index 5043d97a6..e3b95fbec 100644 --- a/afb/afbcmap.c +++ b/afb/afbcmap.c @@ -1,5 +1,3 @@ -/* $XFree86: xc/programs/Xserver/afb/afbcmap.c,v 3.0 1996/08/18 01:45:30 dawes Exp $ */ -/* $XConsortium: afbcmap.c,v 4.19 94/04/17 20:28:46 dpw Exp $ */ /************************************************************ Copyright 1987 by Sun Microsystems, Inc. Mountain View, CA. diff --git a/afb/afbfillarc.c b/afb/afbfillarc.c index 30e0bd3a5..fa685ba9a 100644 --- a/afb/afbfillarc.c +++ b/afb/afbfillarc.c @@ -1,4 +1,3 @@ -/* $XFree86: xc/programs/Xserver/afb/afbfillarc.c,v 3.1 1998/03/20 21:04:54 hohndel Exp $ */ /************************************************************ Copyright (c) 1989 X Consortium @@ -26,7 +25,6 @@ in this Software without prior written authorization from the X Consortium. ********************************************************/ -/* $XConsortium: afbfillarc.c,v 5.14 94/04/17 20:28:20 dpw Exp $ */ #ifdef HAVE_DIX_CONFIG_H #include diff --git a/afb/afbfillrct.c b/afb/afbfillrct.c index ed2e6031e..06fb37365 100644 --- a/afb/afbfillrct.c +++ b/afb/afbfillrct.c @@ -1,4 +1,3 @@ -/* $XFree86: xc/programs/Xserver/afb/afbfillrct.c,v 3.2tsi Exp $ */ /* Combined Purdue/PurduePlus patches, level 2.0, 1/17/89 */ /*********************************************************** @@ -47,7 +46,6 @@ ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ -/* $XConsortium: afbfillrct.c,v 5.10 94/04/17 20:28:21 dpw Exp $ */ #ifdef HAVE_DIX_CONFIG_H #include diff --git a/afb/afbfillsp.c b/afb/afbfillsp.c index ffb633409..539c3457c 100644 --- a/afb/afbfillsp.c +++ b/afb/afbfillsp.c @@ -1,4 +1,3 @@ -/* $XFree86: xc/programs/Xserver/afb/afbfillsp.c,v 3.3 2000/11/22 00:58:12 tsi Exp $ */ /* Combined Purdue/PurduePlus patches, level 2.0, 1/17/89 */ /*********************************************************** @@ -47,7 +46,6 @@ ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ -/* $XConsortium: afbfillsp.c,v 5.13 94/04/17 20:28:21 dpw Exp $ */ #ifdef HAVE_DIX_CONFIG_H #include diff --git a/afb/afbfont.c b/afb/afbfont.c index bf77825f1..940bdb09b 100644 --- a/afb/afbfont.c +++ b/afb/afbfont.c @@ -46,7 +46,6 @@ ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -/* $XConsortium: afbfont.c,v 1.18 94/04/17 20:28:22 keith Exp $ */ #ifdef HAVE_DIX_CONFIG_H #include diff --git a/afb/afbgc.c b/afb/afbgc.c index 6c46b3b8e..03475dda5 100644 --- a/afb/afbgc.c +++ b/afb/afbgc.c @@ -1,4 +1,3 @@ -/* $XFree86: xc/programs/Xserver/afb/afbgc.c,v 3.2 1999/06/20 15:02:46 dawes Exp $ */ /*********************************************************** Copyright (c) 1987 X Consortium @@ -46,7 +45,6 @@ ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ -/* $XConsortium: afbgc.c,v 5.35 94/04/17 20:28:23 dpw Exp $ */ #ifdef HAVE_DIX_CONFIG_H #include diff --git a/afb/afbgetsp.c b/afb/afbgetsp.c index 3cc2e2f6e..8d1db1482 100644 --- a/afb/afbgetsp.c +++ b/afb/afbgetsp.c @@ -1,4 +1,3 @@ -/* $XFree86: xc/programs/Xserver/afb/afbgetsp.c,v 3.0 1996/08/18 01:45:37 dawes Exp $ */ /* Combined Purdue/PurduePlus patches, level 2.0, 1/17/89 */ /*********************************************************** @@ -47,7 +46,6 @@ ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ -/* $XConsortium: afbgetsp.c,v 5.10 94/04/17 20:28:24 dpw Exp $ */ #ifdef HAVE_DIX_CONFIG_H #include diff --git a/afb/afbhrzvert.c b/afb/afbhrzvert.c index d7ddce1a1..8f332e6d8 100644 --- a/afb/afbhrzvert.c +++ b/afb/afbhrzvert.c @@ -1,4 +1,3 @@ -/* $XFree86: xc/programs/Xserver/afb/afbhrzvert.c,v 3.0 1996/08/18 01:45:38 dawes Exp $ */ /* Combined Purdue/PurduePlus patches, level 2.0, 1/17/89 */ /*********************************************************** @@ -47,7 +46,6 @@ ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ -/* $XConsortium: afbhrzvert.c,v 1.15 94/04/17 20:28:24 dpw Exp $ */ #ifdef HAVE_DIX_CONFIG_H #include diff --git a/afb/afbimage.c b/afb/afbimage.c index a0b4270e8..c82bb3668 100644 --- a/afb/afbimage.c +++ b/afb/afbimage.c @@ -1,4 +1,3 @@ -/* $XFree86: xc/programs/Xserver/afb/afbimage.c,v 3.2 1998/03/20 21:04:55 hohndel Exp $ */ #ifdef HAVE_DIX_CONFIG_H #include diff --git a/afb/afbimggblt.c b/afb/afbimggblt.c index 28113b448..de02aa46a 100644 --- a/afb/afbimggblt.c +++ b/afb/afbimggblt.c @@ -1,4 +1,3 @@ -/* $XFree86: xc/programs/Xserver/afb/afbimggblt.c,v 3.1tsi Exp $ */ /* Combined Purdue/PurduePlus patches, level 2.0, 1/17/89 */ /*********************************************************** @@ -47,7 +46,6 @@ ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ -/* $XConsortium: afbimggblt.c,v 5.17 94/04/17 20:28:25 dpw Exp $ */ #ifdef HAVE_DIX_CONFIG_H #include diff --git a/afb/afbline.c b/afb/afbline.c index d3f2def89..9e2e4b9f4 100644 --- a/afb/afbline.c +++ b/afb/afbline.c @@ -1,4 +1,3 @@ -/* $XFree86: xc/programs/Xserver/afb/afbline.c,v 3.1 1998/03/20 21:04:55 hohndel Exp $ */ /*********************************************************** Copyright (c) 1987 X Consortium @@ -46,7 +45,6 @@ ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ -/* $XConsortium: afbline.c,v 5.18 94/04/17 20:28:26 dpw Exp $ */ #ifdef HAVE_DIX_CONFIG_H #include diff --git a/afb/afbmisc.c b/afb/afbmisc.c index e5a4f492d..023c43f34 100644 --- a/afb/afbmisc.c +++ b/afb/afbmisc.c @@ -46,7 +46,6 @@ ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ -/* $XConsortium: afbmisc.c,v 5.4 94/04/17 20:28:27 dpw Exp $ */ #ifdef HAVE_DIX_CONFIG_H #include diff --git a/afb/afbpixmap.c b/afb/afbpixmap.c index 72482ff7f..6801960c6 100644 --- a/afb/afbpixmap.c +++ b/afb/afbpixmap.c @@ -1,4 +1,3 @@ -/* $XFree86: xc/programs/Xserver/afb/afbpixmap.c,v 3.0 1996/08/18 01:45:45 dawes Exp $ */ /*********************************************************** Copyright (c) 1987 X Consortium @@ -46,7 +45,6 @@ ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ -/* $XConsortium: afbpixmap.c,v 5.13 94/04/17 20:28:28 dpw Exp $ */ /* pixmap management written by drewry, september 1986 diff --git a/afb/afbply1rct.c b/afb/afbply1rct.c index b7a16e086..86ec174f4 100644 --- a/afb/afbply1rct.c +++ b/afb/afbply1rct.c @@ -1,6 +1,4 @@ -/* $XFree86: xc/programs/Xserver/afb/afbply1rct.c,v 3.1 1998/03/20 21:04:56 hohndel Exp $ */ /* - * $XConsortium: afbply1rct.c,v 1.9 94/04/17 20:28:28 dpw Exp $ * Copyright (c) 1990 X Consortium diff --git a/afb/afbplygblt.c b/afb/afbplygblt.c index 7d4f5ddd7..289d50e1b 100644 --- a/afb/afbplygblt.c +++ b/afb/afbplygblt.c @@ -1,4 +1,3 @@ -/* $XFree86: xc/programs/Xserver/afb/afbplygblt.c,v 3.2tsi Exp $ */ /* Combined Purdue/PurduePlus patches, level 2.0, 1/17/89 */ /*********************************************************** @@ -47,7 +46,6 @@ ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ -/* $XConsortium: afbimggblt.c,v 5.17 94/04/17 20:28:25 dpw Exp $ */ #ifdef HAVE_DIX_CONFIG_H #include diff --git a/afb/afbpntarea.c b/afb/afbpntarea.c index 648a2d19c..cc43f5237 100644 --- a/afb/afbpntarea.c +++ b/afb/afbpntarea.c @@ -1,4 +1,3 @@ -/* $XFree86: xc/programs/Xserver/afb/afbpntarea.c,v 3.0 1996/08/18 01:45:49 dawes Exp $ */ /* Combined Purdue/PurduePlus patches, level 2.0, 1/17/89 */ /*********************************************************** @@ -47,7 +46,6 @@ ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ -/* $XConsortium: afbpntarea.c,v 5.7 94/04/17 20:28:29 dpw Exp $ */ #ifdef HAVE_DIX_CONFIG_H #include diff --git a/afb/afbpntwin.c b/afb/afbpntwin.c index aaa6847a9..94c96e4cf 100644 --- a/afb/afbpntwin.c +++ b/afb/afbpntwin.c @@ -1,5 +1,4 @@ /* $XFree86$ */ -/* $XConsortium: afbpntwin.c,v 5.12 94/04/17 20:28:30 dpw Exp $ */ /* Combined Purdue/PurduePlus patches, level 2.0, 1/17/89 */ /*********************************************************** diff --git a/afb/afbpolypnt.c b/afb/afbpolypnt.c index 4e9fa0310..a9d96edfe 100644 --- a/afb/afbpolypnt.c +++ b/afb/afbpolypnt.c @@ -1,4 +1,3 @@ -/* $XFree86: xc/programs/Xserver/afb/afbpolypnt.c,v 3.1 1998/03/20 21:04:56 hohndel Exp $ */ /* Combined Purdue/PurduePlus patches, level 2.0, 1/17/89 */ /*********************************************************** @@ -47,7 +46,6 @@ ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ -/* $XConsortium: afbpolypnt.c,v 5.6 94/04/17 20:28:30 dpw Exp $ */ #ifdef HAVE_DIX_CONFIG_H #include diff --git a/afb/afbpushpxl.c b/afb/afbpushpxl.c index c717f0e45..3dd548737 100644 --- a/afb/afbpushpxl.c +++ b/afb/afbpushpxl.c @@ -1,4 +1,3 @@ -/* $XFree86: xc/programs/Xserver/afb/afbpushpxl.c,v 3.1 1998/03/20 21:04:56 hohndel Exp $ */ /*********************************************************** Copyright (c) 1987 X Consortium @@ -46,7 +45,6 @@ ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ -/* $XConsortium: afbpushpxl.c,v 5.6 94/04/17 20:28:31 dpw Exp $ */ #ifdef HAVE_DIX_CONFIG_H #include diff --git a/afb/afbscrinit.c b/afb/afbscrinit.c index b9e0ba94f..2b0867fda 100644 --- a/afb/afbscrinit.c +++ b/afb/afbscrinit.c @@ -1,4 +1,3 @@ -/* $XFree86: xc/programs/Xserver/afb/afbscrinit.c,v 3.4 1998/07/25 08:50:27 dawes Exp $ */ /*********************************************************** Copyright (c) 1987 X Consortium @@ -46,7 +45,6 @@ ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ -/* $XConsortium: afbscrinit.c,v 5.17 94/04/17 20:28:34 dpw Exp $ */ #ifdef HAVE_DIX_CONFIG_H #include diff --git a/afb/afbsetsp.c b/afb/afbsetsp.c index 3a078ffa9..adc726620 100644 --- a/afb/afbsetsp.c +++ b/afb/afbsetsp.c @@ -1,4 +1,3 @@ -/* $XFree86: xc/programs/Xserver/afb/afbsetsp.c,v 3.2 2001/08/01 00:44:47 tsi Exp $ */ /* Combined Purdue/PurduePlus patches, level 2.0, 1/17/89 */ /*********************************************************** @@ -47,7 +46,6 @@ ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ -/* $XConsortium: afbsetsp.c,v 5.8 94/04/17 20:28:34 dpw Exp $ */ #ifdef HAVE_DIX_CONFIG_H #include diff --git a/afb/afbtegblt.c b/afb/afbtegblt.c index 16f6ca4ea..ba889cb80 100644 --- a/afb/afbtegblt.c +++ b/afb/afbtegblt.c @@ -1,5 +1,3 @@ -/* $XFree86: xc/programs/Xserver/afb/afbtegblt.c,v 3.1 1998/03/20 21:04:57 hohndel Exp $ */ -/* $XConsortium: afbtegblt.c,v 5.14 94/04/17 20:28:35 dpw Exp $ */ /* Combined Purdue/PurduePlus patches, level 2.0, 1/17/89 */ /*********************************************************** diff --git a/afb/afbtile.c b/afb/afbtile.c index 11d76abdf..8fcb9cde7 100644 --- a/afb/afbtile.c +++ b/afb/afbtile.c @@ -1,4 +1,3 @@ -/* $XFree86: xc/programs/Xserver/afb/afbtile.c,v 3.3tsi Exp $ */ /* Combined Purdue/PurduePlus patches, level 2.0, 1/17/89 */ /*********************************************************** @@ -47,7 +46,6 @@ ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ -/* $XConsortium: afbtile.c,v 5.8 94/04/17 20:28:36 dpw Exp $ */ #ifdef HAVE_DIX_CONFIG_H #include diff --git a/afb/afbwindow.c b/afb/afbwindow.c index 90a4f7dfe..a4a1602bc 100644 --- a/afb/afbwindow.c +++ b/afb/afbwindow.c @@ -1,5 +1,3 @@ -/* $XFree86: xc/programs/Xserver/afb/afbwindow.c,v 3.0 1996/08/18 01:45:58 dawes Exp $ */ -/* $XConsortium: afbwindow.c,v 5.14 94/04/17 20:28:36 dpw Exp $ */ /* Combined Purdue/PurduePlus patches, level 2.0, 1/17/89 */ /*********************************************************** diff --git a/afb/afbzerarc.c b/afb/afbzerarc.c index 0fe9244ad..2cc30687f 100644 --- a/afb/afbzerarc.c +++ b/afb/afbzerarc.c @@ -1,4 +1,3 @@ -/* $XFree86: xc/programs/Xserver/afb/afbzerarc.c,v 3.2 2001/10/28 03:32:59 tsi Exp $ */ /************************************************************ Copyright (c) 1989 X Consortium @@ -26,7 +25,6 @@ in this Software without prior written authorization from the X Consortium. ********************************************************/ -/* $XConsortium: afbzerarc.c,v 5.19 94/04/17 20:28:37 dpw Exp $ */ /* Derived from: * "Algorithm for drawing ellipses or hyperbolae with a digital plotter" diff --git a/cfb/Makefile.am b/cfb/Makefile.am index 89832fa7b..d24f027e7 100644 --- a/cfb/Makefile.am +++ b/cfb/Makefile.am @@ -9,7 +9,7 @@ libcfb_la_SOURCES = cfb8bit.c cfbteblt8.c cfbglrop8.c cfbpush8.c cfbrctstp8.c \ libcfb_la_LIBADD = ../mfb/libmfb.la -AM_CFLAGS = -DPSZ=8 $(DIX_CFLAGS) $(PLATFORMDEFS) @SERVER_DEFINES@ @MODULE_DEFINES@ @LOADER_DEFINES@ +AM_CFLAGS = -DPSZ=8 $(DIX_CFLAGS) $(PLATFORMDEFS) INCLUDES = $(CFB_INCLUDES) -I$(top_srcdir)/hw/xfree86/os-support -I$(top_srcdir)/hw/xfree86/common diff --git a/cfb/cfb.h b/cfb/cfb.h index 14d6617a9..8c682ae8d 100644 --- a/cfb/cfb.h +++ b/cfb/cfb.h @@ -1,4 +1,3 @@ -/* $Xorg: cfb.h,v 1.3 2000/08/17 19:48:12 cpqbld Exp $ */ /************************************************************ Copyright 1987 by Sun Microsystems, Inc. Mountain View, CA. @@ -27,7 +26,6 @@ OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ********************************************************/ -/* $XFree86: xc/programs/Xserver/cfb/cfb.h,v 3.29tsi Exp $ */ #if !defined(__CFB_H__) || defined(CFB_PROTOTYPES_ONLY) diff --git a/cfb/cfb16.h b/cfb/cfb16.h index 3d51cd142..6b5c30209 100644 --- a/cfb/cfb16.h +++ b/cfb/cfb16.h @@ -1,4 +1,3 @@ -/* $XFree86: xc/programs/Xserver/cfb/cfb16.h,v 1.4 1998/11/28 10:42:50 dawes Exp $ */ /* * Copyright (C) 1994-1998 The XFree86 Project, Inc. All Rights Reserved. * diff --git a/cfb/cfb24.h b/cfb/cfb24.h index 3a99934b7..ea5fc848e 100644 --- a/cfb/cfb24.h +++ b/cfb/cfb24.h @@ -1,4 +1,3 @@ -/* $XFree86: xc/programs/Xserver/cfb/cfb24.h,v 1.4 1998/11/28 10:42:51 dawes Exp $ */ /* * Copyright (C) 1994-1998 The XFree86 Project, Inc. All Rights Reserved. * diff --git a/cfb/cfb32.h b/cfb/cfb32.h index 5ea4c13c8..18a5dc1c3 100644 --- a/cfb/cfb32.h +++ b/cfb/cfb32.h @@ -1,4 +1,3 @@ -/* $XFree86: xc/programs/Xserver/cfb/cfb32.h,v 1.4 1998/11/28 10:42:51 dawes Exp $ */ /* * Copyright (C) 1994-1998 The XFree86 Project, Inc. All Rights Reserved. * diff --git a/cfb/cfb8bit.c b/cfb/cfb8bit.c index 0bc5debbb..54a08c53d 100644 --- a/cfb/cfb8bit.c +++ b/cfb/cfb8bit.c @@ -1,4 +1,3 @@ -/* $Xorg: cfb8bit.c,v 1.4 2001/02/09 02:04:37 xorgcvs Exp $ */ /* Copyright 1989, 1994, 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/cfb/cfb8bit.c,v 1.4 2001/01/17 22:36:34 dawes Exp $ */ /* * cfb8bit.c diff --git a/cfb/cfb8bit.h b/cfb/cfb8bit.h index 767549af7..5a17adf4f 100644 --- a/cfb/cfb8bit.h +++ b/cfb/cfb8bit.h @@ -7,7 +7,6 @@ * are used for depths other than 8. Perhaps the file should be * renamed. dpw */ -/* $XFree86: xc/programs/Xserver/cfb/cfb8bit.h,v 3.7 2001/12/14 19:59:20 dawes Exp $ */ /* @@ -34,7 +33,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. */ -/* $Xorg: cfb8bit.h,v 1.4 2001/02/09 02:04:37 xorgcvs Exp $ */ #ifdef HAVE_DIX_CONFIG_H #include diff --git a/cfb/cfb8line.c b/cfb/cfb8line.c index 9740c2139..8c00d9fea 100644 --- a/cfb/cfb8line.c +++ b/cfb/cfb8line.c @@ -1,5 +1,4 @@ /* - * $Xorg: cfb8line.c,v 1.4 2001/02/09 02:04:37 xorgcvs Exp $ * Copyright 1990, 1998 The Open Group @@ -25,7 +24,6 @@ in this Software without prior written authorization from The Open Group. * * Author: Keith Packard, MIT X Consortium * - * $XFree86: xc/programs/Xserver/cfb/cfb8line.c,v 3.18tsi Exp $ * Jeff Anton'x fixes: cfb8line.c 97/02/07 */ diff --git a/cfb/cfballpriv.c b/cfb/cfballpriv.c index 68edb281b..e0ccdf4d0 100644 --- a/cfb/cfballpriv.c +++ b/cfb/cfballpriv.c @@ -1,5 +1,4 @@ /* - * $Xorg: cfballpriv.c,v 1.4 2001/02/09 02:04:37 xorgcvs Exp $ * Copyright 1991, 1998 The Open Group @@ -25,7 +24,6 @@ in this Software without prior written authorization from The Open Group. * * Author: Keith Packard, MIT X Consortium */ -/* $XFree86: xc/programs/Xserver/cfb/cfballpriv.c,v 1.11 2001/01/30 22:06:15 tsi Exp $ */ #ifdef HAVE_DIX_CONFIG_H #include diff --git a/cfb/cfbbitblt.c b/cfb/cfbbitblt.c index 2e621337a..faf49b92d 100644 --- a/cfb/cfbbitblt.c +++ b/cfb/cfbbitblt.c @@ -2,7 +2,6 @@ * cfb copy area */ -/* $XFree86: xc/programs/Xserver/cfb/cfbbitblt.c,v 1.19tsi Exp $ */ /* @@ -31,7 +30,6 @@ in this Software without prior written authorization from The Open Group. Author: Keith Packard */ -/* $Xorg: cfbbitblt.c,v 1.4 2001/02/09 02:04:37 xorgcvs Exp $ */ #ifdef HAVE_DIX_CONFIG_H #include diff --git a/cfb/cfbblt.c b/cfb/cfbblt.c index db32c87e5..1e577f526 100644 --- a/cfb/cfbblt.c +++ b/cfb/cfbblt.c @@ -1,7 +1,6 @@ /* * cfb copy area */ -/* $XFree86: xc/programs/Xserver/cfb/cfbblt.c,v 3.13tsi Exp $ */ /* @@ -30,7 +29,6 @@ in this Software without prior written authorization from The Open Group. Author: Keith Packard */ -/* $Xorg: cfbblt.c,v 1.4 2001/02/09 02:04:37 xorgcvs Exp $ */ /* 24-bit bug fixes: Peter Wainwright, 1998/11/28 */ diff --git a/cfb/cfbbres.c b/cfb/cfbbres.c index 2251fb885..fa1ee1379 100644 --- a/cfb/cfbbres.c +++ b/cfb/cfbbres.c @@ -1,4 +1,3 @@ -/* $XFree86: xc/programs/Xserver/cfb/cfbbres.c,v 3.4 2001/01/17 22:36:34 dawes Exp $ */ /*********************************************************** Copyright 1987, 1998 The Open Group @@ -45,7 +44,6 @@ ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ -/* $Xorg: cfbbres.c,v 1.4 2001/02/09 02:04:37 xorgcvs Exp $ */ #ifdef HAVE_DIX_CONFIG_H #include #endif diff --git a/cfb/cfbbresd.c b/cfb/cfbbresd.c index cc27eb5dc..ee48a74ec 100644 --- a/cfb/cfbbresd.c +++ b/cfb/cfbbresd.c @@ -1,4 +1,3 @@ -/* $XFree86: xc/programs/Xserver/cfb/cfbbresd.c,v 3.5 2001/01/17 22:36:34 dawes Exp $ */ /*********************************************************** Copyright 1987, 1998 The Open Group @@ -45,7 +44,6 @@ ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ -/* $Xorg: cfbbresd.c,v 1.4 2001/02/09 02:04:37 xorgcvs Exp $ */ #ifdef HAVE_DIX_CONFIG_H #include #endif diff --git a/cfb/cfbbstore.c b/cfb/cfbbstore.c index 64adc4050..f09360ce9 100644 --- a/cfb/cfbbstore.c +++ b/cfb/cfbbstore.c @@ -1,4 +1,3 @@ -/* $XFree86: xc/programs/Xserver/cfb/cfbbstore.c,v 1.4 1999/01/31 12:21:41 dawes Exp $ */ /*- * cfbbstore.c -- * Functions required by the backing-store implementation in MI. @@ -15,7 +14,6 @@ * * */ -/* $Xorg: cfbbstore.c,v 1.3 2000/08/17 19:48:13 cpqbld Exp $ */ #ifdef HAVE_DIX_CONFIG_H #include diff --git a/cfb/cfbcmap.c b/cfb/cfbcmap.c index a7777eda8..b96f67170 100644 --- a/cfb/cfbcmap.c +++ b/cfb/cfbcmap.c @@ -1,4 +1,3 @@ -/* $Xorg: cfbcmap.c,v 1.3 2000/08/17 19:48:13 cpqbld Exp $ */ /************************************************************ Copyright 1987 by Sun Microsystems, Inc. Mountain View, CA. @@ -27,7 +26,6 @@ OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ********************************************************/ -/* $XFree86: xc/programs/Xserver/cfb/cfbcmap.c,v 3.12 2000/02/12 03:39:23 dawes Exp $ */ #ifdef HAVE_DIX_CONFIG_H diff --git a/cfb/cfbcppl.c b/cfb/cfbcppl.c index f58682056..91b61a711 100644 --- a/cfb/cfbcppl.c +++ b/cfb/cfbcppl.c @@ -25,7 +25,6 @@ in this Software without prior written authorization from The Open Group. * * Author: Keith Packard, MIT X Consortium */ -/* $XFree86: xc/programs/Xserver/cfb/cfbcppl.c,v 1.6 2001/12/14 19:59:22 dawes Exp $ */ #ifdef HAVE_DIX_CONFIG_H #include diff --git a/cfb/cfbfillarc.c b/cfb/cfbfillarc.c index a02f40e14..0eb5ff469 100644 --- a/cfb/cfbfillarc.c +++ b/cfb/cfbfillarc.c @@ -1,4 +1,3 @@ -/* $XFree86: xc/programs/Xserver/cfb/cfbfillarc.c,v 3.6tsi Exp $ */ /************************************************************ Copyright 1989, 1998 The Open Group @@ -25,7 +24,6 @@ in this Software without prior written authorization from The Open Group. ********************************************************/ -/* $Xorg: cfbfillarc.c,v 1.4 2001/02/09 02:04:37 xorgcvs Exp $ */ #ifdef HAVE_DIX_CONFIG_H #include diff --git a/cfb/cfbfillrct.c b/cfb/cfbfillrct.c index 657865114..4c78c24b3 100644 --- a/cfb/cfbfillrct.c +++ b/cfb/cfbfillrct.c @@ -1,7 +1,6 @@ /* * Fill rectangles. */ -/* $XFree86: xc/programs/Xserver/cfb/cfbfillrct.c,v 3.7 2001/01/17 22:36:35 dawes Exp $ */ /* @@ -28,7 +27,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. */ -/* $Xorg: cfbfillrct.c,v 1.4 2001/02/09 02:04:37 xorgcvs Exp $ */ #ifdef HAVE_DIX_CONFIG_H #include diff --git a/cfb/cfbfillsp.c b/cfb/cfbfillsp.c index efb462b6c..ddd4f1421 100644 --- a/cfb/cfbfillsp.c +++ b/cfb/cfbfillsp.c @@ -1,4 +1,3 @@ -/* $XFree86: xc/programs/Xserver/cfb/cfbfillsp.c,v 3.7tsi Exp $ */ /************************************************************ Copyright 1987 by Sun Microsystems, Inc. Mountain View, CA. @@ -75,7 +74,6 @@ SOFTWARE. ******************************************************************/ -/* $Xorg: cfbfillsp.c,v 1.4 2001/02/09 02:04:37 xorgcvs Exp $ */ #ifdef HAVE_DIX_CONFIG_H #include diff --git a/cfb/cfbgc.c b/cfb/cfbgc.c index c20355146..a74c28c15 100644 --- a/cfb/cfbgc.c +++ b/cfb/cfbgc.c @@ -1,4 +1,3 @@ -/* $XFree86: xc/programs/Xserver/cfb/cfbgc.c,v 1.5 2001/01/17 22:36:35 dawes Exp $ */ /*********************************************************** Copyright 1987, 1998 The Open Group @@ -46,7 +45,6 @@ SOFTWARE. ******************************************************************/ -/* $Xorg: cfbgc.c,v 1.4 2001/02/09 02:04:37 xorgcvs Exp $ */ #ifdef HAVE_DIX_CONFIG_H #include diff --git a/cfb/cfbgetsp.c b/cfb/cfbgetsp.c index 44e31a241..672196a6c 100644 --- a/cfb/cfbgetsp.c +++ b/cfb/cfbgetsp.c @@ -1,4 +1,3 @@ -/* $Xorg: cfbgetsp.c,v 1.4 2001/02/09 02:04:38 xorgcvs Exp $ */ /*********************************************************** Copyright 1987, 1998 The Open Group @@ -45,7 +44,6 @@ ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ -/* $XFree86: xc/programs/Xserver/cfb/cfbgetsp.c,v 3.9tsi Exp $ */ #ifdef HAVE_DIX_CONFIG_H #include diff --git a/cfb/cfbglblt8.c b/cfb/cfbglblt8.c index fda848fde..c4cba0e15 100644 --- a/cfb/cfbglblt8.c +++ b/cfb/cfbglblt8.c @@ -1,4 +1,3 @@ -/* $Xorg: cfbglblt8.c,v 1.4 2001/02/09 02:04:38 xorgcvs Exp $ */ /* Copyright 1989, 1998 The Open Group @@ -23,7 +22,6 @@ 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. */ -/* $XFree86: xc/programs/Xserver/cfb/cfbglblt8.c,v 3.7 2003/07/16 01:38:37 dawes Exp $ */ /* * Poly glyph blt. Accepts an arbitrary font <= 32 bits wide, in Copy mode diff --git a/cfb/cfbhrzvert.c b/cfb/cfbhrzvert.c index 4df991b00..a6a793055 100644 --- a/cfb/cfbhrzvert.c +++ b/cfb/cfbhrzvert.c @@ -1,4 +1,3 @@ -/* $XFree86: xc/programs/Xserver/cfb/cfbhrzvert.c,v 3.6 2001/10/28 03:33:00 tsi Exp $ */ /*********************************************************** Copyright 1987,1998 The Open Group @@ -45,7 +44,6 @@ ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ -/* $Xorg: cfbhrzvert.c,v 1.4 2001/02/09 02:04:38 xorgcvs Exp $ */ #ifdef HAVE_DIX_CONFIG_H #include #endif diff --git a/cfb/cfbigblt8.c b/cfb/cfbigblt8.c index 97356e8bd..1f1ce6f37 100644 --- a/cfb/cfbigblt8.c +++ b/cfb/cfbigblt8.c @@ -1,5 +1,4 @@ /* - * $Xorg: cfbigblt8.c,v 1.4 2001/02/09 02:04:38 xorgcvs Exp $ * Copyright 1990, 1998 The Open Group @@ -26,7 +25,6 @@ in this Software without prior written authorization from The Open Group. * Author: Keith Packard, MIT X Consortium */ -/* $XFree86: xc/programs/Xserver/cfb/cfbigblt8.c,v 1.5 2001/10/28 03:33:01 tsi Exp $ */ #ifdef HAVE_DIX_CONFIG_H #include diff --git a/cfb/cfbimage.c b/cfb/cfbimage.c index f8c298922..396e1fcb2 100644 --- a/cfb/cfbimage.c +++ b/cfb/cfbimage.c @@ -1,4 +1,3 @@ -/* $XFree86: xc/programs/Xserver/cfb/cfbimage.c,v 1.12 2001/10/28 03:33:01 tsi Exp $ */ /*********************************************************** Copyright 1987, 1998 The Open Group @@ -45,7 +44,6 @@ ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ -/* $Xorg: cfbimage.c,v 1.4 2001/02/09 02:04:38 xorgcvs Exp $ */ #ifdef HAVE_DIX_CONFIG_H #include diff --git a/cfb/cfbline.c b/cfb/cfbline.c index c70c48a51..84c089a73 100644 --- a/cfb/cfbline.c +++ b/cfb/cfbline.c @@ -1,4 +1,3 @@ -/* $XFree86: xc/programs/Xserver/cfb/cfbline.c,v 3.5 2001/10/28 03:33:01 tsi Exp $ */ /*********************************************************** Copyright 1987, 1998 The Open Group @@ -45,7 +44,6 @@ ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ -/* $Xorg: cfbline.c,v 1.4 2001/02/09 02:04:38 xorgcvs Exp $ */ #ifdef HAVE_DIX_CONFIG_H #include #endif diff --git a/cfb/cfbmap.h b/cfb/cfbmap.h index 802517aac..1d6a3f850 100644 --- a/cfb/cfbmap.h +++ b/cfb/cfbmap.h @@ -1,5 +1,4 @@ /* - * $Xorg: cfbmap.h,v 1.4 2001/02/09 02:04:38 xorgcvs Exp $ * Copyright 1991, 1998 The Open Group @@ -26,7 +25,6 @@ in this Software without prior written authorization from The Open Group. * Author: Keith Packard, MIT X Consortium */ -/* $XFree86: xc/programs/Xserver/cfb/cfbmap.h,v 3.11tsi Exp $ */ /* * Map names around so that multiple depths can be supported simultaneously diff --git a/cfb/cfbmskbits.c b/cfb/cfbmskbits.c index 05954e62c..915ea35c1 100644 --- a/cfb/cfbmskbits.c +++ b/cfb/cfbmskbits.c @@ -1,4 +1,3 @@ -/* $XFree86: xc/programs/Xserver/cfb/cfbmskbits.c,v 3.1 1998/10/04 09:37:46 dawes Exp $ */ /************************************************************ Copyright 1987 by Sun Microsystems, Inc. Mountain View, CA. @@ -28,7 +27,6 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE. ********************************************************/ -/* $Xorg: cfbmskbits.c,v 1.3 2000/08/17 19:48:14 cpqbld Exp $ */ /* * ========================================================================== diff --git a/cfb/cfbmskbits.h b/cfb/cfbmskbits.h index f9ce33a61..7aa446cb5 100644 --- a/cfb/cfbmskbits.h +++ b/cfb/cfbmskbits.h @@ -1,4 +1,3 @@ -/* $XFree86: xc/programs/Xserver/cfb/cfbmskbits.h,v 3.13tsi Exp $ */ /************************************************************ Copyright 1987 by Sun Microsystems, Inc. Mountain View, CA. @@ -28,7 +27,6 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE. ********************************************************/ -/* $Xorg: cfbmskbits.h,v 1.3 2000/08/17 19:48:14 cpqbld Exp $ */ /* Optimizations for PSZ == 32 added by Kyle Marvin (marvin@vitec.com) */ #include diff --git a/cfb/cfbpixmap.c b/cfb/cfbpixmap.c index e73cf5735..d51c5187c 100644 --- a/cfb/cfbpixmap.c +++ b/cfb/cfbpixmap.c @@ -1,4 +1,3 @@ -/* $Xorg: cfbpixmap.c,v 1.4 2001/02/09 02:04:38 xorgcvs Exp $ */ /*********************************************************** Copyright 1987, 1998 The Open Group @@ -45,7 +44,6 @@ ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ -/* $XFree86: xc/programs/Xserver/cfb/cfbpixmap.c,v 1.4 2001/01/17 22:36:36 dawes Exp $ */ /* pixmap management written by drewry, september 1986 diff --git a/cfb/cfbply1rct.c b/cfb/cfbply1rct.c index b431f33e1..ce0bcb203 100644 --- a/cfb/cfbply1rct.c +++ b/cfb/cfbply1rct.c @@ -1,5 +1,4 @@ /* - * $Xorg: cfbply1rct.c,v 1.4 2001/02/09 02:04:38 xorgcvs Exp $ * Copyright 1990, 1998 The Open Group @@ -25,7 +24,6 @@ in this Software without prior written authorization from The Open Group. * * Author: Keith Packard, MIT X Consortium */ -/* $XFree86: xc/programs/Xserver/cfb/cfbply1rct.c,v 3.10 2003/10/29 22:44:53 tsi Exp $ */ #ifdef HAVE_DIX_CONFIG_H #include diff --git a/cfb/cfbpntwin.c b/cfb/cfbpntwin.c index 9bfdfe64f..32f011e23 100644 --- a/cfb/cfbpntwin.c +++ b/cfb/cfbpntwin.c @@ -1,5 +1,3 @@ -/* $XdotOrg: xc/programs/Xserver/cfb/cfbpntwin.c,v 1.3 2005/04/20 12:25:18 daniels Exp $ */ -/* $Xorg: cfbpntwin.c,v 1.4 2001/02/09 02:04:38 xorgcvs Exp $ */ /*********************************************************** Copyright 1987, 1998 The Open Group @@ -46,7 +44,6 @@ ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ -/* $XFree86: xc/programs/Xserver/cfb/cfbpntwin.c,v 3.7tsi Exp $ */ #ifdef HAVE_DIX_CONFIG_H #include diff --git a/cfb/cfbpolypnt.c b/cfb/cfbpolypnt.c index 59ef0cf89..06a768e8d 100644 --- a/cfb/cfbpolypnt.c +++ b/cfb/cfbpolypnt.c @@ -1,4 +1,3 @@ -/* $XFree86: xc/programs/Xserver/cfb/cfbpolypnt.c,v 3.5 2001/10/28 03:33:01 tsi Exp $ */ /************************************************************ Copyright 1989, 1998 The Open Group @@ -25,7 +24,6 @@ in this Software without prior written authorization from The Open Group. ********************************************************/ -/* $Xorg: cfbpolypnt.c,v 1.4 2001/02/09 02:04:38 xorgcvs Exp $ */ #ifdef HAVE_DIX_CONFIG_H #include diff --git a/cfb/cfbpush8.c b/cfb/cfbpush8.c index 3492c8e25..857ec94a6 100644 --- a/cfb/cfbpush8.c +++ b/cfb/cfbpush8.c @@ -2,7 +2,6 @@ * Push Pixels for 8 bit displays. */ -/* $XFree86: xc/programs/Xserver/cfb/cfbpush8.c,v 1.5 2001/01/17 22:36:36 dawes Exp $ */ /* @@ -28,7 +27,6 @@ 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. */ -/* $Xorg: cfbpush8.c,v 1.4 2001/02/09 02:04:38 xorgcvs Exp $ */ #ifdef HAVE_DIX_CONFIG_H #include diff --git a/cfb/cfbrctstp8.c b/cfb/cfbrctstp8.c index 9f753cdd7..485d40998 100644 --- a/cfb/cfbrctstp8.c +++ b/cfb/cfbrctstp8.c @@ -1,7 +1,6 @@ /* * Fill 32 bit stippled rectangles for 8 bit frame buffers */ -/* $XFree86: xc/programs/Xserver/cfb/cfbrctstp8.c,v 3.5 2001/10/28 03:33:01 tsi Exp $ */ /* Copyright 1989, 1998 The Open Group @@ -30,7 +29,6 @@ Author: Keith Packard, MIT X Consortium */ -/* $Xorg: cfbrctstp8.c,v 1.4 2001/02/09 02:04:38 xorgcvs Exp $ */ #ifdef HAVE_DIX_CONFIG_H #include diff --git a/cfb/cfbrrop.c b/cfb/cfbrrop.c index 77487bc6a..ffd813853 100644 --- a/cfb/cfbrrop.c +++ b/cfb/cfbrrop.c @@ -1,5 +1,4 @@ /* - * $Xorg: cfbrrop.c,v 1.4 2001/02/09 02:04:38 xorgcvs Exp $ * Copyright 1989, 1998 The Open Group @@ -25,7 +24,6 @@ in this Software without prior written authorization from The Open Group. * * Author: Keith Packard, MIT X Consortium */ -/* $XFree86: xc/programs/Xserver/cfb/cfbrrop.c,v 1.5 2001/10/28 03:33:02 tsi Exp $ */ /* cfb reduced rasterop computations */ diff --git a/cfb/cfbrrop.h b/cfb/cfbrrop.h index 9e7a44c5b..eeb373a5e 100644 --- a/cfb/cfbrrop.h +++ b/cfb/cfbrrop.h @@ -1,5 +1,4 @@ /* - * $Xorg: cfbrrop.h,v 1.4 2001/02/09 02:04:38 xorgcvs Exp $ * Copyright 1989, 1998 The Open Group @@ -26,7 +25,6 @@ in this Software without prior written authorization from The Open Group. * Author: Keith Packard, MIT X Consortium */ -/* $XFree86: xc/programs/Xserver/cfb/cfbrrop.h,v 3.10tsi Exp $ */ #ifdef HAVE_DIX_CONFIG_H #include diff --git a/cfb/cfbscrinit.c b/cfb/cfbscrinit.c index 7299bbdf8..9f411ab27 100644 --- a/cfb/cfbscrinit.c +++ b/cfb/cfbscrinit.c @@ -1,4 +1,3 @@ -/* $XFree86: xc/programs/Xserver/cfb/cfbscrinit.c,v 1.19 2001/01/17 22:36:36 dawes Exp $ */ /************************************************************ Copyright 1987 by Sun Microsystems, Inc. Mountain View, CA. @@ -27,7 +26,6 @@ OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ********************************************************/ -/* $Xorg: cfbscrinit.c,v 1.3 2000/08/17 19:48:15 cpqbld Exp $ */ #ifdef HAVE_DIX_CONFIG_H #include diff --git a/cfb/cfbsetsp.c b/cfb/cfbsetsp.c index 56317cb91..a000fd9e1 100644 --- a/cfb/cfbsetsp.c +++ b/cfb/cfbsetsp.c @@ -1,4 +1,3 @@ -/* $Xorg: cfbsetsp.c,v 1.4 2001/02/09 02:04:38 xorgcvs Exp $ */ /*********************************************************** Copyright 1987, 1998 The Open Group @@ -45,7 +44,6 @@ ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ -/* $XFree86: xc/programs/Xserver/cfb/cfbsetsp.c,v 3.5tsi Exp $ */ #ifdef HAVE_DIX_CONFIG_H #include diff --git a/cfb/cfbsolid.c b/cfb/cfbsolid.c index 9f9093647..f0da05ef0 100644 --- a/cfb/cfbsolid.c +++ b/cfb/cfbsolid.c @@ -1,5 +1,4 @@ /* - * $Xorg: cfbsolid.c,v 1.4 2001/02/09 02:04:38 xorgcvs Exp $ * Copyright 1990, 1998 The Open Group @@ -25,7 +24,6 @@ in this Software without prior written authorization from The Open Group. * * Author: Keith Packard, MIT X Consortium */ -/* $XFree86: xc/programs/Xserver/cfb/cfbsolid.c,v 3.8tsi Exp $ */ #ifdef HAVE_DIX_CONFIG_H diff --git a/cfb/cfbteblt8.c b/cfb/cfbteblt8.c index f58a07dc6..9d4ce5708 100644 --- a/cfb/cfbteblt8.c +++ b/cfb/cfbteblt8.c @@ -3,7 +3,6 @@ * 8 bit displays, in Copy mode with no clipping. */ -/* $XFree86: xc/programs/Xserver/cfb/cfbteblt8.c,v 1.5 2001/10/28 03:33:02 tsi Exp $ */ /* Copyright 1989, 1998 The Open Group @@ -29,7 +28,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. */ -/* $Xorg: cfbteblt8.c,v 1.4 2001/02/09 02:04:38 xorgcvs Exp $ */ #ifdef HAVE_DIX_CONFIG_H #include @@ -303,7 +301,7 @@ typedef unsigned int *glyphPointer; #define StorePixels(o,p) dst[o] = p #define Loop dst += widthDst; #else -#define StorePixels(o,p) *dst++ = (p) +#define StorePixels(o,p) do { *dst = (p); dst++; } while (0) #define Loop dst += widthLeft; #endif diff --git a/cfb/cfbtegblt.c b/cfb/cfbtegblt.c index e3fb06f59..f04ee3faf 100644 --- a/cfb/cfbtegblt.c +++ b/cfb/cfbtegblt.c @@ -1,4 +1,3 @@ -/* $Xorg: cfbtegblt.c,v 1.4 2001/02/09 02:04:39 xorgcvs Exp $ */ /*********************************************************** Copyright 1987, 1998 The Open Group @@ -45,7 +44,6 @@ ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ -/* $XFree86: xc/programs/Xserver/cfb/cfbtegblt.c,v 3.6tsi Exp $ */ #ifdef HAVE_DIX_CONFIG_H #include diff --git a/cfb/cfbtile32.c b/cfb/cfbtile32.c index 96e5620b7..fb6a10613 100644 --- a/cfb/cfbtile32.c +++ b/cfb/cfbtile32.c @@ -2,7 +2,6 @@ * Fill 32 bit tiled rectangles. Used by both PolyFillRect and PaintWindow. * no depth dependencies. */ -/* $XFree86: xc/programs/Xserver/cfb/cfbtile32.c,v 3.6tsi Exp $ */ /* @@ -29,7 +28,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. */ -/* $Xorg: cfbtile32.c,v 1.4 2001/02/09 02:04:39 xorgcvs Exp $ */ #ifdef HAVE_DIX_CONFIG_H #include diff --git a/cfb/cfbtileodd.c b/cfb/cfbtileodd.c index 6c46aa4db..86a3fa5b5 100644 --- a/cfb/cfbtileodd.c +++ b/cfb/cfbtileodd.c @@ -2,7 +2,6 @@ * Fill odd tiled rectangles and spans. * no depth dependencies. */ -/* $XFree86: xc/programs/Xserver/cfb/cfbtileodd.c,v 3.6tsi Exp $ */ /* @@ -29,7 +28,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. */ -/* $Xorg: cfbtileodd.c,v 1.4 2001/02/09 02:04:39 xorgcvs Exp $ */ #ifdef HAVE_DIX_CONFIG_H #include diff --git a/cfb/cfbunmap.h b/cfb/cfbunmap.h index bccdf0f0f..61c7fc942 100644 --- a/cfb/cfbunmap.h +++ b/cfb/cfbunmap.h @@ -1,4 +1,3 @@ -/* $XFree86: xc/programs/Xserver/cfb/cfbunmap.h,v 1.6 2003/07/19 13:22:28 tsi Exp $ */ /* * Copyright (C) 1994-1998 The XFree86 Project, Inc. All Rights Reserved. * diff --git a/cfb/cfbwindow.c b/cfb/cfbwindow.c index ebc1c4593..e04b73df2 100644 --- a/cfb/cfbwindow.c +++ b/cfb/cfbwindow.c @@ -1,4 +1,3 @@ -/* $Xorg: cfbwindow.c,v 1.4 2001/02/09 02:04:39 xorgcvs Exp $ */ /*********************************************************** Copyright 1987, 1998 The Open Group @@ -45,7 +44,6 @@ ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ -/* $XFree86: xc/programs/Xserver/cfb/cfbwindow.c,v 1.5tsi Exp $ */ #ifdef HAVE_DIX_CONFIG_H #include diff --git a/cfb/cfbzerarc.c b/cfb/cfbzerarc.c index 27b82e42e..5b8879ee1 100644 --- a/cfb/cfbzerarc.c +++ b/cfb/cfbzerarc.c @@ -1,4 +1,3 @@ -/* $XFree86: xc/programs/Xserver/cfb/cfbzerarc.c,v 3.4tsi Exp $ */ /************************************************************ Copyright 1989, 1998 The Open Group @@ -25,7 +24,6 @@ in this Software without prior written authorization from The Open Group. ********************************************************/ -/* $Xorg: cfbzerarc.c,v 1.4 2001/02/09 02:04:39 xorgcvs Exp $ */ /* Derived from: * "Algorithm for drawing ellipses or hyperbolae with a digital plotter" diff --git a/cfb/stip68kgnu.h b/cfb/stip68kgnu.h index 01bb939e8..2da27b4dd 100644 --- a/cfb/stip68kgnu.h +++ b/cfb/stip68kgnu.h @@ -1,5 +1,4 @@ /* - * $Xorg: stip68kgnu.h,v 1.4 2001/02/09 02:04:39 xorgcvs Exp $ * Copyright 1990, 1998 The Open Group @@ -25,7 +24,6 @@ in this Software without prior written authorization from The Open Group. * * Author: Keith Packard, MIT X Consortium */ -/* $XFree86: xc/programs/Xserver/cfb/stip68kgnu.h,v 3.3 2001/01/17 22:36:37 dawes Exp $ */ /* * Stipple stack macro for 68k GCC diff --git a/cfb32/Makefile.am b/cfb32/Makefile.am index a549d1839..681a09575 100644 --- a/cfb32/Makefile.am +++ b/cfb32/Makefile.am @@ -6,4 +6,4 @@ libcfb32_la_SOURCES = $(libcfb_common_sources) $(libcfb_gen_sources) INCLUDES = $(CFB_INCLUDES) $(DIX_CFLAGS) -I$(top_srcdir)/hw/xfree86/os-support -I$(top_srcdir)/hw/xfree86/common -AM_CFLAGS = -DPSZ=32 $(PLATFORMDEFS) @SERVER_DEFINES@ @MODULE_DEFINES@ @LOADER_DEFINES@ +AM_CFLAGS = -DPSZ=32 $(PLATFORMDEFS) diff --git a/composite/Makefile.am b/composite/Makefile.am index dbcb8c61f..21504e659 100644 --- a/composite/Makefile.am +++ b/composite/Makefile.am @@ -1,6 +1,6 @@ noinst_LTLIBRARIES = libcomposite.la -AM_CFLAGS = $(DIX_CFLAGS) @SERVER_DEFINES@ @LOADER_DEFINES@ +AM_CFLAGS = $(DIX_CFLAGS) libcomposite_la_SOURCES = \ compalloc.c \ diff --git a/composite/compext.c b/composite/compext.c index a7ad4e2fd..13936fa18 100644 --- a/composite/compext.c +++ b/composite/compext.c @@ -269,7 +269,10 @@ ProcCompositeNameWindowPixmap (ClientPtr client) client->errorValue = stuff->window; return BadWindow; } - + + if (!pWin->viewable) + return BadMatch; + LEGAL_NEW_RESOURCE (stuff->pixmap, client); cw = GetCompWindow (pWin); diff --git a/composite/compinit.c b/composite/compinit.c index 5a1361216..1d5cc7b04 100644 --- a/composite/compinit.c +++ b/composite/compinit.c @@ -60,6 +60,8 @@ compCloseScreen (int index, ScreenPtr pScreen) CompScreenPtr cs = GetCompScreen (pScreen); Bool ret; + xfree (cs->alternateVisuals); + pScreen->CloseScreen = cs->CloseScreen; pScreen->BlockHandler = cs->BlockHandler; pScreen->InstallColormap = cs->InstallColormap; @@ -100,7 +102,7 @@ compInstallColormap (ColormapPtr pColormap) CompScreenPtr cs = GetCompScreen (pScreen); int a; - for (a = 0; a < NUM_COMP_ALTERNATE_VISUALS; a++) + for (a = 0; a < cs->numAlternateVisuals; a++) if (pVisual->vid == cs->alternateVisuals[a]) return; pScreen->InstallColormap = cs->InstallColormap; @@ -170,6 +172,41 @@ compFindVisuallessDepth (ScreenPtr pScreen, int d) return 0; } +/* + * Add a list of visual IDs to the list of visuals to implicitly redirect. + */ +static Bool +compRegisterAlternateVisuals (CompScreenPtr cs, VisualID *vids, int nVisuals) +{ + VisualID *p; + + p = xrealloc(cs->alternateVisuals, + sizeof(VisualID) * (cs->numAlternateVisuals + nVisuals)); + if(p == NULL) + return FALSE; + + memcpy(&p[cs->numAlternateVisuals], vids, sizeof(VisualID) * nVisuals); + + cs->alternateVisuals = p; + cs->numAlternateVisuals += nVisuals; + + return TRUE; +} + +_X_EXPORT +Bool CompositeRegisterAlternateVisuals (ScreenPtr pScreen, VisualID *vids, + int nVisuals) +{ + CompScreenPtr cs = GetCompScreen (pScreen); + return compRegisterAlternateVisuals(cs, vids, nVisuals); +} + +#if COMP_INCLUDE_RGB24_VISUAL +#define NUM_COMP_ALTERNATE_VISUALS 2 +#else +#define NUM_COMP_ALTERNATE_VISUALS 1 +#endif + typedef struct _alternateVisual { int depth; CARD32 format; @@ -197,8 +234,6 @@ compAddAlternateVisuals (ScreenPtr pScreen, CompScreenPtr cs) int numAlternate = 0; int alt; - memset (cs->alternateVisuals, '\0', sizeof (cs->alternateVisuals)); - for (alt = 0; alt < NUM_COMP_ALTERNATE_VISUALS; alt++) { DepthPtr depth; @@ -321,7 +356,7 @@ compAddAlternateVisuals (ScreenPtr pScreen, CompScreenPtr cs) /* * remember the visual ID to detect auto-update windows */ - cs->alternateVisuals[alt] = visual->vid; + compRegisterAlternateVisuals(cs, &visual->vid, 1); /* * Fix up the depth @@ -367,6 +402,9 @@ compScreenInit (ScreenPtr pScreen) cs->pOverlayWin = NULL; cs->pOverlayClients = NULL; + cs->numAlternateVisuals = 0; + cs->alternateVisuals = NULL; + if (!compAddAlternateVisuals (pScreen, cs)) { xfree (cs); diff --git a/composite/compint.h b/composite/compint.h index 9395512b4..3958b3b31 100644 --- a/composite/compint.h +++ b/composite/compint.h @@ -109,12 +109,6 @@ typedef struct _CompSubwindows { #define COMP_INCLUDE_RGB24_VISUAL 0 #endif -#if COMP_INCLUDE_RGB24_VISUAL -#define NUM_COMP_ALTERNATE_VISUALS 2 -#else -#define NUM_COMP_ALTERNATE_VISUALS 1 -#endif - typedef struct _CompOverlayClientRec *CompOverlayClientPtr; typedef struct _CompOverlayClientRec { @@ -154,7 +148,8 @@ typedef struct _CompScreen { ScreenBlockHandlerProcPtr BlockHandler; CloseScreenProcPtr CloseScreen; Bool damaged; - XID alternateVisuals[NUM_COMP_ALTERNATE_VISUALS]; + int numAlternateVisuals; + VisualID *alternateVisuals; WindowPtr pOverlayWin; CompOverlayClientPtr pOverlayClients; @@ -224,6 +219,10 @@ CompositeExtensionInit (void); * compinit.c */ +Bool +CompositeRegisterAlternateVisuals (ScreenPtr pScreen, + VisualID *vids, int nVisuals); + Bool compScreenInit (ScreenPtr pScreen); diff --git a/composite/compwindow.c b/composite/compwindow.c index 87055b70c..fed642ec6 100644 --- a/composite/compwindow.c +++ b/composite/compwindow.c @@ -93,10 +93,10 @@ typedef struct _compPixmapVisit { static Bool compRepaintBorder (ClientPtr pClient, pointer closure) { - WindowPtr pWindow = LookupWindow ((XID) closure, pClient); + WindowPtr pWindow; + int rc = dixLookupWindow(&pWindow, (XID)closure, pClient,DixUnknownAccess); - if (pWindow) - { + if (rc == Success) { RegionRec exposed; REGION_NULL(pScreen, &exposed); @@ -301,7 +301,7 @@ compIsAlternateVisual (ScreenPtr pScreen, CompScreenPtr cs = GetCompScreen (pScreen); int i; - for (i = 0; i < NUM_COMP_ALTERNATE_VISUALS; i++) + for (i = 0; i < cs->numAlternateVisuals; i++) if (cs->alternateVisuals[i] == visual) return TRUE; return FALSE; diff --git a/config/Makefile.am b/config/Makefile.am new file mode 100644 index 000000000..1cc9109db --- /dev/null +++ b/config/Makefile.am @@ -0,0 +1,10 @@ +AM_CFLAGS = @DIX_CFLAGS@ + +dbusconfigdir = $(sysconfdir)/dbus-1/system.d +dbusconfig_DATA = xorg-server.conf + +lib_LIBRARIES = libconfig.a + +libconfig_a_SOURCES = config.c + +EXTRA_DIST = xorg-server.conf diff --git a/config/config.c b/config/config.c new file mode 100644 index 000000000..523327d04 --- /dev/null +++ b/config/config.c @@ -0,0 +1,450 @@ +/* + * Copyright © 2006 Daniel Stone + * + * 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, and that the name of the copyright holders and/or authors + * not be used in advertising or publicity pertaining to distribution of the + * software without specific, written prior permission. The copyright holders + * and/or authors make no representations about the suitability of this + * software for any purpose. It is provided "as is" without express or + * implied warranty. + * + * THE COPYRIGHT HOLDERS AND/OR AUTHORS DISCLAIM ALL WARRANTIES WITH REGARD + * TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS, IN NO EVENT SHALL THE COPYRIGHT HOLDERS AND/OR AUTHORS BE LIABLE + * FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER + * RESULTING FROM LOSS OF USE, 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. + */ + +#ifdef HAVE_DIX_CONFIG_H +#include +#endif + +#ifdef HAVE_DBUS +#define DBUS_API_SUBJECT_TO_CHANGE +#include +#include + +#include + +#include "opaque.h" /* for 'display': there has to be a better way */ + /* the above comment lies. there is no better way. */ +#include "input.h" +#include "inputstr.h" +#include "hotplug.h" +#include "os.h" + +#define CONFIG_MATCH_RULE "type='method_call',interface='org.x.config.input'" + +#define MALFORMED_MSG "[config] malformed message, dropping" +#define MALFORMED_MESSAGE() { DebugF(MALFORMED_MSG "\n"); \ + ret = BadValue; \ + goto unwind; } +#define MALFORMED_MESSAGE_ERROR() { DebugF(MALFORMED_MSG ": %s, %s", \ + error->name, error->message); \ + ret = BadValue; \ + goto unwind; } + +/* How often to attempt reconnecting when we get booted off the bus. */ +#define RECONNECT_DELAY 10000 /* in ms */ + +struct config_data { + int fd; + DBusConnection *connection; + char busobject[32]; + char busname[64]; +}; + +static struct config_data *configData; + +static CARD32 configReconnect(OsTimerPtr timer, CARD32 time, pointer arg); + +static void +configWakeupHandler(pointer blockData, int err, pointer pReadMask) +{ + struct config_data *data = blockData; + + if (data->connection && FD_ISSET(data->fd, (fd_set *) pReadMask)) + dbus_connection_read_write_dispatch(data->connection, 0); +} + +static void +configBlockHandler(pointer data, struct timeval **tv, pointer pReadMask) +{ +} + +static void +configTeardown(void) +{ + if (configData) { + RemoveGeneralSocket(configData->fd); + RemoveBlockAndWakeupHandlers(configBlockHandler, configWakeupHandler, + configData); + xfree(configData); + configData = NULL; + } +} + +static int +configAddDevice(DBusMessage *message, DBusMessageIter *iter, DBusError *error) +{ + DBusMessageIter subiter; + InputOption *tmpo = NULL, *options = NULL; + char *tmp = NULL; + int ret = BadMatch; + + DebugF("[config] adding device\n"); + + /* signature should be [ss][ss]... */ + options = (InputOption *) xcalloc(sizeof(InputOption), 1); + if (!options) { + ErrorF("[config] couldn't allocate option\n"); + return BadAlloc; + } + + options->key = xstrdup("_source"); + options->value = xstrdup("client/dbus"); + + while (dbus_message_iter_get_arg_type(iter) == DBUS_TYPE_ARRAY) { + tmpo = (InputOption *) xcalloc(sizeof(InputOption), 1); + if (!tmpo) { + ErrorF("[config] couldn't allocate option\n"); + ret = BadAlloc; + goto unwind; + } + + dbus_message_iter_recurse(iter, &subiter); + + if (dbus_message_iter_get_arg_type(&subiter) != DBUS_TYPE_STRING) + MALFORMED_MESSAGE(); + + dbus_message_iter_get_basic(&subiter, &tmp); + if (!tmp) + MALFORMED_MESSAGE(); + if (tmp[0] == '_') { + ErrorF("[config] attempted subterfuge: option name %s given\n", + tmp); + MALFORMED_MESSAGE(); + } + tmpo->key = xstrdup(tmp); + if (!tmpo->key) { + ErrorF("[config] couldn't duplicate key!\n"); + ret = BadAlloc; + goto unwind; + } + + if (!dbus_message_iter_has_next(&subiter)) + MALFORMED_MESSAGE(); + dbus_message_iter_next(&subiter); + if (dbus_message_iter_get_arg_type(&subiter) != DBUS_TYPE_STRING) + MALFORMED_MESSAGE(); + + dbus_message_iter_get_basic(&subiter, &tmp); + if (!tmp) + MALFORMED_MESSAGE(); + tmpo->value = xstrdup(tmp); + if (!tmpo->value) { + ErrorF("[config] couldn't duplicate option!\n"); + ret = BadAlloc; + goto unwind; + } + + tmpo->next = options; + options = tmpo; + dbus_message_iter_next(iter); + } + + ret = NewInputDeviceRequest(options); + if (ret != Success) + DebugF("[config] NewInputDeviceRequest failed\n"); + + return ret; + +unwind: + if (tmpo->key) + xfree(tmpo->key); + if (tmpo->value) + xfree(tmpo->value); + if (tmpo) + xfree(tmpo); + + while (options) { + tmpo = options; + options = options->next; + if (tmpo->key) + xfree(tmpo->key); + if (tmpo->value) + xfree(tmpo->value); + xfree(tmpo); + } + + return ret; +} + +static int +configRemoveDevice(DBusMessage *message, DBusMessageIter *iter, + DBusError *error) +{ + int deviceid = -1; + int ret = BadMatch; + DeviceIntPtr pDev = NULL; + + if (!dbus_message_get_args(message, error, DBUS_TYPE_INT32, + &deviceid, DBUS_TYPE_INVALID)) { + MALFORMED_MESSAGE_ERROR(); + } + + if (deviceid < 0 || !(pDev = LookupDeviceIntRec(deviceid))) { + DebugF("[config] bogus device id %d given\n", deviceid); + ret = BadMatch; + goto unwind; + } + + DebugF("[config] removing device %s (id %d)\n", pDev->name, deviceid); + + /* Call PIE here so we don't try to dereference a device that's + * already been removed. */ + OsBlockSignals(); + ProcessInputEvents(); + RemoveDevice(pDev); + OsReleaseSignals(); + + return Success; + +unwind: + return ret; +} + +static DBusHandlerResult +configMessage(DBusConnection *connection, DBusMessage *message, void *closure) +{ + DBusMessageIter iter; + DBusError error; + DBusMessage *reply; + DBusConnection *bus = closure; + int ret = BadDrawable; /* nonsensical value */ + + dbus_error_init(&error); + + if (strcmp(dbus_message_get_interface(message), + "org.x.config.input") == 0) { + if (!dbus_message_iter_init(message, &iter)) { + ErrorF("[config] failed to init iterator\n"); + dbus_error_free(&error); + return DBUS_HANDLER_RESULT_NEED_MEMORY; /* ?? */ + } + + if (strcmp(dbus_message_get_member(message), "add") == 0) + ret = configAddDevice(message, &iter, &error); + else if (strcmp(dbus_message_get_member(message), "remove") == 0) + ret = configRemoveDevice(message, &iter, &error); + if (ret != BadDrawable && ret != BadAlloc) { + reply = dbus_message_new_method_return(message); + dbus_message_iter_init_append(reply, &iter); + + if (!dbus_message_iter_append_basic(&iter, DBUS_TYPE_INT32, &ret)) { + ErrorF("[config] couldn't append to iterator\n"); + dbus_error_free(&error); + return DBUS_HANDLER_RESULT_HANDLED; + } + + if (!dbus_connection_send(bus, reply, NULL)) + ErrorF("[config] failed to send reply\n"); + dbus_connection_flush(bus); + + dbus_message_unref(reply); + } + } + + dbus_error_free(&error); + + if (ret == BadAlloc) + return DBUS_HANDLER_RESULT_NEED_MEMORY; + else if (ret == BadDrawable) + return DBUS_HANDLER_RESULT_NOT_YET_HANDLED; + else + return DBUS_HANDLER_RESULT_HANDLED; +} + +/** + * This is a filter, which only handles the disconnected signal, which + * doesn't go to the normal message handling function. This takes + * precedence over the message handling function, so have have to be + * careful to ignore anything we don't want to deal with here. + * + * Yes, this is brutally stupid. + */ +static DBusHandlerResult +configFilter(DBusConnection *connection, DBusMessage *message, void *closure) +{ + if (dbus_message_is_signal(message, DBUS_INTERFACE_LOCAL, + "Disconnected")) { + ErrorF("[dbus] disconnected from bus\n"); + TimerSet(NULL, 0, RECONNECT_DELAY, configReconnect, NULL); + configTeardown(); + return DBUS_HANDLER_RESULT_HANDLED; + } + + return DBUS_HANDLER_RESULT_NOT_YET_HANDLED; +} + +static Bool +configSetup(void) +{ + DBusError error; + DBusObjectPathVTable vtable = { .message_function = configMessage }; + + if (!configData) + configData = (struct config_data *) xcalloc(sizeof(struct config_data), 1); + if (!configData) { + ErrorF("[dbus] failed to allocate data struct.\n"); + return FALSE; + } + + dbus_error_init(&error); + configData->connection = dbus_bus_get(DBUS_BUS_SYSTEM, &error); + if (!configData->connection || dbus_error_is_set(&error)) { + ErrorF("[dbus] some kind of error occurred: %s (%s)\n", error.name, + error.message); + dbus_error_free(&error); + xfree(configData); + configData = NULL; + return FALSE; + } + + dbus_connection_set_exit_on_disconnect(configData->connection, FALSE); + + if (!dbus_connection_get_unix_fd(configData->connection, &configData->fd)) { + dbus_connection_unref(configData->connection); + ErrorF("[dbus] couldn't get fd for bus\n"); + dbus_error_free(&error); + xfree(configData); + configData = NULL; + return FALSE; + } + + snprintf(configData->busname, sizeof(configData->busname), + "org.x.config.display%d", atoi(display)); + if (!dbus_bus_request_name(configData->connection, configData->busname, + 0, &error) || dbus_error_is_set(&error)) { + ErrorF("[dbus] couldn't take over org.x.config: %s (%s)\n", + error.name, error.message); + dbus_error_free(&error); + dbus_connection_unref(configData->connection); + xfree(configData); + configData = NULL; + return FALSE; + } + + /* blocks until we get a reply. */ + dbus_bus_add_match(configData->connection, CONFIG_MATCH_RULE, &error); + if (dbus_error_is_set(&error)) { + ErrorF("[dbus] couldn't match X.Org rule: %s (%s)\n", error.name, + error.message); + dbus_error_free(&error); + dbus_bus_release_name(configData->connection, configData->busname, + &error); + dbus_connection_unref(configData->connection); + xfree(configData); + configData = NULL; + return FALSE; + } + + if (!dbus_connection_add_filter(configData->connection, configFilter, + configData, NULL)) { + + ErrorF("[dbus] couldn't add signal filter: %s (%s)\n", error.name, + error.message); + dbus_error_free(&error); + dbus_bus_release_name(configData->connection, configData->busname, + &error); + dbus_bus_remove_match(configData->connection, CONFIG_MATCH_RULE, + &error); + dbus_connection_unref(configData->connection); + xfree(configData); + configData = NULL; + return FALSE; + } + + snprintf(configData->busobject, sizeof(configData->busobject), + "/org/x/config/%d", atoi(display)); + if (!dbus_connection_register_object_path(configData->connection, + configData->busobject, &vtable, + configData->connection)) { + ErrorF("[dbus] couldn't register object path\n"); + dbus_bus_release_name(configData->connection, configData->busname, + &error); + dbus_bus_remove_match(configData->connection, CONFIG_MATCH_RULE, + &error); + dbus_connection_unref(configData->connection); + dbus_error_free(&error); + xfree(configData); + configData = NULL; + return FALSE; + } + + DebugF("[dbus] registered object path %s\n", configData->busobject); + + dbus_error_free(&error); + AddGeneralSocket(configData->fd); + + RegisterBlockAndWakeupHandlers(configBlockHandler, configWakeupHandler, + configData); + + return TRUE; +} + +static CARD32 +configReconnect(OsTimerPtr timer, CARD32 time, pointer arg) +{ + if (configSetup()) + return 0; + else + return RECONNECT_DELAY; +} + +void +configInitialise() +{ + TimerSet(NULL, 0, 1, configReconnect, NULL); +} + +void +configFini() +{ + DBusError error; + + if (configData) { + dbus_error_init(&error); + dbus_connection_unregister_object_path(configData->connection, + configData->busobject); + dbus_connection_remove_filter(configData->connection, configFilter, + configData); + dbus_bus_remove_match(configData->connection, CONFIG_MATCH_RULE, + &error); + dbus_bus_release_name(configData->connection, configData->busname, + &error); + dbus_connection_unref(configData->connection); + dbus_error_free(&error); + configTeardown(); + } +} + +#else /* !HAVE_DBUS */ + +void +configInitialise() +{ +} + +void +configFini() +{ +} + +#endif /* HAVE_DBUS */ diff --git a/config/dbus-api b/config/dbus-api new file mode 100644 index 000000000..53bb3e45d --- /dev/null +++ b/config/dbus-api @@ -0,0 +1,35 @@ +D-BUS Configuration API v0.1 +---------------------------- + +The X server will register the bus name org.x.config.displayN, and the +object /org/x/config/N, where N is the display number. + +Currently only hotplugging of input devices is supported. + +org.x.config.input: + org.x.config.input.add: + Takes an argument of key/value option pairs in arrays, e.g.: + [ss][ss][ss][ss] + is the signature for four options. These options will be passed + to the input driver as with any others. + Option names beginning with _ are not allowed; they are reserved + for internal use. + + Returns one int32, which is an X Status, as defined in X.h. If + everything is successful, Success will be returned. BadMatch will + be returned if the options given do not match any device. BadValue + is returned for a malformed message. + + Notably, BadAlloc is never returned: the server internally signals + to D-BUS that the attempt failed for lack of memory. + + The return does not notify the client of which devices were created + or modified as a result of this request: clients are encouraged to + listen for the XInput DevicePresenceNotify event to monitor changes + in the device list. + + org.x.config.input.remove: + Takes one int32 argument, which is the device ID to remove, i.e.: + i + is the signature. + Same return values as org.x.config.input.add. diff --git a/config/xorg-server.conf b/config/xorg-server.conf new file mode 100644 index 000000000..47a9a7824 --- /dev/null +++ b/config/xorg-server.conf @@ -0,0 +1,13 @@ + + + + + + + + + + + diff --git a/configure.ac b/configure.ac index f4503e7e3..491bdd511 100644 --- a/configure.ac +++ b/configure.ac @@ -25,7 +25,7 @@ dnl Process this file with autoconf to create configure. AC_PREREQ(2.57) dnl This is the not the Xorg version number, it's the server version number. dnl Yes, that's weird. -AC_INIT([xorg-server], 1.1.99.2, [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg], xorg-server) +AC_INIT([xorg-server], 1.2.99.0, [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg], xorg-server) AC_CONFIG_SRCDIR([Makefile.am]) AM_INIT_AUTOMAKE([dist-bzip2 foreign]) AM_MAINTAINER_MODE @@ -50,7 +50,6 @@ AC_CONFIG_HEADERS(include/xwin-config.h) dnl kdrive-config.h covers the kdrive DDX AC_CONFIG_HEADERS(include/kdrive-config.h) - AC_PROG_CC AM_PROG_AS AC_PROG_INSTALL @@ -62,8 +61,29 @@ AC_PROG_MAKE_SET PKG_PROG_PKG_CONFIG AC_PROG_LEX AC_PROG_YACC +AC_SYS_LARGEFILE XORG_PROG_RAWCPP +dnl Check for dtrace program (needed to build Xserver dtrace probes) +AC_ARG_WITH(dtrace, AS_HELP_STRING([--with-dtrace=PATH], + [Enable dtrace probes (default: enabled if dtrace found)]), + [WDTRACE=$withval], [WDTRACE=auto]) +if test "x$WDTRACE" = "xyes" -o "x$WDTRACE" = "xauto" ; then + AC_PATH_PROG(DTRACE, [dtrace], [not_found], [$PATH:/usr/sbin]) + if test "x$DTRACE" = "xnot_found" ; then + if test "x$WDTRACE" = "xyes" ; then + AC_MSG_FAILURE([dtrace requested but not found]) + fi + WDTRACE="no" + fi +fi +if test "x$WDTRACE" != "xno" ; then + AC_DEFINE(XSERVER_DTRACE, 1, + [Define to 1 if the DTrace Xserver provider probes should be built in.]) +fi +AM_CONDITIONAL(XSERVER_DTRACE, [test "x$WDTRACE" != "xno"]) +AC_DEFINE_DIR(XERRORDB_PATH, libdir/XErrorDB, [Path to XErrorDB file]) + AC_HEADER_DIRENT AC_HEADER_STDC AC_CHECK_HEADERS([fcntl.h stdlib.h string.h unistd.h]) @@ -82,7 +102,8 @@ AC_TYPE_PID_T dnl Checks for library functions. AC_FUNC_VPRINTF AC_CHECK_FUNCS([geteuid getuid link memmove memset mkstemp strchr strrchr \ - strtol getopt getopt_long vsnprintf walkcontext backtrace]) + strtol getopt getopt_long vsnprintf walkcontext backtrace \ + getisax]) AC_FUNC_ALLOCA dnl Old HAS_* names used in os/*.c. AC_CHECK_FUNC([getdtablesize], @@ -153,7 +174,7 @@ AC_CACHE_CHECK([for SYSV IPC], [AC_TRY_LINK([ #include ],[ -int main () { +{ int id; id = shmget(IPC_PRIVATE, 512, SHM_W | SHM_R); if (id < 0) return -1; @@ -174,6 +195,7 @@ dnl glibc backtrace support check (hw/xfree86/common/xf86Events.c) AC_CHECK_HEADER([execinfo.h],[ AC_CHECK_LIB(c, backtrace, [ AC_DEFINE(HAVE_BACKTRACE, 1, [Has backtrace support]) + AC_DEFINE(HAVE_EXECINFO_H, 1, [Have execinfo.h]) ])] ) @@ -260,6 +282,7 @@ case $host_os in *netbsd*) AC_DEFINE(CSRG_BASED, 1, [System is BSD-like]) AC_DEFINE(PCCONS_SUPPORT, 1, [System has PC console]) + AC_DEFINE(PCVT_SUPPORT, 1, [System has PCVT console]) AC_DEFINE(WSCONS_SUPPORT, 1, [System has wscons console]) DRI=yes ;; @@ -294,9 +317,9 @@ AC_DEFINE_UNQUOTED(OSNAME, "$OSNAME", DEFAULT_VENDOR_NAME="The X.Org Foundation" DEFAULT_VENDOR_NAME_SHORT="X.Org" DEFAULT_VERSION_MAJOR=7 -DEFAULT_VERSION_MINOR=0 -DEFAULT_VERSION_PATCH=0 -DEFAULT_VERSION_SNAP=0 +DEFAULT_VERSION_MINOR=1 +DEFAULT_VERSION_PATCH=99 +DEFAULT_VERSION_SNAP=2 DEFAULT_RELEASE_DATE="21 December 2005" DEFAULT_VENDOR_WEB="http://wiki.x.org" @@ -368,7 +391,7 @@ AC_ARG_WITH(mesa-source, AS_HELP_STRING([--with-mesa-source=MESA_SOURCE], [P AC_ARG_WITH(fontdir, AS_HELP_STRING([--with-fontdir=FONTDIR], [Path to top level dir where fonts are installed (default: ${libdir}/X11/fonts)]), [ FONTDIR="$withval" ], [ FONTDIR="${libdir}/X11/fonts" ]) -DEFAULT_FONT_PATH="${FONTDIR}/misc/,${FONTDIR}/TTF/,${FONTDIR}/OTF,${FONTDIR}/Type1/,${FONTDIR}/CID/,${FONTDIR}/100dpi/,${FONTDIR}/75dpi/" +DEFAULT_FONT_PATH="${FONTDIR}/misc/,${FONTDIR}/TTF/,${FONTDIR}/OTF,${FONTDIR}/Type1/,${FONTDIR}/100dpi/,${FONTDIR}/75dpi/" AC_ARG_WITH(default-font-path, AS_HELP_STRING([--with-default-font-path=PATH], [Comma separated list of font dirs]), [ FONTPATH="$withval" ], [ FONTPATH="${DEFAULT_FONT_PATH}" ]) @@ -392,6 +415,12 @@ AC_ARG_ENABLE(install-libxf86config, [Install libxf86config (default: disabled)]), [INSTALL_LIBXF86CONFIG=$enableval], [INSTALL_LIBXF86CONFIG=no]) +AC_ARG_ENABLE(builtin-fonts, AS_HELP_STRING([--enable-builtin-fonts], [Use only built-in fonts (default: use external)]), + [BUILTIN_FONTS=$enableval], + [BUILTIN_FONTS=no]) +AC_ARG_ENABLE(null-root-cursor, AS_HELP_STRING([--enable-null-root-cursor], [Use an empty root cursor (default: use core cursor)]), + [NULL_ROOT_CURSOR=$enableval], + [NULL_ROOT_CURSOR=no]) dnl Extensions. AC_ARG_ENABLE(composite, AS_HELP_STRING([--disable-composite], [Build Composite extension (default: enabled)]), [COMPOSITE=$enableval], [COMPOSITE=yes]) @@ -401,7 +430,7 @@ AC_ARG_ENABLE(xtrap, AS_HELP_STRING([--disable-xtrap], [Build XTrap ext AC_ARG_ENABLE(record, AS_HELP_STRING([--disable-record], [Build Record extension (default: enabled)]), [RECORD=$enableval], [RECORD=yes]) AC_ARG_ENABLE(xv, AS_HELP_STRING([--disable-xv], [Build Xv extension (default: enabled)]), [XV=$enableval], [XV=yes]) AC_ARG_ENABLE(xvmc, AS_HELP_STRING([--disable-xvmc], [Build XvMC extension (default: enabled)]), [XVMC=$enableval], [XVMC=yes]) -AC_ARG_ENABLE(dga, AS_HELP_STRING([--disable-dga], [Build DGA extension (default: enabled)]), [DGA=$enableval], [DGA=yes]) +AC_ARG_ENABLE(dga, AS_HELP_STRING([--disable-dga], [Build DGA extension (default: auto)]), [DGA=$enableval], [DGA=auto]) AC_ARG_ENABLE(screensaver, AS_HELP_STRING([--disable-screensaver], [Build ScreenSaver extension (default: enabled)]), [SCREENSAVER=$enableval], [SCREENSAVER=yes]) AC_ARG_ENABLE(xdmcp, AS_HELP_STRING([--disable-xdmcp], [Build XDMCP extension (default: auto)]), [XDMCP=$enableval], [XDMCP=auto]) AC_ARG_ENABLE(xdm-auth-1, AS_HELP_STRING([--disable-xdm-auth-1], [Build XDM-Auth-1 extension (default: auto)]), [XDMAUTH=$enableval], [XDMAUTH=auto]) @@ -410,19 +439,23 @@ AC_ARG_ENABLE(aiglx, AS_HELP_STRING([--enable-aiglx], [Build accelerate AC_ARG_ENABLE(glx-tls, AS_HELP_STRING([--enable-glx-tls], [Build GLX with TLS support (default: disabled)]), [GLX_USE_TLS=$enableval], [GLX_USE_TLS=no]) AC_ARG_ENABLE(dri, AS_HELP_STRING([--enable-dri], [Build DRI extension (default: auto)]), [DRI=$enableval]) AC_ARG_ENABLE(xinerama, AS_HELP_STRING([--disable-xinerama], [Build Xinerama extension (default: enabled)]), [XINERAMA=$enableval], [XINERAMA=yes]) -AC_ARG_ENABLE(xf86vidmode, AS_HELP_STRING([--disable-xf86vidmode], [Build XF86VidMode extension (default: enabled)]), [XF86VIDMODE=$enableval], [XF86VIDMODE=yes]) -AC_ARG_ENABLE(xf86misc, AS_HELP_STRING([--disable-xf86misc], [Build XF86Misc extension (default: enabled)]), [XF86MISC=$enableval], [XF86MISC=yes]) -AC_ARG_ENABLE(xcsecurity, AS_HELP_STRING([--disable-xcsecurity], [Build Security extension (default: enabled)]), [XCSECURITY=$enableval], [XCSECURITY=yes]) +AC_ARG_ENABLE(xf86vidmode, AS_HELP_STRING([--disable-xf86vidmode], [Build XF86VidMode extension (default: auto)]), [XF86VIDMODE=$enableval], [XF86VIDMODE=auto]) +AC_ARG_ENABLE(xf86misc, AS_HELP_STRING([--disable-xf86misc], [Build XF86Misc extension (default: auto)]), [XF86MISC=$enableval], [XF86MISC=auto]) +AC_ARG_ENABLE(xace, AS_HELP_STRING([--disable-xace], [Build X-ACE extension (default: enabled)]), [XACE=$enableval], [XACE=yes]) +AC_ARG_ENABLE(xcsecurity, AS_HELP_STRING([--disable-xcsecurity], [Build Security extension (default: enabled)]), [XCSECURITY=$enableval], [XCSECURITY=$XACE]) +AC_ARG_ENABLE(appgroup, AS_HELP_STRING([--disable-appgroup], [Build XC-APPGROUP extension (default: enabled)]), [APPGROUP=$enableval], [APPGROUP=$XCSECURITY]) +AC_ARG_ENABLE(xcalibrate, AS_HELP_STRING([--enable-xcalibrate], [Build XCalibrate extension (default: disabled)]), [XCALIBRATE=$enableval], [XCALIBRATE=no]) +AC_ARG_ENABLE(tslib, AS_HELP_STRING([--enable-tslib], [Build kdrive tslib touchscreen support (default: disabled)]), [TSLIB=$enableval], [TSLIB=no]) AC_ARG_ENABLE(xevie, AS_HELP_STRING([--disable-xevie], [Build XEvIE extension (default: enabled)]), [XEVIE=$enableval], [XEVIE=yes]) -AC_ARG_ENABLE(appgroup, AS_HELP_STRING([--disable-appgroup], [Build XC-APPGROUP extension (default: enabled)]), [APPGROUP=$enableval], [APPGROUP=yes]) AC_ARG_ENABLE(cup, AS_HELP_STRING([--disable-cup], [Build TOG-CUP extension (default: enabled)]), [CUP=$enableval], [CUP=yes]) AC_ARG_ENABLE(evi, AS_HELP_STRING([--disable-evi], [Build Extended-Visual-Information extension (default: enabled)]), [EVI=$enableval], [EVI=yes]) AC_ARG_ENABLE(multibuffer, AS_HELP_STRING([--enable-multibuffer], [Build Multibuffer extension (default: disabled)]), [MULTIBUFFER=$enableval], [MULTIBUFFER=no]) AC_ARG_ENABLE(fontcache, AS_HELP_STRING([--enable-fontcache], [Build FontCache extension (default: disabled)]), [FONTCACHE=$enableval], [FONTCACHE=no]) AC_ARG_ENABLE(dbe, AS_HELP_STRING([--disable-dbe], [Build DBE extension (default: enabled)]), [DBE=$enableval], [DBE=yes]) AC_ARG_ENABLE(xf86bigfont, AS_HELP_STRING([--disable-xf86bigfont], [Build XF86 Big Font extension (default: enabled)]), [XF86BIGFONT=$enableval], [XF86BIGFONT=yes]) -AC_ARG_ENABLE(dpms, AS_HELP_STRING([--disable-dpms], [Build DPMS extension (default: enabled)]), [DPMS=$enableval], [DPMSExtension=yes]) -AC_ARG_ENABLE(xinput, AS_HELP_STRING([--disable-xinput], [Build XInput Extension (default: enabled)]), [XINPUT=$enableval], [XINPUT=yes]) +AC_ARG_ENABLE(dpms, AS_HELP_STRING([--disable-dpms], [Build DPMS extension (default: enabled)]), [DPMSExtension=$enableval], [DPMSExtension=yes]) +AC_ARG_ENABLE(dbus, AS_HELP_STRING([--disable-dbus], [Build D-BUS support (default: auto)]), [DBUS=$enableval], [DBUS=auto]) +AC_ARG_ENABLE(xfree86-utils, AS_HELP_STRING([--enable-xfree86-utils], [Build xfree86 DDX utilities (default: enabled)]), [XF86UTILS=$enableval], [XF86UTILS=yes]) dnl DDXes. AC_ARG_ENABLE(xorg, AS_HELP_STRING([--enable-xorg], [Build Xorg server (default: auto)]), [XORG=$enableval], [XORG=auto]) @@ -430,7 +463,7 @@ AC_ARG_ENABLE(dmx, AS_HELP_STRING([--enable-dmx], [Build DMX server (d AC_ARG_ENABLE(xvfb, AS_HELP_STRING([--enable-xvfb], [Build Xvfb server (default: yes)]), [XVFB=$enableval], [XVFB=yes]) AC_ARG_ENABLE(xnest, AS_HELP_STRING([--enable-xnest], [Build Xnest server (default: auto)]), [XNEST=$enableval], [XNEST=auto]) AC_ARG_ENABLE(xwin, AS_HELP_STRING([--enable-xwin], [Build XWin server (default: auto)]), [XWIN=$enableval], [XWIN=auto]) -AC_ARG_ENABLE(xprint, AS_HELP_STRING([--enable-xprint], [Build Xprint extension and server (default: auto)]), [XPRINT=$enableval], [XPRINT=auto]) +AC_ARG_ENABLE(xprint, AS_HELP_STRING([--enable-xprint], [Build Xprint extension and server (default: no)]), [XPRINT=$enableval], [XPRINT=no]) AC_ARG_ENABLE(xgl, AS_HELP_STRING([--enable-xgl], [Build Xgl server (default: no)]), [XGL=$enableval], [XGL=no]) AC_ARG_ENABLE(xglx, AS_HELP_STRING([--enable-xglx], [Build Xglx xgl module (default: no)]), [XGLX=$enableval], [XGLX=no]) AC_ARG_ENABLE(xegl, AS_HELP_STRING([--enable-xegl], [Build Xegl xgl module (default: no)]), [XEGL=$enableval], [XEGL=no]) @@ -438,6 +471,9 @@ dnl kdrive and its subsystems AC_ARG_ENABLE(kdrive, AS_HELP_STRING([--enable-kdrive], [Build kdrive servers (default: no)]), [KDRIVE=$enableval], [KDRIVE=no]) AC_ARG_ENABLE(xephyr, AS_HELP_STRING([--enable-xephyr], [Build the kdrive Xephyr server (default: auto)]), [XEPHYR=$enableval], [XEPHYR=auto]) AC_ARG_ENABLE(xsdl, AS_HELP_STRING([--enable-xsdl], [Build the kdrive Xsdl server (default: auto)]), [XSDL=$enableval], [XSDL=auto]) +AC_ARG_ENABLE(xfake, AS_HELP_STRING([--enable-xfake], [Build the kdrive 'fake' server (default: auto)]), [XFAKE=$enableval], [XFAKE=auto]) +AC_ARG_ENABLE(xfbdev, AS_HELP_STRING([--enable-xfbdev], [Build the kdrive framebuffer device server (default: auto)]), [XFBDEV=$enableval], [XFBDEV=auto]) +AC_ARG_ENABLE(kdrive-vesa, AS_HELP_STRING([--enable-kdrive-vesa], [Build the kdrive VESA-based servers (default: auto)]), [KDRIVEVESA=$enableval], [KDRIVEVESA=auto]) dnl xprint AC_ARG_ENABLE(freetype, AS_HELP_STRING([ --enable-freetype], [Build Xprint FreeType backend (default: yes)]), [XP_USE_FREETYPE=$enableval],[XP_USE_FREETYPE=no]) AC_ARG_WITH(freetype-config, AS_HELP_STRING([ --with-freetype-config=PROG], [Use FreeType configuration program PROG (default: auto)]), freetype_config=$withval, freetype_config=auto) @@ -469,7 +505,7 @@ AC_MSG_RESULT([$SETUID]) AM_CONDITIONAL(INSTALL_SETUID, [test "x$SETUID" = "xyes"]) dnl Issue an error if xtrans.m4 was not found and XTRANS_CONNECTION_FLAGS macro -dnl was not expanded, since libX11 with no transport types is rather useless. +dnl was not expanded, since xorg-server with no transport types is rather useless. dnl dnl If you're seeing an error here, be sure you installed the lib/xtrans module dnl first and if it's not in the default location, that you set the ACLOCAL @@ -509,9 +545,21 @@ XEXT_LIB='$(top_builddir)/Xext/libXext.la' XEXTXORG_LIB='$(top_builddir)/Xext/libXextbuiltin.la' dnl Core modules for most extensions, et al. -REQUIRED_MODULES="randrproto renderproto [fixesproto >= 4.0] damageproto xcmiscproto xextproto xproto xtrans xf86miscproto xf86vidmodeproto xf86bigfontproto [scrnsaverproto >= 1.1] bigreqsproto resourceproto fontsproto inputproto xf86dgaproto" +REQUIRED_MODULES="[randrproto >= 1.2] renderproto [fixesproto >= 4.0] damageproto xcmiscproto xextproto xproto xtrans [scrnsaverproto >= 1.1] bigreqsproto resourceproto fontsproto [inputproto >= 1.4] [kbproto >= 1.0.3]" REQUIRED_LIBS="xfont xau fontenc" +if test "x$DBUS" = xauto; then + PKG_CHECK_MODULES(DBUS, dbus-1, [DBUS=yes], [DBUS=no]) +fi +if test "x$DBUS" = xyes; then + PKG_CHECK_MODULES(DBUS, dbus-1) + AC_DEFINE(HAVE_DBUS, 1, [Have D-BUS support]) + REQUIRED_MODULES="$REQUIRED_MODULES dbus-1" + REQUIRED_LIBS="$REQUIRED_LIBS dbus-1" +fi +CONFIG_LIB='$(top_builddir)/config/libconfig.a' +AM_CONDITIONAL(DBUS, [test "x$DBUS" = xyes]) + AM_CONDITIONAL(XV, [test "x$XV" = xyes]) if test "x$XV" = xyes; then AC_DEFINE(XV, 1, [Support Xv extension]) @@ -526,10 +574,6 @@ if test "x$XVMC" = xyes; then AC_DEFINE(XvMCExtension, 1, [Build XvMC extension]) fi -AM_CONDITIONAL(DGA, [test "x$DGA" = xyes]) -if test "x$DGA" = xyes; then - AC_DEFINE(DGA, 1, [Support DGA extension]) -fi AM_CONDITIONAL(COMPOSITE, [test "x$COMPOSITE" = xyes]) if test "x$COMPOSITE" = xyes; then @@ -572,12 +616,17 @@ fi if test "x$GLX" = xyes && ! test "x$MESA_SOURCE" = x; then PKG_CHECK_MODULES([XLIB], [x11]) - PKG_CHECK_MODULES([GL], [glproto >= 1.4.6]) + PKG_CHECK_MODULES([GL], [glproto >= 1.4.7]) AC_SUBST(XLIB_CFLAGS) AC_DEFINE(GLXEXT, 1, [Build GLX extension]) GLX_LIBS='$(top_builddir)/GL/glx/libglx.la $(top_builddir)/GL/mesa/libGLcore.la' test -d GL || mkdir GL - $srcdir/GL/symlink-mesa.sh $MESA_SOURCE GL/ + case $host_os in + solaris*) + SYMLINK_MESA="/usr/bin/bash $srcdir/GL/symlink-mesa.sh" ;; + *) SYMLINK_MESA=$srcdir/GL/symlink-mesa.sh ;; + esac + $SYMLINK_MESA $MESA_SOURCE GL/ if test $? -ne 0; then AC_MSG_ERROR([Failed to link Mesa source tree. Please specify a proper path to Mesa sources, or disable GLX.]) fi @@ -604,10 +653,14 @@ AM_CONDITIONAL(DRI, test "x$DRI" = xyes) if test "x$DRI" = xyes; then AC_DEFINE(XF86DRI, 1, [Build DRI extension]) PKG_CHECK_MODULES([DRIPROTO], [xf86driproto]) - PKG_CHECK_MODULES([LIBDRM], [libdrm]) + PKG_CHECK_MODULES([LIBDRM], [libdrm >= 2.3.0]) PKG_CHECK_MODULES([GL], [glproto >= 1.4.1]) + PKG_CHECK_EXISTS(libdrm >= 2.2.0, + [AC_DEFINE([HAVE_LIBDRM_2_2], 1, + [Has version 2.2 (or newer) of the drm library])]) AC_SUBST(DRIPROTO_CFLAGS) AC_SUBST(LIBDRM_CFLAGS) + AC_SUBST(LIBDRM_LIBS) AC_SUBST(GL_CFLAGS) fi @@ -618,8 +671,16 @@ if test "x$XINERAMA" = xyes; then REQUIRED_MODULES="$REQUIRED_MODULES xineramaproto" fi +AM_CONDITIONAL(XACE, [test "x$XACE" = xyes]) +if test "x$XACE" = xyes; then + AC_DEFINE(XACE, 1, [Build X-ACE extension]) +fi + AM_CONDITIONAL(XCSECURITY, [test "x$XCSECURITY" = xyes]) if test "x$XCSECURITY" = xyes; then + if test "x$XACE" != xyes; then + AC_MSG_ERROR([cannot build Security extension without X-ACE]) + fi AC_DEFINE(XCSECURITY, 1, [Build Security extension]) fi @@ -629,12 +690,11 @@ if test "x$XEVIE" = xyes; then REQUIRED_MODULES="$REQUIRED_MODULES evieproto" fi -if test "x$APPGROUP" = xyes && test "x$XCSECURITY" != xyes; then - AC_MSG_NOTICE([Disabling APPGROUP extension]) - APPGROUP=no -fi AM_CONDITIONAL(APPGROUP, [test "x$APPGROUP" = xyes]) if test "x$APPGROUP" = xyes; then + if test "x$XACE" != xyes || test "x$XCSECURITY" != xyes; then + AC_MSG_ERROR([cannot build APPGROUP extension without X-ACE and XC-SECURITY]) + fi AC_DEFINE(XAPPGROUP, 1, [Build APPGROUP extension]) fi @@ -678,14 +738,6 @@ if test "x$DPMSExtension" = xyes; then AC_DEFINE(DPMSExtension, 1, [Support DPMS extension]) fi -if test "x$XF86VIDMODE" = xyes; then - AC_DEFINE(XF86VIDMODE, 1, [Support XFree86 Video Mode extension]) -fi - -if test "x$XF86MISC" = xyes; then - AC_DEFINE(XF86MISC, 1, [Support XFree86 miscellaneous extensions]) -fi - if test "x$XPRINT" = xauto; then PKG_CHECK_MODULES([XPRINTPROTO], [printproto], [XPRINT=yes], [XPRINT=no]) fi @@ -695,6 +747,19 @@ if test "x$XPRINT" = xyes; then REQUIRED_MODULES="$REQUIRED_MODULES printproto" fi +if test "x$BUILTIN_FONTS" = xyes; then + AC_DEFINE(BUILTIN_FONTS, 1, [Use only built-in fonts]) + AC_DEFINE(NOFONTSERVERACCESS, 1, [Avoid using a font server]) +fi + +if test "x$XCALIBRATE" = xyes && test "$KDRIVE" = yes; then + AC_DEFINE(XCALIBRATE, 1, [Build XCalibrate extension]) + REQUIRED_MODULES="$REQUIRED_MODULES xcalibrateproto" +else + XCALIBRATE=no +fi +AM_CONDITIONAL(XCALIBRATE, [test "x$XCALIBRATE" = xyes]) + AC_DEFINE(RENDER, 1, [Support RENDER extension]) RENDER_LIB='$(top_builddir)/render/librender.la' RENDER_INC='-I$(top_srcdir)/render' @@ -717,12 +782,11 @@ if test "$COMPOSITE" = yes; then fi MIEXT_DAMAGE_INC='-I$(top_srcdir)/miext/damage' -AM_CONDITIONAL(XINPUT, [test "x$XINPUT" = xyes]) -if test "x$XINPUT" = xyes; then - AC_DEFINE(XINPUT, 1, [Support X Input extension]) - XI_LIB='$(top_builddir)/Xi/libXi.la' - XI_INC='-I$(top_srcdir)/Xi' -fi +AC_DEFINE(XINPUT, 1, [Support X Input extension]) +XI_LIB='$(top_builddir)/Xi/libXi.la' +XI_INC='-I$(top_srcdir)/Xi' + +AM_CONDITIONAL(XF86UTILS, test "x$XF86UTILS" = xyes) AC_DEFINE(SHAPE, 1, [Support SHAPE extension]) @@ -736,6 +800,10 @@ XKB_STUB_LIB='$(top_builddir)/xkb/libxkbstubs.la' AC_CHECK_FUNC(strcasecmp, [], AC_DEFINE([NEED_STRCASECMP], 1, [Do not have `strcasecmp'.])) +if test "x$NULL_ROOT_CURSOR" = xyes; then + AC_DEFINE(NULL_ROOT_CURSOR, 1, [Use an empty root cursor]) +fi + PKG_CHECK_MODULES([XDMCP], [xdmcp], [have_libxdmcp="yes"], [have_libxdmcp="no"]) if test "x$have_libxdmcp" = xyes; then AC_CHECK_LIB(Xdmcp, XdmcpWrap, [have_xdmcpwrap="yes"], [have_xdmcpwrap="no"], [$XDMCP_LIBS]) @@ -793,6 +861,7 @@ VENDOR_MAN_VERSION="Version ${VENDOR_VERSION_STRING}" AC_DEFINE_DIR(COMPILEDDEFAULTFONTPATH, FONTPATH, [Default font path]) AC_DEFINE_DIR(RGB_DB, RGBPATH, [Default RGB path]) +AC_DEFINE_DIR(BASE_FONT_PATH, FONTDIR, [Default base font path]) AC_DEFINE_DIR(DRI_DRIVER_PATH, DRI_DRIVER_PATH, [Default DRI driver path]) AC_DEFINE_UNQUOTED(XVENDORNAME, ["$VENDOR_STRING"], [Vendor name]) AC_DEFINE_UNQUOTED(XVENDORNAMESHORT, ["$VENDOR_STRING_SHORT"], [Short vendor name]) @@ -811,11 +880,13 @@ AC_DEFINE(DDXOSINIT, 1, [Use OsVendorInit]) AC_DEFINE(SERVER_LOCK, 1, [Use a lock to prevent multiple servers on a display]) AC_DEFINE(SMART_SCHEDULE, 1, [Include time-based scheduler]) AC_DEFINE(NO_LIBCWRAPPER, 1, [Define to 1 if modules should avoid the libcwrapper]) -AM_CONDITIONAL(DEBUG, test "x$DEBUGGING" = xyes) -if ! test "x$DEBUGGING" = xyes; then - AC_DEFINE(NDEBUG, 1, [Disable some debugging code]) +if test "x$DEBUGGING" = xyes; then + AC_DEFINE(DEBUG, 1, [Enable debugging code]) +else + AC_DEFINE(NDEBUG, 1, [Disable some debugging code]) fi +AM_CONDITIONAL(DEBUG, [test "x$DEBUGGING" = xyes]) AC_DEFINE(USE_RGB_TXT, 1, [Use rgb.txt directly]) AC_DEFINE(MITMISC, 1, [Support MIT Misc extension]) @@ -825,8 +896,13 @@ AC_DEFINE(XCMISC, 1, [Support XCMisc extension]) AC_DEFINE(BIGREQS, 1, [Support BigRequests extension]) AC_DEFINE(PIXPRIV, 1, [Support pixmap privates]) -DIX_LIB='$(top_builddir)/dix/libdix.la' -OS_LIB='$(top_builddir)/os/libos.la' +if test "x$WDTRACE" != "xno" ; then + DIX_LIB='$(top_builddir)/dix/dix.O' + OS_LIB='$(top_builddir)/os/os.O' +else + DIX_LIB='$(top_builddir)/dix/libdix.la' + OS_LIB='$(top_builddir)/os/libos.la' +fi CWRAP_LIB='$(top_builddir)/os/libcwrapper.la' MI_LIB='$(top_builddir)/mi/libmi.la' MINIMI_LIB='$(top_builddir)/mi/libminimi.la' @@ -843,10 +919,71 @@ PKG_CHECK_MODULES([XSERVERCFLAGS], [$REQUIRED_MODULES $REQUIRED_LIBS]) PKG_CHECK_MODULES([XSERVERLIBS], [$REQUIRED_LIBS]) XSERVER_CFLAGS="${XSERVERCFLAGS_CFLAGS}" -XSERVER_LIBS="${XSERVERLIBS_LIBS} ${SYS_LIBS} -lm -lz" -AC_SUBST([XSERVER_LIBS]) +XSERVER_LIBS="${XSERVERLIBS_LIBS} ${SYS_LIBS} ${LIBS}" AC_SUBST([SYS_LIBS]) +# The Xorg binary needs to export symbols so that they can be used from modules +# Some platforms require extra flags to do this. gcc should set these flags +# when -rdynamic is passed to it, other compilers/linkers may need to be added +# here. +if test "x$GCC" = "xyes"; then + GCC_WARNINGS1="-Wall -Wpointer-arith -Wstrict-prototypes" + GCC_WARNINGS2="-Wmissing-prototypes -Wmissing-declarations" + GCC_WARNINGS3="-Wnested-externs -fno-strict-aliasing" + GCC_WARNINGS="$GCC_WARNINGS1 $GCC_WARNINGS2 $GCC_WARNINGS3" + if test "x$WERROR" = "xyes"; then + GCC_WARNINGS="${GCC_WARNINGS} -Werror" + fi + XSERVER_CFLAGS="$GCC_WARNINGS $XSERVER_CFLAGS" + + LD_EXPORT_SYMBOLS_FLAG="-rdynamic" +fi +case $host_os in + openbsd*) + LD_EXPORT_SYMBOLS_FLAG="-Wl,--export-dynamic" + ;; +esac +AC_SUBST([LD_EXPORT_SYMBOLS_FLAG]) + +AC_CHECK_FUNCS([clock_gettime], [have_clock_gettime=yes], + [AC_CHECK_LIB([rt], [clock_gettime], [have_clock_gettime=-lrt], + [have_clock_gettime=no])]) + +AC_MSG_CHECKING([for a useful monotonic clock ...]) + +if ! test "x$have_clock_gettime" = xno; then + if ! test "x$have_clock_gettime" = xyes; then + CLOCK_LIBS="$have_clock_gettime" + else + CLOCK_LIBS="" + fi + + AC_RUN_IFELSE([ +#define _POSIX_C_SOURCE 199309L +#include + +int main(int argc, char *argv[]) { + struct timespec tp; + + if (clock_gettime(CLOCK_MONOTONIC, &tp) == 0) + return 0; + else + return 1; +} + ], [MONOTONIC_CLOCK=yes], [MONOTONIC_CLOCK=no], + [MONOTONIC_CLOCK="cross compiling"]) +else + MONOTONIC_CLOCK=no +fi + +AC_MSG_RESULT([$MONOTONIC_CLOCK]) + +if test "x$MONOTONIC_CLOCK" = xyes; then + AC_DEFINE(MONOTONIC_CLOCK, 1, [Have monotonic clock from clock_gettime()]) + XSERVER_LIBS="$XSERVER_LIBS $CLOCK_LIBS" + LIBS="$LIBS $CLOCK_LIBS" +fi + dnl Imake defines SVR4 on SVR4 systems, and many files check for it, so dnl we need to replicate that here until those can all be fixed AC_MSG_CHECKING([if SVR4 needs to be defined]) @@ -861,19 +998,16 @@ AC_MSG_RESULT([yes])], AC_MSG_RESULT([no])) XSERVER_CFLAGS="$XSERVER_CFLAGS $CORE_INCS $XEXT_INC $COMPOSITE_INC $DAMAGE_INC $FIXES_INC $XI_INC $MI_INC $MIEXT_SHADOW_INC $MIEXT_LAYER_INC $MIEXT_DAMAGE_INC $RENDER_INC $RANDR_INC $FB_INC" AC_DEFINE_UNQUOTED(X_BYTE_ORDER,[$ENDIAN],[Endian order]) +AC_SUBST([XSERVER_LIBS]) + dnl --------------------------------------------------------------------------- dnl DDX section. dnl --------------------------------------------------------------------------- -dnl These are used to define Xorg module, loader and general server defines -MODULE_DEFINES="" -LOADER_DEFINES="" -SERVER_DEFINES="" - dnl DMX DDX AC_MSG_CHECKING([whether to build Xdmx DDX]) -PKG_CHECK_MODULES([DMXMODULES], [xmuu xext x11 xrender xfont xi dmxproto xau $XDMCP_MODULES], [have_dmx=yes], [have_dmx=no]) +PKG_CHECK_MODULES([DMXMODULES], [xmuu xext x11 xrender xfixes xfont xi dmxproto xau $XDMCP_MODULES], [have_dmx=yes], [have_dmx=no]) if test "x$DMX" = xauto; then DMX="$have_dmx" fi @@ -925,7 +1059,7 @@ AC_MSG_RESULT([$XVFB]) AM_CONDITIONAL(XVFB, [test "x$XVFB" = xyes]) if test "x$XVFB" = xyes; then - XVFB_LIBS="$FB_LIB $MI_LIB $FIXES_LIB $XEXT_LIB $DBE_LIB $XTRAP_LIB $RECORD_LIB $GLX_LIBS $RENDER_LIB $RANDR_LIB $DAMAGE_LIB $MIEXT_DAMAGE_LIB $MIEXT_SHADOW_LIB $XI_LIB $XKB_LIB $XKB_STUB_LIB $COMPOSITE_LIB $XPSTUBS_LIB $CWRAP_LIB $OS_LIB" + XVFB_LIBS="$FB_LIB $MI_LIB $FIXES_LIB $XEXT_LIB $CONFIG_LIB $DBE_LIB $XTRAP_LIB $RECORD_LIB $GLX_LIBS $RENDER_LIB $RANDR_LIB $DAMAGE_LIB $MIEXT_DAMAGE_LIB $MIEXT_SHADOW_LIB $XI_LIB $XKB_LIB $XKB_STUB_LIB $COMPOSITE_LIB $XPSTUBS_LIB $CWRAP_LIB $OS_LIB $LIBS" AC_SUBST([XVFB_LIBS]) fi @@ -941,7 +1075,7 @@ AC_MSG_RESULT([$XNEST]) AM_CONDITIONAL(XNEST, [test "x$XNEST" = xyes]) if test "x$XNEST" = xyes; then - XNEST_LIBS="$FB_LIB $MI_LIB $FIXES_LIB $XEXT_LIB $DBE_LIB $XTRAP_LIB $RECORD_LIB $GLX_LIBS $RENDER_LIB $RANDR_LIB $DAMAGE_LIB $MIEXT_DAMAGE_LIB $MIEXT_SHADOW_LIB $XI_LIB $XKB_LIB $XKB_STUB_LIB $COMPOSITE_LIB $XPSTUBS_LIB $CWRAP_LIB $OS_LIB" + XNEST_LIBS="$XSERVER_LIBS $FB_LIB $MI_LIB $FIXES_LIB $XEXT_LIB $CONFIG_LIB $DBE_LIB $XTRAP_LIB $RECORD_LIB $GLX_LIBS $RENDER_LIB $RANDR_LIB $DAMAGE_LIB $MIEXT_DAMAGE_LIB $MIEXT_SHADOW_LIB $XI_LIB $XKB_LIB $XKB_STUB_LIB $COMPOSITE_LIB $XPSTUBS_LIB $CWRAP_LIB $OS_LIB $LIBS" AC_SUBST([XNEST_LIBS]) fi @@ -1012,7 +1146,7 @@ if test "x$XGLX" = xyes; then fi # XORG_CORE_LIBS is needed even if you're not building the Xorg DDX -XORG_CORE_LIBS="$DIX_LIB" +XORG_CORE_LIBS="$DIX_LIB $CONFIG_LIB" AC_SUBST([XORG_CORE_LIBS]) xorg_bus_linuxpci=no @@ -1028,9 +1162,43 @@ if test "x$XORG" = xyes -o "x$XGL" = xyes; then XORG_OSINCS='-I$(top_srcdir)/hw/xfree86/os-support -I$(top_srcdir)/hw/xfree86/os-support/bus -I$(top_srcdir)/os' XORG_INCS="$XORG_DDXINCS $XORG_OSINCS" XORG_CFLAGS="$XORGSERVER_CFLAGS -DHAVE_XORG_CONFIG_H" - XORG_LIBS="$MI_LIB $FIXES_LIB $XEXTXORG_LIB $GLX_LIBS $RENDER_LIB $RANDR_LIB $DAMAGE_LIB $MIEXT_DAMAGE_LIB $MIEXT_SHADOW_LIB $XI_LIB $XKB_LIB $COMPOSITE_LIB $XPSTUBS_LIB $OS_LIB" + XORG_LIBS="$COMPOSITE_LIB $MI_LIB $FIXES_LIB $XEXTXORG_LIB $GLX_LIBS $RENDER_LIB $RANDR_LIB $DAMAGE_LIB $MIEXT_DAMAGE_LIB $MIEXT_SHADOW_LIB $XI_LIB $XKB_LIB $XPSTUBS_LIB $OS_LIB" - AC_CHECK_LIB([dl], [dlopen], XORG_LIBS="$XORG_LIBS -ldl") + if test "x$DGA" = xauto; then + PKG_CHECK_MODULES(DGA, xf86dgaproto, [DGA=yes], [DGA=no]) + fi + if test "x$DGA" = xyes; then + XORG_MODULES="$XORG_MODULES xf86dgaproto" + AC_DEFINE(DGA, 1, [Support DGA extension]) + AC_DEFINE(XFreeXDGA, 1, [Build XDGA support]) + fi + + if test "x$XF86MISC" = xauto; then + PKG_CHECK_MODULES(XF86MISC, xf86miscproto, [XF86MISC=yes], [XF86MISC=no]) + fi + if test "x$XF86MISC" = xyes; then + XORG_MODULES="$XORG_MODULES xf86miscproto" + AC_DEFINE(XF86MISC, 1, [Support XFree86 miscellaneous extensions]) + fi + + if test "x$XF86VIDMODE" = xauto; then + PKG_CHECK_MODULES(XF86VIDMODE, xf86vidmodeproto, [XF86VIDMODE=yes], [XF86VIDMODE=no]) + fi + if test "x$XF86VIDMODE" = xyes; then + XORG_MODULES="$XORG_MODULES xf86vidmodeproto" + AC_DEFINE(XF86VIDMODE, 1, [Support XFree86 Video Mode extension]) + fi + + if test -n "$XORG_MODULES"; then + PKG_CHECK_MODULES(XORG_MODULES, [$XORG_MODULES]) + XORG_CFLAGS="$XORG_CFLAGS $XORG_MODULES_CFLAGS" + XORG_LIBS="$XORG_LIBS $XORG_MODULES_LIBS" + fi + +dnl Check to see if dlopen is in default libraries (like Solaris, which +dnl has it in libc), or if libdl is needed to get it. + AC_CHECK_FUNC([dlopen], [], + AC_CHECK_LIB([dl], [dlopen], XORG_LIBS="$XORG_LIBS -ldl")) case $host_os in linux*) @@ -1039,7 +1207,6 @@ if test "x$XORG" = xyes -o "x$XGL" = xyes; then fi XORG_OS="linux" XORG_OS_SUBDIR="linux" - XORG_OS_KBD="Lnx" xorg_bus_linuxpci="yes" linux_acpi="no" case $host_cpu in @@ -1062,7 +1229,6 @@ if test "x$XORG" = xyes -o "x$XGL" = xyes; then freebsd* | kfreebsd*-gnu) XORG_OS="freebsd" XORG_OS_SUBDIR="bsd" - XORG_OS_KBD="BSD" case $host_cpu in i*86) ;; @@ -1074,7 +1240,6 @@ if test "x$XORG" = xyes -o "x$XGL" = xyes; then netbsd*) XORG_OS="netbsd" XORG_OS_SUBDIR="bsd" - XORG_OS_KBD="BSD" case $host_cpu in i*86|amd64*|x86_64*|ia64*) ;; @@ -1086,7 +1251,6 @@ if test "x$XORG" = xyes -o "x$XGL" = xyes; then openbsd*) XORG_OS="openbsd" XORG_OS_SUBDIR="bsd" - XORG_OS_KBD="BSD" case $host_cpu in i*86|amd64*|x86_64*|ia64*) ;; @@ -1144,6 +1308,10 @@ if test "x$XORG" = xyes -o "x$XGL" = xyes; then fi AC_SUBST([SOLARIS_ASM_CFLAGS]) ;; + gnu*) + XORG_OS="gnu" + XORG_OS_SUBDIR="hurd" + ;; *) XORG_OS="unknown" XORG_OS_SUBDIR="unknown" @@ -1189,7 +1357,6 @@ if test "x$XORG" = xyes -o "x$XGL" = xyes; then AC_SUBST([XORG_INCS]) AC_SUBST([XORG_OS]) AC_SUBST([XORG_OS_SUBDIR]) - AC_SUBST([XORG_OS_KBD]) dnl only used in hw/xfree86/scanpci, TTBOMK AC_PATH_PROG(PERL, perl, no) @@ -1199,33 +1366,7 @@ if test "x$XORG" = xyes -o "x$XGL" = xyes; then fi AC_SUBST(PERL) - # The Xorg binary needs to export symbols so that they can be used from modules - # Some platforms require extra flags to do this. gcc should set these flags - # when -rdynamic is passed to it, other compilers/linkers may need to be added - # here. - if test "x$GCC" = "xyes"; then - GCC_WARNINGS1="-Wall -Wpointer-arith -Wstrict-prototypes" - GCC_WARNINGS2="-Wmissing-prototypes -Wmissing-declarations" - GCC_WARNINGS3="-Wnested-externs -fno-strict-aliasing" - GCC_WARNINGS="$GCC_WARNINGS1 $GCC_WARNINGS2 $GCC_WARNINGS3" - if test "x$WERROR" = "xyes"; then - GCC_WARNINGS="${GCC_WARNINGS} -Werror" - fi - XSERVER_CFLAGS="$GCC_WARNINGS $XSERVER_CFLAGS" - LD_EXPORT_SYMBOLS_FLAG="-rdynamic" - fi - case $host_os in - openbsd*) - LD_EXPORT_SYMBOLS_FLAG="-Wl,--export-dynamic" - ;; - esac AC_SUBST([XORG_CFLAGS]) - AC_SUBST([LD_EXPORT_SYMBOLS_FLAG]) - - dnl Module defines are used in the Xorg server and the drivers - MODULE_DEFINES="$MODULE_DEFINES -DIN_MODULE -DXFree86Module" - LOADER_DEFINES="$LOADER_DEFINES -DXFree86LOADER" - SERVER_DEFINES="$SERVER_DEFINES -DXFree86Server" dnl these only go in xorg-config.h XF86CONFIGFILE="xorg.conf" @@ -1234,6 +1375,7 @@ if test "x$XORG" = xyes -o "x$XGL" = xyes; then AC_DEFINE(XORG_SERVER, 1, [Building Xorg server]) AC_DEFINE(XORGSERVER, 1, [Building Xorg server]) AC_DEFINE(XFree86Server, 1, [Building XFree86 server]) + AC_DEFINE(XFree86LOADER, 1, [Building loadable XFree86 server]) AC_DEFINE_UNQUOTED(XORG_VERSION_CURRENT, [$VENDOR_RELEASE], [Current Xorg version]) AC_DEFINE(NEED_XF86_TYPES, 1, [Need XFree86 typedefs]) AC_DEFINE(NEED_XF86_PROTOTYPES, 1, [Need XFree86 helper functions]) @@ -1244,6 +1386,7 @@ if test "x$XORG" = xyes -o "x$XGL" = xyes; then AC_DEFINE_DIR(__XCONFIGFILE__, XF86CONFIGFILE, [Name of configuration file]) AC_DEFINE_DIR(XF86CONFIGFILE, XF86CONFIGFILE, [Name of configuration file]) AC_DEFINE_DIR(DEFAULT_MODULE_PATH, moduledir, [Default module search path]) + AC_DEFINE_DIR(DEFAULT_LIBRARY_PATH, libdir, [Default library install path]) AC_DEFINE_DIR(DEFAULT_LOGPREFIX, LOGPREFIX, [Default log location]) AC_DEFINE_UNQUOTED(__VENDORDWEBSUPPORT__, ["$VENDOR_WEB"], [Vendor web address for support]) @@ -1273,6 +1416,7 @@ AM_CONDITIONAL([SOLARIS_ASM_INLINE], [test "x$solaris_asm_inline" = xyes]) AM_CONDITIONAL(MFB, [test "x$XORG" = xyes]) AM_CONDITIONAL(CFB, [test "x$XORG" = xyes]) AM_CONDITIONAL(AFB, [test "x$XORG" = xyes]) +AM_CONDITIONAL(DGA, [test "x$DGA" = xyes]) dnl Xprint DDX @@ -1282,7 +1426,7 @@ AC_MSG_RESULT([$XPRINT]) if test "x$XPRINT" = xyes; then PKG_CHECK_MODULES([XPRINT], [printproto x11 xfont $XDMCP_MODULES xau]) XPRINT_EXTENSIONS="$XEXT_LIB $DBE_LIB $XTRAP_LIB $RECORD_LIB $RENDER_LIB $COMPOSITE_LIB $RANDR_LIB $XI_LIB $FIXES_LIB $DAMAGE_LIB $XI_LIB $GLX_LIBS" - XPRINT_LIBS="$XPRINT_LIBS $DIX_LIB $XKB_LIB $XKB_STUB_LIB $XPRINT_EXTENSIONS $MI_LIB $MIEXT_DAMAGE_LIB $CWRAP_LIB $OS_LIB" + XPRINT_LIBS="$XPRINT_LIBS $DIX_LIB $CONFIG_LIB $XKB_LIB $XKB_STUB_LIB $XPRINT_EXTENSIONS $MI_LIB $MIEXT_DAMAGE_LIB $CWRAP_LIB $OS_LIB $LIBS" AC_SUBST([XPRINT_CFLAGS]) AC_SUBST([XPRINT_LIBS]) @@ -1398,7 +1542,6 @@ AM_CONDITIONAL(XWIN_XV, [test "x$XWIN" = xyes && test "x$XV" = xyes]) dnl kdrive DDX -dnl utterly incomplete yet XEYPHR_LIBS= XEPHYR_INCS= @@ -1412,16 +1555,67 @@ if test "$KDRIVE" = yes; then AC_DEFINE(KDRIVEDDXACTIONS,,[Build kdrive ddx]) AC_CHECK_HEADERS([sys/vm86.h sys/io.h]) - if test "$ac_cv_header_sys_vm86_h" = yes; then + if test "$ac_cv_header_sys_vm86_h" = yes && test "x$KDRIVEVESA" = xauto; then + KDRIVEVESA=yes + fi + + if test "x$KDRIVEVESA" = xyes; then + KDRIVEFBDEVLIB=yes AC_DEFINE(KDRIVEVESA, 1, [Build VESA-based kdrive servers]) fi AC_CHECK_HEADERS([linux/fb.h]) - if test "$ac_cv_header_linux_fb_h" = yes; then + if test "$ac_cv_header_linux_fb_h" = yes && test "x$XFBDEV" = xauto; then + XFBDEV=yes + fi + + if test "x$XFBDEV" = xyes; then + KDRIVEFBDEVLIB=yes AC_DEFINE(KDRIVEFBDEV, 1, [Build fbdev-based kdrive server]) fi # tslib... + AC_CHECK_LIB(ts, ts_open, [HAVE_TSLIB="yes"]) + if test "x$TSLIB" = xauto && test "x$HAVE_TSLIB" = xyes; then + TSLIB=yes + fi + + if test "x$TSLIB" = xyes; then + if ! test "x$HAVE_TSLIB" = xyes; then + AC_MSG_ERROR([tslib must be installed to build the tslib input driver.]) + fi + TSLIB_LIBS="-lts" + AC_DEFINE(TSLIB, 1, [Have tslib support]) + fi + + AC_CHECK_HEADERS([SDL/SDL.h]) + if test x"$ac_cv_header_SDL_SDL_h" = xyes && test "x$XSDL" = xauto; then + XSDL=yes + fi + + if test x"$XSDL" = xyes; then + # PKG_CHECK_MODULES(XSDL_EXTRA, Xfont xau $XDMCP_MODULES) + AC_DEFINE(XSDLSERVER,1,[Build Xsdl server]) + XSDL_LIBS="`sdl-config --libs` $XSERVER_LIBS" + XSDL_INCS="`sdl-config --cflags` $XSERVER_CFLAGS" + fi + + PKG_CHECK_MODULES(XEPHYR, x11 xext xfont xau xdmcp, [xephyr="yes"], [xephyr="no"]) + if test "x$XEPHYR" = xauto; then + XEPHYR=$xephyr + fi + + # Xephyr needs nanosleep() which is in librt on Solaris + AC_CHECK_FUNC([nanosleep], [], + AC_CHECK_LIB([rt], [nanosleep], XEPHYR_LIBS="$XEPHYR_LIBS -lrt")) + XEPHYR_LIBS="$XEPHYR_LIBS $XSERVER_LIBS" + if test "x$TSLIB" = xyes; then + PKG_CHECK_MODULES([TSLIB], [tslib-0.0], [HAVE_TSLIB="yes"], [HAVE_TSLIB="no"]) + if test "x$HAVE_TSLIB" = xno; then + AC_MSG_ERROR([tslib must be installed to build the tslib driver. See http://tslib.berlios.de/]) + fi + AC_DEFINE(TSLIB, 1, [Have tslib support]) + fi # damage shadow extension glx (NOTYET) fb mi KDRIVE_INC='-I$(top_srcdir)/hw/kdrive/src' @@ -1429,54 +1623,51 @@ if test "$KDRIVE" = yes; then KDRIVE_OS_INC='-I$(top_srcdir)/hw/kdrive/linux' KDRIVE_INCS="$KDRIVE_PURE_INCS $KDRIVE_OS_INC" - KDRIVE_CFLAGS="$XSERVER_CFLAGS -DHAVE_KDRIVE_CONFIG_H" + KDRIVE_CFLAGS="$XSERVER_CFLAGS -DHAVE_KDRIVE_CONFIG_H $TSLIB_CFLAGS" # dix os fb mi extension glx (NOTYET) damage shadow xpstubs #KDRIVE_PURE_LIBS="$DIX_LIB $OS_LIB $FB_LIB $XEXT_LIB $MIEXT_DAMAGE_LIB \ # $MIEXT_SHADOW_LIB $XPSTUBS_LIB" KDRIVE_PURE_LIBS="$FB_LIB $MI_LIB $FIXES_LIB $XEXT_LIB $DBE_LIB $XTRAP_LIB $RECORD_LIB $GLX_LIBS $RENDER_LIB $RANDR_LIB $DAMAGE_LIB $MIEXT_DAMAGE_LIB $MIEXT_SHADOW_LIB $XI_LIB $XKB_LIB $XKB_STUB_LIB $COMPOSITE_LIB $XPSTUBS_LIB $OS_LIB" KDRIVE_LIB='$(top_builddir)/hw/kdrive/src/libkdrive.a' - KDRIVE_OS_LIB='$(top_builddir)/hw/kdrive/linux/liblinux.a' + case $host_os in + *linux*) + KDRIVE_OS_LIB='$(top_builddir)/hw/kdrive/linux/liblinux.a' + KDRIVELINUX=yes + ;; + esac KDRIVE_STUB_LIB='$(top_builddir)/hw/kdrive/src/libkdrivestubs.a' - KDRIVE_LIBS="$DIX_LIB $KDRIVE_LIB $KDRIVE_OS_LIB $KDRIVE_PURE_LIBS $KDRIVE_STUB_LIB" + KDRIVE_LIBS="$XSERVERLIBS_LIBS $DIX_LIB $CONFIG_LIB $KDRIVE_LIB $TSLIB_LIBS $KDRIVE_OS_LIB $KDRIVE_PURE_LIBS $KDRIVE_STUB_LIB" # check if we can build Xephyr PKG_CHECK_MODULES(XEPHYR, x11 xext xfont xau xdmcp, [xephyr="yes"], [xephyr="no"]) - - # check for SDL SDK - AC_CHECK_HEADERS([SDL/SDL.h]) + XEPHYR_LIBS="$XEPHYR_LIBS $XSERVER_LIBS" + + # Xephyr needs nanosleep() which is in librt on Solaris + AC_CHECK_FUNC([nanosleep], [], + AC_CHECK_LIB([rt], [nanosleep], XEPHYR_LIBS="$XEPHYR_LIBS -lrt")) + + AC_SUBST([XEPHYR_LIBS]) + AC_SUBST([XEPHYR_INCS]) + AC_SUBST([XSDL_LIBS]) + AC_SUBST([XSDL_INCS]) fi -AC_SUBST(KDRIVE_INCS) -AC_SUBST(KDRIVE_PURE_INCS) -AC_SUBST(KDRIVE_CFLAGS) -AC_SUBST(KDRIVE_PURE_LIBS) -AC_SUBST(KDRIVE_LIBS) -AM_CONDITIONAL(TSLIB, false) +AC_SUBST([KDRIVE_INCS]) +AC_SUBST([KDRIVE_PURE_INCS]) +AC_SUBST([KDRIVE_CFLAGS]) +AC_SUBST([KDRIVE_PURE_LIBS]) +AC_SUBST([KDRIVE_LIBS]) +AM_CONDITIONAL(KDRIVELINUX, [test "x$KDRIVELINUX" = xyes]) +AM_CONDITIONAL(TSLIB, [test "x$HAVE_TSLIB" = xyes]) AM_CONDITIONAL(H3600_TS, false) +AM_CONDITIONAL(KDRIVEVESA, [test "x$KDRIVEVESA" = xyes]) +AM_CONDITIONAL(KDRIVEFBDEV, [test "x$XFBDEV" = xyes]) +AM_CONDITIONAL(XSDLSERVER, [test x"$XSDL" = xyes]) +AM_CONDITIONAL(XEPHYR, [test "x$KDRIVE" = xyes && test "x$XEPHYR" = xyes]) +AM_CONDITIONAL(BUILD_KDRIVEFBDEVLIB, [test "x$KDRIVE" = xyes && test "x$KDRIVEFBDEVLIB" = xyes]) +AM_CONDITIONAL(XFAKESERVER, [test "x$KDRIVE" = xyes && test "x$XFAKE" = xyes]) AM_CONDITIONAL(KDRIVEVESA, [test x"$ac_cv_header_sys_vm86_h" = xyes]) AM_CONDITIONAL(KDRIVEFBDEV, [test x"$ac_cv_header_linux_fb_h" = xyes]) -#AM_CONDITIONAL(KDRIVEVESA, false) -#AM_CONDITIONAL(KDRIVEFBDEV, false) - -# Xephyr needs nanosleep() which is in librt on Solaris -AC_CHECK_FUNC([nanosleep], [], - AC_CHECK_LIB([rt], [nanosleep], XEPHYR_LIBS="$XEPHYR_LIBS -lrt")) - -AM_CONDITIONAL(XEPHYR, [test x"$xephyr" = xyes]) -XEPHYR_LIBS="$XEPHYR_LIBS $XSERVER_LIBS" -AC_SUBST([XEPHYR_LIBS]) -AC_SUBST([XEPHYR_INCS]) - -AM_CONDITIONAL(XSDLSERVER, [test x"$ac_cv_header_SDL_SDL_h" = xyes]) -if test x"$ac_cv_header_SDL_SDL_h" = xyes -o x"$XSDL" = xyes; then - # PKG_CHECK_MODULES(XSDL_EXTRA, Xfont xau $XDMCP_MODULES) - AC_DEFINE(XSDLSERVER,,[Build Xsdl server]) - XSDL_LIBS="`sdl-config --libs` $XSERVER_LIBS" - XSDL_INCS="`sdl-config --cflags` $XSERVER_CFLAGS" -fi -AC_SUBST([XSDL_LIBS]) -AC_SUBST([XSDL_INCS]) - dnl these only go in xkb-config.h (which is shared by the Xorg and Xnest servers) AC_DEFINE(__XKBDEFRULES__, "xorg", [Default XKB rules]) @@ -1484,7 +1675,6 @@ AC_DEFINE_DIR(XKB_BASE_DIRECTORY, XKBPATH, [Path to XKB data]) AC_DEFINE_DIR(XKB_BIN_DIRECTORY, bindir, [Path to XKB bin dir]) # Make sure XKM_OUTPUT_DIR is an absolute path - XKBOUTPUT_FIRSTCHAR=`echo $XKBOUTPUT | cut -b 1` if [[ x$XKBOUTPUT_FIRSTCHAR != x/ ]] ; then @@ -1502,7 +1692,6 @@ AC_DEFINE_DIR(XKM_OUTPUT_DIR, XKBOUTPUT, [Path to XKB output dir]) AC_SUBST(XKB_COMPILED_DIR) dnl and the rest of these are generic, so they're in config.h -AC_DEFINE(XFreeXDGA, 1, [Build XDGA support]) AC_DEFINE(XResExtension, 1, [Build XRes extension]) dnl CYGWIN does not define fd_set if _POSIX_SOURCE is defined @@ -1523,17 +1712,19 @@ esac AC_DEFINE_DIR(PROJECTROOT, prefix, [Overall prefix]) dnl xorgconfig CLI configuration utility -PKG_CHECK_MODULES([XORGCONFIG_DEP], [xkbfile x11]) -AC_SUBST(XORGCONFIG_DEP_CFLAGS) -AC_SUBST(XORGCONFIG_DEP_LIBS) +if test "x$XORG" = xyes; then + PKG_CHECK_MODULES([XORGCONFIG_DEP], [xkbfile x11]) + AC_SUBST(XORGCONFIG_DEP_CFLAGS) + AC_SUBST(XORGCONFIG_DEP_LIBS) +fi dnl xorgcfg GUI configuration utility AC_ARG_ENABLE(xorgcfg, AS_HELP_STRING([--enable-xorgcfg], - [Build xorgcfg GUI configuration utility (default: yes)]), - [XORGCFG=$enableval],[XORGCFG=yes]) + [Build xorgcfg GUI configuration utility (default: no)]), + [XORGCFG=$enableval],[XORGCFG=no]) if test x$XORGCFG = xyes ; then PKG_CHECK_MODULES([XORGCFG_DEP], - [xkbui xkbfile xxf86misc xxf86vm xaw7 xmu xt xpm xext x11]) + [xkbui >= 1.0.2 xkbfile xxf86misc xxf86vm xaw7 xmu xt xpm xext x11]) AC_CHECK_LIB([curses],[waddstr], [XORGCFG_DEP_LIBS="$XORGCFG_DEP_LIBS -lcurses"; CURSES=yes], AC_CHECK_LIB([ncurses],[waddstr], @@ -1571,17 +1762,11 @@ AM_CONDITIONAL(BUILD_KBD_MODE, [test x$BUILD_KBD_MODE = xyes]) AM_CONDITIONAL(BSD_KBD_MODE, [test x$KBD_MODE_TYPE = xbsd]) AM_CONDITIONAL(SUN_KBD_MODE, [test x$KBD_MODE_TYPE = xsun]) -AC_SUBST([MODULE_DEFINES]) -AC_SUBST([LOADER_DEFINES]) -AC_SUBST([SERVER_DEFINES]) - -CFLAGS="$XSERVER_CFLAGS $CFLAGS" -AC_SUBST([CFLAGS]) - BUILD_DATE="$(date +'%Y%m%d')" AC_SUBST([BUILD_DATE]) -DIX_CFLAGS="-DHAVE_DIX_CONFIG_H" +DIX_CFLAGS="-DHAVE_DIX_CONFIG_H $XSERVER_CFLAGS" + AC_SUBST([DIX_CFLAGS]) AC_SUBST([libdir exec_prefix prefix]) @@ -1596,8 +1781,6 @@ AC_OUTPUT([ Makefile GL/Makefile GL/glx/Makefile -GL/include/Makefile -GL/include/GL/Makefile GL/mesa/Makefile GL/mesa/array_cache/Makefile GL/mesa/glapi/Makefile @@ -1623,6 +1806,7 @@ XTrap/Makefile mfb/Makefile cfb/Makefile cfb32/Makefile +config/Makefile mi/Makefile miext/Makefile miext/damage/Makefile @@ -1652,14 +1836,13 @@ hw/xfree86/dri/Makefile hw/xfree86/dummylib/Makefile hw/xfree86/exa/Makefile hw/xfree86/fbdevhw/Makefile -hw/xfree86/getconfig/Makefile hw/xfree86/i2c/Makefile hw/xfree86/int10/Makefile hw/xfree86/loader/Makefile hw/xfree86/os-support/Makefile hw/xfree86/os-support/bsd/Makefile hw/xfree86/os-support/bus/Makefile -hw/xfree86/os-support/drm/Makefile +hw/xfree86/os-support/hurd/Makefile hw/xfree86/os-support/misc/Makefile hw/xfree86/os-support/linux/Makefile hw/xfree86/os-support/lynxos/Makefile @@ -1727,41 +1910,41 @@ hw/kdrive/smi/Makefile hw/kdrive/src/Makefile hw/kdrive/vesa/Makefile hw/kdrive/via/Makefile -Xprint/Makefile -Xprint/doc/Makefile -Xprint/pcl/Makefile -Xprint/pcl-mono/Makefile -Xprint/raster/Makefile -Xprint/ps/Makefile -Xprint/etc/Makefile -Xprint/etc/Xsession.d/Makefile -Xprint/etc/init.d/Makefile -Xprint/etc/profile.d/Makefile -XpConfig/Makefile -XpConfig/C/print/attributes/Makefile -XpConfig/C/print/ddx-config/Makefile -XpConfig/C/print/ddx-config/raster/Makefile -XpConfig/C/print/models/CANONBJ10E-GS/Makefile -XpConfig/C/print/models/PSdefault/fonts/Makefile -XpConfig/C/print/models/PSdefault/Makefile -XpConfig/C/print/models/PSspooldir/Makefile -XpConfig/C/print/models/SPSPARC2/Makefile -XpConfig/C/print/models/SPSPARC2/fonts/Makefile -XpConfig/C/print/models/GSdefault/Makefile -XpConfig/C/print/models/HPLJ4050-PS/Makefile -XpConfig/C/print/models/HPLJ4050-PS/fonts/Makefile -XpConfig/C/print/models/Makefile -XpConfig/C/print/models/PS2PDFspooldir-GS/Makefile -XpConfig/C/print/models/CANONC3200-PS/Makefile -XpConfig/C/print/models/CANONC3200-PS/fonts/Makefile -XpConfig/C/print/models/HPLJ4family/fonts/Makefile -XpConfig/C/print/models/HPLJ4family/Makefile -XpConfig/C/print/models/HPDJ1600C/Makefile -XpConfig/C/print/models/HPDJ1600C/fonts/Makefile -XpConfig/C/print/Makefile -XpConfig/C/Makefile -XpConfig/en_US/print/attributes/Makefile -XpConfig/en_US/print/Makefile -XpConfig/en_US/Makefile +hw/xprint/Makefile +hw/xprint/doc/Makefile +hw/xprint/pcl/Makefile +hw/xprint/pcl-mono/Makefile +hw/xprint/raster/Makefile +hw/xprint/ps/Makefile +hw/xprint/etc/Makefile +hw/xprint/etc/Xsession.d/Makefile +hw/xprint/etc/init.d/Makefile +hw/xprint/etc/profile.d/Makefile +hw/xprint/config/Makefile +hw/xprint/config/C/print/attributes/Makefile +hw/xprint/config/C/print/ddx-config/Makefile +hw/xprint/config/C/print/ddx-config/raster/Makefile +hw/xprint/config/C/print/models/CANONBJ10E-GS/Makefile +hw/xprint/config/C/print/models/PSdefault/fonts/Makefile +hw/xprint/config/C/print/models/PSdefault/Makefile +hw/xprint/config/C/print/models/PSspooldir/Makefile +hw/xprint/config/C/print/models/SPSPARC2/Makefile +hw/xprint/config/C/print/models/SPSPARC2/fonts/Makefile +hw/xprint/config/C/print/models/GSdefault/Makefile +hw/xprint/config/C/print/models/HPLJ4050-PS/Makefile +hw/xprint/config/C/print/models/HPLJ4050-PS/fonts/Makefile +hw/xprint/config/C/print/models/Makefile +hw/xprint/config/C/print/models/PS2PDFspooldir-GS/Makefile +hw/xprint/config/C/print/models/CANONC3200-PS/Makefile +hw/xprint/config/C/print/models/CANONC3200-PS/fonts/Makefile +hw/xprint/config/C/print/models/HPLJ4family/fonts/Makefile +hw/xprint/config/C/print/models/HPLJ4family/Makefile +hw/xprint/config/C/print/models/HPDJ1600C/Makefile +hw/xprint/config/C/print/models/HPDJ1600C/fonts/Makefile +hw/xprint/config/C/print/Makefile +hw/xprint/config/C/Makefile +hw/xprint/config/en_US/print/attributes/Makefile +hw/xprint/config/en_US/print/Makefile +hw/xprint/config/en_US/Makefile xorg-server.pc ]) diff --git a/cpprules.in b/cpprules.in index 667b13322..4901ea890 100644 --- a/cpprules.in +++ b/cpprules.in @@ -34,6 +34,7 @@ MANDEFS = \ -D__miscmansuffix__=$(MISC_MAN_SUFFIX) \ -D__drivermansuffix__=$(DRIVER_MAN_SUFFIX) \ -D__adminmansuffix__=$(ADMIN_MAN_SUFFIX) \ + -D__mandir__=$(mandir) \ -D__projectroot__=$(prefix) \ -D__xconfigfile__=$(__XCONFIGFILE__) -D__xconfigdir__=$(XCONFIGDIR) \ -D__xlogfile__=$(XLOGFILE) -D__xservername__=$(XSERVERNAME) diff --git a/damageext/Makefile.am b/damageext/Makefile.am index 171cd270c..35f7620fb 100644 --- a/damageext/Makefile.am +++ b/damageext/Makefile.am @@ -1,6 +1,6 @@ noinst_LTLIBRARIES = libdamageext.la -AM_CFLAGS = $(DIX_CFLAGS) @SERVER_DEFINES@ @LOADER_DEFINES@ +AM_CFLAGS = $(DIX_CFLAGS) libdamageext_la_SOURCES = \ damageext.c \ diff --git a/damageext/damageext.c b/damageext/damageext.c index 225f9ecf0..6083693a4 100755 --- a/damageext/damageext.c +++ b/damageext/damageext.c @@ -173,13 +173,17 @@ ProcDamageCreate (ClientPtr client) DamageExtPtr pDamageExt; DamageReportLevel level; RegionPtr pRegion; + int rc; REQUEST(xDamageCreateReq); REQUEST_SIZE_MATCH(xDamageCreateReq); LEGAL_NEW_RESOURCE(stuff->damage, client); - SECURITY_VERIFY_DRAWABLE (pDrawable, stuff->drawable, client, - SecurityReadAccess); + rc = dixLookupDrawable(&pDrawable, stuff->drawable, client, 0, + DixReadAccess); + if (rc != Success) + return rc; + switch (stuff->level) { case XDamageReportRawRectangles: level = DamageReportRawRegion; @@ -237,7 +241,7 @@ ProcDamageDestroy (ClientPtr client) DamageExtPtr pDamageExt; REQUEST_SIZE_MATCH(xDamageDestroyReq); - VERIFY_DAMAGEEXT(pDamageExt, stuff->damage, client, SecurityWriteAccess); + VERIFY_DAMAGEEXT(pDamageExt, stuff->damage, client, DixWriteAccess); FreeResource (stuff->damage, RT_NONE); return (client->noClientException); } @@ -251,9 +255,9 @@ ProcDamageSubtract (ClientPtr client) RegionPtr pParts; REQUEST_SIZE_MATCH(xDamageSubtractReq); - VERIFY_DAMAGEEXT(pDamageExt, stuff->damage, client, SecurityWriteAccess); - VERIFY_REGION_OR_NONE(pRepair, stuff->repair, client, SecurityWriteAccess); - VERIFY_REGION_OR_NONE(pParts, stuff->parts, client, SecurityWriteAccess); + VERIFY_DAMAGEEXT(pDamageExt, stuff->damage, client, DixWriteAccess); + VERIFY_REGION_OR_NONE(pRepair, stuff->repair, client, DixWriteAccess); + VERIFY_REGION_OR_NONE(pParts, stuff->parts, client, DixWriteAccess); if (pDamageExt->level != DamageReportRawRegion) { diff --git a/dbe/Makefile.am b/dbe/Makefile.am index 01de4707a..043555b8c 100644 --- a/dbe/Makefile.am +++ b/dbe/Makefile.am @@ -1,6 +1,6 @@ noinst_LTLIBRARIES = libdbe.la -AM_CFLAGS = $(DIX_CFLAGS) @SERVER_DEFINES@ @LOADER_DEFINES@ +AM_CFLAGS = $(DIX_CFLAGS) if XORG sdk_HEADERS = dbestruct.h diff --git a/dbe/dbe.c b/dbe/dbe.c index 9a040578e..38375f92a 100644 --- a/dbe/dbe.c +++ b/dbe/dbe.c @@ -1,5 +1,3 @@ -/* $XdotOrg: xserver/xorg/dbe/dbe.c,v 1.6 2006/02/10 22:00:21 anholt Exp $ */ -/* $Xorg: dbe.c,v 1.3 2000/08/17 19:48:16 cpqbld Exp $ */ /****************************************************************************** * * Copyright (c) 1994, 1995 Hewlett-Packard Company @@ -31,7 +29,6 @@ * DIX DBE code * *****************************************************************************/ -/* $XFree86: xc/programs/Xserver/dbe/dbe.c,v 3.10 2001/08/23 14:19:24 alanh Exp $ */ /* INCLUDES */ @@ -408,11 +405,9 @@ ProcDbeAllocateBackBufferName(ClientPtr client) REQUEST_SIZE_MATCH(xDbeAllocateBackBufferNameReq); /* The window must be valid. */ - if (!(pWin = SecurityLookupWindow(stuff->window, client, - SecurityWriteAccess))) - { - return(BadWindow); - } + status = dixLookupWindow(&pWin, stuff->window, client, DixWriteAccess); + if (status != Success) + return status; /* The window must be InputOutput. */ if (pWin->drawable.class != InputOutput) @@ -636,9 +631,9 @@ ProcDbeDeallocateBackBufferName(ClientPtr client) /* Buffer name must be valid */ if (!(pDbeWindowPriv = (DbeWindowPrivPtr)SecurityLookupIDByType(client, - stuff->buffer, dbeWindowPrivResType, SecurityDestroyAccess)) || + stuff->buffer, dbeWindowPrivResType, DixDestroyAccess)) || !(SecurityLookupIDByType(client, stuff->buffer, dbeDrawableResType, - SecurityDestroyAccess))) + DixDestroyAccess))) { client->errorValue = stuff->buffer; return(dbeErrorBase + DbeBadBuffer); @@ -732,11 +727,11 @@ ProcDbeSwapBuffers(ClientPtr client) /* Check all windows to swap. */ /* Each window must be a valid window - BadWindow. */ - if (!(pWin = SecurityLookupWindow(dbeSwapInfo[i].window, client, - SecurityWriteAccess))) - { + error = dixLookupWindow(&pWin, dbeSwapInfo[i].window, client, + DixWriteAccess); + if (error != Success) { DEALLOCATE_LOCAL(swapInfo); - return(BadWindow); + return error; } /* Each window must be double-buffered - BadMatch. */ @@ -870,7 +865,7 @@ ProcDbeGetVisualInfo(ClientPtr client) xDbeGetVisualInfoReply rep; Drawable *drawables; DrawablePtr *pDrawables = NULL; - register int i, j, n; + register int i, j, n, rc; register int count; /* number of visual infos in reply */ register int length; /* length of reply */ ScreenPtr pScreen; @@ -892,11 +887,11 @@ ProcDbeGetVisualInfo(ClientPtr client) for (i = 0; i < stuff->n; i++) { - if (!(pDrawables[i] = (DrawablePtr)SecurityLookupDrawable( - drawables[i], client, SecurityReadAccess))) - { + rc = dixLookupDrawable(pDrawables+i, drawables[i], client, 0, + DixReadAccess); + if (rc != Success) { DEALLOCATE_LOCAL(pDrawables); - return(BadDrawable); + return rc; } } } @@ -1050,7 +1045,7 @@ ProcDbeGetBackBufferAttributes(ClientPtr client) REQUEST_SIZE_MATCH(xDbeGetBackBufferAttributesReq); if (!(pDbeWindowPriv = (DbeWindowPrivPtr)SecurityLookupIDByType(client, - stuff->buffer, dbeWindowPrivResType, SecurityReadAccess))) + stuff->buffer, dbeWindowPrivResType, DixReadAccess))) { rep.attributes = None; } diff --git a/dbe/dbestruct.h b/dbe/dbestruct.h index 69135a837..460cc7564 100644 --- a/dbe/dbestruct.h +++ b/dbe/dbestruct.h @@ -1,4 +1,3 @@ -/* $Xorg: dbestruct.h,v 1.3 2000/08/17 19:48:16 cpqbld Exp $ */ /****************************************************************************** * * Copyright (c) 1994, 1995 Hewlett-Packard Company diff --git a/dbe/midbe.c b/dbe/midbe.c index cdca272d3..e687b98b7 100644 --- a/dbe/midbe.c +++ b/dbe/midbe.c @@ -1,4 +1,3 @@ -/* $Xorg: midbe.c,v 1.3 2000/08/17 19:48:16 cpqbld Exp $ */ /****************************************************************************** * * Copyright (c) 1994, 1995 Hewlett-Packard Company @@ -30,7 +29,6 @@ * Machine-independent DBE code * *****************************************************************************/ -/* $XFree86: xc/programs/Xserver/dbe/midbe.c,v 3.4 2001/03/06 17:31:34 dawes Exp $ */ /* INCLUDES */ diff --git a/dbe/midbe.h b/dbe/midbe.h index 1110578cd..1780c3fc3 100644 --- a/dbe/midbe.h +++ b/dbe/midbe.h @@ -1,4 +1,3 @@ -/* $Xorg: midbe.h,v 1.3 2000/08/17 19:48:16 cpqbld Exp $ */ /****************************************************************************** * * Copyright (c) 1994, 1995 Hewlett-Packard Company diff --git a/dbe/midbestr.h b/dbe/midbestr.h index 248b44857..1ad0104aa 100644 --- a/dbe/midbestr.h +++ b/dbe/midbestr.h @@ -1,4 +1,3 @@ -/* $Xorg: midbestr.h,v 1.3 2000/08/17 19:48:16 cpqbld Exp $ */ /****************************************************************************** * * Copyright (c) 1994, 1995 Hewlett-Packard Company diff --git a/dix/Makefile.am b/dix/Makefile.am index c9a19f77b..a1f02c1b6 100644 --- a/dix/Makefile.am +++ b/dix/Makefile.am @@ -1,6 +1,6 @@ noinst_LTLIBRARIES = libdix.la libxpstubs.la -AM_CFLAGS = $(DIX_CFLAGS) @SERVER_DEFINES@ @LOADER_DEFINES@ \ +AM_CFLAGS = $(DIX_CFLAGS) \ -DVENDOR_STRING=\""@VENDOR_STRING@"\" \ -DVENDOR_RELEASE="@VENDOR_RELEASE@" @@ -17,6 +17,7 @@ libdix_la_SOURCES = \ extension.c \ ffs.c \ gc.c \ + getevents.c \ globals.c \ glyphcurs.c \ grabs.c \ @@ -29,11 +30,30 @@ libdix_la_SOURCES = \ swaprep.c \ swapreq.c \ tables.c \ - window.c + window.c \ + strcasecmp.c libxpstubs_la_SOURCES = \ xpstubs.c INCLUDES = -I$(top_srcdir)/Xprint -EXTRA_DIST = buildatoms BuiltInAtoms CHANGES +EXTRA_DIST = buildatoms BuiltInAtoms CHANGES Xserver.d Xserver-dtrace.h.in + +if XSERVER_DTRACE +# Generate dtrace header file for C sources to include +BUILT_SOURCES = Xserver-dtrace.h + +Xserver-dtrace.h: $(srcdir)/Xserver.d + $(DTRACE) -C -h -o $@ -s $(srcdir)/Xserver.d \ + || cp Xserver-dtrace.h.in $@ + +# Generate dtrace object code for probes in libdix +dtrace-dix.o: $(top_srcdir)/dix/Xserver.d $(am_libdix_la_OBJECTS) + $(DTRACE) -G -C -o $@ -s $(top_srcdir)/dix/Xserver.d .libs/*.o + +noinst_PROGRAMS = dix.O + +dix.O: dtrace-dix.o $(am_libdix_la_OBJECTS) + ld -r -o $@ .libs/*.o +endif diff --git a/dix/Xserver-dtrace.h.in b/dix/Xserver-dtrace.h.in new file mode 100644 index 000000000..26a8b4099 --- /dev/null +++ b/dix/Xserver-dtrace.h.in @@ -0,0 +1,100 @@ +/* Copyright 2006 Sun Microsystems, Inc. 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, and/or sell copies of the Software, and to permit persons + * to whom the Software is furnished to do so, provided that the above + * copyright notice(s) and this permission notice appear in all copies of + * the Software and that both the above copyright notice(s) and this + * permission notice appear in supporting documentation. + * + * 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 + * OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR + * HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL + * INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING + * FROM LOSS OF USE, 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. + * + * Except as contained in this notice, the name of a copyright holder + * shall not be used in advertising or otherwise to promote the sale, use + * or other dealings in this Software without prior written authorization + * of the copyright holder. + */ + +/* + * Generated by dtrace(1M), and then modified for backwards compatibility + * with older versions of dtrace. Used if dtrace -h fails. + * (Since _ENABLED support was added after dtrace -h, this assumes if + * dtrace -h fails, _ENABLED will too.) + */ + +#ifndef _XSERVER_DTRACE_H +#define _XSERVER_DTRACE_H + +#include + +#ifdef __cplusplus +extern "C" { +#endif + +#if _DTRACE_VERSION + +#define XSERVER_CLIENT_AUTH(arg0, arg1, arg2, arg3) \ + __dtrace_Xserver___client__auth(arg0, arg1, arg2, arg3) +#define XSERVER_CLIENT_CONNECT(arg0, arg1) \ + __dtrace_Xserver___client__connect(arg0, arg1) +#define XSERVER_CLIENT_DISCONNECT(arg0) \ + __dtrace_Xserver___client__disconnect(arg0) +#define XSERVER_REQUEST_DONE(arg0, arg1, arg2, arg3, arg4) \ + __dtrace_Xserver___request__done(arg0, arg1, arg2, arg3, arg4) +#define XSERVER_REQUEST_START(arg0, arg1, arg2, arg3, arg4) \ + __dtrace_Xserver___request__start(arg0, arg1, arg2, arg3, arg4) +#define XSERVER_RESOURCE_ALLOC(arg0, arg1, arg2, arg3) \ + __dtrace_Xserver___resource__alloc(arg0, arg1, arg2, arg3) +#define XSERVER_RESOURCE_FREE(arg0, arg1, arg2, arg3) \ + __dtrace_Xserver___resource__free(arg0, arg1, arg2, arg3) +#define XSERVER_SEND_EVENT(arg0, arg1, arg2) \ + __dtrace_Xserver___send__event(arg0, arg1, arg2) + + +extern void __dtrace_Xserver___client__auth(int, string, pid_t, zoneid_t); +extern void __dtrace_Xserver___client__connect(int, int); +extern void __dtrace_Xserver___client__disconnect(int); +extern void __dtrace_Xserver___request__done(string, uint8_t, uint32_t, int, int); +extern void __dtrace_Xserver___request__start(string, uint8_t, uint16_t, int, void *); +extern void __dtrace_Xserver___resource__alloc(uint32_t, uint32_t, void *, string); +extern void __dtrace_Xserver___resource__free(uint32_t, uint32_t, void *, string); +extern void __dtrace_Xserver___send__event(int, uint8_t, void *); + +#else + +#define XSERVER_CLIENT_AUTH(arg0, arg1, arg2, arg3) +#define XSERVER_CLIENT_CONNECT(arg0, arg1) +#define XSERVER_CLIENT_DISCONNECT(arg0) +#define XSERVER_REQUEST_DONE(arg0, arg1, arg2, arg3, arg4) +#define XSERVER_REQUEST_START(arg0, arg1, arg2, arg3, arg4) +#define XSERVER_RESOURCE_ALLOC(arg0, arg1, arg2, arg3) +#define XSERVER_RESOURCE_FREE(arg0, arg1, arg2, arg3) +#define XSERVER_SEND_EVENT(arg0, arg1, arg2) + +#endif + +#define XSERVER_CLIENT_AUTH_ENABLED() (1) +#define XSERVER_CLIENT_CONNECT_ENABLED() (1) +#define XSERVER_CLIENT_DISCONNECT_ENABLED() (1) +#define XSERVER_REQUEST_DONE_ENABLED() (1) +#define XSERVER_REQUEST_START_ENABLED() (1) +#define XSERVER_RESOURCE_ALLOC_ENABLED() (1) +#define XSERVER_RESOURCE_FREE_ENABLED() (1) +#define XSERVER_SEND_EVENT_ENABLED() (1) + +#ifdef __cplusplus +} +#endif + +#endif /* _XSERVER_DTRACE_H */ diff --git a/dix/Xserver.d b/dix/Xserver.d new file mode 100644 index 000000000..e4c9b8320 --- /dev/null +++ b/dix/Xserver.d @@ -0,0 +1,59 @@ +/* Copyright 2005-2006 Sun Microsystems, Inc. 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, and/or sell copies of the Software, and to permit persons + * to whom the Software is furnished to do so, provided that the above + * copyright notice(s) and this permission notice appear in all copies of + * the Software and that both the above copyright notice(s) and this + * permission notice appear in supporting documentation. + * + * 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 + * OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR + * HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL + * INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING + * FROM LOSS OF USE, 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. + * + * Except as contained in this notice, the name of a copyright holder + * shall not be used in advertising or otherwise to promote the sale, use + * or other dealings in this Software without prior written authorization + * of the copyright holder. + */ + +/* + * Xserver dtrace provider definition + */ + +#include + +provider Xserver { + /* reqType, data, length, client id, request buffer */ + probe request__start(string, uint8_t, uint16_t, int, void *); + /* reqType, data, sequence, client id, result */ + probe request__done(string, uint8_t, uint32_t, int, int); + /* client id, client fd */ + probe client__connect(int, int); + /* client id, client address, client pid, client zone id */ + probe client__auth(int, string, pid_t, zoneid_t); + /* client id */ + probe client__disconnect(int); + /* resource id, resource type, value, resource type name */ + probe resource__alloc(uint32_t, uint32_t, void *, string); + /* resource id, resource type, value, resource type name */ + probe resource__free(uint32_t, uint32_t, void *, string); + /* client id, event type, event* */ + probe send__event(int, uint8_t, void *); +}; + +#pragma D attributes Unstable/Unstable/Common provider Xserver provider +#pragma D attributes Private/Private/Unknown provider Xserver module +#pragma D attributes Private/Private/Unknown provider Xserver function +#pragma D attributes Unstable/Unstable/Common provider Xserver name +#pragma D attributes Unstable/Unstable/Common provider Xserver args + diff --git a/dix/atom.c b/dix/atom.c index 53cd5c311..d9d74f1da 100644 --- a/dix/atom.c +++ b/dix/atom.c @@ -1,4 +1,3 @@ -/* $XFree86: xc/programs/Xserver/dix/atom.c,v 3.3 2001/12/14 19:59:29 dawes Exp $ */ /*********************************************************** Copyright 1987, 1998 The Open Group @@ -46,7 +45,6 @@ SOFTWARE. ******************************************************************/ -/* $Xorg: atom.c,v 1.4 2001/02/09 02:04:39 xorgcvs Exp $ */ #ifdef HAVE_DIX_CONFIG_H #include @@ -54,6 +52,8 @@ SOFTWARE. #include #include +#include +#include #include "misc.h" #include "resource.h" #include "dix.h" diff --git a/dix/colormap.c b/dix/colormap.c index ba52c251c..a74cb390c 100644 --- a/dix/colormap.c +++ b/dix/colormap.c @@ -1,5 +1,3 @@ -/* $XdotOrg: xserver/xorg/dix/colormap.c,v 1.13 2006/05/22 15:47:56 ajax Exp $ */ -/* $XFree86: xc/programs/Xserver/dix/colormap.c,v 3.11 2003/11/03 05:10:59 tsi Exp $ */ /*********************************************************** Copyright 1987, 1998 The Open Group @@ -47,7 +45,6 @@ SOFTWARE. ******************************************************************/ -/* $Xorg: colormap.c,v 1.4 2001/02/09 02:04:39 xorgcvs Exp $ */ #ifdef HAVE_DIX_CONFIG_H #include @@ -56,6 +53,9 @@ SOFTWARE. #include #define NEED_EVENTS #include +#include +#include +#include #include "misc.h" #include "dix.h" #include "colormapst.h" @@ -903,7 +903,7 @@ AllocColor (ColormapPtr pmap, { ColormapPtr prootmap = (ColormapPtr) SecurityLookupIDByType (clients[client], pmap->pScreen->defColormap, - RT_COLORMAP, SecurityReadAccess); + RT_COLORMAP, DixReadAccess); if (pmap->class == prootmap->class) FindColorInRootCmap (prootmap, prootmap->red, entries, &rgb, @@ -920,7 +920,7 @@ AllocColor (ColormapPtr pmap, { ColormapPtr prootmap = (ColormapPtr) SecurityLookupIDByType (clients[client], pmap->pScreen->defColormap, - RT_COLORMAP, SecurityReadAccess); + RT_COLORMAP, DixReadAccess); if (pmap->class == prootmap->class) { diff --git a/dix/cursor.c b/dix/cursor.c index af9282f98..7071d8345 100644 --- a/dix/cursor.c +++ b/dix/cursor.c @@ -1,4 +1,3 @@ -/* $XFree86: xc/programs/Xserver/dix/cursor.c,v 3.8 2003/01/12 02:44:26 dawes Exp $ */ /*********************************************************** Copyright 1987, 1998 The Open Group @@ -47,7 +46,6 @@ SOFTWARE. ******************************************************************/ -/* $Xorg: cursor.c,v 1.4 2001/02/09 02:04:39 xorgcvs Exp $ */ #ifdef HAVE_DIX_CONFIG_H #include @@ -264,9 +262,9 @@ AllocGlyphCursor(Font source, unsigned sourceChar, Font mask, unsigned maskChar, GlyphSharePtr pShare; sourcefont = (FontPtr) SecurityLookupIDByType(client, source, RT_FONT, - SecurityReadAccess); + DixReadAccess); maskfont = (FontPtr) SecurityLookupIDByType(client, mask, RT_FONT, - SecurityReadAccess); + DixReadAccess); if (!sourcefont) { diff --git a/dix/devices.c b/dix/devices.c index ef1bdf354..9f4218414 100644 --- a/dix/devices.c +++ b/dix/devices.c @@ -1,4 +1,3 @@ -/* $XFree86: xc/programs/Xserver/dix/devices.c,v 3.20 2001/12/14 19:59:30 dawes Exp $ */ /************************************************************ Copyright 1987, 1998 The Open Group @@ -47,8 +46,6 @@ SOFTWARE. ********************************************************/ -/* $Xorg: devices.c,v 1.4 2001/02/09 02:04:39 xorgcvs Exp $ */ -/* $XdotOrg: xserver/xorg/dix/devices.c,v 1.11 2006/06/01 19:22:37 daniels Exp $ */ #ifdef HAVE_DIX_CONFIG_H #include @@ -66,27 +63,32 @@ SOFTWARE. #include "cursorstr.h" #include "dixstruct.h" #include "site.h" +#ifndef XKB_IN_SERVER #define XKB_IN_SERVER +#endif #ifdef XKB #include #endif -#ifdef XCSECURITY -#define _SECURITY_SERVER -#include -#endif +#include "xace.h" #include "dispatch.h" #include "swaprep.h" #include "dixevents.h" +#include +#include "exglobals.h" +#include "exevents.h" + +int CoreDevicePrivatesIndex = 0, CoreDevicePrivatesGeneration = -1; + DeviceIntPtr AddInputDevice(DeviceProc deviceProc, Bool autoStart) { - register DeviceIntPtr dev; + register DeviceIntPtr dev, *prev; /* not a typo */ if (inputInfo.numDevices >= MAX_DEVICES) return (DeviceIntPtr)NULL; - dev = (DeviceIntPtr) xalloc(sizeof(DeviceIntRec)); + dev = (DeviceIntPtr) xcalloc(sizeof(DeviceIntRec), 1); if (!dev) return (DeviceIntPtr)NULL; dev->name = (char *)NULL; @@ -112,20 +114,28 @@ AddInputDevice(DeviceProc deviceProc, Bool autoStart) dev->button = (ButtonClassPtr)NULL; dev->focus = (FocusClassPtr)NULL; dev->proximity = (ProximityClassPtr)NULL; + dev->absolute = (AbsoluteClassPtr)NULL; dev->kbdfeed = (KbdFeedbackPtr)NULL; dev->ptrfeed = (PtrFeedbackPtr)NULL; dev->intfeed = (IntegerFeedbackPtr)NULL; dev->stringfeed = (StringFeedbackPtr)NULL; dev->bell = (BellFeedbackPtr)NULL; dev->leds = (LedFeedbackPtr)NULL; - dev->next = inputInfo.off_devices; #ifdef XKB - dev->xkb_interest= NULL; + dev->xkb_interest = NULL; #endif dev->nPrivates = 0; dev->devPrivates = NULL; dev->unwrapProc = NULL; - inputInfo.off_devices = dev; + dev->coreEvents = TRUE; + dev->inited = FALSE; + dev->enabled = FALSE; + + for (prev = &inputInfo.off_devices; *prev; prev = &(*prev)->next) + ; + *prev = dev; + dev->next = NULL; + return dev; } @@ -133,17 +143,25 @@ Bool EnableDevice(register DeviceIntPtr dev) { register DeviceIntPtr *prev; + int ret; for (prev = &inputInfo.off_devices; *prev && (*prev != dev); prev = &(*prev)->next) ; if ((*prev != dev) || !dev->inited || - ((*dev->deviceProc)(dev, DEVICE_ON) != Success)) + ((ret = (*dev->deviceProc)(dev, DEVICE_ON)) != Success)) { + ErrorF("couldn't enable device %d\n", dev->id); return FALSE; + } + dev->enabled = TRUE; *prev = dev->next; - dev->next = inputInfo.devices; - inputInfo.devices = dev; + + for (prev = &inputInfo.devices; *prev; prev = &(*prev)->next) + ; + *prev = dev; + dev->next = NULL; + return TRUE; } @@ -159,21 +177,212 @@ DisableDevice(register DeviceIntPtr dev) if (*prev != dev) return FALSE; (void)(*dev->deviceProc)(dev, DEVICE_OFF); + dev->enabled = FALSE; *prev = dev->next; dev->next = inputInfo.off_devices; inputInfo.off_devices = dev; return TRUE; } +int +ActivateDevice(DeviceIntPtr dev) +{ + int ret = Success; + devicePresenceNotify ev; + DeviceIntRec dummyDev; + + if (!dev || !dev->deviceProc) + return BadImplementation; + + ret = (*dev->deviceProc) (dev, DEVICE_INIT); + dev->inited = (ret == Success); + + ev.type = DevicePresenceNotify; + ev.time = currentTime.milliseconds; + ev.devchange = 0; + ev.deviceid = 0; + dummyDev.id = 0; + SendEventToAllWindows(&dummyDev, DevicePresenceNotifyMask, + (xEvent *) &ev, 1); + + return ret; +} + +static void +CoreKeyboardBell(int volume, DeviceIntPtr pDev, pointer arg, int something) +{ + KeybdCtrl *ctrl = arg; + + DDXRingBell(volume, ctrl->bell_pitch, ctrl->bell_duration); +} + +static void +CoreKeyboardCtl(DeviceIntPtr pDev, KeybdCtrl *ctrl) +{ + return; +} + +static int +CoreKeyboardProc(DeviceIntPtr pDev, int what) +{ + CARD8 *modMap; + KeySymsRec keySyms; +#ifdef XKB + XkbComponentNamesRec names; +#endif + + switch (what) { + case DEVICE_INIT: + keySyms.minKeyCode = 8; + keySyms.maxKeyCode = 255; + keySyms.mapWidth = 4; + keySyms.map = (KeySym *)xcalloc(sizeof(KeySym), + (keySyms.maxKeyCode - + keySyms.minKeyCode) * + keySyms.mapWidth); + if (!keySyms.map) { + ErrorF("Couldn't allocate core keymap\n"); + return BadAlloc; + } + + modMap = (CARD8 *)xalloc(MAP_LENGTH); + if (!modMap) { + ErrorF("Couldn't allocate core modifier map\n"); + return BadAlloc; + } + bzero((char *)modMap, MAP_LENGTH); + +#ifdef XKB + if (!noXkbExtension) { + bzero(&names, sizeof(names)); + XkbSetRulesDflts("base", "pc105", "us", NULL, NULL); + XkbInitKeyboardDeviceStruct(pDev, &names, &keySyms, modMap, + CoreKeyboardBell, CoreKeyboardCtl); + } + else +#endif + { + /* FIXME Our keymap here isn't exactly useful. */ + InitKeyboardDeviceStruct((DevicePtr)pDev, &keySyms, modMap, + CoreKeyboardBell, CoreKeyboardCtl); + } + + xfree(keySyms.map); + xfree(modMap); + + break; + + case DEVICE_CLOSE: + pDev->devPrivates[CoreDevicePrivatesIndex].ptr = NULL; + break; + + default: + break; + } + return Success; +} + +static int +CorePointerProc(DeviceIntPtr pDev, int what) +{ + BYTE map[33]; + int i = 0; + + switch (what) { + case DEVICE_INIT: + for (i = 1; i <= 32; i++) + map[i] = i; + InitPointerDeviceStruct((DevicePtr)pDev, map, 32, + GetMotionHistory, (PtrCtrlProcPtr)NoopDDA, + GetMotionHistorySize(), 2); + pDev->valuator->axisVal[0] = screenInfo.screens[0]->width / 2; + pDev->valuator->lastx = pDev->valuator->axisVal[0]; + pDev->valuator->axisVal[1] = screenInfo.screens[0]->height / 2; + pDev->valuator->lasty = pDev->valuator->axisVal[1]; + break; + + case DEVICE_CLOSE: + pDev->devPrivates[CoreDevicePrivatesIndex].ptr = NULL; + break; + + default: + break; + } + + return Success; +} + +void +InitCoreDevices() +{ + register DeviceIntPtr dev; + + if (CoreDevicePrivatesGeneration != serverGeneration) { + CoreDevicePrivatesIndex = AllocateDevicePrivateIndex(); + CoreDevicePrivatesGeneration = serverGeneration; + } + + if (!inputInfo.keyboard) { + dev = AddInputDevice(CoreKeyboardProc, TRUE); + if (!dev) + FatalError("Failed to allocate core keyboard"); + dev->name = strdup("Virtual core keyboard"); +#ifdef XKB + dev->public.processInputProc = CoreProcessKeyboardEvent; + dev->public.realInputProc = CoreProcessKeyboardEvent; + if (!noXkbExtension) + XkbSetExtension(dev, ProcessKeyboardEvent); +#else + dev->public.processInputProc = ProcessKeyboardEvent; + dev->public.realInputProc = ProcessKeyboardEvent; +#endif + dev->ActivateGrab = ActivateKeyboardGrab; + dev->DeactivateGrab = DeactivateKeyboardGrab; + dev->coreEvents = FALSE; + if (!AllocateDevicePrivate(dev, CoreDevicePrivatesIndex)) + FatalError("Couldn't allocate keyboard devPrivates\n"); + dev->devPrivates[CoreDevicePrivatesIndex].ptr = NULL; + (void)ActivateDevice(dev); + inputInfo.keyboard = dev; + } + + if (!inputInfo.pointer) { + dev = AddInputDevice(CorePointerProc, TRUE); + if (!dev) + FatalError("Failed to allocate core pointer"); + dev->name = strdup("Virtual core pointer"); +#ifdef XKB + dev->public.processInputProc = CoreProcessPointerEvent; + dev->public.realInputProc = CoreProcessPointerEvent; + if (!noXkbExtension) + XkbSetExtension(dev, ProcessPointerEvent); +#else + dev->public.processInputProc = ProcessPointerEvent; + dev->public.realInputProc = ProcessPointerEvent; +#endif + dev->ActivateGrab = ActivatePointerGrab; + dev->DeactivateGrab = DeactivatePointerGrab; + dev->coreEvents = FALSE; + if (!AllocateDevicePrivate(dev, CoreDevicePrivatesIndex)) + FatalError("Couldn't allocate pointer devPrivates\n"); + dev->devPrivates[CoreDevicePrivatesIndex].ptr = NULL; + (void)ActivateDevice(dev); + inputInfo.pointer = dev; + } +} + int InitAndStartDevices() { register DeviceIntPtr dev, next; - for (dev = inputInfo.off_devices; dev; dev = dev->next) - dev->inited = ((*dev->deviceProc)(dev, DEVICE_INIT) == Success); + for (dev = inputInfo.off_devices; dev; dev = dev->next) { + DebugF("(dix) initialising device %d\n", dev->id); + ActivateDevice(dev); + } for (dev = inputInfo.off_devices; dev; dev = next) { + DebugF("(dix) enabling device %d\n", dev->id); next = dev->next; if (dev->inited && dev->startup) (void)EnableDevice(dev); @@ -181,7 +390,6 @@ InitAndStartDevices() for (dev = inputInfo.devices; dev && (dev != inputInfo.keyboard); dev = dev->next) - ; if (!dev || (dev != inputInfo.keyboard)) { ErrorF("No core keyboard\n"); return BadImplementation; @@ -209,9 +417,10 @@ CloseDevice(register DeviceIntPtr dev) if (dev->inited) (void)(*dev->deviceProc)(dev, DEVICE_CLOSE); + xfree(dev->name); - if (dev->key) - { + + if (dev->key) { #ifdef XKB if (dev->key->xkbInfo) XkbFreeInfo(dev->key->xkbInfo); @@ -220,20 +429,27 @@ CloseDevice(register DeviceIntPtr dev) xfree(dev->key->modifierKeyMap); xfree(dev->key); } - xfree(dev->valuator); + + if (dev->valuator) + xfree(dev->valuator); + + if (dev->button) { #ifdef XKB - if ((dev->button)&&(dev->button->xkb_acts)) - xfree(dev->button->xkb_acts); + if (dev->button->xkb_acts) + xfree(dev->button->xkb_acts); #endif - xfree(dev->button); - if (dev->focus) - { + xfree(dev->button); + } + + if (dev->focus) { xfree(dev->focus->trace); xfree(dev->focus); } - xfree(dev->proximity); - for (k=dev->kbdfeed; k; k=knext) - { + + if (dev->proximity) + xfree(dev->proximity); + + for (k = dev->kbdfeed; k; k = knext) { knext = k->next; #ifdef XKB if (k->xkb_sli) @@ -241,30 +457,30 @@ CloseDevice(register DeviceIntPtr dev) #endif xfree(k); } - for (p=dev->ptrfeed; p; p=pnext) - { + + for (p = dev->ptrfeed; p; p = pnext) { pnext = p->next; xfree(p); } - for (i=dev->intfeed; i; i=inext) - { + + for (i = dev->intfeed; i; i = inext) { inext = i->next; xfree(i); } - for (s=dev->stringfeed; s; s=snext) - { + + for (s = dev->stringfeed; s; s = snext) { snext = s->next; xfree(s->ctrl.symbols_supported); xfree(s->ctrl.symbols_displayed); xfree(s); } - for (b=dev->bell; b; b=bnext) - { + + for (b = dev->bell; b; b = bnext) { bnext = b->next; xfree(b); } - for (l=dev->leds; l; l=lnext) - { + + for (l = dev->leds; l; l = lnext) { lnext = l->next; #ifdef XKB if (l->xkb_sli) @@ -272,11 +488,12 @@ CloseDevice(register DeviceIntPtr dev) #endif xfree(l); } + #ifdef XKB - while (dev->xkb_interest) { + while (dev->xkb_interest) XkbRemoveResourceClient((DevicePtr)dev,dev->xkb_interest->resource); - } #endif + xfree(dev->sync.event); xfree(dev); } @@ -302,48 +519,60 @@ CloseDownDevices() inputInfo.pointer = NULL; } -void -RemoveDevice(register DeviceIntPtr dev) +int +RemoveDevice(DeviceIntPtr dev) { - register DeviceIntPtr prev,tmp,next; + DeviceIntPtr prev,tmp,next; + int ret = BadMatch; + devicePresenceNotify ev; + DeviceIntRec dummyDev; - prev= NULL; - for (tmp= inputInfo.devices; tmp; (prev = tmp), (tmp = next)) { + DebugF("(dix) removing device %d\n", dev->id); + + if (!dev || dev == inputInfo.keyboard || dev == inputInfo.pointer) + return BadImplementation; + + prev = NULL; + for (tmp = inputInfo.devices; tmp; (prev = tmp), (tmp = next)) { next = tmp->next; - if (tmp==dev) { + if (tmp == dev) { CloseDevice(tmp); + if (prev==NULL) inputInfo.devices = next; else prev->next = next; - inputInfo.numDevices--; - if (inputInfo.keyboard == tmp) - inputInfo.keyboard = NULL; - else if (inputInfo.pointer == tmp) - inputInfo.pointer = NULL; - return; + + ret = Success; } } - prev= NULL; - for (tmp= inputInfo.off_devices; tmp; (prev = tmp), (tmp = next)) { + prev = NULL; + for (tmp = inputInfo.off_devices; tmp; (prev = tmp), (tmp = next)) { next = tmp->next; - if (tmp==dev) { + if (tmp == dev) { CloseDevice(tmp); - if (prev==NULL) + + if (prev == NULL) inputInfo.off_devices = next; else prev->next = next; - inputInfo.numDevices--; - if (inputInfo.keyboard == tmp) - inputInfo.keyboard = NULL; - else if (inputInfo.pointer == tmp) - inputInfo.pointer = NULL; - return; + + ret = Success; } } - ErrorF("Internal Error! Attempt to remove a non-existent device\n"); - return; + + if (ret == Success) { + ev.type = DevicePresenceNotify; + ev.time = currentTime.milliseconds; + ev.devchange = 0; + ev.deviceid = 0; + dummyDev.id = 0; + SendEventToAllWindows(&dummyDev, DevicePresenceNotifyMask, + (xEvent *) &ev, 1); + } + + return ret; } int @@ -355,47 +584,13 @@ NumMotionEvents() void RegisterPointerDevice(DeviceIntPtr device) { - inputInfo.pointer = device; -#ifdef XKB - device->public.processInputProc = CoreProcessPointerEvent; - device->public.realInputProc = CoreProcessPointerEvent; - if (!noXkbExtension) - XkbSetExtension(device,ProcessPointerEvent); -#else - device->public.processInputProc = ProcessPointerEvent; - device->public.realInputProc = ProcessPointerEvent; -#endif - device->ActivateGrab = ActivatePointerGrab; - device->DeactivateGrab = DeactivatePointerGrab; - if (!device->name) - { - char *p = "pointer"; - device->name = (char *)xalloc(strlen(p) + 1); - strcpy(device->name, p); - } + RegisterOtherDevice(device); } void RegisterKeyboardDevice(DeviceIntPtr device) { - inputInfo.keyboard = device; -#ifdef XKB - device->public.processInputProc = CoreProcessKeyboardEvent; - device->public.realInputProc = CoreProcessKeyboardEvent; - if (!noXkbExtension) - XkbSetExtension(device,ProcessKeyboardEvent); -#else - device->public.processInputProc = ProcessKeyboardEvent; - device->public.realInputProc = ProcessKeyboardEvent; -#endif - device->ActivateGrab = ActivateKeyboardGrab; - device->DeactivateGrab = DeactivateKeyboardGrab; - if (!device->name) - { - char *k = "keyboard"; - device->name = (char *)xalloc(strlen(k) + 1); - strcpy(device->name, k); - } + RegisterOtherDevice(device); } _X_EXPORT DevicePtr @@ -440,8 +635,8 @@ SetKeySymsMap(register KeySymsPtr dst, register KeySymsPtr src) { int i, j; int rowDif = src->minKeyCode - dst->minKeyCode; - /* if keysym map size changes, grow map first */ + /* if keysym map size changes, grow map first */ if (src->mapWidth < dst->mapWidth) { for (i = src->minKeyCode; i <= src->maxKeyCode; i++) @@ -531,7 +726,7 @@ InitKeyClassDeviceStruct(DeviceIntPtr dev, KeySymsPtr pKeySyms, CARD8 pModifiers { int i; register KeyClassPtr keyc; - + keyc = (KeyClassPtr)xalloc(sizeof(KeyClassRec)); if (!keyc) return FALSE; @@ -596,21 +791,70 @@ InitValuatorClassDeviceStruct(DeviceIntPtr dev, int numAxes, int i; register ValuatorClassPtr valc; + if (!dev) + return FALSE; + valc = (ValuatorClassPtr)xalloc(sizeof(ValuatorClassRec) + numAxes * sizeof(AxisInfo) + numAxes * sizeof(unsigned int)); if (!valc) return FALSE; + + valc->motion = NULL; + valc->first_motion = 0; + valc->last_motion = 0; valc->GetMotionProc = motionProc; + valc->numMotionEvents = numMotionEvents; valc->motionHintWindow = NullWindow; valc->numAxes = numAxes; valc->mode = mode; valc->axes = (AxisInfoPtr)(valc + 1); valc->axisVal = (int *)(valc->axes + numAxes); - for (i=0; iaxisVal[i]=0; + valc->lastx = 0; + valc->lasty = 0; + valc->dxremaind = 0; + valc->dyremaind = 0; dev->valuator = valc; + + /* biggest hack ever. */ + if (motionProc == GetMotionHistory) + AllocateMotionHistory(dev); + + for (i=0; iaxisVal[i]=0; + } + return TRUE; +} + +_X_EXPORT Bool +InitAbsoluteClassDeviceStruct(DeviceIntPtr dev) +{ + register AbsoluteClassPtr abs; + + abs = (AbsoluteClassPtr)xalloc(sizeof(AbsoluteClassRec)); + if (!abs) + return FALSE; + + /* we don't do anything sensible with these, but should */ + abs->min_x = -1; + abs->min_y = -1; + abs->max_x = -1; + abs->max_y = -1; + abs->flip_x = 0; + abs->flip_y = 0; + abs->rotation = 0; + abs->button_threshold = 0; + + abs->offset_x = 0; + abs->offset_y = 0; + abs->width = -1; + abs->height = -1; + abs->following = 0; + + dev->absolute = abs; + return TRUE; } @@ -669,13 +913,7 @@ InitPtrFeedbackClassDeviceStruct(DeviceIntPtr dev, PtrCtrlProcPtr controlProc) if (!feedc) return FALSE; feedc->CtrlProc = controlProc; -#ifdef sgi - feedc->ctrl.num = 1; - feedc->ctrl.den = 1; - feedc->ctrl.threshold = 1; -#else feedc->ctrl = defaultPointerControl; -#endif feedc->ctrl.id = 0; if ( (feedc->next = dev->ptrfeed) ) feedc->ctrl.id = dev->ptrfeed->ctrl.id + 1; @@ -803,12 +1041,13 @@ InitIntegerFeedbackClassDeviceStruct (DeviceIntPtr dev, IntegerCtrlProcPtr contr _X_EXPORT Bool InitPointerDeviceStruct(DevicePtr device, CARD8 *map, int numButtons, ValuatorMotionProcPtr motionProc, - PtrCtrlProcPtr controlProc, int numMotionEvents) + PtrCtrlProcPtr controlProc, int numMotionEvents, + int numAxes) { DeviceIntPtr dev = (DeviceIntPtr)device; return(InitButtonClassDeviceStruct(dev, numButtons, map) && - InitValuatorClassDeviceStruct(dev, 2, motionProc, + InitValuatorClassDeviceStruct(dev, numAxes, motionProc, numMotionEvents, 0) && InitPtrFeedbackClassDeviceStruct(dev, controlProc)); } @@ -917,112 +1156,99 @@ AllModifierKeysAreUp(dev, map1, per1, map2, per2) return TRUE; } +static int +DoSetModifierMapping(ClientPtr client, KeyCode *inputMap, + int numKeyPerModifier) +{ + DeviceIntPtr pDev = NULL; + int i = 0, inputMapLen = numKeyPerModifier * 8; + + for (pDev = inputInfo.devices; pDev; pDev = pDev->next) { + if ((pDev->coreEvents || pDev == inputInfo.keyboard) && pDev->key) { + for (i = 0; i < inputMapLen; i++) { + /* Check that all the new modifiers fall within the advertised + * keycode range, and are okay with the DDX. */ + if (inputMap[i] && ((inputMap[i] < pDev->key->curKeySyms.minKeyCode || + inputMap[i] > pDev->key->curKeySyms.maxKeyCode) || + !LegalModifier(inputMap[i], pDev))) { + client->errorValue = inputMap[i]; + return BadValue; + } + } + + if (!XaceHook(XACE_DEVICE_ACCESS, client, pDev, TRUE)) + return BadAccess; + + /* None of the modifiers (old or new) may be down while we change + * the map. */ + if (!AllModifierKeysAreUp(pDev, pDev->key->modifierKeyMap, + pDev->key->maxKeysPerModifier, + inputMap, numKeyPerModifier) || + !AllModifierKeysAreUp(pDev, inputMap, numKeyPerModifier, + pDev->key->modifierKeyMap, + pDev->key->maxKeysPerModifier)) { + return MappingBusy; + } + } + } + + for (pDev = inputInfo.devices; pDev; pDev = pDev->next) { + + if ((pDev->coreEvents || pDev == inputInfo.keyboard) && pDev->key) { + bzero(pDev->key->modifierMap, MAP_LENGTH); + + /* Annoyingly, we lack a modifierKeyMap size, so we have to just free + * and re-alloc it every time. */ + if (pDev->key->modifierKeyMap) + xfree(pDev->key->modifierKeyMap); + + if (inputMapLen) { + pDev->key->modifierKeyMap = (KeyCode *) xalloc(inputMapLen); + if (!pDev->key->modifierKeyMap) + return BadAlloc; + + memcpy(pDev->key->modifierKeyMap, inputMap, inputMapLen); + pDev->key->maxKeysPerModifier = numKeyPerModifier; + + for (i = 0; i < inputMapLen; i++) { + if (inputMap[i]) { + pDev->key->modifierMap[inputMap[i]] |= + (1 << (((unsigned int)i) / numKeyPerModifier)); + } + } + } + else { + pDev->key->modifierKeyMap = NULL; + } + } + } + + return Success; +} + int ProcSetModifierMapping(ClientPtr client) { xSetModifierMappingReply rep; REQUEST(xSetModifierMappingReq); - KeyCode *inputMap; - int inputMapLen; - register int i; - DeviceIntPtr keybd = inputInfo.keyboard; - register KeyClassPtr keyc = keybd->key; REQUEST_AT_LEAST_SIZE(xSetModifierMappingReq); - if (client->req_len != ((stuff->numKeyPerModifier<<1) + - (sizeof (xSetModifierMappingReq)>>2))) + if (client->req_len != ((stuff->numKeyPerModifier << 1) + + (sizeof (xSetModifierMappingReq) >> 2))) return BadLength; - inputMapLen = 8*stuff->numKeyPerModifier; - inputMap = (KeyCode *)&stuff[1]; - - /* - * Now enforce the restriction that "all of the non-zero keycodes must be - * in the range specified by min-keycode and max-keycode in the - * connection setup (else a Value error)" - */ - i = inputMapLen; - while (i--) - { - if (inputMap[i] - && (inputMap[i] < keyc->curKeySyms.minKeyCode - || inputMap[i] > keyc->curKeySyms.maxKeyCode)) - { - client->errorValue = inputMap[i]; - return BadValue; - } - } - -#ifdef XCSECURITY - if (!SecurityCheckDeviceAccess(client, keybd, TRUE)) - return BadAccess; -#endif - rep.type = X_Reply; rep.length = 0; rep.sequenceNumber = client->sequence; - rep.success = MappingSuccess; - /* - * Now enforce the restriction that none of the old or new - * modifier keys may be down while we change the mapping, and - * that the DDX layer likes the choice. - */ - if (!AllModifierKeysAreUp(keybd, keyc->modifierKeyMap, - (int)keyc->maxKeysPerModifier, - inputMap, (int)stuff->numKeyPerModifier) - || - !AllModifierKeysAreUp(keybd, inputMap, (int)stuff->numKeyPerModifier, - keyc->modifierKeyMap, - (int)keyc->maxKeysPerModifier)) - { - rep.success = MappingBusy; - } - else - { - for (i = 0; i < inputMapLen; i++) - { - if (inputMap[i] && !LegalModifier(inputMap[i], (DevicePtr)keybd)) - { - rep.success = MappingFailed; - break; - } - } - } - - if (rep.success == MappingSuccess) - { - KeyCode *map; - /* - * Now build the keyboard's modifier bitmap from the - * list of keycodes. - */ - map = (KeyCode *)xalloc(inputMapLen); - if (!map && inputMapLen) - return BadAlloc; - if (keyc->modifierKeyMap) - xfree(keyc->modifierKeyMap); - keyc->modifierKeyMap = map; - memmove((char *)map, (char *)inputMap, inputMapLen); - - keyc->maxKeysPerModifier = stuff->numKeyPerModifier; - for (i = 0; i < MAP_LENGTH; i++) - keyc->modifierMap[i] = 0; - for (i = 0; i < inputMapLen; i++) - { - if (inputMap[i]) - keyc->modifierMap[inputMap[i]] |= - (1<<(((unsigned int)i)/keyc->maxKeysPerModifier)); - } - } - - if (rep.success == MappingSuccess) - SendMappingNotify(MappingModifier, 0, 0, client); + rep.success = DoSetModifierMapping(client, (KeyCode *)&stuff[1], + stuff->numKeyPerModifier); + /* FIXME: Send mapping notifies for all the extended devices as well. */ + SendMappingNotify(MappingModifier, 0, 0, client); WriteReplyToClient(client, sizeof(xSetModifierMappingReply), &rep); - - return(client->noClientException); + return client->noClientException; } int @@ -1052,40 +1278,78 @@ ProcChangeKeyboardMapping(ClientPtr client) REQUEST(xChangeKeyboardMappingReq); unsigned len; KeySymsRec keysyms; - register KeySymsPtr curKeySyms = &inputInfo.keyboard->key->curKeySyms; + KeySymsPtr curKeySyms = &inputInfo.keyboard->key->curKeySyms; + DeviceIntPtr pDev = NULL; REQUEST_AT_LEAST_SIZE(xChangeKeyboardMappingReq); len = client->req_len - (sizeof(xChangeKeyboardMappingReq) >> 2); if (len != (stuff->keyCodes * stuff->keySymsPerKeyCode)) return BadLength; + if ((stuff->firstKeyCode < curKeySyms->minKeyCode) || - (stuff->firstKeyCode > curKeySyms->maxKeyCode)) - { + (stuff->firstKeyCode > curKeySyms->maxKeyCode)) { client->errorValue = stuff->firstKeyCode; return BadValue; + } - if ( ((unsigned)(stuff->firstKeyCode + stuff->keyCodes - 1) > - curKeySyms->maxKeyCode) || - (stuff->keySymsPerKeyCode == 0)) - { + if (((unsigned)(stuff->firstKeyCode + stuff->keyCodes - 1) > + curKeySyms->maxKeyCode) || (stuff->keySymsPerKeyCode == 0)) { client->errorValue = stuff->keySymsPerKeyCode; return BadValue; } -#ifdef XCSECURITY - if (!SecurityCheckDeviceAccess(client, inputInfo.keyboard, - TRUE)) - return BadAccess; -#endif + + for (pDev = inputInfo.devices; pDev; pDev = pDev->next) { + if ((pDev->coreEvents || pDev == inputInfo.keyboard) && pDev->key) { + if (!XaceHook(XACE_DEVICE_ACCESS, client, pDev, TRUE)) + return BadAccess; + } + } + keysyms.minKeyCode = stuff->firstKeyCode; keysyms.maxKeyCode = stuff->firstKeyCode + stuff->keyCodes - 1; keysyms.mapWidth = stuff->keySymsPerKeyCode; keysyms.map = (KeySym *)&stuff[1]; - if (!SetKeySymsMap(curKeySyms, &keysyms)) - return BadAlloc; - SendMappingNotify(MappingKeyboard, stuff->firstKeyCode, stuff->keyCodes, - client); - return client->noClientException; + for (pDev = inputInfo.devices; pDev; pDev = pDev->next) { + if ((pDev->coreEvents || pDev == inputInfo.keyboard) && pDev->key) { + if (!SetKeySymsMap(&pDev->key->curKeySyms, &keysyms)) + return BadAlloc; + } + } + /* FIXME: Send mapping notifies for all the extended devices as well. */ + SendMappingNotify(MappingKeyboard, stuff->firstKeyCode, stuff->keyCodes, + client); + return client->noClientException; +} + +static int +DoSetPointerMapping(DeviceIntPtr device, BYTE *map, int n) +{ + int i = 0; + DeviceIntPtr dev = NULL; + + if (!device || !device->button) + return BadDevice; + + for (dev = inputInfo.devices; dev; dev = dev->next) { + if ((dev->coreEvents || dev == inputInfo.pointer) && dev->button) { + for (i = 0; i < n; i++) { + if ((device->button->map[i + 1] != map[i]) && + BitIsOn(device->button->down, i + 1)) { + return MappingBusy; + } + } + } + } + + for (dev = inputInfo.devices; dev; dev = dev->next) { + if ((dev->coreEvents || dev == inputInfo.pointer) && dev->button) { + for (i = 0; i < n; i++) + dev->button->map[i + 1] = map[i]; + } + } + + return Success; } int @@ -1093,9 +1357,8 @@ ProcSetPointerMapping(ClientPtr client) { REQUEST(xSetPointerMappingReq); BYTE *map; + int ret; xSetPointerMappingReply rep; - register unsigned int i; - DeviceIntPtr mouse = inputInfo.pointer; REQUEST_AT_LEAST_SIZE(xSetPointerMappingReq); if (client->req_len != (sizeof(xSetPointerMappingReq)+stuff->nElts+3) >> 2) @@ -1105,23 +1368,24 @@ ProcSetPointerMapping(ClientPtr client) rep.sequenceNumber = client->sequence; rep.success = MappingSuccess; map = (BYTE *)&stuff[1]; - if (stuff->nElts != mouse->button->numButtons) - { + + /* So we're bounded here by the number of core buttons. This check + * probably wants disabling through XFixes. */ + if (stuff->nElts != inputInfo.pointer->button->numButtons) { client->errorValue = stuff->nElts; return BadValue; } if (BadDeviceMap(&map[0], (int)stuff->nElts, 1, 255, &client->errorValue)) return BadValue; - for (i=0; i < stuff->nElts; i++) - if ((mouse->button->map[i + 1] != map[i]) && - BitIsOn(mouse->button->down, i + 1)) - { - rep.success = MappingBusy; - WriteReplyToClient(client, sizeof(xSetPointerMappingReply), &rep); - return Success; - } - for (i = 0; i < stuff->nElts; i++) - mouse->button->map[i + 1] = map[i]; + + ret = DoSetPointerMapping(inputInfo.pointer, map, stuff->nElts); + if (ret != Success) { + rep.success = ret; + WriteReplyToClient(client, sizeof(xSetPointerMappingReply), &rep); + return Success; + } + + /* FIXME: Send mapping notifies for all the extended devices as well. */ SendMappingNotify(MappingPointer, 0, 0, client); WriteReplyToClient(client, sizeof(xSetPointerMappingReply), &rep); return Success; @@ -1137,14 +1401,12 @@ ProcGetKeyboardMapping(ClientPtr client) REQUEST_SIZE_MATCH(xGetKeyboardMappingReq); if ((stuff->firstKeyCode < curKeySyms->minKeyCode) || - (stuff->firstKeyCode > curKeySyms->maxKeyCode)) - { + (stuff->firstKeyCode > curKeySyms->maxKeyCode)) { client->errorValue = stuff->firstKeyCode; return BadValue; } if (stuff->firstKeyCode + stuff->count > - (unsigned)(curKeySyms->maxKeyCode + 1)) - { + (unsigned)(curKeySyms->maxKeyCode + 1)) { client->errorValue = stuff->count; return BadValue; } @@ -1201,43 +1463,30 @@ Ones(unsigned long mask) /* HACKMEM 169 */ return (((y + (y >> 3)) & 030707070707) % 077); } -int -ProcChangeKeyboardControl (ClientPtr client) +static int +DoChangeKeyboardControl (ClientPtr client, DeviceIntPtr keybd, XID *vlist, + BITS32 vmask) { #define DO_ALL (-1) KeybdCtrl ctrl; - DeviceIntPtr keybd = inputInfo.keyboard; - XID *vlist; int t; int led = DO_ALL; int key = DO_ALL; - BITS32 vmask, index2; - int mask, i; - REQUEST(xChangeKeyboardControlReq); + BITS32 index2; + int mask = vmask, i; - REQUEST_AT_LEAST_SIZE(xChangeKeyboardControlReq); - vmask = stuff->mask; - if (client->req_len != (sizeof(xChangeKeyboardControlReq)>>2)+Ones(vmask)) - return BadLength; -#ifdef XCSECURITY - if (!SecurityCheckDeviceAccess(client, keybd, TRUE)) - return BadAccess; -#endif - vlist = (XID *)&stuff[1]; /* first word of values */ ctrl = keybd->kbdfeed->ctrl; - while (vmask) - { + while (vmask) { index2 = (BITS32) lowbit (vmask); vmask &= ~index2; - switch (index2) - { + switch (index2) { case KBKeyClickPercent: t = (INT8)*vlist; vlist++; - if (t == -1) + if (t == -1) { t = defaultKeyboardControl.click; - else if (t < 0 || t > 100) - { + } + else if (t < 0 || t > 100) { client->errorValue = t; return BadValue; } @@ -1246,10 +1495,10 @@ ProcChangeKeyboardControl (ClientPtr client) case KBBellPercent: t = (INT8)*vlist; vlist++; - if (t == -1) + if (t == -1) { t = defaultKeyboardControl.bell; - else if (t < 0 || t > 100) - { + } + else if (t < 0 || t > 100) { client->errorValue = t; return BadValue; } @@ -1258,10 +1507,10 @@ ProcChangeKeyboardControl (ClientPtr client) case KBBellPitch: t = (INT16)*vlist; vlist++; - if (t == -1) + if (t == -1) { t = defaultKeyboardControl.bell_pitch; - else if (t < 0) - { + } + else if (t < 0) { client->errorValue = t; return BadValue; } @@ -1272,8 +1521,7 @@ ProcChangeKeyboardControl (ClientPtr client) vlist++; if (t == -1) t = defaultKeyboardControl.bell_duration; - else if (t < 0) - { + else if (t < 0) { client->errorValue = t; return BadValue; } @@ -1282,56 +1530,51 @@ ProcChangeKeyboardControl (ClientPtr client) case KBLed: led = (CARD8)*vlist; vlist++; - if (led < 1 || led > 32) - { + if (led < 1 || led > 32) { client->errorValue = led; return BadValue; } - if (!(stuff->mask & KBLedMode)) + if (!(mask & KBLedMode)) return BadMatch; break; case KBLedMode: t = (CARD8)*vlist; vlist++; - if (t == LedModeOff) - { + if (t == LedModeOff) { if (led == DO_ALL) ctrl.leds = 0x0; else ctrl.leds &= ~(((Leds)(1)) << (led - 1)); } - else if (t == LedModeOn) - { + else if (t == LedModeOn) { if (led == DO_ALL) ctrl.leds = ~0L; else ctrl.leds |= (((Leds)(1)) << (led - 1)); } - else - { + else { client->errorValue = t; return BadValue; } #ifdef XKB - if (!noXkbExtension) { - XkbEventCauseRec cause; - XkbSetCauseCoreReq(&cause,X_ChangeKeyboardControl,client); - XkbSetIndicators(keybd,((led == DO_ALL) ? ~0L : (1L<<(led-1))), + if (!noXkbExtension) { + XkbEventCauseRec cause; + XkbSetCauseCoreReq(&cause,X_ChangeKeyboardControl,client); + XkbSetIndicators(keybd,((led == DO_ALL) ? ~0L : (1L<<(led-1))), ctrl.leds, &cause); - ctrl.leds = keybd->kbdfeed->ctrl.leds; - } + ctrl.leds = keybd->kbdfeed->ctrl.leds; + } #endif break; case KBKey: key = (KeyCode)*vlist; vlist++; if ((KeyCode)key < inputInfo.keyboard->key->curKeySyms.minKeyCode || - (KeyCode)key > inputInfo.keyboard->key->curKeySyms.maxKeyCode) - { + (KeyCode)key > inputInfo.keyboard->key->curKeySyms.maxKeyCode) { client->errorValue = key; return BadValue; } - if (!(stuff->mask & KBAutoRepeatMode)) + if (!(mask & KBAutoRepeatMode)) return BadMatch; break; case KBAutoRepeatMode: @@ -1340,25 +1583,22 @@ ProcChangeKeyboardControl (ClientPtr client) t = (CARD8)*vlist; vlist++; #ifdef XKB - if (!noXkbExtension && key != DO_ALL) - XkbDisableComputedAutoRepeats(keybd,key); + if (!noXkbExtension && key != DO_ALL) + XkbDisableComputedAutoRepeats(keybd,key); #endif - if (t == AutoRepeatModeOff) - { + if (t == AutoRepeatModeOff) { if (key == DO_ALL) ctrl.autoRepeat = FALSE; else ctrl.autoRepeats[i] &= ~mask; } - else if (t == AutoRepeatModeOn) - { + else if (t == AutoRepeatModeOn) { if (key == DO_ALL) ctrl.autoRepeat = TRUE; else ctrl.autoRepeats[i] |= mask; } - else if (t == AutoRepeatModeDefault) - { + else if (t == AutoRepeatModeDefault) { if (key == DO_ALL) ctrl.autoRepeat = defaultKeyboardControl.autoRepeat; else @@ -1366,31 +1606,69 @@ ProcChangeKeyboardControl (ClientPtr client) (ctrl.autoRepeats[i] & ~mask) | (defaultKeyboardControl.autoRepeats[i] & mask); } - else - { + else { client->errorValue = t; return BadValue; } break; default: - client->errorValue = stuff->mask; + client->errorValue = mask; return BadValue; } } keybd->kbdfeed->ctrl = ctrl; + #ifdef XKB /* The XKB RepeatKeys control and core protocol global autorepeat */ /* value are linked */ - if (!noXkbExtension) { - XkbSetRepeatKeys(keybd,key,keybd->kbdfeed->ctrl.autoRepeat); - } + if (!noXkbExtension) + XkbSetRepeatKeys(keybd, key, keybd->kbdfeed->ctrl.autoRepeat); else #endif - (*keybd->kbdfeed->CtrlProc)(keybd, &keybd->kbdfeed->ctrl); + (*keybd->kbdfeed->CtrlProc)(keybd, &keybd->kbdfeed->ctrl); + return Success; + #undef DO_ALL } +int +ProcChangeKeyboardControl (ClientPtr client) +{ + XID *vlist; + BITS32 vmask; + int ret = Success, error = Success; + DeviceIntPtr pDev = NULL; + REQUEST(xChangeKeyboardControlReq); + + REQUEST_AT_LEAST_SIZE(xChangeKeyboardControlReq); + + vmask = stuff->mask; + vlist = (XID *)&stuff[1]; + + if (client->req_len != (sizeof(xChangeKeyboardControlReq)>>2)+Ones(vmask)) + return BadLength; + + for (pDev = inputInfo.devices; pDev; pDev = pDev->next) { + if ((pDev->coreEvents || pDev == inputInfo.keyboard) && + pDev->kbdfeed && pDev->kbdfeed->CtrlProc) { + if (!XaceHook(XACE_DEVICE_ACCESS, client, pDev, TRUE)) + return BadAccess; + } + } + + for (pDev = inputInfo.devices; pDev; pDev = pDev->next) { + if ((pDev->coreEvents || pDev == inputInfo.keyboard) && + pDev->kbdfeed && pDev->kbdfeed->CtrlProc) { + ret = DoChangeKeyboardControl(client, pDev, vlist, vmask); + if (ret != Success) + error = ret; + } + } + + return error; +} + int ProcGetKeyboardControl (ClientPtr client) { @@ -1422,24 +1700,35 @@ ProcBell(ClientPtr client) int newpercent; REQUEST(xBellReq); REQUEST_SIZE_MATCH(xBellReq); - if (stuff->percent < -100 || stuff->percent > 100) - { + + if (!keybd->kbdfeed->BellProc) + return BadDevice; + + if (stuff->percent < -100 || stuff->percent > 100) { client->errorValue = stuff->percent; return BadValue; } + newpercent = (base * stuff->percent) / 100; if (stuff->percent < 0) newpercent = base + newpercent; else newpercent = base - newpercent + stuff->percent; + + for (keybd = inputInfo.devices; keybd; keybd = keybd->next) { + if ((keybd->coreEvents || keybd == inputInfo.keyboard) && + keybd->kbdfeed && keybd->kbdfeed->BellProc) { #ifdef XKB - if (!noXkbExtension) - XkbHandleBell(FALSE,FALSE, keybd, newpercent, &keybd->kbdfeed->ctrl, 0, - None, NULL, client); - else + if (!noXkbExtension) + XkbHandleBell(FALSE, FALSE, keybd, newpercent, + &keybd->kbdfeed->ctrl, 0, None, NULL, client); + else #endif - (*keybd->kbdfeed->BellProc)(newpercent, keybd, - (pointer) &keybd->kbdfeed->ctrl, 0); + (*keybd->kbdfeed->BellProc)(newpercent, keybd, + &keybd->kbdfeed->ctrl, 0); + } + } + return Success; } @@ -1451,49 +1740,64 @@ ProcChangePointerControl(ClientPtr client) REQUEST(xChangePointerControlReq); REQUEST_SIZE_MATCH(xChangePointerControlReq); + + if (!mouse->ptrfeed->CtrlProc) + return BadDevice; + ctrl = mouse->ptrfeed->ctrl; - if ((stuff->doAccel != xTrue) && (stuff->doAccel != xFalse)) - { + if ((stuff->doAccel != xTrue) && (stuff->doAccel != xFalse)) { client->errorValue = stuff->doAccel; return(BadValue); } - if ((stuff->doThresh != xTrue) && (stuff->doThresh != xFalse)) - { + if ((stuff->doThresh != xTrue) && (stuff->doThresh != xFalse)) { client->errorValue = stuff->doThresh; return(BadValue); } - if (stuff->doAccel) - { - if (stuff->accelNum == -1) + if (stuff->doAccel) { + if (stuff->accelNum == -1) { ctrl.num = defaultPointerControl.num; - else if (stuff->accelNum < 0) - { + } + else if (stuff->accelNum < 0) { client->errorValue = stuff->accelNum; return BadValue; } - else ctrl.num = stuff->accelNum; - if (stuff->accelDenum == -1) + else { + ctrl.num = stuff->accelNum; + } + + if (stuff->accelDenum == -1) { ctrl.den = defaultPointerControl.den; - else if (stuff->accelDenum <= 0) - { + } + else if (stuff->accelDenum <= 0) { client->errorValue = stuff->accelDenum; return BadValue; } - else ctrl.den = stuff->accelDenum; + else { + ctrl.den = stuff->accelDenum; + } } - if (stuff->doThresh) - { - if (stuff->threshold == -1) + if (stuff->doThresh) { + if (stuff->threshold == -1) { ctrl.threshold = defaultPointerControl.threshold; - else if (stuff->threshold < 0) - { + } + else if (stuff->threshold < 0) { client->errorValue = stuff->threshold; return BadValue; } - else ctrl.threshold = stuff->threshold; + else { + ctrl.threshold = stuff->threshold; + } } - mouse->ptrfeed->ctrl = ctrl; - (*mouse->ptrfeed->CtrlProc)(mouse, &mouse->ptrfeed->ctrl); + + + for (mouse = inputInfo.devices; mouse; mouse = mouse->next) { + if ((mouse->coreEvents || mouse == inputInfo.pointer) && + mouse->ptrfeed && mouse->ptrfeed->CtrlProc) { + mouse->ptrfeed->ctrl = ctrl; + (*mouse->ptrfeed->CtrlProc)(mouse, &mouse->ptrfeed->ctrl); + } + } + return Success; } @@ -1536,16 +1840,16 @@ ProcGetMotionEvents(ClientPtr client) WindowPtr pWin; xTimecoord * coords = (xTimecoord *) NULL; xGetMotionEventsReply rep; - int i, count, xmin, xmax, ymin, ymax; + int i, count, xmin, xmax, ymin, ymax, rc; unsigned long nEvents; DeviceIntPtr mouse = inputInfo.pointer; TimeStamp start, stop; REQUEST(xGetMotionEventsReq); REQUEST_SIZE_MATCH(xGetMotionEventsReq); - pWin = SecurityLookupWindow(stuff->window, client, TRUE); - if (!pWin) - return BadWindow; + rc = dixLookupWindow(&pWin, stuff->window, client, DixUnknownAccess); + if (rc != Success) + return rc; if (mouse->valuator->motionHintWindow) MaybeStopHint(mouse, client); rep.type = X_Reply; @@ -1608,15 +1912,13 @@ ProcQueryKeymap(ClientPtr client) rep.type = X_Reply; rep.sequenceNumber = client->sequence; rep.length = 2; -#ifdef XCSECURITY - if (!SecurityCheckDeviceAccess(client, inputInfo.keyboard, TRUE)) - { - bzero((char *)&rep.map[0], 32); - } + + if (XaceHook(XACE_DEVICE_ACCESS, client, inputInfo.keyboard, TRUE)) + for (i = 0; i<32; i++) + rep.map[i] = down[i]; else -#endif - for (i = 0; i<32; i++) - rep.map[i] = down[i]; + bzero((char *)&rep.map[0], 32); + WriteReplyToClient(client, sizeof(xQueryKeymapReply), &rep); return Success; } diff --git a/dix/dispatch.c b/dix/dispatch.c index c8ee8d610..51ad07da5 100644 --- a/dix/dispatch.c +++ b/dix/dispatch.c @@ -1,5 +1,3 @@ -/* $XdotOrg: xserver/xorg/dix/dispatch.c,v 1.14 2006/02/15 20:44:12 ajax Exp $ */ -/* $Xorg: dispatch.c,v 1.5 2001/02/09 02:04:40 xorgcvs Exp $ */ /************************************************************ Copyright 1987, 1989, 1998 The Open Group @@ -76,7 +74,36 @@ Equipment Corporation. ******************************************************************/ -/* $XFree86: xc/programs/Xserver/dix/dispatch.c,v 3.32 2003/11/10 18:21:45 tsi Exp $ */ +/* XSERVER_DTRACE additions: + * Copyright 2005-2006 Sun Microsystems, Inc. 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, and/or sell copies of the Software, and to permit persons + * to whom the Software is furnished to do so, provided that the above + * copyright notice(s) and this permission notice appear in all copies of + * the Software and that both the above copyright notice(s) and this + * permission notice appear in supporting documentation. + * + * 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 + * OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR + * HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL + * INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING + * FROM LOSS OF USE, 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. + * + * Except as contained in this notice, the name of a copyright holder + * shall not be used in advertising or otherwise to promote the sale, use + * or other dealings in this Software without prior written authorization + * of the copyright holder. + */ + + #ifdef HAVE_DIX_CONFIG_H #include @@ -107,19 +134,29 @@ int ProcInitialConnection(); #include "panoramiX.h" #include "panoramiXsrv.h" #endif -#ifdef XCSECURITY -#define _SECURITY_SERVER -#include -#endif +#include "xace.h" #ifdef XAPPGROUP -#include +#include "appgroup.h" #endif #ifdef XKB +#ifndef XKB_IN_SERVER #define XKB_IN_SERVER +#endif #include "inputstr.h" #include #endif +#ifdef XSERVER_DTRACE +#include +typedef const char *string; +#include "Xserver-dtrace.h" + +char *RequestNames[256]; +static void LoadRequestNames(void); +static void FreeRequestNames(void); +#define GetRequestName(i) (RequestNames[i]) +#endif + #define mskcnt ((MAXCLIENTS + 31) / 32) #define BITMASK(i) (1U << ((i) & 31)) #define MASKIDX(i) ((i) >> 5) @@ -374,6 +411,10 @@ Dispatch(void) if (!clientReady) return; +#ifdef XSERVER_DTRACE + LoadRequestNames(); +#endif + while (!dispatchException) { if (*icheck[0] != *icheck[1]) @@ -449,12 +490,24 @@ Dispatch(void) client->requestLogIndex = 0; client->requestLog[client->requestLogIndex] = MAJOROP; client->requestLogIndex++; +#endif +#ifdef XSERVER_DTRACE + XSERVER_REQUEST_START(GetRequestName(MAJOROP), MAJOROP, + ((xReq *)client->requestBuffer)->length, + client->index, client->requestBuffer); #endif if (result > (maxBigRequestSize << 2)) result = BadLength; - else + else { + XaceHook(XACE_AUDIT_BEGIN, client); result = (* client->requestVector[MAJOROP])(client); - + XaceHook(XACE_AUDIT_END, client, result); + } +#ifdef XSERVER_DTRACE + XSERVER_REQUEST_DONE(GetRequestName(MAJOROP), MAJOROP, + client->sequence, client->index, result); +#endif + if (result != Success) { if (client->noClientException != Success) @@ -485,6 +538,9 @@ Dispatch(void) KillAllClients(); DEALLOCATE_LOCAL(clientReady); dispatchException &= ~DE_RESET; +#ifdef XSERVER_DTRACE + FreeRequestNames(); +#endif } #undef MAJOROP @@ -498,17 +554,16 @@ ProcBadRequest(ClientPtr client) int ProcCreateWindow(ClientPtr client) { - register WindowPtr pParent, pWin; + WindowPtr pParent, pWin; REQUEST(xCreateWindowReq); - int result; - int len; + int result, len, rc; REQUEST_AT_LEAST_SIZE(xCreateWindowReq); LEGAL_NEW_RESOURCE(stuff->wid, client); - if (!(pParent = (WindowPtr)SecurityLookupWindow(stuff->parent, client, - SecurityWriteAccess))) - return BadWindow; + rc = dixLookupWindow(&pParent, stuff->parent, client, DixWriteAccess); + if (rc != Success) + return rc; len = client->req_len - (sizeof(xCreateWindowReq) >> 2); if (Ones(stuff->mask) != len) return BadLength; @@ -541,16 +596,15 @@ ProcCreateWindow(ClientPtr client) int ProcChangeWindowAttributes(register ClientPtr client) { - register WindowPtr pWin; + WindowPtr pWin; REQUEST(xChangeWindowAttributesReq); register int result; - int len; + int len, rc; REQUEST_AT_LEAST_SIZE(xChangeWindowAttributesReq); - pWin = (WindowPtr)SecurityLookupWindow(stuff->window, client, - SecurityWriteAccess); - if (!pWin) - return(BadWindow); + rc = dixLookupWindow(&pWin, stuff->window, client, DixWriteAccess); + if (rc != Success) + return rc; len = client->req_len - (sizeof(xChangeWindowAttributesReq) >> 2); if (len != Ones(stuff->valueMask)) return BadLength; @@ -567,15 +621,15 @@ ProcChangeWindowAttributes(register ClientPtr client) int ProcGetWindowAttributes(register ClientPtr client) { - register WindowPtr pWin; + WindowPtr pWin; REQUEST(xResourceReq); xGetWindowAttributesReply wa; + int rc; REQUEST_SIZE_MATCH(xResourceReq); - pWin = (WindowPtr)SecurityLookupWindow(stuff->id, client, - SecurityReadAccess); - if (!pWin) - return(BadWindow); + rc = dixLookupWindow(&pWin, stuff->id, client, DixReadAccess); + if (rc != Success) + return rc; GetWindowAttributes(pWin, client, &wa); WriteReplyToClient(client, sizeof(xGetWindowAttributesReply), &wa); return(client->noClientException); @@ -584,14 +638,14 @@ ProcGetWindowAttributes(register ClientPtr client) int ProcDestroyWindow(register ClientPtr client) { - register WindowPtr pWin; + WindowPtr pWin; REQUEST(xResourceReq); + int rc; REQUEST_SIZE_MATCH(xResourceReq); - pWin = (WindowPtr)SecurityLookupWindow(stuff->id, client, - SecurityDestroyAccess); - if (!pWin) - return(BadWindow); + rc = dixLookupWindow(&pWin, stuff->id, client, DixDestroyAccess); + if (rc != Success) + return rc; if (pWin->parent) FreeResource(stuff->id, RT_NONE); return(client->noClientException); @@ -600,14 +654,14 @@ ProcDestroyWindow(register ClientPtr client) int ProcDestroySubwindows(register ClientPtr client) { - register WindowPtr pWin; + WindowPtr pWin; REQUEST(xResourceReq); + int rc; REQUEST_SIZE_MATCH(xResourceReq); - pWin = (WindowPtr)SecurityLookupWindow(stuff->id, client, - SecurityDestroyAccess); - if (!pWin) - return(BadWindow); + rc = dixLookupWindow(&pWin, stuff->id, client, DixDestroyAccess); + if (rc != Success) + return rc; DestroySubwindows(pWin, client); return(client->noClientException); } @@ -615,15 +669,14 @@ ProcDestroySubwindows(register ClientPtr client) int ProcChangeSaveSet(register ClientPtr client) { - register WindowPtr pWin; + WindowPtr pWin; REQUEST(xChangeSaveSetReq); - register int result; + register int result, rc; REQUEST_SIZE_MATCH(xChangeSaveSetReq); - pWin = (WindowPtr)SecurityLookupWindow(stuff->window, client, - SecurityReadAccess); - if (!pWin) - return(BadWindow); + rc = dixLookupWindow(&pWin, stuff->window, client, DixReadAccess); + if (rc != Success) + return rc; if (client->clientAsMask == (CLIENT_BITS(pWin->drawable.id))) return BadMatch; if ((stuff->mode == SetModeInsert) || (stuff->mode == SetModeDelete)) @@ -644,19 +697,17 @@ ProcChangeSaveSet(register ClientPtr client) int ProcReparentWindow(register ClientPtr client) { - register WindowPtr pWin, pParent; + WindowPtr pWin, pParent; REQUEST(xReparentWindowReq); - register int result; + register int result, rc; REQUEST_SIZE_MATCH(xReparentWindowReq); - pWin = (WindowPtr)SecurityLookupWindow(stuff->window, client, - SecurityWriteAccess); - if (!pWin) - return(BadWindow); - pParent = (WindowPtr)SecurityLookupWindow(stuff->parent, client, - SecurityWriteAccess); - if (!pParent) - return(BadWindow); + rc = dixLookupWindow(&pWin, stuff->window, client, DixWriteAccess); + if (rc != Success) + return rc; + rc = dixLookupWindow(&pParent, stuff->parent, client, DixWriteAccess); + if (rc != Success) + return rc; if (SAME_SCREENS(pWin->drawable, pParent->drawable)) { if ((pWin->backgroundState == ParentRelative) && @@ -679,14 +730,14 @@ ProcReparentWindow(register ClientPtr client) int ProcMapWindow(register ClientPtr client) { - register WindowPtr pWin; + WindowPtr pWin; REQUEST(xResourceReq); + int rc; REQUEST_SIZE_MATCH(xResourceReq); - pWin = (WindowPtr)SecurityLookupWindow(stuff->id, client, - SecurityReadAccess); - if (!pWin) - return(BadWindow); + rc = dixLookupWindow(&pWin, stuff->id, client, DixReadAccess); + if (rc != Success) + return rc; MapWindow(pWin, client); /* update cache to say it is mapped */ return(client->noClientException); @@ -695,14 +746,14 @@ ProcMapWindow(register ClientPtr client) int ProcMapSubwindows(register ClientPtr client) { - register WindowPtr pWin; + WindowPtr pWin; REQUEST(xResourceReq); + int rc; REQUEST_SIZE_MATCH(xResourceReq); - pWin = (WindowPtr)SecurityLookupWindow( stuff->id, client, - SecurityReadAccess); - if (!pWin) - return(BadWindow); + rc = dixLookupWindow(&pWin, stuff->id, client, DixReadAccess); + if (rc != Success) + return rc; MapSubwindows(pWin, client); /* update cache to say it is mapped */ return(client->noClientException); @@ -711,14 +762,14 @@ ProcMapSubwindows(register ClientPtr client) int ProcUnmapWindow(register ClientPtr client) { - register WindowPtr pWin; + WindowPtr pWin; REQUEST(xResourceReq); + int rc; REQUEST_SIZE_MATCH(xResourceReq); - pWin = (WindowPtr)SecurityLookupWindow( stuff->id, client, - SecurityReadAccess); - if (!pWin) - return(BadWindow); + rc = dixLookupWindow(&pWin, stuff->id, client, DixReadAccess); + if (rc != Success) + return rc; UnmapWindow(pWin, FALSE); /* update cache to say it is mapped */ return(client->noClientException); @@ -727,14 +778,14 @@ ProcUnmapWindow(register ClientPtr client) int ProcUnmapSubwindows(register ClientPtr client) { - register WindowPtr pWin; + WindowPtr pWin; REQUEST(xResourceReq); + int rc; REQUEST_SIZE_MATCH(xResourceReq); - pWin = (WindowPtr)SecurityLookupWindow( stuff->id, client, - SecurityReadAccess); - if (!pWin) - return(BadWindow); + rc = dixLookupWindow(&pWin, stuff->id, client, DixReadAccess); + if (rc != Success) + return rc; UnmapSubwindows(pWin); return(client->noClientException); } @@ -742,16 +793,15 @@ ProcUnmapSubwindows(register ClientPtr client) int ProcConfigureWindow(register ClientPtr client) { - register WindowPtr pWin; + WindowPtr pWin; REQUEST(xConfigureWindowReq); register int result; - int len; + int len, rc; REQUEST_AT_LEAST_SIZE(xConfigureWindowReq); - pWin = (WindowPtr)SecurityLookupWindow( stuff->window, client, - SecurityWriteAccess); - if (!pWin) - return(BadWindow); + rc = dixLookupWindow(&pWin, stuff->window, client, DixWriteAccess); + if (rc != Success) + return rc; len = client->req_len - (sizeof(xConfigureWindowReq) >> 2); if (Ones((Mask)stuff->mask) != len) return BadLength; @@ -766,8 +816,9 @@ ProcConfigureWindow(register ClientPtr client) int ProcCirculateWindow(register ClientPtr client) { - register WindowPtr pWin; + WindowPtr pWin; REQUEST(xCirculateWindowReq); + int rc; REQUEST_SIZE_MATCH(xCirculateWindowReq); if ((stuff->direction != RaiseLowest) && @@ -776,10 +827,9 @@ ProcCirculateWindow(register ClientPtr client) client->errorValue = stuff->direction; return BadValue; } - pWin = (WindowPtr)SecurityLookupWindow(stuff->window, client, - SecurityWriteAccess); - if (!pWin) - return(BadWindow); + rc = dixLookupWindow(&pWin, stuff->window, client, DixWriteAccess); + if (rc != Success) + return rc; CirculateWindow(pWin, (int)stuff->direction, client); return(client->noClientException); } @@ -787,11 +837,15 @@ ProcCirculateWindow(register ClientPtr client) int GetGeometry(register ClientPtr client, xGetGeometryReply *rep) { - register DrawablePtr pDraw; + DrawablePtr pDraw; + int rc; REQUEST(xResourceReq); - REQUEST_SIZE_MATCH(xResourceReq); - SECURITY_VERIFY_GEOMETRABLE (pDraw, stuff->id, client, SecurityReadAccess); + + rc = dixLookupDrawable(&pDraw, stuff->id, client, M_ANY, DixReadAccess); + if (rc != Success) + return rc; + rep->type = X_Reply; rep->length = 0; rep->sequenceNumber = client->sequence; @@ -843,16 +897,15 @@ int ProcQueryTree(register ClientPtr client) { xQueryTreeReply reply; - int numChildren = 0; - register WindowPtr pChild, pWin, pHead; + int rc, numChildren = 0; + WindowPtr pChild, pWin, pHead; Window *childIDs = (Window *)NULL; REQUEST(xResourceReq); REQUEST_SIZE_MATCH(xResourceReq); - pWin = (WindowPtr)SecurityLookupWindow(stuff->id, client, - SecurityReadAccess); - if (!pWin) - return(BadWindow); + rc = dixLookupWindow(&pWin, stuff->id, client, DixReadAccess); + if (rc != Success) + return rc; reply.type = X_Reply; reply.root = WindowTable[pWin->drawable.pScreen->myNum]->drawable.id; reply.sequenceNumber = client->sequence; @@ -965,10 +1018,9 @@ ProcSetSelectionOwner(register ClientPtr client) return Success; if (stuff->window != None) { - pWin = (WindowPtr)SecurityLookupWindow(stuff->window, client, - SecurityReadAccess); - if (!pWin) - return(BadWindow); + int rc = dixLookupWindow(&pWin, stuff->window, client, DixReadAccess); + if (rc != Success) + return rc; } else pWin = (WindowPtr)None; @@ -1082,12 +1134,12 @@ ProcConvertSelection(register ClientPtr client) xEvent event; WindowPtr pWin; REQUEST(xConvertSelectionReq); + int rc; REQUEST_SIZE_MATCH(xConvertSelectionReq); - pWin = (WindowPtr)SecurityLookupWindow(stuff->requestor, client, - SecurityReadAccess); - if (!pWin) - return(BadWindow); + rc = dixLookupWindow(&pWin, stuff->requestor, client, DixReadAccess); + if (rc != Success) + return rc; paramsOkay = (ValidAtom(stuff->selection) && ValidAtom(stuff->target)); if (stuff->property != None) @@ -1099,15 +1151,11 @@ ProcConvertSelection(register ClientPtr client) i = 0; while ((i < NumCurrentSelections) && CurrentSelections[i].selection != stuff->selection) i++; - if ((i < NumCurrentSelections) && - (CurrentSelections[i].window != None) -#ifdef XCSECURITY - && (!client->CheckAccess || - (* client->CheckAccess)(client, CurrentSelections[i].window, - RT_WINDOW, SecurityReadAccess, - CurrentSelections[i].pWin)) -#endif - ) + if ((i < NumCurrentSelections) && + (CurrentSelections[i].window != None) && + XaceHook(XACE_RESOURCE_ACCESS, client, + CurrentSelections[i].window, RT_WINDOW, + DixReadAccess, CurrentSelections[i].pWin)) { event.u.u.type = SelectionRequest; event.u.selectionRequest.time = stuff->time; @@ -1206,18 +1254,17 @@ ProcTranslateCoords(register ClientPtr client) { REQUEST(xTranslateCoordsReq); - register WindowPtr pWin, pDst; + WindowPtr pWin, pDst; xTranslateCoordsReply rep; + int rc; 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; @@ -1306,7 +1353,7 @@ ProcCloseFont(register ClientPtr client) REQUEST_SIZE_MATCH(xResourceReq); pFont = (FontPtr)SecurityLookupIDByType(client, stuff->id, RT_FONT, - SecurityDestroyAccess); + DixDestroyAccess); if ( pFont != (FontPtr)NULL) /* id was valid */ { FreeResource(stuff->id, RT_NONE); @@ -1330,12 +1377,11 @@ ProcQueryFont(register ClientPtr client) REQUEST_SIZE_MATCH(xResourceReq); client->errorValue = stuff->id; /* EITHER font or gc */ pFont = (FontPtr)SecurityLookupIDByType(client, stuff->id, RT_FONT, - SecurityReadAccess); + DixReadAccess); if (!pFont) { - /* can't use VERIFY_GC because it might return BadGC */ pGC = (GC *) SecurityLookupIDByType(client, stuff->id, RT_GC, - SecurityReadAccess); + DixReadAccess); if (!pGC) { client->errorValue = stuff->id; @@ -1391,11 +1437,11 @@ ProcQueryTextExtents(register ClientPtr client) REQUEST_AT_LEAST_SIZE(xQueryTextExtentsReq); pFont = (FontPtr)SecurityLookupIDByType(client, stuff->fid, RT_FONT, - SecurityReadAccess); + DixReadAccess); if (!pFont) { pGC = (GC *)SecurityLookupIDByType(client, stuff->fid, RT_GC, - SecurityReadAccess); + DixReadAccess); if (!pGC) { client->errorValue = stuff->fid; @@ -1465,16 +1511,20 @@ int ProcCreatePixmap(register ClientPtr client) { PixmapPtr pMap; - register DrawablePtr pDraw; + DrawablePtr pDraw; REQUEST(xCreatePixmapReq); DepthPtr pDepth; - register int i; + register int i, rc; REQUEST_SIZE_MATCH(xCreatePixmapReq); client->errorValue = stuff->pid; LEGAL_NEW_RESOURCE(stuff->pid, client); - SECURITY_VERIFY_GEOMETRABLE (pDraw, stuff->drawable, client, - SecurityReadAccess); + + rc = dixLookupDrawable(&pDraw, stuff->drawable, client, M_ANY, + DixReadAccess); + if (rc != Success) + return rc; + if (!stuff->width || !stuff->height) { client->errorValue = 0; @@ -1529,7 +1579,7 @@ ProcFreePixmap(register ClientPtr client) REQUEST_SIZE_MATCH(xResourceReq); pMap = (PixmapPtr)SecurityLookupIDByType(client, stuff->id, RT_PIXMAP, - SecurityDestroyAccess); + DixDestroyAccess); if (pMap) { FreeResource(stuff->id, RT_NONE); @@ -1545,17 +1595,19 @@ ProcFreePixmap(register ClientPtr client) int ProcCreateGC(register ClientPtr client) { - int error; + int error, rc; GC *pGC; - register DrawablePtr pDraw; + DrawablePtr pDraw; unsigned len; REQUEST(xCreateGCReq); REQUEST_AT_LEAST_SIZE(xCreateGCReq); client->errorValue = stuff->gc; LEGAL_NEW_RESOURCE(stuff->gc, client); - SECURITY_VERIFY_DRAWABLE (pDraw, stuff->drawable, client, - SecurityReadAccess); + rc = dixLookupDrawable(&pDraw, stuff->drawable, client, 0, DixReadAccess); + if (rc != Success) + return rc; + len = client->req_len - (sizeof(xCreateGCReq) >> 2); if (len != Ones(stuff->mask)) return BadLength; @@ -1572,12 +1624,15 @@ int ProcChangeGC(register ClientPtr client) { GC *pGC; - REQUEST(xChangeGCReq); int result; unsigned len; - + REQUEST(xChangeGCReq); REQUEST_AT_LEAST_SIZE(xChangeGCReq); - SECURITY_VERIFY_GC(pGC, stuff->gc, client, SecurityWriteAccess); + + result = dixLookupGC(&pGC, stuff->gc, client, DixWriteAccess); + if (result != Success) + return result; + len = client->req_len - (sizeof(xChangeGCReq) >> 2); if (len != Ones(stuff->mask)) return BadLength; @@ -1595,14 +1650,18 @@ ProcChangeGC(register ClientPtr client) int ProcCopyGC(register ClientPtr client) { - register GC *dstGC; - register GC *pGC; + GC *dstGC; + GC *pGC; int result; REQUEST(xCopyGCReq); - REQUEST_SIZE_MATCH(xCopyGCReq); - SECURITY_VERIFY_GC( pGC, stuff->srcGC, client, SecurityReadAccess); - SECURITY_VERIFY_GC( dstGC, stuff->dstGC, client, SecurityWriteAccess); + + result = dixLookupGC(&pGC, stuff->srcGC, client, DixReadAccess); + if (result != Success) + return result; + result = dixLookupGC(&dstGC, stuff->dstGC, client, DixWriteAccess); + if (result != Success) + return result; if ((dstGC->pScreen != pGC->pScreen) || (dstGC->depth != pGC->depth)) return (BadMatch); result = CopyGC(pGC, dstGC, stuff->mask); @@ -1618,7 +1677,7 @@ ProcCopyGC(register ClientPtr client) int ProcSetDashes(register ClientPtr client) { - register GC *pGC; + GC *pGC; int result; REQUEST(xSetDashesReq); @@ -1629,7 +1688,9 @@ ProcSetDashes(register ClientPtr client) return BadValue; } - SECURITY_VERIFY_GC(pGC,stuff->gc, client, SecurityWriteAccess); + result = dixLookupGC(&pGC,stuff->gc, client, DixWriteAccess); + if (result != Success) + return result; result = SetDashes(pGC, stuff->dashOffset, stuff->nDashes, (unsigned char *)&stuff[1]); @@ -1645,9 +1706,8 @@ ProcSetDashes(register ClientPtr client) int ProcSetClipRectangles(register ClientPtr client) { - int nr; - int result; - register GC *pGC; + int nr, result; + GC *pGC; REQUEST(xSetClipRectanglesReq); REQUEST_AT_LEAST_SIZE(xSetClipRectanglesReq); @@ -1657,7 +1717,9 @@ ProcSetClipRectangles(register ClientPtr client) client->errorValue = stuff->ordering; return BadValue; } - SECURITY_VERIFY_GC(pGC,stuff->gc, client, SecurityWriteAccess); + result = dixLookupGC(&pGC,stuff->gc, client, DixWriteAccess); + if (result != Success) + return result; nr = (client->req_len << 2) - sizeof(xSetClipRectanglesReq); if (nr & 4) @@ -1674,11 +1736,15 @@ ProcSetClipRectangles(register ClientPtr client) int ProcFreeGC(register ClientPtr client) { - register GC *pGC; + GC *pGC; + int rc; REQUEST(xResourceReq); - REQUEST_SIZE_MATCH(xResourceReq); - SECURITY_VERIFY_GC(pGC, stuff->id, client, SecurityDestroyAccess); + + rc = dixLookupGC(&pGC, stuff->id, client, DixDestroyAccess); + if (rc != Success) + return rc; + FreeResource(stuff->id, RT_NONE); return(client->noClientException); } @@ -1687,13 +1753,13 @@ int ProcClearToBackground(register ClientPtr client) { REQUEST(xClearAreaReq); - register WindowPtr pWin; + WindowPtr pWin; + int rc; REQUEST_SIZE_MATCH(xClearAreaReq); - pWin = (WindowPtr)SecurityLookupWindow(stuff->window, client, - SecurityWriteAccess); - if (!pWin) - return(BadWindow); + rc = dixLookupWindow(&pWin, stuff->window, client, DixWriteAccess); + if (rc != Success) + return rc; if (pWin->drawable.class == InputOnly) { client->errorValue = stuff->window; @@ -1713,19 +1779,22 @@ ProcClearToBackground(register ClientPtr client) int ProcCopyArea(register ClientPtr client) { - register DrawablePtr pDst; - register DrawablePtr pSrc; - register GC *pGC; + DrawablePtr pDst; + DrawablePtr pSrc; + GC *pGC; REQUEST(xCopyAreaReq); RegionPtr pRgn; + int rc; REQUEST_SIZE_MATCH(xCopyAreaReq); 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; @@ -1754,18 +1823,22 @@ ProcCopyArea(register ClientPtr client) int ProcCopyPlane(register ClientPtr client) { - register DrawablePtr psrcDraw, pdstDraw; - register GC *pGC; + DrawablePtr psrcDraw, pdstDraw; + GC *pGC; REQUEST(xCopyPlaneReq); RegionPtr pRgn; + int rc; REQUEST_SIZE_MATCH(xCopyPlaneReq); 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; @@ -1802,8 +1875,8 @@ int ProcPolyPoint(register ClientPtr client) { int npoint; - register GC *pGC; - register DrawablePtr pDraw; + GC *pGC; + DrawablePtr pDraw; REQUEST(xPolyPointReq); REQUEST_AT_LEAST_SIZE(xPolyPointReq); @@ -1825,8 +1898,8 @@ int ProcPolyLine(register ClientPtr client) { int npoint; - register GC *pGC; - register DrawablePtr pDraw; + GC *pGC; + DrawablePtr pDraw; REQUEST(xPolyLineReq); REQUEST_AT_LEAST_SIZE(xPolyLineReq); @@ -1848,8 +1921,8 @@ int ProcPolySegment(register ClientPtr client) { int nsegs; - register GC *pGC; - register DrawablePtr pDraw; + GC *pGC; + DrawablePtr pDraw; REQUEST(xPolySegmentReq); REQUEST_AT_LEAST_SIZE(xPolySegmentReq); @@ -1867,8 +1940,8 @@ int ProcPolyRectangle (register ClientPtr client) { int nrects; - register GC *pGC; - register DrawablePtr pDraw; + GC *pGC; + DrawablePtr pDraw; REQUEST(xPolyRectangleReq); REQUEST_AT_LEAST_SIZE(xPolyRectangleReq); @@ -1887,8 +1960,8 @@ int ProcPolyArc(register ClientPtr client) { int narcs; - register GC *pGC; - register DrawablePtr pDraw; + GC *pGC; + DrawablePtr pDraw; REQUEST(xPolyArcReq); REQUEST_AT_LEAST_SIZE(xPolyArcReq); @@ -1906,8 +1979,8 @@ int ProcFillPoly(register ClientPtr client) { int things; - register GC *pGC; - register DrawablePtr pDraw; + GC *pGC; + DrawablePtr pDraw; REQUEST(xFillPolyReq); REQUEST_AT_LEAST_SIZE(xFillPolyReq); @@ -1937,8 +2010,8 @@ int ProcPolyFillRectangle(register ClientPtr client) { int things; - register GC *pGC; - register DrawablePtr pDraw; + GC *pGC; + DrawablePtr pDraw; REQUEST(xPolyFillRectangleReq); REQUEST_AT_LEAST_SIZE(xPolyFillRectangleReq); @@ -1958,8 +2031,8 @@ int ProcPolyFillArc(register ClientPtr client) { int narcs; - register GC *pGC; - register DrawablePtr pDraw; + GC *pGC; + DrawablePtr pDraw; REQUEST(xPolyFillArcReq); REQUEST_AT_LEAST_SIZE(xPolyFillArcReq); @@ -2030,8 +2103,8 @@ ReformatImage (char *base, int nbytes, int bpp, int order) int ProcPutImage(register ClientPtr client) { - register GC *pGC; - register DrawablePtr pDraw; + GC *pGC; + DrawablePtr pDraw; long length; /* length of scanline server padded */ long lengthProto; /* length of scanline protocol padded */ char *tmpImage; @@ -2090,23 +2163,24 @@ DoGetImage(register ClientPtr client, int format, Drawable drawable, int x, int y, int width, int height, Mask planemask, xGetImageReply **im_return) { - register DrawablePtr pDraw; - int nlines, linesPerBuf; + DrawablePtr pDraw; + int nlines, linesPerBuf, rc; register int linesDone; long widthBytesLine, length; Mask plane = 0; char *pBuf; xGetImageReply xgi; -#ifdef XCSECURITY RegionPtr pVisibleRegion = NULL; -#endif if ((format != XYPixmap) && (format != ZPixmap)) { client->errorValue = format; return(BadValue); } - SECURITY_VERIFY_DRAWABLE(pDraw, drawable, client, SecurityReadAccess); + rc = dixLookupDrawable(&pDraw, drawable, client, 0, DixReadAccess); + if (rc != Success) + return rc; + if(pDraw->type == DRAWABLE_WINDOW) { if( /* check for being viewable */ @@ -2203,17 +2277,16 @@ DoGetImage(register ClientPtr client, int format, Drawable drawable, WriteReplyToClient(client, sizeof (xGetImageReply), &xgi); } -#ifdef XCSECURITY - if (client->trustLevel != XSecurityClientTrusted && - pDraw->type == DRAWABLE_WINDOW) + if (pDraw->type == DRAWABLE_WINDOW && + !XaceHook(XACE_DRAWABLE_ACCESS, client, pDraw)) { pVisibleRegion = NotClippedByChildren((WindowPtr)pDraw); if (pVisibleRegion) { - REGION_TRANSLATE(pDraw->pScreen, pVisibleRegion, -pDraw->x, -pDraw->y); + REGION_TRANSLATE(pDraw->pScreen, pVisibleRegion, + -pDraw->x, -pDraw->y); } } -#endif if (linesPerBuf == 0) { @@ -2233,12 +2306,10 @@ DoGetImage(register ClientPtr client, int format, Drawable drawable, format, planemask, (pointer) pBuf); -#ifdef XCSECURITY if (pVisibleRegion) - SecurityCensorImage(client, pVisibleRegion, widthBytesLine, + XaceCensorImage(client, pVisibleRegion, widthBytesLine, pDraw, x, y + linesDone, width, nlines, format, pBuf); -#endif /* Note that this is NOT a call to WriteSwappedDataToClient, as we do NOT byte swap */ @@ -2274,13 +2345,11 @@ DoGetImage(register ClientPtr client, int format, Drawable drawable, format, plane, (pointer)pBuf); -#ifdef XCSECURITY if (pVisibleRegion) - SecurityCensorImage(client, pVisibleRegion, + XaceCensorImage(client, pVisibleRegion, widthBytesLine, pDraw, x, y + linesDone, width, nlines, format, pBuf); -#endif /* Note: NOT a call to WriteSwappedDataToClient, as we do NOT byte swap */ @@ -2302,10 +2371,8 @@ DoGetImage(register ClientPtr client, int format, Drawable drawable, } } } -#ifdef XCSECURITY if (pVisibleRegion) REGION_DESTROY(pDraw->pScreen, pVisibleRegion); -#endif if (!im_return) DEALLOCATE_LOCAL(pBuf); return (client->noClientException); @@ -2357,8 +2424,8 @@ int ProcImageText8(register ClientPtr client) { int err; - register DrawablePtr pDraw; - register GC *pGC; + DrawablePtr pDraw; + GC *pGC; REQUEST(xImageTextReq); @@ -2387,8 +2454,8 @@ int ProcImageText16(register ClientPtr client) { int err; - register DrawablePtr pDraw; - register GC *pGC; + DrawablePtr pDraw; + GC *pGC; REQUEST(xImageTextReq); @@ -2420,7 +2487,7 @@ ProcCreateColormap(register ClientPtr client) VisualPtr pVisual; ColormapPtr pmap; Colormap mid; - register WindowPtr pWin; + WindowPtr pWin; ScreenPtr pScreen; REQUEST(xCreateColormapReq); int i, result; @@ -2434,10 +2501,9 @@ ProcCreateColormap(register ClientPtr client) } mid = stuff->mid; LEGAL_NEW_RESOURCE(mid, client); - pWin = (WindowPtr)SecurityLookupWindow(stuff->window, client, - SecurityReadAccess); - if (!pWin) - return(BadWindow); + result = dixLookupWindow(&pWin, stuff->window, client, DixReadAccess); + if (result != Success) + return result; pScreen = pWin->drawable.pScreen; for (i = 0, pVisual = pScreen->visuals; @@ -2454,7 +2520,7 @@ ProcCreateColormap(register ClientPtr client) return(result); } client->errorValue = stuff->visual; - return(BadValue); + return(BadMatch); } int @@ -2465,7 +2531,7 @@ ProcFreeColormap(register ClientPtr client) REQUEST_SIZE_MATCH(xResourceReq); pmap = (ColormapPtr )SecurityLookupIDByType(client, stuff->id, RT_COLORMAP, - SecurityDestroyAccess); + DixDestroyAccess); if (pmap) { /* Freeing a default colormap is a no-op */ @@ -2493,7 +2559,7 @@ ProcCopyColormapAndFree(register ClientPtr client) mid = stuff->mid; LEGAL_NEW_RESOURCE(mid, client); if( (pSrcMap = (ColormapPtr )SecurityLookupIDByType(client, stuff->srcCmap, - RT_COLORMAP, SecurityReadAccess|SecurityWriteAccess)) ) + RT_COLORMAP, DixReadAccess|DixWriteAccess)) ) { result = CopyColormapAndFree(mid, pSrcMap, client->index); if (client->noClientException != Success) @@ -2516,7 +2582,7 @@ ProcInstallColormap(register ClientPtr client) REQUEST_SIZE_MATCH(xResourceReq); pcmp = (ColormapPtr)SecurityLookupIDByType(client, stuff->id, - RT_COLORMAP, SecurityReadAccess); + RT_COLORMAP, DixReadAccess); if (pcmp) { (*(pcmp->pScreen->InstallColormap)) (pcmp); @@ -2537,7 +2603,7 @@ ProcUninstallColormap(register ClientPtr client) REQUEST_SIZE_MATCH(xResourceReq); pcmp = (ColormapPtr)SecurityLookupIDByType(client, stuff->id, - RT_COLORMAP, SecurityReadAccess); + RT_COLORMAP, DixReadAccess); if (pcmp) { if(pcmp->mid != pcmp->pScreen->defColormap) @@ -2555,16 +2621,14 @@ int ProcListInstalledColormaps(register ClientPtr client) { xListInstalledColormapsReply *preply; - int nummaps; + int nummaps, rc; WindowPtr pWin; REQUEST(xResourceReq); REQUEST_SIZE_MATCH(xResourceReq); - pWin = (WindowPtr)SecurityLookupWindow(stuff->id, client, - SecurityReadAccess); - - if (!pWin) - return(BadWindow); + rc = dixLookupWindow(&pWin, stuff->id, client, DixReadAccess); + if (rc != Success) + return rc; preply = (xListInstalledColormapsReply *) ALLOCATE_LOCAL(sizeof(xListInstalledColormapsReply) + @@ -2596,7 +2660,7 @@ ProcAllocColor (register ClientPtr client) REQUEST_SIZE_MATCH(xAllocColorReq); pmap = (ColormapPtr)SecurityLookupIDByType(client, stuff->cmap, - RT_COLORMAP, SecurityWriteAccess); + RT_COLORMAP, DixWriteAccess); if (pmap) { acr.type = X_Reply; @@ -2636,7 +2700,7 @@ ProcAllocNamedColor (register ClientPtr client) REQUEST_FIXED_SIZE(xAllocNamedColorReq, stuff->nbytes); pcmp = (ColormapPtr)SecurityLookupIDByType(client, stuff->cmap, - RT_COLORMAP, SecurityWriteAccess); + RT_COLORMAP, DixWriteAccess); if (pcmp) { int retval; @@ -2688,7 +2752,7 @@ ProcAllocColorCells (register ClientPtr client) REQUEST_SIZE_MATCH(xAllocColorCellsReq); pcmp = (ColormapPtr)SecurityLookupIDByType(client, stuff->cmap, - RT_COLORMAP, SecurityWriteAccess); + RT_COLORMAP, DixWriteAccess); if (pcmp) { xAllocColorCellsReply accr; @@ -2754,7 +2818,7 @@ ProcAllocColorPlanes(register ClientPtr client) REQUEST_SIZE_MATCH(xAllocColorPlanesReq); pcmp = (ColormapPtr)SecurityLookupIDByType(client, stuff->cmap, - RT_COLORMAP, SecurityWriteAccess); + RT_COLORMAP, DixWriteAccess); if (pcmp) { xAllocColorPlanesReply acpr; @@ -2818,7 +2882,7 @@ ProcFreeColors(register ClientPtr client) REQUEST_AT_LEAST_SIZE(xFreeColorsReq); pcmp = (ColormapPtr)SecurityLookupIDByType(client, stuff->cmap, - RT_COLORMAP, SecurityWriteAccess); + RT_COLORMAP, DixWriteAccess); if (pcmp) { int count; @@ -2853,7 +2917,7 @@ ProcStoreColors (ClientPtr client) REQUEST_AT_LEAST_SIZE(xStoreColorsReq); pcmp = (ColormapPtr)SecurityLookupIDByType(client, stuff->cmap, - RT_COLORMAP, SecurityWriteAccess); + RT_COLORMAP, DixWriteAccess); if (pcmp) { int count; @@ -2887,7 +2951,7 @@ ProcStoreNamedColor (register ClientPtr client) REQUEST_FIXED_SIZE(xStoreNamedColorReq, stuff->nbytes); pcmp = (ColormapPtr)SecurityLookupIDByType(client, stuff->cmap, - RT_COLORMAP, SecurityWriteAccess); + RT_COLORMAP, DixWriteAccess); if (pcmp) { xColorItem def; @@ -2921,7 +2985,7 @@ ProcQueryColors(register ClientPtr client) REQUEST_AT_LEAST_SIZE(xQueryColorsReq); pcmp = (ColormapPtr)SecurityLookupIDByType(client, stuff->cmap, - RT_COLORMAP, SecurityReadAccess); + RT_COLORMAP, DixReadAccess); if (pcmp) { int count, retval; @@ -2972,7 +3036,7 @@ ProcLookupColor(register ClientPtr client) REQUEST_FIXED_SIZE(xLookupColorReq, stuff->nbytes); pcmp = (ColormapPtr)SecurityLookupIDByType(client, stuff->cmap, - RT_COLORMAP, SecurityReadAccess); + RT_COLORMAP, DixReadAccess); if (pcmp) { xLookupColorReply lcr; @@ -3022,9 +3086,9 @@ ProcCreateCursor (register ClientPtr client) LEGAL_NEW_RESOURCE(stuff->cid, client); src = (PixmapPtr)SecurityLookupIDByType(client, stuff->source, - RT_PIXMAP, SecurityReadAccess); + RT_PIXMAP, DixReadAccess); msk = (PixmapPtr)SecurityLookupIDByType(client, stuff->mask, - RT_PIXMAP, SecurityReadAccess); + RT_PIXMAP, DixReadAccess); if ( src == (PixmapPtr)NULL) { client->errorValue = stuff->source; @@ -3124,7 +3188,7 @@ ProcFreeCursor (register ClientPtr client) REQUEST_SIZE_MATCH(xResourceReq); pCursor = (CursorPtr)SecurityLookupIDByType(client, stuff->id, - RT_CURSOR, SecurityDestroyAccess); + RT_CURSOR, DixDestroyAccess); if (pCursor) { FreeResource(stuff->id, RT_NONE); @@ -3141,11 +3205,12 @@ int ProcQueryBestSize (register ClientPtr client) { xQueryBestSizeReply reply; - register DrawablePtr pDraw; + DrawablePtr pDraw; ScreenPtr pScreen; + int rc; REQUEST(xQueryBestSizeReq); - REQUEST_SIZE_MATCH(xQueryBestSizeReq); + if ((stuff->class != CursorShape) && (stuff->class != TileShape) && (stuff->class != StippleShape)) @@ -3153,8 +3218,11 @@ ProcQueryBestSize (register ClientPtr client) client->errorValue = stuff->class; return(BadValue); } - SECURITY_VERIFY_GEOMETRABLE (pDraw, stuff->drawable, client, - SecurityReadAccess); + + rc = dixLookupDrawable(&pDraw, stuff->drawable, client, M_ANY, + DixReadAccess); + if (rc != Success) + return rc; if (stuff->class != CursorShape && pDraw->type == UNDRAWABLE_WINDOW) return (BadMatch); pScreen = pDraw->pScreen; @@ -3276,14 +3344,11 @@ ProcListHosts(register ClientPtr client) /* REQUEST(xListHostsReq); */ REQUEST_SIZE_MATCH(xListHostsReq); -#ifdef XCSECURITY + /* untrusted clients can't list hosts */ - if (client->trustLevel != XSecurityClientTrusted) - { - SecurityAudit("client %d attempted to list hosts\n", client->index); + if (!XaceHook(XACE_HOSTLIST_ACCESS, client, DixReadAccess)) return BadAccess; - } -#endif + result = GetHosts(&pdata, &nHosts, &len, &reply.enabled); if (result != Success) return(result); @@ -3323,7 +3388,8 @@ int ProcKillClient(register ClientPtr client) { REQUEST(xResourceReq); - ClientPtr killclient; + ClientPtr killclient; + int rc; REQUEST_SIZE_MATCH(xResourceReq); if (stuff->id == AllTemporary) @@ -3332,8 +3398,8 @@ ProcKillClient(register ClientPtr client) return (client->noClientException); } - if ((killclient = LookupClient(stuff->id, client))) - { + rc = dixLookupClient(&killclient, stuff->id, client, DixDestroyAccess); + if (rc == Success) { CloseDownClient(killclient); /* if an LBX proxy gets killed, isItTimeToYield will be set */ if (isItTimeToYield || (client == killclient)) @@ -3347,10 +3413,7 @@ ProcKillClient(register ClientPtr client) return (client->noClientException); } else - { - client->errorValue = stuff->id; - return (BadValue); - } + return rc; } int @@ -3561,6 +3624,9 @@ CloseDownClient(register ClientPtr client) CallCallbacks((&ClientStateCallback), (pointer)&clientinfo); } FreeClientResources(client); +#ifdef XSERVER_DTRACE + XSERVER_CLIENT_DISCONNECT(client->index); +#endif if (client->index < nextFreeClientID) nextFreeClientID = client->index; clients[client->index] = NullClient; @@ -3608,6 +3674,10 @@ CloseDownRetainedResources() } } +extern int clientPrivateLen; +extern unsigned *clientPrivateSizes; +extern unsigned totalClientSize; + void InitClient(ClientPtr client, int i, pointer ospriv) { client->index = i; @@ -3648,11 +3718,6 @@ void InitClient(ClientPtr client, int i, pointer ospriv) } #endif client->replyBytesRemaining = 0; -#ifdef XCSECURITY - client->trustLevel = XSecurityClientTrusted; - client->CheckAccess = NULL; - client->authId = 0; -#endif #ifdef XAPPGROUP client->appgroup = NULL; #endif @@ -3665,10 +3730,6 @@ void InitClient(ClientPtr client, int i, pointer ospriv) #endif } -extern int clientPrivateLen; -extern unsigned *clientPrivateSizes; -extern unsigned totalClientSize; - int InitClientPrivates(ClientPtr client) { @@ -3701,6 +3762,17 @@ InitClientPrivates(ClientPtr client) else ppriv->ptr = (pointer)NULL; } + + /* Allow registrants to initialize the serverClient devPrivates */ + if (!client->index && ClientStateCallback) + { + NewClientInfoRec clientinfo; + + clientinfo.client = client; + clientinfo.prefix = (xConnSetupPrefix *)NULL; + clientinfo.setup = (xConnSetup *) NULL; + CallCallbacks((&ClientStateCallback), (pointer)&clientinfo); + } return 1; } @@ -3980,3 +4052,60 @@ MarkClientException(ClientPtr client) { client->noClientException = -1; } + +#ifdef XSERVER_DTRACE +#include + +/* Load table of request names for dtrace probes */ +static void LoadRequestNames(void) +{ + int i; + FILE *xedb; + extern void LoadExtensionNames(char **RequestNames); + + bzero(RequestNames, 256 * sizeof(char *)); + + xedb = fopen(XERRORDB_PATH, "r"); + if (xedb != NULL) { + char buf[256]; + while (fgets(buf, sizeof(buf), xedb)) { + if ((strncmp("XRequest.", buf, 9) == 0) && (isdigit(buf[9]))) { + char *name; + i = strtol(buf + 9, &name, 10); + if (RequestNames[i] == 0) { + char *end = strchr(name, '\n'); + if (end) { *end = '\0'; } + RequestNames[i] = strdup(name + 1); + } + } + } + fclose(xedb); + } + + LoadExtensionNames(RequestNames); + + for (i = 0; i < 256; i++) { + if (RequestNames[i] == 0) { +#define RN_SIZE 12 /* "Request#' + up to 3 digits + \0 */ + RequestNames[i] = xalloc(RN_SIZE); + if (RequestNames[i]) { + snprintf(RequestNames[i], RN_SIZE, "Request#%d", i); + } + } + /* fprintf(stderr, "%d: %s\n", i, RequestNames[i]); */ + } +} + +static void FreeRequestNames(void) +{ + int i; + + for (i = 0; i < 256; i++) { + if (RequestNames[i] != 0) { + free(RequestNames[i]); + RequestNames[i] = 0; + } + } +} + +#endif diff --git a/dix/dispatch.h b/dix/dispatch.h index 89ea2dd7e..dd07096af 100644 --- a/dix/dispatch.h +++ b/dix/dispatch.h @@ -1,4 +1,3 @@ -/* $XFree86: xc/programs/Xserver/dix/dispatch.h,v 3.2 2001/08/01 00:44:48 tsi Exp $ */ /************************************************************ Copyright 1996 by Thomas E. Dickey diff --git a/dix/dixfonts.c b/dix/dixfonts.c index cb0df3c30..d5b42dcf6 100644 --- a/dix/dixfonts.c +++ b/dix/dixfonts.c @@ -1,5 +1,3 @@ -/* $XdotOrg: xserver/xorg/dix/dixfonts.c,v 1.9 2006/02/15 20:44:12 ajax Exp $ */ -/* $XFree86: xc/programs/Xserver/dix/dixfonts.c,v 3.28 2003/11/08 02:02:03 dawes Exp $ */ /************************************************************************ Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts. @@ -49,7 +47,6 @@ dealings in this Software without prior written authorization from Digital Equipment Corporation. ******************************************************************/ -/* $Xorg: dixfonts.c,v 1.4 2000/08/17 19:48:18 cpqbld Exp $ */ #define NEED_REPLIES #ifdef HAVE_DIX_CONFIG_H @@ -158,11 +155,6 @@ QueueFontWakeup(FontPathElementPtr fpe) for (i = 0; i < num_slept_fpes; i++) { if (slept_fpes[i] == fpe) { - -#ifdef DEBUG - fprintf(stderr, "re-queueing fpe wakeup\n"); -#endif - return; } } @@ -1186,7 +1178,7 @@ doPolyText(ClientPtr client, register PTclosurePtr c) if (c->slept && c->pDraw && c->pDraw != (DrawablePtr)SecurityLookupIDByClass(client, c->did, - RC_DRAWABLE, SecurityWriteAccess)) + RC_DRAWABLE, DixWriteAccess)) { /* Our drawable has disappeared. Treat like client died... ask the FPE code to clean up after client and avoid further @@ -1216,7 +1208,7 @@ doPolyText(ClientPtr client, register PTclosurePtr c) | ((Font)*(c->pElt+2)) << 16 | ((Font)*(c->pElt+1)) << 24; pFont = (FontPtr)SecurityLookupIDByType(client, fid, RT_FONT, - SecurityReadAccess); + DixReadAccess); if (!pFont) { client->errorValue = fid; @@ -1471,7 +1463,7 @@ doImageText(ClientPtr client, register ITclosurePtr c) if (c->slept && c->pDraw && c->pDraw != (DrawablePtr)SecurityLookupIDByClass(client, c->did, - RC_DRAWABLE, SecurityWriteAccess)) + RC_DRAWABLE, DixWriteAccess)) { /* Our drawable has disappeared. Treat like client died... ask the FPE code to clean up after client. */ @@ -1889,7 +1881,7 @@ InitFonts () { patternCache = MakeFontPatternCache(); -#ifndef KDRIVESERVER +#ifndef BUILTIN_FONTS if (screenInfo.numScreens > screenInfo.numVideoScreens) { PrinterFontRegisterFpeFunctions(); FontFileCheckRegisterFpeFunctions(); @@ -1897,10 +1889,11 @@ InitFonts () } else #endif { -#ifdef KDRIVESERVER - BuiltinRegisterFpeFunctions(); -#endif +#ifdef BUILTIN_FONTS + BuiltinRegisterFpeFunctions(); +#else FontFileRegisterFpeFunctions(); +#endif #ifndef NOFONTSERVERACCESS fs_register_fpe_functions(); #endif @@ -2023,7 +2016,7 @@ FontPtr find_old_font(XID id) { return (FontPtr) SecurityLookupIDByType(NullClient, id, RT_NONE, - SecurityUnknownAccess); + DixUnknownAccess); } Font @@ -2062,11 +2055,6 @@ init_fs_handlers(FontPathElementPtr fpe, BlockHandlerProcPtr block_handler) fs_handlers_installed = 0; } if (fs_handlers_installed == 0) { - -#ifdef DEBUG - fprintf(stderr, "adding FS b & w handlers\n"); -#endif - if (!RegisterBlockAndWakeupHandlers(block_handler, FontWakeup, (pointer) 0)) return AllocError; @@ -2082,55 +2070,9 @@ remove_fs_handlers(FontPathElementPtr fpe, BlockHandlerProcPtr block_handler, Bo if (all) { /* remove the handlers if no one else is using them */ if (--fs_handlers_installed == 0) { - -#ifdef DEBUG - fprintf(stderr, "removing FS b & w handlers\n"); -#endif - RemoveBlockAndWakeupHandlers(block_handler, FontWakeup, (pointer) 0); } } RemoveFontWakeup(fpe); } - -#ifdef DEBUG -#define GLWIDTHBYTESPADDED(bits,nbytes) \ - ((nbytes) == 1 ? (((bits)+7)>>3) /* pad to 1 byte */ \ - :(nbytes) == 2 ? ((((bits)+15)>>3)&~1) /* pad to 2 bytes */ \ - :(nbytes) == 4 ? ((((bits)+31)>>3)&~3) /* pad to 4 bytes */ \ - :(nbytes) == 8 ? ((((bits)+63)>>3)&~7) /* pad to 8 bytes */ \ - : 0) - -#define GLYPH_SIZE(ch, nbytes) \ - GLWIDTHBYTESPADDED((ch)->metrics.rightSideBearing - \ - (ch)->metrics.leftSideBearing, (nbytes)) -void -dump_char_ascii(CharInfoPtr cip) -{ - int r, - l; - int bpr; - int byte; - static unsigned maskTab[] = { - (1 << 7), (1 << 6), (1 << 5), (1 << 4), - (1 << 3), (1 << 2), (1 << 1), (1 << 0), - }; - - bpr = GLYPH_SIZE(cip, 4); - for (r = 0; r < (cip->metrics.ascent + cip->metrics.descent); r++) { - pointer row = (pointer) cip->bits + r * bpr; - - byte = 0; - for (l = 0; l <= (cip->metrics.rightSideBearing - - cip->metrics.leftSideBearing); l++) { - if (maskTab[l & 7] & row[l >> 3]) - putchar('X'); - else - putchar('.'); - } - putchar('\n'); - } -} - -#endif diff --git a/dix/dixutils.c b/dix/dixutils.c index 91796eade..084d2e4c5 100644 --- a/dix/dixutils.c +++ b/dix/dixutils.c @@ -1,4 +1,3 @@ -/* $XFree86: xc/programs/Xserver/dix/dixutils.c,v 3.13 2003/01/12 02:44:26 dawes Exp $ */ /*********************************************************** Copyright 1987, 1998 The Open Group @@ -82,7 +81,6 @@ Author: Adobe Systems Incorporated */ -/* $Xorg: dixutils.c,v 1.4 2001/02/09 02:04:40 xorgcvs Exp $ */ #ifdef HAVE_DIX_CONFIG_H #include @@ -97,10 +95,7 @@ Author: Adobe Systems Incorporated #include "scrnintstr.h" #define XK_LATIN1 #include -#ifdef XCSECURITY -#define _SECURITY_SERVER -#include -#endif +#include "xace.h" /* * CompareTimeStamps returns -1, 0, or +1 depending on if the first @@ -199,136 +194,144 @@ CompareISOLatin1Lowered(unsigned char *s1, int s1len, return (int) c1 - (int) c2; } -#ifdef XCSECURITY - -/* SecurityLookupWindow and SecurityLookupDrawable: - * Look up the window/drawable taking into account the client doing - * the lookup and the type of access desired. Return the window/drawable - * if it exists and the client is allowed access, else return NULL. - * Most Proc* functions should be calling these instead of - * LookupWindow and LookupDrawable, which do no access checks. +/* + * dixLookupWindow and dixLookupDrawable: + * Look up the window/drawable taking into account the client doing the + * lookup, the type of drawable desired, and the type of access desired. + * Return Success with *pDraw set if the window/drawable exists and the client + * is allowed access, else return an error code with *pDraw set to NULL. The + * access mask values are defined in resource.h. The type mask values are + * defined in pixmap.h, with zero equivalent to M_DRAWABLE. */ - -_X_EXPORT WindowPtr -SecurityLookupWindow(XID rid, ClientPtr client, Mask access_mode) +_X_EXPORT int +dixLookupDrawable(DrawablePtr *pDraw, XID id, ClientPtr client, + Mask type, Mask access) { - WindowPtr pWin; + DrawablePtr pTmp; + RESTYPE rtype; + *pDraw = NULL; + client->errorValue = id; - client->errorValue = rid; - if(rid == INVALID) - return NULL; - if (client->trustLevel != XSecurityClientTrusted) - return (WindowPtr)SecurityLookupIDByType(client, rid, RT_WINDOW, access_mode); - if (client->lastDrawableID == rid) - { - if (client->lastDrawable->type == DRAWABLE_WINDOW) - return ((WindowPtr) client->lastDrawable); - return (WindowPtr) NULL; - } - pWin = (WindowPtr)SecurityLookupIDByType(client, rid, RT_WINDOW, access_mode); - if (pWin && pWin->drawable.type == DRAWABLE_WINDOW) { - client->lastDrawable = (DrawablePtr) pWin; - client->lastDrawableID = rid; + if (id == INVALID) + return BadDrawable; + + if (id == client->lastDrawableID) { + pTmp = client->lastDrawable; + + /* an access check is required for cached drawables */ + rtype = (pTmp->type | M_WINDOW) ? RT_WINDOW : RT_PIXMAP; + if (!XaceHook(XACE_RESOURCE_ACCESS, client, id, rtype, access, pTmp)) + return BadDrawable; + } else + pTmp = (DrawablePtr)SecurityLookupIDByClass(client, id, RC_DRAWABLE, + access); + if (!pTmp) + return BadDrawable; + if (!((1 << pTmp->type) | (type ? type : M_DRAWABLE))) + return BadMatch; + + if (pTmp->type | M_DRAWABLE) { + client->lastDrawable = pTmp; + client->lastDrawableID = id; client->lastGCID = INVALID; client->lastGC = (GCPtr)NULL; } - return pWin; + *pDraw = pTmp; + return Success; } - -_X_EXPORT pointer -SecurityLookupDrawable(XID rid, ClientPtr client, Mask access_mode) +_X_EXPORT int +dixLookupWindow(WindowPtr *pWin, XID id, ClientPtr client, Mask access) { - register DrawablePtr pDraw; - - if(rid == INVALID) - return (pointer) NULL; - if (client->trustLevel != XSecurityClientTrusted) - return (DrawablePtr)SecurityLookupIDByClass(client, rid, RC_DRAWABLE, - access_mode); - if (client->lastDrawableID == rid) - return ((pointer) client->lastDrawable); - pDraw = (DrawablePtr)SecurityLookupIDByClass(client, rid, RC_DRAWABLE, - access_mode); - if (pDraw && (pDraw->type != UNDRAWABLE_WINDOW)) - return (pointer)pDraw; - return (pointer)NULL; + int rc; + rc = dixLookupDrawable((DrawablePtr*)pWin, id, client, M_WINDOW, access); + return (rc == BadDrawable) ? BadWindow : rc; } -/* We can't replace the LookupWindow and LookupDrawable functions with - * macros because of compatibility with loadable servers. - */ - -_X_EXPORT WindowPtr -LookupWindow(XID rid, ClientPtr client) +_X_EXPORT int +dixLookupGC(GCPtr *pGC, XID id, ClientPtr client, Mask access) { - return SecurityLookupWindow(rid, client, SecurityUnknownAccess); -} - -_X_EXPORT pointer -LookupDrawable(XID rid, ClientPtr client) -{ - return SecurityLookupDrawable(rid, client, SecurityUnknownAccess); -} - -#else /* not XCSECURITY */ - -WindowPtr -LookupWindow(XID rid, ClientPtr client) -{ - WindowPtr pWin; - - client->errorValue = rid; - if(rid == INVALID) - return NULL; - if (client->lastDrawableID == rid) - { - if (client->lastDrawable->type == DRAWABLE_WINDOW) - return ((WindowPtr) client->lastDrawable); - return (WindowPtr) NULL; + GCPtr pTmp = (GCPtr)SecurityLookupIDByType(client, id, RT_GC, access); + if (pTmp) { + *pGC = pTmp; + return Success; } - pWin = (WindowPtr)LookupIDByType(rid, RT_WINDOW); - if (pWin && pWin->drawable.type == DRAWABLE_WINDOW) { - client->lastDrawable = (DrawablePtr) pWin; - client->lastDrawableID = rid; - client->lastGCID = INVALID; - client->lastGC = (GCPtr)NULL; - } - return pWin; + client->errorValue = id; + *pGC = NULL; + return BadGC; } - -pointer -LookupDrawable(XID rid, ClientPtr client) -{ - register DrawablePtr pDraw; - - if(rid == INVALID) - return (pointer) NULL; - if (client->lastDrawableID == rid) - return ((pointer) client->lastDrawable); - pDraw = (DrawablePtr)LookupIDByClass(rid, RC_DRAWABLE); - if (pDraw && (pDraw->type != UNDRAWABLE_WINDOW)) - return (pointer)pDraw; - return (pointer)NULL; -} - -#endif /* XCSECURITY */ - -_X_EXPORT ClientPtr -LookupClient(XID rid, ClientPtr client) +_X_EXPORT int +dixLookupClient(ClientPtr *pClient, XID rid, ClientPtr client, Mask access) { pointer pRes = (pointer)SecurityLookupIDByClass(client, rid, RC_ANY, - SecurityReadAccess); + DixReadAccess); int clientIndex = CLIENT_ID(rid); + client->errorValue = rid; - if (clientIndex && pRes && clients[clientIndex] && !(rid & SERVER_BIT)) - { - return clients[clientIndex]; + if (clientIndex && pRes && clients[clientIndex] && !(rid & SERVER_BIT)) { + *pClient = clients[clientIndex]; + return Success; } - return (ClientPtr)NULL; + *pClient = NULL; + return BadValue; } +/* + * These are deprecated compatibility functions and will be removed soon! + * Please use the new dixLookup*() functions above. + */ +_X_EXPORT _X_DEPRECATED WindowPtr +SecurityLookupWindow(XID id, ClientPtr client, Mask access_mode) +{ + WindowPtr pWin; + int i = dixLookupWindow(&pWin, id, client, access_mode); + static int warn = 1; + if (warn-- > 0) + ErrorF("Warning: LookupWindow()/SecurityLookupWindow() " + "are deprecated. Please convert your driver/module " + "to use dixLookupWindow().\n"); + return (i == Success) ? pWin : NULL; +} + +_X_EXPORT _X_DEPRECATED WindowPtr +LookupWindow(XID id, ClientPtr client) +{ + return SecurityLookupWindow(id, client, DixUnknownAccess); +} + +_X_EXPORT _X_DEPRECATED pointer +SecurityLookupDrawable(XID id, ClientPtr client, Mask access_mode) +{ + DrawablePtr pDraw; + int i = dixLookupDrawable(&pDraw, id, client, M_DRAWABLE, access_mode); + static int warn = 1; + if (warn-- > 0) + ErrorF("Warning: LookupDrawable()/SecurityLookupDrawable() " + "are deprecated. Please convert your driver/module " + "to use dixLookupDrawable().\n"); + return (i == Success) ? pDraw : NULL; +} + +_X_EXPORT _X_DEPRECATED pointer +LookupDrawable(XID id, ClientPtr client) +{ + return SecurityLookupDrawable(id, client, DixUnknownAccess); +} + +_X_EXPORT _X_DEPRECATED ClientPtr +LookupClient(XID id, ClientPtr client) +{ + ClientPtr pClient; + int i = dixLookupClient(&pClient, id, client, DixUnknownAccess); + static int warn = 1; + if (warn-- > 0) + ErrorF("Warning: LookupClient() is deprecated. Please convert your " + "driver/module to use dixLookupClient().\n"); + return (i == Success) ? pClient : NULL; +} + +/* end deprecated functions */ int AlterSaveSetForClient(ClientPtr client, WindowPtr pWin, unsigned mode, diff --git a/dix/events.c b/dix/events.c index b014fdbb7..0053f42d4 100644 --- a/dix/events.c +++ b/dix/events.c @@ -1,5 +1,3 @@ -/* $XdotOrg: xserver/xorg/dix/events.c,v 1.18 2006/02/15 20:44:12 ajax Exp $ */ -/* $XFree86: xc/programs/Xserver/dix/events.c,v 3.51 2004/01/12 17:04:52 tsi Exp $ */ /************************************************************ Copyright 1987, 1998 The Open Group @@ -109,13 +107,13 @@ of the copyright holder. ******************************************************************/ -/* $Xorg: events.c,v 1.4 2001/02/09 02:04:40 xorgcvs Exp $ */ #ifdef HAVE_DIX_CONFIG_H #include #endif #include +#include #include "misc.h" #include "resource.h" #define NEED_EVENTS @@ -134,13 +132,17 @@ of the copyright holder. #include "globals.h" #ifdef XKB +#include #include extern Bool XkbFilterEvents(ClientPtr, int, xEvent *); #endif -#ifdef XCSECURITY -#define _SECURITY_SERVER -#include +#include "xace.h" + +#ifdef XSERVER_DTRACE +#include +typedef const char *string; +#include "Xserver-dtrace.h" #endif #ifdef XEVIE @@ -158,7 +160,9 @@ xEvent *xeviexE; #endif #include +#include "exglobals.h" #include "exevents.h" +#include "exglobals.h" #include "extnsionst.h" #include "dixevents.h" @@ -210,9 +214,6 @@ _X_EXPORT CallbackListPtr DeviceEventCallback; Mask DontPropagateMasks[DNPMCOUNT]; static int DontPropagateRefCnts[DNPMCOUNT]; -#ifdef DEBUG -static debug_events = 0; -#endif _X_EXPORT InputInfo inputInfo; static struct { @@ -323,11 +324,16 @@ static CARD8 criticalEvents[32] = }; #ifdef PANORAMIX - static void ConfineToShape(RegionPtr shape, int *px, int *py); -static void SyntheticMotion(int x, int y); static void PostNewCursor(void); +#define SyntheticMotion(x, y) \ + PostSyntheticMotion(x, y, noPanoramiXExtension ? 0 : \ + sprite.screen->myNum, \ + syncEvents.playingEvents ? \ + syncEvents.time.milliseconds : \ + currentTime.milliseconds); + static Bool XineramaSetCursorPosition( int x, @@ -462,13 +468,7 @@ XineramaCheckVirtualMotion( if (qe) { sprite.hot.pScreen = qe->pScreen; /* should always be Screen 0 */ -#ifdef XEVIE - xeviehot.x = -#endif sprite.hot.x = qe->event->u.keyButtonPointer.rootX; -#ifdef XEVIE - xeviehot.y = -#endif sprite.hot.y = qe->event->u.keyButtonPointer.rootY; pWin = inputInfo.pointer->grab ? inputInfo.pointer->grab->confineTo : NullWindow; @@ -505,24 +505,12 @@ XineramaCheckVirtualMotion( lims = *REGION_EXTENTS(sprite.screen, &sprite.Reg2); if (sprite.hot.x < lims.x1) -#ifdef XEVIE - xeviehot.x = -#endif sprite.hot.x = lims.x1; else if (sprite.hot.x >= lims.x2) -#ifdef XEVIE - xeviehot.x = -#endif sprite.hot.x = lims.x2 - 1; if (sprite.hot.y < lims.y1) -#ifdef XEVIE - xeviehot.y = -#endif sprite.hot.y = lims.y1; else if (sprite.hot.y >= lims.y2) -#ifdef XEVIE - xeviehot.y = -#endif sprite.hot.y = lims.y2 - 1; if (REGION_NUM_RECTS(&sprite.Reg2) > 1) @@ -535,6 +523,10 @@ XineramaCheckVirtualMotion( qe->event->u.keyButtonPointer.rootY = sprite.hot.y; } } +#ifdef XEVIE + xeviehot.x = sprite.hot.x; + xeviehot.y = sprite.hot.y; +#endif } @@ -552,33 +544,15 @@ XineramaCheckMotion(xEvent *xE) panoramiXdataPtr[0].x; XE_KBPTR.rootY += panoramiXdataPtr[sprite.screen->myNum].y - panoramiXdataPtr[0].y; -#ifdef XEVIE - xeviehot.x = -#endif sprite.hot.x = XE_KBPTR.rootX; -#ifdef XEVIE - xeviehot.y = -#endif sprite.hot.y = XE_KBPTR.rootY; if (sprite.hot.x < sprite.physLimits.x1) -#ifdef XEVIE - xeviehot.x = -#endif sprite.hot.x = sprite.physLimits.x1; else if (sprite.hot.x >= sprite.physLimits.x2) -#ifdef XEVIE - xeviehot.x = -#endif sprite.hot.x = sprite.physLimits.x2 - 1; if (sprite.hot.y < sprite.physLimits.y1) -#ifdef XEVIE - xeviehot.y = -#endif sprite.hot.y = sprite.physLimits.y1; else if (sprite.hot.y >= sprite.physLimits.y2) -#ifdef XEVIE - xeviehot.y = -#endif sprite.hot.y = sprite.physLimits.y2 - 1; if (sprite.hotShape) @@ -596,6 +570,8 @@ XineramaCheckMotion(xEvent *xE) } #ifdef XEVIE + xeviehot.x = sprite.hot.x; + xeviehot.y = sprite.hot.y; xeviewin = #endif sprite.win = XYToWindow(sprite.hot.x, sprite.hot.y); @@ -700,30 +676,6 @@ SetCriticalEvent(int event) criticalEvents[event >> 3] |= 1 << (event & 7); } -static void -SyntheticMotion(int x, int y) -{ - xEvent xE; - -#ifdef PANORAMIX - /* Translate back to the sprite screen since processInputProc - will translate from sprite screen to screen 0 upon reentry - to the DIX layer */ - if(!noPanoramiXExtension) { - x += panoramiXdataPtr[0].x - panoramiXdataPtr[sprite.screen->myNum].x; - y += panoramiXdataPtr[0].y - panoramiXdataPtr[sprite.screen->myNum].y; - } -#endif - xE.u.keyButtonPointer.rootX = x; - xE.u.keyButtonPointer.rootY = y; - if (syncEvents.playingEvents) - xE.u.keyButtonPointer.time = syncEvents.time.milliseconds; - else - xE.u.keyButtonPointer.time = currentTime.milliseconds; - xE.u.u.type = MotionNotify; - (*inputInfo.pointer->public.processInputProc)(&xE, inputInfo.pointer, 1); -} - #ifdef SHAPE static void ConfineToShape(RegionPtr shape, int *px, int *py) @@ -821,13 +773,7 @@ CheckVirtualMotion( if (qe) { sprite.hot.pScreen = qe->pScreen; -#ifdef XEVIE - xeviehot.x = -#endif sprite.hot.x = qe->event->u.keyButtonPointer.rootX; -#ifdef XEVIE - xeviehot.y = -#endif sprite.hot.y = qe->event->u.keyButtonPointer.rootY; pWin = inputInfo.pointer->grab ? inputInfo.pointer->grab->confineTo : NullWindow; @@ -839,31 +785,16 @@ CheckVirtualMotion( if (sprite.hot.pScreen != pWin->drawable.pScreen) { sprite.hot.pScreen = pWin->drawable.pScreen; -#ifdef XEVIE - xeviehot.x = xeviehot.y = 0; -#endif sprite.hot.x = sprite.hot.y = 0; } lims = *REGION_EXTENTS(pWin->drawable.pScreen, &pWin->borderSize); if (sprite.hot.x < lims.x1) -#ifdef XEVIE - xeviehot.x = -#endif sprite.hot.x = lims.x1; else if (sprite.hot.x >= lims.x2) -#ifdef XEVIE - xeviehot.x = -#endif sprite.hot.x = lims.x2 - 1; if (sprite.hot.y < lims.y1) -#ifdef XEVIE - xeviehot.y = -#endif sprite.hot.y = lims.y1; else if (sprite.hot.y >= lims.y2) -#ifdef XEVIE - xeviehot.y = -#endif sprite.hot.y = lims.y2 - 1; #ifdef SHAPE if (wBoundingShape(pWin)) @@ -876,6 +807,10 @@ CheckVirtualMotion( qe->event->u.keyButtonPointer.rootY = sprite.hot.y; } } +#ifdef XEVIE + xeviehot.x = sprite.hot.x; + xeviehot.y = sprite.hot.y; +#endif ROOT = WindowTable[sprite.hot.pScreen->myNum]; } @@ -1582,9 +1517,8 @@ TryClientEvents (ClientPtr client, xEvent *pEvents, int count, Mask mask, int i; int type; -#ifdef DEBUG - if (debug_events) ErrorF( - "Event([%d, %d], mask=0x%x), client=%d", +#ifdef DEBUG_EVENTS + ErrorF("Event([%d, %d], mask=0x%x), client=%d", pEvents->u.u.type, pEvents->u.u.detail, mask, client->index); #endif if ((client) && (client != serverClient) && (!client->clientGone) && @@ -1600,9 +1534,9 @@ TryClientEvents (ClientPtr client, xEvent *pEvents, int count, Mask mask, if (WID(inputInfo.pointer->valuator->motionHintWindow) == pEvents->u.keyButtonPointer.event) { -#ifdef DEBUG - if (debug_events) ErrorF("\n"); - fprintf(stderr,"motionHintWindow == keyButtonPointer.event\n"); +#ifdef DEBUG_EVENTS + ErrorF("\n"); + ErrorF("motionHintWindow == keyButtonPointer.event\n"); #endif return 1; /* don't send, but pretend we did */ } @@ -1640,15 +1574,15 @@ TryClientEvents (ClientPtr client, xEvent *pEvents, int count, Mask mask, } WriteEventsToClient(client, count, pEvents); -#ifdef DEBUG - if (debug_events) ErrorF( " delivered\n"); +#ifdef DEBUG_EVENTS + ErrorF( " delivered\n"); #endif return 1; } else { -#ifdef DEBUG - if (debug_events) ErrorF("\n"); +#ifdef DEBUG_EVENTS + ErrorF("\n"); #endif return 0; } @@ -2057,37 +1991,23 @@ CheckMotion(xEvent *xE) sprite.hot.pScreen = sprite.hotPhys.pScreen; ROOT = WindowTable[sprite.hot.pScreen->myNum]; } -#ifdef XEVIE - xeviehot.x = -#endif sprite.hot.x = XE_KBPTR.rootX; -#ifdef XEVIE - xeviehot.y = -#endif sprite.hot.y = XE_KBPTR.rootY; if (sprite.hot.x < sprite.physLimits.x1) -#ifdef XEVIE - xeviehot.x = -#endif sprite.hot.x = sprite.physLimits.x1; else if (sprite.hot.x >= sprite.physLimits.x2) -#ifdef XEVIE - xeviehot.x = -#endif sprite.hot.x = sprite.physLimits.x2 - 1; if (sprite.hot.y < sprite.physLimits.y1) -#ifdef XEVIE - xeviehot.y = -#endif sprite.hot.y = sprite.physLimits.y1; else if (sprite.hot.y >= sprite.physLimits.y2) -#ifdef XEVIE - xeviehot.y = -#endif sprite.hot.y = sprite.physLimits.y2 - 1; #ifdef SHAPE if (sprite.hotShape) ConfineToShape(sprite.hotShape, &sprite.hot.x, &sprite.hot.y); +#endif +#ifdef XEVIE + xeviehot.x = sprite.hot.x; + xeviehot.y = sprite.hot.y; #endif sprite.hotPhys = sprite.hot; if ((sprite.hotPhys.x != XE_KBPTR.rootX) || @@ -2308,16 +2228,15 @@ static int XineramaWarpPointer(ClientPtr client) { WindowPtr dest = NULL; - int x, y; + int x, y, rc; REQUEST(xWarpPointerReq); - if (stuff->dstWid != None) - { - dest = SecurityLookupWindow(stuff->dstWid, client, SecurityReadAccess); - if (!dest) - return BadWindow; + if (stuff->dstWid != None) { + rc = dixLookupWindow(&dest, stuff->dstWid, client, DixReadAccess); + if (rc != Success) + return rc; } x = sprite.hotPhys.x; y = sprite.hotPhys.y; @@ -2328,8 +2247,9 @@ XineramaWarpPointer(ClientPtr client) XID winID = stuff->srcWid; WindowPtr source; - source = SecurityLookupWindow(winID, client, SecurityReadAccess); - if (!source) return BadWindow; + rc = dixLookupWindow(&source, winID, client, DixReadAccess); + if (rc != Success) + return rc; winX = source->drawable.x; winY = source->drawable.y; @@ -2381,7 +2301,7 @@ int ProcWarpPointer(ClientPtr client) { WindowPtr dest = NULL; - int x, y; + int x, y, rc; ScreenPtr newScreen; REQUEST(xWarpPointerReq); @@ -2393,11 +2313,10 @@ ProcWarpPointer(ClientPtr client) return XineramaWarpPointer(client); #endif - if (stuff->dstWid != None) - { - dest = SecurityLookupWindow(stuff->dstWid, client, SecurityReadAccess); - if (!dest) - return BadWindow; + if (stuff->dstWid != None) { + rc = dixLookupWindow(&dest, stuff->dstWid, client, DixReadAccess); + if (rc != Success) + return rc; } x = sprite.hotPhys.x; y = sprite.hotPhys.y; @@ -2408,8 +2327,9 @@ ProcWarpPointer(ClientPtr client) XID winID = stuff->srcWid; WindowPtr source; - source = SecurityLookupWindow(winID, client, SecurityReadAccess); - if (!source) return BadWindow; + rc = dixLookupWindow(&source, winID, client, DixReadAccess); + if (rc != Success) + return rc; winX = source->drawable.x; winY = source->drawable.y; @@ -2541,10 +2461,8 @@ CheckPassiveGrabsOnWindow( (grab->confineTo->realized && BorderSizeNotEmpty(grab->confineTo)))) { -#ifdef XCSECURITY - if (!SecurityCheckDeviceAccess(wClient(pWin), device, FALSE)) + if (!XaceHook(XACE_DEVICE_ACCESS, wClient(pWin), device, FALSE)) return FALSE; -#endif #ifdef XKB if (!noXkbExtension) { XE_KBPTR.state &= 0x1f00; @@ -2841,13 +2759,6 @@ drawable.id:0; } #endif -#ifdef DEBUG - if ((xkbDebugFlags&0x4)&& - ((xE->u.u.type==KeyPress)||(xE->u.u.type==KeyRelease))) { - ErrorF("CoreProcessKbdEvent: Key %d %s\n",key, - (xE->u.u.type==KeyPress?"down":"up")); - } -#endif switch (xE->u.u.type) { case KeyPress: @@ -2911,6 +2822,8 @@ drawable.id:0; DeliverFocusedEvent(keybd, xE, sprite.win, count); if (deactivateGrab) (*keybd->DeactivateGrab)(keybd); + + XaceHook(XACE_KEY_AVAIL, xE, keybd, count); } #ifdef XKB @@ -2928,13 +2841,12 @@ FixKeyState (register xEvent *xE, register DeviceIntPtr keybd) key = xE->u.u.detail; kptr = &keyc->down[key >> 3]; bit = 1 << (key & 7); -#ifdef DEBUG - if ((xkbDebugFlags&0x4)&& - ((xE->u.u.type==KeyPress)||(xE->u.u.type==KeyRelease))) { - ErrorF("FixKeyState: Key %d %s\n",key, + + if (((xE->u.u.type==KeyPress)||(xE->u.u.type==KeyRelease))) { + DebugF("FixKeyState: Key %d %s\n",key, (xE->u.u.type==KeyPress?"down":"up")); } -#endif + switch (xE->u.u.type) { case KeyPress: @@ -3020,9 +2932,6 @@ ProcessPointerEvent (register xEvent *xE, register DeviceIntPtr mouse, int count butc->buttonsDown++; butc->motionMask = ButtonMotionMask; *kptr |= bit; -#if !defined(XFree86Server) || !defined(XINPUT) - xE->u.u.detail = butc->map[key]; -#endif if (xE->u.u.detail == 0) return; if (xE->u.u.detail <= 5) @@ -3039,9 +2948,6 @@ ProcessPointerEvent (register xEvent *xE, register DeviceIntPtr mouse, int count if (!butc->buttonsDown) butc->motionMask = 0; *kptr &= ~bit; -#if !defined(XFree86Server) || !defined(XINPUT) - xE->u.u.detail = butc->map[key]; -#endif if (xE->u.u.detail == 0) return; if (xE->u.u.detail <= 5) @@ -3168,12 +3074,7 @@ EventSelectForWindow(register WindowPtr pWin, register ClientPtr client, Mask ma if (wClient (pWin) == client) { check = pWin->eventMask; -#ifdef SGIMISC - pWin->eventMask = - (mask & ~SGIMiscSpecialDestroyMask) | (pWin->eventMask & SGIMiscSpecialDestroyMask); -#else pWin->eventMask = mask; -#endif } else { @@ -3182,9 +3083,6 @@ EventSelectForWindow(register WindowPtr pWin, register ClientPtr client, Mask ma if (SameClient(others, client)) { check = others->mask; -#ifdef SGIMISC - mask = (mask & ~SGIMiscSpecialDestroyMask) | (others->mask & SGIMiscSpecialDestroyMask); -#endif if (mask == 0) { FreeResource(others->resource, RT_NONE); @@ -3224,7 +3122,7 @@ EventSuppressForWindow(register WindowPtr pWin, register ClientPtr client, { register int i, free; - if ((mask & ~PropagateMask) && !permitOldBugs) + if (mask & ~PropagateMask) { client->errorValue = mask; return BadValue; @@ -3349,17 +3247,13 @@ EnterLeaveEvent( if ((type == EnterNotify) && (mask & KeymapStateMask)) { xKeymapEvent ke; - -#ifdef XCSECURITY ClientPtr client = grab ? rClient(grab) : clients[CLIENT_ID(pWin->drawable.id)]; - if (!SecurityCheckDeviceAccess(client, keybd, FALSE)) - { - bzero((char *)&ke.map[0], 31); - } + if (XaceHook(XACE_DEVICE_ACCESS, client, keybd, FALSE)) + memmove((char *)&ke.map[0], (char *)&keybd->key->down[1], 31); else -#endif - memmove((char *)&ke.map[0], (char *)&keybd->key->down[1], 31); + bzero((char *)&ke.map[0], 31); + ke.type = KeymapNotify; if (grab) (void)TryClientEvents(rClient(grab), (xEvent *)&ke, 1, mask, @@ -3445,15 +3339,12 @@ FocusEvent(DeviceIntPtr dev, int type, int mode, int detail, register WindowPtr ((pWin->eventMask | wOtherEventMasks(pWin)) & KeymapStateMask)) { xKeymapEvent ke; -#ifdef XCSECURITY ClientPtr client = clients[CLIENT_ID(pWin->drawable.id)]; - if (!SecurityCheckDeviceAccess(client, dev, FALSE)) - { - bzero((char *)&ke.map[0], 31); - } + if (XaceHook(XACE_DEVICE_ACCESS, client, dev, FALSE)) + memmove((char *)&ke.map[0], (char *)&dev->key->down[1], 31); else -#endif - memmove((char *)&ke.map[0], (char *)&dev->key->down[1], 31); + bzero((char *)&ke.map[0], 31); + ke.type = KeymapNotify; (void)DeliverEventsToWindow(pWin, (xEvent *)&ke, 1, KeymapStateMask, NullGrab, 0); @@ -3641,8 +3532,8 @@ SetInputFocus( Bool followOK) { register FocusClassPtr focus; - register WindowPtr focusWin; - int mode; + WindowPtr focusWin; + int mode, rc; TimeStamp time; UpdateCurrentTime(); @@ -3659,14 +3550,12 @@ SetInputFocus( focusWin = (WindowPtr)(long)focusID; else if ((focusID == FollowKeyboard) && followOK) focusWin = inputInfo.keyboard->focus->win; - else if (!(focusWin = SecurityLookupWindow(focusID, client, - SecurityReadAccess))) - return BadWindow; - else - { + else { + rc = dixLookupWindow(&focusWin, focusID, client, DixReadAccess); + if (rc != Success) + return rc; /* It is a match error to try to set the input focus to an unviewable window. */ - if(!focusWin->realized) return(BadMatch); } @@ -3716,10 +3605,10 @@ ProcSetInputFocus(client) REQUEST(xSetInputFocusReq); REQUEST_SIZE_MATCH(xSetInputFocusReq); -#ifdef XCSECURITY - if (!SecurityCheckDeviceAccess(client, inputInfo.keyboard, TRUE)) + + if (!XaceHook(XACE_DEVICE_ACCESS, client, inputInfo.keyboard, TRUE)) return Success; -#endif + return SetInputFocus(client, inputInfo.keyboard, stuff->focus, stuff->revertTo, stuff->time, FALSE); } @@ -3755,6 +3644,7 @@ ProcGrabPointer(ClientPtr client) CursorPtr cursor, oldCursor; REQUEST(xGrabPointerReq); TimeStamp time; + int rc; REQUEST_SIZE_MATCH(xGrabPointerReq); UpdateCurrentTime(); @@ -3775,29 +3665,29 @@ ProcGrabPointer(ClientPtr client) client->errorValue = stuff->ownerEvents; return BadValue; } - if ((stuff->eventMask & ~PointerGrabMask) && !permitOldBugs) + if (stuff->eventMask & ~PointerGrabMask) { client->errorValue = stuff->eventMask; return BadValue; } - pWin = SecurityLookupWindow(stuff->grabWindow, client, SecurityReadAccess); - if (!pWin) - return BadWindow; + rc = dixLookupWindow(&pWin, stuff->grabWindow, client, DixReadAccess); + if (rc != Success) + return rc; if (stuff->confineTo == None) confineTo = NullWindow; else { - confineTo = SecurityLookupWindow(stuff->confineTo, client, - SecurityReadAccess); - if (!confineTo) - return BadWindow; + rc = dixLookupWindow(&confineTo, stuff->confineTo, client, + DixReadAccess); + if (rc != Success) + return rc; } if (stuff->cursor == None) cursor = NullCursor; else { cursor = (CursorPtr)SecurityLookupIDByType(client, stuff->cursor, - RT_CURSOR, SecurityReadAccess); + RT_CURSOR, DixReadAccess); if (!cursor) { client->errorValue = stuff->cursor; @@ -3861,7 +3751,7 @@ ProcChangeActivePointerGrab(ClientPtr client) TimeStamp time; REQUEST_SIZE_MATCH(xChangeActivePointerGrabReq); - if ((stuff->eventMask & ~PointerGrabMask) && !permitOldBugs) + if (stuff->eventMask & ~PointerGrabMask) { client->errorValue = stuff->eventMask; return BadValue; @@ -3871,7 +3761,7 @@ ProcChangeActivePointerGrab(ClientPtr client) else { newCursor = (CursorPtr)SecurityLookupIDByType(client, stuff->cursor, - RT_CURSOR, SecurityReadAccess); + RT_CURSOR, DixReadAccess); if (!newCursor) { client->errorValue = stuff->cursor; @@ -3921,9 +3811,10 @@ GrabDevice(register ClientPtr client, register DeviceIntPtr dev, unsigned this_mode, unsigned other_mode, Window grabWindow, unsigned ownerEvents, Time ctime, Mask mask, CARD8 *status) { - register WindowPtr pWin; + WindowPtr pWin; register GrabPtr grab; TimeStamp time; + int rc; UpdateCurrentTime(); if ((this_mode != GrabModeSync) && (this_mode != GrabModeAsync)) @@ -3941,9 +3832,9 @@ GrabDevice(register ClientPtr client, register DeviceIntPtr dev, client->errorValue = ownerEvents; return BadValue; } - pWin = SecurityLookupWindow(grabWindow, client, SecurityReadAccess); - if (!pWin) - return BadWindow; + rc = dixLookupWindow(&pWin, grabWindow, client, DixReadAccess); + if (rc != Success) + return rc; time = ClientTimeToServerTime(ctime); grab = dev->grab; if (grab && !SameClient(grab, client)) @@ -3981,18 +3872,17 @@ ProcGrabKeyboard(ClientPtr client) int result; REQUEST_SIZE_MATCH(xGrabKeyboardReq); -#ifdef XCSECURITY - if (!SecurityCheckDeviceAccess(client, inputInfo.keyboard, TRUE)) - { + + if (XaceHook(XACE_DEVICE_ACCESS, client, inputInfo.keyboard, TRUE)) + result = GrabDevice(client, inputInfo.keyboard, stuff->keyboardMode, + stuff->pointerMode, stuff->grabWindow, + stuff->ownerEvents, stuff->time, + KeyPressMask | KeyReleaseMask, &rep.status); + else { result = Success; rep.status = AlreadyGrabbed; } - else -#endif - result = GrabDevice(client, inputInfo.keyboard, stuff->keyboardMode, - stuff->pointerMode, stuff->grabWindow, - stuff->ownerEvents, stuff->time, - KeyPressMask | KeyReleaseMask, &rep.status); + if (result != Success) return result; rep.type = X_Reply; @@ -4028,11 +3918,12 @@ ProcQueryPointer(ClientPtr client) WindowPtr pWin, t; REQUEST(xResourceReq); DeviceIntPtr mouse = inputInfo.pointer; + int rc; REQUEST_SIZE_MATCH(xResourceReq); - pWin = SecurityLookupWindow(stuff->id, client, SecurityReadAccess); - if (!pWin) - return BadWindow; + rc = dixLookupWindow(&pWin, stuff->id, client, DixReadAccess); + if (rc != Success) + return rc; if (mouse->valuator->motionHintWindow) MaybeStopHint(mouse, client); rep.type = X_Reply; @@ -4162,13 +4053,12 @@ ProcSendEvent(ClientPtr client) if (stuff->event.u.u.type == ClientMessage && stuff->event.u.u.detail != 8 && stuff->event.u.u.detail != 16 && - stuff->event.u.u.detail != 32 && - !permitOldBugs) + stuff->event.u.u.detail != 32) { client->errorValue = stuff->event.u.u.detail; return BadValue; } - if ((stuff->eventMask & ~AllEventMasks) && !permitOldBugs) + if (stuff->eventMask & ~AllEventMasks) { client->errorValue = stuff->eventMask; return BadValue; @@ -4197,8 +4087,8 @@ ProcSendEvent(ClientPtr client) effectiveFocus = pWin = inputFocus; } else - pWin = SecurityLookupWindow(stuff->destination, client, - SecurityReadAccess); + dixLookupWindow(&pWin, stuff->destination, client, DixReadAccess); + if (!pWin) return BadWindow; if ((stuff->propagate != xFalse) && (stuff->propagate != xTrue)) @@ -4234,11 +4124,12 @@ ProcUngrabKey(ClientPtr client) WindowPtr pWin; GrabRec tempGrab; DeviceIntPtr keybd = inputInfo.keyboard; + int rc; REQUEST_SIZE_MATCH(xUngrabKeyReq); - pWin = SecurityLookupWindow(stuff->grabWindow, client, SecurityReadAccess); - if (!pWin) - return BadWindow; + rc = dixLookupWindow(&pWin, stuff->grabWindow, client, DixReadAccess); + if (rc != Success) + return rc; if (((stuff->key > keybd->key->curKeySyms.maxKeyCode) || (stuff->key < keybd->key->curKeySyms.minKeyCode)) @@ -4275,6 +4166,7 @@ ProcGrabKey(ClientPtr client) REQUEST(xGrabKeyReq); GrabPtr grab; DeviceIntPtr keybd = inputInfo.keyboard; + int rc; REQUEST_SIZE_MATCH(xGrabKeyReq); if ((stuff->ownerEvents != xTrue) && (stuff->ownerEvents != xFalse)) @@ -4307,9 +4199,9 @@ ProcGrabKey(ClientPtr client) client->errorValue = stuff->modifiers; return BadValue; } - pWin = SecurityLookupWindow(stuff->grabWindow, client, SecurityReadAccess); - if (!pWin) - return BadWindow; + rc = dixLookupWindow(&pWin, stuff->grabWindow, client, DixReadAccess); + if (rc != Success) + return rc; grab = CreateGrab(client->index, keybd, pWin, (Mask)(KeyPressMask | KeyReleaseMask), (Bool)stuff->ownerEvents, @@ -4329,6 +4221,7 @@ ProcGrabButton(ClientPtr client) REQUEST(xGrabButtonReq); CursorPtr cursor; GrabPtr grab; + int rc; REQUEST_SIZE_MATCH(xGrabButtonReq); if ((stuff->pointerMode != GrabModeSync) && @@ -4359,23 +4252,23 @@ ProcGrabButton(ClientPtr client) client->errorValue = stuff->eventMask; return BadValue; } - pWin = SecurityLookupWindow(stuff->grabWindow, client, SecurityReadAccess); - if (!pWin) - return BadWindow; + rc = dixLookupWindow(&pWin, stuff->grabWindow, client, DixReadAccess); + if (rc != Success) + return rc; if (stuff->confineTo == None) confineTo = NullWindow; else { - confineTo = SecurityLookupWindow(stuff->confineTo, client, - SecurityReadAccess); - if (!confineTo) - return BadWindow; + rc = dixLookupWindow(&confineTo, stuff->confineTo, client, + DixReadAccess); + if (rc != Success) + return rc; } if (stuff->cursor == None) cursor = NullCursor; else { cursor = (CursorPtr)SecurityLookupIDByType(client, stuff->cursor, - RT_CURSOR, SecurityReadAccess); + RT_CURSOR, DixReadAccess); if (!cursor) { client->errorValue = stuff->cursor; @@ -4385,12 +4278,10 @@ ProcGrabButton(ClientPtr client) grab = CreateGrab(client->index, inputInfo.pointer, pWin, - permitOldBugs ? (Mask)(stuff->eventMask | - ButtonPressMask | ButtonReleaseMask) : - (Mask)stuff->eventMask, - (Bool)stuff->ownerEvents, (Bool) stuff->keyboardMode, - (Bool)stuff->pointerMode, inputInfo.keyboard, stuff->modifiers, - ButtonPress, stuff->button, confineTo, cursor); + (Mask)stuff->eventMask, (Bool)stuff->ownerEvents, + (Bool) stuff->keyboardMode, (Bool)stuff->pointerMode, + inputInfo.keyboard, stuff->modifiers, ButtonPress, + stuff->button, confineTo, cursor); if (!grab) return BadAlloc; return AddPassiveGrabToList(grab); @@ -4402,6 +4293,7 @@ ProcUngrabButton(ClientPtr client) REQUEST(xUngrabButtonReq); WindowPtr pWin; GrabRec tempGrab; + int rc; REQUEST_SIZE_MATCH(xUngrabButtonReq); if ((stuff->modifiers != AnyModifier) && @@ -4410,9 +4302,9 @@ ProcUngrabButton(ClientPtr client) client->errorValue = stuff->modifiers; return BadValue; } - pWin = SecurityLookupWindow(stuff->grabWindow, client, SecurityReadAccess); - if (!pWin) - return BadWindow; + rc = dixLookupWindow(&pWin, stuff->grabWindow, client, DixReadAccess); + if (rc != Success) + return rc; tempGrab.resource = client->clientAsMask; tempGrab.device = inputInfo.pointer; tempGrab.window = pWin; @@ -4564,7 +4456,7 @@ ProcRecolorCursor(ClientPtr client) REQUEST_SIZE_MATCH(xRecolorCursorReq); pCursor = (CursorPtr)SecurityLookupIDByType(client, stuff->cursor, - RT_CURSOR, SecurityWriteAccess); + RT_CURSOR, DixWriteAccess); if ( !pCursor) { client->errorValue = stuff->cursor; @@ -4650,6 +4542,14 @@ WriteEventsToClient(ClientPtr pClient, int count, xEvent *events) eventinfo.count = count; CallCallbacks(&EventCallback, (pointer)&eventinfo); } +#ifdef XSERVER_DTRACE + if (XSERVER_SEND_EVENT_ENABLED()) { + for (i = 0; i < count; i++) + { + XSERVER_SEND_EVENT(pClient->index, events[i].u.u.type, &events[i]); + } + } +#endif if(pClient->swapped) { for(i = 0; i < count; i++) diff --git a/dix/extension.c b/dix/extension.c index f6f38fcf3..29cae8676 100644 --- a/dix/extension.c +++ b/dix/extension.c @@ -1,4 +1,3 @@ -/* $XFree86: xc/programs/Xserver/dix/extension.c,v 3.11 2001/12/14 19:59:31 dawes Exp $ */ /*********************************************************** Copyright 1987, 1998 The Open Group @@ -45,7 +44,6 @@ ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ -/* $Xorg: extension.c,v 1.4 2001/02/09 02:04:40 xorgcvs Exp $ */ #ifdef HAVE_DIX_CONFIG_H #include @@ -61,10 +59,7 @@ SOFTWARE. #include "gcstruct.h" #include "scrnintstr.h" #include "dispatch.h" -#ifdef XCSECURITY -#define _SECURITY_SERVER -#include -#endif +#include "xace.h" #define EXTENSION_BASE 128 #define EXTENSION_EVENT_BASE 64 @@ -79,6 +74,39 @@ int lastEvent = EXTENSION_EVENT_BASE; static int lastError = FirstExtensionError; static unsigned int NumExtensions = 0; +extern int extensionPrivateLen; +extern unsigned *extensionPrivateSizes; +extern unsigned totalExtensionSize; + +static void +InitExtensionPrivates(ExtensionEntry *ext) +{ + register char *ptr; + DevUnion *ppriv; + register unsigned *sizes; + register unsigned size; + register int i; + + if (totalExtensionSize == sizeof(ExtensionEntry)) + ppriv = (DevUnion *)NULL; + else + ppriv = (DevUnion *)(ext + 1); + + ext->devPrivates = ppriv; + sizes = extensionPrivateSizes; + ptr = (char *)(ppriv + extensionPrivateLen); + for (i = extensionPrivateLen; --i >= 0; ppriv++, sizes++) + { + if ( (size = *sizes) ) + { + ppriv->ptr = (pointer)ptr; + ptr += size; + } + else + ppriv->ptr = (pointer)NULL; + } +} + _X_EXPORT ExtensionEntry * AddExtension(char *name, int NumEvents, int NumErrors, int (*MainProc)(ClientPtr c1), @@ -95,9 +123,11 @@ AddExtension(char *name, int NumEvents, int NumErrors, (unsigned)(lastError + NumErrors > LAST_ERROR)) return((ExtensionEntry *) NULL); - ext = (ExtensionEntry *) xalloc(sizeof(ExtensionEntry)); + ext = (ExtensionEntry *) xalloc(totalExtensionSize); if (!ext) return((ExtensionEntry *) NULL); + bzero(ext, totalExtensionSize); + InitExtensionPrivates(ext); ext->name = (char *)xalloc(strlen(name) + 1); ext->num_aliases = 0; ext->aliases = (char **)NULL; @@ -147,9 +177,6 @@ AddExtension(char *name, int NumEvents, int NumErrors, ext->errorBase = 0; ext->errorLast = 0; } -#ifdef XCSECURITY - ext->secure = FALSE; -#endif return(ext); } @@ -210,27 +237,26 @@ CheckExtension(const char *extname) return NULL; } +/* + * Added as part of Xace. + */ +ExtensionEntry * +GetExtensionEntry(int major) +{ + if (major < EXTENSION_BASE) + return NULL; + major -= EXTENSION_BASE; + if (major >= NumExtensions) + return NULL; + return extensions[major]; +} + _X_EXPORT void DeclareExtensionSecurity(char *extname, Bool secure) { -#ifdef XCSECURITY int i = FindExtension(extname, strlen(extname)); if (i >= 0) - { - int majorop = extensions[i]->base; - extensions[i]->secure = secure; - if (secure) - { - UntrustedProcVector[majorop] = ProcVector[majorop]; - SwappedUntrustedProcVector[majorop] = SwappedProcVector[majorop]; - } - else - { - UntrustedProcVector[majorop] = ProcBadRequest; - SwappedUntrustedProcVector[majorop] = ProcBadRequest; - } - } -#endif + XaceHook(XACE_DECLARE_EXT_SECURE, extensions[i], secure); } _X_EXPORT unsigned short @@ -306,13 +332,7 @@ ProcQueryExtension(ClientPtr client) else { i = FindExtension((char *)&stuff[1], stuff->nbytes); - if (i < 0 -#ifdef XCSECURITY - /* don't show insecure extensions to untrusted clients */ - || (client->trustLevel == XSecurityClientUntrusted && - !extensions[i]->secure) -#endif - ) + if (i < 0 || !XaceHook(XACE_EXT_ACCESS, client, extensions[i])) reply.present = xFalse; else { @@ -347,12 +367,10 @@ ProcListExtensions(ClientPtr client) for (i=0; itrustLevel == XSecurityClientUntrusted && - !extensions[i]->secure) + /* call callbacks to find out whether to show extension */ + if (!XaceHook(XACE_EXT_ACCESS, client, extensions[i])) continue; -#endif + total_length += strlen(extensions[i]->name) + 1; reply.nExtensions += 1 + extensions[i]->num_aliases; for (j = extensions[i]->num_aliases; --j >= 0;) @@ -365,11 +383,9 @@ ProcListExtensions(ClientPtr client) for (i=0; itrustLevel == XSecurityClientUntrusted && - !extensions[i]->secure) + if (!XaceHook(XACE_EXT_ACCESS, client, extensions[i])) continue; -#endif + *bufptr++ = len = strlen(extensions[i]->name); memmove(bufptr, extensions[i]->name, len); bufptr += len; @@ -455,3 +471,17 @@ RegisterScreenProc(char *name, ScreenPtr pScreen, ExtensionLookupProc proc) } return TRUE; } + +#ifdef XSERVER_DTRACE +void LoadExtensionNames(char **RequestNames) { + int i; + + for (i=0; ibase; + + if (RequestNames[r] == NULL) { + RequestNames[r] = strdup(extensions[i]->name); + } + } +} +#endif diff --git a/dix/ffs.c b/dix/ffs.c index 8d0954689..b75657d29 100644 --- a/dix/ffs.c +++ b/dix/ffs.c @@ -1,4 +1,3 @@ -/* $Xorg: ffs.c,v 1.4 2001/02/09 02:04:40 xorgcvs Exp $ */ /* Copyright 1996, 1998 The Open Group @@ -27,10 +26,18 @@ The Open Group. */ +#ifdef HAVE_DIX_CONFIG_H +#include +#endif + +#include "dix.h" + int ffs(int i) { int j; + if (i == 0) + return 0; for (j = 1; (i & 1) == 0; j++) i >>= 1; return j; diff --git a/dix/gc.c b/dix/gc.c index 19036ddf3..5106fcda2 100644 --- a/dix/gc.c +++ b/dix/gc.c @@ -1,4 +1,3 @@ -/* $XFree86: xc/programs/Xserver/dix/gc.c,v 3.9 2001/12/14 19:59:32 dawes Exp $ */ /*********************************************************** Copyright 1987, 1998 The Open Group @@ -46,7 +45,6 @@ SOFTWARE. ******************************************************************/ -/* $Xorg: gc.c,v 1.4 2001/02/09 02:04:40 xorgcvs Exp $ */ #ifdef HAVE_DIX_CONFIG_H #include @@ -273,7 +271,7 @@ dixChangeGC(ClientPtr client, register GC *pGC, register BITS32 mask, CARD32 *pC { NEXTVAL(XID, newpix); pPixmap = (PixmapPtr)SecurityLookupIDByType(client, - newpix, RT_PIXMAP, SecurityReadAccess); + newpix, RT_PIXMAP, DixReadAccess); } if (pPixmap) { @@ -309,7 +307,7 @@ dixChangeGC(ClientPtr client, register GC *pGC, register BITS32 mask, CARD32 *pC { NEXTVAL(XID, newstipple) pPixmap = (PixmapPtr)SecurityLookupIDByType(client, - newstipple, RT_PIXMAP, SecurityReadAccess); + newstipple, RT_PIXMAP, DixReadAccess); } if (pPixmap) { @@ -351,7 +349,7 @@ dixChangeGC(ClientPtr client, register GC *pGC, register BITS32 mask, CARD32 *pC { NEXTVAL(XID, newfont) pFont = (FontPtr)SecurityLookupIDByType(client, newfont, - RT_FONT, SecurityReadAccess); + RT_FONT, DixReadAccess); } if (pFont) { @@ -418,7 +416,7 @@ dixChangeGC(ClientPtr client, register GC *pGC, register BITS32 mask, CARD32 *pC } else pPixmap = (PixmapPtr)SecurityLookupIDByType(client, - pid, RT_PIXMAP, SecurityReadAccess); + pid, RT_PIXMAP, DixReadAccess); } if (pPixmap) diff --git a/dix/getevents.c b/dix/getevents.c new file mode 100644 index 000000000..0150d6658 --- /dev/null +++ b/dix/getevents.c @@ -0,0 +1,785 @@ +/* + * Copyright © 2006 Nokia Corporation + * Copyright © 2006 Daniel Stone + * + * 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 this copyright notice and this permission notice appear in + * supporting electronic 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 COPYRIGHT HOLDERS OR AUTHORS 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. + * + * Author: Daniel Stone + */ + +#ifdef HAVE_DIX_CONFIG_H +#include +#endif + +#include +#include +#define NEED_EVENTS +#define NEED_REPLIES +#include + +#include "misc.h" +#include "resource.h" +#include "inputstr.h" +#include "scrnintstr.h" +#include "cursorstr.h" +#include "dixstruct.h" +#include "globals.h" +#include "dixevents.h" +#include "mipointer.h" + +#ifdef XKB +#include +#include +extern Bool XkbCopyKeymap(XkbDescPtr src, XkbDescPtr dst, Bool sendNotifies); +#endif + +#ifdef PANORAMIX +#include "panoramiX.h" +#include "panoramiXsrv.h" +#endif + +#include +#include +#include "exglobals.h" +#include "exevents.h" +#include "exglobals.h" +#include "extnsionst.h" + + +/* Maximum number of valuators, divided by six, rounded up, to get number + * of events. */ +#define MAX_VALUATOR_EVENTS 6 + +/* Number of motion history events to store. */ +#define MOTION_HISTORY_SIZE 256 + + +/** + * Pick some arbitrary size for Xi motion history. + */ +_X_EXPORT int +GetMotionHistorySize() +{ + return MOTION_HISTORY_SIZE; +} + + +/** + * Allocate the motion history buffer. + */ +_X_EXPORT void +AllocateMotionHistory(DeviceIntPtr pDev) +{ + if (pDev->valuator->motion) + xfree(pDev->valuator->motion); + + if (pDev->valuator->numMotionEvents < 1) + return; + + pDev->valuator->motion = xalloc(((sizeof(INT32) * pDev->valuator->numAxes) + + sizeof(Time)) * + pDev->valuator->numMotionEvents); + pDev->valuator->first_motion = 0; + pDev->valuator->last_motion = 0; +} + + +/** + * Dump the motion history between start and stop into the supplied buffer. + * Only records the event for a given screen in theory, but in practice, we + * sort of ignore this. + */ +_X_EXPORT int +GetMotionHistory(DeviceIntPtr pDev, xTimecoord *buff, unsigned long start, + unsigned long stop, ScreenPtr pScreen) +{ + char *ibuff = NULL, *obuff = (char *) buff; + int i = 0, ret = 0; + Time current; + /* The size of a single motion event. */ + int size = (sizeof(INT32) * pDev->valuator->numAxes) + sizeof(Time); + + if (!pDev->valuator || !pDev->valuator->numMotionEvents) + return 0; + + for (i = pDev->valuator->first_motion; + i != pDev->valuator->last_motion; + i = (i + 1) % pDev->valuator->numMotionEvents) { + /* We index the input buffer by which element we're accessing, which + * is not monotonic, and the output buffer by how many events we've + * written so far. */ + ibuff = (char *) pDev->valuator->motion + (i * size); + memcpy(¤t, ibuff, sizeof(Time)); + + if (current > stop) { + return ret; + } + else if (current >= start) { + memcpy(obuff, ibuff, size); + obuff += size; + ret++; + } + } + + return ret; +} + + +/** + * Update the motion history for a specific device, with the list of + * valuators. + */ +static void +updateMotionHistory(DeviceIntPtr pDev, CARD32 ms, int first_valuator, + int num_valuators, int *valuators) +{ + char *buff = (char *) pDev->valuator->motion; + + if (!pDev->valuator->numMotionEvents) + return; + + buff += ((sizeof(INT32) * pDev->valuator->numAxes) + sizeof(CARD32)) * + pDev->valuator->last_motion; + memcpy(buff, &ms, sizeof(Time)); + + buff += sizeof(Time); + bzero(buff, sizeof(INT32) * pDev->valuator->numAxes); + + buff += sizeof(INT32) * first_valuator; + memcpy(buff, valuators, sizeof(INT32) * num_valuators); + + pDev->valuator->last_motion = (pDev->valuator->last_motion + 1) % + pDev->valuator->numMotionEvents; + + /* If we're wrapping around, just keep the circular buffer going. */ + if (pDev->valuator->first_motion == pDev->valuator->last_motion) + pDev->valuator->first_motion = (pDev->valuator->first_motion + 1) % + pDev->valuator->numMotionEvents; + + return; +} + + +/** + * Returns the maximum number of events GetKeyboardEvents, + * GetKeyboardValuatorEvents, and GetPointerEvents will ever return. + * + * Should be used in DIX as: + * xEvent *events = xcalloc(sizeof(xEvent), GetMaximumEventsNum()); + */ +_X_EXPORT int +GetMaximumEventsNum() { + /* Two base events -- core and device, plus valuator events. Multiply + * by two if we're doing key repeats. */ + int ret = 2 + MAX_VALUATOR_EVENTS; + +#ifdef XKB + if (noXkbExtension) +#endif + ret *= 2; + + return ret; +} + + +/* Originally a part of xf86PostMotionEvent; modifies valuators + * in-place. */ +static void +acceleratePointer(DeviceIntPtr pDev, int first_valuator, int num_valuators, + int *valuators) +{ + float mult = 0.0; + int dx = 0, dy = 0; + int *px = NULL, *py = NULL; + + if (!num_valuators || !valuators) + return; + + if (first_valuator == 0) { + dx = valuators[0]; + px = &valuators[0]; + } + if (first_valuator <= 1 && num_valuators >= (2 - first_valuator)) { + dy = valuators[1 - first_valuator]; + py = &valuators[1 - first_valuator]; + } + + if (!dx && !dy) + return; + + if (pDev->ptrfeed && pDev->ptrfeed->ctrl.num) { + /* modeled from xf86Events.c */ + if (pDev->ptrfeed->ctrl.threshold) { + if ((abs(dx) + abs(dy)) >= pDev->ptrfeed->ctrl.threshold) { + pDev->valuator->dxremaind = ((float)dx * + (float)(pDev->ptrfeed->ctrl.num)) / + (float)(pDev->ptrfeed->ctrl.den) + + pDev->valuator->dxremaind; + if (px) { + *px = (int)pDev->valuator->dxremaind; + pDev->valuator->dxremaind = pDev->valuator->dxremaind - + (float)(*px); + } + + pDev->valuator->dyremaind = ((float)dy * + (float)(pDev->ptrfeed->ctrl.num)) / + (float)(pDev->ptrfeed->ctrl.den) + + pDev->valuator->dyremaind; + if (py) { + *py = (int)pDev->valuator->dyremaind; + pDev->valuator->dyremaind = pDev->valuator->dyremaind - + (float)(*py); + } + } + } + else { + mult = pow((float)(dx * dx + dy * dy), + ((float)(pDev->ptrfeed->ctrl.num) / + (float)(pDev->ptrfeed->ctrl.den) - 1.0) / + 2.0) / 2.0; + if (dx) { + pDev->valuator->dxremaind = mult * (float)dx + + pDev->valuator->dxremaind; + *px = (int)pDev->valuator->dxremaind; + pDev->valuator->dxremaind = pDev->valuator->dxremaind - + (float)(*px); + } + if (dy) { + pDev->valuator->dyremaind = mult * (float)dy + + pDev->valuator->dyremaind; + *py = (int)pDev->valuator->dyremaind; + pDev->valuator->dyremaind = pDev->valuator->dyremaind - + (float)(*py); + } + } + } +} + + +/** + * Clip an axis to its bounds, which are declared in the call to + * InitValuatorAxisClassStruct. + */ +static void +clipAxis(DeviceIntPtr pDev, int axisNum, int *val) +{ + AxisInfoPtr axes = pDev->valuator->axes + axisNum; + + if (*val < axes->min_value) + *val = axes->min_value; + if (axes->max_value >= 0 && *val > axes->max_value) + *val = axes->max_value; +} + +/** + * Clip every axis in the list of valuators to its bounds. + */ +static void +clipValuators(DeviceIntPtr pDev, int first_valuator, int num_valuators, + int *valuators) +{ + AxisInfoPtr axes = pDev->valuator->axes + first_valuator; + int i; + + for (i = 0; i < num_valuators; i++, axes++) + clipAxis(pDev, i + first_valuator, &(valuators[i])); +} + + +/** + * Fills events with valuator events for pDev, as given by the other + * parameters. + * + * FIXME: Need to fix ValuatorClassRec to store all the valuators as + * last posted, not just x and y; otherwise relative non-x/y + * valuators, though a very narrow use case, will be broken. + */ +static xEvent * +getValuatorEvents(xEvent *events, DeviceIntPtr pDev, int first_valuator, + int num_valuators, int *valuators) { + deviceValuator *xv = (deviceValuator *) events; + int i = 0, final_valuator = first_valuator + num_valuators; + + for (i = first_valuator; i < final_valuator; i += 6, xv++, events++) { + xv->type = DeviceValuator; + xv->first_valuator = i; + xv->num_valuators = num_valuators; + xv->deviceid = pDev->id; + switch (final_valuator - i) { + case 6: + xv->valuator5 = valuators[i + 5]; + case 5: + xv->valuator4 = valuators[i + 4]; + case 4: + xv->valuator3 = valuators[i + 3]; + case 3: + xv->valuator2 = valuators[i + 2]; + case 2: + xv->valuator1 = valuators[i + 1]; + case 1: + xv->valuator0 = valuators[i]; + } + + if (i + 6 < final_valuator) + xv->deviceid |= MORE_EVENTS; + } + + return events; +} + + +/** + * Convenience wrapper around GetKeyboardValuatorEvents, that takes no + * valuators. + */ +_X_EXPORT int +GetKeyboardEvents(xEvent *events, DeviceIntPtr pDev, int type, int key_code) { + return GetKeyboardValuatorEvents(events, pDev, type, key_code, 0, 0, NULL); +} + + +/** + * Returns a set of keyboard events for KeyPress/KeyRelease, optionally + * also with valuator events. Handles Xi and XKB. + * + * events is not NULL-terminated; the return value is the number of events. + * The DDX is responsible for allocating the event structure in the first + * place via GetMaximumEventsNum(), and for freeing it. + * + * This function does not change the core keymap to that of the device; + * that is done by SwitchCoreKeyboard, which is called from + * mieqProcessInputEvents. If replacing that function, take care to call + * SetCoreKeyboard before processInputProc, so keymaps are altered to suit. + * + * Note that this function recurses! If called for non-XKB, a repeating + * key press will trigger a matching KeyRelease, as well as the + * KeyPresses. + */ +_X_EXPORT int +GetKeyboardValuatorEvents(xEvent *events, DeviceIntPtr pDev, int type, + int key_code, int first_valuator, + int num_valuators, int *valuators) { + int numEvents = 0; + CARD32 ms = 0; + KeySym *map = pDev->key->curKeySyms.map; + KeySym sym = map[key_code * pDev->key->curKeySyms.mapWidth]; + deviceKeyButtonPointer *kbp = NULL; + + if (!events) + return 0; + + if (type != KeyPress && type != KeyRelease) + return 0; + + if (!pDev->key || !pDev->focus || !pDev->kbdfeed || + (pDev->coreEvents && !inputInfo.keyboard->key)) + return 0; + + if (pDev->coreEvents) + numEvents = 2; + else + numEvents = 1; + + if (num_valuators) { + if ((num_valuators / 6) + 1 > MAX_VALUATOR_EVENTS) + num_valuators = MAX_VALUATOR_EVENTS; + numEvents += (num_valuators / 6) + 1; + } + +#ifdef XKB + if (noXkbExtension) +#endif + { + switch (sym) { + case XK_Num_Lock: + case XK_Caps_Lock: + case XK_Scroll_Lock: + case XK_Shift_Lock: + if (type == KeyRelease) + return 0; + else if (type == KeyPress && + (pDev->key->down[key_code >> 3] & (key_code & 7)) & 1) + type = KeyRelease; + } + } + + /* Handle core repeating, via press/release/press/release. + * FIXME: In theory, if you're repeating with two keyboards in non-XKB, + * you could get unbalanced events here. */ + if (type == KeyPress && + (((pDev->key->down[key_code >> 3] & (key_code & 7))) & 1)) { + if (!pDev->kbdfeed->ctrl.autoRepeat || + pDev->key->modifierMap[key_code] || + !(pDev->kbdfeed->ctrl.autoRepeats[key_code >> 3] + & (1 << (key_code & 7)))) + return 0; + +#ifdef XKB + if (noXkbExtension) +#endif + { + numEvents += GetKeyboardValuatorEvents(events, pDev, + KeyRelease, key_code, + first_valuator, num_valuators, + valuators); + events += numEvents; + } + } + + ms = GetTimeInMillis(); + + kbp = (deviceKeyButtonPointer *) events; + kbp->time = ms; + kbp->deviceid = pDev->id; + if (type == KeyPress) + kbp->type = DeviceKeyPress; + else if (type == KeyRelease) + kbp->type = DeviceKeyRelease; + + events++; + if (num_valuators) { + kbp->deviceid |= MORE_EVENTS; + clipValuators(pDev, first_valuator, num_valuators, valuators); + events = getValuatorEvents(events, pDev, first_valuator, + num_valuators, valuators); + } + + if (pDev->coreEvents) { + events->u.keyButtonPointer.time = ms; + events->u.u.type = type; + events->u.u.detail = key_code; + } + + return numEvents; +} + + +/** + * Generate a series of xEvents (returned in xE) representing pointer + * motion, or button presses. Xi and XKB-aware. + * + * events is not NULL-terminated; the return value is the number of events. + * The DDX is responsible for allocating the event structure in the first + * place via GetMaximumEventsNum(), and for freeing it. + */ +_X_EXPORT int +GetPointerEvents(xEvent *events, DeviceIntPtr pDev, int type, int buttons, + int flags, int first_valuator, int num_valuators, + int *valuators) { + int num_events = 0, final_valuator = 0; + CARD32 ms = 0; + deviceKeyButtonPointer *kbp = NULL; + /* Thanks to a broken lib, we _always_ have to chase DeviceMotionNotifies + * with DeviceValuators. */ + Bool sendValuators = (type == MotionNotify || flags & POINTER_ABSOLUTE); + DeviceIntPtr cp = inputInfo.pointer; + int x = 0, y = 0; + + /* Sanity checks. */ + if (type != MotionNotify && type != ButtonPress && type != ButtonRelease) + return 0; + + if ((type == ButtonPress || type == ButtonRelease) && !pDev->button) + return 0; + + if (pDev->coreEvents) + num_events = 2; + else + num_events = 1; + + if (type == MotionNotify && num_valuators <= 0) { + return 0; + } + + /* Do we need to send a DeviceValuator event? */ + if (sendValuators) { + if ((((num_valuators - 1) / 6) + 1) > MAX_VALUATOR_EVENTS) + num_valuators = MAX_VALUATOR_EVENTS * 6; + num_events += ((num_valuators - 1) / 6) + 1; + } + + final_valuator = num_valuators + first_valuator; + + /* You fail. */ + if (first_valuator < 0 || final_valuator > pDev->valuator->numAxes) + return 0; + + ms = GetTimeInMillis(); + + kbp = (deviceKeyButtonPointer *) events; + kbp->time = ms; + kbp->deviceid = pDev->id; + + /* Set x and y based on whether this is absolute or relative, and + * accelerate if we need to. */ + if (flags & POINTER_ABSOLUTE) { + if (num_valuators >= 1 && first_valuator == 0) { + x = valuators[0]; + } + else { + if (pDev->coreEvents) + x = cp->valuator->lastx; + else + x = pDev->valuator->lastx; + } + + if (first_valuator <= 1 && num_valuators >= (2 - first_valuator)) { + y = valuators[1 - first_valuator]; + } + else { + if (pDev->coreEvents) + y = cp->valuator->lasty; + else + y = pDev->valuator->lasty; + } + } + else { + if (flags & POINTER_ACCELERATE) + acceleratePointer(pDev, first_valuator, num_valuators, + valuators); + + if (pDev->coreEvents) { + if (first_valuator == 0 && num_valuators >= 1) + x = cp->valuator->lastx + valuators[0]; + else + x = cp->valuator->lastx; + + if (first_valuator <= 1 && num_valuators >= (2 - first_valuator)) + y = cp->valuator->lasty + valuators[1 - first_valuator]; + else + y = cp->valuator->lasty; + } + else { + if (first_valuator == 0 && num_valuators >= 1) + x = pDev->valuator->lastx + valuators[0]; + else + x = pDev->valuator->lastx; + + if (first_valuator <= 1 && num_valuators >= (2 - first_valuator)) + y = pDev->valuator->lasty + valuators[1 - first_valuator]; + else + y = pDev->valuator->lasty; + } + } + + /* Clip both x and y to the defined limits (usually co-ord space limit). */ + clipAxis(pDev, 0, &x); + clipAxis(pDev, 1, &y); + + /* This takes care of crossing screens for us, as well as clipping + * to the current screen. Right now, we only have one history buffer, + * so we don't set this for both the device and core.*/ + miPointerSetPosition(pDev, &x, &y, ms); + + /* Drop x and y back into the valuators list, if they were originally + * present. */ + if (first_valuator == 0 && num_valuators >= 1) + valuators[0] = x; + if (first_valuator <= 1 && num_valuators >= (2 - first_valuator)) + valuators[1 - first_valuator] = y; + + updateMotionHistory(pDev, ms, first_valuator, num_valuators, valuators); + + if (pDev->coreEvents) { + cp->valuator->lastx = x; + cp->valuator->lasty = y; + } + pDev->valuator->lastx = x; + pDev->valuator->lasty = y; + + if (type == MotionNotify) { + kbp->type = DeviceMotionNotify; + } + else { + if (type == ButtonPress) + kbp->type = DeviceButtonPress; + else if (type == ButtonRelease) + kbp->type = DeviceButtonRelease; + kbp->detail = pDev->button->map[buttons]; + } + + kbp->root_x = x; + kbp->root_y = y; + + events++; + if (sendValuators) { + kbp->deviceid |= MORE_EVENTS; + clipValuators(pDev, first_valuator, num_valuators, valuators); + events = getValuatorEvents(events, pDev, first_valuator, + num_valuators, valuators); + } + + if (pDev->coreEvents) { + events->u.u.type = type; + events->u.keyButtonPointer.time = ms; + events->u.keyButtonPointer.rootX = x; + events->u.keyButtonPointer.rootY = y; + + if (type == ButtonPress || type == ButtonRelease) { + /* We hijack SetPointerMapping to work on all core-sending + * devices, so we use the device-specific map here instead of + * the core one. */ + events->u.u.detail = pDev->button->map[buttons]; + } + else { + events->u.u.detail = 0; + } + } + + return num_events; +} + + +/** + * Post ProximityIn/ProximityOut events, accompanied by valuators. + * + * events is not NULL-terminated; the return value is the number of events. + * The DDX is responsible for allocating the event structure in the first + * place via GetMaximumEventsNum(), and for freeing it. + */ +_X_EXPORT int +GetProximityEvents(xEvent *events, DeviceIntPtr pDev, int type, + int first_valuator, int num_valuators, int *valuators) +{ + int num_events = 0; + deviceKeyButtonPointer *kbp = (deviceKeyButtonPointer *) events; + + /* Sanity checks. */ + if (type != ProximityIn && type != ProximityOut) + return 0; + + if (!pDev->valuator) + return 0; + + /* Do we need to send a DeviceValuator event? */ + if ((pDev->valuator->mode & 1) == Relative) + num_valuators = 0; + + if (num_valuators) { + if ((((num_valuators - 1) / 6) + 1) > MAX_VALUATOR_EVENTS) + num_valuators = MAX_VALUATOR_EVENTS * 6; + num_events += ((num_valuators - 1) / 6) + 1; + } + + /* You fail. */ + if (first_valuator < 0 || + (num_valuators + first_valuator) > pDev->valuator->numAxes) + return 0; + + kbp->type = type; + kbp->deviceid = pDev->id; + kbp->detail = 0; + kbp->time = GetTimeInMillis(); + + if (num_valuators) { + kbp->deviceid |= MORE_EVENTS; + events++; + clipValuators(pDev, first_valuator, num_valuators, valuators); + events = getValuatorEvents(events, pDev, first_valuator, + num_valuators, valuators); + } + + return num_events; +} + + +/** + * Note that pDev was the last device to send a core event. This function + * copies the complete keymap from the originating device to the core + * device, and makes sure the appropriate notifications are generated. + * + * Call this just before processInputProc. + */ +_X_EXPORT void +SwitchCoreKeyboard(DeviceIntPtr pDev) +{ + KeyClassPtr ckeyc = inputInfo.keyboard->key; + + if (inputInfo.keyboard->devPrivates[CoreDevicePrivatesIndex].ptr != pDev) { + memcpy(ckeyc->modifierMap, pDev->key->modifierMap, MAP_LENGTH); + if (ckeyc->modifierKeyMap) + xfree(ckeyc->modifierKeyMap); + ckeyc->modifierKeyMap = xalloc(8 * pDev->key->maxKeysPerModifier); + memcpy(ckeyc->modifierKeyMap, pDev->key->modifierKeyMap, + (8 * pDev->key->maxKeysPerModifier)); + + ckeyc->maxKeysPerModifier = pDev->key->maxKeysPerModifier; + ckeyc->curKeySyms.minKeyCode = pDev->key->curKeySyms.minKeyCode; + ckeyc->curKeySyms.maxKeyCode = pDev->key->curKeySyms.maxKeyCode; + SetKeySymsMap(&ckeyc->curKeySyms, &pDev->key->curKeySyms); + +#ifdef XKB + if (!noXkbExtension && pDev->key->xkbInfo && pDev->key->xkbInfo->desc) { + if (!XkbCopyKeymap(pDev->key->xkbInfo->desc, ckeyc->xkbInfo->desc, + True)) + FatalError("Couldn't pivot keymap from device to core!\n"); + } +#endif + + SendMappingNotify(MappingKeyboard, ckeyc->curKeySyms.minKeyCode, + (ckeyc->curKeySyms.maxKeyCode - + ckeyc->curKeySyms.minKeyCode), + serverClient); + inputInfo.keyboard->devPrivates[CoreDevicePrivatesIndex].ptr = pDev; + } +} + + +/** + * Note that pDev was the last function to send a core pointer event. + * Currently a no-op. + * + * Call this just before processInputProc. + */ +_X_EXPORT void +SwitchCorePointer(DeviceIntPtr pDev) +{ + if (inputInfo.pointer->devPrivates[CoreDevicePrivatesIndex].ptr != pDev) + inputInfo.pointer->devPrivates[CoreDevicePrivatesIndex].ptr = pDev; +} + + +/** + * Synthesize a single motion event for the core pointer. + * + * Used in cursor functions, e.g. when cursor confinement changes, and we need + * to shift the pointer to get it inside the new bounds. + */ +void +PostSyntheticMotion(int x, int y, ScreenPtr pScreen, unsigned long time) +{ + xEvent xE; + +#ifdef PANORAMIX + /* Translate back to the sprite screen since processInputProc + will translate from sprite screen to screen 0 upon reentry + to the DIX layer. */ + if (!noPanoramiXExtension) { + x += panoramiXdataPtr[0].x - panoramiXdataPtr[pScreen->myNum].x; + y += panoramiXdataPtr[0].y - panoramiXdataPtr[pScreen->myNum].y; + } +#endif + + memset(&xE, 0, sizeof(xEvent)); + xE.u.u.type = MotionNotify; + xE.u.keyButtonPointer.rootX = x; + xE.u.keyButtonPointer.rootY = y; + xE.u.keyButtonPointer.time = time; + + (*inputInfo.pointer->public.processInputProc)(&xE, inputInfo.pointer, 1); +} diff --git a/dix/globals.c b/dix/globals.c index d686baffa..f86c6026d 100644 --- a/dix/globals.c +++ b/dix/globals.c @@ -1,5 +1,3 @@ -/* $XdotOrg: xserver/xorg/dix/globals.c,v 1.8 2006/02/15 20:44:12 ajax Exp $ */ -/* $XFree86: xc/programs/Xserver/dix/globals.c,v 1.12tsi Exp $ */ /************************************************************ Copyright 1987, 1998 The Open Group @@ -47,7 +45,6 @@ SOFTWARE. ********************************************************/ -/* $Xorg: globals.c,v 1.4 2001/02/09 02:04:40 xorgcvs Exp $ */ #ifdef HAVE_DIX_CONFIG_H #include @@ -108,7 +105,7 @@ int ScreenSaverAllowExposures; # define DEFAULT_OFF_TIME DEFAULT_SCREEN_SAVER_TIME * 4 # endif # ifndef DEFAULT_DPMS_ENABLED -# define DEFAULT_DPMS_ENABLED FALSE +# define DEFAULT_DPMS_ENABLED TRUE # endif CARD32 defaultDPMSStandbyTime = DEFAULT_STANDBY_TIME; CARD32 defaultDPMSSuspendTime = DEFAULT_SUSPEND_TIME; @@ -146,17 +143,12 @@ FontPtr defaultFont; /* not declared in dix.h to avoid including font.h in Bool loadableFonts = FALSE; CursorPtr rootCursor; Bool blackRoot=FALSE; +Bool whiteRoot=FALSE; ClientPtr requestingClient; /* XXX this should be obsolete now, remove? */ _X_EXPORT TimeStamp currentTime; _X_EXPORT TimeStamp lastDeviceEventTime; -/* - * turn off some error checking, to permit old broken clients (like R2/R3 - * xterms) to work - */ -_X_EXPORT Bool permitOldBugs = FALSE; - _X_EXPORT int defaultColorVisualClass = -1; _X_EXPORT int monitorResolution = 0; diff --git a/dix/glyphcurs.c b/dix/glyphcurs.c index 8f8adf5ce..c1c545fa9 100644 --- a/dix/glyphcurs.c +++ b/dix/glyphcurs.c @@ -45,7 +45,6 @@ SOFTWARE. ************************************************************************/ -/* $Xorg: glyphcurs.c,v 1.4 2001/02/09 02:04:40 xorgcvs Exp $ */ #ifdef HAVE_DIX_CONFIG_H #include diff --git a/dix/grabs.c b/dix/grabs.c index 1d76f7f07..0c2b05e89 100644 --- a/dix/grabs.c +++ b/dix/grabs.c @@ -1,4 +1,3 @@ -/* $Xorg: grabs.c,v 1.4 2001/02/09 02:04:40 xorgcvs Exp $ */ /* Copyright 1987, 1998 The Open Group @@ -46,7 +45,6 @@ ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -/* $XFree86: xc/programs/Xserver/dix/grabs.c,v 3.4 2002/02/19 11:09:22 alanh Exp $ */ #ifdef HAVE_DIX_CONFIG_H #include diff --git a/dix/main.c b/dix/main.c index 9d66a4fa8..3a77533a5 100644 --- a/dix/main.c +++ b/dix/main.c @@ -1,5 +1,3 @@ -/* $XdotOrg: xserver/xorg/dix/main.c,v 1.15 2006/02/15 20:44:12 ajax Exp $ */ -/* $XFree86: xc/programs/Xserver/dix/main.c,v 3.43 2003/10/30 21:21:02 herrb Exp $ */ /*********************************************************** Copyright 1987, 1998 The Open Group @@ -46,7 +44,6 @@ ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ -/* $Xorg: main.c,v 1.4 2001/02/09 02:04:40 xorgcvs Exp $ */ /* The panoramix components contained the following notice */ /***************************************************************** @@ -101,6 +98,7 @@ Equipment Corporation. #include #include "opaque.h" #include "servermd.h" +#include "hotplug.h" #include "site.h" #include "dixfont.h" #include "extnsionst.h" @@ -312,7 +310,8 @@ main(int argc, char *argv[], char *envp[]) #endif InitBlockAndWakeupHandlers(); /* Perform any operating system dependent initializations you'd like */ - OsInit(); + OsInit(); + configInitialise(); if(serverGeneration == 1) { CreateWellKnownSockets(); @@ -357,6 +356,7 @@ main(int argc, char *argv[], char *envp[]) InitAtoms(); InitEvents(); InitGlyphCaching(); + ResetExtensionPrivates(); ResetClientPrivates(); ResetScreenPrivates(); ResetWindowPrivates(); @@ -396,23 +396,43 @@ main(int argc, char *argv[], char *envp[]) if (!CreateRootWindow(pScreen)) FatalError("failed to create root window"); } + InitCoreDevices(); InitInput(argc, argv); if (InitAndStartDevices() != Success) FatalError("failed to initialize core devices"); InitFonts(); +#ifdef BUILTIN_FONTS + defaultFontPath = "built-ins"; +#else if (loadableFonts) { SetFontPath(0, 0, (unsigned char *)defaultFontPath, &error); - } else { + } else +#endif + { if (SetDefaultFontPath(defaultFontPath) != Success) ErrorF("failed to set default font path '%s'", defaultFontPath); } - if (!SetDefaultFont(defaultTextFont)) + if (!SetDefaultFont(defaultTextFont)) { FatalError("could not open default font '%s'", defaultTextFont); - if (!(rootCursor = CreateRootCursor(defaultCursorFont, 0))) + } +#ifdef NULL_ROOT_CURSOR + cm.width = 0; + cm.height = 0; + cm.xhot = 0; + cm.yhot = 0; + + if (!(rootCursor = AllocCursor(NULL, NULL, &cm, 0, 0, 0, 0, 0, 0))) { + FatalError("could not create empty root cursor"); + } + AddResource(FakeClientID(0), RT_CURSOR, (pointer)rootCursor); +#else + if (!(rootCursor = CreateRootCursor(defaultCursorFont, 0))) { FatalError("could not open default cursor font '%s'", defaultCursorFont); + } +#endif #ifdef DPMSExtension /* check all screens, looking for DPMS Capabilities */ DPMSCapableFlag = DPMSSupported(); @@ -435,13 +455,15 @@ main(int argc, char *argv[], char *envp[]) #ifdef PANORAMIX if (!noPanoramiXExtension) { - if (!PanoramiXCreateConnectionBlock()) + if (!PanoramiXCreateConnectionBlock()) { FatalError("could not create connection block info"); + } } else #endif { - if (!CreateConnectionBlock()) + if (!CreateConnectionBlock()) { FatalError("could not create connection block info"); + } } Dispatch(); @@ -463,6 +485,7 @@ main(int argc, char *argv[], char *envp[]) FreeAllResources(); #endif + configFini(); CloseDownDevices(); for (i = screenInfo.numScreens - 1; i >= 0; i--) { @@ -683,9 +706,6 @@ AddScreen( int i; int scanlinepad, format, depth, bitsPerPixel, j, k; ScreenPtr pScreen; -#ifdef DEBUG - void (**jNI) (); -#endif /* DEBUG */ i = screenInfo.numScreens; if (i == MAXSCREENS) @@ -719,13 +739,6 @@ AddScreen( pScreen->ClipNotify = 0; /* for R4 ddx compatibility */ pScreen->CreateScreenResources = 0; -#ifdef DEBUG - for (jNI = &pScreen->QueryBestSize; - jNI < (void (**) ()) &pScreen->SendGraphicsExpose; - jNI++) - *jNI = NotImplemented; -#endif /* DEBUG */ - /* * This loop gets run once for every Screen that gets added, * but thats ok. If the ddx layer initializes the formats diff --git a/dix/pixmap.c b/dix/pixmap.c index 1c3d49fc5..a5b7b064d 100644 --- a/dix/pixmap.c +++ b/dix/pixmap.c @@ -1,4 +1,3 @@ -/* $Xorg: pixmap.c,v 1.4 2001/02/09 02:04:40 xorgcvs Exp $ */ /* Copyright 1993, 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/dix/pixmap.c,v 3.4 2001/01/17 22:36:44 dawes Exp $ */ #ifdef HAVE_DIX_CONFIG_H #include diff --git a/dix/privates.c b/dix/privates.c index 0c94ff54d..b20a1dbf0 100644 --- a/dix/privates.c +++ b/dix/privates.c @@ -1,5 +1,3 @@ -/* $Xorg: privates.c,v 1.4 2001/02/09 02:04:40 xorgcvs Exp $ */ -/* $XdotOrg: xserver/xorg/dix/privates.c,v 1.10 2005/09/05 07:40:50 daniels Exp $ */ /* Copyright 1993, 1998 The Open Group @@ -27,7 +25,6 @@ other dealings in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/programs/Xserver/dix/privates.c,v 3.7 2001/01/17 22:36:44 dawes Exp $ */ #ifdef HAVE_DIX_CONFIG_H #include @@ -45,6 +42,7 @@ from The Open Group. #include "servermd.h" #include "site.h" #include "inputstr.h" +#include "extnsionst.h" /* * See the Wrappers and devPrivates section in "Definition of the @@ -52,6 +50,63 @@ from The Open Group. * for information on how to use devPrivates. */ +/* + * extension private machinery + */ + +static int extensionPrivateCount; +int extensionPrivateLen; +unsigned *extensionPrivateSizes; +unsigned totalExtensionSize; + +void +ResetExtensionPrivates() +{ + extensionPrivateCount = 0; + extensionPrivateLen = 0; + xfree(extensionPrivateSizes); + extensionPrivateSizes = (unsigned *)NULL; + totalExtensionSize = + ((sizeof(ExtensionEntry) + sizeof(long) - 1) / sizeof(long)) * sizeof(long); +} + +_X_EXPORT int +AllocateExtensionPrivateIndex() +{ + return extensionPrivateCount++; +} + +_X_EXPORT Bool +AllocateExtensionPrivate(int index2, unsigned amount) +{ + unsigned oldamount; + + /* Round up sizes for proper alignment */ + amount = ((amount + (sizeof(long) - 1)) / sizeof(long)) * sizeof(long); + + if (index2 >= extensionPrivateLen) + { + unsigned *nsizes; + nsizes = (unsigned *)xrealloc(extensionPrivateSizes, + (index2 + 1) * sizeof(unsigned)); + if (!nsizes) + return FALSE; + while (extensionPrivateLen <= index2) + { + nsizes[extensionPrivateLen++] = 0; + totalExtensionSize += sizeof(DevUnion); + } + extensionPrivateSizes = nsizes; + } + oldamount = extensionPrivateSizes[index2]; + if (amount > oldamount) + { + extensionPrivateSizes[index2] = amount; + totalExtensionSize += (amount - oldamount); + } + return TRUE; +} + /* * client private machinery */ diff --git a/dix/property.c b/dix/property.c index e074c68dd..d40284901 100644 --- a/dix/property.c +++ b/dix/property.c @@ -1,4 +1,3 @@ -/* $XFree86: xc/programs/Xserver/dix/property.c,v 3.12 2002/02/19 11:09:22 alanh Exp $ */ /*********************************************************** Copyright 1987, 1998 The Open Group @@ -45,7 +44,6 @@ ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ -/* $Xorg: property.c,v 1.4 2001/02/09 02:04:40 xorgcvs Exp $ */ #ifdef HAVE_DIX_CONFIG_H #include @@ -60,10 +58,7 @@ SOFTWARE. #include "dixstruct.h" #include "dispatch.h" #include "swaprep.h" -#ifdef XCSECURITY -#define _SECURITY_SERVER -#include -#endif +#include "xace.h" /***************************************************************** * Property Stuff @@ -99,7 +94,7 @@ PrintPropertys(WindowPtr pWin) int ProcRotateProperties(ClientPtr client) { - int i, j, delta; + int i, j, delta, rc; REQUEST(xRotatePropertiesReq); WindowPtr pWin; register Atom * atoms; @@ -109,10 +104,9 @@ ProcRotateProperties(ClientPtr client) REQUEST_FIXED_SIZE(xRotatePropertiesReq, stuff->nAtoms << 2); UpdateCurrentTime(); - pWin = (WindowPtr) SecurityLookupWindow(stuff->window, client, - SecurityWriteAccess); - if (!pWin) - return(BadWindow); + rc = dixLookupWindow(&pWin, stuff->window, client, DixWriteAccess); + if (rc != Success) + return rc; if (!stuff->nAtoms) return(Success); atoms = (Atom *) & stuff[1]; @@ -121,27 +115,19 @@ ProcRotateProperties(ClientPtr client) return(BadAlloc); for (i = 0; i < stuff->nAtoms; i++) { -#ifdef XCSECURITY - char action = SecurityCheckPropertyAccess(client, pWin, atoms[i], - SecurityReadAccess|SecurityWriteAccess); -#endif - if (!ValidAtom(atoms[i]) -#ifdef XCSECURITY - || (SecurityErrorOperation == action) -#endif - ) - { + char action = XaceHook(XACE_PROPERTY_ACCESS, client, pWin, atoms[i], + DixReadAccess|DixWriteAccess); + + if (!ValidAtom(atoms[i]) || (XaceErrorOperation == action)) { DEALLOCATE_LOCAL(props); client->errorValue = atoms[i]; return BadAtom; } -#ifdef XCSECURITY - if (SecurityIgnoreOperation == action) - { + if (XaceIgnoreOperation == action) { DEALLOCATE_LOCAL(props); return Success; } -#endif + for (j = i + 1; j < stuff->nAtoms; j++) if (atoms[j] == atoms[i]) { @@ -194,9 +180,7 @@ ProcChangeProperty(ClientPtr client) WindowPtr pWin; char format, mode; unsigned long len; - int sizeInBytes; - int totalSize; - int err; + int sizeInBytes, totalSize, err; REQUEST(xChangePropertyReq); REQUEST_AT_LEAST_SIZE(xChangePropertyReq); @@ -221,10 +205,9 @@ ProcChangeProperty(ClientPtr client) totalSize = len * sizeInBytes; REQUEST_FIXED_SIZE(xChangePropertyReq, totalSize); - pWin = (WindowPtr)SecurityLookupWindow(stuff->window, client, - SecurityWriteAccess); - if (!pWin) - return(BadWindow); + err = dixLookupWindow(&pWin, stuff->window, client, DixWriteAccess); + if (err != Success) + return err; if (!ValidAtom(stuff->property)) { client->errorValue = stuff->property; @@ -236,17 +219,15 @@ ProcChangeProperty(ClientPtr client) return(BadAtom); } -#ifdef XCSECURITY - switch (SecurityCheckPropertyAccess(client, pWin, stuff->property, - SecurityWriteAccess)) + switch (XaceHook(XACE_PROPERTY_ACCESS, client, pWin, stuff->property, + DixWriteAccess)) { - case SecurityErrorOperation: - client->errorValue = stuff->property; - return BadAtom; - case SecurityIgnoreOperation: - return Success; + case XaceErrorOperation: + client->errorValue = stuff->property; + return BadAtom; + case XaceIgnoreOperation: + return Success; } -#endif err = ChangeWindowProperty(pWin, stuff->property, stuff->type, (int)format, (int)mode, len, (pointer)&stuff[1], TRUE); @@ -460,18 +441,18 @@ int ProcGetProperty(ClientPtr client) { PropertyPtr pProp, prevProp; - unsigned long n, len, ind; + unsigned long n, len, ind, rc; WindowPtr pWin; xGetPropertyReply reply; + Mask access_mode = DixReadAccess; REQUEST(xGetPropertyReq); REQUEST_SIZE_MATCH(xGetPropertyReq); if (stuff->delete) UpdateCurrentTime(); - pWin = (WindowPtr)SecurityLookupWindow(stuff->window, client, - SecurityReadAccess); - if (!pWin) - return BadWindow; + rc = dixLookupWindow(&pWin, stuff->window, client, DixReadAccess); + if (rc != Success) + return rc; if (!ValidAtom(stuff->property)) { @@ -504,24 +485,18 @@ ProcGetProperty(ClientPtr client) if (!pProp) return NullPropertyReply(client, None, 0, &reply); -#ifdef XCSECURITY + if (stuff->delete) + access_mode |= DixDestroyAccess; + switch (XaceHook(XACE_PROPERTY_ACCESS, client, pWin, stuff->property, + access_mode)) { - Mask access_mode = SecurityReadAccess; - - if (stuff->delete) - access_mode |= SecurityDestroyAccess; - switch(SecurityCheckPropertyAccess(client, pWin, stuff->property, - access_mode)) - { - case SecurityErrorOperation: - client->errorValue = stuff->property; - return BadAtom;; - case SecurityIgnoreOperation: - return NullPropertyReply(client, pProp->type, pProp->format, - &reply); - } + case XaceErrorOperation: + client->errorValue = stuff->property; + return BadAtom;; + case XaceIgnoreOperation: + return NullPropertyReply(client, pProp->type, pProp->format, &reply); } -#endif + /* If the request type and actual type don't match. Return the property information, but not the data. */ @@ -605,16 +580,15 @@ ProcListProperties(ClientPtr client) { Atom *pAtoms = NULL, *temppAtoms; xListPropertiesReply xlpr; - int numProps = 0; + int rc, numProps = 0; WindowPtr pWin; PropertyPtr pProp; REQUEST(xResourceReq); REQUEST_SIZE_MATCH(xResourceReq); - pWin = (WindowPtr)SecurityLookupWindow(stuff->id, client, - SecurityReadAccess); - if (!pWin) - return(BadWindow); + rc = dixLookupWindow(&pWin, stuff->id, client, DixReadAccess); + if (rc != Success) + return rc; pProp = wUserProps (pWin); while (pProp) @@ -656,27 +630,24 @@ ProcDeleteProperty(register ClientPtr client) REQUEST_SIZE_MATCH(xDeletePropertyReq); UpdateCurrentTime(); - pWin = (WindowPtr)SecurityLookupWindow(stuff->window, client, - SecurityWriteAccess); - if (!pWin) - return(BadWindow); + result = dixLookupWindow(&pWin, stuff->window, client, DixWriteAccess); + if (result != Success) + return result; if (!ValidAtom(stuff->property)) { client->errorValue = stuff->property; return (BadAtom); } -#ifdef XCSECURITY - switch(SecurityCheckPropertyAccess(client, pWin, stuff->property, - SecurityDestroyAccess)) + switch (XaceHook(XACE_PROPERTY_ACCESS, client, pWin, stuff->property, + DixDestroyAccess)) { - case SecurityErrorOperation: - client->errorValue = stuff->property; - return BadAtom;; - case SecurityIgnoreOperation: - return Success; + case XaceErrorOperation: + client->errorValue = stuff->property; + return BadAtom;; + case XaceIgnoreOperation: + return Success; } -#endif result = DeleteProperty(pWin, stuff->property); if (client->noClientException != Success) diff --git a/dix/resource.c b/dix/resource.c index bb34bc9d4..4468f4575 100644 --- a/dix/resource.c +++ b/dix/resource.c @@ -72,9 +72,35 @@ dealings in this Software without prior written authorization from Digital Equipment Corporation. ******************************************************************/ +/* XSERVER_DTRACE additions: + * Copyright 2005-2006 Sun Microsystems, Inc. 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, and/or sell copies of the Software, and to permit persons + * to whom the Software is furnished to do so, provided that the above + * copyright notice(s) and this permission notice appear in all copies of + * the Software and that both the above copyright notice(s) and this + * permission notice appear in supporting documentation. + * + * 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 + * OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR + * HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL + * INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING + * FROM LOSS OF USE, 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. + * + * Except as contained in this notice, the name of a copyright holder + * shall not be used in advertising or otherwise to promote the sale, use + * or other dealings in this Software without prior written authorization + * of the copyright holder. + */ -/* $Xorg: resource.c,v 1.5 2001/02/09 02:04:40 xorgcvs Exp $ */ -/* $XdotOrg: xserver/xorg/dix/resource.c,v 1.8 2005/07/03 08:53:38 daniels Exp $ */ /* $TOG: resource.c /main/41 1998/02/09 14:20:31 kaleb $ */ /* Routines to manage various kinds of resources: @@ -99,7 +125,6 @@ Equipment Corporation. * 1, and an otherwise arbitrary ID in the low 22 bits, we can create a * resource "owned" by the client. */ -/* $XFree86: xc/programs/Xserver/dix/resource.c,v 3.13 2003/09/24 02:43:13 dawes Exp $ */ #define NEED_EVENTS #ifdef HAVE_DIX_CONFIG_H @@ -123,8 +148,17 @@ Equipment Corporation. #include "panoramiX.h" #include "panoramiXsrv.h" #endif +#include "xace.h" #include +#ifdef XSERVER_DTRACE +#include +typedef const char *string; +#include "Xserver-dtrace.h" + +#define TypeNameString(t) NameForAtom(ResourceNames[t & TypeMask]) +#endif + static void RebuildTable( int /*client*/ ); @@ -429,6 +463,9 @@ AddResource(XID id, RESTYPE type, pointer value) register ClientResourceRec *rrec; register ResourcePtr res, *head; +#ifdef XSERVER_DTRACE + XSERVER_RESOURCE_ALLOC(id, type, value, TypeNameString(type)); +#endif client = CLIENT_ID(id); rrec = &clientTable[client]; if (!rrec->buckets) @@ -528,6 +565,11 @@ FreeResource(XID id, RESTYPE skipDeleteFuncType) if (res->id == id) { RESTYPE rtype = res->type; + +#ifdef XSERVER_DTRACE + XSERVER_RESOURCE_FREE(res->id, res->type, + res->value, TypeNameString(res->type)); +#endif *prev = res->next; elements = --*eltptr; if (rtype & RC_CACHED) @@ -569,6 +611,10 @@ FreeResourceByType(XID id, RESTYPE type, Bool skipFree) { if (res->id == id && res->type == type) { +#ifdef XSERVER_DTRACE + XSERVER_RESOURCE_FREE(res->id, res->type, + res->value, TypeNameString(res->type)); +#endif *prev = res->next; if (type & RC_CACHED) FlushClientCaches(res->id); @@ -731,6 +777,10 @@ FreeClientNeverRetainResources(ClientPtr client) RESTYPE rtype = this->type; if (rtype & RC_NEVERRETAIN) { +#ifdef XSERVER_DTRACE + XSERVER_RESOURCE_FREE(this->id, this->type, + this->value, TypeNameString(this->type)); +#endif *prev = this->next; if (rtype & RC_CACHED) FlushClientCaches(this->id); @@ -777,6 +827,10 @@ FreeClientResources(ClientPtr client) for (this = *head; this; this = *head) { RESTYPE rtype = this->type; +#ifdef XSERVER_DTRACE + XSERVER_RESOURCE_FREE(this->id, this->type, + this->value, TypeNameString(this->type)); +#endif *head = this->next; if (rtype & RC_CACHED) FlushClientCaches(this->id); @@ -821,8 +875,6 @@ LegalNewID(XID id, register ClientPtr client) !LookupIDByClass(id, RC_ANY))); } -#ifdef XCSECURITY - /* SecurityLookupIDByType and SecurityLookupIDByClass: * These are the heart of the resource ID security system. They take * two additional arguments compared to the old LookupID functions: @@ -838,10 +890,6 @@ SecurityLookupIDByType(ClientPtr client, XID id, RESTYPE rtype, Mask mode) register ResourcePtr res; pointer retval = NULL; - assert(client == NullClient || - (client->index <= currentMaxClients && clients[client->index] == client)); - assert( (rtype & TypeMask) <= lastResourceType); - if (((cid = CLIENT_ID(id)) < MAXCLIENTS) && clientTable[cid].buckets) { @@ -854,8 +902,10 @@ SecurityLookupIDByType(ClientPtr client, XID id, RESTYPE rtype, Mask mode) break; } } - if (retval && client && client->CheckAccess) - retval = (* client->CheckAccess)(client, id, rtype, mode, retval); + if (retval && client && + !XaceHook(XACE_RESOURCE_ACCESS, client, id, rtype, mode, retval)) + retval = NULL; + return retval; } @@ -867,10 +917,6 @@ SecurityLookupIDByClass(ClientPtr client, XID id, RESTYPE classes, Mask mode) register ResourcePtr res = NULL; pointer retval = NULL; - assert(client == NullClient || - (client->index <= currentMaxClients && clients[client->index] == client)); - assert (classes >= lastResourceClass); - if (((cid = CLIENT_ID(id)) < MAXCLIENTS) && clientTable[cid].buckets) { @@ -883,8 +929,10 @@ SecurityLookupIDByClass(ClientPtr client, XID id, RESTYPE classes, Mask mode) break; } } - if (retval && client && client->CheckAccess) - retval = (* client->CheckAccess)(client, id, res->type, mode, retval); + if (retval && client && + !XaceHook(XACE_RESOURCE_ACCESS, client, id, res->type, mode, retval)) + retval = NULL; + return retval; } @@ -896,59 +944,12 @@ _X_EXPORT pointer LookupIDByType(XID id, RESTYPE rtype) { return SecurityLookupIDByType(NullClient, id, rtype, - SecurityUnknownAccess); + DixUnknownAccess); } _X_EXPORT pointer LookupIDByClass(XID id, RESTYPE classes) { return SecurityLookupIDByClass(NullClient, id, classes, - SecurityUnknownAccess); + DixUnknownAccess); } - -#else /* not XCSECURITY */ - -/* - * LookupIDByType returns the object with the given id and type, else NULL. - */ -pointer -LookupIDByType(XID id, RESTYPE rtype) -{ - int cid; - register ResourcePtr res; - - if (((cid = CLIENT_ID(id)) < MAXCLIENTS) && - clientTable[cid].buckets) - { - res = clientTable[cid].resources[Hash(cid, id)]; - - for (; res; res = res->next) - if ((res->id == id) && (res->type == rtype)) - return res->value; - } - return (pointer)NULL; -} - -/* - * LookupIDByClass returns the object with the given id and any one of the - * given classes, else NULL. - */ -pointer -LookupIDByClass(XID id, RESTYPE classes) -{ - int cid; - register ResourcePtr res; - - if (((cid = CLIENT_ID(id)) < MAXCLIENTS) && - clientTable[cid].buckets) - { - res = clientTable[cid].resources[Hash(cid, id)]; - - for (; res; res = res->next) - if ((res->id == id) && (res->type & classes)) - return res->value; - } - return (pointer)NULL; -} - -#endif /* XCSECURITY */ diff --git a/dix/strcasecmp.c b/dix/strcasecmp.c new file mode 100644 index 000000000..58f0961e6 --- /dev/null +++ b/dix/strcasecmp.c @@ -0,0 +1,48 @@ +/************************************************************ + Copyright (c) 1995 by Silicon Graphics Computer Systems, Inc. + + Permission to use, copy, modify, and distribute this + software and its documentation for any purpose and without + fee is hereby granted, provided that the above copyright + notice appear in all copies and that both that copyright + notice and this permission notice appear in supporting + documentation, and that the name of Silicon Graphics not be + used in advertising or publicity pertaining to distribution + of the software without specific prior written permission. + Silicon Graphics makes no representation about the suitability + of this software for any purpose. It is provided "as is" + without any express or implied warranty. + + SILICON GRAPHICS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS + SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY + AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON + GRAPHICS BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL + DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, + 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. + + ********************************************************/ + +#ifdef HAVE_DIX_CONFIG_H +#include +#endif + +#include +#include "dix.h" + +#ifdef NEED_STRCASECMP +int +xstrcasecmp(char *str1,char *str2) +{ + const u_char *us1 = (const u_char *)str1, *us2 = (const u_char *)str2; + + while (tolower(*us1) == tolower(*us2)) { + if (*us1++ == '\0') + return (0); + us2++; + } + + return (tolower(*us1) - tolower(*us2)); +} +#endif diff --git a/dix/swaprep.c b/dix/swaprep.c index bff404c1c..08ae6eb1a 100644 --- a/dix/swaprep.c +++ b/dix/swaprep.c @@ -1,4 +1,3 @@ -/* $XFree86: xc/programs/Xserver/dix/swaprep.c,v 3.7 2001/12/14 19:59:33 dawes Exp $ */ /************************************************************ Copyright 1987, 1998 The Open Group @@ -46,7 +45,6 @@ SOFTWARE. ********************************************************/ -/* $Xorg: swaprep.c,v 1.4 2001/02/09 02:04:41 xorgcvs Exp $ */ #ifdef HAVE_DIX_CONFIG_H #include diff --git a/dix/swapreq.c b/dix/swapreq.c index 2678fb6de..a6a211515 100644 --- a/dix/swapreq.c +++ b/dix/swapreq.c @@ -1,4 +1,3 @@ -/* $XFree86: xc/programs/Xserver/dix/swapreq.c,v 3.4 2001/12/14 19:59:33 dawes Exp $ */ /************************************************************ Copyright 1987, 1998 The Open Group @@ -46,7 +45,6 @@ SOFTWARE. ********************************************************/ -/* $Xorg: swapreq.c,v 1.4 2001/02/09 02:04:41 xorgcvs Exp $ */ #ifdef HAVE_DIX_CONFIG_H #include diff --git a/dix/tables.c b/dix/tables.c index d5854ef57..258ac0370 100644 --- a/dix/tables.c +++ b/dix/tables.c @@ -1,4 +1,3 @@ -/* $XFree86: xc/programs/Xserver/dix/tables.c,v 3.5 2002/02/19 11:09:22 alanh Exp $ */ /*********************************************************** Copyright 1987, 1998 The Open Group @@ -45,7 +44,6 @@ ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ******************************************************************/ -/* $Xorg: tables.c,v 1.4 2001/02/09 02:04:41 xorgcvs Exp $ */ #ifdef HAVE_DIX_CONFIG_H #include diff --git a/dix/window.c b/dix/window.c index 9fba5f832..e33140dd4 100644 --- a/dix/window.c +++ b/dix/window.c @@ -1,5 +1,3 @@ -/* $XdotOrg: xserver/xorg/dix/window.c,v 1.17 2006/03/31 17:39:35 sandmann Exp $ */ -/* $Xorg: window.c,v 1.4 2001/02/09 02:04:41 xorgcvs Exp $ */ /* Copyright (c) 2006, Red Hat, Inc. @@ -100,7 +98,6 @@ Equipment Corporation. ******************************************************************/ -/* $XFree86: xc/programs/Xserver/dix/window.c,v 3.36 2003/11/14 23:52:50 torrey Exp $ */ #ifdef HAVE_DIX_CONFIG_H #include @@ -127,12 +124,9 @@ Equipment Corporation. #include "globals.h" #ifdef XAPPGROUP -#include -#endif -#ifdef XCSECURITY -#define _SECURITY_SERVER -#include +#include "appgroup.h" #endif +#include "xace.h" /****** * Window stuff for server @@ -191,7 +185,7 @@ _X_EXPORT int deltaSaveUndersViewable = 0; * For debugging only ******/ -int +static void PrintChildren(WindowPtr p1, int indent) { WindowPtr p2; @@ -201,14 +195,15 @@ PrintChildren(WindowPtr p1, int indent) { p2 = p1->firstChild; for (i=0; idrawable.id); + ErrorF( "%lx\n", p1->drawable.id); miPrintRegion(&p1->clipList); PrintChildren(p2, indent+4); p1 = p1->nextSib; } } -PrintWindowTree() +static void +PrintWindowTree(void) { int i; WindowPtr pWin, p1; @@ -347,9 +342,6 @@ MakeRootTile(WindowPtr pWin) for (j = len; j > 0; j--) *to++ = *from; - if (blackRoot) - bzero(back, sizeof(back)); - (*pGC->ops->PutImage)((DrawablePtr)pWin->background.pixmap, pGC, 1, 0, 0, len, 4, 0, XYBitmap, (char *)back); @@ -510,6 +502,7 @@ void InitRootWindow(WindowPtr pWin) { ScreenPtr pScreen = pWin->drawable.pScreen; + int backFlag = CWBorderPixel | CWCursor | CWBackingStore; if (!(*pScreen->CreateWindow)(pWin)) return; /* XXX */ @@ -518,12 +511,25 @@ InitRootWindow(WindowPtr pWin) pWin->cursorIsNone = FALSE; pWin->optional->cursor = rootCursor; rootCursor->refcnt++; - MakeRootTile(pWin); + + if (!blackRoot && !whiteRoot) { + MakeRootTile(pWin); + backFlag |= CWBackPixmap; + } + else { + if (blackRoot) + pWin->background.pixel = pScreen->blackPixel; + else + pWin->background.pixel = pScreen->whitePixel; + backFlag |= CWBackPixel; + } + pWin->backingStore = defaultBackingStore; pWin->forcedBS = (defaultBackingStore != NotUseful); /* We SHOULD check for an error value here XXX */ - (*pScreen->ChangeWindowAttributes)(pWin, - CWBackPixmap|CWBorderPixel|CWCursor|CWBackingStore); + (*pScreen->ChangeWindowAttributes)(pWin, backFlag); + + XaceHook(XACE_WINDOW_INIT, serverClient, pWin); MapWindow(pWin, serverClient); } @@ -538,9 +544,11 @@ ClippedRegionFromBox(register WindowPtr pWin, RegionPtr Rgn, register int x, register int y, register int w, register int h) { - ScreenPtr pScreen = pWin->drawable.pScreen; + ScreenPtr pScreen; BoxRec box; + pScreen = pWin->drawable.pScreen; + box = *(REGION_EXTENTS(pScreen, &pWin->winSize)); /* we do these calculations to avoid overflows */ if (x > box.x1) @@ -726,18 +734,16 @@ CreateWindow(Window wid, register WindowPtr pParent, int x, int y, unsigned w, } pWin->borderWidth = bw; -#ifdef XCSECURITY + /* can't let untrusted clients have background None windows; * they make it too easy to steal window contents */ - if (client->trustLevel != XSecurityClientTrusted) - { + if (XaceHook(XACE_BACKGRND_ACCESS, client, pWin)) + pWin->backgroundState = None; + else { pWin->backgroundState = BackgroundPixel; pWin->background.pixel = 0; } - else -#endif - pWin->backgroundState = None; pWin->borderIsPixel = pParent->borderIsPixel; pWin->border = pParent->border; @@ -757,6 +763,8 @@ CreateWindow(Window wid, register WindowPtr pParent, int x, int y, unsigned w, REGION_NULL(pScreen, &pWin->winSize); REGION_NULL(pScreen, &pWin->borderSize); + XaceHook(XACE_WINDOW_INIT, client, pWin); + pHead = RealChildHead(pParent); if (pHead) { @@ -1020,24 +1028,18 @@ ChangeWindowAttributes(register WindowPtr pWin, Mask vmask, XID *vlist, ClientPt borderRelative = TRUE; if (pixID == None) { -#ifdef XCSECURITY /* can't let untrusted clients have background None windows */ - if (client->trustLevel == XSecurityClientTrusted) - { -#endif - if (pWin->backgroundState == BackgroundPixmap) - (*pScreen->DestroyPixmap)(pWin->background.pixmap); - if (!pWin->parent) - MakeRootTile(pWin); - else - pWin->backgroundState = None; -#ifdef XCSECURITY - } - else - { /* didn't change the background to None, so don't tell ddx */ + if (XaceHook(XACE_BACKGRND_ACCESS, client, pWin)) { + if (pWin->backgroundState == BackgroundPixmap) + (*pScreen->DestroyPixmap)(pWin->background.pixmap); + if (!pWin->parent) + MakeRootTile(pWin); + else + pWin->backgroundState = None; + } else { + /* didn't change the backgrnd to None, so don't tell ddx */ index2 = 0; } -#endif } else if (pixID == ParentRelative) { @@ -1060,7 +1062,7 @@ ChangeWindowAttributes(register WindowPtr pWin, Mask vmask, XID *vlist, ClientPt else { pPixmap = (PixmapPtr)SecurityLookupIDByType(client, pixID, - RT_PIXMAP, SecurityReadAccess); + RT_PIXMAP, DixReadAccess); if (pPixmap != (PixmapPtr) NULL) { if ((pPixmap->drawable.depth != pWin->drawable.depth) || @@ -1121,7 +1123,7 @@ ChangeWindowAttributes(register WindowPtr pWin, Mask vmask, XID *vlist, ClientPt else { pPixmap = (PixmapPtr)SecurityLookupIDByType(client, pixID, - RT_PIXMAP, SecurityReadAccess); + RT_PIXMAP, DixReadAccess); if (pPixmap) { if ((pPixmap->drawable.depth != pWin->drawable.depth) || @@ -1331,7 +1333,7 @@ ChangeWindowAttributes(register WindowPtr pWin, Mask vmask, XID *vlist, ClientPt goto PatchUp; } pCmap = (ColormapPtr)SecurityLookupIDByType(client, cmap, - RT_COLORMAP, SecurityReadAccess); + RT_COLORMAP, DixReadAccess); if (!pCmap) { error = BadColor; @@ -1407,7 +1409,7 @@ ChangeWindowAttributes(register WindowPtr pWin, Mask vmask, XID *vlist, ClientPt else { pCursor = (CursorPtr)SecurityLookupIDByType(client, cursorID, - RT_CURSOR, SecurityReadAccess); + RT_CURSOR, DixReadAccess); if (!pCursor) { error = BadCursor; @@ -1650,7 +1652,8 @@ CreateUnclippedWinSize (register WindowPtr pWin) pRgn = REGION_CREATE(pWin->drawable.pScreen, &box, 1); #ifdef SHAPE if (wBoundingShape (pWin) || wClipShape (pWin)) { - ScreenPtr pScreen = pWin->drawable.pScreen; + ScreenPtr pScreen; + pScreen = pWin->drawable.pScreen; REGION_TRANSLATE(pScreen, pRgn, - pWin->drawable.x, - pWin->drawable.y); @@ -1686,7 +1689,8 @@ SetWinSize (register WindowPtr pWin) (int)pWin->drawable.height); #ifdef SHAPE if (wBoundingShape (pWin) || wClipShape (pWin)) { - ScreenPtr pScreen = pWin->drawable.pScreen; + ScreenPtr pScreen; + pScreen = pWin->drawable.pScreen; REGION_TRANSLATE(pScreen, &pWin->winSize, - pWin->drawable.x, - pWin->drawable.y); @@ -1728,7 +1732,8 @@ SetBorderSize (register WindowPtr pWin) (int)(pWin->drawable.height + (bw<<1))); #ifdef SHAPE if (wBoundingShape (pWin)) { - ScreenPtr pScreen = pWin->drawable.pScreen; + ScreenPtr pScreen; + pScreen = pWin->drawable.pScreen; REGION_TRANSLATE(pScreen, &pWin->borderSize, - pWin->drawable.x, - pWin->drawable.y); @@ -1939,7 +1944,8 @@ MakeBoundingRegion ( BoxPtr pBox) { RegionPtr pRgn; - ScreenPtr pScreen = pWin->drawable.pScreen; + ScreenPtr pScreen; + pScreen = pWin->drawable.pScreen; pRgn = REGION_CREATE(pScreen, pBox, 1); if (wBoundingShape (pWin)) { @@ -2097,7 +2103,7 @@ WhereDoIGoInTheStack( else return NullWindow; case TopIf: - if ((!pWin->mapped || (pSib && !pSib->mapped)) && !permitOldBugs) + if ((!pWin->mapped || (pSib && !pSib->mapped))) return(pWin->nextSib); else if (pSib) { @@ -2112,7 +2118,7 @@ WhereDoIGoInTheStack( else return(pWin->nextSib); case BottomIf: - if ((!pWin->mapped || (pSib && !pSib->mapped)) && !permitOldBugs) + if ((!pWin->mapped || (pSib && !pSib->mapped))) return(pWin->nextSib); else if (pSib) { @@ -2127,7 +2133,7 @@ WhereDoIGoInTheStack( else return(pWin->nextSib); case Opposite: - if ((!pWin->mapped || (pSib && !pSib->mapped)) && !permitOldBugs) + if ((!pWin->mapped || (pSib && !pSib->mapped))) return(pWin->nextSib); else if (pSib) { @@ -2293,7 +2299,7 @@ ConfigureWindow(register WindowPtr pWin, register Mask mask, XID *vlist, ClientP sibwid = (Window ) *pVlist; pVlist++; pSib = (WindowPtr )SecurityLookupIDByType(client, sibwid, - RT_WINDOW, SecurityReadAccess); + RT_WINDOW, DixReadAccess); if (!pSib) { client->errorValue = sibwid; @@ -2719,15 +2725,9 @@ MapWindow(register WindowPtr pWin, ClientPtr client) if (pWin->mapped) return(Success); -#ifdef XCSECURITY - /* don't let an untrusted client map a child-of-trusted-window, InputOnly - * window; too easy to steal device input - */ - if ( (client->trustLevel != XSecurityClientTrusted) && - (pWin->drawable.class == InputOnly) && - (wClient(pWin->parent)->trustLevel == XSecurityClientTrusted) ) + /* general check for permission to map window */ + if (!XaceHook(XACE_MAP_ACCESS, client, pWin)) return Success; -#endif pScreen = pWin->drawable.pScreen; if ( (pParent = pWin->parent) ) diff --git a/dix/xpstubs.c b/dix/xpstubs.c index 5135cc398..3276d9dfe 100644 --- a/dix/xpstubs.c +++ b/dix/xpstubs.c @@ -25,7 +25,6 @@ other dealings in this Software without prior written authorization from The Open Group. */ -/* $Xorg: xpstubs.c,v 1.5 2001/03/08 17:52:08 pookie Exp $ */ #ifdef HAVE_DIX_CONFIG_H #include @@ -35,6 +34,9 @@ from The Open Group. #include #ifdef XPRINT #include "DiPrint.h" +#else +extern Bool XpClientIsBitmapClient(ClientPtr client); +extern Bool XpClientIsPrintClient(ClientPtr client, FontPathElementPtr fpe); #endif Bool diff --git a/doc/.gitignore b/doc/.gitignore new file mode 100644 index 000000000..fa5407dda --- /dev/null +++ b/doc/.gitignore @@ -0,0 +1,2 @@ +Xserver.1 +Xserver.1x diff --git a/doc/Xserver.man.pre b/doc/Xserver.man.pre index b9597f15c..2457edf22 100644 --- a/doc/Xserver.man.pre +++ b/doc/Xserver.man.pre @@ -159,6 +159,14 @@ default state is platform and configuration specific. disables DPMS (display power management services). The default state is platform and configuration specific. .TP 8 +.BI \-extension extensionName +disables named extension. If an unknown extension name is specified, +a list of accepted extension names is printed. +.TP 8 +.BI \+extension extensionName +enables named extension. If an unknown extension name is specified, +a list of accepted extension names is printed. +.TP 8 .B \-f \fIvolume\fP sets feep (bell) volume (allowable range: 0-100). .TP 8 @@ -181,7 +189,7 @@ prints a usage message. causes all remaining command line arguments to be ignored. .TP 8 .B \-maxbigreqsize \fIsize\fP -sets the maxmium big request to +sets the maximum big request to .I size MB. .TP 8 @@ -449,7 +457,7 @@ the text after the /; it is used to distinguish between instances of ::= a | i | e - ::= | | + ::= | | ::= " * " diff --git a/doc/c-extensions b/doc/c-extensions new file mode 100644 index 000000000..db2ba7d77 --- /dev/null +++ b/doc/c-extensions @@ -0,0 +1,32 @@ +Use of extensions throughout the X server tree +---------------------------------------------- + +Optional extensions: +The server will still build if your toolchain does not support these +extensions, although the results may not be optimal. + + * _X_SENTINEL(x): member x of the passed structure must be NULL, e.g.: + void parseOptions(Option *options _X_SENTINEL(0)); + parseOptions("foo", "bar", NULL); /* this is OK */ + parseOptions("foo", "bar", "baz"); /* this is not */ + This definition comes from Xfuncproto.h in the core + protocol headers. + * _X_ATTRIBUTE_PRINTF(x, y): This function has printf-like semantics; + check the format string when built with + -Wformat (gcc) or similar. + * _X_EXPORT: this function should appear in symbol tables. + * _X_HIDDEN: this function should not appear in the _dynamic_ symbol + table. + * _X_INTERNAL: like _X_HIDDEN, but attempt to ensure that this function + is never called from another module. + * _X_INLINE: inline this functon if possible (generally obeyed unless + disabling optimisations). + * _X_DEPRECATED: warn on use of this function. + +Mandatory extensions: +The server will not build if your toolchain does not support these extensions. + + * named initialisers: explicitly initialising structure members, e.g.: + struct foo bar = { .baz = quux, .brian = "dog" }; + * variadic macros: macros with a variable number of arguments, e.g.: + #define DebugF(x, ...) /**/ diff --git a/exa/Makefile.am b/exa/Makefile.am index 98db0271f..e2f7ed302 100644 --- a/exa/Makefile.am +++ b/exa/Makefile.am @@ -12,7 +12,7 @@ INCLUDES = \ $(XORG_INCS) \ -I$(srcdir)/../miext/cw -AM_CFLAGS = $(XORG_CFLAGS) @SERVER_DEFINES@ @LOADER_DEFINES@ $(DIX_CFLAGS) +AM_CFLAGS = $(XORG_CFLAGS) $(DIX_CFLAGS) libexa_la_SOURCES = \ exa.c \ diff --git a/exa/exa.c b/exa/exa.c index 3e6ac76dc..195457cd5 100644 --- a/exa/exa.c +++ b/exa/exa.c @@ -32,6 +32,10 @@ #include #endif +#ifdef MITSHM +#include "shmint.h" +#endif + #include #include "exa_priv.h" @@ -169,7 +173,7 @@ exaLog2(int val) { int bits; - if (!val) + if (val <= 0) return 0; for (bits = 0; val != 0; bits++) val >>= 1; @@ -549,6 +553,9 @@ exaDriverInit (ScreenPtr pScreen, ExaDriverPtr pScreenInfo) { ExaScreenPrivPtr pExaScr; +#ifdef RENDER + PictureScreenPtr ps; +#endif if (pScreenInfo->exa_major != EXA_VERSION_MAJOR || pScreenInfo->exa_minor > EXA_VERSION_MINOR) @@ -562,7 +569,7 @@ exaDriverInit (ScreenPtr pScreen, } #ifdef RENDER - PictureScreenPtr ps = GetPictureScreenIfSet(pScreen); + ps = GetPictureScreenIfSet(pScreen); #endif if (exaGeneration != serverGeneration) { @@ -629,8 +636,17 @@ exaDriverInit (ScreenPtr pScreen, } #endif +#ifdef COMPOSITE miDisableCompositeWrapper(pScreen); +#endif +#ifdef MITSHM + /* Re-register with the MI funcs, which don't allow shared pixmaps. + * Shared pixmaps are almost always a performance loss for us, but this + * still allows for SHM PutImage. + */ + ShmRegisterFuncs(pScreen, NULL); +#endif /* * Hookup offscreen pixmaps */ @@ -649,6 +665,10 @@ exaDriverInit (ScreenPtr pScreen, pExaScr->SavedDestroyPixmap = pScreen->DestroyPixmap; pScreen->DestroyPixmap = exaDestroyPixmap; + + LogMessage(X_INFO, "EXA(%d): Offscreen pixmap area of %d bytes\n", + pScreen->myNum, + pExaScr->info->memorySize - pExaScr->info->offScreenBase); } else { @@ -667,6 +687,22 @@ exaDriverInit (ScreenPtr pScreen, } } + LogMessage(X_INFO, "EXA(%d): Driver registered support for the following" + " operations:\n", pScreen->myNum); + assert(pScreenInfo->PrepareSolid != NULL); + LogMessage(X_INFO, " Solid\n"); + assert(pScreenInfo->PrepareCopy != NULL); + LogMessage(X_INFO, " Copy\n"); + if (pScreenInfo->PrepareComposite != NULL) { + LogMessage(X_INFO, " Composite (RENDER acceleration)\n"); + } + if (pScreenInfo->UploadToScreen != NULL) { + LogMessage(X_INFO, " UploadToScreen\n"); + } + if (pScreenInfo->DownloadFromScreen != NULL) { + LogMessage(X_INFO, " DownloadFromScreen\n"); + } + return TRUE; } diff --git a/exa/exa.h b/exa/exa.h index 2cb200854..96465a775 100644 --- a/exa/exa.h +++ b/exa/exa.h @@ -36,6 +36,7 @@ #include "windowstr.h" #include "gcstruct.h" #include "picturestr.h" +#include "fb.h" #define EXA_VERSION_MAJOR 2 #define EXA_VERSION_MINOR 0 @@ -715,4 +716,12 @@ exaGetPixmapSize(PixmapPtr pPix); void exaEnableDisableFBAccess (int index, Bool enable); +/** + * Returns TRUE if the given planemask covers all the significant bits in the + * pixel values for pDrawable. + */ +#define EXA_PM_IS_SOLID(_pDrawable, _pm) \ + (((_pm) & FbFullMask((_pDrawable)->depth)) == \ + FbFullMask((_pDrawable)->depth)) + #endif /* EXA_H */ diff --git a/exa/exa_accel.c b/exa/exa_accel.c index 102973ac6..d2fe2e034 100644 --- a/exa/exa_accel.c +++ b/exa/exa_accel.c @@ -54,12 +54,12 @@ exaFillSpans(DrawablePtr pDrawable, GCPtr pGC, int n, pixmaps[0].as_dst = TRUE; pixmaps[0].as_src = FALSE; - pixmaps[0].pPix = exaGetDrawablePixmap (pDrawable); + pixmaps[0].pPix = pPixmap = exaGetDrawablePixmap (pDrawable); if (pExaScr->swappedOut || pGC->fillStyle != FillSolid || - pDrawable->width > pExaScr->info->maxX || - pDrawable->height > pExaScr->info->maxY) + pPixmap->drawable.width > pExaScr->info->maxX || + pPixmap->drawable.height > pExaScr->info->maxY) { exaDoMigration (pixmaps, 1, FALSE); ExaCheckFillSpans (pDrawable, pGC, n, ppt, pwidth, fSorted); @@ -393,19 +393,19 @@ exaCopyNtoN (DrawablePtr pSrcDrawable, pixmaps[0].as_dst = TRUE; pixmaps[0].as_src = FALSE; - pixmaps[0].pPix = exaGetDrawablePixmap (pDstDrawable); + pixmaps[0].pPix = pDstPixmap = exaGetDrawablePixmap (pDstDrawable); pixmaps[1].as_dst = FALSE; pixmaps[1].as_src = TRUE; - pixmaps[1].pPix = exaGetDrawablePixmap (pSrcDrawable); + pixmaps[1].pPix = pSrcPixmap = exaGetDrawablePixmap (pSrcDrawable); /* Respect maxX/maxY in a trivial way: don't set up drawing when we might * violate the limits. The proper solution would be a temporary pixmap * adjusted so that the drawing happened within limits. */ - if (pSrcDrawable->width > pExaScr->info->maxX || - pSrcDrawable->height > pExaScr->info->maxY || - pDstDrawable->width > pExaScr->info->maxX || - pDstDrawable->height > pExaScr->info->maxY) + if (pSrcPixmap->drawable.width > pExaScr->info->maxX || + pSrcPixmap->drawable.height > pExaScr->info->maxY || + pDstPixmap->drawable.width > pExaScr->info->maxX || + pDstPixmap->drawable.height > pExaScr->info->maxY) { exaDoMigration (pixmaps, 2, FALSE); goto fallback; @@ -414,7 +414,8 @@ exaCopyNtoN (DrawablePtr pSrcDrawable, } /* Mixed directions must be handled specially if the card is lame */ - if (pExaScr->info->flags & EXA_TWO_BITBLT_DIRECTIONS && (dx*dy) < 0) { + if (pExaScr->info->flags & EXA_TWO_BITBLT_DIRECTIONS && + reverse != upsidedown) { if (!exaCopyNtoNTwoDir(pSrcDrawable, pDstDrawable, pGC, pbox, nbox, dx, dy)) goto fallback; @@ -424,7 +425,7 @@ exaCopyNtoN (DrawablePtr pSrcDrawable, if ((pSrcPixmap = exaGetOffscreenPixmap (pSrcDrawable, &src_off_x, &src_off_y)) && (pDstPixmap = exaGetOffscreenPixmap (pDstDrawable, &dst_off_x, &dst_off_y)) && (*pExaScr->info->PrepareCopy) (pSrcPixmap, pDstPixmap, - dx, dy, + reverse ? -1 : 1, upsidedown ? -1 : 1, pGC ? pGC->alu : GXcopy, pGC ? pGC->planemask : FB_ALLONES)) { @@ -643,12 +644,12 @@ exaPolyFillRect(DrawablePtr pDrawable, pixmaps[0].as_dst = TRUE; pixmaps[0].as_src = FALSE; - pixmaps[0].pPix = exaGetDrawablePixmap (pDrawable); + pixmaps[0].pPix = pPixmap = exaGetDrawablePixmap (pDrawable); if (pExaScr->swappedOut || pGC->fillStyle != FillSolid || - pDrawable->width > pExaScr->info->maxX || - pDrawable->height > pExaScr->info->maxY) + pPixmap->drawable.width > pExaScr->info->maxX || + pPixmap->drawable.height > pExaScr->info->maxY) { exaDoMigration (pixmaps, 1, FALSE); ExaCheckPolyFillRect (pDrawable, pGC, nrect, prect); @@ -767,14 +768,14 @@ exaSolidBoxClipped (DrawablePtr pDrawable, pixmaps[0].as_dst = TRUE; pixmaps[0].as_src = FALSE; - pixmaps[0].pPix = exaGetDrawablePixmap (pDrawable); + pixmaps[0].pPix = pPixmap = exaGetDrawablePixmap (pDrawable); /* We need to initialize x/yoff for tracking damage in the fallback case */ pPixmap = exaGetOffscreenPixmap (pDrawable, &xoff, &yoff); if (pExaScr->swappedOut || - pDrawable->width > pExaScr->info->maxX || - pDrawable->height > pExaScr->info->maxY) + pPixmap->drawable.width > pExaScr->info->maxX || + pPixmap->drawable.height > pExaScr->info->maxY) { exaDoMigration (pixmaps, 1, FALSE); goto fallback; @@ -1042,10 +1043,10 @@ exaFillRegionSolid (DrawablePtr pDrawable, pixmaps[0].as_dst = TRUE; pixmaps[0].as_src = FALSE; - pixmaps[0].pPix = exaGetDrawablePixmap (pDrawable); + pixmaps[0].pPix = pPixmap = exaGetDrawablePixmap (pDrawable); - if (pDrawable->width > pExaScr->info->maxX || - pDrawable->height > pExaScr->info->maxY) + if (pPixmap->drawable.width > pExaScr->info->maxX || + pPixmap->drawable.height > pExaScr->info->maxY) { exaDoMigration (pixmaps, 1, FALSE); goto fallback; @@ -1117,7 +1118,7 @@ exaFillRegionTiled (DrawablePtr pDrawable, pixmaps[0].as_dst = TRUE; pixmaps[0].as_src = FALSE; - pixmaps[0].pPix = exaGetDrawablePixmap (pDrawable); + pixmaps[0].pPix = pPixmap = exaGetDrawablePixmap (pDrawable); pixmaps[1].as_dst = FALSE; pixmaps[1].as_src = TRUE; pixmaps[1].pPix = pTile; @@ -1125,8 +1126,8 @@ exaFillRegionTiled (DrawablePtr pDrawable, /* We need to initialize x/yoff for tracking damage in the fallback case */ pPixmap = exaGetOffscreenPixmap (pDrawable, &xoff, &yoff); - if (pDrawable->width > pExaScr->info->maxX || - pDrawable->height > pExaScr->info->maxY || + if (pPixmap->drawable.width > pExaScr->info->maxX || + pPixmap->drawable.height > pExaScr->info->maxY || tileWidth > pExaScr->info->maxX || tileHeight > pExaScr->info->maxY) { diff --git a/exa/exa_offscreen.c b/exa/exa_offscreen.c index d5864dc57..fd3599e8c 100644 --- a/exa/exa_offscreen.c +++ b/exa/exa_offscreen.c @@ -414,7 +414,6 @@ exaOffscreenInit (ScreenPtr pScreen) if (!area) return FALSE; - area->state = ExaOffscreenAvail; area->base_offset = pExaScr->info->offScreenBase; area->offset = area->base_offset; @@ -423,10 +422,6 @@ exaOffscreenInit (ScreenPtr pScreen) area->next = NULL; area->score = 0; -#if DEBUG_OFFSCREEN - ErrorF("============ initial memory block of %d\n", area->size); -#endif - /* Add it to the free areas */ pExaScr->info->offScreenAreas = area; diff --git a/exa/exa_priv.h b/exa/exa_priv.h index c725b4da0..80cf60903 100644 --- a/exa/exa_priv.h +++ b/exa/exa_priv.h @@ -138,14 +138,6 @@ extern int exaPixmapPrivateIndex; /** Align an offset to a power-of-two alignment */ #define EXA_ALIGN2(offset, align) (((offset) + (align) - 1) & ~((align) - 1)) -/** - * Returns TRUE if the given planemask covers all the significant bits in the - * pixel values for pDrawable. - */ -#define EXA_PM_IS_SOLID(_pDrawable, _pm) \ - (((_pm) & FbFullMask((_pDrawable)->depth)) == \ - FbFullMask((_pDrawable)->depth)) - #define EXA_PIXMAP_SCORE_MOVE_IN 10 #define EXA_PIXMAP_SCORE_MAX 20 #define EXA_PIXMAP_SCORE_MOVE_OUT -10 diff --git a/exa/exa_render.c b/exa/exa_render.c index 790a359a3..a73582000 100644 --- a/exa/exa_render.c +++ b/exa/exa_render.c @@ -282,8 +282,12 @@ exaTryDriverSolidFill(PicturePtr pSrc, return -1; } - exaGetPixelFromRGBA(&pixel, red, green, blue, alpha, - pDst->format); + if (!exaGetPixelFromRGBA(&pixel, red, green, blue, alpha, + pDst->format)) + { + REGION_UNINIT(pDst->pDrawable->pScreen, ®ion); + return -1; + } if (!(*pExaScr->info->PrepareSolid) (pDstPix, GXcopy, 0xffffffff, pixel)) { @@ -333,16 +337,21 @@ exaTryDriverComposite(CARD8 op, struct _Pixmap scratch; ExaMigrationRec pixmaps[3]; + pSrcPix = exaGetDrawablePixmap(pSrc->pDrawable); + pDstPix = exaGetDrawablePixmap(pDst->pDrawable); + if (pMask) + pMaskPix = exaGetDrawablePixmap(pMask->pDrawable); + /* Bail if we might exceed coord limits by rendering from/to these. We * should really be making some scratch pixmaps with offsets and coords * adjusted to deal with this, but it hasn't been done yet. */ - if (pSrc->pDrawable->width > pExaScr->info->maxX || - pSrc->pDrawable->height > pExaScr->info->maxY || - pDst->pDrawable->width > pExaScr->info->maxX || - pDst->pDrawable->height > pExaScr->info->maxY || - (pMask && (pMask->pDrawable->width > pExaScr->info->maxX || - pMask->pDrawable->height > pExaScr->info->maxY))) + if (pSrcPix->drawable.width > pExaScr->info->maxX || + pSrcPix->drawable.height > pExaScr->info->maxY || + pDstPix->drawable.width > pExaScr->info->maxX || + pDstPix->drawable.height > pExaScr->info->maxY || + (pMask && (pMaskPix->drawable.width > pExaScr->info->maxX || + pMaskPix->drawable.height > pExaScr->info->maxY))) { return -1; } @@ -450,24 +459,72 @@ exaTryDriverComposite(CARD8 op, return 1; } +/** + * exaTryMagicTwoPassCompositeHelper implements PictOpOver using two passes of + * simpler operations PictOpOutReverse and PictOpAdd. Mainly used for component + * alpha and limited 1-tmu cards. + * + * From http://anholt.livejournal.com/32058.html: + * + * The trouble is that component-alpha rendering requires two different sources + * for blending: one for the source value to the blender, which is the + * per-channel multiplication of source and mask, and one for the source alpha + * for multiplying with the destination channels, which is the multiplication + * of the source channels by the mask alpha. So the equation for Over is: + * + * dst.A = src.A * mask.A + (1 - (src.A * mask.A)) * dst.A + * dst.R = src.R * mask.R + (1 - (src.A * mask.R)) * dst.R + * dst.G = src.G * mask.G + (1 - (src.A * mask.G)) * dst.G + * dst.B = src.B * mask.B + (1 - (src.A * mask.B)) * dst.B + * + * But we can do some simpler operations, right? How about PictOpOutReverse, + * which has a source factor of 0 and dest factor of (1 - source alpha). We + * can get the source alpha value (srca.X = src.A * mask.X) out of the texture + * blenders pretty easily. So we can do a component-alpha OutReverse, which + * gets us: + * + * dst.A = 0 + (1 - (src.A * mask.A)) * dst.A + * dst.R = 0 + (1 - (src.A * mask.R)) * dst.R + * dst.G = 0 + (1 - (src.A * mask.G)) * dst.G + * dst.B = 0 + (1 - (src.A * mask.B)) * dst.B + * + * OK. And if an op doesn't use the source alpha value for the destination + * factor, then we can do the channel multiplication in the texture blenders + * to get the source value, and ignore the source alpha that we wouldn't use. + * We've supported this in the Radeon driver for a long time. An example would + * be PictOpAdd, which does: + * + * dst.A = src.A * mask.A + dst.A + * dst.R = src.R * mask.R + dst.R + * dst.G = src.G * mask.G + dst.G + * dst.B = src.B * mask.B + dst.B + * + * Hey, this looks good! If we do a PictOpOutReverse and then a PictOpAdd right + * after it, we get: + * + * dst.A = src.A * mask.A + ((1 - (src.A * mask.A)) * dst.A) + * dst.R = src.R * mask.R + ((1 - (src.A * mask.R)) * dst.R) + * dst.G = src.G * mask.G + ((1 - (src.A * mask.G)) * dst.G) + * dst.B = src.B * mask.B + ((1 - (src.A * mask.B)) * dst.B) + */ + static int -exaTryComponentAlphaHelper(CARD8 op, - PicturePtr pSrc, - PicturePtr pMask, - PicturePtr pDst, - INT16 xSrc, - INT16 ySrc, - INT16 xMask, - INT16 yMask, - INT16 xDst, - INT16 yDst, - CARD16 width, - CARD16 height) +exaTryMagicTwoPassCompositeHelper(CARD8 op, + PicturePtr pSrc, + PicturePtr pMask, + PicturePtr pDst, + INT16 xSrc, + INT16 ySrc, + INT16 xMask, + INT16 yMask, + INT16 xDst, + INT16 yDst, + CARD16 width, + CARD16 height) { ExaScreenPriv (pDst->pDrawable->pScreen); assert(op == PictOpOver); - assert(pMask->componentAlpha == TRUE); if (pExaScr->info->CheckComposite && (!(*pExaScr->info->CheckComposite)(PictOpOutReverse, pSrc, pMask, @@ -533,7 +590,8 @@ exaComposite(CARD8 op, if (op == PictOpSrc) { if (pSrc->pDrawable->width == 1 && - pSrc->pDrawable->height == 1 && pSrc->repeat) + pSrc->pDrawable->height == 1 && pSrc->repeat && + pSrc->repeatType == RepeatNormal) { ret = exaTryDriverSolidFill(pSrc, pDst, xSrc, ySrc, xDst, yDst, width, height); @@ -573,21 +631,34 @@ exaComposite(CARD8 op, pMask->repeat = 0; if (pExaScr->info->PrepareComposite && + (!pSrc->repeat || pSrc->repeat == RepeatNormal) && + (!pMask || !pMask->repeat || pMask->repeat == RepeatNormal) && !pSrc->alphaMap && (!pMask || !pMask->alphaMap) && !pDst->alphaMap) { + Bool isSrcSolid; + ret = exaTryDriverComposite(op, pSrc, pMask, pDst, xSrc, ySrc, xMask, yMask, xDst, yDst, width, height); if (ret == 1) goto done; + /* For generic masks and solid src pictures, mach64 can do Over in two + * passes, similar to the component-alpha case. + */ + isSrcSolid = pSrc->pDrawable->width == 1 && + pSrc->pDrawable->height == 1 && + pSrc->repeat; + /* If we couldn't do the Composite in a single pass, and it was a * component-alpha Over, see if we can do it in two passes with * an OutReverse and then an Add. */ - if (ret == -1 && pMask && pMask->componentAlpha && op == PictOpOver) { - ret = exaTryComponentAlphaHelper(op, pSrc, pMask, pDst, xSrc, ySrc, - xMask, yMask, xDst, yDst, - width, height); + if (ret == -1 && op == PictOpOver && pMask && + (pMask->componentAlpha || isSrcSolid)) { + ret = exaTryMagicTwoPassCompositeHelper(op, pSrc, pMask, pDst, + xSrc, ySrc, + xMask, yMask, xDst, yDst, + width, height); if (ret == 1) goto done; } diff --git a/fb/Makefile.am b/fb/Makefile.am index 7b024aa75..1649669c0 100644 --- a/fb/Makefile.am +++ b/fb/Makefile.am @@ -1,17 +1,19 @@ -noinst_LTLIBRARIES = libfb.la libfbmmx.la +noinst_LTLIBRARIES = libfb.la libwfb.la libfbmmx.la INCLUDES = \ -I$(top_srcdir)/hw/xfree86/os-support \ -I$(top_srcdir)/hw/xfree86/os-support/bus \ -I$(top_srcdir)/hw/xfree86/common -AM_CFLAGS = $(DIX_CFLAGS) @SERVER_DEFINES@ @MODULE_DEFINES@ @LOADER_DEFINES@ +AM_CFLAGS = $(DIX_CFLAGS) if XORG -sdk_HEADERS = fb.h fbrop.h fbpseudocolor.h fboverlay.h +sdk_HEADERS = fb.h fbrop.h fbpseudocolor.h fboverlay.h wfbrename.h endif +libfb_la_CFLAGS = $(AM_CFLAGS) + if MMX_CAPABLE -AM_CFLAGS += -DUSE_MMX +libfb_la_CFLAGS += -DUSE_MMX libfbmmx_la_CFLAGS = \ $(DIX_CFLAGS) \ @@ -23,6 +25,8 @@ libfbmmx_la_CFLAGS = \ --param large-function-growth=10000 endif +libwfb_la_CFLAGS = $(AM_CFLAGS) -DFB_ACCESS_WRAPPER + libfbmmx_la_SOURCES = \ fbmmx.c \ fbmmx.h @@ -70,6 +74,8 @@ libfb_la_SOURCES = \ fbedge.c \ fbedgeimp.h +libwfb_la_SOURCES = $(libfb_la_SOURCES) + libfb_la_LIBADD = libfbmmx.la EXTRA_DIST = fbcmap.c diff --git a/fb/fb.h b/fb/fb.h index ae2ab33e6..e60507874 100644 --- a/fb/fb.h +++ b/fb/fb.h @@ -1,5 +1,4 @@ /* - * $XFree86: xc/programs/Xserver/fb/fb.h,v 1.36tsi Exp $ * * Copyright © 1998 Keith Packard * @@ -22,7 +21,6 @@ * PERFORMANCE OF THIS SOFTWARE. */ -/* $XdotOrg: xc/programs/Xserver/fb/fb.h,v 1.12 2005/08/24 11:18:33 daniels Exp $ */ #ifndef _FB_H_ #define _FB_H_ @@ -46,6 +44,39 @@ #include "picture.h" #endif +#ifdef FB_ACCESS_WRAPPER + +#include "wfbrename.h" +#define FBPREFIX(x) wfb##x +#define WRITE(ptr, val) ((*wfbWriteMemory)((ptr), (val), sizeof(*(ptr)))) +#define READ(ptr) ((*wfbReadMemory)((ptr), sizeof(*(ptr)))) + +#define MEMCPY_WRAPPED(dst, src, size) do { \ + size_t _i; \ + CARD8 *_dst = (CARD8*)(dst), *_src = (CARD8*)(src); \ + for(_i = 0; _i < size; _i++) { \ + WRITE(_dst +_i, READ(_src + _i)); \ + } \ +} while(0) + +#define MEMSET_WRAPPED(dst, val, size) do { \ + size_t _i; \ + CARD8 *_dst = (CARD8*)(dst); \ + for(_i = 0; _i < size; _i++) { \ + WRITE(_dst +_i, (val)); \ + } \ +} while(0) + +#else + +#define FBPREFIX(x) fb##x +#define WRITE(ptr, val) (*(ptr) = (val)) +#define READ(ptr) (*(ptr)) +#define MEMCPY_WRAPPED(dst, src, size) memcpy((dst), (src), (size)) +#define MEMSET_WRAPPED(dst, val, size) memset((dst), (val), (size)) + +#endif + /* * This single define controls the basic size of data manipulated * by this software; it must be log2(sizeof (FbBits) * 8) @@ -224,8 +255,8 @@ extern void fbSetBits (FbStip *bits, int stride, FbStip data); #define FbPtrOffset(p,o,t) ((t *) ((CARD8 *) (p) + (o))) #define FbSelectPatternPart(xor,o,t) ((xor) >> (FbPatternOffset (o,t) << 3)) -#define FbStorePart(dst,off,t,xor) (*FbPtrOffset(dst,off,t) = \ - FbSelectPart(xor,off,t)) +#define FbStorePart(dst,off,t,xor) (WRITE(FbPtrOffset(dst,off,t), \ + FbSelectPart(xor,off,t))) #ifndef FbSelectPart #define FbSelectPart(x,o,t) FbSelectPatternPart(x,o,t) #endif @@ -405,7 +436,7 @@ extern void fbSetBits (FbStip *bits, int stride, FbStip data); FbStorePart(dst,sizeof (FbBits) - 1,CARD8,xor); \ break; \ default: \ - *dst = FbDoMaskRRop(*dst, and, xor, l); \ + WRITE(dst, FbDoMaskRRop(READ(dst), and, xor, l)); \ break; \ } \ } @@ -425,7 +456,7 @@ extern void fbSetBits (FbStip *bits, int stride, FbStip data); break; \ FbDoRightMaskByteRRop6Cases(dst,xor) \ default: \ - *dst = FbDoMaskRRop (*dst, and, xor, r); \ + WRITE(dst, FbDoMaskRRop (READ(dst), and, xor, r)); \ } \ } #endif @@ -457,20 +488,20 @@ extern void fbSetBits (FbStip *bits, int stride, FbStip data); * The term "lane" comes from the hardware term "byte-lane" which */ -#define FbLaneCase1(n,a,o) ((n) == 0x01 ? \ - (*(CARD8 *) ((a)+FbPatternOffset(o,CARD8)) = \ - fgxor) : 0) -#define FbLaneCase2(n,a,o) ((n) == 0x03 ? \ - (*(CARD16 *) ((a)+FbPatternOffset(o,CARD16)) = \ +#define FbLaneCase1(n,a,o) ((n) == 0x01 ? (void) \ + WRITE((CARD8 *) ((a)+FbPatternOffset(o,CARD8)), \ + fgxor) : (void) 0) +#define FbLaneCase2(n,a,o) ((n) == 0x03 ? (void) \ + WRITE((CARD16 *) ((a)+FbPatternOffset(o,CARD16)), \ fgxor) : \ ((void)FbLaneCase1((n)&1,a,o), \ FbLaneCase1((n)>>1,a,(o)+1))) -#define FbLaneCase4(n,a,o) ((n) == 0x0f ? \ - (*(CARD32 *) ((a)+FbPatternOffset(o,CARD32)) = \ +#define FbLaneCase4(n,a,o) ((n) == 0x0f ? (void) \ + WRITE((CARD32 *) ((a)+FbPatternOffset(o,CARD32)), \ fgxor) : \ ((void)FbLaneCase2((n)&3,a,o), \ FbLaneCase2((n)>>2,a,(o)+2))) -#define FbLaneCase8(n,a,o) ((n) == 0x0ff ? (*(FbBits *) ((a)+(o)) = fgxor) : \ +#define FbLaneCase8(n,a,o) ((n) == 0x0ff ? (void) (*(FbBits *) ((a)+(o)) = fgxor) : \ ((void)FbLaneCase4((n)&15,a,o), \ FbLaneCase4((n)>>4,a,(o)+4))) @@ -590,6 +621,32 @@ extern WindowPtr *WindowTable; #define FB_SCREEN_PRIVATE #endif +/* Framebuffer access wrapper */ +typedef FbBits (*ReadMemoryProcPtr)(const void *src, int size); +typedef void (*WriteMemoryProcPtr)(void *dst, FbBits value, int size); +typedef void (*SetupWrapProcPtr)(ReadMemoryProcPtr *pRead, + WriteMemoryProcPtr *pWrite, + DrawablePtr pDraw); +typedef void (*FinishWrapProcPtr)(DrawablePtr pDraw); + +#ifdef FB_ACCESS_WRAPPER + +#define fbPrepareAccess(pDraw) \ + fbGetScreenPrivate((pDraw)->pScreen)->setupWrap( \ + &wfbReadMemory, \ + &wfbWriteMemory, \ + (pDraw)) +#define fbFinishAccess(pDraw) \ + fbGetScreenPrivate((pDraw)->pScreen)->finishWrap(pDraw) + +#else + +#define fbPrepareAccess(pPix) +#define fbFinishAccess(pDraw) + +#endif + + #ifdef FB_SCREEN_PRIVATE extern int fbScreenPrivateIndex; extern int fbGetScreenPrivateIndex(void); @@ -598,6 +655,10 @@ extern int fbGetScreenPrivateIndex(void); typedef struct { unsigned char win32bpp; /* window bpp for 32-bpp images */ unsigned char pix32bpp; /* pixmap bpp for 32-bpp images */ +#ifdef FB_ACCESS_WRAPPER + SetupWrapProcPtr setupWrap; /* driver hook to set pixmap access wrapping */ + FinishWrapProcPtr finishWrap; /* driver hook to clean up pixmap access wrapping */ +#endif } FbScreenPrivRec, *FbScreenPrivPtr; #define fbGetScreenPrivate(pScreen) ((FbScreenPrivPtr) \ @@ -676,6 +737,7 @@ typedef struct { (xoff) = __fbPixOffXPix(_pPix); \ (yoff) = __fbPixOffYPix(_pPix); \ } \ + fbPrepareAccess(pDrawable); \ (pointer) = (FbBits *) _pPix->devPrivate.ptr; \ (stride) = ((int) _pPix->devKind) / sizeof (FbBits); (void)(stride); \ (bpp) = _pPix->drawable.bitsPerPixel; (void)(bpp); \ @@ -692,6 +754,7 @@ typedef struct { (xoff) = __fbPixOffXPix(_pPix); \ (yoff) = __fbPixOffYPix(_pPix); \ } \ + fbPrepareAccess(pDrawable); \ (pointer) = (FbStip *) _pPix->devPrivate.ptr; \ (stride) = ((int) _pPix->devKind) / sizeof (FbStip); (void)(stride); \ (bpp) = _pPix->drawable.bitsPerPixel; (void)(bpp); \ @@ -1278,6 +1341,9 @@ fbCreateDefColormap(ScreenPtr pScreen); void fbClearVisualTypes(void); +Bool +fbHasVisualTypes (int depth); + Bool fbSetVisualTypes (int depth, int visuals, int bitsPerRGB); @@ -1740,6 +1806,30 @@ fbSetupScreen(ScreenPtr pScreen, int width, /* pixel width of frame buffer */ int bpp); /* bits per pixel of frame buffer */ +Bool +wfbFinishScreenInit(ScreenPtr pScreen, + pointer pbits, + int xsize, + int ysize, + int dpix, + int dpiy, + int width, + int bpp, + SetupWrapProcPtr setupWrap, + FinishWrapProcPtr finishWrap); + +Bool +wfbScreenInit(ScreenPtr pScreen, + pointer pbits, + int xsize, + int ysize, + int dpix, + int dpiy, + int width, + int bpp, + SetupWrapProcPtr setupWrap, + FinishWrapProcPtr finishWrap); + Bool fbFinishScreenInit(ScreenPtr pScreen, pointer pbits, @@ -1996,6 +2086,11 @@ fbReplicatePixel (Pixel p, int bpp); void fbReduceRasterOp (int rop, FbBits fg, FbBits pm, FbBits *andp, FbBits *xorp); +#ifdef FB_ACCESS_WRAPPER +extern ReadMemoryProcPtr wfbReadMemory; +extern WriteMemoryProcPtr wfbWriteMemory; +#endif + /* * fbwindow.c */ diff --git a/fb/fb24_32.c b/fb/fb24_32.c index d18ef70ce..00b739b25 100644 --- a/fb/fb24_32.c +++ b/fb/fb24_32.c @@ -1,5 +1,4 @@ /* - * $XFree86: xc/programs/Xserver/fb/fb24_32.c,v 1.4 2000/08/09 17:50:51 keithp Exp $ * * Copyright © 2000 SuSE, Inc. * @@ -28,9 +27,6 @@ #endif #include -#ifdef XFree86LOADER -#include "xf86.h" -#endif #include "fb.h" @@ -42,18 +38,18 @@ * by reading/writing aligned CARD32s where it's easy */ -#define Get8(a) ((CARD32) *(a)) +#define Get8(a) ((CARD32) READ(a)) #if BITMAP_BIT_ORDER == MSBFirst #define Get24(a) ((Get8(a) << 16) | (Get8((a)+1) << 8) | Get8((a)+2)) -#define Put24(a,p) (((a)[0] = (CARD8) ((p) >> 16)), \ - ((a)[1] = (CARD8) ((p) >> 8)), \ - ((a)[2] = (CARD8) (p))) +#define Put24(a,p) ((WRITE((a+0), (CARD8) ((p) >> 16))), \ + (WRITE((a+1), (CARD8) ((p) >> 8))), \ + (WRITE((a+2), (CARD8) (p)))) #else #define Get24(a) (Get8(a) | (Get8((a)+1) << 8) | (Get8((a)+2)<<16)) -#define Put24(a,p) (((a)[0] = (CARD8) (p)), \ - ((a)[1] = (CARD8) ((p) >> 8)), \ - ((a)[2] = (CARD8) ((p) >> 16))) +#define Put24(a,p) ((WRITE((a+0), (CARD8) (p))), \ + (WRITE((a+1), (CARD8) ((p) >> 8))), \ + (WRITE((a+2), (CARD8) ((p) >> 16)))) #endif typedef void (*fb24_32BltFunc) (CARD8 *srcLine, @@ -110,7 +106,7 @@ fb24_32BltDown (CARD8 *srcLine, while (((long) dst & 3) && w) { w--; - pixel = *src++; + pixel = READ(src++); pixel = FbDoDestInvarientMergeRop(pixel); Put24 (dst, pixel); dst += 3; @@ -119,35 +115,35 @@ fb24_32BltDown (CARD8 *srcLine, while (w >= 4) { CARD32 s0, s1; - s0 = *src++; + s0 = READ(src++); s0 = FbDoDestInvarientMergeRop(s0); - s1 = *src++; + s1 = READ(src++); s1 = FbDoDestInvarientMergeRop(s1); #if BITMAP_BIT_ORDER == LSBFirst - *(CARD32 *)(dst) = (s0 & 0xffffff) | (s1 << 24); + WRITE((CARD32 *)dst, (s0 & 0xffffff) | (s1 << 24)); #else - *(CARD32 *)(dst) = (s0 << 8) | ((s1 & 0xffffff) >> 16); + WRITE((CARD32 *)dst, (s0 << 8) | ((s1 & 0xffffff) >> 16)); #endif - s0 = *src++; + s0 = READ(src++); s0 = FbDoDestInvarientMergeRop(s0); #if BITMAP_BIT_ORDER == LSBFirst - *(CARD32 *)(dst+4) = ((s1 & 0xffffff) >> 8) | (s0 << 16); + WRITE((CARD32 *)(dst+4), ((s1 & 0xffffff) >> 8) | (s0 << 16)); #else - *(CARD32 *)(dst+4) = (s1 << 16) | ((s0 & 0xffffff) >> 8); + WRITE((CARD32 *)(dst+4), (s1 << 16) | ((s0 & 0xffffff) >> 8)); #endif - s1 = *src++; + s1 = READ(src++); s1 = FbDoDestInvarientMergeRop(s1); #if BITMAP_BIT_ORDER == LSBFirst - *(CARD32 *)(dst+8) = ((s0 & 0xffffff) >> 16) | (s1 << 8); + WRITE((CARD32 *)(dst+8), ((s0 & 0xffffff) >> 16) | (s1 << 8)); #else - *(CARD32 *)(dst+8) = (s0 << 24) | (s1 & 0xffffff); + WRITE((CARD32 *)(dst+8), (s0 << 24) | (s1 & 0xffffff)); #endif dst += 12; w -= 4; } while (w--) { - pixel = *src++; + pixel = READ(src++); pixel = FbDoDestInvarientMergeRop(pixel); Put24 (dst, pixel); dst += 3; @@ -157,7 +153,7 @@ fb24_32BltDown (CARD8 *srcLine, { while (w--) { - pixel = *src++; + pixel = READ(src++); dpixel = Get24 (dst); pixel = FbDoMergeRop(pixel, dpixel); Put24 (dst, pixel); @@ -209,40 +205,40 @@ fb24_32BltUp (CARD8 *srcLine, w--; pixel = Get24(src); src += 3; - *dst++ = FbDoDestInvarientMergeRop(pixel); + WRITE(dst++, FbDoDestInvarientMergeRop(pixel)); } /* Do four aligned pixels at a time */ while (w >= 4) { CARD32 s0, s1; - s0 = *(CARD32 *)(src); + s0 = READ((CARD32 *)src); #if BITMAP_BIT_ORDER == LSBFirst pixel = s0 & 0xffffff; #else pixel = s0 >> 8; #endif - *dst++ = FbDoDestInvarientMergeRop(pixel); - s1 = *(CARD32 *)(src+4); + WRITE(dst++, FbDoDestInvarientMergeRop(pixel)); + s1 = READ((CARD32 *)(src+4)); #if BITMAP_BIT_ORDER == LSBFirst pixel = (s0 >> 24) | ((s1 << 8) & 0xffffff); #else pixel = ((s0 << 16) & 0xffffff) | (s1 >> 16); #endif - *dst++ = FbDoDestInvarientMergeRop(pixel); - s0 = *(CARD32 *)(src+8); + WRITE(dst++, FbDoDestInvarientMergeRop(pixel)); + s0 = READ((CARD32 *)(src+8)); #if BITMAP_BIT_ORDER == LSBFirst pixel = (s1 >> 16) | ((s0 << 16) & 0xffffff); #else pixel = ((s1 << 8) & 0xffffff) | (s0 >> 24); #endif - *dst++ = FbDoDestInvarientMergeRop(pixel); + WRITE(dst++, FbDoDestInvarientMergeRop(pixel)); #if BITMAP_BIT_ORDER == LSBFirst pixel = s0 >> 8; #else pixel = s0 & 0xffffff; #endif - *dst++ = FbDoDestInvarientMergeRop(pixel); + WRITE(dst++, FbDoDestInvarientMergeRop(pixel)); src += 12; w -= 4; } @@ -251,7 +247,7 @@ fb24_32BltUp (CARD8 *srcLine, w--; pixel = Get24(src); src += 3; - *dst++ = FbDoDestInvarientMergeRop(pixel); + WRITE(dst++, FbDoDestInvarientMergeRop(pixel)); } } else @@ -260,7 +256,7 @@ fb24_32BltUp (CARD8 *srcLine, { pixel = Get24(src); src += 3; - *dst = FbDoMergeRop(pixel, *dst); + WRITE(dst, FbDoMergeRop(pixel, READ(dst))); dst++; } } @@ -309,6 +305,8 @@ fb24_32GetSpans(DrawablePtr pDrawable, ppt++; pwidth++; } + + fbFinishAccess (pDrawable); } void @@ -370,6 +368,8 @@ fb24_32SetSpans (DrawablePtr pDrawable, ppt++; pwidth++; } + + fbFinishAccess (pDrawable); } /* @@ -433,6 +433,8 @@ fb24_32PutZImage (DrawablePtr pDrawable, alu, pm); } + + fbFinishAccess (pDrawable); } void @@ -467,6 +469,8 @@ fb24_32GetImage (DrawablePtr pDrawable, fb24_32BltUp (src + (y + srcYoff) * srcStride, srcStride, x + srcXoff, (CARD8 *) d, dstStride, 0, w, h, GXcopy, pm); + + fbFinishAccess (pDrawable); } void @@ -523,6 +527,9 @@ fb24_32CopyMtoN (DrawablePtr pSrcDrawable, pPriv->pm); pbox++; } + + fbFinishAccess (pSrcDrawable); + fbFinishAccess (pDstDrawable); } PixmapPtr @@ -567,6 +574,9 @@ fb24_32ReformatTile(PixmapPtr pOldTile, int bitsPerPixel) GXcopy, FB_ALLONES); + fbFinishAccess (&pOldTile->drawable); + fbFinishAccess (&pNewTile->drawable); + return pNewTile; } diff --git a/fb/fballpriv.c b/fb/fballpriv.c index 75b577049..4f807ed8d 100644 --- a/fb/fballpriv.c +++ b/fb/fballpriv.c @@ -21,7 +21,6 @@ * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR * PERFORMANCE OF THIS SOFTWARE. */ -/* $XFree86: xc/programs/Xserver/fb/fballpriv.c,v 1.3 2000/02/23 20:29:41 dawes Exp $ */ #ifdef HAVE_DIX_CONFIG_H #include @@ -91,3 +90,8 @@ fbAllocatePrivates(ScreenPtr pScreen, int *pGCIndex) #endif return TRUE; } + +#ifdef FB_ACCESS_WRAPPER +ReadMemoryProcPtr wfbReadMemory; +WriteMemoryProcPtr wfbWriteMemory; +#endif diff --git a/fb/fbarc.c b/fb/fbarc.c index 98cf8796c..d2c1a76f1 100644 --- a/fb/fbarc.c +++ b/fb/fbarc.c @@ -21,7 +21,6 @@ * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR * PERFORMANCE OF THIS SOFTWARE. */ -/* $XFree86: xc/programs/Xserver/fb/fbarc.c,v 1.7tsi Exp $ */ #ifdef HAVE_DIX_CONFIG_H #include @@ -110,6 +109,7 @@ fbPolyArc (DrawablePtr pDrawable, miPolyArc(pDrawable, pGC, 1, parcs); parcs++; } + fbFinishAccess (pDrawable); } else #endif diff --git a/fb/fbbits.c b/fb/fbbits.c index ab67b4cf3..cefe943b6 100644 --- a/fb/fbbits.c +++ b/fb/fbbits.c @@ -21,7 +21,6 @@ * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR * PERFORMANCE OF THIS SOFTWARE. */ -/* $XFree86: xc/programs/Xserver/fb/fbbits.c,v 1.5 2000/02/17 14:16:22 dawes Exp $ */ #ifdef HAVE_DIX_CONFIG_H #include @@ -104,14 +103,14 @@ #define BITSUNIT BYTE #define BITSMUL 3 -#define FbDoTypeStore(b,t,x,s) (*((t *) (b)) = (x) >> (s)) -#define FbDoTypeRRop(b,t,a,x,s) (*((t *) (b)) = FbDoRRop(*((t *) (b)),\ - (a) >> (s), \ - (x) >> (s))) -#define FbDoTypeMaskRRop(b,t,a,x,m,s) (*((t *) (b)) = FbDoMaskRRop(*((t *) (b)),\ - (a) >> (s), \ - (x) >> (s), \ - (m) >> (s)) +#define FbDoTypeStore(b,t,x,s) WRITE(((t *) (b)), (x) >> (s)) +#define FbDoTypeRRop(b,t,a,x,s) WRITE((t *) (b), FbDoRRop(READ((t *) (b)),\ + (a) >> (s), \ + (x) >> (s))) +#define FbDoTypeMaskRRop(b,t,a,x,m,s) WRITE((t *) (b), FbDoMaskRRop(READ((t *) (b)),\ + (a) >> (s), \ + (x) >> (s), \ + (m) >> (s))) #if BITMAP_BIT_ORDER == LSBFirst #define BITSSTORE(b,x) ((unsigned long) (b) & 1 ? \ (FbDoTypeStore (b, CARD8, x, 0), \ diff --git a/fb/fbbits.h b/fb/fbbits.h index e5c006dbb..603c02929 100644 --- a/fb/fbbits.h +++ b/fb/fbbits.h @@ -42,13 +42,13 @@ #ifdef BITSSTORE #define STORE(b,x) BITSSTORE(b,x) #else -#define STORE(b,x) (*(b) = (x)) +#define STORE(b,x) WRITE((b), (x)) #endif #ifdef BITSRROP #define RROP(b,a,x) BITSRROP(b,a,x) #else -#define RROP(b,a,x) (*(b) = FbDoRRop (*(b), (a), (x))) +#define RROP(b,a,x) WRITE((b), FbDoRRop (READ(b), (a), (x))) #endif #ifdef BITSUNIT @@ -119,6 +119,8 @@ BRESSOLID (DrawablePtr pDrawable, e += e3; } } + + fbFinishAccess (pDrawable); } #endif @@ -263,6 +265,8 @@ onOffOdd: dashlen = len; } } + + fbFinishAccess (pDrawable); } #endif @@ -541,18 +545,18 @@ ARC (FbBits *dst, # define WRITE_ADDR4(n) ((n)) #endif -#define WRITE1(d,n,fg) ((d)[WRITE_ADDR1(n)] = (BITS) (fg)) +#define WRITE1(d,n,fg) WRITE(d + WRITE_ADDR1(n), (BITS) (fg)) #ifdef BITS2 -# define WRITE2(d,n,fg) (*((BITS2 *) &((d)[WRITE_ADDR2(n)])) = (BITS2) (fg)) +# define WRITE2(d,n,fg) WRITE((BITS2 *) &((d)[WRITE_ADDR2(n)]), (BITS2) (fg)) #else -# define WRITE2(d,n,fg) WRITE1(d,(n)+1,WRITE1(d,n,fg)) +# define WRITE2(d,n,fg) (WRITE1(d,n,fg), WRITE1(d,(n)+1,fg)) #endif #ifdef BITS4 -# define WRITE4(d,n,fg) (*((BITS4 *) &((d)[WRITE_ADDR4(n)])) = (BITS4) (fg)) +# define WRITE4(d,n,fg) WRITE((BITS4 *) &((d)[WRITE_ADDR4(n)]), (BITS4) (fg)) #else -# define WRITE4(d,n,fg) WRITE2(d,(n)+2,WRITE2(d,n,fg)) +# define WRITE4(d,n,fg) (WRITE2(d,n,fg), WRITE2(d,(n)+2,fg)) #endif void @@ -710,8 +714,10 @@ POLYLINE (DrawablePtr pDrawable, intToX(pt2) + xoff, intToY(pt2) + yoff, npt == 0 && pGC->capStyle != CapNotLast, &dashoffset); - if (!npt) + if (!npt) { + fbFinishAccess (pDrawable); return; + } pt1 = pt2; pt2 = *pts++; npt--; @@ -776,6 +782,7 @@ POLYLINE (DrawablePtr pDrawable, { RROP(bits,and,xor); } + fbFinishAccess (pDrawable); return; } pt1 = pt2; @@ -786,6 +793,8 @@ POLYLINE (DrawablePtr pDrawable, } } } + + fbFinishAccess (pDrawable); } #endif @@ -883,20 +892,20 @@ POLYSEGMENT (DrawablePtr pDrawable, FbMaskBits (dstX, width, startmask, nmiddle, endmask); if (startmask) { - *dstLine = FbDoMaskRRop (*dstLine, andBits, xorBits, startmask); + WRITE(dstLine, FbDoMaskRRop (READ(dstLine), andBits, xorBits, startmask)); dstLine++; } if (!andBits) while (nmiddle--) - *dstLine++ = xorBits; + WRITE(dstLine++, xorBits); else while (nmiddle--) { - *dstLine = FbDoRRop (*dstLine, andBits, xorBits); + WRITE(dstLine, FbDoRRop (READ(dstLine), andBits, xorBits)); dstLine++; } if (endmask) - *dstLine = FbDoMaskRRop (*dstLine, andBits, xorBits, endmask); + WRITE(dstLine, FbDoMaskRRop (READ(dstLine), andBits, xorBits, endmask)); } else { @@ -950,6 +959,8 @@ POLYSEGMENT (DrawablePtr pDrawable, } } } + + fbFinishAccess (pDrawable); } #endif diff --git a/fb/fbblt.c b/fb/fbblt.c index de08660e3..e18981a83 100644 --- a/fb/fbblt.c +++ b/fb/fbblt.c @@ -21,7 +21,6 @@ * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR * PERFORMANCE OF THIS SOFTWARE. */ -/* $XFree86: xc/programs/Xserver/fb/fbblt.c,v 1.7 2000/09/22 05:58:01 keithp Exp $ */ #ifdef HAVE_DIX_CONFIG_H #include @@ -93,10 +92,10 @@ fbBlt (FbBits *srcLine, if (!upsidedown) for (i = 0; i < height; i++) - memcpy(dst + i * dstStride, src + i * srcStride, width); + MEMCPY_WRAPPED(dst + i * dstStride, src + i * srcStride, width); else for (i = height - 1; i >= 0; i--) - memcpy(dst + i * dstStride, src + i * srcStride, width); + MEMCPY_WRAPPED(dst + i * dstStride, src + i * srcStride, width); return; } @@ -138,7 +137,7 @@ fbBlt (FbBits *srcLine, { if (endmask) { - bits = *--src; + bits = READ(--src); --dst; FbDoRightMaskByteMergeRop(dst, bits, endbyte, endmask); } @@ -146,20 +145,20 @@ fbBlt (FbBits *srcLine, if (destInvarient) { while (n--) - *--dst = FbDoDestInvarientMergeRop(*--src); + WRITE(--dst, FbDoDestInvarientMergeRop(READ(--src))); } else { while (n--) { - bits = *--src; + bits = READ(--src); --dst; - *dst = FbDoMergeRop (bits, *dst); + WRITE(dst, FbDoMergeRop (bits, READ(dst))); } } if (startmask) { - bits = *--src; + bits = READ(--src); --dst; FbDoLeftMaskByteMergeRop(dst, bits, startbyte, startmask); } @@ -168,7 +167,7 @@ fbBlt (FbBits *srcLine, { if (startmask) { - bits = *src++; + bits = READ(src++); FbDoLeftMaskByteMergeRop(dst, bits, startbyte, startmask); dst++; } @@ -199,20 +198,20 @@ fbBlt (FbBits *srcLine, } #endif while (n--) - *dst++ = FbDoDestInvarientMergeRop(*src++); + WRITE(dst++, FbDoDestInvarientMergeRop(READ(src++))); } else { while (n--) { - bits = *src++; - *dst = FbDoMergeRop (bits, *dst); + bits = READ(src++); + WRITE(dst, FbDoMergeRop (bits, READ(dst))); dst++; } } if (endmask) { - bits = *src; + bits = READ(src); FbDoRightMaskByteMergeRop(dst, bits, endbyte, endmask); } } @@ -241,13 +240,13 @@ fbBlt (FbBits *srcLine, if (reverse) { if (srcX < dstX) - bits1 = *--src; + bits1 = READ(--src); if (endmask) { bits = FbScrRight(bits1, rightShift); if (FbScrRight(endmask, leftShift)) { - bits1 = *--src; + bits1 = READ(--src); bits |= FbScrLeft(bits1, leftShift); } --dst; @@ -259,10 +258,10 @@ fbBlt (FbBits *srcLine, while (n--) { bits = FbScrRight(bits1, rightShift); - bits1 = *--src; + bits1 = READ(--src); bits |= FbScrLeft(bits1, leftShift); --dst; - *dst = FbDoDestInvarientMergeRop(bits); + WRITE(dst, FbDoDestInvarientMergeRop(bits)); } } else @@ -270,10 +269,10 @@ fbBlt (FbBits *srcLine, while (n--) { bits = FbScrRight(bits1, rightShift); - bits1 = *--src; + bits1 = READ(--src); bits |= FbScrLeft(bits1, leftShift); --dst; - *dst = FbDoMergeRop(bits, *dst); + WRITE(dst, FbDoMergeRop(bits, READ(dst))); } } if (startmask) @@ -281,7 +280,7 @@ fbBlt (FbBits *srcLine, bits = FbScrRight(bits1, rightShift); if (FbScrRight(startmask, leftShift)) { - bits1 = *--src; + bits1 = READ(--src); bits |= FbScrLeft(bits1, leftShift); } --dst; @@ -291,13 +290,13 @@ fbBlt (FbBits *srcLine, else { if (srcX > dstX) - bits1 = *src++; + bits1 = READ(src++); if (startmask) { bits = FbScrLeft(bits1, leftShift); if (FbScrLeft(startmask, rightShift)) { - bits1 = *src++; + bits1 = READ(src++); bits |= FbScrRight(bits1, rightShift); } FbDoLeftMaskByteMergeRop (dst, bits, startbyte, startmask); @@ -309,9 +308,9 @@ fbBlt (FbBits *srcLine, while (n--) { bits = FbScrLeft(bits1, leftShift); - bits1 = *src++; + bits1 = READ(src++); bits |= FbScrRight(bits1, rightShift); - *dst = FbDoDestInvarientMergeRop(bits); + WRITE(dst, FbDoDestInvarientMergeRop(bits)); dst++; } } @@ -320,9 +319,9 @@ fbBlt (FbBits *srcLine, while (n--) { bits = FbScrLeft(bits1, leftShift); - bits1 = *src++; + bits1 = READ(src++); bits |= FbScrRight(bits1, rightShift); - *dst = FbDoMergeRop(bits, *dst); + WRITE(dst, FbDoMergeRop(bits, READ(dst))); dst++; } } @@ -331,7 +330,7 @@ fbBlt (FbBits *srcLine, bits = FbScrLeft(bits1, leftShift); if (FbScrLeft(endmask, rightShift)) { - bits1 = *src; + bits1 = READ(src); bits |= FbScrRight(bits1, rightShift); } FbDoRightMaskByteMergeRop (dst, bits, endbyte, endmask); @@ -426,45 +425,45 @@ fbBlt24Line (FbBits *src, { if (endmask) { - bits = *--src; + bits = READ(--src); --dst; - *dst = FbDoMaskMergeRop (bits, *dst, mask & endmask); + WRITE(dst, FbDoMaskMergeRop (bits, READ(dst), mask & endmask)); mask = FbPrev24Pix (mask); } while (n--) { - bits = *--src; + bits = READ(--src); --dst; - *dst = FbDoMaskMergeRop (bits, *dst, mask); + WRITE(dst, FbDoMaskMergeRop (bits, READ(dst), mask)); mask = FbPrev24Pix (mask); } if (startmask) { - bits = *--src; + bits = READ(--src); --dst; - *dst = FbDoMaskMergeRop(bits, *dst, mask & startmask); + WRITE(dst, FbDoMaskMergeRop(bits, READ(dst), mask & startmask)); } } else { if (startmask) { - bits = *src++; - *dst = FbDoMaskMergeRop (bits, *dst, mask & startmask); + bits = READ(src++); + WRITE(dst, FbDoMaskMergeRop (bits, READ(dst), mask & startmask)); dst++; mask = FbNext24Pix(mask); } while (n--) { - bits = *src++; - *dst = FbDoMaskMergeRop (bits, *dst, mask); + bits = READ(src++); + WRITE(dst, FbDoMaskMergeRop (bits, READ(dst), mask)); dst++; mask = FbNext24Pix(mask); } if (endmask) { - bits = *src; - *dst = FbDoMaskMergeRop(bits, *dst, mask & endmask); + bits = READ(src); + WRITE(dst, FbDoMaskMergeRop(bits, READ(dst), mask & endmask)); } } } @@ -485,26 +484,26 @@ fbBlt24Line (FbBits *src, if (reverse) { if (srcX < dstX) - bits1 = *--src; + bits1 = READ(--src); if (endmask) { bits = FbScrRight(bits1, rightShift); if (FbScrRight(endmask, leftShift)) { - bits1 = *--src; + bits1 = READ(--src); bits |= FbScrLeft(bits1, leftShift); } --dst; - *dst = FbDoMaskMergeRop (bits, *dst, mask & endmask); + WRITE(dst, FbDoMaskMergeRop (bits, READ(dst), mask & endmask)); mask = FbPrev24Pix(mask); } while (n--) { bits = FbScrRight(bits1, rightShift); - bits1 = *--src; + bits1 = READ(--src); bits |= FbScrLeft(bits1, leftShift); --dst; - *dst = FbDoMaskMergeRop(bits, *dst, mask); + WRITE(dst, FbDoMaskMergeRop(bits, READ(dst), mask)); mask = FbPrev24Pix(mask); } if (startmask) @@ -512,32 +511,32 @@ fbBlt24Line (FbBits *src, bits = FbScrRight(bits1, rightShift); if (FbScrRight(startmask, leftShift)) { - bits1 = *--src; + bits1 = READ(--src); bits |= FbScrLeft(bits1, leftShift); } --dst; - *dst = FbDoMaskMergeRop (bits, *dst, mask & startmask); + WRITE(dst, FbDoMaskMergeRop (bits, READ(dst), mask & startmask)); } } else { if (srcX > dstX) - bits1 = *src++; + bits1 = READ(src++); if (startmask) { bits = FbScrLeft(bits1, leftShift); - bits1 = *src++; + bits1 = READ(src++); bits |= FbScrRight(bits1, rightShift); - *dst = FbDoMaskMergeRop (bits, *dst, mask & startmask); + WRITE(dst, FbDoMaskMergeRop (bits, READ(dst), mask & startmask)); dst++; mask = FbNext24Pix(mask); } while (n--) { bits = FbScrLeft(bits1, leftShift); - bits1 = *src++; + bits1 = READ(src++); bits |= FbScrRight(bits1, rightShift); - *dst = FbDoMaskMergeRop(bits, *dst, mask); + WRITE(dst, FbDoMaskMergeRop(bits, READ(dst), mask)); dst++; mask = FbNext24Pix(mask); } @@ -546,10 +545,10 @@ fbBlt24Line (FbBits *src, bits = FbScrLeft(bits1, leftShift); if (FbScrLeft(endmask, rightShift)) { - bits1 = *src; + bits1 = READ(src); bits |= FbScrRight(bits1, rightShift); } - *dst = FbDoMaskMergeRop (bits, *dst, mask & endmask); + WRITE(dst, FbDoMaskMergeRop (bits, READ(dst), mask & endmask)); } } } @@ -708,8 +707,8 @@ fbBltOdd (FbBits *srcLine, { if (startmask) { - bits = *src++; - *dst = FbDoMaskMergeRop (bits, *dst, startmask); + bits = READ(src++); + WRITE(dst, FbDoMaskMergeRop (bits, READ(dst), startmask)); dst++; } n = nmiddle; @@ -717,8 +716,8 @@ fbBltOdd (FbBits *srcLine, { while (n--) { - bits = *src++; - *dst = FbDoDestInvarientMergeRop(bits); + bits = READ(src++); + WRITE(dst, FbDoDestInvarientMergeRop(bits)); dst++; } } @@ -726,28 +725,28 @@ fbBltOdd (FbBits *srcLine, { while (n--) { - bits = *src++; - *dst = FbDoMergeRop (bits, *dst); + bits = READ(src++); + WRITE(dst, FbDoMergeRop (bits, READ(dst))); dst++; } } if (endmask) { - bits = *src; - *dst = FbDoMaskMergeRop(bits, *dst, endmask); + bits = READ(src); + WRITE(dst, FbDoMaskMergeRop(bits, READ(dst), endmask)); } } else { bits = 0; if (srcX > dstX) - bits = *src++; + bits = READ(src++); if (startmask) { bits1 = FbScrLeft(bits, leftShift); - bits = *src++; + bits = READ(src++); bits1 |= FbScrRight(bits, rightShift); - *dst = FbDoMaskMergeRop (bits1, *dst, startmask); + WRITE(dst, FbDoMaskMergeRop (bits1, READ(dst), startmask)); dst++; } n = nmiddle; @@ -756,9 +755,9 @@ fbBltOdd (FbBits *srcLine, while (n--) { bits1 = FbScrLeft(bits, leftShift); - bits = *src++; + bits = READ(src++); bits1 |= FbScrRight(bits, rightShift); - *dst = FbDoDestInvarientMergeRop(bits1); + WRITE(dst, FbDoDestInvarientMergeRop(bits1)); dst++; } } @@ -767,9 +766,9 @@ fbBltOdd (FbBits *srcLine, while (n--) { bits1 = FbScrLeft(bits, leftShift); - bits = *src++; + bits = READ(src++); bits1 |= FbScrRight(bits, rightShift); - *dst = FbDoMergeRop(bits1, *dst); + WRITE(dst, FbDoMergeRop(bits1, READ(dst))); dst++; } } @@ -778,10 +777,10 @@ fbBltOdd (FbBits *srcLine, bits1 = FbScrLeft(bits, leftShift); if (FbScrLeft(endmask, rightShift)) { - bits = *src; + bits = READ(src); bits1 |= FbScrRight(bits, rightShift); } - *dst = FbDoMaskMergeRop (bits1, *dst, endmask); + WRITE(dst, FbDoMaskMergeRop (bits1, READ(dst), endmask)); } } } diff --git a/fb/fbbltone.c b/fb/fbbltone.c index b271318d1..d2c180fef 100644 --- a/fb/fbbltone.c +++ b/fb/fbbltone.c @@ -21,7 +21,6 @@ * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR * PERFORMANCE OF THIS SOFTWARE. */ -/* $XFree86: xc/programs/Xserver/fb/fbbltone.c,v 1.11 2001/09/07 15:15:31 keithp Exp $ */ #ifdef HAVE_DIX_CONFIG_H #include @@ -52,12 +51,12 @@ #define LoadBits {\ if (leftShift) { \ - bitsRight = (src < srcEnd ? *src++ : 0); \ + bitsRight = (src < srcEnd ? READ(src++) : 0); \ bits = (FbStipLeft (bitsLeft, leftShift) | \ FbStipRight(bitsRight, rightShift)); \ bitsLeft = bitsRight; \ } else \ - bits = (src < srcEnd ? *src++ : 0); \ + bits = (src < srcEnd ? READ(src++) : 0); \ } #ifndef FBNOPIXADDR @@ -286,7 +285,7 @@ fbBltOne (FbStip *src, bitsLeft = 0; if (srcX > dstS) - bitsLeft = *src++; + bitsLeft = READ(src++); if (n) { /* @@ -339,7 +338,7 @@ fbBltOne (FbStip *src, else #endif mask = fbBits[FbLeftStipBits(bits,pixelsPerDst)]; - *dst = FbOpaqueStipple (mask, fgxor, bgxor); + WRITE(dst, FbOpaqueStipple (mask, fgxor, bgxor)); dst++; bits = FbStipLeft(bits, pixelsPerDst); } @@ -369,8 +368,8 @@ fbBltOne (FbStip *src, if (left || !transparent) { mask = fbBits[left]; - *dst = FbStippleRRop (*dst, mask, - fgand, fgxor, bgand, bgxor); + WRITE(dst, FbStippleRRop (READ(dst), mask, + fgand, fgxor, bgand, bgxor)); } dst++; bits = FbStipLeft(bits, pixelsPerDst); @@ -538,7 +537,7 @@ const FbBits fbStipple24Bits[3][1 << FbStip24Len] = { stip = FbLeftStipBits(bits, len); \ } else { \ stip = FbLeftStipBits(bits, remain); \ - bits = (src < srcEnd ? *src++ : 0); \ + bits = (src < srcEnd ? READ(src++) : 0); \ __len = (len) - remain; \ stip = FbMergePartStip24Bits(stip, FbLeftStipBits(bits, __len), \ remain, __len); \ @@ -549,7 +548,7 @@ const FbBits fbStipple24Bits[3][1 << FbStip24Len] = { } #define fbInitStipBits(offset,len,stip) {\ - bits = FbStipLeft (*src++,offset); \ + bits = FbStipLeft (READ(src++),offset); \ remain = FB_STIP_UNIT - offset; \ fbFirstStipBits(len,stip); \ stip = FbMergeStip24Bits (0, stip, len); \ @@ -632,10 +631,11 @@ fbBltOne24 (FbStip *srcLine, if (leftMask) { mask = fbStipple24Bits[rot >> 3][stip]; - *dst = (*dst & ~leftMask) | (FbOpaqueStipple (mask, - FbRot24(fgxor, rot), - FbRot24(bgxor, rot)) - & leftMask); + WRITE(dst, (READ(dst) & ~leftMask) | + (FbOpaqueStipple (mask, + FbRot24(fgxor, rot), + FbRot24(bgxor, rot)) + & leftMask)); dst++; fbNextStipBits(rot,stip); } @@ -643,19 +643,20 @@ fbBltOne24 (FbStip *srcLine, while (nl--) { mask = fbStipple24Bits[rot>>3][stip]; - *dst = FbOpaqueStipple (mask, - FbRot24(fgxor, rot), - FbRot24(bgxor, rot)); + WRITE(dst, FbOpaqueStipple (mask, + FbRot24(fgxor, rot), + FbRot24(bgxor, rot))); dst++; fbNextStipBits(rot,stip); } if (rightMask) { mask = fbStipple24Bits[rot >> 3][stip]; - *dst = (*dst & ~rightMask) | (FbOpaqueStipple (mask, - FbRot24(fgxor, rot), - FbRot24(bgxor, rot)) - & rightMask); + WRITE(dst, (READ(dst) & ~rightMask) | + (FbOpaqueStipple (mask, + FbRot24(fgxor, rot), + FbRot24(bgxor, rot)) + & rightMask)); } dst += dstStride; src += srcStride; @@ -675,7 +676,7 @@ fbBltOne24 (FbStip *srcLine, if (stip) { mask = fbStipple24Bits[rot >> 3][stip] & leftMask; - *dst = (*dst & ~mask) | (FbRot24(fgxor, rot) & mask); + WRITE(dst, (READ(dst) & ~mask) | (FbRot24(fgxor, rot) & mask)); } dst++; fbNextStipBits (rot, stip); @@ -686,7 +687,7 @@ fbBltOne24 (FbStip *srcLine, if (stip) { mask = fbStipple24Bits[rot>>3][stip]; - *dst = (*dst & ~mask) | (FbRot24(fgxor,rot) & mask); + WRITE(dst, (READ(dst) & ~mask) | (FbRot24(fgxor,rot) & mask)); } dst++; fbNextStipBits (rot, stip); @@ -696,7 +697,7 @@ fbBltOne24 (FbStip *srcLine, if (stip) { mask = fbStipple24Bits[rot >> 3][stip] & rightMask; - *dst = (*dst & ~mask) | (FbRot24(fgxor, rot) & mask); + WRITE(dst, (READ(dst) & ~mask) | (FbRot24(fgxor, rot) & mask)); } } dst += dstStride; @@ -713,12 +714,12 @@ fbBltOne24 (FbStip *srcLine, if (leftMask) { mask = fbStipple24Bits[rot >> 3][stip]; - *dst = FbStippleRRopMask (*dst, mask, - FbRot24(fgand, rot), - FbRot24(fgxor, rot), - FbRot24(bgand, rot), - FbRot24(bgxor, rot), - leftMask); + WRITE(dst, FbStippleRRopMask (READ(dst), mask, + FbRot24(fgand, rot), + FbRot24(fgxor, rot), + FbRot24(bgand, rot), + FbRot24(bgxor, rot), + leftMask)); dst++; fbNextStipBits(rot,stip); } @@ -726,23 +727,23 @@ fbBltOne24 (FbStip *srcLine, while (nl--) { mask = fbStipple24Bits[rot >> 3][stip]; - *dst = FbStippleRRop (*dst, mask, - FbRot24(fgand, rot), - FbRot24(fgxor, rot), - FbRot24(bgand, rot), - FbRot24(bgxor, rot)); + WRITE(dst, FbStippleRRop (READ(dst), mask, + FbRot24(fgand, rot), + FbRot24(fgxor, rot), + FbRot24(bgand, rot), + FbRot24(bgxor, rot))); dst++; fbNextStipBits(rot,stip); } if (rightMask) { mask = fbStipple24Bits[rot >> 3][stip]; - *dst = FbStippleRRopMask (*dst, mask, - FbRot24(fgand, rot), - FbRot24(fgxor, rot), - FbRot24(bgand, rot), - FbRot24(bgxor, rot), - rightMask); + WRITE(dst, FbStippleRRopMask (READ(dst), mask, + FbRot24(fgand, rot), + FbRot24(fgxor, rot), + FbRot24(bgand, rot), + FbRot24(bgxor, rot), + rightMask)); } dst += dstStride; } @@ -833,7 +834,7 @@ fbBltPlane (FbBits *src, if (srcBpp == 24) srcMask0 = FbRot24(pm,rot0) & FbBitsMask(0, srcBpp); #endif - srcBits = *s++; + srcBits = READ(s++); dstMask = dstMaskFirst; dstUnion = 0; @@ -845,7 +846,7 @@ fbBltPlane (FbBits *src, { if (!srcMask) { - srcBits = *s++; + srcBits = READ(s++); #ifdef FB_24BIT if (srcBpp == 24) srcMask0 = FbNext24Pix(srcMask0) & FbBitsMask(0,24); @@ -854,9 +855,9 @@ fbBltPlane (FbBits *src, } if (!dstMask) { - *d = FbStippleRRopMask(*d, dstBits, - fgand, fgxor, bgand, bgxor, - dstUnion); + WRITE(d, FbStippleRRopMask(READ(d), dstBits, + fgand, fgxor, bgand, bgxor, + dstUnion)); d++; dstMask = FbStipMask(0,1); dstUnion = 0; @@ -872,9 +873,9 @@ fbBltPlane (FbBits *src, dstMask = FbStipRight(dstMask,1); } if (dstUnion) - *d = FbStippleRRopMask(*d,dstBits, - fgand, fgxor, bgand, bgxor, - dstUnion); + WRITE(d, FbStippleRRopMask(READ(d),dstBits, + fgand, fgxor, bgand, bgxor, + dstUnion)); } } diff --git a/fb/fbbstore.c b/fb/fbbstore.c index 01ec9b7e0..78174b6fc 100644 --- a/fb/fbbstore.c +++ b/fb/fbbstore.c @@ -21,7 +21,6 @@ * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR * PERFORMANCE OF THIS SOFTWARE. */ -/* $XFree86: xc/programs/Xserver/fb/fbbstore.c,v 1.1 1999/11/19 13:53:42 hohndel Exp $ */ #ifdef HAVE_DIX_CONFIG_H #include diff --git a/fb/fbcmap.c b/fb/fbcmap.c index 762c51c9d..9cf5bcbf5 100644 --- a/fb/fbcmap.c +++ b/fb/fbcmap.c @@ -1,5 +1,3 @@ -/* $XConsortium: fbcmap.c,v 4.19 94/04/17 20:28:46 dpw Exp $ */ -/* $XFree86: xc/programs/Xserver/fb/fbcmap.c,v 1.5 2000/09/20 00:09:13 keithp Exp $ */ /************************************************************ Copyright 1987 by Sun Microsystems, Inc. Mountain View, CA. diff --git a/fb/fbcompose.c b/fb/fbcompose.c index c4f979d26..6ea948307 100644 --- a/fb/fbcompose.c +++ b/fb/fbcompose.c @@ -1,6 +1,4 @@ /* - * $XdotOrg: xserver/xorg/fb/fbcompose.c,v 1.28 2006/04/19 21:56:13 keithp Exp $ - * $XFree86: xc/programs/Xserver/fb/fbcompose.c,v 1.17tsi Exp $ * * Copyright © 2000 Keith Packard, member of The XFree86 Project, Inc. * 2005 Lars Knoll & Zack Rusin, Trolltech @@ -55,7 +53,7 @@ typedef FASTCALL void (*fetchProc)(const FbBits *bits, int x, int width, CARD32 static FASTCALL void fbFetch_a8r8g8b8 (const FbBits *bits, int x, int width, CARD32 *buffer, miIndexedPtr indexed) { - memcpy(buffer, (const CARD32 *)bits + x, width*sizeof(CARD32)); + MEMCPY_WRAPPED(buffer, (const CARD32 *)bits + x, width*sizeof(CARD32)); } static FASTCALL void @@ -64,7 +62,7 @@ fbFetch_x8r8g8b8 (const FbBits *bits, int x, int width, CARD32 *buffer, miIndexe const CARD32 *pixel = (const CARD32 *)bits + x; const CARD32 *end = pixel + width; while (pixel < end) { - *buffer++ = *pixel++ | 0xff000000; + WRITE(buffer++, READ(pixel++) | 0xff000000); } } @@ -74,9 +72,9 @@ fbFetch_a8b8g8r8 (const FbBits *bits, int x, int width, CARD32 *buffer, miIndexe const CARD32 *pixel = (CARD32 *)bits + x; const CARD32 *end = pixel + width; while (pixel < end) { - *buffer++ = ((*pixel & 0xff00ff00) | - ((*pixel >> 16) & 0xff) | - ((*pixel & 0xff) << 16)); + WRITE(buffer++, ((READ(pixel) & 0xff00ff00) | + ((READ(pixel) >> 16) & 0xff) | + ((READ(pixel) & 0xff) << 16))); ++pixel; } } @@ -87,10 +85,10 @@ fbFetch_x8b8g8r8 (const FbBits *bits, int x, int width, CARD32 *buffer, miIndexe const CARD32 *pixel = (CARD32 *)bits + x; const CARD32 *end = pixel + width; while (pixel < end) { - *buffer++ = 0xff000000 | - ((*pixel & 0x0000ff00) | - ((*pixel >> 16) & 0xff) | - ((*pixel & 0xff) << 16)); + WRITE(buffer++, 0xff000000 | + ((READ(pixel) & 0x0000ff00) | + ((READ(pixel) >> 16) & 0xff) | + ((READ(pixel) & 0xff) << 16))); ++pixel; } } @@ -103,7 +101,7 @@ fbFetch_r8g8b8 (const FbBits *bits, int x, int width, CARD32 *buffer, miIndexedP while (pixel < end) { CARD32 b = Fetch24(pixel) | 0xff000000; pixel += 3; - *buffer++ = b; + WRITE(buffer++, b); } } @@ -115,13 +113,13 @@ fbFetch_b8g8r8 (const FbBits *bits, int x, int width, CARD32 *buffer, miIndexedP while (pixel < end) { CARD32 b = 0xff000000; #if IMAGE_BYTE_ORDER == MSBFirst - b |= (*pixel++); - b |= (*pixel++ << 8); - b |= (*pixel++ << 16); + b |= (READ(pixel++)); + b |= (READ(pixel++) << 8); + b |= (READ(pixel++) << 16); #else - b |= (*pixel++ << 16); - b |= (*pixel++ << 8); - b |= (*pixel++); + b |= (READ(pixel++) << 16); + b |= (READ(pixel++) << 8); + b |= (READ(pixel++)); #endif } } @@ -132,13 +130,13 @@ fbFetch_r5g6b5 (const FbBits *bits, int x, int width, CARD32 *buffer, miIndexedP const CARD16 *pixel = (const CARD16 *)bits + x; const CARD16 *end = pixel + width; while (pixel < end) { - CARD32 p = *pixel++; + CARD32 p = READ(pixel++); CARD32 r = (((p) << 3) & 0xf8) | (((p) << 5) & 0xfc00) | (((p) << 8) & 0xf80000); r |= (r >> 5) & 0x70007; r |= (r >> 6) & 0x300; - *buffer++ = 0xff000000 | r; + WRITE(buffer++, 0xff000000 | r); } } @@ -148,13 +146,13 @@ fbFetch_b5g6r5 (const FbBits *bits, int x, int width, CARD32 *buffer, miIndexedP const CARD16 *pixel = (const CARD16 *)bits + x; const CARD16 *end = pixel + width; while (pixel < end) { - CARD32 p = *pixel++; + CARD32 p = READ(pixel++); CARD32 r,g,b; b = ((p & 0xf800) | ((p & 0xe000) >> 5)) >> 8; g = ((p & 0x07e0) | ((p & 0x0600) >> 6)) << 5; r = ((p & 0x001c) | ((p & 0x001f) << 5)) << 14; - *buffer++ = (0xff000000 | r | g | b); + WRITE(buffer++, (0xff000000 | r | g | b)); } } @@ -164,14 +162,14 @@ fbFetch_a1r5g5b5 (const FbBits *bits, int x, int width, CARD32 *buffer, miIndexe const CARD16 *pixel = (const CARD16 *)bits + x; const CARD16 *end = pixel + width; while (pixel < end) { - CARD32 p = *pixel++; + CARD32 p = READ(pixel++); CARD32 r,g,b, a; a = (CARD32) ((CARD8) (0 - ((p & 0x8000) >> 15))) << 24; r = ((p & 0x7c00) | ((p & 0x7000) >> 5)) << 9; g = ((p & 0x03e0) | ((p & 0x0380) >> 5)) << 6; b = ((p & 0x001c) | ((p & 0x001f) << 5)) >> 2; - *buffer++ = (a | r | g | b); + WRITE(buffer++, (a | r | g | b)); } } @@ -181,13 +179,13 @@ fbFetch_x1r5g5b5 (const FbBits *bits, int x, int width, CARD32 *buffer, miIndexe const CARD16 *pixel = (const CARD16 *)bits + x; const CARD16 *end = pixel + width; while (pixel < end) { - CARD32 p = *pixel++; + CARD32 p = READ(pixel++); CARD32 r,g,b; r = ((p & 0x7c00) | ((p & 0x7000) >> 5)) << 9; g = ((p & 0x03e0) | ((p & 0x0380) >> 5)) << 6; b = ((p & 0x001c) | ((p & 0x001f) << 5)) >> 2; - *buffer++ = (0xff000000 | r | g | b); + WRITE(buffer++, (0xff000000 | r | g | b)); } } @@ -197,14 +195,14 @@ fbFetch_a1b5g5r5 (const FbBits *bits, int x, int width, CARD32 *buffer, miIndexe const CARD16 *pixel = (const CARD16 *)bits + x; const CARD16 *end = pixel + width; while (pixel < end) { - CARD32 p = *pixel++; + CARD32 p = READ(pixel++); CARD32 r,g,b, a; a = (CARD32) ((CARD8) (0 - ((p & 0x8000) >> 15))) << 24; b = ((p & 0x7c00) | ((p & 0x7000) >> 5)) >> 7; g = ((p & 0x03e0) | ((p & 0x0380) >> 5)) << 6; r = ((p & 0x001c) | ((p & 0x001f) << 5)) << 14; - *buffer++ = (a | r | g | b); + WRITE(buffer++, (a | r | g | b)); } } @@ -214,13 +212,13 @@ fbFetch_x1b5g5r5 (const FbBits *bits, int x, int width, CARD32 *buffer, miIndexe const CARD16 *pixel = (const CARD16 *)bits + x; const CARD16 *end = pixel + width; while (pixel < end) { - CARD32 p = *pixel++; + CARD32 p = READ(pixel++); CARD32 r,g,b; b = ((p & 0x7c00) | ((p & 0x7000) >> 5)) >> 7; g = ((p & 0x03e0) | ((p & 0x0380) >> 5)) << 6; r = ((p & 0x001c) | ((p & 0x001f) << 5)) << 14; - *buffer++ = (0xff000000 | r | g | b); + WRITE(buffer++, (0xff000000 | r | g | b)); } } @@ -230,14 +228,14 @@ fbFetch_a4r4g4b4 (const FbBits *bits, int x, int width, CARD32 *buffer, miIndexe const CARD16 *pixel = (const CARD16 *)bits + x; const CARD16 *end = pixel + width; while (pixel < end) { - CARD32 p = *pixel++; + CARD32 p = READ(pixel++); CARD32 r,g,b, a; a = ((p & 0xf000) | ((p & 0xf000) >> 4)) << 16; r = ((p & 0x0f00) | ((p & 0x0f00) >> 4)) << 12; g = ((p & 0x00f0) | ((p & 0x00f0) >> 4)) << 8; b = ((p & 0x000f) | ((p & 0x000f) << 4)); - *buffer++ = (a | r | g | b); + WRITE(buffer++, (a | r | g | b)); } } @@ -247,13 +245,13 @@ fbFetch_x4r4g4b4 (const FbBits *bits, int x, int width, CARD32 *buffer, miIndexe const CARD16 *pixel = (const CARD16 *)bits + x; const CARD16 *end = pixel + width; while (pixel < end) { - CARD32 p = *pixel++; + CARD32 p = READ(pixel++); CARD32 r,g,b; r = ((p & 0x0f00) | ((p & 0x0f00) >> 4)) << 12; g = ((p & 0x00f0) | ((p & 0x00f0) >> 4)) << 8; b = ((p & 0x000f) | ((p & 0x000f) << 4)); - *buffer++ = (0xff000000 | r | g | b); + WRITE(buffer++, (0xff000000 | r | g | b)); } } @@ -263,15 +261,15 @@ fbFetch_a4b4g4r4 (const FbBits *bits, int x, int width, CARD32 *buffer, miIndexe const CARD16 *pixel = (const CARD16 *)bits + x; const CARD16 *end = pixel + width; while (pixel < end) { - CARD32 p = *pixel++; + CARD32 p = READ(pixel++); CARD32 r,g,b, a; a = ((p & 0xf000) | ((p & 0xf000) >> 4)) << 16; - b = ((p & 0x0f00) | ((p & 0x0f00) >> 4)) << 12; + b = ((p & 0x0f00) | ((p & 0x0f00) >> 4)) >> 4; g = ((p & 0x00f0) | ((p & 0x00f0) >> 4)) << 8; - r = ((p & 0x000f) | ((p & 0x000f) << 4)); - *buffer++ = (a | r | g | b); - } + r = ((p & 0x000f) | ((p & 0x000f) << 4)) << 16; + WRITE(buffer++, (a | r | g | b)); + } } static FASTCALL void @@ -280,14 +278,14 @@ fbFetch_x4b4g4r4 (const FbBits *bits, int x, int width, CARD32 *buffer, miIndexe const CARD16 *pixel = (const CARD16 *)bits + x; const CARD16 *end = pixel + width; while (pixel < end) { - CARD32 p = *pixel++; + CARD32 p = READ(pixel++); CARD32 r,g,b; - b = ((p & 0x0f00) | ((p & 0x0f00) >> 4)) << 12; + b = ((p & 0x0f00) | ((p & 0x0f00) >> 4)) >> 4; g = ((p & 0x00f0) | ((p & 0x00f0) >> 4)) << 8; - r = ((p & 0x000f) | ((p & 0x000f) << 4)); - *buffer++ = (0xff000000 | r | g | b); - } + r = ((p & 0x000f) | ((p & 0x000f) << 4)) << 16; + WRITE(buffer++, (0xff000000 | r | g | b)); + } } static FASTCALL void @@ -296,7 +294,7 @@ fbFetch_a8 (const FbBits *bits, int x, int width, CARD32 *buffer, miIndexedPtr i const CARD8 *pixel = (const CARD8 *)bits + x; const CARD8 *end = pixel + width; while (pixel < end) { - *buffer++ = (*pixel++) << 24; + WRITE(buffer++, READ(pixel++) << 24); } } @@ -306,7 +304,7 @@ fbFetch_r3g3b2 (const FbBits *bits, int x, int width, CARD32 *buffer, miIndexedP const CARD8 *pixel = (const CARD8 *)bits + x; const CARD8 *end = pixel + width; while (pixel < end) { - CARD32 p = *pixel++; + CARD32 p = READ(pixel++); CARD32 r,g,b; r = ((p & 0xe0) | ((p & 0xe0) >> 3) | ((p & 0xc0) >> 6)) << 16; @@ -315,7 +313,7 @@ fbFetch_r3g3b2 (const FbBits *bits, int x, int width, CARD32 *buffer, miIndexedP ((p & 0x03) << 2) | ((p & 0x03) << 4) | ((p & 0x03) << 6)); - *buffer++ = (0xff000000 | r | g | b); + WRITE(buffer++, (0xff000000 | r | g | b)); } } @@ -325,7 +323,7 @@ fbFetch_b2g3r3 (const FbBits *bits, int x, int width, CARD32 *buffer, miIndexedP const CARD8 *pixel = (const CARD8 *)bits + x; const CARD8 *end = pixel + width; while (pixel < end) { - CARD32 p = *pixel++; + CARD32 p = READ(pixel++); CARD32 r,g,b; b = (((p & 0xc0) ) | @@ -336,7 +334,7 @@ fbFetch_b2g3r3 (const FbBits *bits, int x, int width, CARD32 *buffer, miIndexedP r = (((p & 0x07) ) | ((p & 0x07) << 3) | ((p & 0x06) << 6)) << 16; - *buffer++ = (0xff000000 | r | g | b); + WRITE(buffer++, (0xff000000 | r | g | b)); } } @@ -346,14 +344,14 @@ fbFetch_a2r2g2b2 (const FbBits *bits, int x, int width, CARD32 *buffer, miIndexe const CARD8 *pixel = (const CARD8 *)bits + x; const CARD8 *end = pixel + width; while (pixel < end) { - CARD32 p = *pixel++; + CARD32 p = READ(pixel++); CARD32 a,r,g,b; a = ((p & 0xc0) * 0x55) << 18; r = ((p & 0x30) * 0x55) << 12; g = ((p & 0x0c) * 0x55) << 6; b = ((p & 0x03) * 0x55); - *buffer++ = a|r|g|b; + WRITE(buffer++, a|r|g|b); } } @@ -363,14 +361,14 @@ fbFetch_a2b2g2r2 (const FbBits *bits, int x, int width, CARD32 *buffer, miIndexe const CARD8 *pixel = (const CARD8 *)bits + x; const CARD8 *end = pixel + width; while (pixel < end) { - CARD32 p = *pixel++; + CARD32 p = READ(pixel++); CARD32 a,r,g,b; a = ((p & 0xc0) * 0x55) << 18; b = ((p & 0x30) * 0x55) >> 6; g = ((p & 0x0c) * 0x55) << 6; r = ((p & 0x03) * 0x55) << 16; - *buffer++ = a|r|g|b; + WRITE(buffer++, a|r|g|b); } } @@ -380,8 +378,8 @@ fbFetch_c8 (const FbBits *bits, int x, int width, CARD32 *buffer, miIndexedPtr i const CARD8 *pixel = (const CARD8 *)bits + x; const CARD8 *end = pixel + width; while (pixel < end) { - CARD32 p = *pixel++; - *buffer++ = indexed->rgba[p]; + CARD32 p = READ(pixel++); + WRITE(buffer++, indexed->rgba[p]); } } @@ -391,8 +389,8 @@ fbFetch_x4a4 (const FbBits *bits, int x, int width, CARD32 *buffer, miIndexedPtr const CARD8 *pixel = (const CARD8 *)bits + x; const CARD8 *end = pixel + width; while (pixel < end) { - CARD8 p = (*pixel++) & 0xf; - *buffer++ = (p | (p << 4)) << 24; + CARD8 p = READ(pixel++) & 0xf; + WRITE(buffer++, (p | (p << 4)) << 24); } } @@ -411,7 +409,7 @@ fbFetch_a4 (const FbBits *bits, int x, int width, CARD32 *buffer, miIndexedPtr i CARD32 p = Fetch4(bits, i + x); p |= p << 4; - *buffer++ = p << 24; + WRITE(buffer++, p << 24); } } @@ -426,7 +424,7 @@ fbFetch_r1g2b1 (const FbBits *bits, int x, int width, CARD32 *buffer, miIndexedP r = ((p & 0x8) * 0xff) << 13; g = ((p & 0x6) * 0x55) << 7; b = ((p & 0x1) * 0xff); - *buffer++ = 0xff000000|r|g|b; + WRITE(buffer++, 0xff000000|r|g|b); } } @@ -441,7 +439,7 @@ fbFetch_b1g2r1 (const FbBits *bits, int x, int width, CARD32 *buffer, miIndexedP b = ((p & 0x8) * 0xff) >> 3; g = ((p & 0x6) * 0x55) << 7; r = ((p & 0x1) * 0xff) << 16; - *buffer++ = 0xff000000|r|g|b; + WRITE(buffer++, 0xff000000|r|g|b); } } @@ -457,7 +455,7 @@ fbFetch_a1r1g1b1 (const FbBits *bits, int x, int width, CARD32 *buffer, miIndexe r = ((p & 0x4) * 0xff) << 14; g = ((p & 0x2) * 0xff) << 7; b = ((p & 0x1) * 0xff); - *buffer++ = a|r|g|b; + WRITE(buffer++, a|r|g|b); } } @@ -473,7 +471,7 @@ fbFetch_a1b1g1r1 (const FbBits *bits, int x, int width, CARD32 *buffer, miIndexe r = ((p & 0x4) * 0xff) >> 3; g = ((p & 0x2) * 0xff) << 7; b = ((p & 0x1) * 0xff) << 16; - *buffer++ = a|r|g|b; + WRITE(buffer++, a|r|g|b); } } @@ -484,7 +482,7 @@ fbFetch_c4 (const FbBits *bits, int x, int width, CARD32 *buffer, miIndexedPtr i for (i = 0; i < width; ++i) { CARD32 p = Fetch4(bits, i + x); - *buffer++ = indexed->rgba[p]; + WRITE(buffer++, indexed->rgba[p]); } } @@ -505,7 +503,7 @@ fbFetch_a1 (const FbBits *bits, int x, int width, CARD32 *buffer, miIndexedPtr i a |= a << 1; a |= a << 2; a |= a << 4; - *buffer++ = a << 24; + WRITE(buffer++, a << 24); } } @@ -522,7 +520,7 @@ fbFetch_g1 (const FbBits *bits, int x, int width, CARD32 *buffer, miIndexedPtr i a = p >> ((i+x) & 0x1f); #endif a = a & 1; - *buffer++ = indexed->rgba[a]; + WRITE(buffer++, indexed->rgba[a]); } } @@ -573,9 +571,9 @@ static fetchProc fetchProcForPicture (PicturePtr pict) /* 1bpp formats */ case PICT_a1: return fbFetch_a1; case PICT_g1: return fbFetch_g1; - default: - return NULL; } + + return NULL; } /* @@ -587,19 +585,19 @@ typedef FASTCALL CARD32 (*fetchPixelProc)(const FbBits *bits, int offset, miInde static FASTCALL CARD32 fbFetchPixel_a8r8g8b8 (const FbBits *bits, int offset, miIndexedPtr indexed) { - return ((CARD32 *)bits)[offset]; + return READ((CARD32 *)bits + offset); } static FASTCALL CARD32 fbFetchPixel_x8r8g8b8 (const FbBits *bits, int offset, miIndexedPtr indexed) { - return ((CARD32 *)bits)[offset] | 0xff000000; + return READ((CARD32 *)bits + offset) | 0xff000000; } static FASTCALL CARD32 fbFetchPixel_a8b8g8r8 (const FbBits *bits, int offset, miIndexedPtr indexed) { - CARD32 pixel = ((CARD32 *)bits)[offset]; + CARD32 pixel = READ((CARD32 *)bits + offset); return ((pixel & 0xff000000) | ((pixel >> 16) & 0xff) | @@ -610,7 +608,7 @@ fbFetchPixel_a8b8g8r8 (const FbBits *bits, int offset, miIndexedPtr indexed) static FASTCALL CARD32 fbFetchPixel_x8b8g8r8 (const FbBits *bits, int offset, miIndexedPtr indexed) { - CARD32 pixel = ((CARD32 *)bits)[offset]; + CARD32 pixel = READ((CARD32 *)bits + offset); return ((0xff000000) | ((pixel >> 16) & 0xff) | @@ -624,14 +622,14 @@ fbFetchPixel_r8g8b8 (const FbBits *bits, int offset, miIndexedPtr indexed) CARD8 *pixel = ((CARD8 *) bits) + (offset*3); #if IMAGE_BYTE_ORDER == MSBFirst return (0xff000000 | - (pixel[0] << 16) | - (pixel[1] << 8) | - (pixel[2])); + (READ(pixel + 0) << 16) | + (READ(pixel + 1) << 8) | + (READ(pixel + 2))); #else return (0xff000000 | - (pixel[2] << 16) | - (pixel[1] << 8) | - (pixel[0])); + (READ(pixel + 2) << 16) | + (READ(pixel + 1) << 8) | + (READ(pixel + 0))); #endif } @@ -641,21 +639,21 @@ fbFetchPixel_b8g8r8 (const FbBits *bits, int offset, miIndexedPtr indexed) CARD8 *pixel = ((CARD8 *) bits) + (offset*3); #if IMAGE_BYTE_ORDER == MSBFirst return (0xff000000 | - (pixel[2] << 16) | - (pixel[1] << 8) | - (pixel[0])); + (READ(pixel + 2) << 16) | + (READ(pixel + 1) << 8) | + (READ(pixel + 0))); #else return (0xff000000 | - (pixel[0] << 16) | - (pixel[1] << 8) | - (pixel[2])); + (READ(pixel + 0) << 16) | + (READ(pixel + 1) << 8) | + (READ(pixel + 2))); #endif } static FASTCALL CARD32 fbFetchPixel_r5g6b5 (const FbBits *bits, int offset, miIndexedPtr indexed) { - CARD32 pixel = ((CARD16 *) bits)[offset]; + CARD32 pixel = READ((CARD16 *) bits + offset); CARD32 r,g,b; r = ((pixel & 0xf800) | ((pixel & 0xe000) >> 5)) << 8; @@ -667,7 +665,7 @@ fbFetchPixel_r5g6b5 (const FbBits *bits, int offset, miIndexedPtr indexed) static FASTCALL CARD32 fbFetchPixel_b5g6r5 (const FbBits *bits, int offset, miIndexedPtr indexed) { - CARD32 pixel = ((CARD16 *) bits)[offset]; + CARD32 pixel = READ((CARD16 *) bits + offset); CARD32 r,g,b; b = ((pixel & 0xf800) | ((pixel & 0xe000) >> 5)) >> 8; @@ -679,7 +677,7 @@ fbFetchPixel_b5g6r5 (const FbBits *bits, int offset, miIndexedPtr indexed) static FASTCALL CARD32 fbFetchPixel_a1r5g5b5 (const FbBits *bits, int offset, miIndexedPtr indexed) { - CARD32 pixel = ((CARD16 *) bits)[offset]; + CARD32 pixel = READ((CARD16 *) bits + offset); CARD32 a,r,g,b; a = (CARD32) ((CARD8) (0 - ((pixel & 0x8000) >> 15))) << 24; @@ -692,7 +690,7 @@ fbFetchPixel_a1r5g5b5 (const FbBits *bits, int offset, miIndexedPtr indexed) static FASTCALL CARD32 fbFetchPixel_x1r5g5b5 (const FbBits *bits, int offset, miIndexedPtr indexed) { - CARD32 pixel = ((CARD16 *) bits)[offset]; + CARD32 pixel = READ((CARD16 *) bits + offset); CARD32 r,g,b; r = ((pixel & 0x7c00) | ((pixel & 0x7000) >> 5)) << 9; @@ -704,7 +702,7 @@ fbFetchPixel_x1r5g5b5 (const FbBits *bits, int offset, miIndexedPtr indexed) static FASTCALL CARD32 fbFetchPixel_a1b5g5r5 (const FbBits *bits, int offset, miIndexedPtr indexed) { - CARD32 pixel = ((CARD16 *) bits)[offset]; + CARD32 pixel = READ((CARD16 *) bits + offset); CARD32 a,r,g,b; a = (CARD32) ((CARD8) (0 - ((pixel & 0x8000) >> 15))) << 24; @@ -717,7 +715,7 @@ fbFetchPixel_a1b5g5r5 (const FbBits *bits, int offset, miIndexedPtr indexed) static FASTCALL CARD32 fbFetchPixel_x1b5g5r5 (const FbBits *bits, int offset, miIndexedPtr indexed) { - CARD32 pixel = ((CARD16 *) bits)[offset]; + CARD32 pixel = READ((CARD16 *) bits + offset); CARD32 r,g,b; b = ((pixel & 0x7c00) | ((pixel & 0x7000) >> 5)) >> 7; @@ -729,7 +727,7 @@ fbFetchPixel_x1b5g5r5 (const FbBits *bits, int offset, miIndexedPtr indexed) static FASTCALL CARD32 fbFetchPixel_a4r4g4b4 (const FbBits *bits, int offset, miIndexedPtr indexed) { - CARD32 pixel = ((CARD16 *) bits)[offset]; + CARD32 pixel = READ((CARD16 *) bits + offset); CARD32 a,r,g,b; a = ((pixel & 0xf000) | ((pixel & 0xf000) >> 4)) << 16; @@ -742,7 +740,7 @@ fbFetchPixel_a4r4g4b4 (const FbBits *bits, int offset, miIndexedPtr indexed) static FASTCALL CARD32 fbFetchPixel_x4r4g4b4 (const FbBits *bits, int offset, miIndexedPtr indexed) { - CARD32 pixel = ((CARD16 *) bits)[offset]; + CARD32 pixel = READ((CARD16 *) bits + offset); CARD32 r,g,b; r = ((pixel & 0x0f00) | ((pixel & 0x0f00) >> 4)) << 12; @@ -754,32 +752,32 @@ fbFetchPixel_x4r4g4b4 (const FbBits *bits, int offset, miIndexedPtr indexed) static FASTCALL CARD32 fbFetchPixel_a4b4g4r4 (const FbBits *bits, int offset, miIndexedPtr indexed) { - CARD32 pixel = ((CARD16 *) bits)[offset]; + CARD32 pixel = READ((CARD16 *) bits + offset); CARD32 a,r,g,b; a = ((pixel & 0xf000) | ((pixel & 0xf000) >> 4)) << 16; - b = ((pixel & 0x0f00) | ((pixel & 0x0f00) >> 4)) << 12; + b = ((pixel & 0x0f00) | ((pixel & 0x0f00) >> 4)) >> 4; g = ((pixel & 0x00f0) | ((pixel & 0x00f0) >> 4)) << 8; - r = ((pixel & 0x000f) | ((pixel & 0x000f) << 4)); + r = ((pixel & 0x000f) | ((pixel & 0x000f) << 4)) << 16; return (a | r | g | b); } static FASTCALL CARD32 fbFetchPixel_x4b4g4r4 (const FbBits *bits, int offset, miIndexedPtr indexed) { - CARD32 pixel = ((CARD16 *) bits)[offset]; + CARD32 pixel = READ((CARD16 *) bits + offset); CARD32 r,g,b; - b = ((pixel & 0x0f00) | ((pixel & 0x0f00) >> 4)) << 12; + b = ((pixel & 0x0f00) | ((pixel & 0x0f00) >> 4)) >> 4; g = ((pixel & 0x00f0) | ((pixel & 0x00f0) >> 4)) << 8; - r = ((pixel & 0x000f) | ((pixel & 0x000f) << 4)); + r = ((pixel & 0x000f) | ((pixel & 0x000f) << 4)) << 16; return (0xff000000 | r | g | b); } static FASTCALL CARD32 fbFetchPixel_a8 (const FbBits *bits, int offset, miIndexedPtr indexed) { - CARD32 pixel = ((CARD8 *) bits)[offset]; + CARD32 pixel = READ((CARD8 *) bits + offset); return pixel << 24; } @@ -787,7 +785,7 @@ fbFetchPixel_a8 (const FbBits *bits, int offset, miIndexedPtr indexed) static FASTCALL CARD32 fbFetchPixel_r3g3b2 (const FbBits *bits, int offset, miIndexedPtr indexed) { - CARD32 pixel = ((CARD8 *) bits)[offset]; + CARD32 pixel = READ((CARD8 *) bits + offset); CARD32 r,g,b; r = ((pixel & 0xe0) | ((pixel & 0xe0) >> 3) | ((pixel & 0xc0) >> 6)) << 16; @@ -802,7 +800,7 @@ fbFetchPixel_r3g3b2 (const FbBits *bits, int offset, miIndexedPtr indexed) static FASTCALL CARD32 fbFetchPixel_b2g3r3 (const FbBits *bits, int offset, miIndexedPtr indexed) { - CARD32 pixel = ((CARD8 *) bits)[offset]; + CARD32 pixel = READ((CARD8 *) bits + offset); CARD32 r,g,b; b = (((pixel & 0xc0) ) | @@ -819,7 +817,7 @@ fbFetchPixel_b2g3r3 (const FbBits *bits, int offset, miIndexedPtr indexed) static FASTCALL CARD32 fbFetchPixel_a2r2g2b2 (const FbBits *bits, int offset, miIndexedPtr indexed) { - CARD32 pixel = ((CARD8 *) bits)[offset]; + CARD32 pixel = READ((CARD8 *) bits + offset); CARD32 a,r,g,b; a = ((pixel & 0xc0) * 0x55) << 18; @@ -832,7 +830,7 @@ fbFetchPixel_a2r2g2b2 (const FbBits *bits, int offset, miIndexedPtr indexed) static FASTCALL CARD32 fbFetchPixel_a2b2g2r2 (const FbBits *bits, int offset, miIndexedPtr indexed) { - CARD32 pixel = ((CARD8 *) bits)[offset]; + CARD32 pixel = READ((CARD8 *) bits + offset); CARD32 a,r,g,b; a = ((pixel & 0xc0) * 0x55) << 18; @@ -845,10 +843,18 @@ fbFetchPixel_a2b2g2r2 (const FbBits *bits, int offset, miIndexedPtr indexed) static FASTCALL CARD32 fbFetchPixel_c8 (const FbBits *bits, int offset, miIndexedPtr indexed) { - CARD32 pixel = ((CARD8 *) bits)[offset]; + CARD32 pixel = READ((CARD8 *) bits + offset); return indexed->rgba[pixel]; } +static FASTCALL CARD32 +fbFetchPixel_x4a4 (const FbBits *bits, int offset, miIndexedPtr indexed) +{ + CARD32 pixel = READ((CARD8 *) bits + offset); + + return ((pixel & 0xf) | ((pixel & 0xf) << 4)) << 24; +} + #define Fetch8(l,o) (((CARD8 *) (l))[(o) >> 2]) #if IMAGE_BYTE_ORDER == MSBFirst #define Fetch4(l,o) ((o) & 2 ? Fetch8(l,o) & 0xf : Fetch8(l,o) >> 4) @@ -988,6 +994,7 @@ static fetchPixelProc fetchPixelProcForPicture (PicturePtr pict) case PICT_a2b2g2r2: return fbFetchPixel_a2b2g2r2; case PICT_c8: return fbFetchPixel_c8; case PICT_g8: return fbFetchPixel_c8; + case PICT_x4a4: return fbFetchPixel_x4a4; /* 4bpp formats */ case PICT_a4: return fbFetchPixel_a4; @@ -1001,9 +1008,9 @@ static fetchPixelProc fetchPixelProcForPicture (PicturePtr pict) /* 1bpp formats */ case PICT_a1: return fbFetchPixel_a1; case PICT_g1: return fbFetchPixel_g1; - default: - return NULL; } + + return NULL; } @@ -1020,7 +1027,7 @@ typedef FASTCALL void (*storeProc) (FbBits *bits, const CARD32 *values, int x, i static FASTCALL void fbStore_a8r8g8b8 (FbBits *bits, const CARD32 *values, int x, int width, miIndexedPtr indexed) { - memcpy(((CARD32 *)bits) + x, values, width*sizeof(CARD32)); + MEMCPY_WRAPPED(((CARD32 *)bits) + x, values, width*sizeof(CARD32)); } static FASTCALL void @@ -1029,7 +1036,7 @@ fbStore_x8r8g8b8 (FbBits *bits, const CARD32 *values, int x, int width, miIndexe int i; CARD32 *pixel = (CARD32 *)bits + x; for (i = 0; i < width; ++i) - *pixel++ = values[i] & 0xffffff; + WRITE(pixel++, READ(values + i) & 0xffffff); } static FASTCALL void @@ -1038,7 +1045,7 @@ fbStore_a8b8g8r8 (FbBits *bits, const CARD32 *values, int x, int width, miIndexe int i; CARD32 *pixel = (CARD32 *)bits + x; for (i = 0; i < width; ++i) - *pixel++ = (values[i] & 0xff00ff00) | ((values[i] >> 16) & 0xff) | ((values[i] & 0xff) << 16); + WRITE(pixel++, (READ(values + i) & 0xff00ff00) | ((READ(values + i) >> 16) & 0xff) | ((READ(values + i) & 0xff) << 16)); } static FASTCALL void @@ -1047,7 +1054,7 @@ fbStore_x8b8g8r8 (FbBits *bits, const CARD32 *values, int x, int width, miIndexe int i; CARD32 *pixel = (CARD32 *)bits + x; for (i = 0; i < width; ++i) - *pixel++ = (values[i] & 0x0000ff00) | ((values[i] >> 16) & 0xff) | ((values[i] & 0xff) << 16); + WRITE(pixel++, (READ(values + i) & 0x0000ff00) | ((READ(values + i) >> 16) & 0xff) | ((READ(values + i) & 0xff) << 16)); } static FASTCALL void @@ -1056,7 +1063,7 @@ fbStore_r8g8b8 (FbBits *bits, const CARD32 *values, int x, int width, miIndexedP int i; CARD8 *pixel = ((CARD8 *) bits) + 3*x; for (i = 0; i < width; ++i) { - Store24(pixel, values[i]); + Store24(pixel, READ(values + i)); pixel += 3; } } @@ -1067,14 +1074,15 @@ fbStore_b8g8r8 (FbBits *bits, const CARD32 *values, int x, int width, miIndexedP int i; CARD8 *pixel = ((CARD8 *) bits) + 3*x; for (i = 0; i < width; ++i) { + CARD32 val = READ(values + i); #if IMAGE_BYTE_ORDER == MSBFirst - *pixel++ = Blue(values[i]); - *pixel++ = Green(values[i]); - *pixel++ = Red(values[i]); + WRITE(pixel++, Blue(val)); + WRITE(pixel++, Green(val)); + WRITE(pixel++, Red(val)); #else - *pixel++ = Red(values[i]); - *pixel++ = Green(values[i]); - *pixel++ = Blue(values[i]); + WRITE(pixel++, Red(val)); + WRITE(pixel++, Green(val)); + WRITE(pixel++, Blue(val)); #endif } } @@ -1085,10 +1093,10 @@ fbStore_r5g6b5 (FbBits *bits, const CARD32 *values, int x, int width, miIndexedP int i; CARD16 *pixel = ((CARD16 *) bits) + x; for (i = 0; i < width; ++i) { - CARD32 s = values[i]; - *pixel++ = ((s >> 3) & 0x001f) | - ((s >> 5) & 0x07e0) | - ((s >> 8) & 0xf800); + CARD32 s = READ(values + i); + WRITE(pixel++, ((s >> 3) & 0x001f) | + ((s >> 5) & 0x07e0) | + ((s >> 8) & 0xf800)); } } @@ -1098,10 +1106,10 @@ fbStore_b5g6r5 (FbBits *bits, const CARD32 *values, int x, int width, miIndexedP int i; CARD16 *pixel = ((CARD16 *) bits) + x; for (i = 0; i < width; ++i) { - Split(values[i]); - *pixel++ = (((b << 8) & 0xf800) | - ((g << 3) & 0x07e0) | - ((r >> 3) )); + Split(READ(values + i)); + WRITE(pixel++, ((b << 8) & 0xf800) | + ((g << 3) & 0x07e0) | + ((r >> 3) )); } } @@ -1111,11 +1119,11 @@ fbStore_a1r5g5b5 (FbBits *bits, const CARD32 *values, int x, int width, miIndexe int i; CARD16 *pixel = ((CARD16 *) bits) + x; for (i = 0; i < width; ++i) { - Splita(values[i]); - *pixel++ = (((a << 8) & 0x8000) | - ((r << 7) & 0x7c00) | - ((g << 2) & 0x03e0) | - ((b >> 3) )); + Splita(READ(values + i)); + WRITE(pixel++, ((a << 8) & 0x8000) | + ((r << 7) & 0x7c00) | + ((g << 2) & 0x03e0) | + ((b >> 3) )); } } @@ -1125,10 +1133,10 @@ fbStore_x1r5g5b5 (FbBits *bits, const CARD32 *values, int x, int width, miIndexe int i; CARD16 *pixel = ((CARD16 *) bits) + x; for (i = 0; i < width; ++i) { - Split(values[i]); - *pixel++ = (((r << 7) & 0x7c00) | - ((g << 2) & 0x03e0) | - ((b >> 3) )); + Split(READ(values + i)); + WRITE(pixel++, ((r << 7) & 0x7c00) | + ((g << 2) & 0x03e0) | + ((b >> 3) )); } } @@ -1138,11 +1146,11 @@ fbStore_a1b5g5r5 (FbBits *bits, const CARD32 *values, int x, int width, miIndexe int i; CARD16 *pixel = ((CARD16 *) bits) + x; for (i = 0; i < width; ++i) { - Splita(values[i]); - *pixel++ = (((a << 8) & 0x8000) | - ((b << 7) & 0x7c00) | - ((g << 2) & 0x03e0) | - ((r >> 3) )); + Splita(READ(values + i)); + WRITE(pixel++, ((a << 8) & 0x8000) | + ((b << 7) & 0x7c00) | + ((g << 2) & 0x03e0) | + ((r >> 3) )); } } @@ -1152,10 +1160,10 @@ fbStore_x1b5g5r5 (FbBits *bits, const CARD32 *values, int x, int width, miIndexe int i; CARD16 *pixel = ((CARD16 *) bits) + x; for (i = 0; i < width; ++i) { - Split(values[i]); - *pixel++ = (((b << 7) & 0x7c00) | - ((g << 2) & 0x03e0) | - ((r >> 3) )); + Split(READ(values + i)); + WRITE(pixel++, ((b << 7) & 0x7c00) | + ((g << 2) & 0x03e0) | + ((r >> 3) )); } } @@ -1165,11 +1173,11 @@ fbStore_a4r4g4b4 (FbBits *bits, const CARD32 *values, int x, int width, miIndexe int i; CARD16 *pixel = ((CARD16 *) bits) + x; for (i = 0; i < width; ++i) { - Splita(values[i]); - *pixel++ = (((a << 8) & 0xf000) | - ((r << 4) & 0x0f00) | - ((g ) & 0x00f0) | - ((b >> 4) )); + Splita(READ(values + i)); + WRITE(pixel++, ((a << 8) & 0xf000) | + ((r << 4) & 0x0f00) | + ((g ) & 0x00f0) | + ((b >> 4) )); } } @@ -1179,10 +1187,10 @@ fbStore_x4r4g4b4 (FbBits *bits, const CARD32 *values, int x, int width, miIndexe int i; CARD16 *pixel = ((CARD16 *) bits) + x; for (i = 0; i < width; ++i) { - Split(values[i]); - *pixel++ = (((r << 4) & 0x0f00) | - ((g ) & 0x00f0) | - ((b >> 4) )); + Split(READ(values + i)); + WRITE(pixel++, ((r << 4) & 0x0f00) | + ((g ) & 0x00f0) | + ((b >> 4) )); } } @@ -1192,11 +1200,11 @@ fbStore_a4b4g4r4 (FbBits *bits, const CARD32 *values, int x, int width, miIndexe int i; CARD16 *pixel = ((CARD16 *) bits) + x; for (i = 0; i < width; ++i) { - Splita(values[i]); - *pixel++ = (((a << 8) & 0xf000) | - ((b << 4) & 0x0f00) | - ((g ) & 0x00f0) | - ((r >> 4) )); + Splita(READ(values + i)); + WRITE(pixel++, ((a << 8) & 0xf000) | + ((b << 4) & 0x0f00) | + ((g ) & 0x00f0) | + ((r >> 4) )); } } @@ -1206,10 +1214,10 @@ fbStore_x4b4g4r4 (FbBits *bits, const CARD32 *values, int x, int width, miIndexe int i; CARD16 *pixel = ((CARD16 *) bits) + x; for (i = 0; i < width; ++i) { - Split(values[i]); - *pixel++ = (((b << 4) & 0x0f00) | - ((g ) & 0x00f0) | - ((r >> 4) )); + Split(READ(values + i)); + WRITE(pixel++, ((b << 4) & 0x0f00) | + ((g ) & 0x00f0) | + ((r >> 4) )); } } @@ -1219,7 +1227,7 @@ fbStore_a8 (FbBits *bits, const CARD32 *values, int x, int width, miIndexedPtr i int i; CARD8 *pixel = ((CARD8 *) bits) + x; for (i = 0; i < width; ++i) { - *pixel++ = values[i] >> 24; + WRITE(pixel++, READ(values + i) >> 24); } } @@ -1229,10 +1237,10 @@ fbStore_r3g3b2 (FbBits *bits, const CARD32 *values, int x, int width, miIndexedP int i; CARD8 *pixel = ((CARD8 *) bits) + x; for (i = 0; i < width; ++i) { - Split(values[i]); - *pixel++ = (((r ) & 0xe0) | - ((g >> 3) & 0x1c) | - ((b >> 6) )); + Split(READ(values + i)); + WRITE(pixel++, ((r ) & 0xe0) | + ((g >> 3) & 0x1c) | + ((b >> 6) )); } } @@ -1242,10 +1250,10 @@ fbStore_b2g3r3 (FbBits *bits, const CARD32 *values, int x, int width, miIndexedP int i; CARD8 *pixel = ((CARD8 *) bits) + x; for (i = 0; i < width; ++i) { - Split(values[i]); - *pixel++ = (((b ) & 0xe0) | - ((g >> 3) & 0x1c) | - ((r >> 6) )); + Split(READ(values + i)); + WRITE(pixel++, ((b ) & 0xe0) | + ((g >> 3) & 0x1c) | + ((r >> 6) )); } } @@ -1255,11 +1263,11 @@ fbStore_a2r2g2b2 (FbBits *bits, const CARD32 *values, int x, int width, miIndexe int i; CARD8 *pixel = ((CARD8 *) bits) + x; for (i = 0; i < width; ++i) { - Splita(values[i]); - *pixel++ = (((a ) & 0xc0) | - ((r >> 2) & 0x30) | - ((g >> 4) & 0x0c) | - ((b >> 6) )); + Splita(READ(values + i)); + WRITE(pixel++, ((a ) & 0xc0) | + ((r >> 2) & 0x30) | + ((g >> 4) & 0x0c) | + ((b >> 6) )); } } @@ -1269,7 +1277,7 @@ fbStore_c8 (FbBits *bits, const CARD32 *values, int x, int width, miIndexedPtr i int i; CARD8 *pixel = ((CARD8 *) bits) + x; for (i = 0; i < width; ++i) { - *pixel++ = miIndexToEnt24(indexed,values[i]); + WRITE(pixel++, miIndexToEnt24(indexed,READ(values + i))); } } @@ -1279,7 +1287,7 @@ fbStore_x4a4 (FbBits *bits, const CARD32 *values, int x, int width, miIndexedPtr int i; CARD8 *pixel = ((CARD8 *) bits) + x; for (i = 0; i < width; ++i) { - *pixel++ = values[i] >> 28; + WRITE(pixel++, READ(values + i) >> 28); } } @@ -1299,7 +1307,7 @@ fbStore_a4 (FbBits *bits, const CARD32 *values, int x, int width, miIndexedPtr i { int i; for (i = 0; i < width; ++i) { - Store4(bits, i + x, values[i]>>28); + Store4(bits, i + x, READ(values + i)>>28); } } @@ -1310,7 +1318,7 @@ fbStore_r1g2b1 (FbBits *bits, const CARD32 *values, int x, int width, miIndexedP for (i = 0; i < width; ++i) { CARD32 pixel; - Split(values[i]); + Split(READ(values + i)); pixel = (((r >> 4) & 0x8) | ((g >> 5) & 0x6) | ((b >> 7) )); @@ -1325,7 +1333,7 @@ fbStore_b1g2r1 (FbBits *bits, const CARD32 *values, int x, int width, miIndexedP for (i = 0; i < width; ++i) { CARD32 pixel; - Split(values[i]); + Split(READ(values + i)); pixel = (((b >> 4) & 0x8) | ((g >> 5) & 0x6) | ((r >> 7) )); @@ -1339,7 +1347,7 @@ fbStore_a1r1g1b1 (FbBits *bits, const CARD32 *values, int x, int width, miIndexe int i; for (i = 0; i < width; ++i) { CARD32 pixel; - Splita(values[i]); + Splita(READ(values + i)); pixel = (((a >> 4) & 0x8) | ((r >> 5) & 0x4) | ((g >> 6) & 0x2) | @@ -1354,7 +1362,7 @@ fbStore_a1b1g1r1 (FbBits *bits, const CARD32 *values, int x, int width, miIndexe int i; for (i = 0; i < width; ++i) { CARD32 pixel; - Splita(values[i]); + Splita(READ(values + i)); pixel = (((a >> 4) & 0x8) | ((b >> 5) & 0x4) | ((g >> 6) & 0x2) | @@ -1370,7 +1378,7 @@ fbStore_c4 (FbBits *bits, const CARD32 *values, int x, int width, miIndexedPtr i for (i = 0; i < width; ++i) { CARD32 pixel; - pixel = miIndexToEnt24(indexed, values[i]); + pixel = miIndexToEnt24(indexed, READ(values + i)); Store4(bits, i + x, pixel); } } @@ -1383,8 +1391,8 @@ fbStore_a1 (FbBits *bits, const CARD32 *values, int x, int width, miIndexedPtr i CARD32 *pixel = ((CARD32 *) bits) + ((i+x) >> 5); CARD32 mask = FbStipMask((i+x) & 0x1f, 1); - CARD32 v = values[i] & 0x80000000 ? mask : 0; - *pixel = (*pixel & ~mask) | v; + CARD32 v = READ(values + i) & 0x80000000 ? mask : 0; + WRITE(pixel, (READ(pixel) & ~mask) | v); } } @@ -1396,8 +1404,8 @@ fbStore_g1 (FbBits *bits, const CARD32 *values, int x, int width, miIndexedPtr i CARD32 *pixel = ((CARD32 *) bits) + ((i+x) >> 5); CARD32 mask = FbStipMask((i+x) & 0x1f, 1); - CARD32 v = miIndexToEntY24(indexed,values[i]) ? mask : 0; - *pixel = (*pixel & ~mask) | v; + CARD32 v = miIndexToEntY24(indexed,READ(values + i)) ? mask : 0; + WRITE(pixel, (READ(pixel) & ~mask) | v); } } @@ -1462,10 +1470,10 @@ fbCombineMaskU (CARD32 *src, const CARD32 *mask, int width) { int i; for (i = 0; i < width; ++i) { - CARD32 a = mask[i] >> 24; - CARD32 s = src[i]; + CARD32 a = READ(mask + i) >> 24; + CARD32 s = READ(src + i); FbByteMul(s, a); - src[i] = s; + WRITE(src + i, s); } } @@ -1476,13 +1484,13 @@ fbCombineMaskU (CARD32 *src, const CARD32 *mask, int width) static FASTCALL void fbCombineClear (CARD32 *dest, const CARD32 *src, int width) { - memset(dest, 0, width*sizeof(CARD32)); + MEMSET_WRAPPED(dest, 0, width*sizeof(CARD32)); } static FASTCALL void fbCombineSrcU (CARD32 *dest, const CARD32 *src, int width) { - memcpy(dest, src, width*sizeof(CARD32)); + MEMCPY_WRAPPED(dest, src, width*sizeof(CARD32)); } @@ -1491,12 +1499,12 @@ fbCombineOverU (CARD32 *dest, const CARD32 *src, int width) { int i; for (i = 0; i < width; ++i) { - CARD32 s = src[i]; - CARD32 d = dest[i]; + CARD32 s = READ(src + i); + CARD32 d = READ(dest + i); CARD32 ia = Alpha(~s); FbByteMulAdd(d, ia, s); - dest[i] = d; + WRITE(dest + i, d); } } @@ -1505,11 +1513,11 @@ fbCombineOverReverseU (CARD32 *dest, const CARD32 *src, int width) { int i; for (i = 0; i < width; ++i) { - CARD32 s = src[i]; - CARD32 d = dest[i]; - CARD32 ia = Alpha(~dest[i]); + CARD32 s = READ(src + i); + CARD32 d = READ(dest + i); + CARD32 ia = Alpha(~READ(dest + i)); FbByteMulAdd(s, ia, d); - dest[i] = s; + WRITE(dest + i, s); } } @@ -1518,10 +1526,10 @@ fbCombineInU (CARD32 *dest, const CARD32 *src, int width) { int i; for (i = 0; i < width; ++i) { - CARD32 s = src[i]; - CARD32 a = Alpha(dest[i]); + CARD32 s = READ(src + i); + CARD32 a = Alpha(READ(dest + i)); FbByteMul(s, a); - dest[i] = s; + WRITE(dest + i, s); } } @@ -1530,10 +1538,10 @@ fbCombineInReverseU (CARD32 *dest, const CARD32 *src, int width) { int i; for (i = 0; i < width; ++i) { - CARD32 d = dest[i]; - CARD32 a = Alpha(src[i]); + CARD32 d = READ(dest + i); + CARD32 a = Alpha(READ(src + i)); FbByteMul(d, a); - dest[i] = d; + WRITE(dest + i, d); } } @@ -1542,10 +1550,10 @@ fbCombineOutU (CARD32 *dest, const CARD32 *src, int width) { int i; for (i = 0; i < width; ++i) { - CARD32 s = src[i]; - CARD32 a = Alpha(~dest[i]); + CARD32 s = READ(src + i); + CARD32 a = Alpha(~READ(dest + i)); FbByteMul(s, a); - dest[i] = s; + WRITE(dest + i, s); } } @@ -1554,10 +1562,10 @@ fbCombineOutReverseU (CARD32 *dest, const CARD32 *src, int width) { int i; for (i = 0; i < width; ++i) { - CARD32 d = dest[i]; - CARD32 a = Alpha(~src[i]); + CARD32 d = READ(dest + i); + CARD32 a = Alpha(~READ(src + i)); FbByteMul(d, a); - dest[i] = d; + WRITE(dest + i, d); } } @@ -1566,13 +1574,13 @@ fbCombineAtopU (CARD32 *dest, const CARD32 *src, int width) { int i; for (i = 0; i < width; ++i) { - CARD32 s = src[i]; - CARD32 d = dest[i]; + CARD32 s = READ(src + i); + CARD32 d = READ(dest + i); CARD32 dest_a = Alpha(d); CARD32 src_ia = Alpha(~s); FbByteAddMul(s, dest_a, d, src_ia); - dest[i] = s; + WRITE(dest + i, s); } } @@ -1581,13 +1589,13 @@ fbCombineAtopReverseU (CARD32 *dest, const CARD32 *src, int width) { int i; for (i = 0; i < width; ++i) { - CARD32 s = src[i]; - CARD32 d = dest[i]; + CARD32 s = READ(src + i); + CARD32 d = READ(dest + i); CARD32 src_a = Alpha(s); CARD32 dest_ia = Alpha(~d); FbByteAddMul(s, dest_ia, d, src_a); - dest[i] = s; + WRITE(dest + i, s); } } @@ -1596,13 +1604,13 @@ fbCombineXorU (CARD32 *dest, const CARD32 *src, int width) { int i; for (i = 0; i < width; ++i) { - CARD32 s = src[i]; - CARD32 d = dest[i]; + CARD32 s = READ(src + i); + CARD32 d = READ(dest + i); CARD32 src_ia = Alpha(~s); CARD32 dest_ia = Alpha(~d); FbByteAddMul(s, dest_ia, d, src_ia); - dest[i] = s; + WRITE(dest + i, s); } } @@ -1611,10 +1619,10 @@ fbCombineAddU (CARD32 *dest, const CARD32 *src, int width) { int i; for (i = 0; i < width; ++i) { - CARD32 s = src[i]; - CARD32 d = dest[i]; + CARD32 s = READ(src + i); + CARD32 d = READ(dest + i); FbByteAdd(d, s); - dest[i] = d; + WRITE(dest + i, d); } } @@ -1623,8 +1631,8 @@ fbCombineSaturateU (CARD32 *dest, const CARD32 *src, int width) { int i; for (i = 0; i < width; ++i) { - CARD32 s = src[i]; - CARD32 d = dest[i]; + CARD32 s = READ(src + i); + CARD32 d = READ(dest + i); CARD16 sa, da; sa = s >> 24; @@ -1635,7 +1643,7 @@ fbCombineSaturateU (CARD32 *dest, const CARD32 *src, int width) FbByteMul(s, sa); } FbByteAdd(d, s); - dest[i] = d; + WRITE(dest + i, d); } } @@ -1709,8 +1717,8 @@ fbCombineDisjointGeneralU (CARD32 *dest, const CARD32 *src, int width, CARD8 com { int i; for (i = 0; i < width; ++i) { - CARD32 s = src[i]; - CARD32 d = dest[i]; + CARD32 s = READ(src + i); + CARD32 d = READ(dest + i); CARD32 m,n,o,p; CARD16 Fa, Fb, t, u, v; CARD8 sa = s >> 24; @@ -1750,7 +1758,7 @@ fbCombineDisjointGeneralU (CARD32 *dest, const CARD32 *src, int width, CARD8 com o = FbGen (s,d,16,Fa,Fb,t, u, v); p = FbGen (s,d,24,Fa,Fb,t, u, v); s = m|n|o|p; - dest[i] = s; + WRITE(dest + i, s); } } @@ -1759,19 +1767,19 @@ fbCombineDisjointOverU (CARD32 *dest, const CARD32 *src, int width) { int i; for (i = 0; i < width; ++i) { - CARD32 s = src[i]; + CARD32 s = READ(src + i); CARD16 a = s >> 24; if (a != 0x00) { if (a != 0xff) { - CARD32 d = dest[i]; + CARD32 d = READ(dest + i); a = fbCombineDisjointOutPart (d >> 24, a); FbByteMulAdd(d, a, s); s = d; } - dest[i] = s; + WRITE(dest + i, s); } } } @@ -1848,8 +1856,8 @@ fbCombineConjointGeneralU (CARD32 *dest, const CARD32 *src, int width, CARD8 com { int i; for (i = 0; i < width; ++i) { - CARD32 s = src[i]; - CARD32 d = dest[i]; + CARD32 s = READ(src + i); + CARD32 d = READ(dest + i); CARD32 m,n,o,p; CARD16 Fa, Fb, t, u, v; CARD8 sa = s >> 24; @@ -1889,7 +1897,7 @@ fbCombineConjointGeneralU (CARD32 *dest, const CARD32 *src, int width, CARD8 com o = FbGen (s,d,16,Fa,Fb,t, u, v); p = FbGen (s,d,24,Fa,Fb,t, u, v); s = m|n|o|p; - dest[i] = s; + WRITE(dest + i, s); } } @@ -2002,32 +2010,32 @@ fbCombineMaskC (CARD32 *src, CARD32 *mask, int width) { int i; for (i = 0; i < width; ++i) { - CARD32 a = mask[i]; + CARD32 a = READ(mask + i); CARD32 x; CARD16 xa; if (!a) { - src[i] = 0; + WRITE(src + i, 0); continue; } - x = src[i]; + x = READ(src + i); if (a == 0xffffffff) { x = x >> 24; x |= x << 8; x |= x << 16; - mask[i] = x; + WRITE(mask + i, x); continue; } xa = x >> 24; FbByteMulC(x, a); - src[i] = x; + WRITE(src + i, x); FbByteMul(a, xa); - mask[i] = a; + WRITE(mask + i, a); } } @@ -2036,21 +2044,21 @@ fbCombineMaskValueC (CARD32 *src, const CARD32 *mask, int width) { int i; for (i = 0; i < width; ++i) { - CARD32 a = mask[i]; + CARD32 a = READ(mask + i); CARD32 x; if (!a) { - src[i] = 0; + WRITE(src + i, 0); continue; } if (a == 0xffffffff) continue; - x = src[i]; + x = READ(src + i); FbByteMulC(x, a); - src[i] = x; + WRITE(src + i, x); } } @@ -2060,13 +2068,13 @@ fbCombineMaskAlphaC (const CARD32 *src, CARD32 *mask, int width) { int i; for (i = 0; i < width; ++i) { - CARD32 a = mask[i]; + CARD32 a = READ(mask + i); CARD32 x; if (!a) continue; - x = src[i] >> 24; + x = READ(src + i) >> 24; if (x == 0xff) continue; if (a == 0xffffffff) @@ -2074,12 +2082,12 @@ fbCombineMaskAlphaC (const CARD32 *src, CARD32 *mask, int width) x = x >> 24; x |= x << 8; x |= x << 16; - mask[i] = x; + WRITE(mask + i, x); continue; } FbByteMul(a, x); - mask[i] = a; + WRITE(mask + i, a); } } @@ -2093,7 +2101,7 @@ static FASTCALL void fbCombineSrcC (CARD32 *dest, CARD32 *src, CARD32 *mask, int width) { fbCombineMaskValueC(src, mask, width); - memcpy(dest, src, width*sizeof(CARD32)); + MEMCPY_WRAPPED(dest, src, width*sizeof(CARD32)); } static FASTCALL void @@ -2102,18 +2110,18 @@ fbCombineOverC (CARD32 *dest, CARD32 *src, CARD32 *mask, int width) int i; fbCombineMaskC(src, mask, width); for (i = 0; i < width; ++i) { - CARD32 s = src[i]; - CARD32 a = ~mask[i]; + CARD32 s = READ(src + i); + CARD32 a = ~READ(mask + i); if (a != 0xffffffff) { if (a) { - CARD32 d = dest[i]; + CARD32 d = READ(dest + i); FbByteMulAddC(d, a, s); s = d; } - dest[i] = s; + WRITE(dest + i, s); } } } @@ -2124,17 +2132,17 @@ fbCombineOverReverseC (CARD32 *dest, CARD32 *src, CARD32 *mask, int width) int i; fbCombineMaskValueC(src, mask, width); for (i = 0; i < width; ++i) { - CARD32 d = dest[i]; + CARD32 d = READ(dest + i); CARD32 a = ~d >> 24; if (a) { - CARD32 s = src[i]; + CARD32 s = READ(src + i); if (a != 0xff) { FbByteMulAdd(s, a, d); } - dest[i] = s; + WRITE(dest + i, s); } } } @@ -2145,18 +2153,18 @@ fbCombineInC (CARD32 *dest, CARD32 *src, CARD32 *mask, int width) int i; fbCombineMaskValueC(src, mask, width); for (i = 0; i < width; ++i) { - CARD32 d = dest[i]; + CARD32 d = READ(dest + i); CARD16 a = d >> 24; CARD32 s = 0; if (a) { - s = src[i]; + s = READ(src + i); if (a != 0xff) { FbByteMul(s, a); } } - dest[i] = s; + WRITE(dest + i, s); } } @@ -2166,17 +2174,17 @@ fbCombineInReverseC (CARD32 *dest, CARD32 *src, CARD32 *mask, int width) int i; fbCombineMaskAlphaC(src, mask, width); for (i = 0; i < width; ++i) { - CARD32 a = mask[i]; + CARD32 a = READ(mask + i); if (a != 0xffffffff) { CARD32 d = 0; if (a) { - d = dest[i]; + d = READ(dest + i); FbByteMulC(d, a); } - dest[i] = d; + WRITE(dest + i, d); } } } @@ -2187,18 +2195,18 @@ fbCombineOutC (CARD32 *dest, CARD32 *src, CARD32 *mask, int width) int i; fbCombineMaskValueC(src, mask, width); for (i = 0; i < width; ++i) { - CARD32 d = dest[i]; + CARD32 d = READ(dest + i); CARD16 a = ~d >> 24; CARD32 s = 0; if (a) { - s = src[i]; + s = READ(src + i); if (a != 0xff) { FbByteMul(s, a); } } - dest[i] = s; + WRITE(dest + i, s); } } @@ -2208,17 +2216,17 @@ fbCombineOutReverseC (CARD32 *dest, CARD32 *src, CARD32 *mask, int width) int i; fbCombineMaskAlphaC(src, mask, width); for (i = 0; i < width; ++i) { - CARD32 a = ~mask[i]; + CARD32 a = ~READ(mask + i); if (a != 0xffffffff) { CARD32 d = 0; if (a) { - d = dest[i]; + d = READ(dest + i); FbByteMulC(d, a); } - dest[i] = d; + WRITE(dest + i, d); } } } @@ -2229,12 +2237,12 @@ fbCombineAtopC (CARD32 *dest, CARD32 *src, CARD32 *mask, int width) int i; fbCombineMaskC(src, mask, width); for (i = 0; i < width; ++i) { - CARD32 d = dest[i]; - CARD32 s = src[i]; - CARD32 ad = ~mask[i]; + CARD32 d = READ(dest + i); + CARD32 s = READ(src + i); + CARD32 ad = ~READ(mask + i); CARD16 as = d >> 24; FbByteAddMulC(d, ad, s, as); - dest[i] = d; + WRITE(dest + i, d); } } @@ -2245,12 +2253,12 @@ fbCombineAtopReverseC (CARD32 *dest, CARD32 *src, CARD32 *mask, int width) fbCombineMaskC(src, mask, width); for (i = 0; i < width; ++i) { - CARD32 d = dest[i]; - CARD32 s = src[i]; - CARD32 ad = mask[i]; + CARD32 d = READ(dest + i); + CARD32 s = READ(src + i); + CARD32 ad = READ(mask + i); CARD16 as = ~d >> 24; FbByteAddMulC(d, ad, s, as); - dest[i] = d; + WRITE(dest + i, d); } } @@ -2260,12 +2268,12 @@ fbCombineXorC (CARD32 *dest, CARD32 *src, CARD32 *mask, int width) int i; fbCombineMaskC(src, mask, width); for (i = 0; i < width; ++i) { - CARD32 d = dest[i]; - CARD32 s = src[i]; - CARD32 ad = ~mask[i]; + CARD32 d = READ(dest + i); + CARD32 s = READ(src + i); + CARD32 ad = ~READ(mask + i); CARD16 as = ~d >> 24; FbByteAddMulC(d, ad, s, as); - dest[i] = d; + WRITE(dest + i, d); } } @@ -2275,10 +2283,10 @@ fbCombineAddC (CARD32 *dest, CARD32 *src, CARD32 *mask, int width) int i; fbCombineMaskValueC(src, mask, width); for (i = 0; i < width; ++i) { - CARD32 s = src[i]; - CARD32 d = dest[i]; + CARD32 s = READ(src + i); + CARD32 d = READ(dest + i); FbByteAdd(d, s); - dest[i] = d; + WRITE(dest + i, d); } } @@ -2293,12 +2301,12 @@ fbCombineSaturateC (CARD32 *dest, CARD32 *src, CARD32 *mask, int width) CARD16 t, u, v; CARD32 m,n,o,p; - d = dest[i]; - s = src[i]; - sa = (mask[i] >> 24); - sr = (mask[i] >> 16) & 0xff; - sg = (mask[i] >> 8) & 0xff; - sb = (mask[i] ) & 0xff; + d = READ(dest + i); + s = READ(src + i); + sa = (READ(mask + i) >> 24); + sr = (READ(mask + i) >> 16) & 0xff; + sg = (READ(mask + i) >> 8) & 0xff; + sb = (READ(mask + i) ) & 0xff; da = ~d >> 24; if (sb <= da) @@ -2321,7 +2329,7 @@ fbCombineSaturateC (CARD32 *dest, CARD32 *src, CARD32 *mask, int width) else p = FbGen (s, d, 24, (da << 8) / sa, 0xff, t, u, v); - dest[i] = m|n|o|p; + WRITE(dest + i, m|n|o|p); } } @@ -2338,9 +2346,9 @@ fbCombineDisjointGeneralC (CARD32 *dest, CARD32 *src, CARD32 *mask, int width, C CARD32 sa; CARD8 da; - s = src[i]; - sa = mask[i]; - d = dest[i]; + s = READ(src + i); + sa = READ(mask + i); + d = READ(dest + i); da = d >> 24; switch (combine & CombineA) { @@ -2393,7 +2401,7 @@ fbCombineDisjointGeneralC (CARD32 *dest, CARD32 *src, CARD32 *mask, int width, C o = FbGen (s,d,16,FbGet8(Fa,16),FbGet8(Fb,16),t, u, v); p = FbGen (s,d,24,FbGet8(Fa,24),FbGet8(Fb,24),t, u, v); s = m|n|o|p; - dest[i] = s; + WRITE(dest + i, s); } } @@ -2458,9 +2466,9 @@ fbCombineConjointGeneralC (CARD32 *dest, CARD32 *src, CARD32 *mask, int width, C CARD32 sa; CARD8 da; - s = src[i]; - sa = mask[i]; - d = dest[i]; + s = READ(src + i); + sa = READ(mask + i); + d = READ(dest + i); da = d >> 24; switch (combine & CombineA) { @@ -2513,7 +2521,7 @@ fbCombineConjointGeneralC (CARD32 *dest, CARD32 *src, CARD32 *mask, int width, C o = FbGen (s,d,16,FbGet8(Fa,16),FbGet8(Fb,16),t, u, v); p = FbGen (s,d,24,FbGet8(Fa,24),FbGet8(Fb,24),t, u, v); s = m|n|o|p; - dest[i] = s; + WRITE(dest + i, s); } } @@ -2644,7 +2652,8 @@ static void fbFetchSolid(PicturePtr pict, int x, int y, int width, CARD32 *buffe end = buffer + width; while (buffer < end) - *buffer++ = color; + WRITE(buffer++, color); + fbFinishAccess (pict->pDrawable); } static void fbFetch(PicturePtr pict, int x, int y, int width, CARD32 *buffer) @@ -2663,6 +2672,7 @@ static void fbFetch(PicturePtr pict, int x, int y, int width, CARD32 *buffer) bits += y*stride; fetch(bits, x, width, buffer, indexed); + fbFinishAccess (pict->pDrawable); } #define MOD(a,b) ((a) < 0 ? ((b) - ((-(a) - 1) % (b))) - 1 : (a) % (b)) @@ -2710,15 +2720,16 @@ static void fbFetchSourcePict(PicturePtr pict, int x, int y, int width, CARD32 * if (pGradient->type == SourcePictTypeSolidFill) { register CARD32 color = pGradient->solidFill.color; while (buffer < end) { - *buffer++ = color; + WRITE(buffer++, color); } } else if (pGradient->type == SourcePictTypeLinear) { PictVector v, unit; xFixed_32_32 l; xFixed_48_16 dx, dy, a, b, off; - v.vector[0] = IntToxFixed(x); - v.vector[1] = IntToxFixed(y); + /* reference point is the center of the pixel */ + v.vector[0] = IntToxFixed(x) + xFixed1/2; + v.vector[1] = IntToxFixed(y) + xFixed1/2; v.vector[2] = xFixed1; if (pict->transform) { if (!PictureTransformPoint3d (pict->transform, &v)) @@ -2751,7 +2762,7 @@ static void fbFetchSourcePict(PicturePtr pict, int x, int y, int width, CARD32 * inc = (a * unit.vector[0] + b * unit.vector[1]) >> 16; } while (buffer < end) { - *buffer++ = gradientPixel(pGradient, t, pict->repeatType); + WRITE(buffer++, gradientPixel(pGradient, t, pict->repeatType)); t += inc; } } else { @@ -2766,7 +2777,7 @@ static void fbFetchSourcePict(PicturePtr pict, int x, int y, int width, CARD32 * y = ((xFixed_48_16)v.vector[1] << 16) / v.vector[2]; t = ((a*x + b*y) >> 16) + off; } - *buffer++ = gradientPixel(pGradient, t, pict->repeatType); + WRITE(buffer++, gradientPixel(pGradient, t, pict->repeatType)); v.vector[0] += unit.vector[0]; v.vector[1] += unit.vector[1]; v.vector[2] += unit.vector[2]; @@ -2784,8 +2795,9 @@ static void fbFetchSourcePict(PicturePtr pict, int x, int y, int width, CARD32 * if (pict->transform) { PictVector v; - v.vector[0] = IntToxFixed(x); - v.vector[1] = IntToxFixed(y); + /* reference point is the center of the pixel */ + v.vector[0] = IntToxFixed(x) + xFixed1/2; + v.vector[1] = IntToxFixed(y) + xFixed1/2; v.vector[2] = xFixed1; if (!PictureTransformPoint3d (pict->transform, &v)) return; @@ -2809,9 +2821,9 @@ static void fbFetchSourcePict(PicturePtr pict, int x, int y, int width, CARD32 * double c = -(rx*rx + ry*ry); double det = (b * b) - (4 * pGradient->radial.a * c); double s = (-b + sqrt(det))/(2. * pGradient->radial.a); - *buffer = gradientPixel(pGradient, - (xFixed_48_16)((s*pGradient->radial.m + pGradient->radial.b)*65536), - pict->repeatType); + WRITE(buffer, gradientPixel(pGradient, + (xFixed_48_16)((s*pGradient->radial.m + pGradient->radial.b)*65536), + pict->repeatType)); ++buffer; rx += cx; ry += cy; @@ -2832,9 +2844,9 @@ static void fbFetchSourcePict(PicturePtr pict, int x, int y, int width, CARD32 * c = -(x*x + y*y); det = (b * b) - (4 * pGradient->radial.a * c); s = (-b + sqrt(det))/(2. * pGradient->radial.a); - *buffer = gradientPixel(pGradient, - (xFixed_48_16)((s*pGradient->radial.m + pGradient->radial.b)*65536), - pict->repeatType); + WRITE(buffer, gradientPixel(pGradient, + (xFixed_48_16)((s*pGradient->radial.m + pGradient->radial.b)*65536), + pict->repeatType)); ++buffer; rx += cx; ry += cy; @@ -2849,8 +2861,8 @@ static void fbFetchSourcePict(PicturePtr pict, int x, int y, int width, CARD32 * while (buffer < end) { double angle = atan2(ry, rx) + a; - *buffer = gradientPixel(pGradient, (xFixed_48_16) (angle * (65536. / (2*M_PI))), - pict->repeatType); + WRITE(buffer, gradientPixel(pGradient, (xFixed_48_16) (angle * (65536. / (2*M_PI))), + pict->repeatType)); ++buffer; rx += cx; ry += cy; @@ -2868,8 +2880,8 @@ static void fbFetchSourcePict(PicturePtr pict, int x, int y, int width, CARD32 * x -= pGradient->conical.center.x/65536.; y -= pGradient->conical.center.y/65536.; angle = atan2(y, x) + a; - *buffer = gradientPixel(pGradient, (xFixed_48_16) (angle * (65536. / (2*M_PI))), - pict->repeatType); + WRITE(buffer, gradientPixel(pGradient, (xFixed_48_16) (angle * (65536. / (2*M_PI))), + pict->repeatType)); ++buffer; rx += cx; ry += cy; @@ -2905,14 +2917,17 @@ static void fbFetchTransformed(PicturePtr pict, int x, int y, int width, CARD32 dx = pict->pDrawable->x; dy = pict->pDrawable->y; - v.vector[0] = IntToxFixed(x - dx); - v.vector[1] = IntToxFixed(y - dy); + /* reference point is the center of the pixel */ + v.vector[0] = IntToxFixed(x - dx) + xFixed1 / 2; + v.vector[1] = IntToxFixed(y - dy) + xFixed1 / 2; v.vector[2] = xFixed1; /* when using convolution filters one might get here without a transform */ if (pict->transform) { - if (!PictureTransformPoint3d (pict->transform, &v)) + if (!PictureTransformPoint3d (pict->transform, &v)) { + fbFinishAccess (pict->pDrawable); return; + } unit.vector[0] = pict->transform->matrix[0][0]; unit.vector[1] = pict->transform->matrix[1][0]; unit.vector[2] = pict->transform->matrix[2][0]; @@ -2929,7 +2944,7 @@ static void fbFetchTransformed(PicturePtr pict, int x, int y, int width, CARD32 if (REGION_NUM_RECTS(pict->pCompositeClip) == 1) { for (i = 0; i < width; ++i) { if (!v.vector[2]) { - buffer[i] = 0; + WRITE(buffer + i, 0); } else { if (!affine) { y = MOD(DIV(v.vector[1],v.vector[2]), pict->pDrawable->height); @@ -2938,7 +2953,7 @@ static void fbFetchTransformed(PicturePtr pict, int x, int y, int width, CARD32 y = MOD(v.vector[1]>>16, pict->pDrawable->height); x = MOD(v.vector[0]>>16, pict->pDrawable->width); } - buffer[i] = fetch(bits + (y + dy)*stride, x + dx, indexed); + WRITE(buffer + i, fetch(bits + (y + dy)*stride, x + dx, indexed)); } v.vector[0] += unit.vector[0]; v.vector[1] += unit.vector[1]; @@ -2947,7 +2962,7 @@ static void fbFetchTransformed(PicturePtr pict, int x, int y, int width, CARD32 } else { for (i = 0; i < width; ++i) { if (!v.vector[2]) { - buffer[i] = 0; + WRITE(buffer + i, 0); } else { if (!affine) { y = MOD(DIV(v.vector[1],v.vector[2]), pict->pDrawable->height); @@ -2957,9 +2972,9 @@ static void fbFetchTransformed(PicturePtr pict, int x, int y, int width, CARD32 x = MOD(v.vector[0]>>16, pict->pDrawable->width); } if (POINT_IN_REGION (0, pict->pCompositeClip, x + dx, y + dy, &box)) - buffer[i] = fetch(bits + (y + dy)*stride, x + dx, indexed); + WRITE(buffer + i, fetch(bits + (y + dy)*stride, x + dx, indexed)); else - buffer[i] = 0; + WRITE(buffer + i, 0); } v.vector[0] += unit.vector[0]; v.vector[1] += unit.vector[1]; @@ -2971,7 +2986,7 @@ static void fbFetchTransformed(PicturePtr pict, int x, int y, int width, CARD32 box = pict->pCompositeClip->extents; for (i = 0; i < width; ++i) { if (!v.vector[2]) { - buffer[i] = 0; + WRITE(buffer + i, 0); } else { if (!affine) { y = DIV(v.vector[1],v.vector[2]); @@ -2980,8 +2995,8 @@ static void fbFetchTransformed(PicturePtr pict, int x, int y, int width, CARD32 y = v.vector[1]>>16; x = v.vector[0]>>16; } - buffer[i] = ((x < box.x1-dx) | (x >= box.x2-dx) | (y < box.y1-dy) | (y >= box.y2-dy)) ? - 0 : fetch(bits + (y + dy)*stride, x + dx, indexed); + WRITE(buffer + i, ((x < box.x1-dx) | (x >= box.x2-dx) | (y < box.y1-dy) | (y >= box.y2-dy)) ? + 0 : fetch(bits + (y + dy)*stride, x + dx, indexed)); } v.vector[0] += unit.vector[0]; v.vector[1] += unit.vector[1]; @@ -2990,7 +3005,7 @@ static void fbFetchTransformed(PicturePtr pict, int x, int y, int width, CARD32 } else { for (i = 0; i < width; ++i) { if (!v.vector[2]) { - buffer[i] = 0; + WRITE(buffer + i, 0); } else { if (!affine) { y = DIV(v.vector[1],v.vector[2]); @@ -3000,9 +3015,9 @@ static void fbFetchTransformed(PicturePtr pict, int x, int y, int width, CARD32 x = v.vector[0]>>16; } if (POINT_IN_REGION (0, pict->pCompositeClip, x + dx, y + dy, &box)) - buffer[i] = fetch(bits + (y + dy)*stride, x + dx, indexed); + WRITE(buffer + i, fetch(bits + (y + dy)*stride, x + dx, indexed)); else - buffer[i] = 0; + WRITE(buffer + i, 0); } v.vector[0] += unit.vector[0]; v.vector[1] += unit.vector[1]; @@ -3011,11 +3026,17 @@ static void fbFetchTransformed(PicturePtr pict, int x, int y, int width, CARD32 } } } else if (pict->filter == PictFilterBilinear) { + /* adjust vector for maximum contribution at 0.5, 0.5 of each texel. */ + v.vector[0] -= v.vector[2] / 2; + v.vector[1] -= v.vector[2] / 2; + unit.vector[0] -= unit.vector[2] / 2; + unit.vector[1] -= unit.vector[2] / 2; + if (pict->repeatType == RepeatNormal) { if (REGION_NUM_RECTS(pict->pCompositeClip) == 1) { for (i = 0; i < width; ++i) { if (!v.vector[2]) { - buffer[i] = 0; + WRITE(buffer + i, 0); } else { int x1, x2, y1, y2, distx, idistx, disty, idisty; FbBits *b; @@ -3067,7 +3088,7 @@ static void fbFetchTransformed(PicturePtr pict, int x, int y, int width, CARD32 ft = FbGet8(tl,24) * idistx + FbGet8(tr,24) * distx; fb = FbGet8(bl,24) * idistx + FbGet8(br,24) * distx; r |= (((ft * idisty + fb * disty) << 8) & 0xff000000); - buffer[i] = r; + WRITE(buffer + i, r); } v.vector[0] += unit.vector[0]; v.vector[1] += unit.vector[1]; @@ -3076,7 +3097,7 @@ static void fbFetchTransformed(PicturePtr pict, int x, int y, int width, CARD32 } else { for (i = 0; i < width; ++i) { if (!v.vector[2]) { - buffer[i] = 0; + WRITE(buffer + i, 0); } else { int x1, x2, y1, y2, distx, idistx, disty, idisty; FbBits *b; @@ -3132,7 +3153,7 @@ static void fbFetchTransformed(PicturePtr pict, int x, int y, int width, CARD32 ft = FbGet8(tl,24) * idistx + FbGet8(tr,24) * distx; fb = FbGet8(bl,24) * idistx + FbGet8(br,24) * distx; r |= (((ft * idisty + fb * disty) << 8) & 0xff000000); - buffer[i] = r; + WRITE(buffer + i, r); } v.vector[0] += unit.vector[0]; v.vector[1] += unit.vector[1]; @@ -3144,7 +3165,7 @@ static void fbFetchTransformed(PicturePtr pict, int x, int y, int width, CARD32 box = pict->pCompositeClip->extents; for (i = 0; i < width; ++i) { if (!v.vector[2]) { - buffer[i] = 0; + WRITE(buffer + i, 0); } else { int x1, x2, y1, y2, distx, idistx, disty, idisty, x_off; FbBits *b; @@ -3198,7 +3219,7 @@ static void fbFetchTransformed(PicturePtr pict, int x, int y, int width, CARD32 ft = FbGet8(tl,24) * idistx + FbGet8(tr,24) * distx; fb = FbGet8(bl,24) * idistx + FbGet8(br,24) * distx; r |= (((ft * idisty + fb * disty) << 8) & 0xff000000); - buffer[i] = r; + WRITE(buffer + i, r); } v.vector[0] += unit.vector[0]; v.vector[1] += unit.vector[1]; @@ -3207,7 +3228,7 @@ static void fbFetchTransformed(PicturePtr pict, int x, int y, int width, CARD32 } else { for (i = 0; i < width; ++i) { if (!v.vector[2]) { - buffer[i] = 0; + WRITE(buffer + i, 0); } else { int x1, x2, y1, y2, distx, idistx, disty, idisty, x_off; FbBits *b; @@ -3259,7 +3280,7 @@ static void fbFetchTransformed(PicturePtr pict, int x, int y, int width, CARD32 ft = FbGet8(tl,24) * idistx + FbGet8(tr,24) * distx; fb = FbGet8(bl,24) * idistx + FbGet8(br,24) * distx; r |= (((ft * idisty + fb * disty) << 8) & 0xff000000); - buffer[i] = r; + WRITE(buffer + i, r); } v.vector[0] += unit.vector[0]; v.vector[1] += unit.vector[1]; @@ -3271,12 +3292,12 @@ static void fbFetchTransformed(PicturePtr pict, int x, int y, int width, CARD32 xFixed *params = pict->filter_params; INT32 cwidth = xFixedToInt(params[0]); INT32 cheight = xFixedToInt(params[1]); - int xoff = params[0] >> 1; - int yoff = params[1] >> 1; + int xoff = (params[0] - xFixed1) >> 1; + int yoff = (params[1] - xFixed1) >> 1; params += 2; for (i = 0; i < width; ++i) { if (!v.vector[2]) { - buffer[i] = 0; + WRITE(buffer + i, 0); } else { int x1, x2, y1, y2, x, y; INT32 srtot, sgtot, sbtot, satot; @@ -3316,21 +3337,28 @@ static void fbFetchTransformed(PicturePtr pict, int x, int y, int width, CARD32 } } + satot >>= 16; + srtot >>= 16; + sgtot >>= 16; + sbtot >>= 16; + if (satot < 0) satot = 0; else if (satot > 0xff) satot = 0xff; if (srtot < 0) srtot = 0; else if (srtot > 0xff) srtot = 0xff; if (sgtot < 0) sgtot = 0; else if (sgtot > 0xff) sgtot = 0xff; if (sbtot < 0) sbtot = 0; else if (sbtot > 0xff) sbtot = 0xff; - buffer[i] = ((satot << 24) | - (srtot << 16) | - (sgtot << 8) | - (sbtot )); + WRITE(buffer + i, ((satot << 24) | + (srtot << 16) | + (sgtot << 8) | + (sbtot ))); } v.vector[0] += unit.vector[0]; v.vector[1] += unit.vector[1]; v.vector[2] += unit.vector[2]; } } + + fbFinishAccess (pict->pDrawable); } @@ -3351,10 +3379,10 @@ static void fbFetchExternalAlpha(PicturePtr pict, int x, int y, int width, CARD3 fbFetchTransformed(pict->alphaMap, x - pict->alphaOrigin.x, y - pict->alphaOrigin.y, width, alpha_buffer); for (i = 0; i < width; ++i) { int a = alpha_buffer[i]>>24; - buffer[i] = (a << 24) - | (div_255(Red(buffer[i]) * a) << 16) - | (div_255(Green(buffer[i]) * a) << 8) - | (div_255(Blue(buffer[i]) * a)); + WRITE(buffer + i, (a << 24) + | (div_255(Red(READ(buffer + i)) * a) << 16) + | (div_255(Green(READ(buffer + i)) * a) << 8) + | (div_255(Blue(READ(buffer + i)) * a))); } if (alpha_buffer != _alpha_buffer) @@ -3376,6 +3404,7 @@ static void fbStore(PicturePtr pict, int x, int y, int width, CARD32 *buffer) bits += y*stride; store(bits, buffer, x, width, indexed); + fbFinishAccess (pict->pDrawable); } static void fbStoreExternalAlpha(PicturePtr pict, int x, int y, int width, CARD32 *buffer) @@ -3415,6 +3444,9 @@ static void fbStoreExternalAlpha(PicturePtr pict, int x, int y, int width, CARD3 store(bits, buffer, x, width, indexed); astore(alpha_bits, buffer, ax - pict->alphaOrigin.x, width, aindexed); + + fbFinishAccess (pict->alphaMap->pDrawable); + fbFinishAccess (pict->pDrawable); } typedef void (*scanStoreProc)(PicturePtr , int , int , int , CARD32 *); diff --git a/fb/fbcopy.c b/fb/fbcopy.c index 73224da8f..164cd3d67 100644 --- a/fb/fbcopy.c +++ b/fb/fbcopy.c @@ -21,7 +21,6 @@ * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR * PERFORMANCE OF THIS SOFTWARE. */ -/* $XFree86: xc/programs/Xserver/fb/fbcopy.c,v 1.13 2003/11/10 18:21:47 tsi Exp $ */ #ifdef HAVE_DIX_CONFIG_H #include @@ -104,6 +103,8 @@ fbCopyNtoN (DrawablePtr pSrcDrawable, #endif pbox++; } + fbFinishAccess (pDstDrawable); + fbFinishAccess (pSrcDrawable); } void @@ -174,6 +175,9 @@ fbCopy1toN (DrawablePtr pSrcDrawable, } pbox++; } + + fbFinishAccess (pDstDrawable); + fbFinishAccess (pSrcDrawable); } void @@ -222,6 +226,8 @@ fbCopyNto1 (DrawablePtr pSrcDrawable, (FbStip) pPriv->and, (FbStip) pPriv->xor, (FbStip) pPriv->bgand, (FbStip) pPriv->bgxor, bitplane); + fbFinishAccess (pDstDrawable); + fbFinishAccess (pSrcDrawable); } else { @@ -282,6 +288,9 @@ fbCopyNto1 (DrawablePtr pSrcDrawable, pPriv->and, pPriv->xor, pPriv->bgand, pPriv->bgxor); xfree (tmp); + + fbFinishAccess (pDstDrawable); + fbFinishAccess (pSrcDrawable); } pbox++; } diff --git a/fb/fbedge.c b/fb/fbedge.c index b6ca829a4..70fc423bd 100644 --- a/fb/fbedge.c +++ b/fb/fbedge.c @@ -60,9 +60,9 @@ #define StepAlpha ((__ap += __ao), (__ao ^= 1)) #define AddAlpha(a) { \ - CARD8 __o = *__ap; \ + CARD8 __o = READ(__ap); \ CARD8 __a = (a) + Get4(__o, __ao); \ - *__ap = Put4 (__o, __ao, __a | (0 - ((__a) >> 4))); \ + WRITE(__ap, Put4 (__o, __ao, __a | (0 - ((__a) >> 4)))); \ } #include "fbedgeimp.h" @@ -102,7 +102,7 @@ add_saturate_8 (CARD8 *buf, int value, int length) { while (length--) { - *buf = clip255 (*buf + value); + WRITE(buf, clip255 (READ(buf) + value)); buf++; } } @@ -164,11 +164,11 @@ fbRasterizeEdges8 (FbBits *buf, /* Add coverage across row */ if (lxi == rxi) { - ap[lxi] = clip255 (ap[lxi] + rxs - lxs); + WRITE(ap +lxi, clip255 (READ(ap + lxi) + rxs - lxs)); } else { - ap[lxi] = clip255 (ap[lxi] + N_X_FRAC(8) - lxs); + WRITE(ap + lxi, clip255 (READ(ap + lxi) + N_X_FRAC(8) - lxs)); /* Move forward so that lxi/rxi is the pixel span */ lxi++; @@ -238,7 +238,7 @@ fbRasterizeEdges8 (FbBits *buf, * necessary to avoid a buffer overrun, (when rx * is exactly on a pixel boundary). */ if (rxs) - ap[rxi] = clip255 (ap[rxi] + rxs); + WRITE(ap + rxi, clip255 (READ(ap + rxi) + rxs)); } } @@ -247,7 +247,7 @@ fbRasterizeEdges8 (FbBits *buf, if (fill_start != fill_end) { if (fill_size == N_Y_FRAC(8)) { - memset (ap + fill_start, 0xff, fill_end - fill_start); + MEMSET_WRAPPED (ap + fill_start, 0xff, fill_end - fill_start); } else { @@ -273,7 +273,7 @@ fbRasterizeEdges8 (FbBits *buf, { if (fill_size == N_Y_FRAC(8)) { - memset (ap + fill_start, 0xff, fill_end - fill_start); + MEMSET_WRAPPED (ap + fill_start, 0xff, fill_end - fill_start); } else { diff --git a/fb/fbedgeimp.h b/fb/fbedgeimp.h index 877393516..57da31a39 100644 --- a/fb/fbedgeimp.h +++ b/fb/fbedgeimp.h @@ -76,12 +76,14 @@ rasterizeEdges (FbBits *buf, x &= FB_MASK; FbMaskBits (x, width, startmask, nmiddle, endmask); - if (startmask) - *a++ |= startmask; + if (startmask) { + WRITE(a, READ(a) | startmask); + a++; + } while (nmiddle--) - *a++ = FB_ALLONES; + WRITE(a++, FB_ALLONES); if (endmask) - *a |= endmask; + WRITE(a, READ(a) | endmask); } #else { diff --git a/fb/fbfill.c b/fb/fbfill.c index 678c7f927..7ef3a70f9 100644 --- a/fb/fbfill.c +++ b/fb/fbfill.c @@ -21,7 +21,6 @@ * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR * PERFORMANCE OF THIS SOFTWARE. */ -/* $XFree86: xc/programs/Xserver/fb/fbfill.c,v 1.5 2003/01/29 00:43:33 torrey Exp $ */ #ifdef HAVE_DIX_CONFIG_H #include @@ -50,8 +49,10 @@ fbFill (DrawablePtr pDrawable, case FillSolid: #ifdef USE_MMX if (!pPriv->and && fbHaveMMX()) - if (fbSolidFillmmx (pDrawable, x, y, width, height, pPriv->xor)) + if (fbSolidFillmmx (pDrawable, x, y, width, height, pPriv->xor)) { + fbFinishAccess (pDrawable); return; + } #endif fbSolid (dst + (y + dstYoff) * dstStride, dstStride, @@ -93,6 +94,7 @@ fbFill (DrawablePtr pDrawable, (pGC->patOrg.x + pDrawable->x + dstXoff), pGC->patOrg.y + pDrawable->y - y); + fbFinishAccess (&pStip->drawable); } else { @@ -130,6 +132,7 @@ fbFill (DrawablePtr pDrawable, bgand, bgxor, pGC->patOrg.x + pDrawable->x + dstXoff, pGC->patOrg.y + pDrawable->y - y); + fbFinishAccess (&pStip->drawable); } break; } @@ -158,10 +161,12 @@ fbFill (DrawablePtr pDrawable, dstBpp, (pGC->patOrg.x + pDrawable->x + dstXoff) * dstBpp, pGC->patOrg.y + pDrawable->y - y); + fbFinishAccess (&pTile->drawable); break; } } fbValidateDrawable (pDrawable); + fbFinishAccess (pDrawable); } void @@ -216,8 +221,10 @@ fbSolidBoxClipped (DrawablePtr pDrawable, if (fbSolidFillmmx (pDrawable, partX1, partY1, (partX2 - partX1), (partY2 - partY1), - xor)) + xor)) { + fbFinishAccess (pDrawable); return; + } } #endif fbSolid (dst + (partY1 + dstYoff) * dstStride, @@ -229,4 +236,5 @@ fbSolidBoxClipped (DrawablePtr pDrawable, (partY2 - partY1), and, xor); } + fbFinishAccess (pDrawable); } diff --git a/fb/fbfillrect.c b/fb/fbfillrect.c index 2a60da165..f404044c5 100644 --- a/fb/fbfillrect.c +++ b/fb/fbfillrect.c @@ -21,7 +21,6 @@ * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR * PERFORMANCE OF THIS SOFTWARE. */ -/* $XFree86: xc/programs/Xserver/fb/fbfillrect.c,v 1.1 1999/11/19 13:53:43 hohndel Exp $ */ #ifdef HAVE_DIX_CONFIG_H #include diff --git a/fb/fbfillsp.c b/fb/fbfillsp.c index e2bb71e3a..77e4772a6 100644 --- a/fb/fbfillsp.c +++ b/fb/fbfillsp.c @@ -21,7 +21,6 @@ * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR * PERFORMANCE OF THIS SOFTWARE. */ -/* $XFree86: xc/programs/Xserver/fb/fbfillsp.c,v 1.1 1999/11/19 13:53:43 hohndel Exp $ */ #ifdef HAVE_DIX_CONFIG_H #include diff --git a/fb/fbgc.c b/fb/fbgc.c index 21383d9a9..3f8bf25e7 100644 --- a/fb/fbgc.c +++ b/fb/fbgc.c @@ -21,8 +21,6 @@ * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR * PERFORMANCE OF THIS SOFTWARE. */ -/* $XdotOrg: xserver/xorg/fb/fbgc.c,v 1.7 2006/02/10 22:00:21 anholt Exp $ */ -/* $XFree86: xc/programs/Xserver/fb/fbgc.c,v 1.14 2003/12/18 15:22:32 alanh Exp $ */ #ifdef HAVE_DIX_CONFIG_H #include @@ -108,16 +106,18 @@ fbPadPixmap (PixmapPtr pPixmap) mask = FbBitsMask (0, width); while (height--) { - b = *bits & mask; + b = READ(bits) & mask; w = width; while (w < FB_UNIT) { b = b | FbScrRight(b, w); w <<= 1; } - *bits = b; + WRITE(bits, b); bits += stride; } + + fbFinishAccess (&pPixmap->drawable); } /* @@ -155,7 +155,7 @@ fbLineRepeat (FbBits *bits, int len, int width) width = (width + FB_UNIT-1) >> FB_SHIFT; bits++; while (--width) - if (*bits != first) + if (READ(bits) != first) return FALSE; return TRUE; } @@ -185,10 +185,13 @@ fbCanEvenStipple (PixmapPtr pStipple, int bpp) /* check to see that the stipple repeats horizontally */ while (h--) { - if (!fbLineRepeat (bits, len, pStipple->drawable.width)) + if (!fbLineRepeat (bits, len, pStipple->drawable.width)) { + fbFinishAccess (&pStipple->drawable); return FALSE; + } bits += stride; } + fbFinishAccess (&pStipple->drawable); return TRUE; } diff --git a/fb/fbgetsp.c b/fb/fbgetsp.c index 7c58dcb82..ffd8a1d7d 100644 --- a/fb/fbgetsp.c +++ b/fb/fbgetsp.c @@ -21,7 +21,6 @@ * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR * PERFORMANCE OF THIS SOFTWARE. */ -/* $XFree86: xc/programs/Xserver/fb/fbgetsp.c,v 1.5 2000/05/06 21:09:33 keithp Exp $ */ #ifdef HAVE_DIX_CONFIG_H #include @@ -85,4 +84,6 @@ fbGetSpans(DrawablePtr pDrawable, ppt++; pwidth++; } + + fbFinishAccess (pDrawable); } diff --git a/fb/fbglyph.c b/fb/fbglyph.c index b97f0c0b3..2c19b742f 100644 --- a/fb/fbglyph.c +++ b/fb/fbglyph.c @@ -1,6 +1,4 @@ /* - * $XdotOrg: xc/programs/Xserver/fb/fbglyph.c,v 1.3 2004/12/04 00:42:50 kuhn Exp $ - * $XFree86: xc/programs/Xserver/fb/fbglyph.c,v 1.12tsi Exp $ * * Copyright © 1998 Keith Packard * @@ -64,11 +62,11 @@ fbGlyphIn (RegionPtr pRegion, #ifdef FB_24BIT #ifndef FBNOPIXADDR -#define WRITE1(d,n,fg) ((d)[n] = (CARD8) fg) -#define WRITE2(d,n,fg) (*(CARD16 *) &(d[n]) = (CARD16) fg) -#define WRITE4(d,n,fg) (*(CARD32 *) &(d[n]) = (CARD32) fg) +#define WRITE1(d,n,fg) WRITE((d) + (n), (CARD8) fg) +#define WRITE2(d,n,fg) WRITE((CARD16 *) &(d[n]), (CARD16) fg) +#define WRITE4(d,n,fg) WRITE((CARD32 *) &(d[n]), (CARD32) fg) #if FB_UNIT == 6 && IMAGE_BYTE_ORDER == LSBFirst -#define WRITE8(d) (*(FbBits *) &(d[0]) = fg) +#define WRITE8(d) WRITE((FbBits *) &(d[0]), fg) #else #define WRITE8(d) WRITE4(d,0,_ABCA), WRITE4(d,4,_BCAB) #endif @@ -159,7 +157,7 @@ fbGlyph24 (FbBits *dstBits, lshift = 4 - shift; while (height--) { - bits = *stipple++; + bits = READ(stipple++); n = lshift; dst = dstLine; while (bits) @@ -286,7 +284,7 @@ fbPolyGlyphBlt (DrawablePtr pDrawable, glyph = 0; if (pGC->fillStyle == FillSolid && pPriv->and == 0) { - fbGetDrawable (pDrawable, dst, dstStride, dstBpp, dstXoff, dstYoff); + dstBpp = pDrawable->bitsPerPixel; switch (dstBpp) { case 8: glyph = fbGlyph8; break; case 16: glyph = fbGlyph16; break; @@ -314,6 +312,7 @@ fbPolyGlyphBlt (DrawablePtr pDrawable, if (glyph && gWidth <= sizeof (FbStip) * 8 && fbGlyphIn (fbGetCompositeClip(pGC), gx, gy, gWidth, gHeight)) { + fbGetDrawable (pDrawable, dst, dstStride, dstBpp, dstXoff, dstYoff); (*glyph) (dst + (gy + dstYoff) * dstStride, dstStride, dstBpp, @@ -321,6 +320,7 @@ fbPolyGlyphBlt (DrawablePtr pDrawable, pPriv->xor, gx + dstXoff, gHeight); + fbFinishAccess (pDrawable); } else #endif @@ -377,7 +377,7 @@ fbImageGlyphBlt (DrawablePtr pDrawable, glyph = 0; if (pPriv->and == 0) { - fbGetDrawable (pDrawable, dst, dstStride, dstBpp, dstXoff, dstYoff); + dstBpp = pDrawable->bitsPerPixel; switch (dstBpp) { case 8: glyph = fbGlyph8; break; case 16: glyph = fbGlyph16; break; @@ -445,6 +445,7 @@ fbImageGlyphBlt (DrawablePtr pDrawable, if (glyph && gWidth <= sizeof (FbStip) * 8 && fbGlyphIn (fbGetCompositeClip(pGC), gx, gy, gWidth, gHeight)) { + fbGetDrawable (pDrawable, dst, dstStride, dstBpp, dstXoff, dstYoff); (*glyph) (dst + (gy + dstYoff) * dstStride, dstStride, dstBpp, @@ -452,6 +453,7 @@ fbImageGlyphBlt (DrawablePtr pDrawable, pPriv->fg, gx + dstXoff, gHeight); + fbFinishAccess (pDrawable); } else #endif diff --git a/fb/fbimage.c b/fb/fbimage.c index 174c78bd0..06a3c84fe 100644 --- a/fb/fbimage.c +++ b/fb/fbimage.c @@ -21,7 +21,6 @@ * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR * PERFORMANCE OF THIS SOFTWARE. */ -/* $XFree86: xc/programs/Xserver/fb/fbimage.c,v 1.7 2001/05/29 04:54:09 keithp Exp $ */ #ifdef HAVE_DIX_CONFIG_H #include @@ -69,7 +68,7 @@ fbPutImage (DrawablePtr pDrawable, break; case XYPixmap: srcStride = BitmapBytePad(w + leftPad) / sizeof (FbStip); - for (i = 1 << (pDrawable->depth - 1); i; i >>= 1) + for (i = (unsigned long)1 << (pDrawable->depth - 1); i; i >>= 1) { if (i & pGC->planemask) { @@ -171,6 +170,8 @@ fbPutZImage (DrawablePtr pDrawable, pm, dstBpp); } + + fbFinishAccess (pDrawable); } void @@ -278,6 +279,8 @@ fbPutXYImage (DrawablePtr pDrawable, fgand, fgxor, bgand, bgxor); } } + + fbFinishAccess (pDrawable); } void @@ -362,4 +365,6 @@ fbGetImage (DrawablePtr pDrawable, fbXorStip(GXcopy,0,FB_STIP_ALLONES), planeMask); } + + fbFinishAccess (pDrawable); } diff --git a/fb/fbmmx.c b/fb/fbmmx.c index d058ffae4..f74930a39 100644 --- a/fb/fbmmx.c +++ b/fb/fbmmx.c @@ -591,7 +591,7 @@ mmxCombineSaturateU (CARD32 *dest, const CARD32 *src, int width) if (sa > da) { __m64 msa = load8888(FbIntDiv(da, sa)); - msa = expand_alpha(msa); + msa = expand_alpha_rev(msa); ms = pix_multiply(ms, msa); } md = pix_add(md, ms); diff --git a/fb/fboverlay.c b/fb/fboverlay.c index e9fb9b24f..1e3d756ed 100644 --- a/fb/fboverlay.c +++ b/fb/fboverlay.c @@ -1,5 +1,4 @@ /* - * $XFree86: xc/programs/Xserver/fb/fboverlay.c,v 1.7 2003/11/10 18:21:47 tsi Exp $ * * Copyright © 2000 SuSE, Inc. * @@ -23,7 +22,6 @@ * Author: Keith Packard, SuSE, Inc. */ -/* $XdotOrg: xserver/xorg/fb/fboverlay.c,v 1.7 2005/07/03 07:01:23 daniels Exp $ */ #ifdef HAVE_DIX_CONFIG_H #include diff --git a/fb/fboverlay.h b/fb/fboverlay.h index e6a4e033f..af0acb889 100644 --- a/fb/fboverlay.h +++ b/fb/fboverlay.h @@ -1,5 +1,4 @@ /* - * $XFree86: xc/programs/Xserver/fb/fboverlay.h,v 1.4tsi Exp $ * * Copyright © 2000 SuSE, Inc. * diff --git a/fb/fbpict.c b/fb/fbpict.c index f248fdb84..28503c0cf 100644 --- a/fb/fbpict.c +++ b/fb/fbpict.c @@ -1,5 +1,4 @@ /* - * $XFree86: xc/programs/Xserver/fb/fbpict.c,v 1.15 2002/09/26 02:56:48 keithp Exp $ * * Copyright © 2000 SuSE, Inc. * @@ -138,22 +137,25 @@ fbCompositeSolidMask_nx8x8888 (CARD8 op, while (w--) { - m = *mask++; + m = READ(mask++); if (m == 0xff) { if (srca == 0xff) - *dst = src & dstMask; + WRITE(dst, src & dstMask); else - *dst = fbOver (src, *dst) & dstMask; + WRITE(dst, fbOver (src, READ(dst)) & dstMask); } else if (m) { d = fbIn (src, m); - *dst = fbOver (d, *dst) & dstMask; + WRITE(dst, fbOver (d, READ(dst)) & dstMask); } dst++; } } + + fbFinishAccess (pMask->pDrawable); + fbFinishAccess (pDst->pDrawable); } void @@ -197,17 +199,17 @@ fbCompositeSolidMask_nx8888x8888C (CARD8 op, while (w--) { - ma = *mask++; + ma = READ(mask++); if (ma == 0xffffffff) { if (srca == 0xff) - *dst = src & dstMask; + WRITE(dst, src & dstMask); else - *dst = fbOver (src, *dst) & dstMask; + WRITE(dst, fbOver (src, READ(dst)) & dstMask); } else if (ma) { - d = *dst; + d = READ(dst); #define FbInOverC(src,srca,msk,dst,i,result) { \ CARD16 __a = FbGet8(msk,i); \ CARD32 __t, __ta; \ @@ -222,11 +224,14 @@ fbCompositeSolidMask_nx8888x8888C (CARD8 op, FbInOverC (src, srca, ma, d, 8, n); FbInOverC (src, srca, ma, d, 16, o); FbInOverC (src, srca, ma, d, 24, p); - *dst = m|n|o|p; + WRITE(dst, m|n|o|p); } dst++; } } + + fbFinishAccess (pMask->pDrawable); + fbFinishAccess (pDst->pDrawable); } void @@ -269,7 +274,7 @@ fbCompositeSolidMask_nx8x0888 (CARD8 op, while (w--) { - m = *mask++; + m = READ(mask++); if (m == 0xff) { if (srca == 0xff) @@ -289,6 +294,9 @@ fbCompositeSolidMask_nx8x0888 (CARD8 op, dst += 3; } } + + fbFinishAccess (pMask->pDrawable); + fbFinishAccess (pDst->pDrawable); } void @@ -331,27 +339,30 @@ fbCompositeSolidMask_nx8x0565 (CARD8 op, while (w--) { - m = *mask++; + m = READ(mask++); if (m == 0xff) { if (srca == 0xff) d = src; else { - d = *dst; + d = READ(dst); d = fbOver24 (src, cvt0565to8888(d)); } - *dst = cvt8888to0565(d); + WRITE(dst, cvt8888to0565(d)); } else if (m) { - d = *dst; + d = READ(dst); d = fbOver24 (fbIn(src,m), cvt0565to8888(d)); - *dst = cvt8888to0565(d); + WRITE(dst, cvt8888to0565(d)); } dst++; } } + + fbFinishAccess (pMask->pDrawable); + fbFinishAccess (pDst->pDrawable); } void @@ -398,33 +409,36 @@ fbCompositeSolidMask_nx8888x0565C (CARD8 op, while (w--) { - ma = *mask++; + ma = READ(mask++); if (ma == 0xffffffff) { if (srca == 0xff) { - *dst = src16; + WRITE(dst, src16); } else { - d = *dst; + d = READ(dst); d = fbOver24 (src, cvt0565to8888(d)); - *dst = cvt8888to0565(d); + WRITE(dst, cvt8888to0565(d)); } } else if (ma) { - d = *dst; + d = READ(dst); d = cvt0565to8888(d); FbInOverC (src, srca, ma, d, 0, m); FbInOverC (src, srca, ma, d, 8, n); FbInOverC (src, srca, ma, d, 16, o); d = m|n|o; - *dst = cvt8888to0565(d); + WRITE(dst, cvt8888to0565(d)); } dst++; } } + + fbFinishAccess (pMask->pDrawable); + fbFinishAccess (pDst->pDrawable); } void @@ -462,15 +476,18 @@ fbCompositeSrc_8888x8888 (CARD8 op, while (w--) { - s = *src++; + s = READ(src++); a = s >> 24; if (a == 0xff) - *dst = s & dstMask; + WRITE(dst, s & dstMask); else if (a) - *dst = fbOver (s, *dst) & dstMask; + WRITE(dst, fbOver (s, READ(dst)) & dstMask); dst++; } } + + fbFinishAccess (pSrc->pDrawable); + fbFinishAccess (pDst->pDrawable); } void @@ -507,7 +524,7 @@ fbCompositeSrc_8888x0888 (CARD8 op, while (w--) { - s = *src++; + s = READ(src++); a = s >> 24; if (a) { @@ -520,6 +537,9 @@ fbCompositeSrc_8888x0888 (CARD8 op, dst += 3; } } + + fbFinishAccess (pSrc->pDrawable); + fbFinishAccess (pDst->pDrawable); } void @@ -556,7 +576,7 @@ fbCompositeSrc_8888x0565 (CARD8 op, while (w--) { - s = *src++; + s = READ(src++); a = s >> 24; if (a) { @@ -564,14 +584,17 @@ fbCompositeSrc_8888x0565 (CARD8 op, d = s; else { - d = *dst; + d = READ(dst); d = fbOver24 (s, cvt0565to8888(d)); } - *dst = cvt8888to0565(d); + WRITE(dst, cvt8888to0565(d)); } dst++; } } + + fbFinishAccess (pDst->pDrawable); + fbFinishAccess (pSrc->pDrawable); } void @@ -606,8 +629,11 @@ fbCompositeSrc_0565x0565 (CARD8 op, w = width; while (w--) - *dst++ = *src++; + WRITE(dst, READ(src++)); } + + fbFinishAccess (pDst->pDrawable); + fbFinishAccess (pSrc->pDrawable); } void @@ -644,20 +670,23 @@ fbCompositeSrcAdd_8000x8000 (CARD8 op, while (w--) { - s = *src++; + s = READ(src++); if (s) { if (s != 0xff) { - d = *dst; + d = READ(dst); t = d + s; s = t | (0 - (t >> 8)); } - *dst = s; + WRITE(dst, s); } dst++; } } + + fbFinishAccess (pDst->pDrawable); + fbFinishAccess (pSrc->pDrawable); } void @@ -695,12 +724,12 @@ fbCompositeSrcAdd_8888x8888 (CARD8 op, while (w--) { - s = *src++; + s = READ(src++); if (s) { if (s != 0xffffffff) { - d = *dst; + d = READ(dst); if (d) { m = FbAdd(s,d,0,t); @@ -710,11 +739,14 @@ fbCompositeSrcAdd_8888x8888 (CARD8 op, s = m|n|o|p; } } - *dst = s; + WRITE(dst, s); } dst++; } } + + fbFinishAccess (pDst->pDrawable); + fbFinishAccess (pSrc->pDrawable); } void @@ -758,6 +790,9 @@ fbCompositeSrcAdd_1000x1000 (CARD8 op, FALSE, FALSE); + + fbFinishAccess(pDst->pDrawable); + fbFinishAccess(pSrc->pDrawable); } void @@ -822,6 +857,9 @@ fbCompositeSolidMask_nx1xn (CARD8 op, src, FB_ALLONES, 0x0); + + fbFinishAccess (pDst->pDrawable); + fbFinishAccess (pMask->pDrawable); } # define mod(a,b) ((b) == 1 ? 0 : (a) >= 0 ? (a) % (b) : (b) - (-a) % (b)) @@ -892,9 +930,8 @@ fbComposite (CARD8 op, case PictOpOver: if (pMask) { - if (srcRepeat && - pSrc->pDrawable->width == 1 && - pSrc->pDrawable->height == 1) + if (fbCanGetSolid(pSrc) && + !maskRepeat) { srcRepeat = FALSE; if (PICT_FORMAT_COLOR(pSrc->format)) { @@ -925,6 +962,8 @@ fbComposite (CARD8 op, #endif func = fbCompositeSolidMask_nx8x8888; break; + default: + break; } break; case PICT_a8r8g8b8: @@ -947,6 +986,8 @@ fbComposite (CARD8 op, #endif func = fbCompositeSolidMask_nx8888x0565C; break; + default: + break; } } break; @@ -970,6 +1011,8 @@ fbComposite (CARD8 op, #endif func = fbCompositeSolidMask_nx8888x0565C; break; + default: + break; } } break; @@ -985,16 +1028,22 @@ fbComposite (CARD8 op, case PICT_x8b8g8r8: func = fbCompositeSolidMask_nx1xn; break; + default: + break; } break; + default: + break; } + default: + break; } } else if (! srcRepeat) /* has mask and non-repeating source */ { if (pSrc->pDrawable == pMask->pDrawable && xSrc == xMask && ySrc == yMask && - !pMask->componentAlpha) + !pMask->componentAlpha && !maskRepeat) { /* source == mask: non-premultiplied data */ switch (pSrc->format) { @@ -1016,8 +1065,12 @@ fbComposite (CARD8 op, func = fbCompositeSrc_8888RevNPx0565mmx; #endif break; + default: + break; } break; + default: + break; } break; case PICT_x8r8g8b8: @@ -1038,19 +1091,23 @@ fbComposite (CARD8 op, func = fbCompositeSrc_8888RevNPx0565mmx; #endif break; + default: + break; } break; + default: + break; } break; + default: + break; } break; } else { /* non-repeating source, repeating mask => translucent window */ - if (maskRepeat && - pMask->pDrawable->width == 1 && - pMask->pDrawable->height == 1) + if (fbCanGetSolid(pMask)) { if (pSrc->format == PICT_x8r8g8b8 && pDst->format == PICT_x8r8g8b8 && @@ -1067,9 +1124,7 @@ fbComposite (CARD8 op, } else /* no mask */ { - if (srcRepeat && - pSrc->pDrawable->width == 1 && - pSrc->pDrawable->height == 1) + if (fbCanGetSolid(pSrc)) { /* no mask and repeating source */ switch (pSrc->format) { @@ -1094,8 +1149,12 @@ fbComposite (CARD8 op, } #endif break; + default: + break; } break; + default: + break; } } else if (! srcRepeat) @@ -1118,6 +1177,8 @@ fbComposite (CARD8 op, case PICT_r5g6b5: func = fbCompositeSrc_8888x0565; break; + default: + break; } break; case PICT_x8r8g8b8: @@ -1129,6 +1190,8 @@ fbComposite (CARD8 op, func = fbCompositeCopyAreammx; #endif break; + default: + break; } case PICT_x8b8g8r8: switch (pDst->format) { @@ -1139,6 +1202,8 @@ fbComposite (CARD8 op, func = fbCompositeCopyAreammx; #endif break; + default: + break; } break; case PICT_a8b8g8r8: @@ -1158,6 +1223,8 @@ fbComposite (CARD8 op, case PICT_b5g6r5: func = fbCompositeSrc_8888x0565; break; + default: + break; } break; case PICT_r5g6b5: @@ -1165,6 +1232,8 @@ fbComposite (CARD8 op, case PICT_r5g6b5: func = fbCompositeSrc_0565x0565; break; + default: + break; } break; case PICT_b5g6r5: @@ -1172,8 +1241,12 @@ fbComposite (CARD8 op, case PICT_b5g6r5: func = fbCompositeSrc_0565x0565; break; + default: + break; } break; + default: + break; } } } @@ -1192,6 +1265,8 @@ fbComposite (CARD8 op, #endif func = fbCompositeSrcAdd_8888x8888; break; + default: + break; } break; case PICT_a8b8g8r8: @@ -1204,6 +1279,8 @@ fbComposite (CARD8 op, #endif func = fbCompositeSrcAdd_8888x8888; break; + default: + break; } break; case PICT_a8: @@ -1216,6 +1293,8 @@ fbComposite (CARD8 op, #endif func = fbCompositeSrcAdd_8000x8000; break; + default: + break; } break; case PICT_a1: @@ -1223,8 +1302,12 @@ fbComposite (CARD8 op, case PICT_a1: func = fbCompositeSrcAdd_1000x1000; break; + default: + break; } break; + default: + break; } } break; @@ -1347,6 +1430,10 @@ fbPictureInit (ScreenPtr pScreen, PictFormatPtr formats, int nformats) */ #if !defined(__amd64__) && !defined(__x86_64__) +#ifdef HAVE_GETISAX +#include +#endif + enum CPUFeatures { NoFeatures = 0, MMX = 0x1, @@ -1357,7 +1444,23 @@ enum CPUFeatures { }; static unsigned int detectCPUFeatures(void) { + unsigned int features = 0; unsigned int result; + +#ifdef HAVE_GETISAX + if (getisax(&result, 1)) { + if (result & AV_386_CMOV) + features |= CMOV; + if (result & AV_386_MMX) + features |= MMX; + if (result & AV_386_AMD_MMX) + features |= MMX_Extensions; + if (result & AV_386_SSE) + features |= SSE; + if (result & AV_386_SSE2) + features |= SSE2; + } +#else char vendor[13]; vendor[0] = 0; vendor[12] = 0; @@ -1366,7 +1469,8 @@ static unsigned int detectCPUFeatures(void) { * %esp here. We can't declare either one as clobbered * since they are special registers (%ebx is the "PIC * register" holding an offset to global data, %esp the - * stack pointer), so we need to make sure they have their+ * original values when we access the output operands. + * stack pointer), so we need to make sure they have their + * original values when we access the output operands. */ __asm__ ("pushf\n" "pop %%eax\n" @@ -1402,7 +1506,6 @@ static unsigned int detectCPUFeatures(void) { : "%eax", "%ecx", "%edx" ); - unsigned int features = 0; if (result) { /* result now contains the standard feature bits */ if (result & (1 << 15)) @@ -1436,6 +1539,7 @@ static unsigned int detectCPUFeatures(void) { features |= MMX_Extensions; } } +#endif /* HAVE_GETISAX */ return features; } diff --git a/fb/fbpict.h b/fb/fbpict.h index 9546b134f..5cdde9ef5 100644 --- a/fb/fbpict.h +++ b/fb/fbpict.h @@ -1,5 +1,4 @@ /* - * $XFree86: xc/programs/Xserver/fb/fbpict.h,v 1.7 2001/07/18 10:15:02 keithp Exp $ * * Copyright © 2000 Keith Packard, member of The XFree86 Project, Inc. * @@ -31,6 +30,13 @@ #include "renderedge.h" + +#if defined(__GNUC__) +#define INLINE __inline__ +#else +#define INLINE +#endif + #define FbIntMult(a,b,t) ( (t) = (a) * (b) + 0x80, ( ( ( (t)>>8 ) + (t) )>>8 ) ) #define FbIntDiv(a,b) (((CARD16) (a) * 255) / (b)) @@ -68,6 +74,40 @@ #define Green(x) (((x) >> 8) & 0xff) #define Blue(x) ((x) & 0xff) +/** + * Returns TRUE if the fbComposeGetSolid can be used to get a single solid + * color representing every source sampling location of the picture. + */ +static INLINE Bool +fbCanGetSolid(PicturePtr pict) +{ + if (pict->pDrawable == NULL || + pict->pDrawable->width != 1 || + pict->pDrawable->height != 1) + { + return FALSE; + } + if (pict->repeat != RepeatNormal) + return FALSE; + + switch (pict->format) { + case PICT_a8r8g8b8: + case PICT_x8r8g8b8: + case PICT_a8b8g8r8: + case PICT_x8b8g8r8: + case PICT_r8g8b8: + case PICT_b8g8r8: + case PICT_r5g6b5: + case PICT_b5g6r5: + return TRUE; + default: + return FALSE; + } +} + +#define fbCanGetSolid(pict) \ +(pict->pDrawable != NULL && pict->pDrawable->width == 1 && pict->pDrawable->height == 1) + #define fbComposeGetSolid(pict, bits, fmt) { \ FbBits *__bits__; \ FbStride __stride__; \ @@ -77,13 +117,13 @@ fbGetDrawable((pict)->pDrawable,__bits__,__stride__,__bpp__,__xoff__,__yoff__); \ switch (__bpp__) { \ case 32: \ - (bits) = *(CARD32 *) __bits__; \ + (bits) = READ((CARD32 *) __bits__); \ break; \ case 24: \ (bits) = Fetch24 ((CARD8 *) __bits__); \ break; \ case 16: \ - (bits) = *(CARD16 *) __bits__; \ + (bits) = READ((CARD16 *) __bits__); \ (bits) = cvt0565to8888(bits); \ break; \ default: \ @@ -100,6 +140,7 @@ /* manage missing src alpha */ \ if ((pict)->pFormat->direct.alphaMask == 0) \ (bits) |= 0xff000000; \ + fbFinishAccess ((pict)->pDrawable); \ } #define fbComposeGetStart(pict,x,y,type,stride,line,mul) {\ @@ -121,22 +162,22 @@ #if IMAGE_BYTE_ORDER == MSBFirst #define Fetch24(a) ((unsigned long) (a) & 1 ? \ - ((*(a) << 16) | *((CARD16 *) ((a)+1))) : \ - ((*((CARD16 *) (a)) << 8) | *((a)+2))) + ((READ(a) << 16) | READ((CARD16 *) ((a)+1))) : \ + ((READ((CARD16 *) (a)) << 8) | READ((a)+2))) #define Store24(a,v) ((unsigned long) (a) & 1 ? \ - ((*(a) = (CARD8) ((v) >> 16)), \ - (*((CARD16 *) ((a)+1)) = (CARD16) (v))) : \ - ((*((CARD16 *) (a)) = (CARD16) ((v) >> 8)), \ - (*((a)+2) = (CARD8) (v)))) + (WRITE(a, (CARD8) ((v) >> 16)), \ + WRITE((CARD16 *) ((a)+1), (CARD16) (v))) : \ + (WRITE((CARD16 *) (a), (CARD16) ((v) >> 8)), \ + WRITE((a)+2, (CARD8) (v)))) #else #define Fetch24(a) ((unsigned long) (a) & 1 ? \ - ((*(a)) | (*((CARD16 *) ((a)+1)) << 8)) : \ - ((*((CARD16 *) (a))) | (*((a)+2) << 16))) + (READ(a) | (READ((CARD16 *) ((a)+1)) << 8)) : \ + (READ((CARD16 *) (a)) | (READ((a)+2) << 16))) #define Store24(a,v) ((unsigned long) (a) & 1 ? \ - ((*(a) = (CARD8) (v)), \ - (*((CARD16 *) ((a)+1)) = (CARD16) ((v) >> 8))) : \ - ((*((CARD16 *) (a)) = (CARD16) (v)),\ - (*((a)+2) = (CARD8) ((v) >> 16)))) + (WRITE(a, (CARD8) (v)), \ + WRITE((CARD16 *) ((a)+1), (CARD16) ((v) >> 8))) : \ + (WRITE((CARD16 *) (a), (CARD16) (v)),\ + WRITE((a)+2, (CARD8) ((v) >> 16)))) #endif /* @@ -322,12 +363,6 @@ #define FASTCALL #endif -#if defined(__GNUC__) -#define INLINE __inline__ -#else -#define INLINE -#endif - typedef struct _FbComposeData { CARD8 op; PicturePtr src; diff --git a/fb/fbpixmap.c b/fb/fbpixmap.c index 1e12d8818..c2ddcb0e9 100644 --- a/fb/fbpixmap.c +++ b/fb/fbpixmap.c @@ -21,7 +21,6 @@ * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR * PERFORMANCE OF THIS SOFTWARE. */ -/* $XFree86: xc/programs/Xserver/fb/fbpixmap.c,v 1.9 2001/05/29 04:54:09 keithp Exp $ */ #ifdef HAVE_DIX_CONFIG_H #include @@ -161,6 +160,8 @@ fbPixmapToRegion(PixmapPtr pPix) FirstRect = REGION_BOXPTR(pReg); rects = FirstRect; + fbPrepareAccess(&pPix->drawable); + pwLine = (FbBits *) pPix->devPrivate.ptr; nWidth = pPix->devKind >> (FB_SHIFT-3); @@ -175,7 +176,7 @@ fbPixmapToRegion(PixmapPtr pPix) irectLineStart = rects - FirstRect; /* If the Screen left most bit of the word is set, we're starting in * a box */ - if(*pw & mask0) + if(READ(pw) & mask0) { fInBox = TRUE; rx1 = 0; @@ -186,7 +187,7 @@ fbPixmapToRegion(PixmapPtr pPix) pwLineEnd = pw + (width >> FB_SHIFT); for (base = 0; pw < pwLineEnd; base += FB_UNIT) { - w = *pw++; + w = READ(pw++); if (fInBox) { if (!~w) @@ -227,7 +228,7 @@ fbPixmapToRegion(PixmapPtr pPix) if(width & FB_MASK) { /* Process final partial word on line */ - w = *pw++; + w = READ(pw++); for(ib = 0; ib < (width & FB_MASK); ib++) { /* If the Screen left most bit of the word is set, we're @@ -312,6 +313,8 @@ fbPixmapToRegion(PixmapPtr pPix) pReg->data = (RegDataPtr)NULL; } } + + fbFinishAccess(&pPix->drawable); #ifdef DEBUG if (!miValidRegion(pReg)) FatalError("Assertion failed file %s, line %d: expr\n", __FILE__, __LINE__); @@ -363,6 +366,7 @@ fbValidateDrawable (DrawablePtr pDrawable) if (!fbValidateBits (first, stride, FB_HEAD_BITS) || !fbValidateBits (last, stride, FB_TAIL_BITS)) fbInitializeDrawable(pDrawable); + fbFinishAccess (pDrawable); } void @@ -384,5 +388,6 @@ fbInitializeDrawable (DrawablePtr pDrawable) last = bits + stride * pDrawable->height; fbSetBits (first, stride, FB_HEAD_BITS); fbSetBits (last, stride, FB_TAIL_BITS); + fbFinishAccess (pDrawable); } #endif /* FB_DEBUG */ diff --git a/fb/fbpoint.c b/fb/fbpoint.c index 5229d6970..c03ea18cc 100644 --- a/fb/fbpoint.c +++ b/fb/fbpoint.c @@ -21,7 +21,6 @@ * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR * PERFORMANCE OF THIS SOFTWARE. */ -/* $XFree86: xc/programs/Xserver/fb/fbpoint.c,v 1.7 2000/09/22 05:58:01 keithp Exp $ */ #ifdef HAVE_DIX_CONFIG_H #include @@ -91,20 +90,20 @@ fbDots (FbBits *dstOrig, FbMaskStip (x, 24, leftMask, n, rightMask); if (leftMask) { - *d = FbDoMaskRRop (*d, andT, xorT, leftMask); + WRITE(d, FbDoMaskRRop (READ(d), andT, xorT, leftMask)); andT = FbNext24Stip(andT); xorT = FbNext24Stip(xorT); d++; } if (rightMask) - *d = FbDoMaskRRop(*d, andT, xorT, rightMask); + WRITE(d, FbDoMaskRRop(READ(d), andT, xorT, rightMask)); } else #endif { FbStip mask; mask = FbStipMask(x, dstBpp); - *d = FbDoMaskRRop (*d, and, xor, mask); + WRITE(d, FbDoMaskRRop (READ(d), and, xor, mask)); } } } @@ -161,4 +160,5 @@ fbPolyPoint (DrawablePtr pDrawable, nBox--; pBox++) (*dots) (dst, dstStride, dstBpp, pBox, pptInit, nptInit, pDrawable->x, pDrawable->y, dstXoff, dstYoff, and, xor); + fbFinishAccess (pDrawable); } diff --git a/fb/fbpseudocolor.c b/fb/fbpseudocolor.c index 2233f95dc..271e98145 100644 --- a/fb/fbpseudocolor.c +++ b/fb/fbpseudocolor.c @@ -875,6 +875,8 @@ xxCopyPseudocolorRegion(ScreenPtr pScreen, RegionPtr pReg, register CARD16 *d; int w; + fbPrepareAccess((DrawablePtr)pScreen->devPrivate); + dst_base = (CARD16*) ((PixmapPtr)pScreen->devPrivate)->devPrivate.ptr; dst_stride = (int)((PixmapPtr)pScreen->devPrivate)->devKind / sizeof (CARD16); @@ -899,6 +901,8 @@ xxCopyPseudocolorRegion(ScreenPtr pScreen, RegionPtr pReg, } pbox++; } + + fbFinishAccess(&((PixmapPtr)pScreen->devPrivate)->drawable); } static void @@ -1200,7 +1204,7 @@ GCFuncs xxGCFuncs = { xxChangeClip, xxDestroyClip, xxCopyClip }; -GCOps xxGCOps = { +static GCOps xxGCOps = { xxFillSpans, xxSetSpans, xxPutImage, xxCopyArea, xxCopyPlane, xxPolyPoint, diff --git a/fb/fbpush.c b/fb/fbpush.c index 8f1336963..bb7bcefef 100644 --- a/fb/fbpush.c +++ b/fb/fbpush.c @@ -21,7 +21,6 @@ * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR * PERFORMANCE OF THIS SOFTWARE. */ -/* $XFree86: xc/programs/Xserver/fb/fbpush.c,v 1.3 2000/02/14 19:20:30 dawes Exp $ */ #ifdef HAVE_DIX_CONFIG_H #include @@ -59,7 +58,7 @@ fbPushPattern (DrawablePtr pDrawable, w = width; s = src; src += srcStride; - bits = *s++; + bits = READ(s++); xspan = x; while (w) { @@ -74,7 +73,7 @@ fbPushPattern (DrawablePtr pDrawable, bitsMask = FbStipRight (bitsMask, 1); if (!bitsMask) { - bits = *s++; + bits = READ(s++); bitsMask = FbBitsMask(0,1); } } while (bits & bitsMask); @@ -93,7 +92,7 @@ fbPushPattern (DrawablePtr pDrawable, bitsMask = FbStipRight (bitsMask, 1); if (!bitsMask) { - bits = *s++; + bits = READ(s++); bitsMask = FbBitsMask(0,1); } } while (!(bits & bitsMask)); @@ -166,6 +165,7 @@ fbPushFill (DrawablePtr pDrawable, fbAnd(GXnoop,(FbBits) 0,FB_ALLONES), fbXor(GXnoop,(FbBits) 0,FB_ALLONES)); } + fbFinishAccess (pDrawable); } else { diff --git a/fb/fbrop.h b/fb/fbrop.h index 65f62c393..f3768a265 100644 --- a/fb/fbrop.h +++ b/fb/fbrop.h @@ -21,7 +21,6 @@ * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR * PERFORMANCE OF THIS SOFTWARE. */ -/* $XFree86: xc/programs/Xserver/fb/fbrop.h,v 1.3 2000/02/14 19:20:30 dawes Exp $ */ #ifndef _FBROP_H_ #define _FBROP_H_ diff --git a/fb/fbscreen.c b/fb/fbscreen.c index 804503e12..045ca8fd2 100644 --- a/fb/fbscreen.c +++ b/fb/fbscreen.c @@ -1,6 +1,4 @@ -/* $XdotOrg: xc/programs/Xserver/fb/fbscreen.c,v 1.4 2004/12/04 00:42:50 kuhn Exp $ - * Id: fbscreen.c,v 1.1 1999/11/02 03:54:45 keithp Exp $ - * +/* * Copyright © 1998 Keith Packard * * Permission to use, copy, modify, distribute, and sell this software and its @@ -21,7 +19,6 @@ * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR * PERFORMANCE OF THIS SOFTWARE. */ -/* $XFree86: xc/programs/Xserver/fb/fbscreen.c,v 1.13 2001/05/29 04:54:09 keithp Exp $ */ #ifdef HAVE_DIX_CONFIG_H #include @@ -158,6 +155,19 @@ fbSetupScreen(ScreenPtr pScreen, return TRUE; } +#ifdef FB_ACCESS_WRAPPER +Bool +wfbFinishScreenInit(ScreenPtr pScreen, + pointer pbits, + int xsize, + int ysize, + int dpix, + int dpiy, + int width, + int bpp, + SetupWrapProcPtr setupWrap, + FinishWrapProcPtr finishWrap) +#else Bool fbFinishScreenInit(ScreenPtr pScreen, pointer pbits, @@ -167,6 +177,7 @@ fbFinishScreenInit(ScreenPtr pScreen, int dpiy, int width, int bpp) +#endif { VisualPtr visuals; DepthPtr depths; @@ -225,6 +236,10 @@ fbFinishScreenInit(ScreenPtr pScreen, fbGetScreenPrivate(pScreen)->win32bpp = 32; fbGetScreenPrivate(pScreen)->pix32bpp = 32; } +#ifdef FB_ACCESS_WRAPPER + fbGetScreenPrivate(pScreen)->setupWrap = setupWrap; + fbGetScreenPrivate(pScreen)->finishWrap = finishWrap; +#endif #endif rootdepth = 0; if (!fbInitVisuals (&visuals, &depths, &nvisuals, &ndepths, &rootdepth, @@ -259,6 +274,27 @@ fbFinishScreenInit(ScreenPtr pScreen, } /* dts * (inch/dot) * (25.4 mm / inch) = mm */ +#ifdef FB_ACCESS_WRAPPER +Bool +wfbScreenInit(ScreenPtr pScreen, + pointer pbits, + int xsize, + int ysize, + int dpix, + int dpiy, + int width, + int bpp, + SetupWrapProcPtr setupWrap, + FinishWrapProcPtr finishWrap) +{ + if (!fbSetupScreen(pScreen, pbits, xsize, ysize, dpix, dpiy, width, bpp)) + return FALSE; + if (!wfbFinishScreenInit(pScreen, pbits, xsize, ysize, dpix, dpiy, + width, bpp, setupWrap, finishWrap)) + return FALSE; + return TRUE; +} +#else Bool fbScreenInit(ScreenPtr pScreen, pointer pbits, @@ -276,6 +312,7 @@ fbScreenInit(ScreenPtr pScreen, return FALSE; return TRUE; } +#endif #ifdef FB_OLD_SCREEN diff --git a/fb/fbseg.c b/fb/fbseg.c index 777ff7055..31076379b 100644 --- a/fb/fbseg.c +++ b/fb/fbseg.c @@ -21,7 +21,6 @@ * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR * PERFORMANCE OF THIS SOFTWARE. */ -/* $XFree86: xc/programs/Xserver/fb/fbseg.c,v 1.7 2001/01/17 07:40:02 keithp Exp $ */ #ifdef HAVE_DIX_CONFIG_H #include @@ -80,7 +79,7 @@ fbBresSolid (DrawablePtr pDrawable, mask = fbBresShiftMask(mask,signdx,dstBpp); if (!mask) { - *dst = FbDoMaskRRop (*dst, and, xor, bits); + WRITE(dst, FbDoMaskRRop (READ(dst), and, xor, bits)); bits = 0; dst += signdx; mask = mask0; @@ -88,20 +87,20 @@ fbBresSolid (DrawablePtr pDrawable, e += e1; if (e >= 0) { - *dst = FbDoMaskRRop (*dst, and, xor, bits); + WRITE(dst, FbDoMaskRRop (READ(dst), and, xor, bits)); bits = 0; dst += dstStride; e += e3; } } if (bits) - *dst = FbDoMaskRRop (*dst, and, xor, bits); + WRITE(dst, FbDoMaskRRop (READ(dst), and, xor, bits)); } else { while (len--) { - *dst = FbDoMaskRRop (*dst, and, xor, mask); + WRITE(dst, FbDoMaskRRop (READ(dst), and, xor, mask)); dst += dstStride; e += e1; if (e >= 0) @@ -116,6 +115,8 @@ fbBresSolid (DrawablePtr pDrawable, } } } + + fbFinishAccess (pDrawable); } void @@ -165,9 +166,9 @@ fbBresDash (DrawablePtr pDrawable, while (len--) { if (even) - *dst = FbDoMaskRRop (*dst, and, xor, mask); + WRITE(dst, FbDoMaskRRop (READ(dst), and, xor, mask)); else if (doOdd) - *dst = FbDoMaskRRop (*dst, bgand, bgxor, mask); + WRITE(dst, FbDoMaskRRop (READ(dst), bgand, bgxor, mask)); if (axis == X_AXIS) { mask = fbBresShiftMask(mask,signdx,dstBpp); @@ -200,6 +201,8 @@ fbBresDash (DrawablePtr pDrawable, } FbDashStep (dashlen, even); } + + fbFinishAccess (pDrawable); } void @@ -372,13 +375,13 @@ fbBresSolid24RRop (DrawablePtr pDrawable, FbMaskStip (x, 24, leftMask, nl, rightMask); if (leftMask) { - *d = FbDoMaskRRop (*d, andT, xorT, leftMask); + WRITE(d, FbDoMaskRRop (READ(d), andT, xorT, leftMask)); d++; andT = FbNext24Stip (andT); xorT = FbNext24Stip (xorT); } if (rightMask) - *d = FbDoMaskRRop (*d, andT, xorT, rightMask); + WRITE(d, FbDoMaskRRop (READ(d), andT, xorT, rightMask)); if (axis == X_AXIS) { x1 += signdx; @@ -400,6 +403,8 @@ fbBresSolid24RRop (DrawablePtr pDrawable, } } } + + fbFinishAccess (pDrawable); } static void @@ -469,13 +474,13 @@ fbBresDash24RRop (DrawablePtr pDrawable, FbMaskStip (x, 24, leftMask, nl, rightMask); if (leftMask) { - *d = FbDoMaskRRop (*d, andT, xorT, leftMask); + WRITE(d, FbDoMaskRRop (READ(d), andT, xorT, leftMask)); d++; andT = FbNext24Stip (andT); xorT = FbNext24Stip (xorT); } if (rightMask) - *d = FbDoMaskRRop (*d, andT, xorT, rightMask); + WRITE(d, FbDoMaskRRop (READ(d), andT, xorT, rightMask)); } if (axis == X_AXIS) { @@ -499,6 +504,8 @@ fbBresDash24RRop (DrawablePtr pDrawable, } FbDashStep (dashlen, even); } + + fbFinishAccess (pDrawable); } #endif diff --git a/fb/fbsetsp.c b/fb/fbsetsp.c index eefc2da82..06332568b 100644 --- a/fb/fbsetsp.c +++ b/fb/fbsetsp.c @@ -21,7 +21,6 @@ * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR * PERFORMANCE OF THIS SOFTWARE. */ -/* $XFree86: xc/programs/Xserver/fb/fbsetsp.c,v 1.4 2000/05/06 21:09:34 keithp Exp $ */ #ifdef HAVE_DIX_CONFIG_H #include @@ -100,5 +99,6 @@ fbSetSpans (DrawablePtr pDrawable, pwidth++; } fbValidateDrawable (pDrawable); + fbFinishAccess (pDrawable); } diff --git a/fb/fbsolid.c b/fb/fbsolid.c index 89effe63b..6b5ed0fa1 100644 --- a/fb/fbsolid.c +++ b/fb/fbsolid.c @@ -70,12 +70,12 @@ fbSolid (FbBits *dst, n = nmiddle; if (!and) while (n--) - *dst++ = xor; + WRITE(dst++, xor); else while (n--) { - *dst = FbDoRRop (*dst, and, xor); - dst++; + WRITE(dst, FbDoRRop (READ(dst), and, xor)); + dst++; } if (endmask) FbDoRightMaskByteRRop(dst,endbyte,endmask,and,xor); @@ -160,26 +160,26 @@ fbSolid24 (FbBits *dst, { if (startmask) { - *dst = FbDoMaskRRop(*dst, andS, xorS, startmask); - dst++; + WRITE(dst, FbDoMaskRRop(READ(dst), andS, xorS, startmask)); + dst++; } n = nmiddle; if (!and0) { while (n >= 3) { - *dst++ = xor0; - *dst++ = xor1; - *dst++ = xor2; + WRITE(dst++, xor0); + WRITE(dst++, xor1); + WRITE(dst++, xor2); n -= 3; } if (n) { - *dst++ = xor0; + WRITE(dst++, xor0); n--; if (n) { - *dst++ = xor1; + WRITE(dst++, xor1); } } } @@ -187,28 +187,28 @@ fbSolid24 (FbBits *dst, { while (n >= 3) { - *dst = FbDoRRop (*dst, and0, xor0); - dst++; - *dst = FbDoRRop (*dst, and1, xor1); - dst++; - *dst = FbDoRRop (*dst, and2, xor2); - dst++; + WRITE(dst, FbDoRRop (READ(dst), and0, xor0)); + dst++; + WRITE(dst, FbDoRRop (READ(dst), and1, xor1)); + dst++; + WRITE(dst, FbDoRRop (READ(dst), and2, xor2)); + dst++; n -= 3; } if (n) { - *dst = FbDoRRop (*dst, and0, xor0); - dst++; + WRITE(dst, FbDoRRop (READ(dst), and0, xor0)); + dst++; n--; if (n) { - *dst = FbDoRRop (*dst, and1, xor1); - dst++; + WRITE(dst, FbDoRRop (READ(dst), and1, xor1)); + dst++; } } } if (endmask) - *dst = FbDoMaskRRop (*dst, andE, xorE, endmask); + WRITE(dst, FbDoMaskRRop (READ(dst), andE, xorE, endmask)); dst += dstStride; } } diff --git a/fb/fbstipple.c b/fb/fbstipple.c index 175413092..de8d1f814 100644 --- a/fb/fbstipple.c +++ b/fb/fbstipple.c @@ -21,7 +21,6 @@ * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR * PERFORMANCE OF THIS SOFTWARE. */ -/* $XFree86: xc/programs/Xserver/fb/fbstipple.c,v 1.6 2000/02/23 20:29:47 dawes Exp $ */ #ifdef HAVE_DIX_CONFIG_H #include @@ -156,7 +155,7 @@ fbEvenStipple (FbBits *dst, /* * Extract stipple bits for this scanline; */ - bits = *s; + bits = READ(s); s += stipStride; if (s == stipEnd) s = stip; @@ -200,12 +199,12 @@ fbEvenStipple (FbBits *dst, n = nmiddle; if (!and) while (n--) - *dst++ = xor; + WRITE(dst++, xor); else { while (n--) { - *dst = FbDoRRop (*dst, and, xor); + WRITE(dst, FbDoRRop (READ(dst), and, xor)); dst++; } } diff --git a/fb/fbtile.c b/fb/fbtile.c index ef3242241..e7df1af5a 100644 --- a/fb/fbtile.c +++ b/fb/fbtile.c @@ -21,7 +21,6 @@ * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR * PERFORMANCE OF THIS SOFTWARE. */ -/* $XFree86: xc/programs/Xserver/fb/fbtile.c,v 1.3 2000/02/12 03:39:43 dawes Exp $ */ #ifdef HAVE_DIX_CONFIG_H #include @@ -81,7 +80,7 @@ fbEvenTile (FbBits *dst, /* * Pick up bits for this scanline */ - bits = *t++; + bits = READ(t++); if (t == tileEnd) t = tile; bits = FbRotLeft(bits,rot); and = fbAnd(alu,bits,pm); @@ -95,11 +94,11 @@ fbEvenTile (FbBits *dst, n = nmiddle; if (!and) while (n--) - *dst++ = xor; + WRITE(dst++, xor); else while (n--) { - *dst = FbDoRRop (*dst, and, xor); + WRITE(dst, FbDoRRop (READ(dst), and, xor)); dst++; } if (endmask) diff --git a/fb/fbtrap.c b/fb/fbtrap.c index 863969527..4c67bcdfb 100644 --- a/fb/fbtrap.c +++ b/fb/fbtrap.c @@ -95,6 +95,8 @@ fbAddTraps (PicturePtr pPicture, } traps++; } + + fbFinishAccess (pPicture->pDrawable); } void @@ -142,6 +144,8 @@ fbRasterizeTrapezoid (PicturePtr pPicture, fbRasterizeEdges (buf, bpp, width, stride, &l, &r, t, b); } + + fbFinishAccess (pPicture->pDrawable); } static int diff --git a/fb/fbutil.c b/fb/fbutil.c index 8153ab364..4be0f233c 100644 --- a/fb/fbutil.c +++ b/fb/fbutil.c @@ -21,7 +21,6 @@ * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR * PERFORMANCE OF THIS SOFTWARE. */ -/* $XFree86: xc/programs/Xserver/fb/fbutil.c,v 1.4 2000/02/23 20:29:48 dawes Exp $ */ #ifdef HAVE_DIX_CONFIG_H #include diff --git a/fb/fbwindow.c b/fb/fbwindow.c index 8f5355d06..cac662cc7 100644 --- a/fb/fbwindow.c +++ b/fb/fbwindow.c @@ -1,4 +1,3 @@ -/* $XdotOrg: xserver/xorg/fb/fbwindow.c,v 1.11 2006/04/03 21:16:30 ajax Exp $ */ /* * Id: fbwindow.c,v 1.1 1999/11/02 03:54:45 keithp Exp $ * @@ -22,7 +21,6 @@ * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR * PERFORMANCE OF THIS SOFTWARE. */ -/* $XFree86: xc/programs/Xserver/fb/fbwindow.c,v 1.10tsi Exp $ */ #ifdef HAVE_DIX_CONFIG_H #include @@ -120,6 +118,9 @@ fbCopyWindowProc (DrawablePtr pSrcDrawable, upsidedown); pbox++; } + + fbFinishAccess (pDstDrawable); + fbFinishAccess (pSrcDrawable); } void @@ -251,6 +252,8 @@ fbFillRegionSolid (DrawablePtr pDrawable, fbValidateDrawable (pDrawable); pbox++; } + + fbFinishAccess (pDrawable); } #ifdef PANORAMIX @@ -313,6 +316,9 @@ fbFillRegionTiled (DrawablePtr pDrawable, yRot - (pbox->y1 + dstYoff)); pbox++; } + + fbFinishAccess (&pTile->drawable); + fbFinishAccess (pDrawable); } void diff --git a/fb/wfbrename.h b/fb/wfbrename.h new file mode 100644 index 000000000..8f875c88b --- /dev/null +++ b/fb/wfbrename.h @@ -0,0 +1,198 @@ +#define fb16Lane wfb16Lane +#define fb24_32CopyMtoN wfb24_32CopyMtoN +#define fb24_32CreateScreenResources wfb24_32CreateScreenResources +#define fb24_32GetImage wfb24_32GetImage +#define fb24_32GetSpans wfb24_32GetSpans +#define fb24_32ModifyPixmapHeader wfb24_32ModifyPixmapHeader +#define fb24_32PutZImage wfb24_32PutZImage +#define fb24_32ReformatTile wfb24_32ReformatTile +#define fb24_32SetSpans wfb24_32SetSpans +#define fb32Lane wfb32Lane +#define fb8Lane wfb8Lane +#define fbAddTraps wfbAddTraps +#define fbAddTriangles wfbAddTriangles +#define fbAllocatePrivates wfbAllocatePrivates +#define fbArc16 wfbArc16 +#define fbArc24 wfbArc24 +#define fbArc32 wfbArc32 +#define fbArc8 wfbArc8 +#define fbBlt wfbBlt +#define fbBlt24 wfbBlt24 +#define fbBltOne wfbBltOne +#define fbBltOne24 wfbBltOne24 +#define fbBltPlane wfbBltPlane +#define fbBltStip wfbBltStip +#define fbBres wfbBres +#define fbBresDash wfbBresDash +#define fbBresDash16 wfbBresDash16 +#define fbBresDash24 wfbBresDash24 +#define fbBresDash32 wfbBresDash32 +#define fbBresDash8 wfbBresDash8 +#define fbBresFill wfbBresFill +#define fbBresFillDash wfbBresFillDash +#define fbBresSolid wfbBresSolid +#define fbBresSolid16 wfbBresSolid16 +#define fbBresSolid24 wfbBresSolid24 +#define fbBresSolid32 wfbBresSolid32 +#define fbBresSolid8 wfbBresSolid8 +#define fbChangeWindowAttributes wfbChangeWindowAttributes +#define fbClearVisualTypes wfbClearVisualTypes +#define fbCloseScreen wfbCloseScreen +#define fbComposite wfbComposite +#define fbCompositeGeneral wfbCompositeGeneral +#define fbCompositeSolidMask_nx1xn wfbCompositeSolidMask_nx1xn +#define fbCompositeSolidMask_nx8888x0565C wfbCompositeSolidMask_nx8888x0565C +#define fbCompositeSolidMask_nx8888x8888C wfbCompositeSolidMask_nx8888x8888C +#define fbCompositeSolidMask_nx8x0565 wfbCompositeSolidMask_nx8x0565 +#define fbCompositeSolidMask_nx8x0888 wfbCompositeSolidMask_nx8x0888 +#define fbCompositeSolidMask_nx8x8888 wfbCompositeSolidMask_nx8x8888 +#define fbCompositeSrc_0565x0565 wfbCompositeSrc_0565x0565 +#define fbCompositeSrc_8888x0565 wfbCompositeSrc_8888x0565 +#define fbCompositeSrc_8888x0888 wfbCompositeSrc_8888x0888 +#define fbCompositeSrc_8888x8888 wfbCompositeSrc_8888x8888 +#define fbCompositeSrcAdd_1000x1000 wfbCompositeSrcAdd_1000x1000 +#define fbCompositeSrcAdd_8000x8000 wfbCompositeSrcAdd_8000x8000 +#define fbCompositeSrcAdd_8888x8888 wfbCompositeSrcAdd_8888x8888 +#define fbCopy1toN wfbCopy1toN +#define fbCopyArea wfbCopyArea +#define fbCopyNto1 wfbCopyNto1 +#define fbCopyNtoN wfbCopyNtoN +#define fbCopyPlane wfbCopyPlane +#define fbCopyRegion wfbCopyRegion +#define fbCopyWindow wfbCopyWindow +#define fbCopyWindowProc wfbCopyWindowProc +#define fbCreateDefColormap wfbCreateDefColormap +#define fbCreateGC wfbCreateGC +#define fbCreatePixmap wfbCreatePixmap +#define fbCreatePixmapBpp wfbCreatePixmapBpp +#define fbCreateWindow wfbCreateWindow +#define fbDestroyPixmap wfbDestroyPixmap +#define fbDestroyWindow wfbDestroyWindow +#define fbDoCopy wfbDoCopy +#define fbDots wfbDots +#define fbDots16 wfbDots16 +#define fbDots24 wfbDots24 +#define fbDots32 wfbDots32 +#define fbDots8 wfbDots8 +#define fbEvenStipple wfbEvenStipple +#define fbEvenTile wfbEvenTile +#define fbExpandDirectColors wfbExpandDirectColors +#define fbFill wfbFill +#define fbFillRegionSolid wfbFillRegionSolid +#define fbFillRegionTiled wfbFillRegionTiled +#define fbFillSpans wfbFillSpans +#define fbFixCoordModePrevious wfbFixCoordModePrevious +#define fbGCFuncs wfbGCFuncs +#define fbGCOps wfbGCOps +#define fbGCPrivateIndex wfbGCPrivateIndex +#define fbGeneration wfbGeneration +#define fbGetGCPrivateIndex wfbGetGCPrivateIndex +#define fbGetImage wfbGetImage +#define fbGetScreenPrivateIndex wfbGetScreenPrivateIndex +#define fbGetSpans wfbGetSpans +#define _fbGetWindowPixmap _wfbGetWindowPixmap +#define fbGetWinPrivateIndex wfbGetWinPrivateIndex +#define fbGlyph16 wfbGlyph16 +#define fbGlyph24 wfbGlyph24 +#define fbGlyph32 wfbGlyph32 +#define fbGlyph8 wfbGlyph8 +#define fbGlyphIn wfbGlyphIn +#define fbHasVisualTypes wfbHasVisualTypes +#define fbImageGlyphBlt wfbImageGlyphBlt +#define fbIn wfbIn +#define fbInitializeColormap wfbInitializeColormap +#define fbInitVisuals wfbInitVisuals +#define fbInstallColormap wfbInstallColormap +#define fbLaneTable wfbLaneTable +#define fbListInstalledColormaps wfbListInstalledColormaps +#define fbMapWindow wfbMapWindow +#define FbMergeRopBits wFbMergeRopBits +#define fbOddStipple wfbOddStipple +#define fbOddTile wfbOddTile +#define fbOver wfbOver +#define fbOver24 wfbOver24 +#define fbOverlayCloseScreen wfbOverlayCloseScreen +#define fbOverlayCopyWindow wfbOverlayCopyWindow +#define fbOverlayCreateScreenResources wfbOverlayCreateScreenResources +#define fbOverlayCreateWindow wfbOverlayCreateWindow +#define fbOverlayFinishScreenInit wfbOverlayFinishScreenInit +#define fbOverlayGeneration wfbOverlayGeneration +#define fbOverlayGetScreenPrivateIndex wfbOverlayGetScreenPrivateIndex +#define fbOverlayPaintKey wfbOverlayPaintKey +#define fbOverlayPaintWindow wfbOverlayPaintWindow +#define fbOverlayScreenPrivateIndex wfbOverlayScreenPrivateIndex +#define fbOverlaySetupScreen wfbOverlaySetupScreen +#define fbOverlayUpdateLayerRegion wfbOverlayUpdateLayerRegion +#define fbOverlayWindowExposures wfbOverlayWindowExposures +#define fbOverlayWindowLayer wfbOverlayWindowLayer +#define fbPadPixmap wfbPadPixmap +#define fbPaintWindow wfbPaintWindow +#define fbPictureInit wfbPictureInit +#define fbPixmapToRegion wfbPixmapToRegion +#define fbPolyArc wfbPolyArc +#define fbPolyFillRect wfbPolyFillRect +#define fbPolyGlyphBlt wfbPolyGlyphBlt +#define fbPolyLine wfbPolyLine +#define fbPolyline16 wfbPolyline16 +#define fbPolyline24 wfbPolyline24 +#define fbPolyline32 wfbPolyline32 +#define fbPolyline8 wfbPolyline8 +#define fbPolyPoint wfbPolyPoint +#define fbPolySegment wfbPolySegment +#define fbPolySegment16 wfbPolySegment16 +#define fbPolySegment24 wfbPolySegment24 +#define fbPolySegment32 wfbPolySegment32 +#define fbPolySegment8 wfbPolySegment8 +#define fbPositionWindow wfbPositionWindow +#define fbPushFill wfbPushFill +#define fbPushImage wfbPushImage +#define fbPushPattern wfbPushPattern +#define fbPushPixels wfbPushPixels +#define fbPutImage wfbPutImage +#define fbPutXYImage wfbPutXYImage +#define fbPutZImage wfbPutZImage +#define fbQueryBestSize wfbQueryBestSize +#define fbRasterizeEdges wfbRasterizeEdges +#define fbRasterizeTrapezoid wfbRasterizeTrapezoid +#define fbRealizeFont wfbRealizeFont +#define fbReduceRasterOp wfbReduceRasterOp +#define fbReplicatePixel wfbReplicatePixel +#define fbResolveColor wfbResolveColor +#define fbRestoreAreas wfbRestoreAreas +#define fbSaveAreas wfbSaveAreas +#define fbScreenPrivateIndex wfbScreenPrivateIndex +#define fbSegment wfbSegment +#define fbSelectBres wfbSelectBres +#define fbSetSpans wfbSetSpans +#define fbSetupScreen wfbSetupScreen +#define fbSetVisualTypes wfbSetVisualTypes +#define fbSetVisualTypesAndMasks wfbSetVisualTypesAndMasks +#define _fbSetWindowPixmap _wfbSetWindowPixmap +#define fbSolid wfbSolid +#define fbSolid24 wfbSolid24 +#define fbSolidBoxClipped wfbSolidBoxClipped +#define fbStipple wfbStipple +#define fbStipple1Bits wfbStipple1Bits +#define fbStipple24Bits wfbStipple24Bits +#define fbStipple2Bits wfbStipple2Bits +#define fbStipple4Bits wfbStipple4Bits +#define fbStipple8Bits wfbStipple8Bits +#define fbStippleTable wfbStippleTable +#define fbTile wfbTile +#define fbTransparentSpan wfbTransparentSpan +#define fbUninstallColormap wfbUninstallColormap +#define fbUnmapWindow wfbUnmapWindow +#define fbUnrealizeFont wfbUnrealizeFont +#define fbValidateGC wfbValidateGC +#define fbWinPrivateIndex wfbWinPrivateIndex +#define fbZeroLine wfbZeroLine +#define fbZeroSegment wfbZeroSegment +#define xxScrPrivateIndex wfbxxScrPrivateIndex +#define xxGCPrivateIndex wfbxxGCPrivateIndex +#define xxColormapPrivateIndex wfbxxColormapPrivateIndex +#define xxGeneration wfbxxGeneration +#define xxPrintVisuals wfbxxPrintVisuals +#define xxGCFuncs wfbxxGCFuncs +#define xxGCOps wfbxxGCOps +#define xxSetup wfbxxSetup +#define composeFunctions wfbComposeFunctions diff --git a/hw/Makefile.am b/hw/Makefile.am index 4c35a5817..d00d6fb3f 100644 --- a/hw/Makefile.am +++ b/hw/Makefile.am @@ -26,6 +26,10 @@ if KDRIVE KDRIVE_SUBDIRS = kdrive endif +if XPRINT +XPRINT_SUBDIRS = xprint +endif + # need to add darwin support here SUBDIRS = \ @@ -35,9 +39,10 @@ SUBDIRS = \ $(XVFB_SUBDIRS) \ $(XNEST_SUBDIRS) \ $(DMX_SUBDIRS) \ - $(KDRIVE_SUBDIRS) + $(KDRIVE_SUBDIRS) \ + $(XPRINT_SUBDIRS) -DIST_SUBDIRS = dmx xfree86 vfb xnest xwin darwin kdrive xgl +DIST_SUBDIRS = dmx xfree86 vfb xnest xwin darwin kdrive xgl xprint relink: for i in $(SUBDIRS) ; do $(MAKE) -C $$i relink ; done diff --git a/hw/darwin/Makefile.am b/hw/darwin/Makefile.am index 8a5e981fe..542bfdb24 100644 --- a/hw/darwin/Makefile.am +++ b/hw/darwin/Makefile.am @@ -54,7 +54,6 @@ EXTRA_DIST = \ darwinKeyboard.c \ darwinKeyboard.h \ darwinXinput.c \ - iokit/.cvsignore \ iokit/xfIOKit.c \ iokit/xfIOKitCursor.c \ iokit/xfIOKit.h \ @@ -66,11 +65,8 @@ EXTRA_DIST = \ quartz/cr/crFrame.m \ quartz/cr/cr.h \ quartz/cr/crScreen.m \ - quartz/cr/.cvsignore \ quartz/cr/XView.h \ quartz/cr/XView.m \ - quartz/.cvsignore \ - quartz/fullscreen/.cvsignore \ quartz/fullscreen/fullscreen.c \ quartz/fullscreen/quartzCursor.c \ quartz/fullscreen/quartzCursor.h \ @@ -98,7 +94,6 @@ EXTRA_DIST = \ quartz/XDarwinStartup.c \ quartz/XDarwinStartup.man \ quartz/xpr/appledri.c \ - quartz/xpr/.cvsignore \ quartz/xpr/dri.c \ quartz/xpr/dri.h \ quartz/xpr/dristruct.h \ diff --git a/hw/darwin/darwin.c b/hw/darwin/darwin.c index 10afbaf78..bd9998976 100644 --- a/hw/darwin/darwin.c +++ b/hw/darwin/darwin.c @@ -29,8 +29,6 @@ * holders shall not be used in advertising or otherwise to promote the sale, * use or other dealings in this Software without prior written authorization. */ -/* $XdotOrg: xserver/xorg/hw/darwin/darwin.c,v 1.8 2005/07/03 08:53:38 daniels Exp $ */ -/* $XFree86: xc/programs/Xserver/hw/darwin/darwin.c,v 1.55 2003/11/15 00:07:09 torrey Exp $ */ #include #include diff --git a/hw/darwin/darwin.h b/hw/darwin/darwin.h index 4f4e9b91f..cd572258c 100644 --- a/hw/darwin/darwin.h +++ b/hw/darwin/darwin.h @@ -23,7 +23,6 @@ * holders shall not be used in advertising or otherwise to promote the sale, * use or other dealings in this Software without prior written authorization. */ -/* $XFree86: xc/programs/Xserver/hw/darwin/darwin.h,v 1.20 2003/11/15 00:07:09 torrey Exp $ */ #ifndef _DARWIN_H #define _DARWIN_H diff --git a/hw/darwin/darwinClut8.h b/hw/darwin/darwinClut8.h index 06e7b71c5..8e914f3fd 100644 --- a/hw/darwin/darwinClut8.h +++ b/hw/darwin/darwinClut8.h @@ -1,7 +1,6 @@ /* * Darwin default 8-bit Colormap for StaticColor */ -/* $XFree86: xc/programs/Xserver/hw/darwin/darwinClut8.h,v 1.1.8.1 2003/03/04 01:31:43 torrey Exp $ */ #ifndef _DARWIN_CLUT8_ #define _DARWIN_CLUT8_ diff --git a/hw/darwin/darwinEvents.c b/hw/darwin/darwinEvents.c index 61100d9b3..6b902df05 100644 --- a/hw/darwin/darwinEvents.c +++ b/hw/darwin/darwinEvents.c @@ -29,7 +29,6 @@ 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. */ -/* $XFree86: xc/programs/Xserver/hw/darwin/darwinEvents.c,v 1.6 2004/03/31 22:29:09 torrey Exp $ */ #define NEED_EVENTS #include diff --git a/hw/darwin/darwinKeyboard.c b/hw/darwin/darwinKeyboard.c index dbc449dc3..1cc49fe8e 100644 --- a/hw/darwin/darwinKeyboard.c +++ b/hw/darwin/darwinKeyboard.c @@ -38,7 +38,6 @@ // //============================================================================= -/* $XFree86: xc/programs/Xserver/hw/darwin/darwinKeyboard.c,v 1.21 2004/04/01 00:05:22 torrey Exp $ */ /* =========================================================================== @@ -1021,7 +1020,7 @@ int DarwinModifierStringToNXKey(const char *str) * This allows the ddx layer to prevent some keys from being remapped * as modifier keys. */ -Bool LegalModifier(unsigned int key, DevicePtr pDev) +Bool LegalModifier(unsigned int key, DeviceIntPtr pDev) { return 1; } diff --git a/hw/darwin/darwinKeyboard.h b/hw/darwin/darwinKeyboard.h index 0ea9c1d60..f4a861186 100644 --- a/hw/darwin/darwinKeyboard.h +++ b/hw/darwin/darwinKeyboard.h @@ -23,7 +23,6 @@ * holders shall not be used in advertising or otherwise to promote the sale, * use or other dealings in this Software without prior written authorization. */ -/* $XFree86: xc/programs/Xserver/hw/darwin/darwinKeyboard.c,v 1.18 2003/05/14 05:27:55 torrey Exp $ */ #ifndef DARWIN_KEYBOARD_H #define DARWIN_KEYBOARD_H 1 diff --git a/hw/darwin/darwinXinput.c b/hw/darwin/darwinXinput.c index d3716a1d4..260d72af7 100644 --- a/hw/darwin/darwinXinput.c +++ b/hw/darwin/darwinXinput.c @@ -1,4 +1,3 @@ -/* $Xorg: stubs.c,v 1.4 2001/02/09 02:04:35 xorgcvs Exp $ */ /* * X server support of the XINPUT extension for Darwin @@ -52,7 +51,6 @@ ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ********************************************************/ -/* $XFree86: xc/programs/Xserver/hw/darwin/darwinXinput.c,v 1.1 2004/05/28 07:44:00 torrey Exp $ */ #define NEED_EVENTS #include diff --git a/hw/darwin/iokit/xfIOKit.c b/hw/darwin/iokit/xfIOKit.c index 7d69382af..95a7fb32c 100644 --- a/hw/darwin/iokit/xfIOKit.c +++ b/hw/darwin/iokit/xfIOKit.c @@ -33,8 +33,6 @@ * holders shall not be used in advertising or otherwise to promote the sale, * use or other dealings in this Software without prior written authorization. */ -/* $XdotOrg: xc/programs/Xserver/hw/darwin/iokit/xfIOKit.c,v 1.4 2005/04/20 12:25:19 daniels Exp $ */ -/* $XFree86: xc/programs/Xserver/hw/darwin/iokit/xfIOKit.c,v 1.2 2003/10/16 23:50:09 torrey Exp $ */ #include #include diff --git a/hw/darwin/iokit/xfIOKit.h b/hw/darwin/iokit/xfIOKit.h index 288063da1..27d27bc70 100644 --- a/hw/darwin/iokit/xfIOKit.h +++ b/hw/darwin/iokit/xfIOKit.h @@ -28,7 +28,6 @@ * holders shall not be used in advertising or otherwise to promote the sale, * use or other dealings in this Software without prior written authorization. */ -/* $XFree86: xc/programs/Xserver/hw/darwin/xfIOKit.h,v 1.10 2003/03/15 18:02:08 torrey Exp $ */ #ifndef _XFIOKIT_H #define _XFIOKIT_H diff --git a/hw/darwin/iokit/xfIOKitCursor.c b/hw/darwin/iokit/xfIOKitCursor.c index 69eb41d2f..ef3e254d7 100644 --- a/hw/darwin/iokit/xfIOKitCursor.c +++ b/hw/darwin/iokit/xfIOKitCursor.c @@ -57,7 +57,6 @@ * holders shall not be used in advertising or otherwise to promote the sale, * use or other dealings in this Software without prior written authorization. */ -/* $XFree86: xc/programs/Xserver/hw/darwin/xfIOKitCursor.c,v 1.6 2002/12/10 00:00:39 torrey Exp $ */ #include "scrnintstr.h" #include "cursorstr.h" diff --git a/hw/darwin/iokit/xfIOKitStartup.c b/hw/darwin/iokit/xfIOKitStartup.c index 09c5daa1c..512793aa5 100644 --- a/hw/darwin/iokit/xfIOKitStartup.c +++ b/hw/darwin/iokit/xfIOKitStartup.c @@ -28,7 +28,6 @@ * holders shall not be used in advertising or otherwise to promote the sale, * use or other dealings in this Software without prior written authorization. */ -/* $XFree86: xc/programs/Xserver/hw/darwin/iokit/xfIOKitStartup.c,v 1.1 2003/05/14 05:27:56 torrey Exp $ */ #include "darwin.h" #include "darwinKeyboard.h" diff --git a/hw/darwin/quartz/Preferences.h b/hw/darwin/quartz/Preferences.h index d8c3c2ea2..cf43758e7 100644 --- a/hw/darwin/quartz/Preferences.h +++ b/hw/darwin/quartz/Preferences.h @@ -25,7 +25,6 @@ * sale, use or other dealings in this Software without prior written * authorization. */ -/* $XFree86: xc/programs/Xserver/hw/darwin/quartz/Preferences.h,v 1.2 2003/01/15 02:34:05 torrey Exp $ */ #import diff --git a/hw/darwin/quartz/XDarwinStartup.c b/hw/darwin/quartz/XDarwinStartup.c index 0adb4c212..8697776bf 100644 --- a/hw/darwin/quartz/XDarwinStartup.c +++ b/hw/darwin/quartz/XDarwinStartup.c @@ -38,7 +38,6 @@ * dealings in this Software without prior written authorization from * Torrey T. Lyons. */ -/* $XFree86: xc/programs/Xserver/hw/darwin/quartz/XDarwinStartup.c,v 1.1 2002/03/28 02:21:18 torrey Exp $ */ #include #include diff --git a/hw/darwin/quartz/XServer.h b/hw/darwin/quartz/XServer.h index 828fce17f..030ccb51f 100644 --- a/hw/darwin/quartz/XServer.h +++ b/hw/darwin/quartz/XServer.h @@ -29,8 +29,6 @@ * sale, use or other dealings in this Software without prior written * authorization. */ -/* $XdotOrg: xc/programs/Xserver/hw/darwin/quartz/XServer.h,v 1.4 2005/04/20 12:25:19 daniels Exp $ */ -/* $XFree86: xc/programs/Xserver/hw/darwin/quartz/XServer.h,v 1.16 2003/11/23 06:04:01 torrey Exp $ */ #define BOOL xBOOL #include diff --git a/hw/darwin/quartz/applewm.c b/hw/darwin/quartz/applewm.c index d79df4cee..224d6c5e0 100644 --- a/hw/darwin/quartz/applewm.c +++ b/hw/darwin/quartz/applewm.c @@ -1,4 +1,3 @@ -/* $XFree86: xc/programs/Xserver/hw/darwin/quartz/applewm.c,v 1.2 2003/09/16 00:36:13 torrey Exp $ */ /************************************************************************** Copyright (c) 2002 Apple Computer, Inc. All Rights Reserved. @@ -269,7 +268,7 @@ ProcAppleWMSelectInput (client) REQUEST_SIZE_MATCH (xAppleWMSelectInputReq); pHead = (WMEventPtr *)SecurityLookupIDByType(client, - eventResource, EventType, SecurityWriteAccess); + eventResource, EventType, DixWriteAccess); if (stuff->mask != 0) { if (pHead) { /* check for existing entry. */ @@ -491,11 +490,9 @@ ProcAppleWMSetWindowLevel( REQUEST_SIZE_MATCH(xAppleWMSetWindowLevelReq); - if (!(pWin = SecurityLookupWindow((Drawable)stuff->window, - client, SecurityReadAccess))) - { + if (Success != dixLookupWindow(&pWin, stuff->window, client, + DixReadAccess)) return BadValue; - } if (stuff->level < 0 || stuff->level >= AppleWMNumWindowLevels) { return BadValue; @@ -603,11 +600,9 @@ ProcAppleWMFrameDraw( REQUEST_AT_LEAST_SIZE(xAppleWMFrameDrawReq); - if (!(pWin = SecurityLookupWindow((Drawable)stuff->window, - client, SecurityReadAccess))) - { + if (Success != dixLookupWindow(&pWin, stuff->window, client, + DixReadAccess)) return BadValue; - } ir = make_box (stuff->ix, stuff->iy, stuff->iw, stuff->ih); or = make_box (stuff->ox, stuff->oy, stuff->ow, stuff->oh); diff --git a/hw/darwin/quartz/applewmExt.h b/hw/darwin/quartz/applewmExt.h index b27083ac7..60d49ef59 100644 --- a/hw/darwin/quartz/applewmExt.h +++ b/hw/darwin/quartz/applewmExt.h @@ -27,7 +27,6 @@ TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. **************************************************************************/ -/* $XFree86: xc/programs/Xserver/hw/darwin/quartz/applewmExt.h,v 1.2 2003/11/11 23:48:41 torrey Exp $ */ #ifndef _APPLEWMEXT_H_ #define _APPLEWMEXT_H_ diff --git a/hw/darwin/quartz/cr/XView.h b/hw/darwin/quartz/cr/XView.h index 01f5b04b4..26f789da2 100644 --- a/hw/darwin/quartz/cr/XView.h +++ b/hw/darwin/quartz/cr/XView.h @@ -25,7 +25,6 @@ * holders shall not be used in advertising or otherwise to promote the sale, * use or other dealings in this Software without prior written authorization. */ -/* $XFree86: xc/programs/Xserver/hw/darwin/quartz/XView.h,v 1.2 2002/07/15 19:58:31 torrey Exp $ */ #import diff --git a/hw/darwin/quartz/fullscreen/fullscreen.c b/hw/darwin/quartz/fullscreen/fullscreen.c index 05542eafe..a4881f9d9 100644 --- a/hw/darwin/quartz/fullscreen/fullscreen.c +++ b/hw/darwin/quartz/fullscreen/fullscreen.c @@ -25,8 +25,6 @@ * holders shall not be used in advertising or otherwise to promote the sale, * use or other dealings in this Software without prior written authorization. */ -/* $XdotOrg: xc/programs/Xserver/hw/darwin/quartz/fullscreen/fullscreen.c,v 1.3 2004/07/30 19:12:18 torrey Exp $ */ -/* $XFree86: xc/programs/Xserver/hw/darwin/quartz/fullscreen/fullscreen.c,v 1.3 2003/11/27 01:59:53 torrey Exp $ */ #include "quartzCommon.h" #include "darwin.h" diff --git a/hw/darwin/quartz/fullscreen/quartzCursor.c b/hw/darwin/quartz/fullscreen/quartzCursor.c index 8abce2318..e2333e2ea 100644 --- a/hw/darwin/quartz/fullscreen/quartzCursor.c +++ b/hw/darwin/quartz/fullscreen/quartzCursor.c @@ -29,7 +29,6 @@ * holders shall not be used in advertising or otherwise to promote the sale, * use or other dealings in this Software without prior written authorization. */ -/* $XFree86: xc/programs/Xserver/hw/darwin/quartz/quartzCursor.c,v 1.5 2003/01/23 00:34:26 torrey Exp $ */ #include "quartzCommon.h" #include "quartzCursor.h" diff --git a/hw/darwin/quartz/fullscreen/quartzCursor.h b/hw/darwin/quartz/fullscreen/quartzCursor.h index efcc4435e..57fac68a5 100644 --- a/hw/darwin/quartz/fullscreen/quartzCursor.h +++ b/hw/darwin/quartz/fullscreen/quartzCursor.h @@ -29,7 +29,6 @@ * holders shall not be used in advertising or otherwise to promote the sale, * use or other dealings in this Software without prior written authorization. */ -/* $XFree86: xc/programs/Xserver/hw/darwin/quartz/quartzCursor.h,v 1.1 2002/03/28 02:21:19 torrey Exp $ */ #ifndef QUARTZCURSOR_H #define QUARTZCURSOR_H diff --git a/hw/darwin/quartz/pseudoramiX.c b/hw/darwin/quartz/pseudoramiX.c index 71093f5fb..a003daf43 100644 --- a/hw/darwin/quartz/pseudoramiX.c +++ b/hw/darwin/quartz/pseudoramiX.c @@ -32,7 +32,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/hw/darwin/quartz/pseudoramiX.c,v 1.4 2004/07/02 01:30:33 torrey Exp $ */ #include "pseudoramiX.h" @@ -171,12 +170,13 @@ static int ProcPseudoramiXGetState(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; @@ -197,12 +197,13 @@ static int ProcPseudoramiXGetScreenCount(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; @@ -223,12 +224,13 @@ static int ProcPseudoramiXGetScreenSize(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; diff --git a/hw/darwin/quartz/pseudoramiX.h b/hw/darwin/quartz/pseudoramiX.h index c2943369d..df5010d1d 100644 --- a/hw/darwin/quartz/pseudoramiX.h +++ b/hw/darwin/quartz/pseudoramiX.h @@ -1,7 +1,6 @@ /* * Minimal implementation of PanoramiX/Xinerama */ -/* $XFree86: xc/programs/Xserver/hw/darwin/quartz/pseudoramiX.h,v 1.3 2004/07/02 01:30:33 torrey Exp $ */ extern int noPseudoramiXExtension; diff --git a/hw/darwin/quartz/quartz.c b/hw/darwin/quartz/quartz.c index 22151198a..36a8bea08 100644 --- a/hw/darwin/quartz/quartz.c +++ b/hw/darwin/quartz/quartz.c @@ -1,4 +1,3 @@ -/* $XdotOrg: xc/programs/Xserver/hw/darwin/quartz/quartz.c,v 1.3 2004/07/30 19:12:17 torrey Exp $ */ /************************************************************** * * Quartz-specific support for the Darwin X Server @@ -30,7 +29,6 @@ * holders shall not be used in advertising or otherwise to promote the sale, * use or other dealings in this Software without prior written authorization. */ -/* $XFree86: xc/programs/Xserver/hw/darwin/quartz/quartz.c,v 1.16 2004/07/02 01:30:33 torrey Exp $ */ #include "quartzCommon.h" #include "quartz.h" diff --git a/hw/darwin/quartz/quartz.h b/hw/darwin/quartz/quartz.h index cee43325d..f1b36b6b1 100644 --- a/hw/darwin/quartz/quartz.h +++ b/hw/darwin/quartz/quartz.h @@ -30,8 +30,6 @@ * holders shall not be used in advertising or otherwise to promote the sale, * use or other dealings in this Software without prior written authorization. */ -/* $XdotOrg: xc/programs/Xserver/hw/darwin/quartz/quartz.h,v 1.3 2004/07/30 19:12:17 torrey Exp $ */ -/* $XFree86: xc/programs/Xserver/hw/darwin/quartz/quartz.h,v 1.7 2003/11/12 20:21:51 torrey Exp $ */ #ifndef _QUARTZ_H #define _QUARTZ_H diff --git a/hw/darwin/quartz/quartzAudio.c b/hw/darwin/quartz/quartzAudio.c index 2106dfad4..b477b037b 100644 --- a/hw/darwin/quartz/quartzAudio.c +++ b/hw/darwin/quartz/quartzAudio.c @@ -35,7 +35,6 @@ * holders shall not be used in advertising or otherwise to promote the sale, * use or other dealings in this Software without prior written authorization. */ -/* $XFree86: xc/programs/Xserver/hw/darwin/quartz/quartzAudio.c,v 1.1 2002/03/28 02:21:18 torrey Exp $ */ #include "quartzCommon.h" #include "quartzAudio.h" diff --git a/hw/darwin/quartz/quartzAudio.h b/hw/darwin/quartz/quartzAudio.h index e20c21ad2..c406bbc2a 100644 --- a/hw/darwin/quartz/quartzAudio.h +++ b/hw/darwin/quartz/quartzAudio.h @@ -28,7 +28,6 @@ * holders shall not be used in advertising or otherwise to promote the sale, * use or other dealings in this Software without prior written authorization. */ -/* $XFree86: xc/programs/Xserver/hw/darwin/bundle/quartzAudio.h,v 1.2 2001/04/01 20:45:43 tsi Exp $ */ #ifndef _QUARTZAUDIO_H #define _QUARTZAUDIO_H diff --git a/hw/darwin/quartz/quartzCommon.h b/hw/darwin/quartz/quartzCommon.h index 949f724c1..f5dff662c 100644 --- a/hw/darwin/quartz/quartzCommon.h +++ b/hw/darwin/quartz/quartzCommon.h @@ -1,4 +1,3 @@ -/* $XdotOrg: xc/programs/Xserver/hw/darwin/quartz/quartzCommon.h,v 1.3 2004/07/30 19:12:17 torrey Exp $ */ /* * quartzCommon.h * @@ -32,7 +31,6 @@ * holders shall not be used in advertising or otherwise to promote the sale, * use or other dealings in this Software without prior written authorization. */ -/* $XFree86: xc/programs/Xserver/hw/darwin/quartz/quartzCommon.h,v 1.15 2004/06/08 22:58:10 torrey Exp $ */ #ifndef _QUARTZCOMMON_H #define _QUARTZCOMMON_H diff --git a/hw/darwin/quartz/quartzCursor.c b/hw/darwin/quartz/quartzCursor.c index 711ce64f0..e2333e2ea 100644 --- a/hw/darwin/quartz/quartzCursor.c +++ b/hw/darwin/quartz/quartzCursor.c @@ -29,7 +29,6 @@ * holders shall not be used in advertising or otherwise to promote the sale, * use or other dealings in this Software without prior written authorization. */ -/* $XFree86: xc/programs/Xserver/hw/darwin/quartz/quartzCursor.c,v 1.4 2002/11/19 23:01:30 torrey Exp $ */ #include "quartzCommon.h" #include "quartzCursor.h" diff --git a/hw/darwin/quartz/quartzCursor.h b/hw/darwin/quartz/quartzCursor.h index 4db5531fa..56cc94d49 100644 --- a/hw/darwin/quartz/quartzCursor.h +++ b/hw/darwin/quartz/quartzCursor.h @@ -29,7 +29,6 @@ * holders shall not be used in advertising or otherwise to promote the sale, * use or other dealings in this Software without prior written authorization. */ -/* $XFree86: xc/programs/Xserver/hw/darwin/bundle/quartzCursor.h,v 1.2 2001/09/23 04:04:49 torrey Exp $ */ #ifndef QUARTZCURSOR_H #define QUARTZCURSOR_H diff --git a/hw/darwin/quartz/quartzKeyboard.c b/hw/darwin/quartz/quartzKeyboard.c index d2fe922d3..fc12522be 100644 --- a/hw/darwin/quartz/quartzKeyboard.c +++ b/hw/darwin/quartz/quartzKeyboard.c @@ -32,7 +32,6 @@ promote the sale, use or other dealings in this Software without prior written authorization. */ -/* $XFree86: xc/programs/Xserver/hw/darwin/quartz/quartzKeyboard.c,v 1.1 2003/11/01 08:13:08 torrey Exp $ */ #include "quartzCommon.h" diff --git a/hw/darwin/quartz/quartzPasteboard.c b/hw/darwin/quartz/quartzPasteboard.c index 536dcc336..e92fe5c79 100644 --- a/hw/darwin/quartz/quartzPasteboard.c +++ b/hw/darwin/quartz/quartzPasteboard.c @@ -29,7 +29,6 @@ * holders shall not be used in advertising or otherwise to promote the sale, * use or other dealings in this Software without prior written authorization. */ -/* $XFree86: xc/programs/Xserver/hw/darwin/bundle/quartzPasteboard.c,v 1.3 2001/09/23 04:04:49 torrey Exp $ */ #include "quartzPasteboard.h" diff --git a/hw/darwin/quartz/quartzPasteboard.h b/hw/darwin/quartz/quartzPasteboard.h index 296c52c17..afcb6e587 100644 --- a/hw/darwin/quartz/quartzPasteboard.h +++ b/hw/darwin/quartz/quartzPasteboard.h @@ -29,7 +29,6 @@ * holders shall not be used in advertising or otherwise to promote the sale, * use or other dealings in this Software without prior written authorization. */ -/* $XFree86: xc/programs/Xserver/hw/darwin/bundle/quartzPasteboard.h,v 1.1 2001/03/15 22:24:27 torrey Exp $ */ #ifndef _QUARTZPASTEBOARD_H #define _QUARTZPASTEBOARD_H @@ -42,4 +41,4 @@ char * QuartzReadCocoaPasteboard(void); // caller must free string void QuartzWritePasteboard(); void QuartzWriteCocoaPasteboard(char *text); -#endif /* _QUARTZPASTEBOARD_H */ \ No newline at end of file +#endif /* _QUARTZPASTEBOARD_H */ diff --git a/hw/darwin/quartz/quartzStartup.c b/hw/darwin/quartz/quartzStartup.c index cd58701b1..277e5935f 100644 --- a/hw/darwin/quartz/quartzStartup.c +++ b/hw/darwin/quartz/quartzStartup.c @@ -28,7 +28,6 @@ * holders shall not be used in advertising or otherwise to promote the sale, * use or other dealings in this Software without prior written authorization. */ -/* $XFree86: xc/programs/Xserver/hw/darwin/quartz/quartzStartup.c,v 1.8 2003/11/05 00:15:00 torrey Exp $ */ #include #include @@ -288,4 +287,4 @@ int DarwinModeProcessArgument( int argc, char *argv[], int i ) } return 0; -} \ No newline at end of file +} diff --git a/hw/darwin/quartz/xpr/Xplugin.h b/hw/darwin/quartz/xpr/Xplugin.h index e2e97b4c8..fb6842c87 100644 --- a/hw/darwin/quartz/xpr/Xplugin.h +++ b/hw/darwin/quartz/xpr/Xplugin.h @@ -30,7 +30,6 @@ Note that these interfaces are provided solely for the use of the X11 server. Any other uses are unsupported and strongly discouraged. */ -/* $XFree86: xc/programs/Xserver/hw/darwin/quartz/xpr/Xplugin.h,v 1.2 2003/05/02 00:08:49 torrey Exp $ */ #ifndef XPLUGIN_H #define XPLUGIN_H 1 diff --git a/hw/darwin/quartz/xpr/appledri.c b/hw/darwin/quartz/xpr/appledri.c index d4cd27b8f..dd688cae3 100644 --- a/hw/darwin/quartz/xpr/appledri.c +++ b/hw/darwin/quartz/xpr/appledri.c @@ -1,4 +1,3 @@ -/* $XFree86: xc/programs/Xserver/GL/dri/xf86dri.c,v 1.10 2000/12/07 20:26:14 dawes Exp $ */ /************************************************************************** Copyright 1998-1999 Precision Insight, Inc., Cedar Park, Texas. @@ -214,6 +213,7 @@ ProcAppleDRICreateSurface( DrawablePtr pDrawable; xp_surface_id sid; unsigned int key[2]; + int rc; REQUEST(xAppleDRICreateSurfaceReq); REQUEST_SIZE_MATCH(xAppleDRICreateSurfaceReq); @@ -221,12 +221,10 @@ ProcAppleDRICreateSurface( rep.length = 0; rep.sequenceNumber = client->sequence; - if (!(pDrawable = (DrawablePtr)SecurityLookupDrawable( - (Drawable)stuff->drawable, - client, - SecurityReadAccess))) { - return BadValue; - } + rc = dixLookupDrawable(&pDrawable, stuff->drawable, client, 0, + DixReadAccess); + if (rc != Success) + return rc; rep.key_0 = rep.key_1 = rep.uid = 0; @@ -253,13 +251,12 @@ ProcAppleDRIDestroySurface( REQUEST(xAppleDRIDestroySurfaceReq); DrawablePtr pDrawable; REQUEST_SIZE_MATCH(xAppleDRIDestroySurfaceReq); + int rc; - if (!(pDrawable = (DrawablePtr)SecurityLookupDrawable( - (Drawable)stuff->drawable, - client, - SecurityReadAccess))) { - return BadValue; - } + rc = dixLookupDrawable(&pDrawable, stuff->drawable, client, 0, + DixReadAccess); + if (rc != Success) + return rc; if (!DRIDestroySurface( screenInfo.screens[stuff->screen], (Drawable)stuff->drawable, diff --git a/hw/darwin/quartz/xpr/dri.c b/hw/darwin/quartz/xpr/dri.c index e8e49f965..9aeaaa588 100644 --- a/hw/darwin/quartz/xpr/dri.c +++ b/hw/darwin/quartz/xpr/dri.c @@ -1,4 +1,3 @@ -/* $XFree86: xc/programs/Xserver/GL/dri/dri.c,v 1.34 2001/12/10 19:07:19 dawes Exp $ */ /************************************************************************** Copyright 1998-1999 Precision Insight, Inc., Cedar Park, Texas. @@ -35,13 +34,8 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * */ -#ifdef XFree86LOADER -#include "xf86.h" -#include "xf86_ansic.h" -#else #include #include -#endif #define NEED_REPLIES #define NEED_EVENTS diff --git a/hw/darwin/quartz/xpr/dri.h b/hw/darwin/quartz/xpr/dri.h index f826167f6..cf2638a9f 100644 --- a/hw/darwin/quartz/xpr/dri.h +++ b/hw/darwin/quartz/xpr/dri.h @@ -1,4 +1,3 @@ -/* $XFree86: xc/programs/Xserver/GL/dri/dri.h,v 1.18 2001/03/21 16:21:40 dawes Exp $ */ /************************************************************************** Copyright 1998-1999 Precision Insight, Inc., Cedar Park, Texas. diff --git a/hw/darwin/quartz/xpr/dristruct.h b/hw/darwin/quartz/xpr/dristruct.h index 0df8f1890..9a3d01c9b 100644 --- a/hw/darwin/quartz/xpr/dristruct.h +++ b/hw/darwin/quartz/xpr/dristruct.h @@ -1,4 +1,3 @@ -/* $XFree86: xc/programs/Xserver/GL/dri/dristruct.h,v 1.10 2001/03/21 16:21:40 dawes Exp $ */ /************************************************************************** Copyright 1998-1999 Precision Insight, Inc., Cedar Park, Texas. diff --git a/hw/darwin/quartz/xpr/x-hash.c b/hw/darwin/quartz/xpr/x-hash.c index feffb1b9e..a7024b2da 100644 --- a/hw/darwin/quartz/xpr/x-hash.c +++ b/hw/darwin/quartz/xpr/x-hash.c @@ -27,7 +27,6 @@ copyright holders shall not be used in advertising or otherwise to promote the sale, use or other dealings in this Software without prior written authorization. */ -/* $XFree86: xc/programs/Xserver/hw/darwin/quartz/xpr/x-hash.c,v 1.1 2003/04/30 23:15:42 torrey Exp $ */ #include "x-hash.h" #include "x-list.h" diff --git a/hw/darwin/quartz/xpr/x-hash.h b/hw/darwin/quartz/xpr/x-hash.h index 97d4cc40c..5d4f7f93a 100644 --- a/hw/darwin/quartz/xpr/x-hash.h +++ b/hw/darwin/quartz/xpr/x-hash.h @@ -27,7 +27,6 @@ copyright holders shall not be used in advertising or otherwise to promote the sale, use or other dealings in this Software without prior written authorization. */ -/* $XFree86: xc/programs/Xserver/hw/darwin/quartz/xpr/x-hash.h,v 1.1 2003/04/30 23:15:42 torrey Exp $ */ #ifndef X_HASH_H #define X_HASH_H 1 diff --git a/hw/darwin/quartz/xpr/x-list.c b/hw/darwin/quartz/xpr/x-list.c index c2f1db161..b9f23928b 100644 --- a/hw/darwin/quartz/xpr/x-list.c +++ b/hw/darwin/quartz/xpr/x-list.c @@ -27,7 +27,6 @@ copyright holders shall not be used in advertising or otherwise to promote the sale, use or other dealings in this Software without prior written authorization. */ -/* $XFree86: xc/programs/Xserver/hw/darwin/quartz/xpr/x-list.c,v 1.1 2003/04/30 23:15:42 torrey Exp $ */ #include "x-list.h" #include diff --git a/hw/darwin/quartz/xpr/x-list.h b/hw/darwin/quartz/xpr/x-list.h index 3faed5330..bd55a53d0 100644 --- a/hw/darwin/quartz/xpr/x-list.h +++ b/hw/darwin/quartz/xpr/x-list.h @@ -27,7 +27,6 @@ copyright holders shall not be used in advertising or otherwise to promote the sale, use or other dealings in this Software without prior written authorization. */ -/* $XFree86: xc/programs/Xserver/hw/darwin/quartz/xpr/x-list.h,v 1.1 2003/04/30 23:15:42 torrey Exp $ */ #ifndef X_LIST_H #define X_LIST_H 1 diff --git a/hw/darwin/quartz/xpr/xpr.h b/hw/darwin/quartz/xpr/xpr.h index 5b881c725..73a88c03d 100644 --- a/hw/darwin/quartz/xpr/xpr.h +++ b/hw/darwin/quartz/xpr/xpr.h @@ -26,8 +26,6 @@ * holders shall not be used in advertising or otherwise to promote the sale, * use or other dealings in this Software without prior written authorization. */ -/* $XdotOrg: xc/programs/Xserver/hw/darwin/quartz/xpr/xpr.h,v 1.2 2004/04/23 19:16:52 eich Exp $ */ -/* $XFree86: xc/programs/Xserver/hw/darwin/quartz/xpr/xpr.h,v 1.4 2003/11/12 20:21:52 torrey Exp $ */ #ifndef XPR_H #define XPR_H diff --git a/hw/darwin/quartz/xpr/xprAppleWM.c b/hw/darwin/quartz/xpr/xprAppleWM.c index 2db6a2432..21746f6e9 100644 --- a/hw/darwin/quartz/xpr/xprAppleWM.c +++ b/hw/darwin/quartz/xpr/xprAppleWM.c @@ -27,7 +27,6 @@ * holders shall not be used in advertising or otherwise to promote the sale, * use or other dealings in this Software without prior written authorization. */ -/* $XFree86: xc/programs/Xserver/hw/darwin/quartz/xpr/xprFrame.c,v 1.2 2003/06/30 01:45:13 torrey Exp $ */ #include "xpr.h" #include "applewmExt.h" diff --git a/hw/darwin/quartz/xpr/xprCursor.c b/hw/darwin/quartz/xpr/xprCursor.c index ee06043df..cb949dadc 100644 --- a/hw/darwin/quartz/xpr/xprCursor.c +++ b/hw/darwin/quartz/xpr/xprCursor.c @@ -30,7 +30,6 @@ * holders shall not be used in advertising or otherwise to promote the sale, * use or other dealings in this Software without prior written authorization. */ -/* $XFree86: xc/programs/Xserver/hw/darwin/quartz/xpr/xprCursor.c,v 1.1 2003/04/30 23:15:42 torrey Exp $ */ #include "quartzCommon.h" #include "xpr.h" diff --git a/hw/darwin/quartz/xpr/xprFrame.c b/hw/darwin/quartz/xpr/xprFrame.c index 0dff7c56d..ed02d4b62 100644 --- a/hw/darwin/quartz/xpr/xprFrame.c +++ b/hw/darwin/quartz/xpr/xprFrame.c @@ -27,8 +27,6 @@ * holders shall not be used in advertising or otherwise to promote the sale, * use or other dealings in this Software without prior written authorization. */ -/* $XdotOrg: xc/programs/Xserver/hw/darwin/quartz/xpr/xprFrame.c,v 1.4 2005/04/20 12:25:20 daniels Exp $ */ -/* $XFree86: xc/programs/Xserver/hw/darwin/quartz/xpr/xprFrame.c,v 1.4 2003/11/12 20:21:52 torrey Exp $ */ #include "xpr.h" #include "rootlessCommon.h" diff --git a/hw/darwin/quartz/xpr/xprScreen.c b/hw/darwin/quartz/xpr/xprScreen.c index eaad13f7b..1755ca6f7 100644 --- a/hw/darwin/quartz/xpr/xprScreen.c +++ b/hw/darwin/quartz/xpr/xprScreen.c @@ -1,4 +1,3 @@ -/* $XdotOrg: xc/programs/Xserver/hw/darwin/quartz/xpr/xprScreen.c,v 1.5 2004/09/18 00:38:30 torrey Exp $ */ /* * Xplugin rootless implementation screen functions */ @@ -28,7 +27,6 @@ * holders shall not be used in advertising or otherwise to promote the sale, * use or other dealings in this Software without prior written authorization. */ -/* $XFree86: xc/programs/Xserver/hw/darwin/quartz/xpr/xprScreen.c,v 1.11 2004/07/15 18:53:25 torrey Exp $ */ #include "quartzCommon.h" #include "quartz.h" diff --git a/hw/darwin/utils/dumpkeymap.c b/hw/darwin/utils/dumpkeymap.c index 8f3340b15..d2eeca5c2 100644 --- a/hw/darwin/utils/dumpkeymap.c +++ b/hw/darwin/utils/dumpkeymap.c @@ -1,4 +1,3 @@ -// $XFree86: dumpkeymap.c,v 1.3 2000/12/05 21:18:34 dawes Exp $ //============================================================================= // // Copyright (C) 1999,2000 by Eric Sunshine diff --git a/hw/dmx/Makefile.am b/hw/dmx/Makefile.am index 93abd7a0e..89136b904 100644 --- a/hw/dmx/Makefile.am +++ b/hw/dmx/Makefile.am @@ -16,6 +16,9 @@ GLX_INCS = -I$(top_srcdir)/hw/xfree86/dixmods/extmod \ GLX_DEFS = @GL_CFLAGS@ endif +# It's essential that fbcmap.c be compiled with this flag for DMX to work!! +DMX_CFLAGS = -DXFree86Server=1 + if BUILDDOCS SUBDIRS += doc endif @@ -81,10 +84,12 @@ Xdmx_LDADD = $(XORG_CORE_LIBS) \ config/libdmxconfig.a \ @DMXMODULES_LIBS@ -Xdmx_CFLAGS = @SERVER_DEFINES@ \ +Xdmx_CFLAGS = \ -DHAVE_DMX_CONFIG_H \ + $(DIX_CFLAGS) \ $(GLX_INCS) \ $(GLX_DEFS) \ + $(DMX_CFLAGS) \ @DMXMODULES_CFLAGS@ # Man page diff --git a/hw/dmx/config/Makefile.am b/hw/dmx/config/Makefile.am index 7376ec23a..c31e04942 100644 --- a/hw/dmx/config/Makefile.am +++ b/hw/dmx/config/Makefile.am @@ -27,7 +27,7 @@ endif AM_YFLAGS = -d AM_CFLAGS = \ - @SERVER_DEFINES@ \ + $(DIX_CFLAGS) \ -I$(top_srcdir)/hw/dmx \ $(GLX_INCS) \ -DHAVE_DMX_CONFIG_H \ diff --git a/hw/dmx/dmx-config.h b/hw/dmx/dmx-config.h index 11e8fb8e5..9647448dc 100644 --- a/hw/dmx/dmx-config.h +++ b/hw/dmx/dmx-config.h @@ -93,6 +93,5 @@ #undef DAMAGE #undef COMPOSITE #undef FONTCACHE -#undef XFree86LOADER #endif /* DMX_CONFIG_H */ diff --git a/hw/dmx/dmx.c b/hw/dmx/dmx.c index 75623e696..b7c81ee57 100644 --- a/hw/dmx/dmx.c +++ b/hw/dmx/dmx.c @@ -282,12 +282,12 @@ static int ProcDMXForceWindowCreation(ClientPtr client) int i; if (!(win = SecurityLookupIDByType(client, stuff->window, XRT_WINDOW, - SecurityReadAccess))) + DixReadAccess))) return -1; /* BadWindow */ FOR_NSCREENS(i) { - if (!(pWin = SecurityLookupWindow(win->info[i].id, client, - SecurityReadAccess))) + if (Success != dixLookupWindow(&pWin, win->info[i].id, client, + DixReadAccess)) return -1; /* BadWindow */ dmxForceWindowCreation(pWin); @@ -296,8 +296,8 @@ static int ProcDMXForceWindowCreation(ClientPtr client) } #endif - if (!(pWin = SecurityLookupWindow(stuff->window, client, - SecurityReadAccess))) + if (Success != dixLookupWindow(&pWin, stuff->window, client, + DixReadAccess)) return -1; /* BadWindow */ dmxForceWindowCreation(pWin); @@ -556,12 +556,12 @@ static int dmxPopulatePanoramiX(ClientPtr client, Window window, DMXWindowAttributesRec attr; if (!(win = SecurityLookupIDByType(client, window, XRT_WINDOW, - SecurityReadAccess))) + DixReadAccess))) return -1; /* BadWindow */ FOR_NSCREENS(i) { - if (!(pWin = SecurityLookupWindow(win->info[i].id, client, - SecurityReadAccess))) + if (Success != dixLookupWindow(&pWin, win->info[i].id, client, + DixReadAccess)) return -1; /* BadWindow */ if (dmxGetWindowAttributes(pWin, &attr)) { screens[count] = attr.screen; @@ -587,7 +587,7 @@ static int dmxPopulate(ClientPtr client, Window window, CARD32 *screens, pos, vis); #endif - if (!(pWin = SecurityLookupWindow(window, client, SecurityReadAccess))) + if (Success != dixLookupWindow(&pWin, window, client, DixReadAccess)) return -1; /* BadWindow */ dmxGetWindowAttributes(pWin, &attr); diff --git a/hw/dmx/dmx.h b/hw/dmx/dmx.h index 18e75de90..becb2da38 100644 --- a/hw/dmx/dmx.h +++ b/hw/dmx/dmx.h @@ -51,6 +51,10 @@ #ifndef DMX_H #define DMX_H +#if HAVE_DMX_CONFIG_H +#include +#endif + #include "gcstruct.h" /* Handle client-side include files in one place. */ diff --git a/hw/dmx/dmxcmap.c b/hw/dmx/dmxcmap.c index f46dc5411..9a9781f53 100644 --- a/hw/dmx/dmxcmap.c +++ b/hw/dmx/dmxcmap.c @@ -40,13 +40,14 @@ #endif #include "dmx.h" +#include "dmxlog.h" #include "dmxsync.h" #include "dmxcmap.h" #include "dmxvisual.h" #include "micmap.h" -static int dmxInitColormapPrivateFunc(ColormapPtr pColormap) +static int dmxInitColormapPrivateFunc(ColormapPtr pColormap, int index) { return TRUE; } @@ -83,12 +84,18 @@ Bool dmxBECreateColormap(ColormapPtr pColormap) VisualPtr pVisual = pColormap->pVisual; Visual *visual = dmxLookupVisual(pScreen, pVisual); - pCmapPriv->cmap = XCreateColormap(dmxScreen->beDisplay, - dmxScreen->scrnWin, - visual, - (pVisual->class & DynamicClass ? - AllocAll : AllocNone)); - return (pCmapPriv->cmap != 0); + if (visual) { + pCmapPriv->cmap = XCreateColormap(dmxScreen->beDisplay, + dmxScreen->scrnWin, + visual, + (pVisual->class & DynamicClass ? + AllocAll : AllocNone)); + return (pCmapPriv->cmap != 0); + } + else { + dmxLog(dmxWarning, "dmxBECreateColormap: No visual found\n"); + return 0; + } } /** Create colormap on back-end server associated with \a pColormap's diff --git a/hw/dmx/dmxcursor.c b/hw/dmx/dmxcursor.c index a49fc9f43..e74a05215 100644 --- a/hw/dmx/dmxcursor.c +++ b/hw/dmx/dmxcursor.c @@ -664,8 +664,8 @@ static Bool _dmxUnrealizeCursor(ScreenPtr pScreen, CursorPtr pCursor) { DMXScreenInfo *dmxScreen = &dmxScreens[pScreen->myNum]; - DMXDBG3("_dmxUnrealizeCursor(%d,%p) %p\n", - pScreen->myNum, pCursor, pCursorPriv); + DMXDBG2("_dmxUnrealizeCursor(%d,%p)\n", + pScreen->myNum, pCursor); if (dmxScreen->beDisplay) { if (dmxBEFreeCursor(pScreen, pCursor)) diff --git a/hw/dmx/dmxextension.c b/hw/dmx/dmxextension.c index 24f796954..c12973bd5 100644 --- a/hw/dmx/dmxextension.c +++ b/hw/dmx/dmxextension.c @@ -374,9 +374,6 @@ void dmxUpdateScreenResources(ScreenPtr pScreen, int x, int y, int w, int h) #ifdef PANORAMIX #include "panoramiXsrv.h" -/* Defined in dix/events.c */ -extern void ReinitializeRootWindow(WindowPtr win, int xoff, int yoff); - /** Change the "screen" window attributes by resizing the actual window * on the back-end display (if necessary). */ static void dmxConfigureScreenWindow(int idx, @@ -1059,6 +1056,116 @@ static Bool dmxCompareScreens(DMXScreenInfo *new, DMXScreenInfo *old) return TRUE; } +#ifdef RENDER +/** Restore Render's picture */ +static void dmxBERestoreRenderPict(pointer value, XID id, pointer n) +{ + PicturePtr pPicture = value; /* The picture */ + DrawablePtr pDraw = pPicture->pDrawable; /* The picture's drawable */ + int scrnNum = (int)n; + + if (pDraw->pScreen->myNum != scrnNum) { + /* Picture not on the screen we are restoring*/ + return; + } + + if (pDraw->type == DRAWABLE_PIXMAP) { + PixmapPtr pPixmap = (PixmapPtr)pDraw; + + /* Create and restore the pixmap drawable */ + dmxBECreatePixmap(pPixmap); + dmxBERestorePixmap(pPixmap); + } + + dmxBECreatePicture(pPicture); +} + +/** Restore Render's glyphs */ +static void dmxBERestoreRenderGlyph(pointer value, XID id, pointer n) +{ + GlyphSetPtr glyphSet = value; + int scrnNum = (int)n; + dmxGlyphPrivPtr glyphPriv = DMX_GET_GLYPH_PRIV(glyphSet); + DMXScreenInfo *dmxScreen = &dmxScreens[scrnNum]; + GlyphRefPtr table; + char *images; + Glyph *gids; + XGlyphInfo *glyphs; + char *pos; + int beret; + int len_images = 0; + int i; + int ctr; + + if (glyphPriv->glyphSets[scrnNum]) { + /* Only restore glyphs on the screen we are attaching */ + return; + } + + /* First we must create the glyph set on the backend. */ + if ((beret = dmxBECreateGlyphSet(scrnNum, glyphSet)) != Success) { + dmxLog(dmxWarning, + "\tdmxBERestoreRenderGlyph failed to create glyphset!\n"); + return; + } + + /* Now for the complex part, restore the glyph data */ + table = glyphSet->hash.table; + + /* We need to know how much memory to allocate for this part */ + for (i = 0; i < glyphSet->hash.hashSet->size; i++) { + GlyphRefPtr gr = &table[i]; + GlyphPtr gl = gr->glyph; + + if (!gl || gl == DeletedGlyph) continue; + len_images += gl->size - sizeof(gl->info); + } + + /* Now allocate the memory we need */ + images = ALLOCATE_LOCAL(len_images*sizeof(char)); + gids = ALLOCATE_LOCAL(glyphSet->hash.tableEntries*sizeof(Glyph)); + glyphs = ALLOCATE_LOCAL(glyphSet->hash.tableEntries*sizeof(XGlyphInfo)); + + memset(images, 0, len_images * sizeof(char)); + pos = images; + ctr = 0; + + /* Fill the allocated memory with the proper data */ + for (i = 0; i < glyphSet->hash.hashSet->size; i++) { + GlyphRefPtr gr = &table[i]; + GlyphPtr gl = gr->glyph; + + if (!gl || gl == DeletedGlyph) continue; + + /* First lets put the data into gids */ + gids[ctr] = gr->signature; + + /* Next do the glyphs data structures */ + glyphs[ctr].width = gl->info.width; + glyphs[ctr].height = gl->info.height; + glyphs[ctr].x = gl->info.x; + glyphs[ctr].y = gl->info.y; + glyphs[ctr].xOff = gl->info.xOff; + glyphs[ctr].yOff = gl->info.yOff; + + /* Copy the images from the DIX's data into the buffer */ + memcpy(pos, gl+1, gl->size - sizeof(gl->info)); + pos += gl->size - sizeof(gl->info); + ctr++; + } + + /* Now restore the glyph data */ + XRenderAddGlyphs(dmxScreen->beDisplay, glyphPriv->glyphSets[scrnNum], + gids,glyphs, glyphSet->hash.tableEntries, images, + len_images); + + /* Clean up */ + DEALLOCATE_LOCAL(len_images); + DEALLOCATE_LOCAL(gids); + DEALLOCATE_LOCAL(glyphs); +} +#endif + /** Reattach previously detached back-end screen. */ int dmxAttachScreen(int idx, DMXScreenAttributesPtr attr) { @@ -1177,6 +1284,20 @@ int dmxAttachScreen(int idx, DMXScreenAttributesPtr attr) /* Create window hierarchy (top down) */ dmxBECreateWindowTree(idx); +#ifdef RENDER + /* Restore the picture state for RENDER */ + for (i = currentMaxClients; --i >= 0; ) + if (clients[i]) + FindClientResourcesByType(clients[i],PictureType, + dmxBERestoreRenderPict,(pointer)idx); + + /* Restore the glyph state for RENDER */ + for (i = currentMaxClients; --i >= 0; ) + if (clients[i]) + FindClientResourcesByType(clients[i],GlyphSetType, + dmxBERestoreRenderGlyph,(pointer)idx); +#endif + /* Refresh screen by generating exposure events for all windows */ dmxForceExposures(idx); @@ -1365,8 +1486,15 @@ static void dmxBEDestroyResources(pointer value, XID id, RESTYPE type, #ifdef RENDER } else if ((type & TypeMask) == (PictureType & TypeMask)) { PicturePtr pPict = value; - if (pPict->pDrawable->pScreen->myNum == scrnNum) + if (pPict->pDrawable->pScreen->myNum == scrnNum) { + /* Free the pixmaps on the backend if needed */ + if (pPict->pDrawable->type == DRAWABLE_PIXMAP) { + PixmapPtr pPixmap = (PixmapPtr)(pPict->pDrawable); + dmxBESavePixmap(pPixmap); + dmxBEFreePixmap(pPixmap); + } dmxBEFreePicture((PicturePtr)value); + } } else if ((type & TypeMask) == (GlyphSetType & TypeMask)) { dmxBEFreeGlyphSet(pScreen, (GlyphSetPtr)value); #endif diff --git a/hw/dmx/dmxinit.c b/hw/dmx/dmxinit.c index ddc4d2b04..1d3689c40 100644 --- a/hw/dmx/dmxinit.c +++ b/hw/dmx/dmxinit.c @@ -78,9 +78,6 @@ extern void GlxSetVisualConfigs( ); #endif /* GLXEXT */ -extern void SetVendorRelease(int release); /* in dix/main.c */ -extern void SetVendorString(char *string); /* in dix/main.c */ - /* Global variables available to all Xserver/hw/dmx routines. */ int dmxNumScreens; DMXScreenInfo *dmxScreens; @@ -627,7 +624,7 @@ void InitOutput(ScreenInfo *pScreenInfo, int argc, char *argv[]) } /* Make sure that the command-line arguments are sane. */ - if (dmxAddRemoveScreens && (!noRenderExtension || dmxGLXProxy)) { + if (dmxAddRemoveScreens && dmxGLXProxy) { /* Currently it is not possible to support GLX and Render * extensions with dynamic screen addition/removal due to the * state that each extension keeps, which cannot be restored. */ @@ -1049,14 +1046,3 @@ void ddxUseMsg(void) ErrorF(" Ctrl-Alt-q Quit (core devices only)\n"); ErrorF(" Ctrl-Alt-F* Switch to VC (local only)\n"); } - -#ifdef DDXTIME -/** Return wall-clock time in milliseconds. */ -CARD32 GetTimeInMillis(void) -{ - struct timeval tp; - - gettimeofday(&tp, 0); - return tp.tv_sec * 1000 + tp.tv_usec / 1000; -} -#endif diff --git a/hw/dmx/dmxinput.c b/hw/dmx/dmxinput.c index 7c376dee4..37f458356 100644 --- a/hw/dmx/dmxinput.c +++ b/hw/dmx/dmxinput.c @@ -53,7 +53,7 @@ /** Returns TRUE if the key is a valid modifier. For PC-class * keyboards, all keys can be used as modifiers, so return TRUE * always. */ -Bool LegalModifier(unsigned int key, DevicePtr pDev) +Bool LegalModifier(unsigned int key, DeviceIntPtr pDev) { return TRUE; } diff --git a/hw/dmx/dmxpict.c b/hw/dmx/dmxpict.c index 9a76a6696..0f1782e51 100644 --- a/hw/dmx/dmxpict.c +++ b/hw/dmx/dmxpict.c @@ -223,6 +223,36 @@ Bool dmxBEFreeGlyphSet(ScreenPtr pScreen, GlyphSetPtr glyphSet) return FALSE; } +/** Create \a glyphSet on the backend screen number \a idx. */ +int dmxBECreateGlyphSet(int idx, GlyphSetPtr glyphSet) +{ + XRenderPictFormat *pFormat; + DMXScreenInfo *dmxScreen = &dmxScreens[idx]; + dmxGlyphPrivPtr glyphPriv = DMX_GET_GLYPH_PRIV(glyphSet); + PictFormatPtr pFmt = glyphSet->format; + int (*oldErrorHandler)(Display *, XErrorEvent *); + + pFormat = dmxFindFormat(dmxScreen, pFmt); + if (!pFormat) { + return BadMatch; + } + + dmxGlyphLastError = 0; + oldErrorHandler = XSetErrorHandler(dmxGlyphErrorHandler); + + /* Catch when this fails */ + glyphPriv->glyphSets[idx] + = XRenderCreateGlyphSet(dmxScreen->beDisplay, pFormat); + + XSetErrorHandler(oldErrorHandler); + + if (dmxGlyphLastError) { + return dmxGlyphLastError; + } + + return Success; +} + /** Create a Glyph Set on each screen. Save the glyphset ID from each * screen in the Glyph Set's private structure. Fail if the format * requested is not available or if the Glyph Set cannot be created on @@ -235,40 +265,32 @@ static int dmxProcRenderCreateGlyphSet(ClientPtr client) ret = dmxSaveRenderVector[stuff->renderReqType](client); if (ret == Success) { - int (*oldErrorHandler)(Display *, XErrorEvent *); GlyphSetPtr glyphSet; dmxGlyphPrivPtr glyphPriv; int i; - PictFormatPtr pFmt; - XRenderPictFormat *pFormat; /* Look up glyphSet that was just created ???? */ /* Store glyphsets from backends in glyphSet->devPrivate ????? */ /* Make sure we handle all errors here!! */ glyphSet = SecurityLookupIDByType(client, stuff->gsid, GlyphSetType, - SecurityDestroyAccess); + DixDestroyAccess); glyphPriv = xalloc(sizeof(dmxGlyphPrivRec)); if (!glyphPriv) return BadAlloc; glyphPriv->glyphSets = NULL; MAXSCREENSALLOC_RETURN(glyphPriv->glyphSets, BadAlloc); DMX_SET_GLYPH_PRIV(glyphSet, glyphPriv); - pFmt = SecurityLookupIDByType(client, stuff->format, PictFormatType, - SecurityReadAccess); - - oldErrorHandler = XSetErrorHandler(dmxGlyphErrorHandler); - for (i = 0; i < dmxNumScreens; i++) { DMXScreenInfo *dmxScreen = &dmxScreens[i]; + int beret; if (!dmxScreen->beDisplay) { glyphPriv->glyphSets[i] = 0; continue; } - pFormat = dmxFindFormat(dmxScreen, pFmt); - if (!pFormat) { + if ((beret = dmxBECreateGlyphSet(i, glyphSet)) != Success) { int j; /* Free the glyph sets we've allocated thus far */ @@ -278,30 +300,9 @@ static int dmxProcRenderCreateGlyphSet(ClientPtr client) /* Free the resource created by render */ FreeResource(stuff->gsid, RT_NONE); - ret = BadMatch; - break; - } - - /* Catch when this fails */ - glyphPriv->glyphSets[i] - = XRenderCreateGlyphSet(dmxScreen->beDisplay, pFormat); - - if (dmxGlyphLastError) { - int j; - - /* Free the glyph sets we've allocated thus far */ - for (j = 0; j < i; j++) - dmxBEFreeGlyphSet(screenInfo.screens[j], glyphSet); - - /* Free the resource created by render */ - FreeResource(stuff->gsid, RT_NONE); - - ret = dmxGlyphLastError; - break; + return beret; } } - - XSetErrorHandler(oldErrorHandler); } return ret; @@ -315,7 +316,7 @@ static int dmxProcRenderFreeGlyphSet(ClientPtr client) REQUEST_SIZE_MATCH(xRenderFreeGlyphSetReq); glyphSet = SecurityLookupIDByType(client, stuff->glyphset, GlyphSetType, - SecurityDestroyAccess); + DixDestroyAccess); if (glyphSet && glyphSet->refcnt == 1) { dmxGlyphPrivPtr glyphPriv = DMX_GET_GLYPH_PRIV(glyphSet); @@ -358,7 +359,7 @@ static int dmxProcRenderAddGlyphs(ClientPtr client) int nbytes; glyphSet = SecurityLookupIDByType(client, stuff->glyphset, - GlyphSetType, SecurityReadAccess); + GlyphSetType, DixReadAccess); glyphPriv = DMX_GET_GLYPH_PRIV(glyphSet); nglyphs = stuff->nglyphs; @@ -401,7 +402,7 @@ static int dmxProcRenderFreeGlyphs(ClientPtr client) REQUEST_AT_LEAST_SIZE(xRenderFreeGlyphsReq); glyphSet = SecurityLookupIDByType(client, stuff->glyphset, GlyphSetType, - SecurityWriteAccess); + DixWriteAccess); if (glyphSet) { dmxGlyphPrivPtr glyphPriv = DMX_GET_GLYPH_PRIV(glyphSet); @@ -473,13 +474,13 @@ static int dmxProcRenderCompositeGlyphs(ClientPtr client) dmxGlyphPrivPtr glyphPriv; pSrc = SecurityLookupIDByType(client, stuff->src, PictureType, - SecurityReadAccess); + DixReadAccess); pSrcPriv = DMX_GET_PICT_PRIV(pSrc); if (!pSrcPriv->pict) return ret; pDst = SecurityLookupIDByType(client, stuff->dst, PictureType, - SecurityWriteAccess); + DixWriteAccess); pDstPriv = DMX_GET_PICT_PRIV(pDst); if (!pDstPriv->pict) return ret; @@ -496,7 +497,7 @@ static int dmxProcRenderCompositeGlyphs(ClientPtr client) if (stuff->maskFormat) pFmt = SecurityLookupIDByType(client, stuff->maskFormat, - PictFormatType, SecurityReadAccess); + PictFormatType, DixReadAccess); else pFmt = NULL; @@ -547,7 +548,7 @@ static int dmxProcRenderCompositeGlyphs(ClientPtr client) curElt = elts; glyphSet = SecurityLookupIDByType(client, stuff->glyphset, - GlyphSetType, SecurityReadAccess); + GlyphSetType, DixReadAccess); glyphPriv = DMX_GET_GLYPH_PRIV(glyphSet); while (buffer + sizeof(xGlyphElt) < end) { @@ -558,7 +559,7 @@ static int dmxProcRenderCompositeGlyphs(ClientPtr client) glyphSet = SecurityLookupIDByType(client, *((CARD32 *)buffer), GlyphSetType, - SecurityReadAccess); + DixReadAccess); glyphPriv = DMX_GET_GLYPH_PRIV(glyphSet); buffer += 4; } else { @@ -622,7 +623,7 @@ static int dmxProcRenderSetPictureTransform(ClientPtr client) REQUEST(xRenderSetPictureTransformReq); REQUEST_SIZE_MATCH(xRenderSetPictureTransformReq); - VERIFY_PICTURE(pPicture, stuff->picture, client, SecurityWriteAccess, + VERIFY_PICTURE(pPicture, stuff->picture, client, DixWriteAccess, RenderErrBase + BadPicture); /* For the following to work with PanoramiX, it assumes that Render @@ -662,8 +663,8 @@ static int dmxProcRenderSetPictureFilter(ClientPtr client) int nparams; REQUEST(xRenderSetPictureFilterReq); - REQUEST_SIZE_MATCH(xRenderSetPictureFilterReq); - VERIFY_PICTURE(pPicture, stuff->picture, client, SecurityWriteAccess, + REQUEST_AT_LEAST_SIZE(xRenderSetPictureFilterReq); + VERIFY_PICTURE(pPicture, stuff->picture, client, DixWriteAccess, RenderErrBase + BadPicture); /* For the following to work with PanoramiX, it assumes that Render @@ -753,6 +754,20 @@ void dmxCreatePictureList(WindowPtr pWindow) } } +/** Create \a pPicture on the backend. */ +int dmxBECreatePicture(PicturePtr pPicture) +{ + dmxPictPrivPtr pPictPriv = DMX_GET_PICT_PRIV(pPicture); + + /* Create picutre on BE */ + pPictPriv->pict = dmxDoCreatePicture(pPicture); + + /* Flush changes to the backend server */ + dmxValidatePicture(pPicture, (1 << (CPLastBit+1)) - 1); + + return Success; +} + /** Create a picture. This function handles the CreatePicture * unwrapping/wrapping and calls dmxDoCreatePicture to actually create * the picture on the appropriate screen. */ @@ -853,7 +868,11 @@ int dmxChangePictureClip(PicturePtr pPicture, int clipType, /* The clip has already been changed into a region by the mi * routine called above. */ - if (pPicture->clientClip) { + if (clipType == CT_NONE) { + /* Disable clipping, show all */ + XFixesSetPictureClipRegion(dmxScreen->beDisplay, + pPictPriv->pict, 0, 0, None); + } else if (pPicture->clientClip) { RegionPtr pClip = pPicture->clientClip; BoxPtr pBox = REGION_RECTS(pClip); int nBox = REGION_NUM_RECTS(pClip); diff --git a/hw/dmx/dmxpict.h b/hw/dmx/dmxpict.h index 2ca04ed87..fe2a65959 100644 --- a/hw/dmx/dmxpict.h +++ b/hw/dmx/dmxpict.h @@ -112,7 +112,9 @@ extern void dmxTriFan(CARD8 op, INT16 xSrc, INT16 ySrc, int npoint, xPointFixed *points); +extern int dmxBECreateGlyphSet(int idx, GlyphSetPtr glyphSet); extern Bool dmxBEFreeGlyphSet(ScreenPtr pScreen, GlyphSetPtr glyphSet); +extern int dmxBECreatePicture(PicturePtr pPicture); extern Bool dmxBEFreePicture(PicturePtr pPicture); extern int dmxPictPrivateIndex; /**< Index for picture private data */ diff --git a/hw/dmx/glxProxy/Makefile.am b/hw/dmx/glxProxy/Makefile.am index a798647cc..1fbc8d764 100644 --- a/hw/dmx/glxProxy/Makefile.am +++ b/hw/dmx/glxProxy/Makefile.am @@ -31,8 +31,8 @@ libglxproxy_a_SOURCES = compsize.c \ renderpixswap.c \ unpack.h -AM_CFLAGS = @SERVER_DEFINES@ \ - @MODULE_DEFINES@ \ +AM_CFLAGS = \ + $(DIX_CFLAGS) \ -I$(top_srcdir)/hw/dmx \ -I$(top_srcdir)/include \ -I$(top_srcdir)/GL/include \ diff --git a/hw/dmx/glxProxy/compsize.c b/hw/dmx/glxProxy/compsize.c index cffa1af8d..29669e318 100644 --- a/hw/dmx/glxProxy/compsize.c +++ b/hw/dmx/glxProxy/compsize.c @@ -1,4 +1,3 @@ -/* $XFree86: xc/lib/GL/glx/compsize.c,v 1.3 2001/03/21 16:04:39 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 diff --git a/hw/dmx/glxProxy/g_disptab.c b/hw/dmx/glxProxy/g_disptab.c index f507a874f..124a65511 100644 --- a/hw/dmx/glxProxy/g_disptab.c +++ b/hw/dmx/glxProxy/g_disptab.c @@ -1,4 +1,3 @@ -/* $XFree86: xc/programs/Xserver/GL/glx/g_disptab.c,v 1.3 2001/03/21 16:29:35 dawes Exp $ */ /* DO NOT EDIT - THIS FILE IS AUTOMATICALLY GENERATED */ /* ** License Applicability. Except to the extent portions of this file are diff --git a/hw/dmx/glxProxy/g_disptab.h b/hw/dmx/glxProxy/g_disptab.h index 0b6d47be7..f02e4f59c 100644 --- a/hw/dmx/glxProxy/g_disptab.h +++ b/hw/dmx/glxProxy/g_disptab.h @@ -1,4 +1,3 @@ -/* $XFree86: xc/programs/Xserver/GL/glx/g_disptab.h,v 1.3 2001/03/21 16:29:35 dawes Exp $ */ /* DO NOT EDIT - THIS FILE IS AUTOMATICALLY GENERATED */ #ifndef _GLX_g_disptab_h_ #define _GLX_g_disptab_h_ diff --git a/hw/dmx/glxProxy/global.c b/hw/dmx/glxProxy/global.c index 960021a2b..0e6efeff7 100644 --- a/hw/dmx/glxProxy/global.c +++ b/hw/dmx/glxProxy/global.c @@ -1,4 +1,3 @@ -/* $XFree86: xc/programs/Xserver/GL/glx/global.c,v 1.3 2001/03/21 16:29:35 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 diff --git a/hw/dmx/glxProxy/glxcmds.c b/hw/dmx/glxProxy/glxcmds.c index d7ea70728..6771cf1de 100644 --- a/hw/dmx/glxProxy/glxcmds.c +++ b/hw/dmx/glxProxy/glxcmds.c @@ -1,4 +1,3 @@ -/* $XFree86: xc/programs/Xserver/GL/glx/glxcmds.c,v 1.8 2001/05/02 15:06:05 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 @@ -59,7 +58,6 @@ #include "glxutil.h" #include "glxext.h" #include "unpack.h" -#include "GL/glx_ansic.h" #include "GL/glxproto.h" #include "glxvendor.h" @@ -158,7 +156,7 @@ static int CreateContext(__GLXclientState *cl, if (!glxc) { return BadAlloc; } - __glXMemset(glxc, 0, sizeof(__GLXcontext)); + memset(glxc, 0, sizeof(__GLXcontext)); pScreen = screenInfo.screens[screen]; pGlxScreen = &__glXActiveScreens[screen]; @@ -432,9 +430,10 @@ int __glXBindSwapBarrierSGIX(__GLXclientState *cl, GLbyte *pc) DrawablePtr pDraw; __GLXpixmap *pGlxPixmap = NULL; __glXWindow *pGlxWindow = NULL; + int rc; - pDraw = (DrawablePtr) LookupDrawable(req->drawable, client); - if (!pDraw) { + rc = dixLookupDrawable(&pDraw, req->drawable, client, 0, DixUnknownAccess); + if (rc != Success) { pGlxPixmap = (__GLXpixmap *) LookupIDByType(req->drawable, __glXPixmapRes); if (pGlxPixmap) pDraw = pGlxPixmap->pDraw; @@ -461,9 +460,10 @@ int __glXJoinSwapGroupSGIX(__GLXclientState *cl, GLbyte *pc) DrawablePtr pDraw, pMember = NULL; __GLXpixmap *pGlxPixmap = NULL; __glXWindow *pGlxWindow = NULL; + int rc; - pDraw = (DrawablePtr) LookupDrawable(req->drawable, client); - if (!pDraw) { + rc = dixLookupDrawable(&pDraw, req->drawable, client, 0, DixUnknownAccess); + if (rc != Success) { pGlxPixmap = (__GLXpixmap *) LookupIDByType(req->drawable, __glXPixmapRes); if (pGlxPixmap) pDraw = pGlxPixmap->pDraw; @@ -481,8 +481,9 @@ int __glXJoinSwapGroupSGIX(__GLXclientState *cl, GLbyte *pc) } if (req->member != None) { - pMember = (DrawablePtr) LookupDrawable(req->member, client); - if (!pMember) { + rc = dixLookupDrawable(&pMember, req->member, client, 0, + DixUnknownAccess); + if (rc != Success) { pGlxPixmap = (__GLXpixmap *) LookupIDByType(req->member, __glXPixmapRes); if (pGlxPixmap) pMember = pGlxPixmap->pDraw; @@ -610,7 +611,7 @@ static int AddCurrentContext(__GLXclientState *cl, __GLXcontext *glxc, DrawableP cl->currentContexts = table; cl->numCurrentContexts++; - __glXMemset(cl->be_currentCTag + num*screenInfo.numScreens, 0, + memset(cl->be_currentCTag + num*screenInfo.numScreens, 0, screenInfo.numScreens * sizeof(GLXContextTag)); return num+1; @@ -736,7 +737,7 @@ static int MakeCurrent(__GLXclientState *cl, #endif int from_screen = 0; int to_screen = 0; - int s; + int s, rc; /* ** If one is None and the other isn't, it's a bad match. @@ -780,8 +781,8 @@ static int MakeCurrent(__GLXclientState *cl, } if (drawId != None) { - pDraw = (DrawablePtr) LookupDrawable(drawId, client); - if (pDraw) { + rc = dixLookupDrawable(&pDraw, drawId, client, 0, DixUnknownAccess); + if (rc == Success) { if (pDraw->type == DRAWABLE_WINDOW) { /* ** Drawable is an X Window. @@ -887,8 +888,8 @@ static int MakeCurrent(__GLXclientState *cl, } if (readId != None && readId != drawId ) { - pReadDraw = (DrawablePtr) LookupDrawable(readId, client); - if (pReadDraw) { + rc = dixLookupDrawable(&pReadDraw, readId, client, 0,DixUnknownAccess); + if (rc == Success) { if (pReadDraw->type == DRAWABLE_WINDOW) { /* ** Drawable is an X Window. @@ -1107,13 +1108,13 @@ static int MakeCurrent(__GLXclientState *cl, if (pDraw && new_reply.writeType != GLX_PBUFFER_TYPE) { pXinDraw = (PanoramiXRes *) - SecurityLookupIDByClass(client, pDraw->id, XRC_DRAWABLE, SecurityReadAccess); + SecurityLookupIDByClass(client, pDraw->id, XRC_DRAWABLE, DixReadAccess); } if (pReadDraw && pReadDraw != pDraw && new_reply.readType != GLX_PBUFFER_TYPE) { pXinReadDraw = (PanoramiXRes *) - SecurityLookupIDByClass(client, pReadDraw->id, XRC_DRAWABLE, SecurityReadAccess); + SecurityLookupIDByClass(client, pReadDraw->id, XRC_DRAWABLE, DixReadAccess); } else { pXinReadDraw = pXinDraw; @@ -1139,9 +1140,7 @@ static int MakeCurrent(__GLXclientState *cl, } #ifdef PANORAMIX else if (pXinDraw) { - pWin = (WindowPtr)SecurityLookupWindow(pXinDraw->info[s].id, - client, - SecurityReadAccess); + dixLookupWindow(&pWin, pXinDraw->info[s].id, client, DixReadAccess); } #endif else if (pGlxWindow) { @@ -1197,9 +1196,8 @@ static int MakeCurrent(__GLXclientState *cl, } #ifdef PANORAMIX else if (pXinReadDraw) { - pReadWin = (WindowPtr)SecurityLookupWindow(pXinReadDraw->info[s].id, - client, - SecurityReadAccess); + dixLookupWindow(&pReadWin, pXinReadDraw->info[s].id, client, + DixReadAccess); } #endif else if (pGlxReadWindow) { @@ -1641,18 +1639,16 @@ static int CreateGLXPixmap(__GLXclientState *cl, __GLXscreenInfo *pGlxScreen; __GLXvisualConfig *pGlxVisual; __GLXFBConfig *pFBConfig; - int i; - int s; + int i, s, rc; int from_screen, to_screen; #ifdef PANORAMIX PanoramiXRes *pXinDraw = NULL; #endif - pDraw = (DrawablePtr) LookupDrawable(pixmapId, client); - if (!pDraw || pDraw->type != DRAWABLE_PIXMAP) { - client->errorValue = pixmapId; - return BadPixmap; - } + rc = dixLookupDrawable(&pDraw, pixmapId, client, M_DRAWABLE_PIXMAP, + DixUnknownAccess); + if (rc != Success) + return rc; /* ** Check if screen of visual matches screen of pixmap. @@ -1770,7 +1766,7 @@ static int CreateGLXPixmap(__GLXclientState *cl, to_screen = screenInfo.numScreens - 1; pXinDraw = (PanoramiXRes *) - SecurityLookupIDByClass(client, pDraw->id, XRC_DRAWABLE, SecurityReadAccess); + SecurityLookupIDByClass(client, pDraw->id, XRC_DRAWABLE, DixReadAccess); } #endif @@ -1783,7 +1779,8 @@ static int CreateGLXPixmap(__GLXclientState *cl, #ifdef PANORAMIX if (pXinDraw) { - pRealDraw = (DrawablePtr) LookupDrawable(pXinDraw->info[s].id,client); + dixLookupDrawable(&pRealDraw, pXinDraw->info[s].id, client, 0, + DixUnknownAccess); } #endif @@ -1949,14 +1946,13 @@ int __glXDoSwapBuffers(__GLXclientState *cl, XID drawId, GLXContextTag tag) __glXWindow *pGlxWindow = NULL; int from_screen = 0; int to_screen = 0; - int s; + int s, rc; /* ** Check that the GLX drawable is valid. */ - pDraw = (DrawablePtr) LookupDrawable(drawId, client); - if (pDraw) { - + rc = dixLookupDrawable(&pDraw, drawId, client, 0, DixUnknownAccess); + if (rc == Success) { from_screen = to_screen = pDraw->pScreen->myNum; if (pDraw->type == DRAWABLE_WINDOW) { @@ -2016,7 +2012,7 @@ int __glXDoSwapBuffers(__GLXclientState *cl, XID drawId, GLXContextTag tag) from_screen = 0; to_screen = screenInfo.numScreens - 1; pXinDraw = (PanoramiXRes *) - SecurityLookupIDByClass(client, pDraw->id, XRC_DRAWABLE, SecurityReadAccess); + SecurityLookupIDByClass(client, pDraw->id, XRC_DRAWABLE, DixReadAccess); } #endif @@ -2060,9 +2056,7 @@ int __glXDoSwapBuffers(__GLXclientState *cl, XID drawId, GLXContextTag tag) } #ifdef PANORAMIX else if (pXinDraw) { - pWin = (WindowPtr)SecurityLookupWindow(pXinDraw->info[s].id, - client, - SecurityReadAccess); + dixLookupWindow(&pWin, pXinDraw->info[s].id, client, DixReadAccess); } #endif else if (pGlxWindow) { @@ -2106,12 +2100,13 @@ int __glXSwapBuffers(__GLXclientState *cl, GLbyte *pc) __GLXpixmap *pGlxPixmap = NULL; __GLXcontext *glxc = NULL; __glXWindow *pGlxWindow = NULL; + int rc; /* ** Check that the GLX drawable is valid. */ - pDraw = (DrawablePtr) LookupDrawable(drawId, client); - if (pDraw) { + rc = dixLookupDrawable(&pDraw, drawId, client, 0, DixUnknownAccess); + if (rc == Success) { if (pDraw->type != DRAWABLE_WINDOW) { /* ** Drawable is an X pixmap, which is not allowed. @@ -2589,7 +2584,7 @@ int __glXClientInfo(__GLXclientState *cl, GLbyte *pc) cl->GLClientminorVersion = req->minor; if (cl->GLClientextensions) __glXFree(cl->GLClientextensions); buf = (const char *)(req+1); - cl->GLClientextensions = __glXStrdup(buf); + cl->GLClientextensions = strdup(buf); to_screen = screenInfo.numScreens - 1; @@ -2899,16 +2894,15 @@ int __glXCreateWindow(__GLXclientState *cl, GLbyte *pc) __GLXFBConfig *pGlxFBConfig = NULL; VisualPtr pVisual; VisualID visId; - int i; + int i, rc; /* ** Check if windowId is valid */ - pDraw = (DrawablePtr) LookupDrawable(windowId, client); - if (!pDraw || pDraw->type != DRAWABLE_WINDOW) { - client->errorValue = windowId; - return BadWindow; - } + rc = dixLookupDrawable(&pDraw, windowId, client, M_DRAWABLE_WINDOW, + DixUnknownAccess); + if (rc != Success) + return rc; /* ** Check if screen of window matches screen of fbconfig. @@ -3071,7 +3065,7 @@ int __glXQueryContextInfoEXT(__GLXclientState *cl, GLbyte *pc) int nReplyBytes; req = (xGLXQueryContextInfoEXTReq *)pc; - ctx = (__GLXcontext *) SecurityLookupIDByType(client, req->context, __glXContextRes, SecurityReadAccess); + ctx = (__GLXcontext *) SecurityLookupIDByType(client, req->context, __glXContextRes, DixReadAccess); if (!ctx) { client->errorValue = req->context; return __glXBadContext; @@ -3281,7 +3275,7 @@ int __glXGetDrawableAttributes(__GLXclientState *cl, GLbyte *pc) GLXDrawable be_drawable = 0; DrawablePtr pDraw = NULL; Display *dpy; - int screen; + int screen, rc; DMXScreenInfo *dmxScreen; CARD32 *attribs = NULL; int attribs_size; @@ -3290,8 +3284,8 @@ int __glXGetDrawableAttributes(__GLXclientState *cl, GLbyte *pc) #endif if (drawId != None) { - pDraw = (DrawablePtr) LookupDrawable(drawId, client); - if (pDraw) { + rc = dixLookupDrawable(&pDraw, drawId, client, 0, DixUnknownAccess); + if (rc == Success) { if (pDraw->type == DRAWABLE_WINDOW) { WindowPtr pWin = (WindowPtr)pDraw; be_drawable = 0; @@ -3355,15 +3349,14 @@ int __glXGetDrawableAttributes(__GLXclientState *cl, GLbyte *pc) #ifdef PANORAMIX if (!noPanoramiXExtension) { pXinDraw = (PanoramiXRes *) - SecurityLookupIDByClass(client, pDraw->id, XRC_DRAWABLE, SecurityReadAccess); + SecurityLookupIDByClass(client, pDraw->id, XRC_DRAWABLE, DixReadAccess); if (!pXinDraw) { client->errorValue = drawId; return __glXBadDrawable; } - pWin = (WindowPtr)SecurityLookupWindow(pXinDraw->info[screen].id, - client, - SecurityReadAccess); + dixLookupWindow(&pWin, pXinDraw->info[screen].id, client, + DixReadAccess); } #endif @@ -3443,7 +3436,7 @@ int __glXChangeDrawableAttributes(__GLXclientState *cl, GLbyte *pc) GLXDrawable be_drawable = 0; DrawablePtr pDraw = NULL; Display *dpy; - int screen; + int screen, rc; DMXScreenInfo *dmxScreen; char *attrbuf; #ifdef PANORAMIX @@ -3452,8 +3445,8 @@ int __glXChangeDrawableAttributes(__GLXclientState *cl, GLbyte *pc) #endif if (drawId != None) { - pDraw = (DrawablePtr) LookupDrawable(drawId, client); - if (pDraw) { + rc = dixLookupDrawable(&pDraw, drawId, client, 0, DixUnknownAccess); + if (rc == Success) { if (pDraw->type == DRAWABLE_WINDOW) { WindowPtr pWin = (WindowPtr)pDraw; be_drawable = 0; @@ -3517,15 +3510,14 @@ int __glXChangeDrawableAttributes(__GLXclientState *cl, GLbyte *pc) #ifdef PANORAMIX if (!noPanoramiXExtension) { pXinDraw = (PanoramiXRes *) - SecurityLookupIDByClass(client, pDraw->id, XRC_DRAWABLE, SecurityReadAccess); + SecurityLookupIDByClass(client, pDraw->id, XRC_DRAWABLE, DixReadAccess); if (!pXinDraw) { client->errorValue = drawId; return __glXBadDrawable; } - pWin = (WindowPtr)SecurityLookupWindow(pXinDraw->info[screen].id, - client, - SecurityReadAccess); + dixLookupWindow(&pWin, pXinDraw->info[screen].id, client, + DixReadAccess); } #endif diff --git a/hw/dmx/glxProxy/glxcmdsswap.c b/hw/dmx/glxProxy/glxcmdsswap.c index 565793e22..3404d557a 100644 --- a/hw/dmx/glxProxy/glxcmdsswap.c +++ b/hw/dmx/glxProxy/glxcmdsswap.c @@ -1,4 +1,3 @@ -/* $XFree86: xc/programs/Xserver/GL/glx/glxcmdsswap.c,v 1.5 2001/03/21 16:29:36 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 @@ -44,7 +43,6 @@ #include #include "unpack.h" #include "glxext.h" -#include "GL/glx_ansic.h" #include "glxvendor.h" extern int glxIsExtensionSupported( char *ext ); @@ -714,7 +712,7 @@ int __glXSwapRenderLarge(__GLXclientState *cl, GLbyte *pc) } cl->largeCmdBufSize = hdr->length; } - __glXMemcpy(cl->largeCmdBuf, pc, req->dataBytes); + memcpy(cl->largeCmdBuf, pc, req->dataBytes); cl->largeCmdBytesSoFar = req->dataBytes; cl->largeCmdBytesTotal = hdr->length; @@ -737,7 +735,7 @@ int __glXSwapRenderLarge(__GLXclientState *cl, GLbyte *pc) return __glXBadLargeRequest; } - __glXMemcpy(cl->largeCmdBuf + cl->largeCmdBytesSoFar, + memcpy(cl->largeCmdBuf + cl->largeCmdBytesSoFar, pc, req->dataBytes); cl->largeCmdBytesSoFar += req->dataBytes; @@ -759,7 +757,7 @@ int __glXSwapRenderLarge(__GLXclientState *cl, GLbyte *pc) return __glXBadLargeRequest; } - __glXMemcpy(cl->largeCmdBuf + cl->largeCmdBytesSoFar, + memcpy(cl->largeCmdBuf + cl->largeCmdBytesSoFar, pc, req->dataBytes); cl->largeCmdBytesSoFar += req->dataBytes; diff --git a/hw/dmx/glxProxy/glxcontext.h b/hw/dmx/glxProxy/glxcontext.h index 465101a97..d59df3f0c 100644 --- a/hw/dmx/glxProxy/glxcontext.h +++ b/hw/dmx/glxProxy/glxcontext.h @@ -1,4 +1,3 @@ -/* $XFree86: xc/programs/Xserver/GL/glx/glxcontext.h,v 1.3 2001/03/21 16:29:36 dawes Exp $ */ #ifndef _GLX_context_h_ #define _GLX_context_h_ diff --git a/hw/dmx/glxProxy/glxdrawable.h b/hw/dmx/glxProxy/glxdrawable.h index 6e00ad62f..59fffa747 100644 --- a/hw/dmx/glxProxy/glxdrawable.h +++ b/hw/dmx/glxProxy/glxdrawable.h @@ -1,4 +1,3 @@ -/* $XFree86: xc/programs/Xserver/GL/glx/glxdrawable.h,v 1.3 2001/03/21 16:29:36 dawes Exp $ */ #ifndef _GLX_drawable_h_ #define _GLX_drawable_h_ diff --git a/hw/dmx/glxProxy/glxerror.h b/hw/dmx/glxProxy/glxerror.h index d75cc2b2e..f69cadbde 100644 --- a/hw/dmx/glxProxy/glxerror.h +++ b/hw/dmx/glxProxy/glxerror.h @@ -1,4 +1,3 @@ -/* $XFree86: xc/programs/Xserver/GL/glx/glxerror.h,v 1.3 2001/03/21 16:29:36 dawes Exp $ */ #ifndef _GLX_error_h_ #define _GLX_error_h_ diff --git a/hw/dmx/glxProxy/glxext.c b/hw/dmx/glxProxy/glxext.c index 5ddfbe608..de8bef8fb 100644 --- a/hw/dmx/glxProxy/glxext.c +++ b/hw/dmx/glxProxy/glxext.c @@ -1,4 +1,4 @@ -/* $XFree86: xc/programs/Xserver/GL/glx/glxext.c,v 1.7 2001/03/21 16:29:36 dawes 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., @@ -79,7 +79,7 @@ static void ResetClientState(int clientIndex) } keep_be_displays = cl->be_displays; - __glXMemset(cl, 0, sizeof(__GLXclientState)); + memset(cl, 0, sizeof(__GLXclientState)); cl->be_displays = keep_be_displays; /* @@ -90,7 +90,7 @@ static void ResetClientState(int clientIndex) cl->GLClientminorVersion = 0; if (cl->GLClientextensions) __glXFree(cl->GLClientextensions); - __glXMemset(cl->be_displays, 0, screenInfo.numScreens * sizeof(Display *)); + memset(cl->be_displays, 0, screenInfo.numScreens * sizeof(Display *)); } @@ -414,14 +414,14 @@ static int __glXDispatch(ClientPtr client) if (!cl) { return BadAlloc; } - __glXMemset(cl, 0, sizeof(__GLXclientState)); + memset(cl, 0, sizeof(__GLXclientState)); cl->be_displays = (Display **) __glXMalloc( screenInfo.numScreens * sizeof(Display *) ); if (!cl->be_displays) { __glXFree( cl ); return BadAlloc; } - __glXMemset(cl->be_displays, 0, screenInfo.numScreens * sizeof(Display *)); + memset(cl->be_displays, 0, screenInfo.numScreens * sizeof(Display *)); } if (!cl->inUse) { @@ -468,7 +468,7 @@ static int __glXSwapDispatch(ClientPtr client) if (!cl) { return BadAlloc; } - __glXMemset(cl, 0, sizeof(__GLXclientState)); + memset(cl, 0, sizeof(__GLXclientState)); cl->be_displays = (Display **) __glXMalloc( screenInfo.numScreens * sizeof(Display *) ); if (!cl->be_displays) { @@ -476,7 +476,7 @@ static int __glXSwapDispatch(ClientPtr client) return BadAlloc; } - __glXMemset(cl->be_displays, 0, screenInfo.numScreens * sizeof(Display *)); + memset(cl->be_displays, 0, screenInfo.numScreens * sizeof(Display *)); } if (!cl->inUse) { diff --git a/hw/dmx/glxProxy/glxext.h b/hw/dmx/glxProxy/glxext.h index 7e6756f86..8572aa43a 100644 --- a/hw/dmx/glxProxy/glxext.h +++ b/hw/dmx/glxProxy/glxext.h @@ -1,4 +1,3 @@ -/* $XFree86: xc/programs/Xserver/GL/glx/glxext.h,v 1.4 2001/03/21 16:29:36 dawes Exp $ */ #ifndef _glxext_h_ #define _glxext_h_ diff --git a/hw/dmx/glxProxy/glxscreens.c b/hw/dmx/glxProxy/glxscreens.c index a7d4ce13d..0f9012d39 100644 --- a/hw/dmx/glxProxy/glxscreens.c +++ b/hw/dmx/glxProxy/glxscreens.c @@ -1,4 +1,3 @@ -/* $XFree86: xc/programs/Xserver/GL/glx/glxscreens.c,v 1.6 2001/03/21 16:29:36 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 @@ -48,13 +47,6 @@ #include "glxserver.h" -#ifdef IN_MODULE -#include -#else -#include -#include -#endif - #include #include "glxfbconfig.h" diff --git a/hw/dmx/glxProxy/glxscreens.h b/hw/dmx/glxProxy/glxscreens.h index 22d397171..5f93e497b 100644 --- a/hw/dmx/glxProxy/glxscreens.h +++ b/hw/dmx/glxProxy/glxscreens.h @@ -1,7 +1,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 diff --git a/hw/dmx/glxProxy/glxserver.h b/hw/dmx/glxProxy/glxserver.h index 7db7efef0..db5be4365 100644 --- a/hw/dmx/glxProxy/glxserver.h +++ b/hw/dmx/glxProxy/glxserver.h @@ -1,4 +1,3 @@ -/* $XFree86: xc/programs/Xserver/GL/glx/glxserver.h,v 1.3 2001/03/21 16:29:37 dawes Exp $ */ #ifndef _GLX_server_h_ #define _GLX_server_h_ @@ -46,7 +45,6 @@ #include #include #include -#include "GL/glx_ansic.h" /* diff --git a/hw/dmx/glxProxy/glxsingle.c b/hw/dmx/glxProxy/glxsingle.c index e353263a7..27a27c335 100644 --- a/hw/dmx/glxProxy/glxsingle.c +++ b/hw/dmx/glxProxy/glxsingle.c @@ -1,4 +1,3 @@ -/* $XFree86: xc/programs/Xserver/GL/glx/g_single.c,v 1.4 2001/03/21 16:29:35 dawes Exp $ */ /* DO NOT EDIT - THIS FILE IS AUTOMATICALLY GENERATED */ /* ** License Applicability. Except to the extent portions of this file are diff --git a/hw/dmx/glxProxy/glxutil.c b/hw/dmx/glxProxy/glxutil.c index 822ef25a0..f30b05fb1 100644 --- a/hw/dmx/glxProxy/glxutil.c +++ b/hw/dmx/glxProxy/glxutil.c @@ -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 @@ -41,7 +40,6 @@ #include #include #include "glxutil.h" -#include "GL/glx_ansic.h" /************************************************************************/ @@ -82,7 +80,7 @@ __glXCalloc(size_t numElements, size_t elementSize) /* XXX: handle out of memory error */ return NULL; } - __glXMemset(addr, 0, size); + memset(addr, 0, size); return addr; } diff --git a/hw/dmx/glxProxy/glxutil.h b/hw/dmx/glxProxy/glxutil.h index 176444ee9..94ca7da95 100644 --- a/hw/dmx/glxProxy/glxutil.h +++ b/hw/dmx/glxProxy/glxutil.h @@ -1,4 +1,3 @@ -/* $XFree86: xc/programs/Xserver/GL/glx/glxutil.h,v 1.3 2001/03/21 16:29:37 dawes Exp $ */ #ifndef _glxcmds_h_ #define _glxcmds_h_ diff --git a/hw/dmx/glxProxy/glxvendor.c b/hw/dmx/glxProxy/glxvendor.c index 4259974f9..e55f80252 100644 --- a/hw/dmx/glxProxy/glxvendor.c +++ b/hw/dmx/glxProxy/glxvendor.c @@ -1,4 +1,3 @@ -/* $XFree86: xc/programs/Xserver/GL/glx/g_single.c,v 1.4 2001/03/21 16:29:35 dawes Exp $ */ /* DO NOT EDIT - THIS FILE IS AUTOMATICALLY GENERATED */ /* ** License Applicability. Except to the extent portions of this file are diff --git a/hw/dmx/glxProxy/glxvisuals.c b/hw/dmx/glxProxy/glxvisuals.c index c20e9551e..77bb137cf 100644 --- a/hw/dmx/glxProxy/glxvisuals.c +++ b/hw/dmx/glxProxy/glxvisuals.c @@ -37,6 +37,7 @@ #include #endif +#include #include "dmx.h" #include "glxserver.h" #include "glxutil.h" diff --git a/hw/dmx/glxProxy/render2swap.c b/hw/dmx/glxProxy/render2swap.c index 3fb894325..e7cbff21f 100644 --- a/hw/dmx/glxProxy/render2swap.c +++ b/hw/dmx/glxProxy/render2swap.c @@ -1,4 +1,3 @@ -/* $XFree86: xc/programs/Xserver/GL/glx/render2swap.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 diff --git a/hw/dmx/glxProxy/renderpixswap.c b/hw/dmx/glxProxy/renderpixswap.c index bedefe781..881967ccf 100644 --- a/hw/dmx/glxProxy/renderpixswap.c +++ b/hw/dmx/glxProxy/renderpixswap.c @@ -1,4 +1,3 @@ -/* $XFree86: xc/programs/Xserver/GL/glx/renderpixswap.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 diff --git a/hw/dmx/glxProxy/unpack.h b/hw/dmx/glxProxy/unpack.h index abad7b147..713e3aaa2 100644 --- a/hw/dmx/glxProxy/unpack.h +++ b/hw/dmx/glxProxy/unpack.h @@ -1,4 +1,3 @@ -/* $XFree86: xc/programs/Xserver/GL/glx/unpack.h,v 1.3 2001/03/21 16:29:37 dawes Exp $ */ #ifndef __GLX_unpack_h__ #define __GLX_unpack_h__ diff --git a/hw/dmx/input/Makefile.am b/hw/dmx/input/Makefile.am index d37c2a9ce..da8de0546 100644 --- a/hw/dmx/input/Makefile.am +++ b/hw/dmx/input/Makefile.am @@ -60,7 +60,7 @@ GLX_DEFS = @GL_CFLAGS@ GLX_INCS = -I@MESA_SOURCE@/include endif -AM_CFLAGS = @SERVER_DEFINES@ \ +AM_CFLAGS = $(DIX_CFLAGS) \ -I$(top_srcdir)/hw/dmx \ -I$(top_srcdir)/hw/xfree86/common \ $(GLX_INCS) \ diff --git a/hw/dmx/input/dmxeq.c b/hw/dmx/input/dmxeq.c index 7a6bb11fc..a2fb07f1e 100644 --- a/hw/dmx/input/dmxeq.c +++ b/hw/dmx/input/dmxeq.c @@ -1,6 +1,5 @@ /* $XFree86$ */ /* - * $Xorg: mieq.c,v 1.4 2001/02/09 02:05:20 xorgcvs Exp $ * * Copyright 1990, 1998 The Open Group * diff --git a/hw/kdrive/Makefile.am b/hw/kdrive/Makefile.am index c8832ebac..e07804948 100644 --- a/hw/kdrive/Makefile.am +++ b/hw/kdrive/Makefile.am @@ -3,10 +3,14 @@ VESA_SUBDIRS = vesa ati chips epson i810 mach64 mga neomagic nvidia pm2 r128 \ smi via endif -if KDRIVEFBDEV +if BUILD_KDRIVEFBDEVLIB FBDEV_SUBDIRS = fbdev endif +if XFAKESERVER +XFAKE_SUBDIRS = fake +endif + if XSDLSERVER XSDL_SUBDIRS = sdl endif @@ -15,14 +19,18 @@ if XEPHYR XEPHYR_SUBDIRS = ephyr endif +if KDRIVELINUX +LINUX_SUBDIRS = linux +endif + SUBDIRS = \ src \ - linux \ + $(LINUX_SUBDIRS) \ $(XSDL_SUBDIRS) \ $(FBDEV_SUBDIRS) \ $(VESA_SUBDIRS) \ $(XEPHYR_SUBDIRS) \ - fake + $(XFAKE_SUBDIRS) DIST_SUBDIRS = vesa ati chips epson i810 mach64 mga neomagic nvidia pm2 r128 \ smi via fbdev sdl ephyr src linux fake sis300 diff --git a/hw/kdrive/ati/Makefile.am b/hw/kdrive/ati/Makefile.am index b23418129..76635fb52 100644 --- a/hw/kdrive/ati/Makefile.am +++ b/hw/kdrive/ati/Makefile.am @@ -31,10 +31,6 @@ INCLUDES = \ bin_PROGRAMS = Xati -if TSLIB -TSLIB_FLAG = -lts -endif - noinst_LIBRARIES = libati.a libati_a_SOURCES = \ @@ -65,8 +61,4 @@ ATI_LIBS = \ Xati_LDADD = \ $(ATI_LIBS) \ @KDRIVE_LIBS@ \ - @XSERVER_LIBS@ \ - $(TSLIB_FLAG) - - -Xati_DEPENDENCIES = $(ATI_LIBS) + @XSERVER_LIBS@ diff --git a/hw/kdrive/ati/ati_dripriv.h b/hw/kdrive/ati/ati_dripriv.h index 1343f07f5..f0e139383 100644 --- a/hw/kdrive/ati/ati_dripriv.h +++ b/hw/kdrive/ati/ati_dripriv.h @@ -1,4 +1,3 @@ -/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/ati/r128_dripriv.h,v 1.3 2000/11/18 19:37:11 tsi Exp $ */ /* * Copyright 1999, 2000 ATI Technologies Inc., Markham, Ontario, * Precision Insight, Inc., Cedar Park, Texas, and diff --git a/hw/kdrive/ati/ati_stub.c b/hw/kdrive/ati/ati_stub.c index 01ebc3139..d0bc4ca6b 100644 --- a/hw/kdrive/ati/ati_stub.c +++ b/hw/kdrive/ati/ati_stub.c @@ -53,7 +53,15 @@ InitOutput(ScreenInfo *pScreenInfo, int argc, char **argv) void InitInput(int argc, char **argv) { - KdInitInput(&LinuxMouseFuncs, &LinuxKeyboardFuncs); + KdKeyboardInfo *ki = NULL; + + KdAddPointerDriver(&LinuxMouseDriver); + ki = KdNewKeyboard(); + if (ki) { + ki->driver = &LinuxKeyboardDriver; + KdAddKeyboard(ki); + } + KdInitInput(); } void diff --git a/hw/kdrive/ati/r128_common.h b/hw/kdrive/ati/r128_common.h index 506f97c68..862fea599 100644 --- a/hw/kdrive/ati/r128_common.h +++ b/hw/kdrive/ati/r128_common.h @@ -31,7 +31,6 @@ * Converted to common header format: * Jens Owen * - * $XFree86: xc/programs/Xserver/hw/xfree86/drivers/ati/r128_common.h,v 1.2 2002/12/16 16:19:10 dawes Exp $ * */ diff --git a/hw/kdrive/ati/r128_sarea.h b/hw/kdrive/ati/r128_sarea.h index b73797ae6..6fbd05ecb 100644 --- a/hw/kdrive/ati/r128_sarea.h +++ b/hw/kdrive/ati/r128_sarea.h @@ -1,4 +1,3 @@ -/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/ati/r128_sarea.h,v 1.7 2002/02/16 21:26:35 herrb Exp $ */ /* * Copyright 1999, 2000 ATI Technologies Inc., Markham, Ontario, * Precision Insight, Inc., Cedar Park, Texas, and diff --git a/hw/kdrive/ati/radeon_common.h b/hw/kdrive/ati/radeon_common.h index 2539ba68f..6c416c6b1 100644 --- a/hw/kdrive/ati/radeon_common.h +++ b/hw/kdrive/ati/radeon_common.h @@ -31,7 +31,6 @@ * Converted to common header format: * Jens Owen * - * $XFree86: xc/programs/Xserver/hw/xfree86/drivers/ati/radeon_common.h,v 1.2 2003/04/07 01:22:09 martin Exp $ * */ diff --git a/hw/kdrive/ati/radeon_sarea.h b/hw/kdrive/ati/radeon_sarea.h index 82a72ed19..1d39bca52 100644 --- a/hw/kdrive/ati/radeon_sarea.h +++ b/hw/kdrive/ati/radeon_sarea.h @@ -1,4 +1,3 @@ -/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/ati/radeon_sarea.h,v 1.5 2002/10/30 12:52:14 alanh Exp $ */ /* * Copyright 2000 ATI Technologies Inc., Markham, Ontario, * VA Linux Systems Inc., Fremont, California. diff --git a/hw/kdrive/chips/Makefile.am b/hw/kdrive/chips/Makefile.am index e3080774b..2f8a88da0 100644 --- a/hw/kdrive/chips/Makefile.am +++ b/hw/kdrive/chips/Makefile.am @@ -5,10 +5,6 @@ INCLUDES = \ bin_PROGRAMS = Xchips -if TSLIB -TSLIB_FLAG = -lts -endif - noinst_LIBRARIES = libchips.a libchips_a_SOURCES = \ @@ -19,15 +15,12 @@ libchips_a_SOURCES = \ Xchips_SOURCES = \ chipsstub.c -CHIPS_LIBS = \ - libchips.a \ +CHIPS_LIBS = \ + libchips.a \ $(top_builddir)/hw/kdrive/vesa/libvesa.a \ @KDRIVE_LIBS@ Xchips_LDADD = \ $(CHIPS_LIBS) \ - @KDRIVE_LIBS@ \ - @XSERVER_LIBS@ \ - $(TSLIB_FLAG) - -Xchips_DEPENDENCIES = $(CHIPS_LIBS) @KDRIVE_LIBS@ + @KDRIVE_LIBS@ \ + @XSERVER_LIBS@ diff --git a/hw/kdrive/chips/chipsstub.c b/hw/kdrive/chips/chipsstub.c index 3499a4874..7fec1c77d 100644 --- a/hw/kdrive/chips/chipsstub.c +++ b/hw/kdrive/chips/chipsstub.c @@ -48,7 +48,8 @@ InitOutput (ScreenInfo *pScreenInfo, int argc, char **argv) void InitInput (int argc, char **argv) { - KdInitInput (&LinuxMouseFuncs, &LinuxKeyboardFuncs); + KdOsAddInputDrivers (); + KdInitInput (); } void diff --git a/hw/kdrive/ephyr/Makefile.am b/hw/kdrive/ephyr/Makefile.am index f423bfe40..c201fe9d6 100644 --- a/hw/kdrive/ephyr/Makefile.am +++ b/hw/kdrive/ephyr/Makefile.am @@ -5,11 +5,6 @@ INCLUDES = \ noinst_LIBRARIES = libxephyr.a libxephyr-hostx.a -if TSLIB -TSLIB_LIBS = -lts -endif - - bin_PROGRAMS = Xephyr libxephyr_a_SOURCES = \ @@ -33,12 +28,4 @@ Xephyr_LDADD = \ libxephyr-hostx.a \ ../../../exa/libexa.la \ @KDRIVE_LIBS@ \ - @KDRIVE_LIBS@ \ - $(TSLIB_LIBS) \ @XEPHYR_LIBS@ - -Xephyr_DEPENDENCIES = \ - libxephyr.a \ - libxephyr-hostx.a \ - @KDRIVE_LIBS@ \ - ../../../exa/libexa.la diff --git a/hw/kdrive/ephyr/ephyr.c b/hw/kdrive/ephyr/ephyr.c index a9ea0eb0c..7db8675d8 100644 --- a/hw/kdrive/ephyr/ephyr.c +++ b/hw/kdrive/ephyr/ephyr.c @@ -36,10 +36,18 @@ #include "inputstr.h" extern int KdTsPhyScreen; -extern DeviceIntPtr pKdKeyboard; +KdKeyboardInfo *ephyrKbd; +KdPointerInfo *ephyrMouse; +EphyrKeySyms ephyrKeySyms; static int mouseState = 0; +typedef struct _EphyrInputPrivate { + Bool enabled; +} EphyrKbdPrivate, EphyrPointerPrivate; + +Bool EphyrWantGrayScale = 0; + Bool ephyrInitialize (KdCardInfo *card, EphyrPriv *priv) { @@ -80,7 +88,10 @@ ephyrScreenInitialize (KdScreenInfo *screen, EphyrScrPriv *scrpriv) screen->width = width; screen->height = height; } - + + if (EphyrWantGrayScale) + screen->fb[0].depth = 8; + if (screen->fb[0].depth && screen->fb[0].depth != hostx_get_depth()) { if (screen->fb[0].depth < hostx_get_depth() @@ -98,12 +109,15 @@ ephyrScreenInitialize (KdScreenInfo *screen, EphyrScrPriv *scrpriv) if (screen->fb[0].depth <= 8) { - screen->fb[0].visuals = ((1 << StaticGray) | - (1 << GrayScale) | - (1 << StaticColor) | - (1 << PseudoColor) | - (1 << TrueColor) | - (1 << DirectColor)); + if (EphyrWantGrayScale) + screen->fb[0].visuals = ((1 << StaticGray) | (1 << GrayScale)); + else + screen->fb[0].visuals = ((1 << StaticGray) | + (1 << GrayScale) | + (1 << StaticColor) | + (1 << PseudoColor) | + (1 << TrueColor) | + (1 << DirectColor)); screen->fb[0].redMask = 0x00; screen->fb[0].greenMask = 0x00; @@ -198,15 +212,14 @@ ephyrMapFramebuffer (KdScreenInfo *screen) { EphyrScrPriv *scrpriv = screen->driver; EphyrPriv *priv = screen->card->driver; - KdMouseMatrix m; + KdPointerMatrix m; int buffer_height; EPHYR_DBG(" screen->width: %d, screen->height: %d", screen->width, screen->height); - KdComputeMouseMatrix (&m, scrpriv->randr, screen->width, screen->height); - - KdSetMouseMatrix (&m); + KdComputePointerMatrix (&m, scrpriv->randr, screen->width, screen->height); + KdSetPointerMatrix (&m); priv->bytes_per_line = ((screen->width * screen->fb[0].bitsPerPixel + 31) >> 5) << 2; @@ -711,8 +724,9 @@ ephyrUpdateModifierState(unsigned int state) kptr = &keyc->down[key >> 3]; bit = 1 << (key & 7); - if (*kptr & bit) - KdEnqueueKeyboardEvent(key, TRUE); /* release */ + if (*kptr & bit && ephyrKbd && + ((EphyrKbdPrivate *)ephyrKbd->driverPrivate)->enabled) + KdEnqueueKeyboardEvent(ephyrKbd, key, TRUE); /* release */ if (--count == 0) break; @@ -724,7 +738,9 @@ ephyrUpdateModifierState(unsigned int state) for (key = 0; key < MAP_LENGTH; key++) if (keyc->modifierMap[key] & mask) { - KdEnqueueKeyboardEvent(key, FALSE); /* press */ + if (keyc->modifierMap[key] & mask && ephyrKbd && + ((EphyrKbdPrivate *)ephyrKbd->driverPrivate)->enabled) + KdEnqueueKeyboardEvent(ephyrKbd, key, FALSE); /* press */ break; } } @@ -740,31 +756,47 @@ ephyrPoll(void) switch (ev.type) { case EPHYR_EV_MOUSE_MOTION: - KdEnqueueMouseEvent(kdMouseInfo, mouseState, - ev.data.mouse_motion.x, - ev.data.mouse_motion.y); + if (!ephyrMouse || + !((EphyrPointerPrivate *)ephyrMouse->driverPrivate)->enabled) + continue; + KdEnqueuePointerEvent(ephyrMouse, mouseState, + ev.data.mouse_motion.x, + ev.data.mouse_motion.y, + 0); break; case EPHYR_EV_MOUSE_PRESS: + if (!ephyrMouse || + !((EphyrPointerPrivate *)ephyrMouse->driverPrivate)->enabled) + continue; ephyrUpdateModifierState(ev.key_state); mouseState |= ev.data.mouse_down.button_num; - KdEnqueueMouseEvent(kdMouseInfo, mouseState|KD_MOUSE_DELTA, 0, 0); + KdEnqueuePointerEvent(ephyrMouse, mouseState|KD_MOUSE_DELTA, 0, 0, 0); break; case EPHYR_EV_MOUSE_RELEASE: + if (!ephyrMouse || + !((EphyrPointerPrivate *)ephyrMouse->driverPrivate)->enabled) + continue; ephyrUpdateModifierState(ev.key_state); mouseState &= ~ev.data.mouse_up.button_num; - KdEnqueueMouseEvent(kdMouseInfo, mouseState|KD_MOUSE_DELTA, 0, 0); + KdEnqueuePointerEvent(ephyrMouse, mouseState|KD_MOUSE_DELTA, 0, 0, 0); break; case EPHYR_EV_KEY_PRESS: + if (!ephyrKbd || + !((EphyrKbdPrivate *)ephyrKbd->driverPrivate)->enabled) + continue; ephyrUpdateModifierState(ev.key_state); - KdEnqueueKeyboardEvent (ev.data.key_down.scancode, FALSE); + KdEnqueueKeyboardEvent (ephyrKbd, ev.data.key_down.scancode, FALSE); break; case EPHYR_EV_KEY_RELEASE: + if (!ephyrKbd || + !((EphyrKbdPrivate *)ephyrKbd->driverPrivate)->enabled) + continue; ephyrUpdateModifierState(ev.key_state); - KdEnqueueKeyboardEvent (ev.data.key_up.scancode, TRUE); + KdEnqueueKeyboardEvent (ephyrKbd, ev.data.key_up.scancode, TRUE); break; default: @@ -825,59 +857,112 @@ ephyrPutColors (ScreenPtr pScreen, int fb, int n, xColorItem *pdefs) /* Mouse calls */ -static Bool -MouseInit (void) +static Status +MouseInit (KdPointerInfo *pi) { - return TRUE; + pi->driverPrivate = (EphyrPointerPrivate *) + xcalloc(sizeof(EphyrPointerPrivate), 1); + ((EphyrPointerPrivate *)pi->driverPrivate)->enabled = FALSE; + pi->nAxes = 3; + pi->nButtons = 32; + pi->name = KdSaveString("Xephyr virtual mouse"); + ephyrMouse = pi; + return Success; +} + +static Status +MouseEnable (KdPointerInfo *pi) +{ + ((EphyrPointerPrivate *)pi->driverPrivate)->enabled = TRUE; + return Success; } static void -MouseFini (void) +MouseDisable (KdPointerInfo *pi) { - ; + ((EphyrPointerPrivate *)pi->driverPrivate)->enabled = FALSE; + return; } -KdMouseFuncs EphyrMouseFuncs = { +static void +MouseFini (KdPointerInfo *pi) +{ + ephyrMouse = NULL; + return; +} + +KdPointerDriver EphyrMouseDriver = { + "ephyr", MouseInit, + MouseEnable, + MouseDisable, MouseFini, + NULL, }; /* Keyboard */ -static void -EphyrKeyboardLoad (void) +static Status +EphyrKeyboardInit (KdKeyboardInfo *ki) { - EPHYR_DBG("mark"); - + ki->driverPrivate = (EphyrKbdPrivate *) + xcalloc(sizeof(EphyrKbdPrivate), 1); hostx_load_keymap(); + if (!ephyrKeySyms.map) { + ErrorF("Couldn't load keymap from host\n"); + return BadAlloc; + } + ki->keySyms.minKeyCode = ephyrKeySyms.minKeyCode; + ki->keySyms.maxKeyCode = ephyrKeySyms.maxKeyCode; + ki->minScanCode = ki->keySyms.minKeyCode; + ki->maxScanCode = ki->keySyms.maxKeyCode; + ki->keySyms.mapWidth = ephyrKeySyms.mapWidth; + ki->keySyms.map = ephyrKeySyms.map; + ki->name = KdSaveString("Xephyr virtual keyboard"); + ephyrKbd = ki; + return Success; } -static int -EphyrKeyboardInit (void) +static Status +EphyrKeyboardEnable (KdKeyboardInfo *ki) { - return 0; + ((EphyrKbdPrivate *)ki->driverPrivate)->enabled = TRUE; + + return Success; } static void -EphyrKeyboardFini (void) +EphyrKeyboardDisable (KdKeyboardInfo *ki) +{ + ((EphyrKbdPrivate *)ki->driverPrivate)->enabled = FALSE; +} + +static void +EphyrKeyboardFini (KdKeyboardInfo *ki) +{ + /* not xfree: we call malloc from hostx.c. */ + free(ki->keySyms.map); + ephyrKbd = NULL; + return; +} + +static void +EphyrKeyboardLeds (KdKeyboardInfo *ki, int leds) { } static void -EphyrKeyboardLeds (int leds) +EphyrKeyboardBell (KdKeyboardInfo *ki, int volume, int frequency, int duration) { } -static void -EphyrKeyboardBell (int volume, int frequency, int duration) -{ -} - -KdKeyboardFuncs EphyrKeyboardFuncs = { - EphyrKeyboardLoad, +KdKeyboardDriver EphyrKeyboardDriver = { + "ephyr", EphyrKeyboardInit, + EphyrKeyboardEnable, EphyrKeyboardLeds, EphyrKeyboardBell, + EphyrKeyboardDisable, EphyrKeyboardFini, - 0, + NULL, }; diff --git a/hw/kdrive/ephyr/ephyr.h b/hw/kdrive/ephyr/ephyr.h index 707cb0168..f49d920d1 100644 --- a/hw/kdrive/ephyr/ephyr.h +++ b/hw/kdrive/ephyr/ephyr.h @@ -31,7 +31,6 @@ #include "os.h" /* for OsSignal() */ #include "kdrive.h" -#include "kkeymap.h" #include "hostx.h" #include "exa.h" @@ -68,7 +67,9 @@ typedef struct _ephyrScrPriv { EphyrFakexaPriv *fakexa; } EphyrScrPriv; -extern KdCardFuncs ephyrFuncs; +extern KdCardFuncs ephyrFuncs; +extern KdKeyboardInfo *ephyrKbd; +extern KdPointerInfo *ephyrMouse; Bool ephyrInitialize (KdCardInfo *card, EphyrPriv *priv); @@ -167,9 +168,9 @@ ephyrShadowUpdate (ScreenPtr pScreen, shadowBufPtr pBuf); void ephyrUpdateModifierState(unsigned int state); -extern KdMouseFuncs EphyrMouseFuncs; +extern KdPointerDriver EphyrMouseDriver; -extern KdKeyboardFuncs EphyrKeyboardFuncs; +extern KdKeyboardDriver EphyrKeyboardDriver; extern KdOsFuncs EphyrOsFuncs; diff --git a/hw/kdrive/ephyr/ephyrinit.c b/hw/kdrive/ephyr/ephyrinit.c index 58478e690..a77b87e5e 100644 --- a/hw/kdrive/ephyr/ephyrinit.c +++ b/hw/kdrive/ephyr/ephyrinit.c @@ -29,6 +29,7 @@ #include "ephyr.h" extern Window EphyrPreExistingHostWin; +extern Bool EphyrWantGrayScale; void InitCard (char *name) @@ -50,7 +51,24 @@ InitOutput (ScreenInfo *pScreenInfo, int argc, char **argv) void InitInput (int argc, char **argv) { - KdInitInput (&EphyrMouseFuncs, &EphyrKeyboardFuncs); + KdKeyboardInfo *ki; + KdPointerInfo *pi; + + ki = KdNewKeyboard(); + if (!ki) + FatalError("Couldn't create Xephyr keyboard\n"); + ki->driver = &EphyrKeyboardDriver; + KdAddKeyboardDriver(&EphyrKeyboardDriver); + KdAddKeyboard(ki); + + pi = KdNewPointer(); + if (!pi) + FatalError("Couldn't create Xephyr pointer\n"); + pi->driver = &EphyrMouseDriver; + KdAddPointerDriver(&EphyrMouseDriver); + KdAddPointer(pi); + + KdInitInput(); } void @@ -62,6 +80,7 @@ ddxUseMsg (void) ErrorF("-parent XID Use existing window as Xephyr root win\n"); ErrorF("-host-cursor Re-use exisiting X host server cursor\n"); ErrorF("-fullscreen Attempt to run Xephyr fullscreen\n"); + ErrorF("-grayscale Simulate 8bit grayscale\n"); ErrorF("-fakexa Simulate acceleration using software rendering\n"); ErrorF("\n"); @@ -94,6 +113,11 @@ ddxProcessArgument (int argc, char **argv, int i) hostx_use_fullscreen(); return 1; } + else if (!strcmp (argv[i], "-grayscale")) + { + EphyrWantGrayScale = 1; + return 1; + } else if (!strcmp (argv[i], "-fakexa")) { ephyrFuncs.initAccel = ephyrDrawInit; diff --git a/hw/kdrive/ephyr/hostx.c b/hw/kdrive/ephyr/hostx.c index ae776a7eb..573f77489 100644 --- a/hw/kdrive/ephyr/hostx.c +++ b/hw/kdrive/ephyr/hostx.c @@ -77,14 +77,8 @@ static EphyrHostXVars HostX = { "?", 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}; static int HostXWantDamageDebug = 0; -extern KeySym EphyrKeymap[]; +extern EphyrKeySyms ephyrKeySyms; -extern KeySym kdKeymap[]; -extern int kdMinScanCode; -extern int kdMaxScanCode; -extern int kdMinKeyCode; -extern int kdMaxKeyCode; -extern int kdKeymapWidth; extern int monitorResolution; static void @@ -403,9 +397,9 @@ hostx_get_bpp(void) } void -hostx_get_visual_masks (unsigned long *rmsk, - unsigned long *gmsk, - unsigned long *bmsk) +hostx_get_visual_masks (CARD32 *rmsk, + CARD32 *gmsk, + CARD32 *bmsk) { if (host_depth_matches_server()) { @@ -533,15 +527,9 @@ hostx_screen_init (int width, int height, int buffer_height) /* Ask the WM to keep our size static */ size_hints = XAllocSizeHints(); -#if 0 size_hints->max_width = size_hints->min_width = width; size_hints->max_height = size_hints->min_height = height; size_hints->flags = PMinSize|PMaxSize; -#else - size_hints->min_width = 100; - size_hints->min_height = 100; - size_hints->flags = PMinSize; -#endif XSetWMNormalHints(HostX.dpy, HostX.win, size_hints); XFree(size_hints); @@ -669,7 +657,7 @@ void hostx_load_keymap(void) { KeySym *keymap; - int mapWidth, min_keycode, max_keycode; + int host_width, min_keycode, max_keycode, width; int i,j; XDisplayKeycodes(HostX.dpy, &min_keycode, &max_keycode); @@ -679,33 +667,31 @@ hostx_load_keymap(void) keymap = XGetKeyboardMapping(HostX.dpy, min_keycode, max_keycode - min_keycode + 1, - &mapWidth); + &host_width); /* Try and copy the hosts keymap into our keymap to avoid loads * of messing around. * * kdrive cannot can have more than 4 keysyms per keycode - * so we only copy the first 4 ( xorg has 6 per keycode ) + * so we only copy at most the first 4 ( xorg has 6 per keycode, XVNC 2 ) */ + width = (host_width > 4) ? 4 : host_width; + + ephyrKeySyms.map = (KeySym *)calloc(sizeof(KeySym), + (max_keycode - min_keycode + 1) * + width); + if (!ephyrKeySyms.map) + return; for (i=0; i<(max_keycode - min_keycode+1); i++) - for (j=0; j<4; j++) - kdKeymap[ (i*4)+j ] = keymap[ (i*mapWidth) + j ]; + for (j=0; j 4) ? 4 : mapWidth; + ephyrKeySyms.minKeyCode = min_keycode; + ephyrKeySyms.maxKeyCode = max_keycode; + ephyrKeySyms.mapWidth = width; XFree(keymap); } diff --git a/hw/kdrive/ephyr/hostx.h b/hw/kdrive/ephyr/hostx.h index d3f6da3d3..4e3c6af33 100644 --- a/hw/kdrive/ephyr/hostx.h +++ b/hw/kdrive/ephyr/hostx.h @@ -26,6 +26,9 @@ #ifndef _XLIBS_STUFF_H_ #define _XLIBS_STUFF_H_ +#include +#include + #define EPHYR_WANT_DEBUG 0 #if (EPHYR_WANT_DEBUG) @@ -48,6 +51,14 @@ typedef enum EphyrHostXEventType } EphyrHostXEventType; +/* I can't believe it's not a KeySymsRec. */ +typedef struct { + int minKeyCode; + int maxKeyCode; + int mapWidth; + KeySym *map; +} EphyrKeySyms; + struct EphyrHostXEvent { EphyrHostXEventType type; @@ -126,9 +137,9 @@ int hostx_get_bpp(void); void -hostx_get_visual_masks (unsigned long *rmsk, - unsigned long *gmsk, - unsigned long *bmsk); +hostx_get_visual_masks (CARD32 *rmsk, + CARD32 *gmsk, + CARD32 *bmsk); void hostx_set_cmap_entry(unsigned char idx, unsigned char r, diff --git a/hw/kdrive/ephyr/os.c b/hw/kdrive/ephyr/os.c index ead15868b..1a42495f3 100644 --- a/hw/kdrive/ephyr/os.c +++ b/hw/kdrive/ephyr/os.c @@ -34,34 +34,8 @@ EphyrInit (void) return hostx_init(); } -static void -EphyrEnable (void) -{ - EPHYR_DBG("mark"); -} - -static Bool -EphyrSpecialKey (KeySym sym) -{ - return FALSE; -} - -static void -EphyrDisable (void) -{ -} - -static void -EphyrFini (void) -{ -} - KdOsFuncs EphyrOsFuncs = { - EphyrInit, - EphyrEnable, - EphyrSpecialKey, - EphyrDisable, - EphyrFini, - ephyrPoll + .Init = EphyrInit, + .pollEvents = ephyrPoll, }; diff --git a/hw/kdrive/epson/Makefile.am b/hw/kdrive/epson/Makefile.am index 0538f4c39..a5bc70b02 100644 --- a/hw/kdrive/epson/Makefile.am +++ b/hw/kdrive/epson/Makefile.am @@ -4,10 +4,6 @@ INCLUDES = \ bin_PROGRAMS = Xepson -if TSLIB -TSLIB_FLAG = -lts -endif - noinst_LIBRARIES = libepson.a libepson_a_SOURCES = \ @@ -25,9 +21,6 @@ EPSON_LIBS = \ @KDRIVE_LIBS@ Xepson_LDADD = \ - $(EPSON_LIBS) \ + $(EPSON_LIBS) \ @KDRIVE_LIBS@ \ - @XSERVER_LIBS@ \ - $(TSLIB_FLAG) - -Xepson_DEPENDENCIES = $(EPSON_LIBS) @KDRIVE_LIBS@ + @XSERVER_LIBS@ diff --git a/hw/kdrive/epson/epson13806stub.c b/hw/kdrive/epson/epson13806stub.c index 125d90289..7981782ed 100644 --- a/hw/kdrive/epson/epson13806stub.c +++ b/hw/kdrive/epson/epson13806stub.c @@ -53,10 +53,8 @@ InitOutput (ScreenInfo *pScreenInfo, int argc, char **argv) void InitInput (int argc, char **argv) { - KdInitInput (&LinuxMouseFuncs, &LinuxKeyboardFuncs); -#ifdef TOUCHSCREEN - KdAddMouseDriver (&TsFuncs); -#endif + KdOsAddInputDrivers (); + KdInitInput (); } int diff --git a/hw/kdrive/fake/Makefile.am b/hw/kdrive/fake/Makefile.am index f3a6a3453..d7ebfc243 100644 --- a/hw/kdrive/fake/Makefile.am +++ b/hw/kdrive/fake/Makefile.am @@ -6,10 +6,6 @@ noinst_LIBRARIES = libfake.a bin_PROGRAMS = Xfake -if TSLIB -TSLIB_FLAG = -lts -endif - libfake_a_SOURCES = \ fake.c \ kbd.c \ @@ -23,11 +19,4 @@ Xfake_SOURCES = \ Xfake_LDADD = \ libfake.a \ @KDRIVE_LIBS@ \ - @KDRIVE_LIBS@ \ - $(TSLIB_FLAG) \ @XSERVER_LIBS@ - -Xfake_DEPENDENCIES = \ - libfake.a \ - @KDRIVE_LIBS@ - diff --git a/hw/kdrive/fake/fake.c b/hw/kdrive/fake/fake.c index d56512b3f..ca515f9b6 100644 --- a/hw/kdrive/fake/fake.c +++ b/hw/kdrive/fake/fake.c @@ -158,7 +158,7 @@ Bool fakeMapFramebuffer (KdScreenInfo *screen) { FakeScrPriv *scrpriv = screen->driver; - KdMouseMatrix m; + KdPointerMatrix m; FakePriv *priv = screen->card->driver; if (scrpriv->randr != RR_Rotate_0) @@ -166,9 +166,9 @@ fakeMapFramebuffer (KdScreenInfo *screen) else scrpriv->shadow = FALSE; - KdComputeMouseMatrix (&m, scrpriv->randr, screen->width, screen->height); + KdComputePointerMatrix (&m, scrpriv->randr, screen->width, screen->height); - KdSetMouseMatrix (&m); + KdSetPointerMatrix (&m); priv->bytes_per_line = ((screen->width * screen->fb[0].bitsPerPixel + 31) >> 5) << 2; if (priv->base) diff --git a/hw/kdrive/fake/fake.h b/hw/kdrive/fake/fake.h index 4d90d3169..f7c8c3431 100644 --- a/hw/kdrive/fake/fake.h +++ b/hw/kdrive/fake/fake.h @@ -130,9 +130,9 @@ fakeRandRInit (ScreenPtr pScreen); #endif -extern KdMouseFuncs FakeMouseFuncs; +extern KdPointerDriver FakePointerDriver; -extern KdKeyboardFuncs FakeKeyboardFuncs; +extern KdKeyboardDriver FakeKeyboardDriver; extern KdOsFuncs FakeOsFuncs; diff --git a/hw/kdrive/fake/fakeinit.c b/hw/kdrive/fake/fakeinit.c index c5ee4bc3f..dd88bc5a7 100644 --- a/hw/kdrive/fake/fakeinit.c +++ b/hw/kdrive/fake/fakeinit.c @@ -44,7 +44,22 @@ InitOutput (ScreenInfo *pScreenInfo, int argc, char **argv) void InitInput (int argc, char **argv) { - KdInitInput (&FakeMouseFuncs, &FakeKeyboardFuncs); + KdPointerInfo *pi; + KdKeyboardInfo *ki; + + pi = KdNewPointer (); + if (!pi) + return; + pi->driver = &FakePointerDriver; + KdAddPointer(pi); + + ki = KdNewKeyboard (); + if (!ki) + return; + ki->driver = &FakeKeyboardDriver; + KdAddKeyboard(ki); + + KdInitInput (); } void diff --git a/hw/kdrive/fake/kbd.c b/hw/kdrive/fake/kbd.c index 9cf4de060..db224c995 100644 --- a/hw/kdrive/fake/kbd.c +++ b/hw/kdrive/fake/kbd.c @@ -27,7 +27,6 @@ #include #endif #include "fake.h" -#include "kkeymap.h" #include #define FAKE_WIDTH 2 @@ -155,41 +154,58 @@ KeySym FakeKeymap[] = { /* 116 123 */ NoSymbol, NoSymbol, /* tiny button */ }; -static void -FakeKeyboardLoad (void) +static Status +FakeKeyboardInit (KdKeyboardInfo *ki) { - kdMinScanCode = 1; - kdKeymapWidth = FAKE_WIDTH; - kdMaxScanCode = (sizeof (FakeKeymap) / sizeof (FakeKeymap[0])) / FAKE_WIDTH; - memcpy (kdKeymap, FakeKeymap, sizeof (FakeKeymap)); + ki->keySyms.minKeyCode = 1; + ki->keySyms.maxKeyCode = (sizeof (FakeKeymap) / sizeof (FakeKeymap[0])) / FAKE_WIDTH; + ki->keySyms.mapWidth = FAKE_WIDTH; + if (ki->keySyms.map) + xfree(ki->keySyms.map); + ki->keySyms.map = (KeySym *)xalloc(sizeof(FakeKeymap)); + if (!ki->keySyms.map) + return BadAlloc; + memcpy (ki->keySyms.map, FakeKeymap, sizeof (FakeKeymap)); + + return Success; } -static int -FakeKeyboardInit (void) +static Status +FakeKeyboardEnable (KdKeyboardInfo *ki) { - return 0; + return Success; } static void -FakeKeyboardFini (void) +FakeKeyboardDisable (KdKeyboardInfo *ki) +{ + return; +} + +static void +FakeKeyboardFini (KdKeyboardInfo *ki) +{ + xfree(ki->keySyms.map); + ki->keySyms.map = NULL; +} + +static void +FakeKeyboardLeds (KdKeyboardInfo *ki, int leds) { } static void -FakeKeyboardLeds (int leds) +FakeKeyboardBell (KdKeyboardInfo *ki, int volume, int frequency, int duration) { } -static void -FakeKeyboardBell (int volume, int frequency, int duration) -{ -} - -KdKeyboardFuncs FakeKeyboardFuncs = { - FakeKeyboardLoad, +KdKeyboardDriver FakeKeyboardDriver = { + "fake", FakeKeyboardInit, + FakeKeyboardEnable, FakeKeyboardLeds, FakeKeyboardBell, + FakeKeyboardDisable, FakeKeyboardFini, - 0, + NULL, }; diff --git a/hw/kdrive/fake/mouse.c b/hw/kdrive/fake/mouse.c index 714a45123..beb6ff524 100644 --- a/hw/kdrive/fake/mouse.c +++ b/hw/kdrive/fake/mouse.c @@ -35,19 +35,35 @@ #include "scrnintstr.h" #include "kdrive.h" -static Bool -MouseInit (void) +static Status +MouseInit (KdPointerInfo *pi) { - return TRUE; + return Success; +} + +static Status +MouseEnable (KdPointerInfo *pi) +{ + return Success; } static void -MouseFini (void) +MouseDisable (KdPointerInfo *pi) { + return; +} + +static void +MouseFini (KdPointerInfo *pi) +{ + return; } -KdMouseFuncs FakeMouseFuncs = { +KdPointerDriver FakePointerDriver = { + "fake", MouseInit, + MouseEnable, + MouseDisable, MouseFini, }; diff --git a/hw/kdrive/fbdev/Makefile.am b/hw/kdrive/fbdev/Makefile.am index fce6df9f4..cb7180184 100644 --- a/hw/kdrive/fbdev/Makefile.am +++ b/hw/kdrive/fbdev/Makefile.am @@ -4,26 +4,18 @@ INCLUDES = \ noinst_LIBRARIES = libfbdev.a -bin_PROGRAMS = Xfbdev - -if TSLIB -TSLIB_FLAG = -lts -endif - libfbdev_a_SOURCES = \ fbdev.c \ fbdev.h +if KDRIVEFBDEV +bin_PROGRAMS = Xfbdev + Xfbdev_SOURCES = \ fbinit.c Xfbdev_LDADD = \ libfbdev.a \ @KDRIVE_LIBS@ \ - @XSERVER_LIBS@ \ - $(TSLIB_FLAG) - -Xfbdev_DEPENDENCIES = \ - libfbdev.a \ - @KDRIVE_LIBS@ - + @XSERVER_LIBS@ +endif diff --git a/hw/kdrive/fbdev/fbdev.c b/hw/kdrive/fbdev/fbdev.c index 86384f0a4..598d0ceaf 100644 --- a/hw/kdrive/fbdev/fbdev.c +++ b/hw/kdrive/fbdev/fbdev.c @@ -33,16 +33,24 @@ extern int KdTsPhyScreen; +char *fbdevDevicePath = NULL; + Bool fbdevInitialize (KdCardInfo *card, FbdevPriv *priv) { int k; unsigned long off; - if ((priv->fd = open("/dev/fb0", O_RDWR)) < 0 && \ - (priv->fd = open("/dev/fb/0", O_RDWR)) < 0) { - perror("Error opening /dev/fb0"); - return FALSE; - } + + if (fbdevDevicePath == NULL) + fbdevDevicePath = "/dev/fb0"; + + if ((priv->fd = open(fbdevDevicePath, O_RDWR)) < 0) + { + ErrorF("Error opening framebuffer %s: %s\n", + fbdevDevicePath, strerror(errno)); + return FALSE; + } + /* quiet valgrind */ memset (&priv->fix, '\0', sizeof (priv->fix)); if ((k=ioctl(priv->fd, FBIOGET_FSCREENINFO, &priv->fix)) < 0) { @@ -323,7 +331,7 @@ Bool fbdevMapFramebuffer (KdScreenInfo *screen) { FbdevScrPriv *scrpriv = screen->driver; - KdMouseMatrix m; + KdPointerMatrix m; FbdevPriv *priv = screen->card->driver; if (scrpriv->randr != RR_Rotate_0) @@ -331,9 +339,9 @@ fbdevMapFramebuffer (KdScreenInfo *screen) else scrpriv->shadow = FALSE; - KdComputeMouseMatrix (&m, scrpriv->randr, screen->width, screen->height); + KdComputePointerMatrix (&m, scrpriv->randr, screen->width, screen->height); - KdSetMouseMatrix (&m); + KdSetPointerMatrix (&m); screen->width = priv->var.xres; screen->height = priv->var.yres; diff --git a/hw/kdrive/fbdev/fbdev.h b/hw/kdrive/fbdev/fbdev.h index d37b99597..b7951db72 100644 --- a/hw/kdrive/fbdev/fbdev.h +++ b/hw/kdrive/fbdev/fbdev.h @@ -53,6 +53,7 @@ typedef struct _fbdevScrPriv { } FbdevScrPriv; extern KdCardFuncs fbdevFuncs; +extern char* fbdevDevicePath; Bool fbdevInitialize (KdCardInfo *card, FbdevPriv *priv); diff --git a/hw/kdrive/fbdev/fbinit.c b/hw/kdrive/fbdev/fbinit.c index ba9d1c695..3b78c9735 100644 --- a/hw/kdrive/fbdev/fbinit.c +++ b/hw/kdrive/fbdev/fbinit.c @@ -45,24 +45,45 @@ InitOutput (ScreenInfo *pScreenInfo, int argc, char **argv) void InitInput (int argc, char **argv) { - KdInitInput (&LinuxMouseFuncs, &LinuxKeyboardFuncs); -#ifdef TOUCHSCREEN - KdAddMouseDriver (&TsFuncs); + KdKeyboardInfo *ki; + + KdAddKeyboardDriver (&LinuxKeyboardDriver); + KdAddPointerDriver (&LinuxMouseDriver); +#ifdef TSLIB + KdAddPointerDriver (&TsDriver); #endif + + ki = KdParseKeyboard ("keybd"); + KdAddKeyboard(ki); + + KdInitInput (); } void ddxUseMsg (void) { - KdUseMsg(); + KdUseMsg(); + ErrorF("\nXfbdev Device Usage:\n"); + ErrorF("-fb path Framebuffer device to use. Defaults to /dev/fb0\n"); + ErrorF("\n"); } int ddxProcessArgument (int argc, char **argv, int i) { - return KdProcessArgument (argc, argv, i); -} + if (!strcmp (argv[i], "-fb")) + { + if (i+1 < argc) + { + fbdevDevicePath = argv[i+1]; + return 2; + } + UseMsg(); + exit(1); + } + return KdProcessArgument (argc, argv, i); +} KdCardFuncs fbdevFuncs = { diff --git a/hw/kdrive/i810/Makefile.am b/hw/kdrive/i810/Makefile.am index d676a6902..503958571 100644 --- a/hw/kdrive/i810/Makefile.am +++ b/hw/kdrive/i810/Makefile.am @@ -6,9 +6,6 @@ bin_PROGRAMS = Xi810 noinst_LIBRARIES = libi810.a -if TSLIB -TSLIB_FLAG = -lts -endif libi810_a_SOURCES = \ i810_cursor.c \ @@ -29,7 +26,4 @@ I810_LIBS = \ Xi810_LDADD = \ $(I810_LIBS) \ @KDRIVE_LIBS@ \ - @XSERVER_LIBS@ \ - $(TSLIB_FLAG) - -Xi810_DEPENDENCIES = $(I810_LIBS) @KDRIVE_LIBS@ + @XSERVER_LIBS@ diff --git a/hw/kdrive/i810/i810stub.c b/hw/kdrive/i810/i810stub.c index c195947c9..364d16bfe 100644 --- a/hw/kdrive/i810/i810stub.c +++ b/hw/kdrive/i810/i810stub.c @@ -73,7 +73,8 @@ InitOutput (ScreenInfo *pScreenInfo, int argc, char **argv) void InitInput (int argc, char **argv) { - KdInitInput (&LinuxMouseFuncs, &LinuxKeyboardFuncs); + KdOsAddInputDrivers (); + KdInitInput (); } void diff --git a/hw/kdrive/igs/igsstub.c b/hw/kdrive/igs/igsstub.c index b0ce151f0..39c6fd4ed 100644 --- a/hw/kdrive/igs/igsstub.c +++ b/hw/kdrive/igs/igsstub.c @@ -56,7 +56,8 @@ InitOutput (ScreenInfo *pScreenInfo, int argc, char **argv) void InitInput (int argc, char **argv) { - KdInitInput (&LinuxMouseFuncs, &LinuxKeyboardFuncs); + KdOsAddInputDrivers (); + KdInitInput (); } void diff --git a/hw/kdrive/itsy/kbd.c b/hw/kdrive/itsy/kbd.c index 76062c5a8..beb4685d4 100644 --- a/hw/kdrive/itsy/kbd.c +++ b/hw/kdrive/itsy/kbd.c @@ -27,7 +27,6 @@ #include #endif #include "itsy.h" -#include "kkeymap.h" #include #include @@ -167,28 +166,44 @@ ItsyKeyboardLoad (void) { KeySym *k; - itsyButtonState = 0; - kdMinScanCode = 1; - kdKeymapWidth = ITSY_WIDTH; - kdMaxScanCode = (sizeof (ItsyKeymap) / sizeof (ItsyKeymap[0])) / ITSY_WIDTH; - memcpy (kdKeymap, ItsyKeymap, sizeof (ItsyKeymap)); } -int -ItsyKeyboardInit (void) +static Status +ItsyKeyboardInit (KdKeyboardInfo *ki) { - int butPort; + if (!ki) + return BadImplementation; - butPort = open ("/dev/buttons", 0); - fprintf (stderr, "butPort %d\n", butPort); - return butPort; + ki->driverPrivate = open ("/dev/buttons", 0); + + itsyButtonState = 0; + ki->keySyms.minKeyCode = 1; + ki->keySyms.maxKeyCode = (sizeof (ItsyKeymap) / sizeof (ItsyKeymap[0])) / ITSY_WIDTH; + ki->minScanCode = ki->keySyms.minKeyCode; + ki->maxScanCode = ki->keySyms.maxKeyCode; + ki->keySyms.mapWidth = ITSY_WIDTH; + + if (ki->keySyms.map) + xfree(ki->keySyms.map); + ki->keySyms.map = xalloc(sizeof(ItsyKeymap)); + if (!ki->keySyms.map) + return BadAlloc; + memcpy (kdKeymap, ItsyKeymap, sizeof (ItsyKeymap)); + + return Success; } -void -ItsyKeyboardFini (int fd) +static void +ItsyKeyboardDisable (KdKeybdInfo *ki) { if (fd >= 0) - close (fd); + close ((int)ki->driverPrivate); +} + +static void +ItsyKeyboardFini (KdKeybdInfo *ki) +{ + return; } void @@ -227,11 +242,13 @@ ItsyKeyboardBell (int volume, int frequency, int duration) } KdKeyboardFuncs itsyKeyboardFuncs = { - ItsyKeyboardLoad, + "itsy", ItsyKeyboardInit, + ItsyKeyboardEnable, ItsyKeyboardRead, ItsyKeyboardLeds, ItsyKeyboardBell, + ItsyKeyboardDisable ItsyKeyboardFini, - 0, + NULL, }; diff --git a/hw/kdrive/itsy/ts.c b/hw/kdrive/itsy/ts.c index c773c0e4f..180d1fd12 100644 --- a/hw/kdrive/itsy/ts.c +++ b/hw/kdrive/itsy/ts.c @@ -63,7 +63,7 @@ itsyTsReadBytes (int fd, char *buf, int len, int min) } void -itsyTsRead (int tsPort) +itsyTsRead (KdPointerInfo *pi, int tsPort) { ts_event event; long buf[3]; @@ -89,7 +89,7 @@ itsyTsRead (int tsPort) x = 0; y = 0; } - KdEnqueueMouseEvent (flags, x, y); + KdEnqueuePointerEvent (pi, flags, x, y, 0); } } @@ -204,7 +204,8 @@ itsyTsFini (int tsPort) close (tsPort); } -KdMouseFuncs itsyTsMouseFuncs = { +KdPointerDriver itsyTsMouseDriver = { + "itsyts", itsyTsInit, itsyTsRead, itsyTsFini diff --git a/hw/kdrive/linux/Makefile.am b/hw/kdrive/linux/Makefile.am index 29959df00..e13d08312 100644 --- a/hw/kdrive/linux/Makefile.am +++ b/hw/kdrive/linux/Makefile.am @@ -32,16 +32,3 @@ liblinux_a_SOURCES = \ $(KDRIVE_HW_SOURCES) \ $(TSLIB_C) \ $(TS_C) - -liblinux_a_DEPENDENCIES = \ - agp.c \ - bus.c \ - keyboard.c \ - linux.c \ - mouse.c \ - evdev.c \ - ms.c \ - ps2.c \ - $(TSLIB_C) \ - $(TS_C) - diff --git a/hw/kdrive/linux/bus.c b/hw/kdrive/linux/bus.c index be61f891a..8cf5f901f 100644 --- a/hw/kdrive/linux/bus.c +++ b/hw/kdrive/linux/bus.c @@ -55,7 +55,7 @@ BusRead (int adbPort, void *closure) flags |= KD_BUTTON_2; if ((buf[0] & 1) == 0) flags |= KD_BUTTON_3; - KdEnqueueMouseEvent (kdMouseInfo, flags, dx, dy); + KdEnqueuePointerEvent (closure, flags, dx, dy, 0); } } @@ -66,36 +66,71 @@ char *BusNames[] = { #define NUM_BUS_NAMES (sizeof (BusNames) / sizeof (BusNames[0])) -int BusInputType; +static int +BusInit (KdPointerInfo *pi) +{ + int i, fd = 0; + + if (!pi->path || (strcmp(pi->path, "auto") == 0)) + { + for (i = 0; i < NUM_BUS_NAMES; i++) + { + if ((fd = open (BusNames[i], 0)) > 0) + { + close(fd); + if (pi->path) + xfree(pi->path); + pi->path = KdSaveString(BusNames[i]); + return Success; + } + } + } + else + { + if ((fd = open(pi->path, 0)) > 0) + { + close(fd); + return Success; + } + } + + return !Success; +} static int -BusInit (void) +BusEnable (KdPointerInfo *pi) { - int i; - int busPort; - int n = 0; + int fd = open(pi->path, 0); - if (!BusInputType) - BusInputType = KdAllocInputType (); - - for (i = 0; i < NUM_BUS_NAMES; i++) + if (fd > 0) { - busPort = open (BusNames[i], 0); - { - KdRegisterFd (BusInputType, busPort, BusRead, 0); - n++; - } + KdRegisterFd(fd, BusRead, pi); + pi->driverPrivate = (void *)fd; + return Success; + } + else + { + return !Success; } - return n; } static void -BusFini (void) +BusDisable (KdPointerInfo *pi) { - KdUnregisterFds (BusInputType, TRUE); + KdUnregisterFd(pi, (int)pi->driverPrivate, TRUE); } -KdMouseFuncs BusMouseFuncs = { +static void +BusFini (KdPointerInfo *pi) +{ + return; +} + +KdPointerDriver BusMouseDriver = { + "bus", BusInit, - BusFini + BusEnable, + BusDisable, + BusFini, + NULL }; diff --git a/hw/kdrive/linux/evdev.c b/hw/kdrive/linux/evdev.c index d83b13a6e..6c08cfa62 100644 --- a/hw/kdrive/linux/evdev.c +++ b/hw/kdrive/linux/evdev.c @@ -43,98 +43,100 @@ #define ISBITSET(x,y) ((x)[LONG(y)] & BIT(y)) #define OFF(x) ((x)%BITS_PER_LONG) #define LONG(x) ((x)/BITS_PER_LONG) -#define BIT(x) (1 << OFF(x)) +#define BIT(x) (1 << OFF(x)) #define SETBIT(x,y) ((x)[LONG(y)] |= BIT(y)) #define CLRBIT(x,y) ((x)[LONG(y)] &= ~BIT(y)) #define ASSIGNBIT(x,y,z) ((x)[LONG(y)] = ((x)[LONG(y)] & ~BIT(y)) | (z << OFF(y))) typedef struct _kevdevMouse { /* current device state */ - int rel[REL_MAX + 1]; - int abs[ABS_MAX + 1]; - int prevabs[ABS_MAX + 1]; - long key[NBITS(KEY_MAX + 1)]; + int rel[REL_MAX + 1]; + int abs[ABS_MAX + 1]; + int prevabs[ABS_MAX + 1]; + long key[NBITS(KEY_MAX + 1)]; /* supported device info */ - long relbits[NBITS(REL_MAX + 1)]; - long absbits[NBITS(ABS_MAX + 1)]; - long keybits[NBITS(KEY_MAX + 1)]; + long relbits[NBITS(REL_MAX + 1)]; + long absbits[NBITS(ABS_MAX + 1)]; + long keybits[NBITS(KEY_MAX + 1)]; struct input_absinfo absinfo[ABS_MAX + 1]; - int max_rel; - int max_abs; + int max_rel; + int max_abs; + + int fd; } Kevdev; static void -EvdevMotion (KdMouseInfo *mi) +EvdevMotion (KdPointerInfo *pi) { - Kevdev *ke = mi->driver; - int i; + Kevdev *ke = pi->driverPrivate; + int i; for (i = 0; i <= ke->max_rel; i++) - if (ke->rel[i]) - { - int a; - ErrorF ("rel"); - for (a = 0; a <= ke->max_rel; a++) - { - if (ISBITSET (ke->relbits, a)) - ErrorF (" %d=%d", a, ke->rel[a]); - ke->rel[a] = 0; - } - ErrorF ("\n"); - break; - } + if (ke->rel[i]) + { + int a; + ErrorF ("rel"); + for (a = 0; a <= ke->max_rel; a++) + { + if (ISBITSET (ke->relbits, a)) + ErrorF (" %d=%d", a, ke->rel[a]); + ke->rel[a] = 0; + } + ErrorF ("\n"); + break; + } for (i = 0; i < ke->max_abs; i++) - if (ke->abs[i] != ke->prevabs[i]) - { - int a; - ErrorF ("abs"); - for (a = 0; a <= ke->max_abs; a++) - { - if (ISBITSET (ke->absbits, a)) - ErrorF (" %d=%d", a, ke->abs[a]); - ke->prevabs[a] = ke->abs[a]; - } - ErrorF ("\n"); - break; - } + if (ke->abs[i] != ke->prevabs[i]) + { + int a; + ErrorF ("abs"); + for (a = 0; a <= ke->max_abs; a++) + { + if (ISBITSET (ke->absbits, a)) + ErrorF (" %d=%d", a, ke->abs[a]); + ke->prevabs[a] = ke->abs[a]; + } + ErrorF ("\n"); + break; + } } static void EvdevRead (int evdevPort, void *closure) { - KdMouseInfo *mi = closure; - Kevdev *ke = mi->driver; - int i; - struct input_event events[NUM_EVENTS]; - int n; + KdPointerInfo *pi = closure; + Kevdev *ke = pi->driverPrivate; + int i; + struct input_event events[NUM_EVENTS]; + int n; n = read (evdevPort, &events, NUM_EVENTS * sizeof (struct input_event)); if (n <= 0) - return; + return; n /= sizeof (struct input_event); for (i = 0; i < n; i++) { - switch (events[i].type) { - case EV_SYN: - break; - case EV_KEY: - EvdevMotion (mi); - ASSIGNBIT(ke->key,events[i].code, events[i].value); - if (events[i].code < 0x100) - ErrorF ("key %d %d\n", events[i].code, events[i].value); - else - ErrorF ("key 0x%x %d\n", events[i].code, events[i].value); - break; - case EV_REL: - ke->rel[events[i].code] += events[i].value; - break; - case EV_ABS: - ke->abs[events[i].code] = events[i].value; - break; - } + switch (events[i].type) { + case EV_SYN: + break; + case EV_KEY: + EvdevMotion (pi); + ASSIGNBIT(ke->key,events[i].code, events[i].value); + if (events[i].code < 0x100) + ErrorF ("key %d %d\n", events[i].code, events[i].value); + else + ErrorF ("key 0x%x %d\n", events[i].code, events[i].value); + break; + case EV_REL: + ke->rel[events[i].code] += events[i].value; + break; + case EV_ABS: + ke->abs[events[i].code] = events[i].value; + break; + } } - EvdevMotion (mi); + EvdevMotion (pi); } int EvdevInputType; @@ -148,143 +150,153 @@ char *kdefaultEvdev[] = { #define NUM_DEFAULT_EVDEV (sizeof (kdefaultEvdev) / sizeof (kdefaultEvdev[0])) -static Bool -EvdevInit (void) +static Status +EvdevInit (KdPointerInfo *pi) { - int i; - int fd; - KdMouseInfo *mi, *next; - int n = 0; - char *prot; + int i; + int fd; + int n = 0; + char *prot; - if (!EvdevInputType) - EvdevInputType = KdAllocInputType (); - - for (mi = kdMouseInfo; mi; mi = next) - { - next = mi->next; - prot = mi->prot; - if (mi->inputType) - continue; - if (!mi->name) - { - for (i = 0; i < NUM_DEFAULT_EVDEV; i++) - { - fd = open (kdefaultEvdev[i], 2); - if (fd >= 0) - { - mi->name = KdSaveString (kdefaultEvdev[i]); - break; - } - } - } - else - fd = open (mi->name, 2); - - if (fd >= 0) - { - unsigned long ev[NBITS(EV_MAX)]; - Kevdev *ke; - - if (ioctl (fd, EVIOCGBIT(0 /*EV*/, sizeof (ev)), ev) < 0) - { - perror ("EVIOCGBIT 0"); - close (fd); - continue; - } - ke = xalloc (sizeof (Kevdev)); - if (!ke) - { - close (fd); - continue; - } - memset (ke, '\0', sizeof (Kevdev)); - if (ISBITSET (ev, EV_KEY)) - { - if (ioctl (fd, EVIOCGBIT (EV_KEY, sizeof (ke->keybits)), - ke->keybits) < 0) - { - perror ("EVIOCGBIT EV_KEY"); - xfree (ke); - close (fd); - continue; - } - } - if (ISBITSET (ev, EV_REL)) - { - if (ioctl (fd, EVIOCGBIT (EV_REL, sizeof (ke->relbits)), - ke->relbits) < 0) - { - perror ("EVIOCGBIT EV_REL"); - xfree (ke); - close (fd); - continue; - } - for (ke->max_rel = REL_MAX; ke->max_rel >= 0; ke->max_rel--) - if (ISBITSET(ke->relbits, ke->max_rel)) - break; - } - if (ISBITSET (ev, EV_ABS)) - { - int i; - - if (ioctl (fd, EVIOCGBIT (EV_ABS, sizeof (ke->absbits)), - ke->absbits) < 0) - { - perror ("EVIOCGBIT EV_ABS"); - xfree (ke); - close (fd); - continue; - } - for (ke->max_abs = ABS_MAX; ke->max_abs >= 0; ke->max_abs--) - if (ISBITSET(ke->absbits, ke->max_abs)) - break; - for (i = 0; i <= ke->max_abs; i++) - { - if (ISBITSET (ke->absbits, i)) - if (ioctl (fd, EVIOCGABS(i), &ke->absinfo[i]) < 0) - { - perror ("EVIOCGABS"); - break; - } - ke->prevabs[i] = ABS_UNSET; - } - if (i <= ke->max_abs) - { - xfree (ke); - close (fd); - continue; - } - } - mi->driver = ke; - mi->inputType = EvdevInputType; - if (KdRegisterFd (EvdevInputType, fd, EvdevRead, (void *) mi)) - n++; - } + if (!pi->path) { + for (i = 0; i < NUM_DEFAULT_EVDEV; i++) { + fd = open (kdefaultEvdev[i], 2); + if (fd >= 0) { + pi->path = KdSaveString (kdefaultEvdev[i]); + break; + } + } } - return TRUE; + else { + fd = open (pi->path, 2); + if (fd < 0) { + ErrorF("Failed to open evdev device %s\n", pi->path); + return BadMatch; + } + } + + return Success; +} + +static Status +EvdevEnable (KdPointerInfo *pi) +{ + int fd; + + if (!pi || !pi->path) + return BadImplementation; + + fd = open(pi->path, 2); + if (fd < 0) + return BadMatch; + + unsigned long ev[NBITS(EV_MAX)]; + Kevdev *ke; + + if (ioctl (fd, EVIOCGBIT(0 /*EV*/, sizeof (ev)), ev) < 0) + { + perror ("EVIOCGBIT 0"); + close (fd); + return BadMatch; + } + ke = xalloc (sizeof (Kevdev)); + if (!ke) + { + close (fd); + return BadAlloc; + } + memset (ke, '\0', sizeof (Kevdev)); + if (ISBITSET (ev, EV_KEY)) + { + if (ioctl (fd, EVIOCGBIT (EV_KEY, sizeof (ke->keybits)), + ke->keybits) < 0) + { + perror ("EVIOCGBIT EV_KEY"); + xfree (ke); + close (fd); + return BadMatch; + } + } + if (ISBITSET (ev, EV_REL)) + { + if (ioctl (fd, EVIOCGBIT (EV_REL, sizeof (ke->relbits)), + ke->relbits) < 0) + { + perror ("EVIOCGBIT EV_REL"); + xfree (ke); + close (fd); + return BadMatch; + } + for (ke->max_rel = REL_MAX; ke->max_rel >= 0; ke->max_rel--) + if (ISBITSET(ke->relbits, ke->max_rel)) + break; + } + if (ISBITSET (ev, EV_ABS)) + { + int i; + + if (ioctl (fd, EVIOCGBIT (EV_ABS, sizeof (ke->absbits)), + ke->absbits) < 0) + { + perror ("EVIOCGBIT EV_ABS"); + xfree (ke); + close (fd); + return BadMatch; + } + for (ke->max_abs = ABS_MAX; ke->max_abs >= 0; ke->max_abs--) + if (ISBITSET(ke->absbits, ke->max_abs)) + break; + for (i = 0; i <= ke->max_abs; i++) + { + if (ISBITSET (ke->absbits, i)) + if (ioctl (fd, EVIOCGABS(i), &ke->absinfo[i]) < 0) + { + perror ("EVIOCGABS"); + break; + } + ke->prevabs[i] = ABS_UNSET; + } + if (i <= ke->max_abs) + { + xfree (ke); + close (fd); + return BadValue; + } + } + if (!KdRegisterFd (fd, EvdevRead, pi)) { + xfree (ke); + close (fd); + return BadAlloc; + } + pi->driverPrivate = ke; + return Success; } static void -EvdevFini (void) +EvdevDisable (KdPointerInfo *pi) { - KdMouseInfo *mi; + Kevdev *ke; - KdUnregisterFds (EvdevInputType, TRUE); - for (mi = kdMouseInfo; mi; mi = mi->next) - { - if (mi->inputType == EvdevInputType) - { - xfree (mi->driver); - mi->driver = 0; - mi->inputType = 0; - } - } + if (!pi || !pi->driverPrivate) + return; + + KdUnregisterFd (pi, ke->fd, TRUE); + xfree (ke); + pi->driverPrivate = 0; } -KdMouseFuncs LinuxEvdevMouseFuncs = { +static void +EvdevFini (KdPointerInfo *pi) +{ +} + +KdPointerDriver LinuxEvdevMouseDriver = { + "evdev", EvdevInit, + EvdevEnable, + EvdevDisable, EvdevFini, + NULL, }; #if 0 diff --git a/hw/kdrive/linux/keyboard.c b/hw/kdrive/linux/keyboard.c index cfafbb38f..ad9907a59 100644 --- a/hw/kdrive/linux/keyboard.c +++ b/hw/kdrive/linux/keyboard.c @@ -2,31 +2,40 @@ * $RCSId: xc/programs/Xserver/hw/kdrive/linux/keyboard.c,v 1.10 2001/11/08 10:26:24 keithp Exp $ * * Copyright © 1999 Keith Packard + * XKB integration © 2006 Nokia Corporation, author: Tomas Frydrych * - * 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, and that the name of Keith Packard not be used in - * advertising or publicity pertaining to distribution of the software without - * specific, written prior permission. Keith Packard makes no - * representations about the suitability of this software for any purpose. It - * is provided "as is" without express or implied warranty. + * LinuxKeyboardRead() XKB code based on xf86KbdLnx.c: + * Copyright © 1990,91 by Thomas Roell, Dinkelscherben, Germany. + * Copyright © 1994-2001 by The XFree86 Project, Inc. * - * KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, - * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO - * EVENT SHALL KEITH PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR - * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, - * 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. + * 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, sublicense, + * 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 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 COPYRIGHT HOLDER(S) OR AUTHOR(S) 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 copyright holder(s) + * and author(s) 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 copyright holder(s) and author(s). */ #ifdef HAVE_CONFIG_H #include #endif #include "kdrive.h" -#include "kkeymap.h" #include #include #define XK_PUBLISHING @@ -34,7 +43,7 @@ #include #include -extern int LinuxConsoleFd; +extern int LinuxConsoleFd; static const KeySym linux_to_x[256] = { NoSymbol, NoSymbol, NoSymbol, NoSymbol, @@ -103,7 +112,108 @@ static const KeySym linux_to_x[256] = { XK_udiaeresis, XK_yacute, XK_thorn, XK_ydiaeresis }; -static unsigned char tbl[KD_MAX_WIDTH] = +#ifdef XKB +/* + * Getting a keycode from scancode + * + * With XKB + * -------- + * + * We have to enqueue keyboard events using standard X keycodes which correspond + * to AT scancode + 8; this means that we need to translate the Linux scancode + * provided by the kernel to an AT scancode -- this translation is not linear + * and requires that we use a LUT. + * + * + * Without XKB + * ----------- + * + * We can use custom keycodes, which makes things simpler; we define our custom + * keycodes as Linux scancodes + KD_KEY_OFFSET +*/ + +/* + This LUT translates AT scancodes into Linux ones -- the keymap we create + for the core X keyboard protocol has to be AT-scancode based so that it + corresponds to the Xkb keymap. +*/ +static unsigned char at2lnx[] = +{ + 0x0, /* no valid scancode */ + 0x01, /* KEY_Escape */ 0x02, /* KEY_1 */ + 0x03, /* KEY_2 */ 0x04, /* KEY_3 */ + 0x05, /* KEY_4 */ 0x06, /* KEY_5 */ + 0x07, /* KEY_6 */ 0x08, /* KEY_7 */ + 0x09, /* KEY_8 */ 0x0a, /* KEY_9 */ + 0x0b, /* KEY_0 */ 0x0c, /* KEY_Minus */ + 0x0d, /* KEY_Equal */ 0x0e, /* KEY_BackSpace */ + 0x0f, /* KEY_Tab */ 0x10, /* KEY_Q */ + 0x11, /* KEY_W */ 0x12, /* KEY_E */ + 0x13, /* KEY_R */ 0x14, /* KEY_T */ + 0x15, /* KEY_Y */ 0x16, /* KEY_U */ + 0x17, /* KEY_I */ 0x18, /* KEY_O */ + 0x19, /* KEY_P */ 0x1a, /* KEY_LBrace */ + 0x1b, /* KEY_RBrace */ 0x1c, /* KEY_Enter */ + 0x1d, /* KEY_LCtrl */ 0x1e, /* KEY_A */ + 0x1f, /* KEY_S */ 0x20, /* KEY_D */ + 0x21, /* KEY_F */ 0x22, /* KEY_G */ + 0x23, /* KEY_H */ 0x24, /* KEY_J */ + 0x25, /* KEY_K */ 0x26, /* KEY_L */ + 0x27, /* KEY_SemiColon */ 0x28, /* KEY_Quote */ + 0x29, /* KEY_Tilde */ 0x2a, /* KEY_ShiftL */ + 0x2b, /* KEY_BSlash */ 0x2c, /* KEY_Z */ + 0x2d, /* KEY_X */ 0x2e, /* KEY_C */ + 0x2f, /* KEY_V */ 0x30, /* KEY_B */ + 0x31, /* KEY_N */ 0x32, /* KEY_M */ + 0x33, /* KEY_Comma */ 0x34, /* KEY_Period */ + 0x35, /* KEY_Slash */ 0x36, /* KEY_ShiftR */ + 0x37, /* KEY_KP_Multiply */ 0x38, /* KEY_Alt */ + 0x39, /* KEY_Space */ 0x3a, /* KEY_CapsLock */ + 0x3b, /* KEY_F1 */ 0x3c, /* KEY_F2 */ + 0x3d, /* KEY_F3 */ 0x3e, /* KEY_F4 */ + 0x3f, /* KEY_F5 */ 0x40, /* KEY_F6 */ + 0x41, /* KEY_F7 */ 0x42, /* KEY_F8 */ + 0x43, /* KEY_F9 */ 0x44, /* KEY_F10 */ + 0x45, /* KEY_NumLock */ 0x46, /* KEY_ScrollLock */ + 0x47, /* KEY_KP_7 */ 0x48, /* KEY_KP_8 */ + 0x49, /* KEY_KP_9 */ 0x4a, /* KEY_KP_Minus */ + 0x4b, /* KEY_KP_4 */ 0x4c, /* KEY_KP_5 */ + 0x4d, /* KEY_KP_6 */ 0x4e, /* KEY_KP_Plus */ + 0x4f, /* KEY_KP_1 */ 0x50, /* KEY_KP_2 */ + 0x51, /* KEY_KP_3 */ 0x52, /* KEY_KP_0 */ + 0x53, /* KEY_KP_Decimal */ 0x54, /* KEY_SysReqest */ + 0x00, /* 0x55 */ 0x56, /* KEY_Less */ + 0x57, /* KEY_F11 */ 0x58, /* KEY_F12 */ + 0x66, /* KEY_Home */ 0x67, /* KEY_Up */ + 0x68, /* KEY_PgUp */ 0x69, /* KEY_Left */ + 0x5d, /* KEY_Begin */ 0x6a, /* KEY_Right */ + 0x6b, /* KEY_End */ 0x6c, /* KEY_Down */ + 0x6d, /* KEY_PgDown */ 0x6e, /* KEY_Insert */ + 0x6f, /* KEY_Delete */ 0x60, /* KEY_KP_Enter */ + 0x61, /* KEY_RCtrl */ 0x77, /* KEY_Pause */ + 0x63, /* KEY_Print */ 0x62, /* KEY_KP_Divide */ + 0x64, /* KEY_AltLang */ 0x65, /* KEY_Break */ + 0x00, /* KEY_LMeta */ 0x00, /* KEY_RMeta */ + 0x7A, /* KEY_Menu/FOCUS_PF11*/0x00, /* 0x6e */ + 0x7B, /* FOCUS_PF12 */ 0x00, /* 0x70 */ + 0x00, /* 0x71 */ 0x00, /* 0x72 */ + 0x59, /* FOCUS_PF2 */ 0x78, /* FOCUS_PF9 */ + 0x00, /* 0x75 */ 0x00, /* 0x76 */ + 0x5A, /* FOCUS_PF3 */ 0x5B, /* FOCUS_PF4 */ + 0x5C, /* FOCUS_PF5 */ 0x5D, /* FOCUS_PF6 */ + 0x5E, /* FOCUS_PF7 */ 0x5F, /* FOCUS_PF8 */ + 0x7C, /* JAP_86 */ 0x79, /* FOCUS_PF10 */ + 0x00, /* 0x7f */ +}; + +#define NUM_AT_KEYS (sizeof(at2lnx)/sizeof(at2lnx[0])) +#define LNX_KEY_INDEX(n) n < NUM_AT_KEYS ? at2lnx[n] : 0 + +#else /* not XKB */ +#define LNX_KEY_INDEX(n) n +#endif + +static unsigned char tbl[KD_MAX_WIDTH] = { 0, 1 << KG_SHIFT, @@ -112,24 +222,31 @@ static unsigned char tbl[KD_MAX_WIDTH] = }; static void -readKernelMapping(void) +readKernelMapping(KdKeyboardInfo *ki) { KeySym *k; int i, j; struct kbentry kbe; int minKeyCode, maxKeyCode; int row; + int fd; + if (!ki) + return; + + fd = LinuxConsoleFd; + minKeyCode = NR_KEYS; maxKeyCode = 0; row = 0; + ki->keySyms.mapWidth = KD_MAX_WIDTH; for (i = 0; i < NR_KEYS && row < KD_MAX_LENGTH; ++i) { - kbe.kb_index = i; + kbe.kb_index = LNX_KEY_INDEX(i); - k = kdKeymap + row * KD_MAX_WIDTH; + k = ki->keySyms.map + row * ki->keySyms.mapWidth; - for (j = 0; j < KD_MAX_WIDTH; ++j) + for (j = 0; j < ki->keySyms.mapWidth; ++j) { unsigned short kval; @@ -137,7 +254,7 @@ readKernelMapping(void) kbe.kb_table = tbl[j]; kbe.kb_value = 0; - if (ioctl(LinuxConsoleFd, KDGKBENT, &kbe)) + if (ioctl(fd, KDGKBENT, &kbe)) continue; kval = KVAL(kbe.kb_value); @@ -362,7 +479,7 @@ readKernelMapping(void) if (minKeyCode == NR_KEYS) continue; - + if (k[3] == k[2]) k[3] = NoSymbol; if (k[2] == k[1]) k[2] = NoSymbol; if (k[1] == k[0]) k[1] = NoSymbol; @@ -370,28 +487,223 @@ readKernelMapping(void) if (k[3] == k[0] && k[2] == k[1] && k[2] == NoSymbol) k[3] =NoSymbol; row++; } - kdMinScanCode = minKeyCode; - kdMaxScanCode = maxKeyCode; + ki->minScanCode = minKeyCode; + ki->maxScanCode = maxKeyCode; } -static void -LinuxKeyboardLoad (void) -{ - readKernelMapping (); -} +#ifdef XKB + +/* + * We need these to handle extended scancodes correctly (I could just use the + * numbers below, but this makes the code more readable + */ + +/* The prefix codes */ +#define KEY_Prefix0 /* special 0x60 */ 96 +#define KEY_Prefix1 /* special 0x61 */ 97 + +/* The raw scancodes */ +#define KEY_Enter /* Enter 0x1c */ 28 +#define KEY_LCtrl /* Ctrl(left) 0x1d */ 29 +#define KEY_Slash /* / (Slash) ? 0x35 */ 53 +#define KEY_KP_Multiply /* * 0x37 */ 55 +#define KEY_Alt /* Alt(left) 0x38 */ 56 +#define KEY_F3 /* F3 0x3d */ 61 +#define KEY_F4 /* F4 0x3e */ 62 +#define KEY_F5 /* F5 0x3f */ 63 +#define KEY_F6 /* F6 0x40 */ 64 +#define KEY_F7 /* F7 0x41 */ 65 +#define KEY_ScrollLock /* ScrollLock 0x46 */ 70 +#define KEY_KP_7 /* 7 Home 0x47 */ 71 +#define KEY_KP_8 /* 8 Up 0x48 */ 72 +#define KEY_KP_9 /* 9 PgUp 0x49 */ 73 +#define KEY_KP_Minus /* - (Minus) 0x4a */ 74 +#define KEY_KP_4 /* 4 Left 0x4b */ 75 +#define KEY_KP_5 /* 5 0x4c */ 76 +#define KEY_KP_6 /* 6 Right 0x4d */ 77 +#define KEY_KP_Plus /* + (Plus) 0x4e */ 78 +#define KEY_KP_1 /* 1 End 0x4f */ 79 +#define KEY_KP_2 /* 2 Down 0x50 */ 80 +#define KEY_KP_3 /* 3 PgDown 0x51 */ 81 +#define KEY_KP_0 /* 0 Insert 0x52 */ 82 +#define KEY_KP_Decimal /* . (Decimal) Delete 0x53 */ 83 +#define KEY_Home /* Home 0x59 */ 89 +#define KEY_Up /* Up 0x5a */ 90 +#define KEY_PgUp /* PgUp 0x5b */ 91 +#define KEY_Left /* Left 0x5c */ 92 +#define KEY_Begin /* Begin 0x5d */ 93 +#define KEY_Right /* Right 0x5e */ 94 +#define KEY_End /* End 0x5f */ 95 +#define KEY_Down /* Down 0x60 */ 96 +#define KEY_PgDown /* PgDown 0x61 */ 97 +#define KEY_Insert /* Insert 0x62 */ 98 +#define KEY_Delete /* Delete 0x63 */ 99 +#define KEY_KP_Enter /* Enter 0x64 */ 100 +#define KEY_RCtrl /* Ctrl(right) 0x65 */ 101 +#define KEY_Pause /* Pause 0x66 */ 102 +#define KEY_Print /* Print 0x67 */ 103 +#define KEY_KP_Divide /* Divide 0x68 */ 104 +#define KEY_AltLang /* AtlLang(right) 0x69 */ 105 +#define KEY_Break /* Break 0x6a */ 106 +#define KEY_LMeta /* Left Meta 0x6b */ 107 +#define KEY_RMeta /* Right Meta 0x6c */ 108 +#define KEY_Menu /* Menu 0x6d */ 109 +#define KEY_F13 /* F13 0x6e */ 110 +#define KEY_F14 /* F14 0x6f */ 111 +#define KEY_F15 /* F15 0x70 */ 112 +#define KEY_F16 /* F16 0x71 */ 113 +#define KEY_F17 /* F17 0x72 */ 114 +#define KEY_KP_DEC /* KP_DEC 0x73 */ 115 + +#endif /* XKB */ + static void LinuxKeyboardRead (int fd, void *closure) { unsigned char buf[256], *b; int n; + unsigned char prefix = 0, scancode = 0; - while ((n = read (fd, buf, sizeof (buf))) > 0) - { + while ((n = read (fd, buf, sizeof (buf))) > 0) { b = buf; - while (n--) - { - KdEnqueueKeyboardEvent (b[0] & 0x7f, b[0] & 0x80); + while (n--) { +#ifdef XKB + if (!noXkbExtension) { + /* + * With xkb we use RAW mode for reading the console, which allows us + * process extended scancodes. + * + * See if this is a prefix extending the following keycode + */ + if (!prefix && ((b[0] & 0x7f) == KEY_Prefix0)) + { + prefix = KEY_Prefix0; +#ifdef DEBUG + ErrorF("Prefix0"); +#endif + /* swallow this up */ + b++; + continue; + } + else if (!prefix && ((b[0] & 0x7f) == KEY_Prefix1)) + { + prefix = KEY_Prefix1; + ErrorF("Prefix1"); + /* swallow this up */ + b++; + continue; + } + scancode = b[0] & 0x7f; + + switch (prefix) { + /* from xf86Events.c */ + case KEY_Prefix0: + { +#ifdef DEBUG + ErrorF("Prefix0 scancode: 0x%02x\n", scancode); +#endif + switch (scancode) { + case KEY_KP_7: + scancode = KEY_Home; break; /* curs home */ + case KEY_KP_8: + scancode = KEY_Up; break; /* curs up */ + case KEY_KP_9: + scancode = KEY_PgUp; break; /* curs pgup */ + case KEY_KP_4: + scancode = KEY_Left; break; /* curs left */ + case KEY_KP_5: + scancode = KEY_Begin; break; /* curs begin */ + case KEY_KP_6: + scancode = KEY_Right; break; /* curs right */ + case KEY_KP_1: + scancode = KEY_End; break; /* curs end */ + case KEY_KP_2: + scancode = KEY_Down; break; /* curs down */ + case KEY_KP_3: + scancode = KEY_PgDown; break; /* curs pgdown */ + case KEY_KP_0: + scancode = KEY_Insert; break; /* curs insert */ + case KEY_KP_Decimal: + scancode = KEY_Delete; break; /* curs delete */ + case KEY_Enter: + scancode = KEY_KP_Enter; break; /* keypad enter */ + case KEY_LCtrl: + scancode = KEY_RCtrl; break; /* right ctrl */ + case KEY_KP_Multiply: + scancode = KEY_Print; break; /* print */ + case KEY_Slash: + scancode = KEY_KP_Divide; break; /* keyp divide */ + case KEY_Alt: + scancode = KEY_AltLang; break; /* right alt */ + case KEY_ScrollLock: + scancode = KEY_Break; break; /* curs break */ + case 0x5b: + scancode = KEY_LMeta; break; + case 0x5c: + scancode = KEY_RMeta; break; + case 0x5d: + scancode = KEY_Menu; break; + case KEY_F3: + scancode = KEY_F13; break; + case KEY_F4: + scancode = KEY_F14; break; + case KEY_F5: + scancode = KEY_F15; break; + case KEY_F6: + scancode = KEY_F16; break; + case KEY_F7: + scancode = KEY_F17; break; + case KEY_KP_Plus: + scancode = KEY_KP_DEC; break; + /* Ignore virtual shifts (E0 2A, E0 AA, E0 36, E0 B6) */ + case 0x2A: + case 0x36: + b++; + prefix = 0; + continue; + default: +#ifdef DEBUG + ErrorF("Unreported Prefix0 scancode: 0x%02x\n", + scancode); +#endif + /* + * "Internet" keyboards are generating lots of new + * codes. Let them pass. There is little consistency + * between them, so don't bother with symbolic names at + * this level. + */ + scancode += 0x78; + } + break; + } + + case KEY_Prefix1: + { + /* we do no handle these */ +#ifdef DEBUG + ErrorF("Prefix1 scancode: 0x%02x\n", scancode); +#endif + b++; + prefix = 0; + continue; + } + + default: /* should not happen*/ + case 0: /* do nothing */ +#ifdef DEBUG + ErrorF("Plain scancode: 0x%02x\n", scancode); +#endif + ; + } + + prefix = 0; + } + /* without xkb we use mediumraw mode -- enqueue the scancode as is */ + else +#endif + scancode = b[0] & 0x7f; + KdEnqueueKeyboardEvent (closure, scancode, b[0] & 0x80); b++; } } @@ -399,19 +711,30 @@ LinuxKeyboardRead (int fd, void *closure) static int LinuxKbdTrans; static struct termios LinuxTermios; -static int LinuxKbdType; -static int -LinuxKeyboardEnable (int fd, void *closure) +static Status +LinuxKeyboardEnable (KdKeyboardInfo *ki) { struct termios nTty; unsigned char buf[256]; int n; + int fd; + + if (!ki) + return !Success; + + fd = LinuxConsoleFd; + ki->driverPrivate = (void *) fd; ioctl (fd, KDGKBMODE, &LinuxKbdTrans); tcgetattr (fd, &LinuxTermios); - - ioctl(fd, KDSKBMODE, K_MEDIUMRAW); +#ifdef XKB + if (!noXkbExtension) + ioctl(fd, KDSKBMODE, K_RAW); + else +#else + ioctl(fd, KDSKBMODE, K_MEDIUMRAW); +#endif nTty = LinuxTermios; nTty.c_iflag = (IGNPAR | IGNBRK) & (~PARMRK) & (~ISTRIP); nTty.c_oflag = 0; @@ -427,61 +750,56 @@ LinuxKeyboardEnable (int fd, void *closure) */ while ((n = read (fd, buf, sizeof (buf))) > 0) ; - return fd; + KdRegisterFd (fd, LinuxKeyboardRead, ki); + return Success; } static void -LinuxKeyboardDisable (int fd, void *closure) +LinuxKeyboardDisable (KdKeyboardInfo *ki) { - ioctl(LinuxConsoleFd, KDSKBMODE, LinuxKbdTrans); - tcsetattr(LinuxConsoleFd, TCSANOW, &LinuxTermios); + int fd; + + if (!ki) + return; + + fd = (int) ki->driverPrivate; + + KdUnregisterFd(ki, fd, FALSE); + ioctl(fd, KDSKBMODE, LinuxKbdTrans); + tcsetattr(fd, TCSANOW, &LinuxTermios); } -static int -LinuxKeyboardInit (void) +static Status +LinuxKeyboardInit (KdKeyboardInfo *ki) { - if (!LinuxKbdType) - LinuxKbdType = KdAllocInputType (); + if (!ki) + return !Success; - KdRegisterFd (LinuxKbdType, LinuxConsoleFd, LinuxKeyboardRead, 0); - LinuxKeyboardEnable (LinuxConsoleFd, 0); - KdRegisterFdEnableDisable (LinuxConsoleFd, - LinuxKeyboardEnable, - LinuxKeyboardDisable); - return 1; + if (ki->path) + xfree(ki->path); + ki->path = KdSaveString("console"); + if (ki->name) + xfree(ki->name); + ki->name = KdSaveString("Linux console keyboard"); + + readKernelMapping (ki); + + return Success; } static void -LinuxKeyboardFini (void) +LinuxKeyboardLeds (KdKeyboardInfo *ki, int leds) { - LinuxKeyboardDisable (LinuxConsoleFd, 0); - KdUnregisterFds (LinuxKbdType, FALSE); + if (!ki) + return; + + ioctl ((int)ki->driverPrivate, KDSETLED, leds & 7); } -static void -LinuxKeyboardLeds (int leds) -{ - ioctl (LinuxConsoleFd, KDSETLED, leds & 7); -} - -static void -LinuxKeyboardBell (int volume, int pitch, int duration) -{ - if (volume && pitch) - { - ioctl(LinuxConsoleFd, KDMKTONE, - ((1193190 / pitch) & 0xffff) | - (((unsigned long)duration * - volume / 50) << 16)); - - } -} - -KdKeyboardFuncs LinuxKeyboardFuncs = { - LinuxKeyboardLoad, - LinuxKeyboardInit, - LinuxKeyboardLeds, - LinuxKeyboardBell, - LinuxKeyboardFini, - 3, +KdKeyboardDriver LinuxKeyboardDriver = { + "keyboard", + .Init = LinuxKeyboardInit, + .Enable = LinuxKeyboardEnable, + .Leds = LinuxKeyboardLeds, + .Disable = LinuxKeyboardDisable, }; diff --git a/hw/kdrive/linux/linux.c b/hw/kdrive/linux/linux.c index be11ec539..c1fe185bd 100644 --- a/hw/kdrive/linux/linux.c +++ b/hw/kdrive/linux/linux.c @@ -373,26 +373,6 @@ LinuxEnable (void) enabled = TRUE; } -static Bool -LinuxSpecialKey (KeySym sym) -{ - struct vt_stat vts; - int con; - - if (XK_F1 <= sym && sym <= XK_F12) - { - con = sym - XK_F1 + 1; - memset (&vts, '\0', sizeof (vts)); /* valgrind */ - ioctl (LinuxConsoleFd, VT_GETSTATE, &vts); - if (con != vts.v_active && (vts.v_state & (1 << con))) - { - ioctl (LinuxConsoleFd, VT_ACTIVATE, con); - return TRUE; - } - } - return FALSE; -} - static void LinuxDisable (void) { @@ -456,6 +436,7 @@ LinuxFini (void) } } close(LinuxConsoleFd); /* make the vt-manager happy */ + LinuxConsoleFd = -1; fd = open ("/dev/tty0", O_RDWR|O_NDELAY, 0); if (fd >= 0) { @@ -468,13 +449,32 @@ LinuxFini (void) return; } +void +KdOsAddInputDrivers () +{ + KdAddPointerDriver(&LinuxMouseDriver); + KdAddPointerDriver(&MsMouseDriver); + KdAddPointerDriver(&Ps2MouseDriver); +#ifdef TSLIB + KdAddPointerDriver(&TsDriver); +#endif + KdAddKeyboardDriver(&LinuxKeyboardDriver); +} + +static void +LinuxBell(int volume, int pitch, int duration) +{ + if (volume && pitch) + ioctl(LinuxConsoleFd, KDMKTONE, ((1193190 / pitch) & 0xffff) | + (((unsigned long)duration * volume / 50) << 16)); +} + KdOsFuncs LinuxFuncs = { - LinuxInit, - LinuxEnable, - LinuxSpecialKey, - LinuxDisable, - LinuxFini, - 0 + .Init = LinuxInit, + .Enable = LinuxEnable, + .Disable = LinuxDisable, + .Fini = LinuxFini, + .Bell = LinuxBell, }; void diff --git a/hw/kdrive/linux/mouse.c b/hw/kdrive/linux/mouse.c index 5fe997864..77ec3b37b 100644 --- a/hw/kdrive/linux/mouse.c +++ b/hw/kdrive/linux/mouse.c @@ -206,10 +206,10 @@ MouseWriteBytes (int fd, unsigned char *c, int n, int timeout) typedef struct _kmouseProt { char *name; - Bool (*Complete) (KdMouseInfo *mi, unsigned char *ev, int ne); - int (*Valid) (KdMouseInfo *mi, unsigned char *ev, int ne); - Bool (*Parse) (KdMouseInfo *mi, unsigned char *ev, int ne); - Bool (*Init) (KdMouseInfo *mi); + Bool (*Complete) (KdPointerInfo *pi, unsigned char *ev, int ne); + int (*Valid) (KdPointerInfo *pi, unsigned char *ev, int ne); + Bool (*Parse) (KdPointerInfo *pi, unsigned char *ev, int ne); + Bool (*Init) (KdPointerInfo *pi); unsigned char headerMask, headerValid; unsigned char dataMask, dataValid; Bool tty; @@ -238,9 +238,9 @@ typedef struct _kmouse { unsigned long state; /* private per protocol, init to prot->state */ } Kmouse; -static int mouseValid (KdMouseInfo *mi, unsigned char *ev, int ne) +static int mouseValid (KdPointerInfo *pi, unsigned char *ev, int ne) { - Kmouse *km = mi->driver; + Kmouse *km = pi->driverPrivate; const KmouseProt *prot = km->prot; int i; @@ -255,24 +255,24 @@ static int mouseValid (KdMouseInfo *mi, unsigned char *ev, int ne) return 0; } -static Bool threeComplete (KdMouseInfo *mi, unsigned char *ev, int ne) +static Bool threeComplete (KdPointerInfo *pi, unsigned char *ev, int ne) { return ne == 3; } -static Bool fourComplete (KdMouseInfo *mi, unsigned char *ev, int ne) +static Bool fourComplete (KdPointerInfo *pi, unsigned char *ev, int ne) { return ne == 4; } -static Bool fiveComplete (KdMouseInfo *mi, unsigned char *ev, int ne) +static Bool fiveComplete (KdPointerInfo *pi, unsigned char *ev, int ne) { return ne == 5; } -static Bool MouseReasonable (KdMouseInfo *mi, unsigned long flags, int dx, int dy) +static Bool MouseReasonable (KdPointerInfo *pi, unsigned long flags, int dx, int dy) { - Kmouse *km = mi->driver; + Kmouse *km = pi->driverPrivate; if (km->stage == MouseWorking) return TRUE; @@ -296,9 +296,9 @@ static Bool MouseReasonable (KdMouseInfo *mi, unsigned long flags, int dx, int d /* * Standard PS/2 mouse protocol */ -static Bool ps2Parse (KdMouseInfo *mi, unsigned char *ev, int ne) +static Bool ps2Parse (KdPointerInfo *pi, unsigned char *ev, int ne) { - Kmouse *km = mi->driver; + Kmouse *km = pi->driverPrivate; int dx, dy, dz; unsigned long flags; unsigned long flagsrelease = 0; @@ -333,21 +333,21 @@ static Bool ps2Parse (KdMouseInfo *mi, unsigned char *ev, int ne) if (ev[0] & 0x20) dy -= 256; dy = -dy; - if (!MouseReasonable (mi, flags, dx, dy)) + if (!MouseReasonable (pi, flags, dx, dy)) return FALSE; if (km->stage == MouseWorking) { - KdEnqueueMouseEvent (mi, flags, dx, dy); + KdEnqueuePointerEvent (pi, flags, dx, dy, 0); if (flagsrelease) { flags &= ~flagsrelease; - KdEnqueueMouseEvent (mi, flags, dx, dy); + KdEnqueuePointerEvent (pi, flags, dx, dy, 0); } } return TRUE; } -static Bool ps2Init (KdMouseInfo *mi); +static Bool ps2Init (KdPointerInfo *pi); static const KmouseProt ps2Prot = { "ps/2", @@ -450,9 +450,9 @@ static unsigned char intelli_init[] = { #define NINIT_INTELLI 3 static int -ps2SkipInit (KdMouseInfo *mi, int ninit, Bool ret_next) +ps2SkipInit (KdPointerInfo *pi, int ninit, Bool ret_next) { - Kmouse *km = mi->driver; + Kmouse *km = pi->driverPrivate; int c = -1; int skipping; Bool waiting; @@ -481,9 +481,9 @@ ps2SkipInit (KdMouseInfo *mi, int ninit, Bool ret_next) } static Bool -ps2Init (KdMouseInfo *mi) +ps2Init (KdPointerInfo *pi) { - Kmouse *km = mi->driver; + Kmouse *km = pi->driverPrivate; int skipping; Bool waiting; int id; @@ -499,7 +499,7 @@ ps2Init (KdMouseInfo *mi) return FALSE; skipping = 0; waiting = FALSE; - id = ps2SkipInit (mi, 0, TRUE); + id = ps2SkipInit (pi, 0, TRUE); switch (id) { case 3: init = wheel_3button_init; @@ -524,13 +524,13 @@ ps2Init (KdMouseInfo *mi) * initialization string. Make sure any partial event is * skipped */ - (void) ps2SkipInit (mi, ninit, FALSE); + (void) ps2SkipInit (pi, ninit, FALSE); return TRUE; } -static Bool busParse (KdMouseInfo *mi, unsigned char *ev, int ne) +static Bool busParse (KdPointerInfo *pi, unsigned char *ev, int ne) { - Kmouse *km = mi->driver; + Kmouse *km = pi->driverPrivate; int dx, dy; unsigned long flags; @@ -543,10 +543,10 @@ static Bool busParse (KdMouseInfo *mi, unsigned char *ev, int ne) flags |= KD_BUTTON_2; if ((ev[0] & 1) == 0) flags |= KD_BUTTON_3; - if (!MouseReasonable (mi, flags, dx, dy)) + if (!MouseReasonable (pi, flags, dx, dy)) return FALSE; if (km->stage == MouseWorking) - KdEnqueueMouseEvent (mi, flags, dx, dy); + KdEnqueuePointerEvent (pi, flags, dx, dy, 0); return TRUE; } @@ -561,9 +561,9 @@ static const KmouseProt busProt = { * Standard MS serial protocol, three bytes */ -static Bool msParse (KdMouseInfo *mi, unsigned char *ev, int ne) +static Bool msParse (KdPointerInfo *pi, unsigned char *ev, int ne) { - Kmouse *km = mi->driver; + Kmouse *km = pi->driverPrivate; int dx, dy; unsigned long flags; @@ -576,10 +576,10 @@ static Bool msParse (KdMouseInfo *mi, unsigned char *ev, int ne) dx = (signed char)(((ev[0] & 0x03) << 6) | (ev[1] & 0x3F)); dy = (signed char)(((ev[0] & 0x0C) << 4) | (ev[2] & 0x3F)); - if (!MouseReasonable (mi, flags, dx, dy)) + if (!MouseReasonable (pi, flags, dx, dy)) return FALSE; if (km->stage == MouseWorking) - KdEnqueueMouseEvent (mi, flags, dx, dy); + KdEnqueuePointerEvent (pi, flags, dx, dy, 0); return TRUE; } @@ -600,9 +600,9 @@ static const KmouseProt msProt = { * first byte of a synchronized protocol stream and see if it's got * any bits turned on that can't occur in that fourth byte */ -static Bool logiComplete (KdMouseInfo *mi, unsigned char *ev, int ne) +static Bool logiComplete (KdPointerInfo *pi, unsigned char *ev, int ne) { - Kmouse *km = mi->driver; + Kmouse *km = pi->driverPrivate; if ((ev[0] & 0x40) == 0x40) return ne == 3; @@ -611,9 +611,9 @@ static Bool logiComplete (KdMouseInfo *mi, unsigned char *ev, int ne) return FALSE; } -static int logiValid (KdMouseInfo *mi, unsigned char *ev, int ne) +static int logiValid (KdPointerInfo *pi, unsigned char *ev, int ne) { - Kmouse *km = mi->driver; + Kmouse *km = pi->driverPrivate; const KmouseProt *prot = km->prot; int i; @@ -632,9 +632,9 @@ static int logiValid (KdMouseInfo *mi, unsigned char *ev, int ne) return 0; } -static Bool logiParse (KdMouseInfo *mi, unsigned char *ev, int ne) +static Bool logiParse (KdPointerInfo *pi, unsigned char *ev, int ne) { - Kmouse *km = mi->driver; + Kmouse *km = pi->driverPrivate; int dx, dy; unsigned long flags; @@ -660,10 +660,10 @@ static Bool logiParse (KdMouseInfo *mi, unsigned char *ev, int ne) flags |= km->state & (KD_BUTTON_1|KD_BUTTON_3); } - if (!MouseReasonable (mi, flags, dx, dy)) + if (!MouseReasonable (pi, flags, dx, dy)) return FALSE; if (km->stage == MouseWorking) - KdEnqueueMouseEvent (mi, flags, dx, dy); + KdEnqueuePointerEvent (pi, flags, dx, dy, 0); return TRUE; } @@ -682,9 +682,9 @@ static const KmouseProt logiProt = { /* * Mouse systems protocol, 5 bytes */ -static Bool mscParse (KdMouseInfo *mi, unsigned char *ev, int ne) +static Bool mscParse (KdPointerInfo *pi, unsigned char *ev, int ne) { - Kmouse *km = mi->driver; + Kmouse *km = pi->driverPrivate; int dx, dy; unsigned long flags; @@ -699,10 +699,10 @@ static Bool mscParse (KdMouseInfo *mi, unsigned char *ev, int ne) dx = (signed char)(ev[1]) + (signed char)(ev[3]); dy = - ((signed char)(ev[2]) + (signed char)(ev[4])); - if (!MouseReasonable (mi, flags, dx, dy)) + if (!MouseReasonable (pi, flags, dx, dy)) return FALSE; if (km->stage == MouseWorking) - KdEnqueueMouseEvent (mi, flags, dx, dy); + KdEnqueuePointerEvent (pi, flags, dx, dy, 0); return TRUE; } @@ -810,8 +810,8 @@ MouseNextProtocol (Kmouse *km) static void MouseRead (int mousePort, void *closure) { - KdMouseInfo *mi = closure; - Kmouse *km = mi->driver; + KdPointerInfo *pi = closure; + Kmouse *km = pi->driverPrivate; unsigned char event[MAX_MOUSE]; int ne; int c; @@ -835,7 +835,7 @@ MouseRead (int mousePort, void *closure) break; } event[ne++] = c; - i = (*km->prot->Valid) (mi, event, ne); + i = (*km->prot->Valid) (pi, event, ne); if (i != 0) { #ifdef DEBUG @@ -867,9 +867,9 @@ MouseRead (int mousePort, void *closure) } else { - if ((*km->prot->Complete) (mi, event, ne)) + if ((*km->prot->Complete) (pi, event, ne)) { - if ((*km->prot->Parse) (mi, event, ne)) + if ((*km->prot->Parse) (pi, event, ne)) { switch (km->stage) { @@ -896,7 +896,7 @@ MouseRead (int mousePort, void *closure) km->invalid = 0; km->tested = 0; km->valid = 0; - if (km->prot->Init && !(*km->prot->Init) (mi)) + if (km->prot->Init && !(*km->prot->Init) (pi)) km->stage = MouseBroken; } break; @@ -923,9 +923,9 @@ MouseRead (int mousePort, void *closure) int MouseInputType; char *kdefaultMouse[] = { + "/dev/input/mice", "/dev/mouse", "/dev/psaux", - "/dev/input/mice", "/dev/adbmouse", "/dev/ttyS0", "/dev/ttyS1", @@ -933,81 +933,97 @@ char *kdefaultMouse[] = { #define NUM_DEFAULT_MOUSE (sizeof (kdefaultMouse) / sizeof (kdefaultMouse[0])) -static Bool -MouseInit (void) +static Status +MouseInit (KdPointerInfo *pi) { int i; int fd; Kmouse *km; - KdMouseInfo *mi, *next; - int n = 0; - char *prot; - if (!MouseInputType) - MouseInputType = KdAllocInputType (); - - for (mi = kdMouseInfo; mi; mi = next) - { - next = mi->next; - prot = mi->prot; - if (mi->inputType) - continue; - if (!mi->name) - { - for (i = 0; i < NUM_DEFAULT_MOUSE; i++) - { - fd = open (kdefaultMouse[i], 2); - if (fd >= 0) - { - mi->name = KdSaveString (kdefaultMouse[i]); - break; - } - } - } - else - fd = open (mi->name, 2); - - if (fd >= 0) - { - km = (Kmouse *) xalloc (sizeof (Kmouse)); - if (km) - { - km->iob.fd = fd; - km->iob.avail = km->iob.used = 0; - km->prot = 0; - km->i_prot = 0; - km->tty = isatty (fd); - mi->driver = km; - mi->inputType = MouseInputType; - MouseFirstProtocol (km, mi->prot); - if (KdRegisterFd (MouseInputType, fd, MouseRead, (void *) mi)) - n++; - } - else - close (fd); - } + if (!pi) + return BadImplementation; + + if (!pi->path || strcmp(pi->path, "auto") == 0) { + for (i = 0; i < NUM_DEFAULT_MOUSE; i++) { + fd = open (kdefaultMouse[i], 2); + if (fd >= 0) { + pi->path = KdSaveString (kdefaultMouse[i]); + break; + } + } } - return TRUE; + else { + fd = open (pi->path, 2); + } + + if (fd < 0) + return BadMatch; + + close(fd); + + km = (Kmouse *) xalloc (sizeof (Kmouse)); + if (km) { + km->iob.avail = km->iob.used = 0; + MouseFirstProtocol(km, "exps/2"); + km->i_prot = 0; + km->tty = isatty (fd); + km->iob.fd = -1; + pi->driverPrivate = km; + } + else { + close (fd); + return BadAlloc; + } + + return Success; +} + +static Status +MouseEnable (KdPointerInfo *pi) +{ + Kmouse *km; + + if (!pi || !pi->driverPrivate || !pi->path) + return BadImplementation; + + km = pi->driverPrivate; + + km->iob.fd = open(pi->path, 2); + if (km->iob.fd < 0) + return BadMatch; + + if (!KdRegisterFd (km->iob.fd, MouseRead, pi)) + { + close(km->iob.fd); + return BadAlloc; + } + + return Success; } static void -MouseFini (void) +MouseDisable (KdPointerInfo *pi) { - KdMouseInfo *mi; - - KdUnregisterFds (MouseInputType, TRUE); - for (mi = kdMouseInfo; mi; mi = mi->next) - { - if (mi->inputType == MouseInputType) - { - xfree (mi->driver); - mi->driver = 0; - mi->inputType = 0; - } - } + Kmouse *km; + if (!pi || !pi->driverPrivate) + return; + + km = pi->driverPrivate; + KdUnregisterFd (pi, km->iob.fd, TRUE); } -KdMouseFuncs LinuxMouseFuncs = { +static void +MouseFini (KdPointerInfo *pi) +{ + xfree (pi->driverPrivate); + pi->driverPrivate = NULL; +} + +KdPointerDriver LinuxMouseDriver = { + "mouse", MouseInit, + MouseEnable, + MouseDisable, MouseFini, + NULL, }; diff --git a/hw/kdrive/linux/ms.c b/hw/kdrive/linux/ms.c index 7f046bdc3..e62cebc39 100644 --- a/hw/kdrive/linux/ms.c +++ b/hw/kdrive/linux/ms.c @@ -90,41 +90,50 @@ MsRead (int port, void *closure) dy = (char)(((b[0] & 0x0C) << 4) | (b[2] & 0x3F)); n -= 3; b += 3; - KdEnqueueMouseEvent (kdMouseInfo, flags, dx, dy); + KdEnqueuePointerEvent (closure, flags, dx, dy, 0); } } } -int MsInputType; +static Status +MsInit (KdPointerInfo *pi) +{ + if (!pi) + return BadImplementation; -static int -MsInit (void) + if (!pi->path || strcmp(pi->path, "auto")) + pi->path = KdSaveString("/dev/mouse"); + if (!pi->name) + pi->name = KdSaveString("Microsoft protocol mouse"); + + return Success; +} + +static Status +MsEnable (KdPointerInfo *pi) { int port; - char *device = "/dev/mouse"; struct termios t; int ret; - if (!MsInputType) - MsInputType = KdAllocInputType (); - port = open (device, O_RDWR | O_NONBLOCK); + port = open (pi->path, O_RDWR | O_NONBLOCK); if(port < 0) { - ErrorF("Couldn't open %s (%d)\n", device, (int)errno); + ErrorF("Couldn't open %s (%d)\n", pi->path, (int)errno); return 0; } else if (port == 0) { ErrorF("Opening %s returned 0! Please complain to Keith.\n", - device); + pi->path); goto bail; } if(!isatty(port)) { - ErrorF("%s is not a tty\n", device); + ErrorF("%s is not a tty\n", pi->path); goto bail; } ret = tcgetattr(port, &t); if(ret < 0) { - ErrorF("Couldn't tcgetattr(%s): %d\n", device, errno); + ErrorF("Couldn't tcgetattr(%s): %d\n", pi->path, errno); goto bail; } t.c_iflag &= ~ (IGNBRK | BRKINT | PARMRK | ISTRIP | INLCR | @@ -140,24 +149,36 @@ MsInit (void) t.c_cc[VTIME] = 0; ret = tcsetattr(port, TCSANOW, &t); if(ret < 0) { - ErrorF("Couldn't tcsetattr(%s): %d\n", device, errno); + ErrorF("Couldn't tcsetattr(%s): %d\n", pi->path, errno); goto bail; } - if (KdRegisterFd (MsInputType, port, MsRead, (void *) 0)) - return 1; + if (KdRegisterFd (port, MsRead, pi)) + return TRUE; + pi->driverPrivate = (void *)port; + + return Success; bail: close(port); - return 0; + return BadMatch; } static void -MsFini (void) +MsDisable (KdPointerInfo *pi) { - KdUnregisterFds (MsInputType, TRUE); + KdUnregisterFd (pi, (int)pi->driverPrivate, TRUE); } -KdMouseFuncs MsMouseFuncs = { +static void +MsFini (KdPointerInfo *pi) +{ +} + +KdPointerDriver MsMouseDriver = { + "ms", MsInit, - MsFini + MsEnable, + MsDisable, + MsFini, + NULL, }; diff --git a/hw/kdrive/linux/ps2.c b/hw/kdrive/linux/ps2.c index b59dbfac7..5d523a210 100644 --- a/hw/kdrive/linux/ps2.c +++ b/hw/kdrive/linux/ps2.c @@ -112,42 +112,78 @@ Ps2Read (int ps2Port, void *closure) dy = -dy; n -= 3; b += 3; - KdEnqueueMouseEvent (kdMouseInfo, flags, dx, dy); + KdEnqueuePointerEvent (closure, flags, dx, dy, 0); } } } -int Ps2InputType; - -static int -Ps2Init (void) +static Status +Ps2Init (KdPointerInfo *pi) { - int i; - int ps2Port; - int n; + int ps2Port, i; - if (!Ps2InputType) - Ps2InputType = KdAllocInputType (); - n = 0; - for (i = 0; i < NUM_PS2_NAMES; i++) - { - ps2Port = open (Ps2Names[i], 0); - if (ps2Port >= 0) - { - if (KdRegisterFd (Ps2InputType, ps2Port, Ps2Read, (void *) i)) - n++; + if (!pi->path) { + for (i = 0; i < NUM_PS2_NAMES; i++) { + ps2Port = open (Ps2Names[i], 0); + if (ps2Port >= 0) { + pi->path = KdSaveString (Ps2Names[i]); + break; + } } } - return n; + else { + ps2Port = open (pi->path, 0); + } + + if (ps2Port < 0) + return BadMatch; + + close(ps2Port); + if (!pi->name) + pi->name = KdSaveString ("PS/2 Mouse"); + + return Success; +} + +static Status +Ps2Enable (KdPointerInfo *pi) +{ + int fd; + + if (!pi) + return BadImplementation; + + fd = open (pi->path, 0); + if (fd < 0) + return BadMatch; + + if (!KdRegisterFd (fd, Ps2Read, pi)) { + close(fd); + return BadAlloc; + } + + pi->driverPrivate = (void *)fd; + + return Success; +} + + +static void +Ps2Disable (KdPointerInfo *pi) +{ + KdUnregisterFd (pi, (int)pi->driverPrivate, TRUE); } static void -Ps2Fini (void) +Ps2Fini (KdPointerInfo *pi) { - KdUnregisterFds (Ps2InputType, TRUE); } -KdMouseFuncs Ps2MouseFuncs = { +KdPointerDriver Ps2MouseDriver = { + "ps2", Ps2Init, - Ps2Fini + Ps2Enable, + Ps2Disable, + Ps2Fini, + NULL, }; diff --git a/hw/kdrive/linux/ts.c b/hw/kdrive/linux/ts.c index 70c736117..701fdc891 100644 --- a/hw/kdrive/linux/ts.c +++ b/hw/kdrive/linux/ts.c @@ -75,7 +75,7 @@ TsReadBytes (int fd, char *buf, int len, int min) static void TsRead (int tsPort, void *closure) { - KdMouseInfo *mi = closure; + KdPointerInfo *pi = closure; TS_EVENT event; int n; long x, y; @@ -117,7 +117,7 @@ TsRead (int tsPort, void *closure) lastx = 0; lasty = 0; } - KdEnqueueMouseEvent (mi, flags, x, y); + KdEnqueuePointerEvent (pi, flags, x, y, 0); } } @@ -129,95 +129,83 @@ char *TsNames[] = { #define NUM_TS_NAMES (sizeof (TsNames) / sizeof (TsNames[0])) -int TsInputType; - -static int -TsEnable (int fd, void *closure) -{ - KdMouseInfo *mi = (KdMouseInfo *)closure; - - return open (mi->name, 0); -} - -static void -TsDisable (int fd, void *closure) -{ - close (fd); -} - -static int -TsInit (void) +static Status +TsInit (KdPointerInfo *pi) { int i; int fd; - KdMouseInfo *mi, *next; int n = 0; - if (!TsInputType) - TsInputType = KdAllocInputType (); - - for (mi = kdMouseInfo; mi; mi = next) - { - next = mi->next; - if (mi->inputType) - continue; - if (!mi->name) - { - for (i = 0; i < NUM_TS_NAMES; i++) - { - fd = open (TsNames[i], 0); - if (fd >= 0) - { - mi->name = KdSaveString (TsNames[i]); - break; - } - } - } - else - fd = open (mi->name, 0); - if (fd >= 0) - { - struct h3600_ts_calibration cal; - /* - * Check to see if this is a touch screen - */ - if (ioctl (fd, TS_GET_CAL, &cal) != -1) - { - mi->driver = (void *) fd; - mi->inputType = TsInputType; - if (KdRegisterFd (TsInputType, fd, TsRead, (void *) mi)) - { - /* Set callbacks for vt switches etc */ - KdRegisterFdEnableDisable (fd, TsEnable, TsDisable); - - n++; - } - } - else - close (fd); + if (!pi->path || strcmp(pi->path, "auto") == 0) { + for (i = 0; i < NUM_TS_NAMES; i++) { + fd = open (TsNames[i], 0); + if (fd >= 0) { + pi->path = KdSaveString (TsNames[i]); + break; + } } } + else { + fd = open (pi->path, 0); + } - return 0; + if (fd < 0) { + ErrorF("TsInit: Couldn't open %s\n", pi->path); + return BadMatch; + } + close(fd); + + pi->name = KdSaveString("H3600 Touchscreen"); + + return Success; +} + +static Status +TsEnable (KdPointerInfo *pi) +{ + int fd; + + if (!pi || !pi->path) + return BadImplementation; + + fd = open(pi->path, 0); + + if (fd < 0) { + ErrorF("TsInit: Couldn't open %s\n", pi->path); + return BadMatch; + } + + struct h3600_ts_calibration cal; + /* + * Check to see if this is a touch screen + */ + if (ioctl (fd, TS_GET_CAL, &cal) != -1) { + mi->driverPrivate = (void *) fd; + if (!KdRegisterFd (fd, TsRead, (void *) mi)) { + close(fd); + return BadAlloc; + } + } + else { + ErrorF("TsEnable: %s is not a touchscreen\n", pi->path); + close (fd); + return BadMatch; + } + + return Success; } static void -TsFini (void) +TsFini (KdPointerInfo *pi) { - KdMouseInfo *mi; - - KdUnregisterFds (TsInputType, TRUE); - for (mi = kdMouseInfo; mi; mi = mi->next) - { - if (mi->inputType == TsInputType) - { - mi->driver = 0; - mi->inputType = 0; - } - } + KdUnregisterFds (pi, (int)pi->driverPrivate, TRUE); + mi->driverPrivate = NULL; } -KdMouseFuncs TsFuncs = { +KdPointerDriver TsDriver = { TsInit, - TsFini + TsEnable, + TsDisable, + TsFini, + NULL, }; diff --git a/hw/kdrive/linux/tslib.c b/hw/kdrive/linux/tslib.c index c4caff922..41b74fabd 100644 --- a/hw/kdrive/linux/tslib.c +++ b/hw/kdrive/linux/tslib.c @@ -1,6 +1,6 @@ /* - * $RCSId: xc/programs/Xserver/hw/kdrive/linux/tslib.c,v 1.1 2002/11/01 22:27:49 keithp Exp $ - * TSLIB based touchscreen driver for TinyX + * TSLIB based touchscreen driver for KDrive + * Porting to new input API and event queueing by Daniel Stone. * Derived from ts.c by Keith Packard * Derived from ps2.c by Jim Gettys * @@ -8,66 +8,33 @@ * Copyright © 2000 Compaq Computer Corporation * Copyright © 2002 MontaVista Software Inc. * Copyright © 2005 OpenedHand Ltd. + * Copyright © 2006 Nokia Corporation * * 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, and that the name of Keith Packard or Compaq not be used in - * advertising or publicity pertaining to distribution of the software without - * specific, written prior permission. Keith Packard and Compaq makes no - * representations about the suitability of this software for any purpose. It - * is provided "as is" without express or implied warranty. + * documentation, and that the name of the authors and/or copyright holders + * not be used in advertising or publicity pertaining to distribution of the + * software without specific, written prior permission. The authors and/or + * copyright holders make no representations about the suitability of this + * software for any purpose. It is provided "as is" without express or + * implied warranty. * - * KEITH PACKARD AND COMPAQ DISCLAIM ALL WARRANTIES WITH REGARD TO THIS - * SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, - * IN NO EVENT SHALL KEITH PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR - * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, - * 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. - * - * 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, and that the name of Michael Taht or MontaVista not be used in - * advertising or publicity pertaining to distribution of the software without - * specific, written prior permission. Michael Taht and Montavista make no - * representations about the suitability of this software for any purpose. It - * is provided "as is" without express or implied warranty. - * - * MICHAEL TAHT AND MONTAVISTA DISCLAIM ALL WARRANTIES WITH REGARD TO THIS - * SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, - * IN NO EVENT SHALL EITHER BE LIABLE FOR ANY SPECIAL, INDIRECT OR - * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, - * 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. - * - * 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, and that the name of Matthew Allum or OpenedHand not be used in - * advertising or publicity pertaining to distribution of the software without - * specific, written prior permission. Matthew Allum and OpenedHand make no - * representations about the suitability of this software for any purpose. It - * is provided "as is" without express or implied warranty. - * - * MATTHEW ALLUM AND OPENEDHAND DISCLAIM ALL WARRANTIES WITH REGARD TO THIS - * SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, - * IN NO EVENT SHALL EITHER BE LIABLE FOR ANY SPECIAL, INDIRECT OR - * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, - * 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. + * THE AUTHORS AND/OR COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD + * TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY + * AND FITNESS, IN NO EVENT SHALL THE AUTHORS AND/OR COPYRIGHT HOLDERS BE + * LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, 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. */ -#ifdef HAVE_CONFIG_H +#ifdef HAVE_KDRIVE_CONFIG_H #include #endif + #define NEED_EVENTS #include #include @@ -77,186 +44,150 @@ #include "kdrive.h" #include #include +#include +#include -static struct tsdev *tsDev = NULL; - -static char *TsNames[] = { - NULL, /* set via TSLIB_TSDEVICE */ - "/dev/ts", - "/dev/touchscreen/0", +struct TslibPrivate { + int fd; + int lastx, lasty; + struct tsdev *tsDev; + void (*raw_event_hook)(int x, int y, int pressure, void *closure); + void *raw_event_closure; + int phys_screen; }; -#define NUM_TS_NAMES (sizeof (TsNames) / sizeof (TsNames[0])) - -/* For XCalibrate extension */ -void (*tslib_raw_event_hook)(int x, int y, int pressure, void *closure); -void *tslib_raw_event_closure; - -int TsInputType = 0; -int KdTsPhyScreen = 0; /* XXX Togo .. */ static void -TsRead (int tsPort, void *closure) +TsRead (int fd, void *closure) { - KdMouseInfo *mi = closure; - struct ts_sample event; - long x, y; - unsigned long flags; + KdPointerInfo *pi = closure; + struct TslibPrivate *private = pi->driverPrivate; + struct ts_sample event; + long x = 0, y = 0; + unsigned long flags; - if (tslib_raw_event_hook) - { - /* XCalibrate Ext */ - if (ts_read_raw(tsDev, &event, 1) == 1) - { - tslib_raw_event_hook (event.x, - event.y, - event.pressure, - tslib_raw_event_closure); - } - return; - } - - while (ts_read(tsDev, &event, 1) == 1) - { - flags = (event.pressure) ? KD_BUTTON_1 : 0; - x = event.x; - y = event.y; - - KdEnqueueMouseEvent (mi, flags, x, y); - } -} - -static int -TsLibOpen(char *dev) -{ - if(!(tsDev = ts_open(dev, 0))) - return -1; - - if (ts_config(tsDev)) - return -1; - - return ts_fd(tsDev); -} - -static int -TslibEnable (int not_needed_fd, void *closure) -{ - KdMouseInfo *mi = closure; - int fd = 0; - - if ((fd = TsLibOpen(mi->name)) == -1) - ErrorF ("Unable to re-enable TSLib ( on %s )", mi->name); - - return fd; -} - -static void -TslibDisable (int fd, void *closure) -{ - if (tsDev) - ts_close(tsDev); - tsDev = NULL; -} - -static int -TslibInit (void) -{ - int i, j = 0; - KdMouseInfo *mi, *next; - int fd = 0; - int req_type; - - if (!TsInputType) - { - TsInputType = KdAllocInputType (); - KdParseMouse(0); /* allocate safe slot in kdMouseInfo */ - req_type = 0; + if (private->raw_event_hook) { + while (ts_read_raw(private->tsDev, &event, 1) == 1) + private->raw_event_hook (event.x, event.y, event.pressure, + private->raw_event_closure); + return; } - else req_type = TsInputType; /* is being re-inited */ - - for (mi = kdMouseInfo; mi; mi = next) - { - next = mi->next; - - /* find a usuable slot */ - if (mi->inputType != req_type) - continue; - - /* Check for tslib env var device setting */ - if ((TsNames[0] = getenv("TSLIB_TSDEVICE")) == NULL) - j++; - - if (!mi->name) - { - for (i = j; i < NUM_TS_NAMES; i++) - { - fd = TsLibOpen(TsNames[i]); - - if (fd >= 0) - { - mi->name = KdSaveString (TsNames[i]); - break; - } - } - } - else - fd = TsLibOpen(mi->name); - - if (fd >= 0 && tsDev != NULL) - { - mi->driver = (void *) fd; - mi->inputType = TsInputType; - - KdRegisterFd (TsInputType, fd, TsRead, (void *) mi); - - /* Set callbacks for vt switches etc */ - KdRegisterFdEnableDisable (fd, TslibEnable, TslibDisable); - - return TRUE; - } - } - - ErrorF ("Failed to open TSLib device, tried "); - for (i = j; i < NUM_TS_NAMES; i++) - ErrorF ("%s ", TsNames[i]); - ErrorF (".\n"); - if (!TsNames[0]) - ErrorF ("Try setting TSLIB_TSDEVICE to valid /dev entry?\n"); - - if (fd > 0) - close(fd); - - return FALSE; -} -static void -TslibFini (void) -{ - KdMouseInfo *mi; + while (ts_read(private->tsDev, &event, 1) == 1) { + if (event.pressure) { + flags = KD_BUTTON_1; - KdUnregisterFds (TsInputType, TRUE); - for (mi = kdMouseInfo; mi; mi = mi->next) - { - if (mi->inputType == TsInputType) - { - if(mi->driver) - { - ts_close(tsDev); - tsDev = NULL; - } - mi->driver = 0; + /* + * Here we test for the touch screen driver actually being on the + * touch screen, if it is we send absolute coordinates. If not, + * then we send delta's so that we can track the entire vga screen. + */ + if (KdCurScreen == private->phys_screen) { + x = event.x; + y = event.y; + } else { + flags |= KD_MOUSE_DELTA; + if ((private->lastx == 0) || (private->lasty == 0)) { + x = event.x; + y = event.y; + } else { + x = event.x - private->lastx; + y = event.y - private->lasty; + } + } + private->lastx = x; + private->lasty = y; + } else { + flags = 0; + x = private->lastx; + y = private->lasty; + } - /* If below is set to 0, then MouseInit() will trash it, - * setting to 'mouse type' ( via server reset). Therefore - * Leave it alone and work around in TslibInit() ( see - * req_type ). - */ - /* mi->inputType = 0; */ - } + KdEnqueuePointerEvent (pi, flags, x, y, event.pressure); } } -KdMouseFuncs TsFuncs = { +static Status +TslibEnable (KdPointerInfo *pi) +{ + struct TslibPrivate *private = pi->driverPrivate; + + private->raw_event_hook = NULL; + private->raw_event_closure = NULL; + private->tsDev = ts_open(pi->path, 0); + private->fd = ts_fd(private->tsDev); + if (!private->tsDev || ts_config(private->tsDev) || private->fd < 0) { + ErrorF("[tslib/TslibEnable] failed to open %s\n", pi->path); + if (private->fd > 0); + close(private->fd); + return BadAlloc; + } + + KdRegisterFd(private->fd, TsRead, pi); + + return Success; +} + + +static void +TslibDisable (KdPointerInfo *pi) +{ + struct TslibPrivate *private = pi->driverPrivate; + + if (private->fd) + KdUnregisterFd(pi, private->fd, TRUE); + + if (private->tsDev) + ts_close(private->tsDev); + + private->fd = 0; + private->tsDev = NULL; +} + + +static Status +TslibInit (KdPointerInfo *pi) +{ + int fd = 0, i = 0; + DIR *inputdir = NULL; + struct dirent *inputent = NULL; + struct tsdev *tsDev = NULL; + struct TslibPrivate *private = NULL; + + if (!pi || !pi->dixdev) + return !Success; + + pi->driverPrivate = (struct TslibPrivate *) + xcalloc(sizeof(struct TslibPrivate), 1); + if (!pi->driverPrivate) + return !Success; + + private = pi->driverPrivate; + /* hacktastic */ + private->phys_screen = 0; + pi->nAxes = 3; + pi->name = KdSaveString("Touchscreen"); + pi->inputClass = KD_TOUCHSCREEN; + + return Success; +} + + +static void +TslibFini (KdPointerInfo *pi) +{ + if (pi->driverPrivate) { + xfree(pi->driverPrivate); + pi->driverPrivate = NULL; + } +} + + +KdPointerDriver TsDriver = { + "tslib", TslibInit, - TslibFini + TslibEnable, + TslibDisable, + TslibFini, + NULL, }; diff --git a/hw/kdrive/mach64/Makefile.am b/hw/kdrive/mach64/Makefile.am index 299565fdb..67712e262 100644 --- a/hw/kdrive/mach64/Makefile.am +++ b/hw/kdrive/mach64/Makefile.am @@ -30,8 +30,4 @@ MACH64_LIBS = \ Xmach64_LDADD = \ $(MACH64_LIBS) \ @KDRIVE_LIBS@ \ - @XSERVER_LIBS@ \ - $(TSLIB_FLAG) - - -Xmach64_DEPENDENCIES = $(MACH64_LIBS) @KDRIVE_LIBS@ + @XSERVER_LIBS@ diff --git a/hw/kdrive/mach64/mach64stub.c b/hw/kdrive/mach64/mach64stub.c index 60808c26d..f3fef3c12 100644 --- a/hw/kdrive/mach64/mach64stub.c +++ b/hw/kdrive/mach64/mach64stub.c @@ -56,7 +56,8 @@ InitOutput (ScreenInfo *pScreenInfo, int argc, char **argv) void InitInput (int argc, char **argv) { - KdInitInput (&LinuxMouseFuncs, &LinuxKeyboardFuncs); + KdOsAddInputDrivers (); + KdInitInput (); } void diff --git a/hw/kdrive/mga/Makefile.am b/hw/kdrive/mga/Makefile.am index 64d260ede..ee0798915 100644 --- a/hw/kdrive/mga/Makefile.am +++ b/hw/kdrive/mga/Makefile.am @@ -7,10 +7,6 @@ bin_PROGRAMS = Xmga noinst_LIBRARIES = libmga.a -if TSLIB -TSLIB_FLAG = -lts -endif - libmga_a_SOURCES = \ mgadraw.c \ g400_composite.c \ @@ -29,7 +25,4 @@ MGA_LIBS = \ Xmga_LDADD = \ $(MGA_LIBS) \ @KDRIVE_LIBS@ \ - @XSERVER_LIBS@ \ - $(TSLIB_FLAG) - -Xmga_DEPENDENCIES = $(MGA_LIBS) @KDRIVE_LIBS@ + @XSERVER_LIBS@ diff --git a/hw/kdrive/mga/g400_composite.c b/hw/kdrive/mga/g400_composite.c index 671e517fb..da2e8b810 100644 --- a/hw/kdrive/mga/g400_composite.c +++ b/hw/kdrive/mga/g400_composite.c @@ -286,10 +286,8 @@ mgaCheckComposite(int op, PicturePtr pSrcPicture, PicturePtr pMaskPicture, if (pMaskPicture->componentAlpha) MGA_FALLBACK(("Component alpha unsupported")); - switch (pDstPicture->format) { - case PICT_a8: + if (pDstPicture->format == PICT_a8) MGA_FALLBACK(("render to A8 unsupported")); - } return TRUE; } diff --git a/hw/kdrive/mga/mgastub.c b/hw/kdrive/mga/mgastub.c index ebb40fd19..5afbf7fcc 100644 --- a/hw/kdrive/mga/mgastub.c +++ b/hw/kdrive/mga/mgastub.c @@ -45,7 +45,8 @@ InitOutput (ScreenInfo *pScreenInfo, int argc, char **argv) void InitInput (int argc, char **argv) { - KdInitInput (&LinuxMouseFuncs, &LinuxKeyboardFuncs); + KdOsAddInputDrivers (); + KdInitInput (); } void diff --git a/hw/kdrive/neomagic/Makefile.am b/hw/kdrive/neomagic/Makefile.am index b37bfc303..9a1af990c 100644 --- a/hw/kdrive/neomagic/Makefile.am +++ b/hw/kdrive/neomagic/Makefile.am @@ -16,10 +16,6 @@ INCLUDES = \ bin_PROGRAMS = Xneomagic -if TSLIB -TSLIB_FLAG = -lts -endif - noinst_LIBRARIES = libneomagic.a libneomagic_a_SOURCES = \ @@ -41,7 +37,4 @@ NEOMAGIC_LIBS = \ Xneomagic_LDADD = \ $(NEOMAGIC_LIBS) \ @KDRIVE_LIBS@ \ - @XSERVER_LIBS@ \ - $(TSLIB_FLAG) - -Xneomagic_DEPENDENCIES = $(NEOMAGIC_LIBS) @KDRIVE_LIBS@ + @XSERVER_LIBS@ diff --git a/hw/kdrive/neomagic/neomagic.h b/hw/kdrive/neomagic/neomagic.h index b91e81e8a..9b100051b 100644 --- a/hw/kdrive/neomagic/neomagic.h +++ b/hw/kdrive/neomagic/neomagic.h @@ -26,14 +26,10 @@ #include #include "kxv.h" #include "klinux.h" +#include "vesa.h" -#define DEBUG -#ifdef DEBUG -#define DBGOUT(fmt,a...) fprintf (stderr, fmt, ##a) -#else -#define DBGOUT(fmt,a...) -#endif +#define DBGOUT DebugF #define ENTER() DBGOUT("Enter %s\n", __FUNCTION__) #define LEAVE() DBGOUT("Leave %s\n", __FUNCTION__) diff --git a/hw/kdrive/neomagic/neomagicstub.c b/hw/kdrive/neomagic/neomagicstub.c index 308f4a2c1..c7ec83b44 100644 --- a/hw/kdrive/neomagic/neomagicstub.c +++ b/hw/kdrive/neomagic/neomagicstub.c @@ -51,10 +51,8 @@ InitOutput (ScreenInfo *pScreenInfo, int argc, char **argv) void InitInput (int argc, char **argv) { - KdInitInput (&LinuxMouseFuncs, &LinuxKeyboardFuncs); -#ifdef TOUCHSCREEN - KdAddMouseDriver (&TsFuncs); -#endif + KdOsAddInputDrivers (); + KdInitInput (); } void diff --git a/hw/kdrive/nvidia/Makefile.am b/hw/kdrive/nvidia/Makefile.am index 48551a3a6..67eff6961 100644 --- a/hw/kdrive/nvidia/Makefile.am +++ b/hw/kdrive/nvidia/Makefile.am @@ -7,10 +7,6 @@ bin_PROGRAMS = Xnvidia noinst_LIBRARIES = libnvidia.a -if TSLIB -TSLIB_FLAG = -lts -endif - # nvidiavideo.c libnvidia_a_SOURCES = \ @@ -30,7 +26,4 @@ NVIDIA_LIBS = \ Xnvidia_LDADD = \ $(NVIDIA_LIBS) \ @KDRIVE_LIBS@ \ - @XSERVER_LIBS@ \ - $(TSLIB_FLAG) - -Xnvidia_DEPENDENCIES = $(NVIDIA_LIBS) @KDRIVE_LIBS@ + @XSERVER_LIBS@ diff --git a/hw/kdrive/nvidia/nvidiastub.c b/hw/kdrive/nvidia/nvidiastub.c index ea2dd0f38..230941958 100644 --- a/hw/kdrive/nvidia/nvidiastub.c +++ b/hw/kdrive/nvidia/nvidiastub.c @@ -45,7 +45,8 @@ InitOutput (ScreenInfo *pScreenInfo, int argc, char **argv) void InitInput (int argc, char **argv) { - KdInitInput (&LinuxMouseFuncs, &LinuxKeyboardFuncs); + KdOsAddInputDrivers (); + KdInitInput (); } void diff --git a/hw/kdrive/pcmcia/pcmciastub.c b/hw/kdrive/pcmcia/pcmciastub.c index c509553ce..a56d2cbe2 100644 --- a/hw/kdrive/pcmcia/pcmciastub.c +++ b/hw/kdrive/pcmcia/pcmciastub.c @@ -45,7 +45,8 @@ InitOutput (ScreenInfo *pScreenInfo, int argc, char **argv) void InitInput (int argc, char **argv) { - KdInitInput (&LinuxMouseFuncs, &LinuxKeyboardFuncs); + KdOsAddInputDrivers (); + KdInitInput (); } extern pcmciaDisplayModeRec pcmciaDefaultModes[]; diff --git a/hw/kdrive/pm2/Makefile.am b/hw/kdrive/pm2/Makefile.am index 1a712072a..a7b0f0088 100644 --- a/hw/kdrive/pm2/Makefile.am +++ b/hw/kdrive/pm2/Makefile.am @@ -5,10 +5,6 @@ INCLUDES = \ bin_PROGRAMS = Xpm2 -if TSLIB -TSLIB_FLAG = -lts -endif - noinst_LIBRARIES = libpm2.a libpm2_a_SOURCES = \ @@ -28,7 +24,4 @@ PM2_LIBS = \ Xpm2_LDADD = \ $(PM2_LIBS) \ @KDRIVE_LIBS@ \ - @XSERVER_LIBS@ \ - $(TSLIB_FLAG) - -Xpm2_DEPENDENCIES = $(PM2_LIBS) @KDRIVE_LIBS@ + @XSERVER_LIBS@ diff --git a/hw/kdrive/pm2/glint_regs.h b/hw/kdrive/pm2/glint_regs.h index 269b05fbe..84f220298 100644 --- a/hw/kdrive/pm2/glint_regs.h +++ b/hw/kdrive/pm2/glint_regs.h @@ -1,4 +1,3 @@ -/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/glint/glint_regs.h,v 1.36tsi Exp $ */ /* * glint register file diff --git a/hw/kdrive/pm2/pm2stub.c b/hw/kdrive/pm2/pm2stub.c index fe469515b..1f824b347 100644 --- a/hw/kdrive/pm2/pm2stub.c +++ b/hw/kdrive/pm2/pm2stub.c @@ -32,7 +32,8 @@ InitOutput (ScreenInfo *pScreenInfo, int argc, char **argv) void InitInput (int argc, char **argv) { - KdInitInput (&LinuxMouseFuncs, &LinuxKeyboardFuncs); + KdOsAddInputDrivers (); + KdInitInput (); } void diff --git a/hw/kdrive/r128/Makefile.am b/hw/kdrive/r128/Makefile.am index b33e138e1..eab80cce0 100644 --- a/hw/kdrive/r128/Makefile.am +++ b/hw/kdrive/r128/Makefile.am @@ -5,10 +5,6 @@ INCLUDES = \ bin_PROGRAMS = Xr128 -if TSLIB -TSLIB_FLAG = -lts -endif - noinst_LIBRARIES = libr128.a libr128_a_SOURCES = \ @@ -27,7 +23,4 @@ R128_LIBS = \ Xr128_LDADD = \ $(R128_LIBS) \ @KDRIVE_LIBS@ \ - @XSERVER_LIBS@ \ - $(TSLIB_FLAG) - -Xr128_DEPENDENCIES = $(R128_LIBS) @KDRIVE_LIBS@ + @XSERVER_LIBS@ diff --git a/hw/kdrive/r128/r128stub.c b/hw/kdrive/r128/r128stub.c index 221648d9c..dbf3c0e82 100644 --- a/hw/kdrive/r128/r128stub.c +++ b/hw/kdrive/r128/r128stub.c @@ -48,7 +48,8 @@ InitOutput (ScreenInfo *pScreenInfo, int argc, char **argv) void InitInput (int argc, char **argv) { - KdInitInput (&LinuxMouseFuncs, &LinuxKeyboardFuncs); + KdOsAddInputDrivers (); + KdInitInput (); } void diff --git a/hw/kdrive/savage/s3stub.c b/hw/kdrive/savage/s3stub.c index 41553e6e3..776f8dad2 100644 --- a/hw/kdrive/savage/s3stub.c +++ b/hw/kdrive/savage/s3stub.c @@ -60,12 +60,8 @@ InitOutput (ScreenInfo *pScreenInfo, int argc, char **argv) void InitInput (int argc, char **argv) { -#ifdef VXWORKS - KdInitInput (&VxWorksMouseFuncs, &VxWorksKeyboardFuncs); -#endif -#ifdef linux - KdInitInput (&LinuxMouseFuncs, &LinuxKeyboardFuncs); -#endif + KdOsAddInputDrivers (); + KdInitInput (); } extern int s3CpuTimeout; diff --git a/hw/kdrive/sdl/Makefile.am b/hw/kdrive/sdl/Makefile.am index ba6ed4d4a..f5abb86e8 100644 --- a/hw/kdrive/sdl/Makefile.am +++ b/hw/kdrive/sdl/Makefile.am @@ -5,16 +5,9 @@ INCLUDES = \ bin_PROGRAMS = Xsdl -if TSLIB -TSLIB_FLAG = -lts -endif - Xsdl_SOURCES = sdl.c Xsdl_LDADD = @KDRIVE_PURE_LIBS@ \ @KDRIVE_LIBS@ \ @XSERVER_LIBS@ \ - $(TSLIB_FLAG) \ @XSDL_LIBS@ - -Xsdl_DEPENDENCIES = @KDRIVE_LIBS@ diff --git a/hw/kdrive/sdl/sdl.c b/hw/kdrive/sdl/sdl.c index d354f6fb8..d7448ff7f 100644 --- a/hw/kdrive/sdl/sdl.c +++ b/hw/kdrive/sdl/sdl.c @@ -30,7 +30,6 @@ #include "kdrive-config.h" #endif #include "kdrive.h" -#include "kkeymap.h" #include #include @@ -39,20 +38,20 @@ static Bool sdlScreenInit(KdScreenInfo *screen); static Bool sdlFinishInitScreen(ScreenPtr pScreen); static Bool sdlCreateRes(ScreenPtr pScreen); -static void sdlKeyboardBell (int volume, int pitch, int duration); -static void sdlKeyboardLeds (int leds); -static void sdlKeyboardFini(void); -static void sdlKeyboardLoad (void); -static Bool sdlKeyboardInit(void); +static void sdlKeyboardFini(KdKeyboardInfo *ki); +static Bool sdlKeyboardInit(KdKeyboardInfo *ki); -static Bool sdlMouseInit(void); -static void sdlMouseFini(void); +static Bool sdlMouseInit(KdPointerInfo *pi); +static void sdlMouseFini(KdPointerInfo *pi); void *sdlShadowWindow (ScreenPtr pScreen, CARD32 row, CARD32 offset, int mode, CARD32 *size, void *closure); void sdlShadowUpdate (ScreenPtr pScreen, shadowBufPtr pBuf); void sdlTimer(void); +KdKeyboardInfo *sdlKeyboard = NULL; +KdPointerInfo *sdlPointer = NULL; + KeySym sdlKeymap[]={ 0, /* 8 */ 0, @@ -168,51 +167,23 @@ KeySym sdlKeymap[]={ NoSymbol, NoSymbol /* 118 */ }; -//KdMouseInfo *kdMouseInfo; - -KdKeyboardFuncs sdlKeyboardFuncs = { - sdlKeyboardLoad, - sdlKeyboardInit, - sdlKeyboardLeds, - sdlKeyboardBell, - sdlKeyboardFini, - 3, +KdKeyboardDriver sdlKeyboardDriver = { + .name = "keyboard", + .Init = sdlKeyboardInit, + .Fini = sdlKeyboardFini, }; -KdMouseFuncs sdlMouseFuncs = { - sdlMouseInit, - sdlMouseFini, +KdPointerDriver sdlMouseDriver = { + .name = "mouse", + .Init = sdlMouseInit, + .Fini = sdlMouseFini, }; KdCardFuncs sdlFuncs = { - 0, /* cardinit */ - sdlScreenInit, /* scrinit */ - 0, /* initScreen */ - sdlFinishInitScreen, /* finishInitScreen */ - sdlCreateRes, /* createRes */ - 0, /* preserve */ - 0, /* enable */ - 0, /* dpms */ - 0, /* disable */ - 0, /* restore */ - 0, /* scrfini */ - 0, /* cardfini */ - - 0, /* initCursor */ - 0, /* enableCursor */ - 0, /* disableCursor */ - 0, /* finiCursor */ - 0, /* recolorCursor */ - - 0, /* initAccel */ - 0, /* enableAccel */ - 0, /* syncAccel */ - 0, /* disableAccel */ - 0, /* finiAccel */ - - 0, /* getColors */ - 0 /* putColors */ + .scrinit = sdlScreenInit, /* scrinit */ + .finishInitScreen = sdlFinishInitScreen, /* finishInitScreen */ + .createRes = sdlCreateRes, /* createRes */ }; int mouseState=0; @@ -327,52 +298,34 @@ static Bool sdlFinishInitScreen(ScreenPtr pScreen) return TRUE; } -static void sdlKeyboardBell (int volume, int pitch, int duration) +static void sdlKeyboardFini(KdKeyboardInfo *ki) { -#ifdef DEBUG - printf("a bell would go here\n"); -#endif + sdlKeyboard = NULL; } -static void sdlKeyboardLeds (int leds) +static Bool sdlKeyboardInit(KdKeyboardInfo *ki) { -#ifdef DEBUG - printf("Leds: %d\n", leds); -#endif + ki->minScanCode = 8; + ki->maxScanCode = 255; + ki->keySyms.minKeyCode = 8; + ki->keySyms.maxKeyCode = 255; + ki->keySyms.mapWidth = 2; + memcpy(ki->keySyms.map, sdlKeymap, sizeof(sdlKeymap)); + + sdlKeyboard = ki; + + return TRUE; } -static void sdlKeyboardLoad(void) -{ - int x; - kdMinScanCode = 8; - kdMaxScanCode = 255; - kdMinKeyCode = 8; - kdMaxKeyCode = 255; - kdKeymapWidth = 2; - - memcpy(kdKeymap, sdlKeymap, sizeof(sdlKeymap)); -} - -static void sdlKeyboardFini(void) -{ - -} - -static Bool sdlKeyboardInit(void) +static Bool sdlMouseInit (KdPointerInfo *pi) { + sdlPointer = pi; return TRUE; } -static Bool sdlMouseInit (void) -{ -#ifdef DEBUG - printf("kdMouseInfo: 0x%x\n", kdMouseInfo); -#endif - return TRUE; -} - -static void sdlMouseFini(void) +static void sdlMouseFini(KdPointerInfo *pi) { + sdlPointer = NULL; } @@ -395,8 +348,18 @@ void InitOutput(ScreenInfo *pScreenInfo, int argc, char **argv) void InitInput(int argc, char **argv) { - /* FIXME: change this to use SDL key/mouse funcs */ - KdInitInput(&sdlMouseFuncs, &sdlKeyboardFuncs); + KdPointerInfo *pi; + KdKeyboardInfo *ki; + + KdAddKeyboardDriver(&sdlKeyboardDriver); + KdAddPointerDriver(&sdlMouseDriver); + + ki = KdParseKeyboard("keyboard"); + KdAddKeyboard(ki); + pi = KdParsePointer("mouse"); + KdAddPointer(pi); + + KdInitInput(); } void ddxUseMsg(void) @@ -418,7 +381,7 @@ void sdlTimer(void) while ( SDL_PollEvent(&event) ) { switch (event.type) { case SDL_MOUSEMOTION: - KdEnqueueMouseEvent(kdMouseInfo, mouseState, event.motion.x, event.motion.y); + KdEnqueuePointerEvent(sdlPointer, mouseState, event.motion.x, event.motion.y, 0); break; case SDL_MOUSEBUTTONDOWN: switch(event.button.button) @@ -434,7 +397,7 @@ void sdlTimer(void) break; } mouseState|=buttonState; - KdEnqueueMouseEvent(kdMouseInfo, mouseState|KD_MOUSE_DELTA, 0, 0); + KdEnqueuePointerEvent(sdlPointer, mouseState|KD_MOUSE_DELTA, 0, 0, 0); break; case SDL_MOUSEBUTTONUP: switch(event.button.button) @@ -450,14 +413,14 @@ void sdlTimer(void) break; } mouseState &= ~buttonState; - KdEnqueueMouseEvent(kdMouseInfo, mouseState|KD_MOUSE_DELTA, 0, 0); + KdEnqueuePointerEvent(sdlPointer, mouseState|KD_MOUSE_DELTA, 0, 0, 0); break; case SDL_KEYDOWN: case SDL_KEYUP: #ifdef DEBUG printf("Keycode: %d\n", event.key.keysym.scancode); #endif - KdEnqueueKeyboardEvent (event.key.keysym.scancode, event.type==SDL_KEYUP); + KdEnqueueKeyboardEvent (sdlKeyboard, event.key.keysym.scancode, event.type==SDL_KEYUP); break; case SDL_QUIT: @@ -482,12 +445,9 @@ static void xsdlFini(void) } KdOsFuncs sdlOsFuncs={ - xsdlInit, - 0, - 0, - 0, - xsdlFini, - sdlTimer + .Init = xsdlInit, + .Fini = xsdlFini, + .pollEvents = sdlTimer, }; void OsVendorInit (void) diff --git a/hw/kdrive/sis300/Makefile.am b/hw/kdrive/sis300/Makefile.am index efd1e9ab4..98020745c 100644 --- a/hw/kdrive/sis300/Makefile.am +++ b/hw/kdrive/sis300/Makefile.am @@ -17,10 +17,6 @@ INCLUDES = \ bin_PROGRAMS = Xsis -if TSLIB -TSLIB_FLAG = -lts -endif - noinst_LIBRARIES = libsis.a libsis_a_SOURCES = \ @@ -42,5 +38,3 @@ Xsis_LDADD = \ $(SIS_LIBS) \ @KDRIVE_LIBS@ \ $(TSLIB_FLAG) - -Xsis_DEPENDENCIES = $(SIS_LIBS) @KDRIVE_LIBS@ diff --git a/hw/kdrive/sis300/sis_reg.h b/hw/kdrive/sis300/sis_reg.h index 2b305ff04..6e5a8f6d5 100644 --- a/hw/kdrive/sis300/sis_reg.h +++ b/hw/kdrive/sis300/sis_reg.h @@ -25,7 +25,6 @@ OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. **************************************************************************/ -/* $XFree86: xc/lib/GL/mesa/src/drv/sis/sis_reg.h,v 1.3 2000/09/26 15:56:48 tsi Exp $ */ /* * Authors: diff --git a/hw/kdrive/sis300/sis_stub.c b/hw/kdrive/sis300/sis_stub.c index 7f2e48251..8a4c06c6c 100644 --- a/hw/kdrive/sis300/sis_stub.c +++ b/hw/kdrive/sis300/sis_stub.c @@ -53,7 +53,8 @@ InitOutput(ScreenInfo *pScreenInfo, int argc, char **argv) void InitInput(int argc, char **argv) { - KdInitInput(&LinuxMouseFuncs, &LinuxKeyboardFuncs); + KdOsAddInputDrivers(); + KdInitInput(); } void diff --git a/hw/kdrive/sis530/sisstub.c b/hw/kdrive/sis530/sisstub.c index a377dd518..2375f651b 100644 --- a/hw/kdrive/sis530/sisstub.c +++ b/hw/kdrive/sis530/sisstub.c @@ -53,7 +53,8 @@ InitOutput (ScreenInfo *pScreenInfo, int argc, char **argv) void InitInput (int argc, char **argv) { - KdInitInput (&LinuxMouseFuncs, &LinuxKeyboardFuncs); + KdOsAddInputDrivers (); + KdInitInput (); } void diff --git a/hw/kdrive/smi/Makefile.am b/hw/kdrive/smi/Makefile.am index a214e762e..0fd9729fc 100644 --- a/hw/kdrive/smi/Makefile.am +++ b/hw/kdrive/smi/Makefile.am @@ -6,10 +6,6 @@ INCLUDES = \ bin_PROGRAMS = Xsmi -if TSLIB -TSLIB_FLAG = -lts -endif - noinst_LIBRARIES = libsmi.a # smivideo.c # not ready yet @@ -32,7 +28,4 @@ SMI_LIBS = \ Xsmi_LDADD = \ $(SMI_LIBS) \ @KDRIVE_LIBS@ \ - @XSERVER_LIBS@ \ - $(TSLIB_FLAG) - -Xsmi_DEPENDENCIES = $(SMI_LIBS) @KDRIVE_LIBS@ + @XSERVER_LIBS@ diff --git a/hw/kdrive/smi/smi.c b/hw/kdrive/smi/smi.c index 96c774aac..7d4d725c7 100644 --- a/hw/kdrive/smi/smi.c +++ b/hw/kdrive/smi/smi.c @@ -19,7 +19,6 @@ * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR * PERFORMANCE OF THIS SOFTWARE. */ -/* $XFree86: xc/programs/Xserver/hw/kdrive/smi/smi.c,v 1.11 2002/10/18 06:31:17 keithp Exp $ */ #ifdef HAVE_CONFIG_H #include diff --git a/hw/kdrive/smi/smi.h b/hw/kdrive/smi/smi.h index 93b856939..19fdcbad4 100644 --- a/hw/kdrive/smi/smi.h +++ b/hw/kdrive/smi/smi.h @@ -21,7 +21,6 @@ * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR * PERFORMANCE OF THIS SOFTWARE. */ -/* $XFree86: xc/programs/Xserver/hw/kdrive/smi/smi.h,v 1.6 2001/07/24 19:06:03 keithp Exp $ */ #ifndef _SMI_H_ #define _SMI_H_ diff --git a/hw/kdrive/smi/smidraw.c b/hw/kdrive/smi/smidraw.c index 4e1a9fd45..06606ad1b 100644 --- a/hw/kdrive/smi/smidraw.c +++ b/hw/kdrive/smi/smidraw.c @@ -21,7 +21,6 @@ * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR * PERFORMANCE OF THIS SOFTWARE. */ -/* $XFree86: xc/programs/Xserver/hw/kdrive/smi/smidraw.c,v 1.7 2001/07/24 19:06:03 keithp Exp $ */ #ifdef HAVE_CONFIG_H #include diff --git a/hw/kdrive/smi/smidraw.h b/hw/kdrive/smi/smidraw.h index 3ec0831fc..f91b68c56 100644 --- a/hw/kdrive/smi/smidraw.h +++ b/hw/kdrive/smi/smidraw.h @@ -21,7 +21,6 @@ * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR * PERFORMANCE OF THIS SOFTWARE. */ -/* $XFree86: xc/programs/Xserver/hw/kdrive/mach64/mach64draw.h,v 1.1 2001/06/03 18:48:19 keithp Exp $ */ #ifndef _SMIDRAW_H_ #define _SMIDRAW_H_ diff --git a/hw/kdrive/smi/smistub.c b/hw/kdrive/smi/smistub.c index 5770e2a6f..1db6708f2 100644 --- a/hw/kdrive/smi/smistub.c +++ b/hw/kdrive/smi/smistub.c @@ -22,7 +22,6 @@ * * Author: Keith Packard, SuSE, Inc. */ -/* $XFree86: xc/programs/Xserver/hw/kdrive/smi/smistub.c,v 1.4 2002/10/08 21:25:35 keithp Exp $ */ #ifdef HAVE_CONFIG_H #include @@ -48,7 +47,8 @@ InitOutput (ScreenInfo *pScreenInfo, int argc, char **argv) void InitInput (int argc, char **argv) { - KdInitInput (&LinuxMouseFuncs, &LinuxKeyboardFuncs); + KdOsAddInputDrivers (); + KdInitInput (); } void diff --git a/hw/kdrive/smi/smivideo.c b/hw/kdrive/smi/smivideo.c index 32c73516a..46593a0ee 100644 --- a/hw/kdrive/smi/smivideo.c +++ b/hw/kdrive/smi/smivideo.c @@ -19,7 +19,6 @@ * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR * PERFORMANCE OF THIS SOFTWARE. */ -/* $XFree86: xc/programs/Xserver/hw/kdrive/mach64/mach64video.c,v 1.10 2003/04/23 21:51:18 tsi Exp $ */ #ifdef HAVE_CONFIG_H #include #endif diff --git a/hw/kdrive/src/Makefile.am b/hw/kdrive/src/Makefile.am index 53d50950d..20fae554a 100644 --- a/hw/kdrive/src/Makefile.am +++ b/hw/kdrive/src/Makefile.am @@ -24,7 +24,7 @@ libkdrive_a_SOURCES = \ kdrive.h \ kinfo.c \ kinput.c \ - kkeymap.h \ + kkeymap.c \ kmap.c \ kmode.c \ knoop.c \ @@ -37,5 +37,4 @@ libkdrive_a_SOURCES = \ $(top_srcdir)/mi/miinitext.c libkdrivestubs_a_SOURCES = \ - $(top_srcdir)/Xi/stubs.c \ $(top_srcdir)/fb/fbcmap.c diff --git a/hw/kdrive/src/fourcc.h b/hw/kdrive/src/fourcc.h index b19f5decc..54be7ebe8 100644 --- a/hw/kdrive/src/fourcc.h +++ b/hw/kdrive/src/fourcc.h @@ -1,4 +1,3 @@ -/* $XFree86: xc/programs/Xserver/hw/xfree86/common/fourcc.h,v 1.4 2003/04/23 21:51:24 tsi Exp $ */ /* This header file contains listings of STANDARD guids for video formats. diff --git a/hw/kdrive/src/kdrive.c b/hw/kdrive/src/kdrive.c index 52e56e90b..b6ac0b0cf 100644 --- a/hw/kdrive/src/kdrive.c +++ b/hw/kdrive/src/kdrive.c @@ -43,6 +43,12 @@ #include "dpmsproc.h" #endif +#ifdef HAVE_EXECINFO_H +#include +#endif + +#include + typedef struct _kdDepths { CARD8 depth; CARD8 bpp; @@ -60,6 +66,8 @@ KdDepths kdDepths[] = { #define NUM_KD_DEPTHS (sizeof (kdDepths) / sizeof (kdDepths[0])) +#define KD_DEFAULT_BUTTONS 5 + int kdScreenPrivateIndex; unsigned long kdGeneration; @@ -76,6 +84,8 @@ Bool kdSwitchPending; char *kdSwitchCmd; DDXPointRec kdOrigin; +static Bool kdCaughtSignal = FALSE; + /* * Carry arguments from InitOutput through driver initialization * to KdScreenInit @@ -271,7 +281,7 @@ KdSuspend (void) for (screen = card->screenList; screen; screen = screen->next) if (screen->mynum == card->selected && screen->pScreen) KdDisableScreen (screen->pScreen); - if (card->driver) + if (card->driver && card->cfuncs->restore) (*card->cfuncs->restore) (card); } KdDisableInput (); @@ -285,7 +295,8 @@ KdDisableScreens (void) KdSuspend (); if (kdEnabled) { - (*kdOsFuncs->Disable) (); + if (kdOsFuncs->Disable) + (*kdOsFuncs->Disable) (); kdEnabled = FALSE; } } @@ -343,7 +354,8 @@ KdEnableScreens (void) if (!kdEnabled) { kdEnabled = TRUE; - (*kdOsFuncs->Enable) (); + if (kdOsFuncs->Enable) + (*kdOsFuncs->Enable) (); } KdResume (); } @@ -363,11 +375,15 @@ AbortDDX(void) KdDisableScreens (); if (kdOsFuncs) { - if (kdEnabled) + if (kdEnabled && kdOsFuncs->Disable) (*kdOsFuncs->Disable) (); - (*kdOsFuncs->Fini) (); + if (kdOsFuncs->Fini) + (*kdOsFuncs->Fini) (); KdDoSwitchCmd ("stop"); } + + if (kdCaughtSignal) + abort(); } void @@ -379,7 +395,7 @@ ddxGiveUp () Bool kdDumbDriver; Bool kdSoftCursor; -static char * +char * KdParseFindNext (char *cur, char *delim, char *save, char *last) { while (*cur && !strchr (delim, *cur)) @@ -560,97 +576,6 @@ KdSaveString (char *str) return n; } -/* - * Parse mouse information. Syntax: - * - * ,,{,