summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.gitignore1
-rw-r--r--Makefile45
-rw-r--r--acinclude.m4119
-rwxr-xr-xbin/version.mk17
-rw-r--r--configs/autoconf.in3
-rw-r--r--configs/default4
-rw-r--r--configs/freebsd-dri1
-rw-r--r--configs/linux-dri1
-rw-r--r--configure.ac418
-rw-r--r--docs/autoconf.html3
-rw-r--r--docs/devinfo.html4
-rw-r--r--docs/install.html126
-rw-r--r--docs/relnotes-7.1.html17
-rw-r--r--doxygen/Makefile4
-rw-r--r--include/GL/internal/dri_interface.h57
-rw-r--r--include/GL/internal/glcore.h73
-rw-r--r--progs/Makefile2
-rw-r--r--progs/beos/Makefile4
-rw-r--r--progs/demos/Makefile6
-rw-r--r--progs/egl/Makefile6
-rw-r--r--progs/fbdev/Makefile4
-rw-r--r--progs/fp/Makefile6
-rw-r--r--progs/glsl/Makefile8
-rw-r--r--progs/glsl/multitex.c285
-rw-r--r--progs/glsl/multitex.frag.txt15
-rw-r--r--progs/glsl/multitex.vert.txt10
-rw-r--r--progs/miniglx/Makefile4
-rw-r--r--progs/slang/Makefile2
-rw-r--r--progs/tests/Makefile6
-rw-r--r--progs/tests/fbotest2.c1
-rw-r--r--progs/tests/mipmap_limits.c32
-rw-r--r--progs/trivial/Makefile6
-rw-r--r--progs/trivial/tri.c7
-rw-r--r--progs/vp/Makefile6
-rw-r--r--progs/xdemos/.gitignore1
-rw-r--r--progs/xdemos/glthreads.c23
-rw-r--r--src/Makefile2
-rw-r--r--src/egl/Makefile6
-rw-r--r--src/egl/drivers/demo/Makefile4
-rw-r--r--src/egl/drivers/dri/Makefile4
-rw-r--r--src/egl/main/Makefile4
-rw-r--r--src/glu/Makefile6
-rw-r--r--src/glu/mesa/Makefile2
-rw-r--r--src/glu/sgi/Makefile2
-rw-r--r--src/glut/directfb/Makefile2
-rw-r--r--src/glut/fbdev/Makefile2
-rw-r--r--src/glut/glx/Makefile2
-rw-r--r--src/glut/mini/Makefile2
-rw-r--r--src/glw/Makefile2
-rw-r--r--src/glx/Makefile4
-rw-r--r--src/glx/mini/Makefile2
-rw-r--r--src/glx/x11/Makefile2
-rw-r--r--src/glx/x11/dri_glx.c2
-rw-r--r--src/glx/x11/indirect_dispatch.c5889
-rw-r--r--src/glx/x11/indirect_dispatch.h1047
-rw-r--r--src/glx/x11/indirect_dispatch_swap.c6051
-rw-r--r--src/glx/x11/indirect_reqsize.c832
-rw-r--r--src/glx/x11/indirect_reqsize.h121
-rw-r--r--src/glx/x11/indirect_size_get.c1210
-rw-r--r--src/glx/x11/indirect_size_get.h102
-rw-r--r--src/glx/x11/indirect_table.c1596
-rw-r--r--src/mesa/Makefile78
-rw-r--r--src/mesa/drivers/beos/Makefile8
-rw-r--r--src/mesa/drivers/common/driverfuncs.c39
-rw-r--r--src/mesa/drivers/common/driverfuncs.h4
-rw-r--r--src/mesa/drivers/directfb/Makefile2
-rw-r--r--src/mesa/drivers/dri/Makefile2
-rw-r--r--src/mesa/drivers/dri/common/dri_util.c124
-rw-r--r--src/mesa/drivers/dri/common/dri_util.h20
-rw-r--r--src/mesa/drivers/dri/common/utils.c229
-rw-r--r--src/mesa/drivers/dri/common/utils.h29
-rw-r--r--src/mesa/drivers/dri/common/vblank.c4
-rw-r--r--src/mesa/drivers/dri/common/xmlpool/Makefile4
-rw-r--r--src/mesa/drivers/dri/glcore/Makefile84
-rw-r--r--src/mesa/drivers/dri/glcore/glcore_driver.c128
-rw-r--r--src/mesa/drivers/dri/i965/brw_draw.c22
-rw-r--r--src/mesa/drivers/dri/i965/brw_draw_upload.c9
-rw-r--r--src/mesa/drivers/dri/intel/intel_tex.c13
-rw-r--r--src/mesa/drivers/dri/intel/intel_tex.h1
-rw-r--r--src/mesa/drivers/dri/intel/intel_tex_copy.c4
-rw-r--r--src/mesa/drivers/dri/intel/intel_tex_image.c4
-rw-r--r--src/mesa/drivers/dri/intel/intel_tex_subimage.c4
-rw-r--r--src/mesa/drivers/dri/r300/r300_reg.h1
-rw-r--r--src/mesa/drivers/dri/r300/r300_state.c6
-rw-r--r--src/mesa/drivers/dri/r300/r300_vertprog.c6
-rw-r--r--src/mesa/drivers/dri/swrast/Makefile24
-rw-r--r--src/mesa/drivers/dri/swrast/swrast.c727
-rw-r--r--src/mesa/drivers/dri/swrast/swrast_priv.h142
-rw-r--r--src/mesa/drivers/dri/swrast/swrast_span.c367
-rw-r--r--src/mesa/drivers/dri/swrast/swrast_spantemp.h328
-rw-r--r--src/mesa/drivers/dri/unichrome/via_screen.c2
-rw-r--r--src/mesa/drivers/dri/unichrome/via_tex.c4
-rw-r--r--src/mesa/drivers/glslcompiler/Makefile2
-rw-r--r--src/mesa/drivers/x11/fakeglx.c9
-rw-r--r--src/mesa/drivers/xorg/.gitignore3
-rw-r--r--src/mesa/drivers/xorg/Makefile95
-rw-r--r--src/mesa/drivers/xorg/glcore.c24
-rw-r--r--src/mesa/glapi/Makefile70
-rw-r--r--src/mesa/glapi/glapi.c11
-rw-r--r--src/mesa/glapi/glthread.c4
-rw-r--r--src/mesa/glapi/glthread.h6
-rw-r--r--src/mesa/main/config.h1
-rw-r--r--src/mesa/main/context.c40
-rw-r--r--src/mesa/main/dd.h6
-rw-r--r--src/mesa/main/dlist.c33
-rw-r--r--src/mesa/main/fbobject.c2
-rw-r--r--src/mesa/main/mipmap.c1
-rw-r--r--src/mesa/main/mipmap.h1
-rw-r--r--src/mesa/main/mtypes.h30
-rw-r--r--src/mesa/main/state.c28
-rw-r--r--src/mesa/main/texenvprogram.c59
-rw-r--r--src/mesa/main/texstore.c32
-rw-r--r--src/mesa/main/version.h2
-rw-r--r--src/mesa/shader/arbprogparse.c5
-rw-r--r--src/mesa/shader/descrip.mms7
-rw-r--r--src/mesa/shader/prog_execute.c10
-rw-r--r--src/mesa/shader/prog_execute.h2
-rw-r--r--src/mesa/shader/prog_instruction.c211
-rw-r--r--src/mesa/shader/prog_instruction.h9
-rw-r--r--src/mesa/shader/prog_parameter.c52
-rw-r--r--src/mesa/shader/prog_parameter.h10
-rw-r--r--src/mesa/shader/prog_print.c42
-rw-r--r--src/mesa/shader/prog_statevars.c52
-rw-r--r--src/mesa/shader/prog_statevars.h5
-rw-r--r--src/mesa/shader/prog_uniform.c157
-rw-r--r--src/mesa/shader/prog_uniform.h91
-rw-r--r--src/mesa/shader/program.c388
-rw-r--r--src/mesa/shader/program.h33
-rw-r--r--src/mesa/shader/programopt.c117
-rw-r--r--src/mesa/shader/programopt.h2
-rw-r--r--src/mesa/shader/shader_api.c648
-rw-r--r--src/mesa/shader/shader_api.h103
-rw-r--r--src/mesa/shader/slang/library/Makefile2
-rw-r--r--src/mesa/shader/slang/slang_codegen.c11
-rw-r--r--src/mesa/shader/slang/slang_compile.c15
-rw-r--r--src/mesa/shader/slang/slang_emit.c10
-rw-r--r--src/mesa/shader/slang/slang_link.c252
-rw-r--r--src/mesa/shader/slang/slang_link.h4
-rw-r--r--src/mesa/sources1
-rw-r--r--src/mesa/swrast/s_drawpix.c4
-rw-r--r--src/mesa/swrast/s_fragprog.c14
-rw-r--r--src/mesa/swrast/s_span.c1
-rw-r--r--src/mesa/swrast/s_texstore.c10
-rw-r--r--src/mesa/tnl/t_context.h2
-rw-r--r--src/mesa/tnl/t_vp_build.c47
-rw-r--r--src/mesa/vbo/vbo_exec_draw.c2
-rw-r--r--src/mesa/vbo/vbo_save_draw.c2
-rw-r--r--src/mesa/x86-64/Makefile2
-rw-r--r--src/mesa/x86/Makefile2
-rw-r--r--src/mesa/x86/read_rgba_span_x86.S4
-rw-r--r--windows/VC8/mesa/mesa.sln3
151 files changed, 4533 insertions, 18902 deletions
diff --git a/.gitignore b/.gitignore
index 5d351af62c..f5a0abcfe4 100644
--- a/.gitignore
+++ b/.gitignore
@@ -13,3 +13,4 @@ autom4te.cache
aclocal.m4
config.log
config.status
+cscope*
diff --git a/Makefile b/Makefile
index fffc3f959f..47c8eacbb1 100644
--- a/Makefile
+++ b/Makefile
@@ -14,27 +14,25 @@ default: $(TOP)/configs/current
doxygen:
- (cd doxygen ; make) ; \
+ cd doxygen && $(MAKE)
clean:
- @for dir in $(SUBDIRS) ; do \
+ -@touch $(TOP)/configs/current
+ -@for dir in $(SUBDIRS) ; do \
if [ -d $$dir ] ; then \
(cd $$dir && $(MAKE) clean) ; \
fi \
done
+ -@test -s $(TOP)/configs/current || rm -f $(TOP)/configs/current
-realclean:
- touch $(TOP)/configs/current
- $(MAKE) clean
+realclean: clean
-rm -rf lib*
-rm -f $(TOP)/configs/current
-rm -f $(TOP)/configs/autoconf
-rm -rf autom4te.cache
- -rm -f `find . -name \*.o`
- -rm -f `find . -name \*.a`
- -rm -f `find . -name \*.so`
- -rm -f `find . -name depend`
+ -find . '(' -name '*.o' -o -name '*.a' -o -name '*.so' -o \
+ -name depend -o -name depend.bak ')' -exec rm -f '{}' ';'
@@ -50,21 +48,20 @@ install:
linux-directfb-install:
cd src/mesa/drivers/directfb && $(MAKE) install
-# Xserver GLcore module
-glcore:
- cd src/mesa/drivers/xorg ; $(MAKE)
-
-glcore-install:
- cd src/mesa/drivers/xorg ; $(MAKE) install
+.PHONY: default doxygen clean realclean install linux-directfb-install
# If there's no current configuration file
$(TOP)/configs/current:
@echo
@echo
@echo "Please choose a configuration from the following list:"
- @ls -1 $(TOP)/configs | grep -v "current\|default\|CVS"
+ @ls -1 $(TOP)/configs | grep -v "current\|default\|CVS\|autoconf.*"
@echo
@echo "Then type 'make <config>' (ex: 'make linux-x86')"
+ @echo
+ @echo "Or, run './configure' then 'make'"
+ @echo "See './configure --help' for details"
+ @echo
@echo "(ignore the following error message)"
@exit 1
@@ -177,15 +174,16 @@ ultrix-gcc:
# Rules for making release tarballs
-DIRECTORY = Mesa-7.1pre
-LIB_NAME = MesaLib-7.1pre
-DEMO_NAME = MesaDemos-7.1pre
-GLUT_NAME = MesaGLUT-7.1pre
+DIRECTORY = Mesa-7.1-rc1
+LIB_NAME = MesaLib-7.1-rc1
+DEMO_NAME = MesaDemos-7.1-rc1
+GLUT_NAME = MesaGLUT-7.1-rc1
MAIN_FILES = \
$(DIRECTORY)/Makefile* \
$(DIRECTORY)/configure \
$(DIRECTORY)/configure.ac \
+ $(DIRECTORY)/acinclude.m4 \
$(DIRECTORY)/aclocal.m4 \
$(DIRECTORY)/descrip.mms \
$(DIRECTORY)/mms-config. \
@@ -450,9 +448,9 @@ ACLOCAL = aclocal
ACLOCAL_FLAGS =
AUTOCONF = autoconf
AC_FLAGS =
-aclocal.m4: configure.ac
+aclocal.m4: configure.ac acinclude.m4
$(ACLOCAL) $(ACLOCAL_FLAGS)
-configure: configure.ac aclocal.m4
+configure: configure.ac aclocal.m4 acinclude.m4
$(AUTOCONF) $(AC_FLAGS)
rm_depend:
@@ -531,3 +529,6 @@ md5:
@-md5sum $(GLUT_NAME).tar.gz
@-md5sum $(GLUT_NAME).tar.bz2
@-md5sum $(GLUT_NAME).zip
+
+.PHONY: tarballs rm_depend lib_gz demo_gz glut_gz lib_bz2 demo_bz2 \
+ glut_bz2 lib_zip demo_zip glut_zip md5
diff --git a/acinclude.m4 b/acinclude.m4
new file mode 100644
index 0000000000..a5b389d5da
--- /dev/null
+++ b/acinclude.m4
@@ -0,0 +1,119 @@
+# A few convenience macros for Mesa, mostly to keep all the platform
+# specifics out of configure.ac.
+
+# MESA_PIC_FLAGS()
+#
+# Find out whether to build PIC code using the option --enable-pic and
+# the configure enable_static/enable_shared settings. If PIC is needed,
+# figure out the necessary flags for the platform and compiler.
+#
+# The platform checks have been shamelessly taken from libtool and
+# stripped down to just what's needed for Mesa. See _LT_COMPILER_PIC in
+# /usr/share/aclocal/libtool.m4 or
+# http://git.savannah.gnu.org/gitweb/?p=libtool.git;a=blob;f=libltdl/m4/libtool.m4;hb=HEAD
+#
+AC_DEFUN([MESA_PIC_FLAGS],
+[AC_REQUIRE([AC_PROG_CC])dnl
+AC_ARG_VAR([PIC_FLAGS], [compiler flags for PIC code])
+AC_ARG_ENABLE([pic],
+ [AS_HELP_STRING([--disable-pic],
+ [compile PIC objects @<:@default=enabled for shared builds
+ on supported platforms@:>@])],
+ [enable_pic="$enableval"
+ test "x$enable_pic" = x && enable_pic=auto],
+ [enable_pic=auto])
+# disable PIC by default for static builds
+if test "$enable_pic" = auto && test "$enable_static" = yes; then
+ enable_pic=no
+fi
+# if PIC hasn't been explicitly disabled, try to figure out the flags
+if test "$enable_pic" != no; then
+ AC_MSG_CHECKING([for $CC option to produce PIC])
+ # allow the user's flags to override
+ if test "x$PIC_FLAGS" = x; then
+ # see if we're using GCC
+ if test "x$GCC" = xyes; then
+ case "$host_os" in
+ aix*|beos*|cygwin*|irix5*|irix6*|osf3*|osf4*|osf5*)
+ # PIC is the default for these OSes.
+ ;;
+ mingw*|os2*|pw32*)
+ # This hack is so that the source file can tell whether
+ # it is being built for inclusion in a dll (and should
+ # export symbols for example).
+ PIC_FLAGS="-DDLL_EXPORT"
+ ;;
+ darwin*|rhapsody*)
+ # PIC is the default on this platform
+ # Common symbols not allowed in MH_DYLIB files
+ PIC_FLAGS="-fno-common"
+ ;;
+ hpux*)
+ # PIC is the default for IA64 HP-UX and 64-bit HP-UX,
+ # but not for PA HP-UX.
+ case $host_cpu in
+ hppa*64*|ia64*)
+ ;;
+ *)
+ PIC_FLAGS="-fPIC"
+ ;;
+ esac
+ ;;
+ *)
+ # Everyone else on GCC uses -fPIC
+ PIC_FLAGS="-fPIC"
+ ;;
+ esac
+ else # !GCC
+ case "$host_os" in
+ hpux9*|hpux10*|hpux11*)
+ # PIC is the default for IA64 HP-UX and 64-bit HP-UX,
+ # but not for PA HP-UX.
+ case "$host_cpu" in
+ hppa*64*|ia64*)
+ # +Z the default
+ ;;
+ *)
+ PIC_FLAGS="+Z"
+ ;;
+ esac
+ ;;
+ linux*|k*bsd*-gnu)
+ case `basename "$CC"` in
+ icc*|ecc*|ifort*)
+ PIC_FLAGS="-KPIC"
+ ;;
+ pgcc*|pgf77*|pgf90*|pgf95*)
+ # Portland Group compilers (*not* the Pentium gcc
+ # compiler, which looks to be a dead project)
+ PIC_FLAGS="-fpic"
+ ;;
+ ccc*)
+ # All Alpha code is PIC.
+ ;;
+ xl*)
+ # IBM XL C 8.0/Fortran 10.1 on PPC
+ PIC_FLAGS="-qpic"
+ ;;
+ *)
+ case `$CC -V 2>&1 | sed 5q` in
+ *Sun\ C*|*Sun\ F*)
+ # Sun C 5.9 or Sun Fortran
+ PIC_FLAGS="-KPIC"
+ ;;
+ esac
+ esac
+ ;;
+ solaris*)
+ PIC_FLAGS="-KPIC"
+ ;;
+ sunos4*)
+ PIC_FLAGS="-PIC"
+ ;;
+ esac
+ fi # GCC
+ fi # PIC_FLAGS
+ AC_MSG_RESULT([$PIC_FLAGS])
+fi
+AC_SUBST([PIC_FLAGS])
+])# MESA_PIC_FLAGS
diff --git a/bin/version.mk b/bin/version.mk
new file mode 100755
index 0000000000..ab20d79dae
--- /dev/null
+++ b/bin/version.mk
@@ -0,0 +1,17 @@
+#!/usr/bin/make -sf
+# Print the various Mesa version fields. This is mostly used to add the
+# version to configure.
+
+# This reflects that this script is usually called from the toplevel
+TOP = .
+
+include $(TOP)/configs/default
+
+version:
+ @echo $(MESA_VERSION)
+major:
+ @echo $(MESA_MAJOR)
+minor:
+ @echo $(MESA_MINOR)
+tiny:
+ @echo $(MESA_TINY)
diff --git a/configs/autoconf.in b/configs/autoconf.in
index 07fe055cbb..9a70ec1fab 100644
--- a/configs/autoconf.in
+++ b/configs/autoconf.in
@@ -78,9 +78,6 @@ GLW_LIB_DEPS = -L$(TOP)/$(LIB_DIR) @GLW_MESA_DEPS@ \
$(EXTRA_LIB_PATH) @GLW_LIB_DEPS@
APP_LIB_DEPS = $(EXTRA_LIB_PATH) @APP_LIB_DEPS@
-# GLcore dependencies
-GLCORE_LIB_DEPS = $(EXTRA_LIB_PATH) @GLCORE_LIB_DEPS@
-
# DRI dependencies
DRI_LIB_DEPS = $(EXTRA_LIB_PATH) @DRI_LIB_DEPS@
LIBDRM_CFLAGS = @LIBDRM_CFLAGS@
diff --git a/configs/default b/configs/default
index 9705d6b78c..37b693932d 100644
--- a/configs/default
+++ b/configs/default
@@ -11,6 +11,7 @@ CONFIG_NAME = default
MESA_MAJOR=7
MESA_MINOR=1
MESA_TINY=0
+MESA_VERSION = $(MESA_MAJOR).$(MESA_MINOR).$(MESA_TINY)
# external projects. This should be useless now that we use libdrm.
DRM_SOURCE_PATH=$(TOP)/../drm
@@ -81,10 +82,9 @@ GLW_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -l$(GL_LIB) $(EXTRA_LIB_PATH) -lXt -lX11
APP_LIB_DEPS = -lm
-
# Installation directories (for make install)
INSTALL_DIR = /usr/local
-DRI_DRIVER_INSTALL_DIR = /usr/X11R6/lib/modules/dri
+DRI_DRIVER_INSTALL_DIR = $(INSTALL_DIR)/$(LIB_DIR)/dri
# Where libGL will look for DRI hardware drivers
DRI_DRIVER_SEARCH_DIR = $(DRI_DRIVER_INSTALL_DIR)
diff --git a/configs/freebsd-dri b/configs/freebsd-dri
index bb8fb4a3b4..9d9215483d 100644
--- a/configs/freebsd-dri
+++ b/configs/freebsd-dri
@@ -34,7 +34,6 @@ LIBDRM_LIB = `pkg-config --libs libdrm`
DRI_LIB_DEPS = -L/usr/local/lib -lm -pthread -lexpat $(LIBDRM_LIB)
GL_LIB_DEPS = -L/usr/local/lib -lX11 -lXext -lXxf86vm -lXdamage -lXfixes \
-lm -pthread $(LIBDRM_LIB)
-GLCORE_LIB_DEPS = -lm -pthread
GLUT_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -L/usr/local/lib -lGLU -lGL -lX11 -lXmu -lXt -lXi -lm
GLW_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -L/usr/local/lib -lGL -lXt -lX11
diff --git a/configs/linux-dri b/configs/linux-dri
index b4889d0176..8c325c7d34 100644
--- a/configs/linux-dri
+++ b/configs/linux-dri
@@ -48,7 +48,6 @@ LIBDRM_LIB = `pkg-config --libs libdrm`
DRI_LIB_DEPS = $(EXTRA_LIB_PATH) -lm -lpthread -lexpat -ldl $(LIBDRM_LIB)
GL_LIB_DEPS = $(EXTRA_LIB_PATH) -lX11 -lXext -lXxf86vm -lXdamage -lXfixes \
-lm -lpthread -ldl $(LIBDRM_LIB)
-GLCORE_LIB_DEPS = -lm -lpthread -ldl
# This is now 0 by default since it seems to confuse the hell out of people
diff --git a/configure.ac b/configure.ac
index 672bab85c1..a250f75ea5 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,23 +1,33 @@
dnl Process this file with autoconf to create configure.
-AC_PREREQ(2.59)
-
-dnl Versioning
-dnl Make version number available to autoconf and configure
-m4_define([mesa_version],[7.1.0])
+AC_PREREQ([2.59])
+
+dnl Versioning - scrape the version from configs/default
+m4_define([mesa_version],
+ [m4_esyscmd([${MAKE-make} -s -f bin/version.mk version | tr -d '\n'])])
+m4_ifval(mesa_version,[],[
+ m4_errprint([Error: Failed to get the Mesa version from the output of
+ running `make -f bin/version.mk version'
+])
+ m4_exit([1])
+])
-AC_INIT([Mesa],[mesa_version()],
+AC_INIT([Mesa],[mesa_version],
[https://bugs.freedesktop.org/enter_bug.cgi?product=Mesa])
-AC_CONFIG_AUX_DIR(bin)
+AC_CONFIG_AUX_DIR([bin])
AC_CANONICAL_HOST
+dnl Versions for external dependencies
+LIBDRM_REQUIRED=2.3.1
+DRI2PROTO_REQUIRED=1.1
+
dnl Check for progs
AC_PROG_CPP
AC_PROG_CC
AC_PROG_CXX
-AC_CHECK_PROGS(MAKE, [gmake make])
-AC_PATH_PROG(MKDEP, makedepend)
-AC_PATH_PROG(SED, sed)
+AC_CHECK_PROGS([MAKE], [gmake make])
+AC_PATH_PROG([MKDEP], [makedepend])
+AC_PATH_PROG([SED], [sed])
MKDEP_OPTIONS=-fdepend
dnl Ask gcc where it's keeping its secret headers
@@ -27,15 +37,15 @@ if test "x$GCC" = xyes; then
MKDEP_OPTIONS="$MKDEP_OPTIONS -I$GCC_INCLUDES"
fi
fi
-AC_SUBST(MKDEP_OPTIONS)
+AC_SUBST([MKDEP_OPTIONS])
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], DLOPEN_LIBS="-ldl"))
+ [AC_CHECK_LIB([dl], [dlopen], [DLOPEN_LIBS="-ldl"])])
dnl Make sure the pkg-config macros are defined
-m4_ifdef([PKG_PROG_PKG_CONFIG],,[
+m4_ifdef([PKG_PROG_PKG_CONFIG],[],[
m4_errprint([Error: Could not locate the pkg-config autoconf macros.
These are usually located in /usr/share/aclocal/pkg.m4. If your
macros are in a different location, try setting the environment
@@ -48,21 +58,21 @@ PKG_PROG_PKG_CONFIG()
dnl LIB_DIR - library basename
LIB_DIR=`echo $libdir | $SED 's%.*/%%'`
-AC_SUBST(LIB_DIR)
+AC_SUBST([LIB_DIR])
dnl Cache LDFLAGS so we can add EXTRA_LIB_PATH and restore it later
_SAVE_LDFLAGS="$LDFLAGS"
-AC_ARG_VAR(EXTRA_LIB_PATH,[Extra -L paths for the linker])
-AC_SUBST(EXTRA_LIB_PATH)
+AC_ARG_VAR([EXTRA_LIB_PATH],[Extra -L paths for the linker])
+AC_SUBST([EXTRA_LIB_PATH])
dnl Cache CPPFLAGS so we can add *_INCLUDES and restore it later
_SAVE_CPPFLAGS="$CPPFLAGS"
-AC_ARG_VAR(X11_INCLUDES,[Extra -I paths for X11 headers])
-AC_SUBST(X11_INCLUDES)
+AC_ARG_VAR([X11_INCLUDES],[Extra -I paths for X11 headers])
+AC_SUBST([X11_INCLUDES])
dnl Compiler macros
DEFINES=""
-AC_SUBST(DEFINES)
+AC_SUBST([DEFINES])
case "$host_os" in
linux*)
if test "x$GCC" = xyes; then
@@ -87,21 +97,21 @@ if test "x$GXX" = xyes; then
fi
dnl These should be unnecessary, but let the user set them if they want
-AC_ARG_VAR(OPT_FLAGS, [Additional optimization flags for the compiler.
+AC_ARG_VAR([OPT_FLAGS], [Additional optimization flags for the compiler.
Default is to use CFLAGS.])
-AC_ARG_VAR(ARCH_FLAGS, [Additional architecture specific flags for the
+AC_ARG_VAR([ARCH_FLAGS], [Additional architecture specific flags for the
compiler. Default is to use CFLAGS.])
-AC_SUBST(OPT_FLAGS)
-AC_SUBST(ARCH_FLAGS)
+AC_SUBST([OPT_FLAGS])
+AC_SUBST([ARCH_FLAGS])
dnl
dnl Hacks to enable 32 or 64 bit build
dnl
-AC_ARG_ENABLE(32-bit,
+AC_ARG_ENABLE([32-bit],
[AS_HELP_STRING([--enable-32-bit],
[build 32-bit libraries @<:@default=auto@:>@])],
- enable_32bit="$enableval",
- enable_32bit=auto
+ [enable_32bit="$enableval"],
+ [enable_32bit=auto]
)
if test "x$enable_32bit" = xyes; then
if test "x$GCC" = xyes; then
@@ -111,11 +121,11 @@ if test "x$enable_32bit" = xyes; then
CXXFLAGS="$CXXFLAGS -m32"
fi
fi
-AC_ARG_ENABLE(64-bit,
+AC_ARG_ENABLE([64-bit],
[AS_HELP_STRING([--enable-64-bit],
[build 64-bit libraries @<:@default=auto@:>@])],
- enable_64bit="$enableval",
- enable_64bit=auto
+ [enable_64bit="$enableval"],
+ [enable_64bit=auto]
)
if test "x$enable_64bit" = xyes; then
if test "x$GCC" = xyes; then
@@ -129,11 +139,11 @@ fi
dnl
dnl shared/static libraries, mimic libtool options
dnl
-AC_ARG_ENABLE(static,
+AC_ARG_ENABLE([static],
[AS_HELP_STRING([--enable-static],
[build static libraries @<:@default=disabled@:>@])],
- enable_static="$enableval",
- enable_static=no
+ [enable_static="$enableval"],
+ [enable_static=no]
)
case "x$enable_static" in
xyes|xno ) ;;
@@ -142,11 +152,11 @@ x ) enable_static=no ;;
AC_MSG_ERROR([Static library option '$enable_static' is not a valid])
;;
esac
-AC_ARG_ENABLE(shared,
+AC_ARG_ENABLE([shared],
[AS_HELP_STRING([--disable-shared],
[build shared libraries @<:@default=enabled@:>@])],
- enable_shared="$enableval",
- enable_shared=yes
+ [enable_shared="$enableval"],
+ [enable_shared=yes]
)
case "x$enable_shared" in
xyes|xno ) ;;
@@ -173,20 +183,20 @@ esac
dnl
dnl mklib options
dnl
-AC_ARG_VAR(MKLIB_OPTIONS,[Options for the Mesa library script, mklib])
+AC_ARG_VAR([MKLIB_OPTIONS],[Options for the Mesa library script, mklib])
if test "$enable_static" = yes; then
MKLIB_OPTIONS="$MKLIB_OPTIONS -static"
fi
-AC_SUBST(MKLIB_OPTIONS)
+AC_SUBST([MKLIB_OPTIONS])
dnl
dnl other compiler options
dnl
-AC_ARG_ENABLE(debug,
+AC_ARG_ENABLE([debug],
[AS_HELP_STRING([--enable-debug],
[use debug compiler flags and macros @<:@default=disabled@:>@])],
- enable_debug="$enableval",
- enable_debug=no
+ [enable_debug="$enableval"],
+ [enable_debug=no]
)
if test "x$enable_debug" = xyes; then
DEFINES="$DEFINES -DDEBUG"
@@ -197,13 +207,6 @@ if test "x$enable_debug" = xyes; then
CXXFLAGS="$CXXFLAGS -g"
fi
fi
-dnl These will be used near the end in the arch specific options
-AC_ARG_ENABLE(asm,
- [AS_HELP_STRING([--disable-asm],
- [disable assembly usage @<:@default=enabled on supported plaforms@:>@])],
- enable_asm="$enableval",
- enable_asm=yes
-)
dnl
dnl library names
@@ -221,11 +224,11 @@ else
GLW_LIB_NAME='lib$(GLW_LIB).so'
OSMESA_LIB_NAME='lib$(OSMESA_LIB).so'
fi
-AC_SUBST(GL_LIB_NAME)
-AC_SUBST(GLU_LIB_NAME)
-AC_SUBST(GLUT_LIB_NAME)
-AC_SUBST(GLW_LIB_NAME)
-AC_SUBST(OSMESA_LIB_NAME)
+AC_SUBST([GL_LIB_NAME])
+AC_SUBST([GLU_LIB_NAME])
+AC_SUBST([GLUT_LIB_NAME])
+AC_SUBST([GLW_LIB_NAME])
+AC_SUBST([OSMESA_LIB_NAME])
dnl
dnl Driver configuration. Options are xlib, dri and osmesa right now.
@@ -246,11 +249,11 @@ freebsd* | dragonfly*)
;;
esac
-AC_ARG_WITH(driver,
+AC_ARG_WITH([driver],
[AS_HELP_STRING([--with-driver=DRIVER],
[driver for Mesa: xlib,dri,osmesa @<:@default=dri when available, or xlib@:>@])],
- mesa_driver="$withval",
- mesa_driver="$default_driver")
+ [mesa_driver="$withval"],
+ [mesa_driver="$default_driver"])
dnl Check for valid option
case "x$mesa_driver" in
xxlib|xdri|xosmesa)
@@ -279,10 +282,10 @@ osmesa)
DRIVER_DIRS="osmesa"
;;
esac
-AC_SUBST(SRC_DIRS)
-AC_SUBST(GLU_DIRS)
-AC_SUBST(DRIVER_DIRS)
-AC_SUBST(WINDOW_SYSTEM)
+AC_SUBST([SRC_DIRS])
+AC_SUBST([GLU_DIRS])
+AC_SUBST([DRIVER_DIRS])
+AC_SUBST([WINDOW_SYSTEM])
dnl
dnl User supplied program configuration
@@ -292,12 +295,12 @@ if test -d "$srcdir/progs/demos"; then
else
default_demos=no
fi
-AC_ARG_WITH(demos,
+AC_ARG_WITH([demos],
[AS_HELP_STRING([--with-demos@<:@=DIRS...@:>@],
[optional comma delimited demo directories to build
@<:@default=auto if source available@:>@])],
- with_demos="$withval",
- with_demos="$default_demos")
+ [with_demos="$withval"],
+ [with_demos="$default_demos"])
if test "x$with_demos" = x; then
with_demos=no
fi
@@ -324,20 +327,18 @@ yes)
esac
dnl
-dnl Find out if X is available. The variables have_x or no_x will be
-dnl set and used later in the driver setups
+dnl Find out if X is available. The variable have_x is set if libX11 is
+dnl to mimic AC_PATH_XTRA.
dnl
if test -n "$PKG_CONFIG"; then
AC_MSG_CHECKING([pkg-config files for X11 are available])
- if $PKG_CONFIG --exists x11; then
+ PKG_CHECK_EXISTS([x11],[
x11_pkgconfig=yes
have_x=yes
- AC_MSG_RESULT(yes)
- else
+ ],[
x11_pkgconfig=no
- no_x=yes
- AC_MSG_RESULT(no)
- fi
+ ])
+ AC_MSG_RESULT([$x11_pkgconfig])
else
x11_pkgconfig=no
fi
@@ -355,13 +356,29 @@ xlib|dri)
;;
esac
+dnl XCB - this is only used for GLX right now
+AC_ARG_ENABLE([xcb],
+ [AS_HELP_STRING([--enable-xcb],
+ [use XCB for GLX @<:@default=disabled@:>@])],
+ [enable_xcb="$enableval"],
+ [enable_xcb=no])
+if test "x$enable_xcb" = xyes; then
+ DEFINES="$DEFINES -DUSE_XCB"
+else
+ enable_xcb=no
+fi
+
# SELinux awareness.
-AC_ARG_ENABLE(selinux, AS_HELP_STRING([--enable-selinux], [Build SELinux-aware Mesa (default: disabled)]), [MESA_SELINUX=$enableval], [MESA_SELINUX=no])
+AC_ARG_ENABLE([selinux],
+ [AS_HELP_STRING([--enable-selinux],
+ [Build SELinux-aware Mesa (default: disabled)])],
+ [MESA_SELINUX="$enableval"],
+ [MESA_SELINUX=no])
if test "x$enable_selinux" = "xyes"; then
- AC_CHECK_HEADER(selinux/selinux.h,,
- AC_MSG_ERROR([SELinux headers not found]))
- AC_CHECK_LIB(selinux,is_selinux_enabled,,
- AC_MSG_ERROR([SELinux library not found]))
+ AC_CHECK_HEADER([selinux/selinux.h],[],
+ [AC_MSG_ERROR([SELinux headers not found])])
+ AC_CHECK_LIB([selinux],[is_selinux_enabled],[],
+ [AC_MSG_ERROR([SELinux library not found])])
SELINUX_LIBS="-lselinux"
DEFINES="$DEFINES -DMESA_SELINUX"
fi
@@ -372,7 +389,7 @@ dnl
case "$mesa_driver" in
xlib)
if test "$x11_pkgconfig" = yes; then
- PKG_CHECK_MODULES(XLIBGL, x11 xext)
+ PKG_CHECK_MODULES([XLIBGL], [x11 xext])
X11_INCLUDES="$X11_INCLUDES $XLIBGL_CFLAGS"
GL_LIB_DEPS="$XLIBGL_LIBS"
else
@@ -381,7 +398,6 @@ xlib)
GL_LIB_DEPS="$X_LIBS -lX11 -lXext"
fi
GL_LIB_DEPS="$GL_LIB_DEPS $SELINUX_LIBS -lm -lpthread"
- GLCORE_LIB_DEPS=""
# if static, move the external libraries to the programs
# and empty the libraries for libGL
@@ -397,32 +413,42 @@ dri)
fi
# Check for libdrm
- PKG_CHECK_MODULES(LIBDRM, libdrm)
- PKG_CHECK_MODULES(DRI2PROTO, dri2proto >= 1.1)
+ PKG_CHECK_MODULES([LIBDRM], [libdrm >= $LIBDRM_REQUIRED])
+ PKG_CHECK_MODULES([DRI2PROTO], [dri2proto >= $DRI2PROTO_REQUIRED])
# find the DRI deps for libGL
if test "$x11_pkgconfig" = yes; then
- PKG_CHECK_MODULES(DRIGL, x11 xext xxf86vm xdamage xfixes)
+ # add xcb modules if necessary
+ dri_modules="x11 xext xxf86vm xdamage xfixes"
+ if test "$enable_xcb" = yes; then
+ dri_modules="$dri_modules x11-xcb xcb-glx"
+ fi
+
+ PKG_CHECK_MODULES([DRIGL], [$dri_modules])
X11_INCLUDES="$X11_INCLUDES $DRIGL_CFLAGS"
GL_LIB_DEPS="$DRIGL_LIBS"
else
# should check these...
X11_INCLUDES="$X11_INCLUDES $X_CFLAGS"
GL_LIB_DEPS="$X_LIBS -lX11 -lXext -lXxf86vm -lXdamage -lXfixes"
+
+ # XCB can only be used from pkg-config
+ if test "$enable_xcb" = yes; then
+ PKG_CHECK_MODULES([XCB],[x11-xcb xcb-glx])
+ X11_INCLUDES="$X11_INCLUDES $XCB_CFLAGS"
+ GL_LIB_DEPS="$GL_LIB_DEPS $XCB_LIBS"
+ fi
fi
# need DRM libs, -lpthread, etc.
GL_LIB_DEPS="$GL_LIB_DEPS $LIBDRM_LIBS -lm -lpthread $DLOPEN_LIBS"
- GLCORE_LIB_DEPS="-lm -lpthread $DLOPEN_LIBS"
;;
osmesa)
# No libGL for osmesa
GL_LIB_DEPS=""
- GLCORE_LIB_DEPS=""
;;
esac
-AC_SUBST(GL_LIB_DEPS)
-AC_SUBST(GLCORE_LIB_DEPS)
+AC_SUBST([GL_LIB_DEPS])
dnl
dnl More X11 setup
@@ -434,31 +460,31 @@ fi
dnl
dnl More DRI setup
dnl
-AC_ARG_ENABLE(glx-tls,
+AC_ARG_ENABLE([glx-tls],
[AS_HELP_STRING([--enable-glx-tls],
[enable TLS support in GLX @<:@default=disabled@:>@])],
- GLX_USE_TLS="$enableval",
- GLX_USE_TLS=no)
+ [GLX_USE_TLS="$enableval"],
+ [GLX_USE_TLS=no])
dnl Directory for DRI drivers
-AC_ARG_WITH(dri-driverdir,
+AC_ARG_WITH([dri-driverdir],
[AS_HELP_STRING([--with-dri-driverdir=DIR],
- [directory for the DRI drivers @<:@/usr/X11R6/lib/modules/dri@:>@])],
- DRI_DRIVER_INSTALL_DIR="$withval",
- DRI_DRIVER_INSTALL_DIR='/usr/X11R6/lib/modules/dri')
-AC_SUBST(DRI_DRIVER_INSTALL_DIR)
+ [directory for the DRI drivers @<:@${libdir}/dri@:>@])],
+ [DRI_DRIVER_INSTALL_DIR="$withval"],
+ [DRI_DRIVER_INSTALL_DIR='${libdir}/dri'])
+AC_SUBST([DRI_DRIVER_INSTALL_DIR])
dnl Direct rendering or just indirect rendering
-AC_ARG_ENABLE(driglx-direct,
+AC_ARG_ENABLE([driglx-direct],
[AS_HELP_STRING([--disable-driglx-direct],
[enable direct rendering in GLX for DRI @<:@default=enabled@:>@])],
- driglx_direct="$enableval",
- driglx_direct="yes")
+ [driglx_direct="$enableval"],
+ [driglx_direct="yes"])
dnl Which drivers to build - default is chosen by platform
-AC_ARG_WITH(dri-drivers,
+AC_ARG_WITH([dri-drivers],
[AS_HELP_STRING([--with-dri-drivers@<:@=DIRS...@:>@],
[comma delimited DRI drivers, e.g. "i965,radeon,nouveau" @<:@default=auto@:>@])],
- with_dri_drivers="$withval",
- with_dri_drivers=yes)
+ [with_dri_drivers="$withval"],
+ [with_dri_drivers=yes])
if test "x$with_dri_drivers" = x; then
with_dri_drivers=no
fi
@@ -481,7 +507,7 @@ esac
dnl Just default to no EGL for now
USING_EGL=0
-AC_SUBST(USING_EGL)
+AC_SUBST([USING_EGL])
dnl Set DRI_DIRS, DEFINES and LIB_DEPS
if test "$mesa_driver" = dri; then
@@ -511,14 +537,14 @@ if test "$mesa_driver" = dri; then
# be used.
if test "x$DRI_DIRS" = x; then
DRI_DIRS="i915 i965 mach64 mga r128 r200 r300 radeon \
- savage tdfx unichrome"
+ savage tdfx unichrome swrast"
fi
;;
powerpc*)
# Build only the drivers for cards that exist on PowerPC.
# At some point MGA will be added, but not yet.
if test "x$DRI_DIRS" = x; then
- DRI_DIRS="mach64 r128 r200 r300 radeon tdfx"
+ DRI_DIRS="mach64 r128 r200 r300 radeon tdfx swrast"
fi
;;
esac
@@ -538,7 +564,7 @@ if test "$mesa_driver" = dri; then
# to use the new interface.
if test "x$DRI_DIRS" = x; then
DRI_DIRS="i810 i915 i965 mach64 mga r128 r200 r300 radeon tdfx \
- unichrome savage sis"
+ unichrome savage sis swrast"
fi
;;
esac
@@ -546,7 +572,7 @@ if test "$mesa_driver" = dri; then
# default drivers
if test "x$DRI_DIRS" = x; then
DRI_DIRS="i810 i915 i965 mach64 mga r128 r200 r300 radeon s3v \
- savage sis tdfx trident unichrome ffb"
+ savage sis tdfx trident unichrome ffb swrast"
fi
DRI_DIRS=`echo "$DRI_DIRS" | $SED 's/ */ /g'`
@@ -554,23 +580,24 @@ if test "$mesa_driver" = dri; then
# Check for expat
EXPAT_INCLUDES=""
EXPAT_LIB=-lexpat
- AC_ARG_WITH(expat, AS_HELP_STRING([--with-expat=DIR],
- [expat install directory]),[
+ AC_ARG_WITH([expat],
+ [AS_HELP_STRING([--with-expat=DIR],
+ [expat install directory])],[
EXPAT_INCLUDES="-I$withval/include"
CPPFLAGS="$CPPFLAGS $EXPAT_INCLUDES"
LDFLAGS="$LDFLAGS -L$withval/$LIB_DIR"
EXPAT_LIB="-L$withval/$LIB_DIR -lexpat"
])
- AC_CHECK_HEADER(expat.h,,AC_MSG_ERROR([Expat required for DRI.]))
- AC_CHECK_LIB(expat, XML_ParserCreate,,
- AC_MSG_ERROR([Expat required for DRI.]))
+ AC_CHECK_HEADER([expat.h],[],[AC_MSG_ERROR([Expat required for DRI.])])
+ AC_CHECK_LIB([expat],[XML_ParserCreate],[],
+ [AC_MSG_ERROR([Expat required for DRI.])])
# put all the necessary libs together
DRI_LIB_DEPS="$SELINUX_LIBS $LIBDRM_LIBS $EXPAT_LIB -lm -lpthread $DLOPEN_LIBS"
fi
-AC_SUBST(DRI_DIRS)
-AC_SUBST(EXPAT_INCLUDES)
-AC_SUBST(DRI_LIB_DEPS)
+AC_SUBST([DRI_DIRS])
+AC_SUBST([EXPAT_INCLUDES])
+AC_SUBST([DRI_LIB_DEPS])
dnl
dnl OSMesa configuration
@@ -580,11 +607,11 @@ if test "$mesa_driver" = xlib; then
else
default_gl_osmesa=no
fi
-AC_ARG_ENABLE(gl-osmesa,
+AC_ARG_ENABLE([gl-osmesa],
[AS_HELP_STRING([--enable-gl-osmesa],
[enable OSMesa on libGL @<:@default=enabled for xlib driver@:>@])],
- gl_osmesa="$enableval",
- gl_osmesa="$default_gl_osmesa")
+ [gl_osmesa="$enableval"],
+ [gl_osmesa="$default_gl_osmesa"])
if test "x$gl_osmesa" = xyes; then
if test "$mesa_driver" = osmesa; then
AC_MSG_ERROR([libGL is not available for OSMesa driver])
@@ -594,11 +621,11 @@ if test "x$gl_osmesa" = xyes; then
fi
dnl Configure the channel bits for OSMesa (libOSMesa, libOSMesa16, ...)
-AC_ARG_WITH(osmesa-bits,
+AC_ARG_WITH([osmesa-bits],
[AS_HELP_STRING([--with-osmesa-bits=BITS],
[OSMesa channel bits and library name: 8, 16, 32 @<:@default=8@:>@])],
- osmesa_bits="$withval",
- osmesa_bits=8)
+ [osmesa_bits="$withval"],
+ [osmesa_bits=8])
if test "$mesa_driver" != osmesa && test "x$osmesa_bits" != x8; then
AC_MSG_WARN([Ignoring OSMesa channel bits for non-OSMesa driver])
osmesa_bits=8
@@ -615,7 +642,7 @@ x16|x32)
AC_MSG_ERROR([OSMesa bits '$osmesa_bits' is not a valid option])
;;
esac
-AC_SUBST(OSMESA_LIB)
+AC_SUBST([OSMESA_LIB])
case "$mesa_driver" in
osmesa)
@@ -638,17 +665,17 @@ osmesa)
fi
;;
esac
-AC_SUBST(OSMESA_LIB_DEPS)
-AC_SUBST(OSMESA_MESA_DEPS)
+AC_SUBST([OSMESA_LIB_DEPS])
+AC_SUBST([OSMESA_MESA_DEPS])
dnl
dnl GLU configuration
dnl
-AC_ARG_ENABLE(glu,
+AC_ARG_ENABLE([glu],
[AS_HELP_STRING([--disable-glu],
[enable OpenGL Utility library @<:@default=enabled@:>@])],
- enable_glu="$enableval",
- enable_glu=yes)
+ [enable_glu="$enableval"],
+ [enable_glu=yes])
if test "x$enable_glu" = xyes; then
SRC_DIRS="$SRC_DIRS glu"
@@ -681,17 +708,17 @@ if test "x$enable_glu" = xyes; then
;;
esac
fi
-AC_SUBST(GLU_LIB_DEPS)
-AC_SUBST(GLU_MESA_DEPS)
+AC_SUBST([GLU_LIB_DEPS])
+AC_SUBST([GLU_MESA_DEPS])
dnl
dnl GLw configuration
dnl
-AC_ARG_ENABLE(glw,
+AC_ARG_ENABLE([glw],
[AS_HELP_STRING([--disable-glw],
[enable Xt/Motif widget library @<:@default=enabled@:>@])],
- enable_glw="$enableval",
- enable_glw=yes)
+ [enable_glw="$enableval"],
+ [enable_glw=yes])
dnl Don't build GLw on osmesa
if test "x$enable_glw" = xyes && test "$mesa_driver" = osmesa; then
AC_MSG_WARN([Disabling GLw since the driver is OSMesa])
@@ -700,7 +727,7 @@ fi
if test "x$enable_glw" = xyes; then
SRC_DIRS="$SRC_DIRS glw"
if test "$x11_pkgconfig" = yes; then
- PKG_CHECK_MODULES(GLW, x11 xt)
+ PKG_CHECK_MODULES([GLW],[x11 xt])
GLW_LIB_DEPS="$GLW_LIBS"
else
# should check these...
@@ -716,8 +743,8 @@ if test "x$enable_glw" = xyes; then
GLW_MESA_DEPS=""
fi
fi
-AC_SUBST(GLW_LIB_DEPS)
-AC_SUBST(GLW_MESA_DEPS)
+AC_SUBST([GLW_LIB_DEPS])
+AC_SUBST([GLW_MESA_DEPS])
dnl
dnl GLUT configuration
@@ -727,11 +754,11 @@ if test -f "$srcdir/include/GL/glut.h"; then
else
default_glut=no
fi
-AC_ARG_ENABLE(glut,
+AC_ARG_ENABLE([glut],
[AS_HELP_STRING([--disable-glut],
[enable GLUT library @<:@default=enabled if source available@:>@])],
- enable_glut="$enableval",
- enable_glut="$default_glut")
+ [enable_glut="$enableval"],
+ [enable_glut="$default_glut"])
dnl Can't build glut if GLU not available
if test "x$enable_glu$enable_glut" = xnoyes; then
@@ -751,7 +778,7 @@ if test "x$enable_glut" = xyes; then
GLUT_CFLAGS="-fexceptions"
fi
if test "$x11_pkgconfig" = yes; then
- PKG_CHECK_MODULES(GLUT, x11 xmu xi)
+ PKG_CHECK_MODULES([GLUT],[x11 xmu xi])
GLUT_LIB_DEPS="$GLUT_LIBS"
else
# should check these...
@@ -773,9 +800,9 @@ if test "x$enable_glut" = xyes; then
GLUT_MESA_DEPS=""
fi
fi
-AC_SUBST(GLUT_LIB_DEPS)
-AC_SUBST(GLUT_MESA_DEPS)
-AC_SUBST(GLUT_CFLAGS)
+AC_SUBST([GLUT_LIB_DEPS])
+AC_SUBST([GLUT_MESA_DEPS])
+AC_SUBST([GLUT_CFLAGS])
dnl
dnl Program library dependencies
@@ -785,65 +812,89 @@ dnl
if test "x$APP_LIB_DEPS" = x; then
APP_LIB_DEPS="-lm"
fi
-AC_SUBST(APP_LIB_DEPS)
-AC_SUBST(PROGRAM_DIRS)
+AC_SUBST([APP_LIB_DEPS])
+AC_SUBST([PROGRAM_DIRS])
+dnl
dnl Arch/platform-specific settings
-PIC_FLAGS=""
+dnl
+AC_ARG_ENABLE([asm],
+ [AS_HELP_STRING([--disable-asm],
+ [disable assembly usage @<:@default=enabled on supported plaforms@:>@])],
+ [enable_asm="$enableval"],
+ [enable_asm=yes]
+)
+asm_arch=""
ASM_FLAGS=""
ASM_SOURCES=""
ASM_API=""
-AC_SUBST(PIC_FLAGS)
-AC_SUBST(ASM_FLAGS)
-AC_SUBST(ASM_SOURCES)
-AC_SUBST(ASM_API)
-case "$host_os" in
-linux*)
- PIC_FLAGS="-fPIC"
+AC_MSG_CHECKING([whether to enable assembly])
+test "x$enable_asm" = xno && AC_MSG_RESULT([no])
+# disable if cross compiling on x86/x86_64 since we must run gen_matypes
+if test "x$enable_asm" = xyes && test "x$cross_compiling" = xyes; then
case "$host_cpu" in
- i*86)
- if test "x$enable_asm" = xyes; then
- ASM_FLAGS="-DUSE_X86_ASM -DUSE_MMX_ASM -DUSE_3DNOW_ASM -DUSE_SSE_ASM"
- ASM_SOURCES='$(X86_SOURCES)'
- ASM_API='$(X86_API)'
- fi
+ i?86 | x86_64)
+ enable_asm=no
+ AC_MSG_RESULT([no, cross compiling])
+ ;;
+ esac
+fi
+# check for supported arches
+if test "x$enable_asm" = xyes; then
+ case "$host_cpu" in
+ i?86)
+ case "$host_os" in
+ linux* | freebsd* | dragonfly*)
+ test "x$enable_64bit" = xyes && asm_arch=x86_64 || asm_arch=x86
+ ;;
+ esac
;;
x86_64)
- if test "x$enable_asm" = xyes; then
- ASM_FLAGS="-DUSE_X86_64_ASM"
- ASM_SOURCES='$(X86-64_SOURCES)'
- ASM_API='$(X86-64_API)'
- fi
+ case "$host_os" in
+ linux* | freebsd* | dragonfly*)
+ test "x$enable_32bit" = xyes && asm_arch=x86 || asm_arch=x86_64
+ ;;
+ esac
;;
powerpc)
- if test "x$enable_asm" = xyes; then
- ASM_FLAGS="-DUSE_PPC_ASM -DUSE_VMX_ASM"
- ASM_SOURCES='$(PPC_SOURCES)'
- fi
+ case "$host_os" in
+ linux*)
+ asm_arch=ppc
+ ;;
+ esac
;;
esac
- ;;
-freebsd* | dragonfly*)
- PIC_FLAGS="-fPIC"
- case "$host_cpu" in
- i*86)
- PIC_FLAGS=""
- if test "x$enable_asm" = xyes; then
- ASM_FLAGS="-DUSE_X86_ASM -DUSE_MMX_ASM -DUSE_3DNOW_ASM -DUSE_SSE_ASM"
- ASM_SOURCES='$(X86_SOURCES)'
- ASM_API='$(X86_API)'
- fi
+
+ case "$asm_arch" in
+ x86)
+ ASM_FLAGS="-DUSE_X86_ASM -DUSE_MMX_ASM -DUSE_3DNOW_ASM -DUSE_SSE_ASM"
+ ASM_SOURCES='$(X86_SOURCES)'
+ ASM_API='$(X86_API)'
+ AC_MSG_RESULT([yes, x86])
;;
x86_64)
- if test "x$enable_asm" = xyes; then
- ASM_FLAGS="-DUSE_X86_64_ASM"
- ASM_SOURCES='$(X86-64_SOURCES)'
- ASM_API='$(X86-64_API)'
- fi
+ ASM_FLAGS="-DUSE_X86_64_ASM"
+ ASM_SOURCES='$(X86-64_SOURCES)'
+ ASM_API='$(X86-64_API)'
+ AC_MSG_RESULT([yes, x86_64])
+ ;;
+ ppc)
+ ASM_FLAGS="-DUSE_PPC_ASM -DUSE_VMX_ASM"
+ ASM_SOURCES='$(PPC_SOURCES)'
+ AC_MSG_RESULT([yes, ppc])
+ ;;
+ *)
+ AC_MSG_RESULT([no, platform not supported])
;;
esac
- ;;
-esac
+fi
+AC_SUBST([ASM_FLAGS])
+AC_SUBST([ASM_SOURCES])
+AC_SUBST([ASM_API])
+
+dnl PIC code macro
+MESA_PIC_FLAGS
+
dnl Restore LDFLAGS and CPPFLAGS
LDFLAGS="$_SAVE_LDFLAGS"
@@ -851,13 +902,16 @@ CPPFLAGS="$_SAVE_CPPFLAGS"
dnl Substitute the config
AC_CONFIG_FILES([configs/autoconf])
-AC_OUTPUT
dnl Replace the configs/current symlink
+AC_CONFIG_COMMANDS([configs],[
if test -f configs/current || test -L configs/current; then
rm -f configs/current
fi
ln -s autoconf configs/current
+])
+
+AC_OUTPUT
dnl
dnl Output some configuration info for the user
diff --git a/docs/autoconf.html b/docs/autoconf.html
index d0f91558b7..837c92f4e2 100644
--- a/docs/autoconf.html
+++ b/docs/autoconf.html
@@ -178,8 +178,7 @@ drivers.
<ul>
<li><code>--with-dri-driverdir=DIR</code> - This option specifies the
location the DRI drivers will be installed to and the location libGL
-will search for DRI drivers. The default is
-<code>/usr/X11R6/lib/modules/dri</code>.
+will search for DRI drivers. The default is <code>${libdir}/dri</code>.
</li>
<li><code>--with-dri-drivers=DRIVER,DRIVER,...</code> - This option
allows a specific set of DRI drivers to be built. For example,
diff --git a/docs/devinfo.html b/docs/devinfo.html
index 1f54a92d0f..3cebf5f36d 100644
--- a/docs/devinfo.html
+++ b/docs/devinfo.html
@@ -136,11 +136,11 @@ Update the docs/VERSIONS file too.
<p>
Edit the MESA_MAJOR, MESA_MINOR and MESA_TINY version numbers in
-configs/default and configure.ac.
+configs/default.
</p>
<p>
-Make sure the values in src/mesa/main/version.h is correct.
+Make sure the values in src/mesa/main/version.h are correct.
</p>
<p>
diff --git a/docs/install.html b/docs/install.html
index 10688d8ca8..30565a1dc4 100644
--- a/docs/install.html
+++ b/docs/install.html
@@ -21,16 +21,53 @@
<a name="unix-x11">
<H2>1. Unix/X11 Compilation and Installation</H1>
-<h3>1.1 Compilation</h3>
+
+<h3>1.1 Prerequisites for DRI and Hardware Acceleration</h3>
+
+<p>
+To build Mesa with DRI-based hardware acceleration you must first have
+the right version of DRM.
+</p>
+
+<p>
+For Mesa 7.1 a particular snapshot of
+<a href="http://dri.freedesktop.org/libdrm/">DRM</a> from git is required:
+</p>
+
+<pre>
+git-clone git://anongit.freedesktop.org/git/mesa/drm
+git-checkout (XXXX HASH ID TBD)
+</pre>
+</li>
+
+<p>
+You should also be using Xorg server version 1.4
+</p>
+
+
+
+<h3>1.2 Autoconf Compilation</h3>
+
+<p>
+Mesa may be <a href="autoconf.html">built using autoconf</a>.
+This should work well on most GNU-based systems.
+When that fails, the traditional Mesa build system is available.
+
+
+
+<h3>1.3 Traditional Compilation</h3>
+
+<p>
+The traditional Mesa build system is based on a collection of pre-defined
+system configurations.
+</p>
+<p>
+To see the list of configurations, type <b>make</b> alone.
+Then choose a configuration from the list and type <b>make configname</b>.
+</p>
<p>
-Mesa is built by reading Makefile stubs from the configs directory.
-There are configurations for many Unix variants and different Mesa
-options. Type <b>make</b> from the top-level directory to see a list of
-supported system configurations. Alternatively, an autoconf system can
-be used to create a Makefile stub for your system. See the <a
-href="autoconf.html">autoconf instructions</a> for more details. Mesa
-may be compiled in several ways using the predefined configurations:
+Mesa may be built in several different ways using the predefined configurations:
</p>
<ul>
<li><b><em>Stand-alone/Xlib mode</em></b> - Mesa will be compiled as
@@ -55,43 +92,6 @@ accelerated OpenGL rendering (for ATI, Intel, Matrox, etc) will be built.
The libGL.so library will support the GLX extension and will load/use
the DRI hardware drivers.
-<p>
-<b>Prerequisites:</b>
-</p>
-
-<ol>
-
-<li>
-<p>
-For Mesa 7.0.2 <a href="http://dri.freedesktop.org/libdrm/">
-DRM version 2.3</a> is required.
-</p>
-<p>
-To check if you already have it, run:
-<br>
-<code>pkg-config --modversion libdrm</code>
-</p>
-<p>
-You can download and install a <a href="http://dri.freedesktop.org/libdrm/">
-tarball release</a> or get the code from git with:
-<br>
-<code>git clone git://anongit.freedesktop.org/git/mesa/drm</code>
-<br>
-Then revert to the drm-2.3.0 tag with:
-<br>
-<code>git-reset --hard drm-2.3.0</code>
-</p>
-</li>
-
-<li>
-Relatively recent
-<a href="http://freedesktop.org/wiki/Software_2fXserver" target="_parent">
-X.org</a> release.
-Mesa depends on a number of X header and library files.
-</li>
-
-</ol>
-
<p>
Build Mesa and the DRI hardware drivers by running
@@ -104,8 +104,13 @@ There are also <code>linux-dri-x86</code>, <code>linux-dri-x86-64</code>,
and <code>linux-ppc</code> configurations which are optimized for those
architectures.
</p>
+<p>
+Make sure you have the prerequisite versions of DRM and Xserver mentioned
+above.
+</p>
</li>
+
</ul>
@@ -115,7 +120,7 @@ Later, if you want to rebuild for a different configuration run
</p>
-<h3>1.2 The libraries</h3>
+<h3>1.4 The libraries</h3>
<p>
When compilation has finished, look in the top-level <code>lib/</code>
@@ -156,15 +161,15 @@ lrwxrwxrwx 1 brian users 23 Mar 26 07:53 libOSMesa.so.6 -> libOSM
If you built the DRI hardware drivers, you'll also see the DRI drivers:
</p>
<pre>
--rwxr-xr-x 1 brian users 15607851 Jul 21 12:11 ffb_dri.so*
--rwxr-xr-x 1 brian users 15148747 Jul 21 12:11 i810_dri.so*
--rwxr-xr-x 1 brian users 14497814 Jul 21 12:11 i830_dri.so*
--rwxr-xr-x 1 brian users 16895413 Jul 21 12:11 i915_dri.so*
+-rwxr-xr-x 1 brian users 15607851 Jul 21 12:11 ffb_dri.so
+-rwxr-xr-x 1 brian users 15148747 Jul 21 12:11 i810_dri.so
+-rwxr-xr-x 1 brian users 14497814 Jul 21 12:11 i830_dri.so
+-rwxr-xr-x 1 brian users 16895413 Jul 21 12:11 i915_dri.so
-rwxr-xr-x 1 brian users 11320803 Jul 21 12:11 mach64_dri.so
-rwxr-xr-x 1 brian users 11418014 Jul 21 12:12 mga_dri.so
-rwxr-xr-x 1 brian users 11064426 Jul 21 12:12 r128_dri.so
-rwxr-xr-x 1 brian users 11849858 Jul 21 12:12 r200_dri.so
--rwxr-xr-x 1 brian users 16050488 Jul 21 12:11 r300_dri.so*
+-rwxr-xr-x 1 brian users 16050488 Jul 21 12:11 r300_dri.so
-rwxr-xr-x 1 brian users 11757388 Jul 21 12:12 radeon_dri.so
-rwxr-xr-x 1 brian users 11232304 Jul 21 12:13 s3v_dri.so
-rwxr-xr-x 1 brian users 11062970 Jul 21 12:13 savage_dri.so
@@ -175,7 +180,7 @@ If you built the DRI hardware drivers, you'll also see the DRI drivers:
</pre>
-<h3>1.3 Running the demos</h3>
+<h3>1.5 Running the demos</h3>
<p>
If you downloaded/unpacked the MesaDemos-x.y.z.tar.gz archive or
@@ -184,18 +189,15 @@ bunch of demonstration programs.
</p>
<p>
-Before running a demo, you may have to set an environment variable
-(such as <b>LD_LIBRARY_PATH</b> on Linux) to indicate where the
-libraries are located. For example:
+Before running a demo, you'll probably have to set two environment variables
+to indicate where the libraries are located. For example:
<p>
<blockquote>
-<b>cd</b> into the Mesa <b>lib/</b> directory.
-<br>
-<b>setenv LD_LIBRARY_PATH ${cwd}</b> (if using csh or tcsh shell)
+<b>cd lib/</b>
<br>
-or,
+<b>export LD_LIBRARY_PATH=${PWD}</b>
<br>
-<b>export LD_LIBRARY_PATH=${PWD}</b> (if using bash or sh shell)
+<b>export LIBGL_DRIVERS_PATH=${PWD}</b> (if using DRI drivers)
</blockquote>
<p>
@@ -253,7 +255,7 @@ Retrace your steps if this doesn't look right.
</p>
-<H3>1.4 Installing the header and library files</H3>
+<H3>1.6 Installing the header and library files</H3>
<p>
The standard location for the OpenGL header files on Unix-type systems is
@@ -293,7 +295,7 @@ This is a handy way to compare multiple OpenGL implementations.
</p>
-<H3>1.5 pkg-config support</H3>
+<H3>1.7 Building OpenGL Programs With pkg-config</H3>
<p>
Running <code>make install</code> will install package configuration files
diff --git a/docs/relnotes-7.1.html b/docs/relnotes-7.1.html
index 3974593748..5a9a044ce2 100644
--- a/docs/relnotes-7.1.html
+++ b/docs/relnotes-7.1.html
@@ -8,10 +8,13 @@
<body bgcolor="#eeeeee">
-<H1>Mesa 7.1 Release Notes / (<em>in progress</em>)</H1>
+<H1>Mesa 7.1 Release Notes / May XX, 2008</H1>
<p>
Mesa 7.1 is a new development release.
+There have been many internal code changes since Mesa 7.0.x.
+It should be relatively stable, but those who are especially concerned about
+stability should wait for Mesa 7.2.
</p>
@@ -23,21 +26,13 @@ TBD
<h2>New features</h2>
<ul>
+<li>autoconf-based configuration
+<li>Reduced dependencies between X server and Mesa
<li>GL_EXT_texture_from_pixmap extension for Xlib driver
<li>Support for the GL shading language with i965 driver (implemented by Intel)
</ul>
-<h2>Bug fixes</h2>
-<ul>
-</ul>
-
-
-<h2>Internal code changes</h2>
-<ul>
-</ul>
-
-
<h2>To Do (someday) items</h2>
<ul>
<li>Remove the MEMCPY() and _mesa_memcpy() wrappers and just use memcpy().
diff --git a/doxygen/Makefile b/doxygen/Makefile
index d8dd555b05..15ade4043b 100644
--- a/doxygen/Makefile
+++ b/doxygen/Makefile
@@ -29,5 +29,5 @@ subset: $(SUBSET:.doxy=.tag)
$(foreach FILE,$(SUBSET),doxygen $(FILE);)
clean:
- rm -rf $(FULL:.doxy=) $(SUBSET:.doxy=)
- rm -rf *.tag
+ -rm -rf $(FULL:.doxy=) $(SUBSET:.doxy=)
+ -rm -rf *.tag
diff --git a/include/GL/internal/dri_interface.h b/include/GL/internal/dri_interface.h
index 1bfb5efb2c..033d7a4ae4 100644
--- a/include/GL/internal/dri_interface.h
+++ b/include/GL/internal/dri_interface.h
@@ -67,6 +67,7 @@ typedef struct __DRImediaStreamCounterExtensionRec __DRImediaStreamCounterExtens
typedef struct __DRItexOffsetExtensionRec __DRItexOffsetExtension;
typedef struct __DRItexBufferExtensionRec __DRItexBufferExtension;
typedef struct __DRIlegacyExtensionRec __DRIlegacyExtension;
+typedef struct __DRIswrastExtensionRec __DRIswrastExtension;
/*@}*/
@@ -256,6 +257,7 @@ typedef struct __DRIgetDrawableInfoExtensionRec __DRIgetDrawableInfoExtension;
typedef struct __DRIsystemTimeExtensionRec __DRIsystemTimeExtension;
typedef struct __DRIdamageExtensionRec __DRIdamageExtension;
typedef struct __DRIloaderExtensionRec __DRIloaderExtension;
+typedef struct __DRIswrastLoaderExtensionRec __DRIswrastLoaderExtension;
/**
@@ -357,6 +359,40 @@ struct __DRIloaderExtensionRec {
int num_rects, void *loaderPrivate);
};
+#define __DRI_SWRAST_IMAGE_OP_DRAW 1
+#define __DRI_SWRAST_IMAGE_OP_CLEAR 2
+#define __DRI_SWRAST_IMAGE_OP_SWAP 3
+
+/**
+ * SWRast Loader extension.
+ */
+#define __DRI_SWRAST_LOADER "DRI_SWRastLoader"
+#define __DRI_SWRAST_LOADER_VERSION 1
+struct __DRIswrastLoaderExtensionRec {
+ __DRIextension base;
+
+ /*
+ * Drawable position and size
+ */
+ void (*getDrawableInfo)(__DRIdrawable *drawable,
+ int *x, int *y, int *width, int *height,
+ void *loaderPrivate);
+
+ /**
+ * Put image to drawable
+ */
+ void (*putImage)(__DRIdrawable *drawable, int op,
+ int x, int y, int width, int height, char *data,
+ void *loaderPrivate);
+
+ /**
+ * Get image from drawable
+ */
+ void (*getImage)(__DRIdrawable *drawable,
+ int x, int y, int width, int height, char *data,
+ void *loaderPrivate);
+};
+
/**
* The remaining extensions describe driver extensions, immediately
* available interfaces provided by the driver. To start using the
@@ -569,4 +605,25 @@ struct __DRIlegacyExtensionRec {
void *loaderPrivate);
};
+/**
+ * This extension provides alternative screen, drawable and context
+ * constructors for swrast DRI functionality. This is used in
+ * conjunction with the core extension.
+ */
+#define __DRI_SWRAST "DRI_SWRast"
+#define __DRI_SWRAST_VERSION 1
+
+struct __DRIswrastExtensionRec {
+ __DRIextension base;
+
+ __DRIscreen *(*createNewScreen)(int screen,
+ const __DRIextension **extensions,
+ const __DRIconfig ***driver_configs,
+ void *loaderPrivate);
+
+ __DRIdrawable *(*createNewDrawable)(__DRIscreen *screen,
+ const __DRIconfig *config,
+ void *loaderPrivate);
+};
+
#endif
diff --git a/include/GL/internal/glcore.h b/include/GL/internal/glcore.h
index ae1955a77d..1bb63c1aee 100644
--- a/include/GL/internal/glcore.h
+++ b/include/GL/internal/glcore.h
@@ -181,77 +181,4 @@ typedef struct __GLcontextModesRec {
#define GLX_TEXTURE_2D_BIT_EXT 0x00000002
#define GLX_TEXTURE_RECTANGLE_BIT_EXT 0x00000004
-
-/************************************************************************/
-
-#ifdef _NEED_GL_CORE_IF
-
-/**
- * The GLcore interface (a subset of the XMesa interface)
- */
-#define __GL_CORE "GL_Core"
-
-typedef struct __GLcoreModuleRec {
- /*
- * XMesaVisual
- */
- XMesaVisual (*XMesaCreateVisual)( ScreenPtr display,
- VisualPtr visinfo,
- GLboolean rgb_flag,
- GLboolean alpha_flag,
- GLboolean db_flag,
- GLboolean stereo_flag,
- GLboolean ximage_flag,
- GLint depth_size,
- GLint stencil_size,
- GLint accum_red_size,
- GLint accum_green_size,
- GLint accum_blue_size,
- GLint accum_alpha_size,
- GLint num_samples,
- GLint level,
- GLint visualCaveat );
-
- void (*XMesaDestroyVisual)( XMesaVisual v );
-
- /*
- * XMesaBuffer
- */
- XMesaBuffer (*XMesaCreateWindowBuffer)( XMesaVisual v,
- WindowPtr w );
-
- XMesaBuffer (*XMesaCreatePixmapBuffer)( XMesaVisual v,
- PixmapPtr p,
- ColormapPtr cmap );
-
- void (*XMesaDestroyBuffer)( XMesaBuffer b );
-
- void (*XMesaSwapBuffers)( XMesaBuffer b );
-
- void (*XMesaResizeBuffers)( XMesaBuffer b );
-
- /*
- * XMesaContext
- */
- XMesaContext (*XMesaCreateContext)( XMesaVisual v,
- XMesaContext share_list );
-
- void (*XMesaDestroyContext)( XMesaContext c );
-
- GLboolean (*XMesaCopyContext)( XMesaContext src,
- XMesaContext dst,
- GLuint mask );
-
- GLboolean (*XMesaMakeCurrent2)( XMesaContext c,
- XMesaBuffer drawBuffer,
- XMesaBuffer readBuffer );
-
- GLboolean (*XMesaForceCurrent)( XMesaContext c );
-
- GLboolean (*XMesaLoseCurrent)( XMesaContext c );
-
-} __GLcoreModule;
-
-#endif /* _NEED_GL_CORE_IF */
-
#endif /* __gl_core_h_ */
diff --git a/progs/Makefile b/progs/Makefile
index 5e705efa7e..c99f4eebcc 100644
--- a/progs/Makefile
+++ b/progs/Makefile
@@ -25,7 +25,7 @@ subdirs:
install:
clean:
- @for dir in $(SUBDIRS) tests ; do \
+ -@for dir in $(SUBDIRS) tests ; do \
if [ -d $$dir ] ; then \
(cd $$dir && $(MAKE) clean) ; \
fi \
diff --git a/progs/beos/Makefile b/progs/beos/Makefile
index 491e8e442d..0dc4cdce63 100644
--- a/progs/beos/Makefile
+++ b/progs/beos/Makefile
@@ -19,8 +19,8 @@ INCLUDES = -I. -I- -I../../include
default: demo sample GLInfo
clean:
- rm -f demo sample GLInfo
- rm -f *.o
+ -rm -f demo sample GLInfo
+ -rm -f *.o
demo: demo.o
$(LD) demo.o $(LDFLAGS) $(LIBS) -o $@
diff --git a/progs/demos/Makefile b/progs/demos/Makefile
index 01b76ad105..7fde77f0b4 100644
--- a/progs/demos/Makefile
+++ b/progs/demos/Makefile
@@ -11,9 +11,11 @@ OSMESA16_LIBS = -L$(TOP)/$(LIB_DIR) -lglut -lOSMesa16 -lGLU -lGL $(APP_LIB_DEPS)
OSMESA32_LIBS = -L$(TOP)/$(LIB_DIR) -lglut -lOSMesa32 -lGLU -lGL $(APP_LIB_DEPS)
-LIB_DEP = $(TOP)/$(LIB_DIR)/$(GL_LIB_NAME) $(TOP)/$(LIB_DIR)/$(GLU_LIB_NAME) $(TOP)/$(LIB_DIR)/$(GLUT_LIB_NAME)
+LIB_DEP = $(TOP)/$(LIB_DIR)/$(GL_LIB_NAME) $(TOP)/$(LIB_DIR)/$(GLU_LIB_NAME) \
+ $(TOP)/$(LIB_DIR)/$(GLUT_LIB_NAME)
-LIBS = -L$(TOP)/$(LIB_DIR) -l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB) $(APP_LIB_DEPS) -lX11 -lXi -lXmu
+LIBS = -L$(TOP)/$(LIB_DIR) -l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB) \
+ $(APP_LIB_DEPS)
PROGS = \
arbfplight \
diff --git a/progs/egl/Makefile b/progs/egl/Makefile
index 07215604d3..416d2c04b2 100644
--- a/progs/egl/Makefile
+++ b/progs/egl/Makefile
@@ -60,6 +60,6 @@ eglgears.o: eglgears.c $(HEADERS)
clean:
- rm -f *.o *~
- rm -f *.so
- rm -f $(PROGRAMS)
+ -rm -f *.o *~
+ -rm -f *.so
+ -rm -f $(PROGRAMS)
diff --git a/progs/fbdev/Makefile b/progs/fbdev/Makefile
index 56daf56f8a..39401243e5 100644
--- a/progs/fbdev/Makefile
+++ b/progs/fbdev/Makefile
@@ -37,8 +37,8 @@ LIBS = -L$(TOP)/$(LIB_DIR) -l$(GLU_LIB) -l$(GL_LIB) $(APP_LIB_DEPS)
default: depend $(PROGS)
clean:
- rm -f $(PROGS)
- rm -f *.o
+ -rm -f $(PROGS)
+ -rm -f *.o
depend: $(SOURCES)
diff --git a/progs/fp/Makefile b/progs/fp/Makefile
index a395b734ef..09f22d1a7b 100644
--- a/progs/fp/Makefile
+++ b/progs/fp/Makefile
@@ -86,9 +86,9 @@ UTIL_FILES = readtex.h readtex.c
default: $(UTIL_FILES) $(PROGS)
clean:
- rm -f $(PROGS)
- rm -f *.o
- rm -f getproclist.h
+ -rm -f $(PROGS)
+ -rm -f *.o
+ -rm -f getproclist.h
# auto code generation
diff --git a/progs/glsl/Makefile b/progs/glsl/Makefile
index ff8fbeb99b..e3f205cdb9 100644
--- a/progs/glsl/Makefile
+++ b/progs/glsl/Makefile
@@ -15,6 +15,7 @@ PROGS = \
bump \
deriv \
mandelbrot \
+ multitex \
noise \
points \
texdemo1 \
@@ -102,6 +103,13 @@ mandelbrot: mandelbrot.o shaderutil.o
$(CC) -I$(INCDIR) $(CFLAGS) $(LDFLAGS) mandelbrot.o shaderutil.o $(LIBS) -o $@
+multitex.o: multitex.c extfuncs.h readtex.h shaderutil.h
+ $(CC) -c -I$(INCDIR) $(CFLAGS) multitex.c
+
+multitex: multitex.o readtex.o shaderutil.o
+ $(CC) -I$(INCDIR) $(CFLAGS) $(LDFLAGS) multitex.o readtex.o shaderutil.o $(LIBS) -o $@
+
+
noise.o: noise.c extfuncs.h shaderutil.h
$(CC) -c -I$(INCDIR) $(CFLAGS) noise.c
diff --git a/progs/glsl/multitex.c b/progs/glsl/multitex.c
new file mode 100644
index 0000000000..5574ed4139
--- /dev/null
+++ b/progs/glsl/multitex.c
@@ -0,0 +1,285 @@
+/**
+ * Test multi-texturing with GL shading language.
+ *
+ * Copyright (C) 2008 Brian Paul 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, 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
+ * BRIAN PAUL 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 <assert.h>
+#include <math.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include "GL/glut.h"
+#include "readtex.h"
+#include "extfuncs.h"
+#include "shaderutil.h"
+
+static const char *Demo = "multitex";
+
+static const char *VertFile = "multitex.vert.txt";
+static const char *FragFile = "multitex.frag.txt";
+
+static const char *TexFiles[2] =
+ {
+ "../images/tile.rgb",
+ "../images/tree2.rgba"
+ };
+
+
+static GLuint Program;
+
+static GLfloat Xrot = -90.0, Yrot = .0, Zrot = 0.0;
+static GLfloat EyeDist = 10;
+static GLboolean Anim = GL_TRUE;
+
+
+/* value[0] = tex unit */
+static struct uniform_info Uniforms[] = {
+ { "tex1", 1, GL_INT, { 0, 0, 0, 0 }, -1 },
+ { "tex2", 1, GL_INT, { 1, 0, 0, 0 }, -1 },
+ END_OF_UNIFORMS
+};
+
+
+static void
+DrawPolygon(GLfloat size)
+{
+ glPushMatrix();
+ glRotatef(90, 1, 0, 0);
+ glNormal3f(0, 0, 1);
+ glBegin(GL_POLYGON);
+
+ glMultiTexCoord2f(GL_TEXTURE0, 0, 0);
+ glMultiTexCoord2f(GL_TEXTURE1, 0, 0);
+ glVertex2f(-size, -size);
+
+ glMultiTexCoord2f(GL_TEXTURE0, 2, 0);
+ glMultiTexCoord2f(GL_TEXTURE1, 1, 0);
+ glVertex2f( size, -size);
+
+ glMultiTexCoord2f(GL_TEXTURE0, 2, 2);
+ glMultiTexCoord2f(GL_TEXTURE1, 1, 1);
+ glVertex2f( size, size);
+
+ glMultiTexCoord2f(GL_TEXTURE0, 0, 2);
+ glMultiTexCoord2f(GL_TEXTURE1, 0, 1);
+ glVertex2f(-size, size);
+
+ glEnd();
+ glPopMatrix();
+}
+
+
+static void
+draw(void)
+{
+ glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
+
+ glPushMatrix(); /* modelview matrix */
+ glTranslatef(0.0, 0.0, -EyeDist);
+ glRotatef(Zrot, 0, 0, 1);
+ glRotatef(Yrot, 0, 1, 0);
+ glRotatef(Xrot, 1, 0, 0);
+
+ DrawPolygon(3.0);
+
+ glPopMatrix();
+
+ glutSwapBuffers();
+}
+
+
+static void
+idle(void)
+{
+ GLfloat t = 0.05 * glutGet(GLUT_ELAPSED_TIME);
+ Yrot = t;
+ glutPostRedisplay();
+}
+
+
+static void
+key(unsigned char k, int x, int y)
+{
+ (void) x;
+ (void) y;
+ switch (k) {
+ case ' ':
+ case 'a':
+ Anim = !Anim;
+ if (Anim)
+ glutIdleFunc(idle);
+ else
+ glutIdleFunc(NULL);
+ break;
+ case 'z':
+ EyeDist -= 0.5;
+ if (EyeDist < 3.0)
+ EyeDist = 3.0;
+ break;
+ case 'Z':
+ EyeDist += 0.5;
+ if (EyeDist > 90.0)
+ EyeDist = 90;
+ break;
+ case 27:
+ exit(0);
+ }
+ glutPostRedisplay();
+}
+
+
+static void
+specialkey(int key, int x, int y)
+{
+ GLfloat step = 2.0;
+ (void) x;
+ (void) y;
+ switch (key) {
+ case GLUT_KEY_UP:
+ Xrot += step;
+ break;
+ case GLUT_KEY_DOWN:
+ Xrot -= step;
+ break;
+ case GLUT_KEY_LEFT:
+ Yrot -= step;
+ break;
+ case GLUT_KEY_RIGHT:
+ Yrot += step;
+ break;
+ }
+ glutPostRedisplay();
+}
+
+
+/* new window size or exposure */
+static void
+Reshape(int width, int height)
+{
+ GLfloat ar = (float) width / (float) height;
+ glViewport(0, 0, (GLint)width, (GLint)height);
+ glMatrixMode(GL_PROJECTION);
+ glLoadIdentity();
+ glFrustum(-2.0*ar, 2.0*ar, -2.0, 2.0, 4.0, 100.0);
+ glMatrixMode(GL_MODELVIEW);
+ glLoadIdentity();
+}
+
+
+static void
+InitTextures(void)
+{
+ GLenum filter = GL_LINEAR;
+ int i;
+
+ for (i = 0; i < 2; i++) {
+ GLint imgWidth, imgHeight;
+ GLenum imgFormat;
+ GLubyte *image = NULL;
+
+ image = LoadRGBImage(TexFiles[i], &imgWidth, &imgHeight, &imgFormat);
+ if (!image) {
+ printf("Couldn't read %s\n", TexFiles[i]);
+ exit(0);
+ }
+
+ glActiveTexture(GL_TEXTURE0 + i);
+ glBindTexture(GL_TEXTURE_2D, 42 + i);
+ gluBuild2DMipmaps(GL_TEXTURE_2D, 4, imgWidth, imgHeight,
+ imgFormat, GL_UNSIGNED_BYTE, image);
+ free(image);
+
+ glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_REPEAT);
+ glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_REPEAT);
+ glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, filter);
+ glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, filter);
+ }
+}
+
+
+static GLuint
+CreateProgram(const char *vertProgFile, const char *fragProgFile,
+ struct uniform_info *uniforms)
+{
+ GLuint fragShader, vertShader, program;
+
+ vertShader = CompileShaderFile(GL_VERTEX_SHADER, vertProgFile);
+ fragShader = CompileShaderFile(GL_FRAGMENT_SHADER, fragProgFile);
+ assert(vertShader);
+ program = LinkShaders(vertShader, fragShader);
+
+ glUseProgram_func(program);
+
+ InitUniforms(program, uniforms);
+
+ return program;
+}
+
+
+static void
+InitPrograms(void)
+{
+ Program = CreateProgram(VertFile, FragFile, Uniforms);
+}
+
+
+static void
+InitGL(void)
+{
+ const char *version = (const char *) glGetString(GL_VERSION);
+
+ if (version[0] != '2' || version[1] != '.') {
+ printf("Warning: this program expects OpenGL 2.0\n");
+ /*exit(1);*/
+ }
+ printf("GL_RENDERER = %s\n",(const char *) glGetString(GL_RENDERER));
+
+ GetExtensionFuncs();
+
+ InitTextures();
+ InitPrograms();
+
+ glEnable(GL_DEPTH_TEST);
+
+ glClearColor(.6, .6, .9, 0);
+ glColor3f(1.0, 1.0, 1.0);
+}
+
+
+int
+main(int argc, char *argv[])
+{
+ glutInit(&argc, argv);
+ glutInitWindowSize(500, 400);
+ glutInitDisplayMode(GLUT_RGB | GLUT_DEPTH | GLUT_DOUBLE);
+ glutCreateWindow(Demo);
+ glutReshapeFunc(Reshape);
+ glutKeyboardFunc(key);
+ glutSpecialFunc(specialkey);
+ glutDisplayFunc(draw);
+ if (Anim)
+ glutIdleFunc(idle);
+ InitGL();
+ glutMainLoop();
+ return 0;
+}
diff --git a/progs/glsl/multitex.frag.txt b/progs/glsl/multitex.frag.txt
new file mode 100644
index 0000000000..86045306af
--- /dev/null
+++ b/progs/glsl/multitex.frag.txt
@@ -0,0 +1,15 @@
+// Multi-texture fragment shader
+// Brian Paul
+
+// Composite second texture over first.
+// We're assuming the 2nd texture has a meaningful alpha channel.
+
+uniform sampler2D tex1;
+uniform sampler2D tex2;
+
+void main()
+{
+ vec4 t1 = texture2D(tex1, gl_TexCoord[0].xy, 0.0);
+ vec4 t2 = texture2D(tex2, gl_TexCoord[1].xy, 0.0);
+ gl_FragColor = mix(t1, t2, t2.w);
+}
diff --git a/progs/glsl/multitex.vert.txt b/progs/glsl/multitex.vert.txt
new file mode 100644
index 0000000000..5518ca1ddd
--- /dev/null
+++ b/progs/glsl/multitex.vert.txt
@@ -0,0 +1,10 @@
+// Multi-texture vertex shader
+// Brian Paul
+
+
+void main()
+{
+ gl_TexCoord[0] = gl_MultiTexCoord0;
+ gl_TexCoord[1] = gl_MultiTexCoord1;
+ gl_Position = ftransform();
+}
diff --git a/progs/miniglx/Makefile b/progs/miniglx/Makefile
index 5d0c8eae64..d5258b0a96 100644
--- a/progs/miniglx/Makefile
+++ b/progs/miniglx/Makefile
@@ -43,8 +43,8 @@ LIBS = -L$(TOP)/$(LIB_DIR) -l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB) $(APP_LIB_DEPS
default: depend $(PROGS)
clean:
- rm -f $(PROGS)
- rm -f *.o
+ -rm -f $(PROGS)
+ -rm -f *.o
depend: $(SOURCES)
diff --git a/progs/slang/Makefile b/progs/slang/Makefile
index ea1e9b6afd..c93caeab61 100644
--- a/progs/slang/Makefile
+++ b/progs/slang/Makefile
@@ -24,7 +24,7 @@ tests: default
! ./cltest 2> /dev/null | (grep -e ^[*][*][*])
clean:
- rm -f cltest.o sotest.o vstest.o framework.o cltest sotest vstest
+ -rm -f cltest.o sotest.o vstest.o framework.o cltest sotest vstest
#
# executables
diff --git a/progs/tests/Makefile b/progs/tests/Makefile
index 116a19b1f5..cf8e0bfc1e 100644
--- a/progs/tests/Makefile
+++ b/progs/tests/Makefile
@@ -99,9 +99,9 @@ UTIL_FILES = readtex.h readtex.c
default: $(UTIL_FILES) $(PROGS)
clean:
- rm -f $(PROGS)
- rm -f *.o
- rm -f getproclist.h
+ -rm -f $(PROGS)
+ -rm -f *.o
+ -rm -f getproclist.h
##### RULES #####
diff --git a/progs/tests/fbotest2.c b/progs/tests/fbotest2.c
index 18f28972b6..5283c7e1fd 100644
--- a/progs/tests/fbotest2.c
+++ b/progs/tests/fbotest2.c
@@ -68,6 +68,7 @@ Display( void )
/* draw to window */
glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, 0);
+ glDisable(GL_DEPTH_TEST); /* in case window has depth buffer */
glWindowPos2iARB(0, 0);
glDrawPixels(Width, Height, GL_RGBA, GL_UNSIGNED_BYTE, buffer);
diff --git a/progs/tests/mipmap_limits.c b/progs/tests/mipmap_limits.c
index d6d6e467b0..8bdad826f7 100644
--- a/progs/tests/mipmap_limits.c
+++ b/progs/tests/mipmap_limits.c
@@ -59,6 +59,18 @@ static GLfloat LodBias = 0.0;
static GLboolean NearestFilter = GL_TRUE;
+static void
+InitValues(void)
+{
+ BaseLevel = 0;
+ MaxLevel = 8;
+ MinLod = -1;
+ MaxLod = 9;
+ LodBias = 0.0;
+ NearestFilter = GL_TRUE;
+}
+
+
static void MakeImage(int level, int width, int height, const GLubyte color[4])
{
const int makeStripes = 0;
@@ -108,6 +120,8 @@ static void makeImages(void)
static void myinit(void)
{
+ InitValues();
+
glEnable(GL_DEPTH_TEST);
glDepthFunc(GL_LESS);
glShadeModel(GL_FLAT);
@@ -125,7 +139,7 @@ static void myinit(void)
static void display(void)
{
GLfloat tcm = 4.0;
- printf("BASE_LEVEL = %d MAX_LEVEL = %d MIN_LOD = %f MAX_LOD = %f Bias = %.2g filter = %s\n",
+ printf("BASE_LEVEL=%d MAX_LEVEL=%d MIN_LOD=%.2g MAX_LOD=%.2g Bias=%.2g Filter=%s\n",
BaseLevel, MaxLevel, MinLod, MaxLod, LodBias,
NearestFilter ? "NEAREST" : "LINEAR");
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_BASE_LEVEL, BaseLevel);
@@ -214,6 +228,9 @@ key(unsigned char k, int x, int y)
case 'f':
NearestFilter = !NearestFilter;
break;
+ case ' ':
+ InitValues();
+ break;
case 27: /* Escape */
exit(0);
break;
@@ -227,12 +244,13 @@ key(unsigned char k, int x, int y)
static void usage(void)
{
printf("usage:\n");
- printf(" b/B decrease/increase GL_TEXTURE_BASE_LEVEL\n");
- printf(" m/M decrease/increase GL_TEXTURE_MAX_LEVEL\n");
- printf(" n/N decrease/increase GL_TEXTURE_MIN_LOD\n");
- printf(" x/X decrease/increase GL_TEXTURE_MAX_LOD\n");
- printf(" l/L decrease/increase GL_TEXTURE_LOD_BIAS\n");
- printf(" f toggle nearest/linear filtering\n");
+ printf(" b/B decrease/increase GL_TEXTURE_BASE_LEVEL\n");
+ printf(" m/M decrease/increase GL_TEXTURE_MAX_LEVEL\n");
+ printf(" n/N decrease/increase GL_TEXTURE_MIN_LOD\n");
+ printf(" x/X decrease/increase GL_TEXTURE_MAX_LOD\n");
+ printf(" l/L decrease/increase GL_TEXTURE_LOD_BIAS\n");
+ printf(" f toggle nearest/linear filtering\n");
+ printf(" SPACE reset values\n");
}
diff --git a/progs/trivial/Makefile b/progs/trivial/Makefile
index 7610a5df08..6fa51ce2cf 100644
--- a/progs/trivial/Makefile
+++ b/progs/trivial/Makefile
@@ -102,9 +102,9 @@ UTIL_FILES = readtex.h readtex.c
default: $(UTIL_FILES) $(PROGS)
clean:
- rm -f $(PROGS)
- rm -f *.o
- rm -f getproclist.h
+ -rm -f $(PROGS)
+ -rm -f *.o
+ -rm -f getproclist.h
# auto code generation
diff --git a/progs/trivial/tri.c b/progs/trivial/tri.c
index 58a650b559..d4a7f08ae3 100644
--- a/progs/trivial/tri.c
+++ b/progs/trivial/tri.c
@@ -33,6 +33,7 @@
GLenum doubleBuffer;
+int win;
static void Init(void)
{
@@ -59,7 +60,8 @@ static void Key(unsigned char key, int x, int y)
switch (key) {
case 27:
- exit(1);
+ glutDestroyWindow(win);
+ exit(0);
default:
return;
}
@@ -122,7 +124,8 @@ int main(int argc, char **argv)
type |= (doubleBuffer) ? GLUT_DOUBLE : GLUT_SINGLE;
glutInitDisplayMode(type);
- if (glutCreateWindow("First Tri") == GL_FALSE) {
+ win = glutCreateWindow("First Tri");
+ if (!win) {
exit(1);
}
diff --git a/progs/vp/Makefile b/progs/vp/Makefile
index 3349fd5342..28d63237a4 100644
--- a/progs/vp/Makefile
+++ b/progs/vp/Makefile
@@ -40,9 +40,9 @@ INCLUDES = -I. -I$(TOP)/include -I../samples
default: $(PROGS)
clean:
- rm -f $(PROGS)
- rm -f *.o
- rm -f getproclist.h
+ -rm -f $(PROGS)
+ -rm -f *.o
+ -rm -f getproclist.h
diff --git a/progs/xdemos/.gitignore b/progs/xdemos/.gitignore
index 23e7c3ea18..868249db88 100644
--- a/progs/xdemos/.gitignore
+++ b/progs/xdemos/.gitignore
@@ -16,6 +16,7 @@ offset
overlay
pbdemo
pbinfo
+sharedtex
texture_from_pixmap
wincopy
xdemo
diff --git a/progs/xdemos/glthreads.c b/progs/xdemos/glthreads.c
index e9c654c649..4f87ee75d4 100644
--- a/progs/xdemos/glthreads.c
+++ b/progs/xdemos/glthreads.c
@@ -24,6 +24,7 @@
* This program tests GLX thread safety.
* Command line options:
* -p Open a display connection for each thread
+ * -l Enable application-side locking
* -n <num threads> Number of threads to create (default is 2)
* -display <display name> Specify X display (default is :0.0)
*
@@ -405,6 +406,19 @@ clean_up(void)
}
+static void
+usage(void)
+{
+ printf("glthreads: test of GL thread safety (any key = exit)\n");
+ printf("Usage:\n");
+ printf(" glthreads [options]\n");
+ printf("Options:\n");
+ printf(" -display DISPLAYNAME Specify display string\n");
+ printf(" -n NUMTHREADS Number of threads to create\n");
+ printf(" -p Use a separate display connection for each thread\n");
+ printf(" -l Use application-side locking\n");
+}
+
int
main(int argc, char *argv[])
@@ -416,9 +430,7 @@ main(int argc, char *argv[])
Status threadStat;
if (argc == 1) {
- printf("glthreads: test of GL thread safety (any key = exit)\n");
- printf("Usage:\n");
- printf(" glthreads [-display dpyName] [-n numthreads]\n");
+ usage();
}
else {
int i;
@@ -442,13 +454,14 @@ main(int argc, char *argv[])
i++;
}
else {
- fprintf(stderr, "glthreads: unexpected flag: %s\n", argv[i]);
+ usage();
+ exit(1);
}
}
}
if (Locking)
- printf("glthreads: Using explict locks around Xlib calls.\n");
+ printf("glthreads: Using explicit locks around Xlib calls.\n");
else
printf("glthreads: No explict locking.\n");
diff --git a/src/Makefile b/src/Makefile
index f93987e688..229beeaffa 100644
--- a/src/Makefile
+++ b/src/Makefile
@@ -33,7 +33,7 @@ $(TOP)/$(LIB_DIR):
clean:
- @for dir in $(SUBDIRS) ; do \
+ -@for dir in $(SUBDIRS) ; do \
if [ -d $$dir ] ; then \
(cd $$dir && $(MAKE) clean) ; \
fi \
diff --git a/src/egl/Makefile b/src/egl/Makefile
index 931e9d0cb8..fb4db8f9b9 100644
--- a/src/egl/Makefile
+++ b/src/egl/Makefile
@@ -11,14 +11,14 @@ default: subdirs
subdirs:
@for dir in $(SUBDIRS) ; do \
if [ -d $$dir ] ; then \
- (cd $$dir ; $(MAKE)) || exit 1 ; \
+ (cd $$dir && $(MAKE)) || exit 1 ; \
fi \
done
clean:
- @for dir in $(SUBDIRS) ; do \
+ -@for dir in $(SUBDIRS) ; do \
if [ -d $$dir ] ; then \
- (cd $$dir ; $(MAKE) clean) ; \
+ (cd $$dir && $(MAKE) clean) ; \
fi \
done
diff --git a/src/egl/drivers/demo/Makefile b/src/egl/drivers/demo/Makefile
index ad2ef38a72..9653c8805c 100644
--- a/src/egl/drivers/demo/Makefile
+++ b/src/egl/drivers/demo/Makefile
@@ -27,5 +27,5 @@ $(TOP)/$(LIB_DIR)/demodriver.so: $(OBJECTS)
clean:
- rm -f *.o
- rm -f *.so
+ -rm -f *.o
+ -rm -f *.so
diff --git a/src/egl/drivers/dri/Makefile b/src/egl/drivers/dri/Makefile
index 0214cf65a2..52d46cac56 100644
--- a/src/egl/drivers/dri/Makefile
+++ b/src/egl/drivers/dri/Makefile
@@ -47,8 +47,8 @@ $(TOP)/$(LIB_DIR)/libEGLdri.so: $(OBJECTS)
clean:
- rm -f *.o
- rm -f *.so
+ -rm -f *.o
+ -rm -f *.so
depend: $(SOURCES) $(HEADERS)
@ echo "running $(MKDEP)"
diff --git a/src/egl/main/Makefile b/src/egl/main/Makefile
index 2a7046fb14..52e16a76e3 100644
--- a/src/egl/main/Makefile
+++ b/src/egl/main/Makefile
@@ -52,8 +52,8 @@ $(TOP)/$(LIB_DIR)/libEGL.so: $(OBJECTS)
clean:
- rm -f *.o *.so*
- rm -f core.*
+ -rm -f *.o *.so*
+ -rm -f core.*
depend: $(SOURCES) $(HEADERS)
diff --git a/src/glu/Makefile b/src/glu/Makefile
index 836baa684c..23161b5015 100644
--- a/src/glu/Makefile
+++ b/src/glu/Makefile
@@ -10,7 +10,7 @@ SUBDIRS = $(GLU_DIRS)
default: $(TOP)/configs/current
@for dir in $(SUBDIRS) ; do \
- (cd $$dir ; $(MAKE)) ; \
+ (cd $$dir && $(MAKE)) || exit 1 ; \
done
# GLU pkg-config file
@@ -28,6 +28,6 @@ install: glu.pc
$(INSTALL) -m 644 glu.pc $(DESTDIR)$(INSTALL_DIR)/$(LIB_DIR)/pkgconfig
clean:
- @for dir in $(SUBDIRS) ; do \
- (cd $$dir ; $(MAKE) clean) ; \
+ -@for dir in $(SUBDIRS) ; do \
+ (cd $$dir && $(MAKE) clean) ; \
done
diff --git a/src/glu/mesa/Makefile b/src/glu/mesa/Makefile
index fb377555be..1064bbd2d4 100644
--- a/src/glu/mesa/Makefile
+++ b/src/glu/mesa/Makefile
@@ -37,7 +37,7 @@ default:
echo "$(GLU_LIB_NAME) not build under BeOS, but integrated into ${GL_LIB_NAME}." ; \
exit 0 ; \
else \
- $(MAKE) $(TOP)/$(LIB_DIR)/$(GLU_LIB_NAME) ; \
+ $(MAKE) $(TOP)/$(LIB_DIR)/$(GLU_LIB_NAME) || exit 1 ; \
fi
$(TOP)/$(LIB_DIR):
diff --git a/src/glu/sgi/Makefile b/src/glu/sgi/Makefile
index bb1c0a8aba..207247ad87 100644
--- a/src/glu/sgi/Makefile
+++ b/src/glu/sgi/Makefile
@@ -128,7 +128,7 @@ default:
echo "$(GLU_LIB_NAME) not build under BeOS, but integrated into ${GL_LIB_NAME}." ; \
exit 0 ; \
else \
- $(MAKE) $(TOP)/$(LIB_DIR)/$(GLU_LIB_NAME) ; \
+ $(MAKE) $(TOP)/$(LIB_DIR)/$(GLU_LIB_NAME) || exit 1 ; \
fi
$(TOP)/$(LIB_DIR):
diff --git a/src/glut/directfb/Makefile b/src/glut/directfb/Makefile
index aa77db91c6..36b0ea34ed 100644
--- a/src/glut/directfb/Makefile
+++ b/src/glut/directfb/Makefile
@@ -80,7 +80,7 @@ tags:
# Remove .o and backup files
clean: depend
- -rm -f depend
+ -rm -f depend depend.bak
-rm -f *.o *~ *.o *~ *.so libglut.so.3.7
include depend
diff --git a/src/glut/fbdev/Makefile b/src/glut/fbdev/Makefile
index 948be0c7ba..95893b7dd1 100644
--- a/src/glut/fbdev/Makefile
+++ b/src/glut/fbdev/Makefile
@@ -87,7 +87,7 @@ tags:
# Remove .o and backup files
clean: depend
- -rm -f depend
+ -rm -f depend depend.bak
-rm -f *.o *~ *.o *~ *.so libglut.so.3.7
include depend
diff --git a/src/glut/glx/Makefile b/src/glut/glx/Makefile
index 46185cebbc..674d5a5dce 100644
--- a/src/glut/glx/Makefile
+++ b/src/glut/glx/Makefile
@@ -119,7 +119,7 @@ clean:
-rm -f *.lo
-rm -f *.la
-rm -rf .libs
- -rm -rf depend depend.bak
+ -rm -f depend depend.bak
depend: $(SOURCES)
diff --git a/src/glut/mini/Makefile b/src/glut/mini/Makefile
index a73198a68c..d386050390 100644
--- a/src/glut/mini/Makefile
+++ b/src/glut/mini/Makefile
@@ -91,7 +91,7 @@ install: glut.pc
# Remove .o and backup files
clean: depend
- -rm -f depend
+ -rm -f depend depend.bak
-rm -f *.o *~ *.o *~ *.so libglut.so.3.7
include depend
diff --git a/src/glw/Makefile b/src/glw/Makefile
index ce6a30e9de..88bf99d44f 100644
--- a/src/glw/Makefile
+++ b/src/glw/Makefile
@@ -42,7 +42,7 @@ install: glw.pc
$(INSTALL) -m 644 glw.pc $(DESTDIR)$(INSTALL_DIR)/$(LIB_DIR)/pkgconfig
clean:
- -rm depend depend.bak
+ -rm -f depend depend.bak
-rm -f *.o *~
diff --git a/src/glx/Makefile b/src/glx/Makefile
index bd486cf81b..e0ab4a0240 100644
--- a/src/glx/Makefile
+++ b/src/glx/Makefile
@@ -4,9 +4,9 @@ include $(TOP)/configs/current
default:
- cd mini ; $(MAKE)
+ cd mini && $(MAKE)
clean:
- cd mini ; $(MAKE) clean
+ -@cd mini && $(MAKE) clean
diff --git a/src/glx/mini/Makefile b/src/glx/mini/Makefile
index 7ed2146d56..69c3d683e8 100644
--- a/src/glx/mini/Makefile
+++ b/src/glx/mini/Makefile
@@ -83,6 +83,6 @@ install:
clean:
-rm -f drmtest $(TOP)/$(LIB_DIR)/libGL.so*
-rm -f *.o *~
- -rm -f depend
+ -rm -f depend depend.bak
include depend
diff --git a/src/glx/x11/Makefile b/src/glx/x11/Makefile
index f12d1f70dc..1d6bb2f1c9 100644
--- a/src/glx/x11/Makefile
+++ b/src/glx/x11/Makefile
@@ -91,6 +91,6 @@ install: $(TOP)/$(LIB_DIR)/$(GL_LIB_NAME)
clean:
-rm -f $(TOP)/$(LIB_DIR)/libGL.so*
-rm -f *.o *~
- -rm -f depend
+ -rm -f depend depend.bak
-include depend
diff --git a/src/glx/x11/dri_glx.c b/src/glx/x11/dri_glx.c
index a58060da3a..da4824f172 100644
--- a/src/glx/x11/dri_glx.c
+++ b/src/glx/x11/dri_glx.c
@@ -84,7 +84,7 @@ struct __GLXDRIconfigPrivateRec {
#ifndef DEFAULT_DRIVER_DIR
/* this is normally defined in Mesa/configs/default with DRI_DRIVER_SEARCH_PATH */
-#define DEFAULT_DRIVER_DIR "/usr/X11R6/lib/modules/dri"
+#define DEFAULT_DRIVER_DIR "/usr/local/lib/dri"
#endif
static void InfoMessageF(const char *f, ...)
diff --git a/src/glx/x11/indirect_dispatch.c b/src/glx/x11/indirect_dispatch.c
deleted file mode 100644
index 2afd3eb22f..0000000000
--- a/src/glx/x11/indirect_dispatch.c
+++ /dev/null
@@ -1,5889 +0,0 @@
-/* DO NOT EDIT - This file generated automatically by glX_proto_recv.py (from Mesa) script */
-
-/*
- * (C) Copyright IBM Corporation 2005
- * 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 <X11/Xmd.h>
-#include <GL/gl.h>
-#include <GL/glxproto.h>
-#include <inttypes.h>
-#include "indirect_size.h"
-#include "indirect_size_get.h"
-#include "indirect_dispatch.h"
-#include "glxserver.h"
-#include "glxbyteorder.h"
-#include "indirect_util.h"
-#include "singlesize.h"
-#include "glapitable.h"
-#include "glapi.h"
-#include "glthread.h"
-#include "dispatch.h"
-
-#define __GLX_PAD(x) (((x) + 3) & ~3)
-
-typedef struct {
- __GLX_PIXEL_3D_HDR;
-} __GLXpixel3DHeader;
-
-extern GLboolean __glXErrorOccured( void );
-extern void __glXClearErrorOccured( void );
-
-static const unsigned dummy_answer[2] = {0, 0};
-
-int __glXDisp_NewList(__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 ) {
- CALL_NewList( GET_DISPATCH(), (
- *(GLuint *)(pc + 0),
- *(GLenum *)(pc + 4)
- ) );
- error = Success;
- }
-
- return error;
-}
-
-int __glXDisp_EndList(__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 ) {
- CALL_EndList( GET_DISPATCH(), () );
- error = Success;
- }
-
- return error;
-}
-
-void __glXDisp_CallList(GLbyte * pc)
-{
- CALL_CallList( GET_DISPATCH(), (
- *(GLuint *)(pc + 0)
- ) );
-}
-
-void __glXDisp_CallLists(GLbyte * pc)
-{
- const GLsizei n = *(GLsizei *)(pc + 0);
- const GLenum type = *(GLenum *)(pc + 4);
- const GLvoid * lists = (const GLvoid *)(pc + 8);
-
- lists = (const GLvoid *) (pc + 8);
-
- CALL_CallLists( GET_DISPATCH(), (
- n,
- type,
- lists
- ) );
-}
-
-int __glXDisp_DeleteLists(__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 ) {
- CALL_DeleteLists( GET_DISPATCH(), (
- *(GLuint *)(pc + 0),
- *(GLsizei *)(pc + 4)
- ) );
- error = Success;
- }
-
- return error;
-}
-
-int __glXDisp_GenLists(__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 ) {
- GLuint retval;
- retval = CALL_GenLists( GET_DISPATCH(), (
- *(GLsizei *)(pc + 0)
- ) );
- __glXSendReply(cl->client, dummy_answer, 0, 0, GL_FALSE, retval);
- error = Success;
- }
-
- return error;
-}
-
-void __glXDisp_ListBase(GLbyte * pc)
-{
- CALL_ListBase( GET_DISPATCH(), (
- *(GLuint *)(pc + 0)
- ) );
-}
-
-void __glXDisp_Begin(GLbyte * pc)
-{
- CALL_Begin( GET_DISPATCH(), (
- *(GLenum *)(pc + 0)
- ) );
-}
-
-void __glXDisp_Bitmap(GLbyte * pc)
-{
- const GLubyte * const bitmap = (const GLubyte *) (pc + 44);
- __GLXpixelHeader * const hdr = (__GLXpixelHeader *)(pc);
-
- CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_LSB_FIRST, hdr->lsbFirst) );
- CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_ROW_LENGTH, (GLint) hdr->rowLength) );
- CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_ROWS, (GLint) hdr->skipRows) );
- CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_PIXELS, (GLint) hdr->skipPixels) );
- CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_ALIGNMENT, (GLint) hdr->alignment) );
-
- CALL_Bitmap( GET_DISPATCH(), (
- *(GLsizei *)(pc + 20),
- *(GLsizei *)(pc + 24),
- *(GLfloat *)(pc + 28),
- *(GLfloat *)(pc + 32),
- *(GLfloat *)(pc + 36),
- *(GLfloat *)(pc + 40),
- bitmap
- ) );
-}
-
-void __glXDisp_Color3bv(GLbyte * pc)
-{
- CALL_Color3bv( GET_DISPATCH(), (
- (const GLbyte *)(pc + 0)
- ) );
-}
-
-void __glXDisp_Color3dv(GLbyte * pc)
-{
-#ifdef __GLX_ALIGN64
- if ((unsigned long)(pc) & 7) {
- (void) memmove(pc-4, pc, 24);
- pc -= 4;
- }
-#endif
-
- CALL_Color3dv( GET_DISPATCH(), (
- (const GLdouble *)(pc + 0)
- ) );
-}
-
-void __glXDisp_Color3fv(GLbyte * pc)
-{
- CALL_Color3fv( GET_DISPATCH(), (
- (const GLfloat *)(pc + 0)
- ) );
-}
-
-void __glXDisp_Color3iv(GLbyte * pc)
-{
- CALL_Color3iv( GET_DISPATCH(), (
- (const GLint *)(pc + 0)
- ) );
-}
-
-void __glXDisp_Color3sv(GLbyte * pc)
-{
- CALL_Color3sv( GET_DISPATCH(), (
- (const GLshort *)(pc + 0)
- ) );
-}
-
-void __glXDisp_Color3ubv(GLbyte * pc)
-{
- CALL_Color3ubv( GET_DISPATCH(), (
- (const GLubyte *)(pc + 0)
- ) );
-}
-
-void __glXDisp_Color3uiv(GLbyte * pc)
-{
- CALL_Color3uiv( GET_DISPATCH(), (
- (const GLuint *)(pc + 0)
- ) );
-}
-
-void __glXDisp_Color3usv(GLbyte * pc)
-{
- CALL_Color3usv( GET_DISPATCH(), (
- (const GLushort *)(pc + 0)
- ) );
-}
-
-void __glXDisp_Color4bv(GLbyte * pc)
-{
- CALL_Color4bv( GET_DISPATCH(), (
- (const GLbyte *)(pc + 0)
- ) );
-}
-
-void __glXDisp_Color4dv(GLbyte * pc)
-{
-#ifdef __GLX_ALIGN64
- if ((unsigned long)(pc) & 7) {
- (void) memmove(pc-4, pc, 32);
- pc -= 4;
- }
-#endif
-
- CALL_Color4dv( GET_DISPATCH(), (
- (const GLdouble *)(pc + 0)
- ) );
-}
-
-void __glXDisp_Color4fv(GLbyte * pc)
-{
- CALL_Color4fv( GET_DISPATCH(), (
- (const GLfloat *)(pc + 0)
- ) );
-}
-
-void __glXDisp_Color4iv(GLbyte * pc)
-{
- CALL_Color4iv( GET_DISPATCH(), (
- (const GLint *)(pc + 0)
- ) );
-}
-
-void __glXDisp_Color4sv(GLbyte * pc)
-{
- CALL_Color4sv( GET_DISPATCH(), (
- (const GLshort *)(pc + 0)
- ) );
-}
-
-void __glXDisp_Color4ubv(GLbyte * pc)
-{
- CALL_Color4ubv( GET_DISPATCH(), (
- (const GLubyte *)(pc + 0)
- ) );
-}
-
-void __glXDisp_Color4uiv(GLbyte * pc)
-{
- CALL_Color4uiv( GET_DISPATCH(), (
- (const GLuint *)(pc + 0)
- ) );
-}
-
-void __glXDisp_Color4usv(GLbyte * pc)
-{
- CALL_Color4usv( GET_DISPATCH(), (
- (const GLushort *)(pc + 0)
- ) );
-}
-
-void __glXDisp_EdgeFlagv(GLbyte * pc)
-{
- CALL_EdgeFlagv( GET_DISPATCH(), (
- (const GLboolean *)(pc + 0)
- ) );
-}
-
-void __glXDisp_End(GLbyte * pc)
-{
- CALL_End( GET_DISPATCH(), () );
-}
-
-void __glXDisp_Indexdv(GLbyte * pc)
-{
-#ifdef __GLX_ALIGN64
- if ((unsigned long)(pc) & 7) {
- (void) memmove(pc-4, pc, 8);
- pc -= 4;
- }
-#endif
-
- CALL_Indexdv( GET_DISPATCH(), (
- (const GLdouble *)(pc + 0)
- ) );
-}
-
-void __glXDisp_Indexfv(GLbyte * pc)
-{
- CALL_Indexfv( GET_DISPATCH(), (
- (const GLfloat *)(pc + 0)
- ) );
-}
-
-void __glXDisp_Indexiv(GLbyte * pc)
-{
- CALL_Indexiv( GET_DISPATCH(), (
- (const GLint *)(pc + 0)
- ) );
-}
-
-void __glXDisp_Indexsv(GLbyte * pc)
-{
- CALL_Indexsv( GET_DISPATCH(), (
- (const GLshort *)(pc + 0)
- ) );
-}
-
-void __glXDisp_Normal3bv(GLbyte * pc)
-{
- CALL_Normal3bv( GET_DISPATCH(), (
- (const GLbyte *)(pc + 0)
- ) );
-}
-
-void __glXDisp_Normal3dv(GLbyte * pc)
-{
-#ifdef __GLX_ALIGN64
- if ((unsigned long)(pc) & 7) {
- (void) memmove(pc-4, pc, 24);
- pc -= 4;
- }
-#endif
-
- CALL_Normal3dv( GET_DISPATCH(), (
- (const GLdouble *)(pc + 0)
- ) );
-}
-
-void __glXDisp_Normal3fv(GLbyte * pc)
-{
- CALL_Normal3fv( GET_DISPATCH(), (
- (const GLfloat *)(pc + 0)
- ) );
-}
-
-void __glXDisp_Normal3iv(GLbyte * pc)
-{
- CALL_Normal3iv( GET_DISPATCH(), (
- (const GLint *)(pc + 0)
- ) );
-}
-
-void __glXDisp_Normal3sv(GLbyte * pc)
-{
- CALL_Normal3sv( GET_DISPATCH(), (
- (const GLshort *)(pc + 0)
- ) );
-}
-
-void __glXDisp_RasterPos2dv(GLbyte * pc)
-{
-#ifdef __GLX_ALIGN64
- if ((unsigned long)(pc) & 7) {
- (void) memmove(pc-4, pc, 16);
- pc -= 4;
- }
-#endif
-
- CALL_RasterPos2dv( GET_DISPATCH(), (
- (const GLdouble *)(pc + 0)
- ) );
-}
-
-void __glXDisp_RasterPos2fv(GLbyte * pc)
-{
- CALL_RasterPos2fv( GET_DISPATCH(), (
- (const GLfloat *)(pc + 0)
- ) );
-}
-
-void __glXDisp_RasterPos2iv(GLbyte * pc)
-{
- CALL_RasterPos2iv( GET_DISPATCH(), (
- (const GLint *)(pc + 0)
- ) );
-}
-
-void __glXDisp_RasterPos2sv(GLbyte * pc)
-{
- CALL_RasterPos2sv( GET_DISPATCH(), (
- (const GLshort *)(pc + 0)
- ) );
-}
-
-void __glXDisp_RasterPos3dv(GLbyte * pc)
-{
-#ifdef __GLX_ALIGN64
- if ((unsigned long)(pc) & 7) {
- (void) memmove(pc-4, pc, 24);
- pc -= 4;
- }
-#endif
-
- CALL_RasterPos3dv( GET_DISPATCH(), (
- (const GLdouble *)(pc + 0)
- ) );
-}
-
-void __glXDisp_RasterPos3fv(GLbyte * pc)
-{
- CALL_RasterPos3fv( GET_DISPATCH(), (
- (const GLfloat *)(pc + 0)
- ) );
-}
-
-void __glXDisp_RasterPos3iv(GLbyte * pc)
-{
- CALL_RasterPos3iv( GET_DISPATCH(), (
- (const GLint *)(pc + 0)
- ) );
-}
-
-void __glXDisp_RasterPos3sv(GLbyte * pc)
-{
- CALL_RasterPos3sv( GET_DISPATCH(), (
- (const GLshort *)(pc + 0)
- ) );
-}
-
-void __glXDisp_RasterPos4dv(GLbyte * pc)
-{
-#ifdef __GLX_ALIGN64
- if ((unsigned long)(pc) & 7) {
- (void) memmove(pc-4, pc, 32);
- pc -= 4;
- }
-#endif
-
- CALL_RasterPos4dv( GET_DISPATCH(), (
- (const GLdouble *)(pc + 0)
- ) );
-}
-
-void __glXDisp_RasterPos4fv(GLbyte * pc)
-{
- CALL_RasterPos4fv( GET_DISPATCH(), (
- (const GLfloat *)(pc + 0)
- ) );
-}
-
-void __glXDisp_RasterPos4iv(GLbyte * pc)
-{
- CALL_RasterPos4iv( GET_DISPATCH(), (
- (const GLint *)(pc + 0)
- ) );
-}
-
-void __glXDisp_RasterPos4sv(GLbyte * pc)
-{
- CALL_RasterPos4sv( GET_DISPATCH(), (
- (const GLshort *)(pc + 0)
- ) );
-}
-
-void __glXDisp_Rectdv(GLbyte * pc)
-{
-#ifdef __GLX_ALIGN64
- if ((unsigned long)(pc) & 7) {
- (void) memmove(pc-4, pc, 32);
- pc -= 4;
- }
-#endif
-
- CALL_Rectdv( GET_DISPATCH(), (
- (const GLdouble *)(pc + 0),
- (const GLdouble *)(pc + 16)
- ) );
-}
-
-void __glXDisp_Rectfv(GLbyte * pc)
-{
- CALL_Rectfv( GET_DISPATCH(), (
- (const GLfloat *)(pc + 0),
- (const GLfloat *)(pc + 8)
- ) );
-}
-
-void __glXDisp_Rectiv(GLbyte * pc)
-{
- CALL_Rectiv( GET_DISPATCH(), (
- (const GLint *)(pc + 0),
- (const GLint *)(pc + 8)
- ) );
-}
-
-void __glXDisp_Rectsv(GLbyte * pc)
-{
- CALL_Rectsv( GET_DISPATCH(), (
- (const GLshort *)(pc + 0),
- (const GLshort *)(pc + 4)
- ) );
-}
-
-void __glXDisp_TexCoord1dv(GLbyte * pc)
-{
-#ifdef __GLX_ALIGN64
- if ((unsigned long)(pc) & 7) {
- (void) memmove(pc-4, pc, 8);
- pc -= 4;
- }
-#endif
-
- CALL_TexCoord1dv( GET_DISPATCH(), (
- (const GLdouble *)(pc + 0)
- ) );
-}
-
-void __glXDisp_TexCoord1fv(GLbyte * pc)
-{
- CALL_TexCoord1fv( GET_DISPATCH(), (
- (const GLfloat *)(pc + 0)
- ) );
-}
-
-void __glXDisp_TexCoord1iv(GLbyte * pc)
-{
- CALL_TexCoord1iv( GET_DISPATCH(), (
- (const GLint *)(pc + 0)
- ) );
-}
-
-void __glXDisp_TexCoord1sv(GLbyte * pc)
-{
- CALL_TexCoord1sv( GET_DISPATCH(), (
- (const GLshort *)(pc + 0)
- ) );
-}
-
-void __glXDisp_TexCoord2dv(GLbyte * pc)
-{
-#ifdef __GLX_ALIGN64
- if ((unsigned long)(pc) & 7) {
- (void) memmove(pc-4, pc, 16);
- pc -= 4;
- }
-#endif
-
- CALL_TexCoord2dv( GET_DISPATCH(), (
- (const GLdouble *)(pc + 0)
- ) );
-}
-
-void __glXDisp_TexCoord2fv(GLbyte * pc)
-{
- CALL_TexCoord2fv( GET_DISPATCH(), (
- (const GLfloat *)(pc + 0)
- ) );
-}
-
-void __glXDisp_TexCoord2iv(GLbyte * pc)
-{
- CALL_TexCoord2iv( GET_DISPATCH(), (
- (const GLint *)(pc + 0)
- ) );
-}
-
-void __glXDisp_TexCoord2sv(GLbyte * pc)
-{
- CALL_TexCoord2sv( GET_DISPATCH(), (
- (const GLshort *)(pc + 0)
- ) );
-}
-
-void __glXDisp_TexCoord3dv(GLbyte * pc)
-{
-#ifdef __GLX_ALIGN64
- if ((unsigned long)(pc) & 7) {
- (void) memmove(pc-4, pc, 24);
- pc -= 4;
- }
-#endif
-
- CALL_TexCoord3dv( GET_DISPATCH(), (
- (const GLdouble *)(pc + 0)
- ) );
-}
-
-void __glXDisp_TexCoord3fv(GLbyte * pc)
-{
- CALL_TexCoord3fv( GET_DISPATCH(), (
- (const GLfloat *)(pc + 0)
- ) );
-}
-
-void __glXDisp_TexCoord3iv(GLbyte * pc)
-{
- CALL_TexCoord3iv( GET_DISPATCH(), (
- (const GLint *)(pc + 0)
- ) );
-}
-
-void __glXDisp_TexCoord3sv(GLbyte * pc)
-{
- CALL_TexCoord3sv( GET_DISPATCH(), (
- (const GLshort *)(pc + 0)
- ) );
-}
-
-void __glXDisp_TexCoord4dv(GLbyte * pc)
-{
-#ifdef __GLX_ALIGN64
- if ((unsigned long)(pc) & 7) {
- (void) memmove(pc-4, pc, 32);
- pc -= 4;
- }
-#endif
-
- CALL_TexCoord4dv( GET_DISPATCH(), (
- (const GLdouble *)(pc + 0)
- ) );
-}
-
-void __glXDisp_TexCoord4fv(GLbyte * pc)
-{
- CALL_TexCoord4fv( GET_DISPATCH(), (
- (const GLfloat *)(pc + 0)
- ) );
-}
-
-void __glXDisp_TexCoord4iv(GLbyte * pc)
-{
- CALL_TexCoord4iv( GET_DISPATCH(), (
- (const GLint *)(pc + 0)
- ) );
-}
-
-void __glXDisp_TexCoord4sv(GLbyte * pc)
-{
- CALL_TexCoord4sv( GET_DISPATCH(), (
- (const GLshort *)(pc + 0)
- ) );
-}
-
-void __glXDisp_Vertex2dv(GLbyte * pc)
-{
-#ifdef __GLX_ALIGN64
- if ((unsigned long)(pc) & 7) {
- (void) memmove(pc-4, pc, 16);
- pc -= 4;
- }
-#endif
-
- CALL_Vertex2dv( GET_DISPATCH(), (
- (const GLdouble *)(pc + 0)
- ) );
-}
-
-void __glXDisp_Vertex2fv(GLbyte * pc)
-{
- CALL_Vertex2fv( GET_DISPATCH(), (
- (const GLfloat *)(pc + 0)
- ) );
-}
-
-void __glXDisp_Vertex2iv(GLbyte * pc)
-{
- CALL_Vertex2iv( GET_DISPATCH(), (
- (const GLint *)(pc + 0)
- ) );
-}
-
-void __glXDisp_Vertex2sv(GLbyte * pc)
-{
- CALL_Vertex2sv( GET_DISPATCH(), (
- (const GLshort *)(pc + 0)
- ) );
-}
-
-void __glXDisp_Vertex3dv(GLbyte * pc)
-{
-#ifdef __GLX_ALIGN64
- if ((unsigned long)(pc) & 7) {
- (void) memmove(pc-4, pc, 24);
- pc -= 4;
- }
-#endif
-
- CALL_Vertex3dv( GET_DISPATCH(), (
- (const GLdouble *)(pc + 0)
- ) );
-}
-
-void __glXDisp_Vertex3fv(GLbyte * pc)
-{
- CALL_Vertex3fv( GET_DISPATCH(), (
- (const GLfloat *)(pc + 0)
- ) );
-}
-
-void __glXDisp_Vertex3iv(GLbyte * pc)
-{
- CALL_Vertex3iv( GET_DISPATCH(), (
- (const GLint *)(pc + 0)
- ) );
-}
-
-void __glXDisp_Vertex3sv(GLbyte * pc)
-{
- CALL_Vertex3sv( GET_DISPATCH(), (
- (const GLshort *)(pc + 0)
- ) );
-}
-
-void __glXDisp_Vertex4dv(GLbyte * pc)
-{
-#ifdef __GLX_ALIGN64
- if ((unsigned long)(pc) & 7) {
- (void) memmove(pc-4, pc, 32);
- pc -= 4;
- }
-#endif
-
- CALL_Vertex4dv( GET_DISPATCH(), (
- (const GLdouble *)(pc + 0)
- ) );
-}
-
-void __glXDisp_Vertex4fv(GLbyte * pc)
-{
- CALL_Vertex4fv( GET_DISPATCH(), (
- (const GLfloat *)(pc + 0)
- ) );
-}
-
-void __glXDisp_Vertex4iv(GLbyte * pc)
-{
- CALL_Vertex4iv( GET_DISPATCH(), (
- (const GLint *)(pc + 0)
- ) );
-}
-
-void __glXDisp_Vertex4sv(GLbyte * pc)
-{
- CALL_Vertex4sv( GET_DISPATCH(), (
- (const GLshort *)(pc + 0)
- ) );
-}
-
-void __glXDisp_ClipPlane(GLbyte * pc)
-{
-#ifdef __GLX_ALIGN64
- if ((unsigned long)(pc) & 7) {
- (void) memmove(pc-4, pc, 36);
- pc -= 4;
- }
-#endif
-
- CALL_ClipPlane( GET_DISPATCH(), (
- *(GLenum *)(pc + 32),
- (const GLdouble *)(pc + 0)
- ) );
-}
-
-void __glXDisp_ColorMaterial(GLbyte * pc)
-{
- CALL_ColorMaterial( GET_DISPATCH(), (
- *(GLenum *)(pc + 0),
- *(GLenum *)(pc + 4)
- ) );
-}
-
-void __glXDisp_CullFace(GLbyte * pc)
-{
- CALL_CullFace( GET_DISPATCH(), (
- *(GLenum *)(pc + 0)
- ) );
-}
-
-void __glXDisp_Fogf(GLbyte * pc)
-{
- CALL_Fogf( GET_DISPATCH(), (
- *(GLenum *)(pc + 0),
- *(GLfloat *)(pc + 4)
- ) );
-}
-
-void __glXDisp_Fogfv(GLbyte * pc)
-{
- const GLenum pname = *(GLenum *)(pc + 0);
- const GLfloat * params;
-
- params = (const GLfloat *) (pc + 4);
-
- CALL_Fogfv( GET_DISPATCH(), (
- pname,
- params
- ) );
-}
-
-void __glXDisp_Fogi(GLbyte * pc)
-{
- CALL_Fogi( GET_DISPATCH(), (
- *(GLenum *)(pc + 0),
- *(GLint *)(pc + 4)
- ) );
-}
-
-void __glXDisp_Fogiv(GLbyte * pc)
-{
- const GLenum pname = *(GLenum *)(pc + 0);
- const GLint * params;
-
- params = (const GLint *) (pc + 4);
-
- CALL_Fogiv( GET_DISPATCH(), (
- pname,
- params
- ) );
-}
-
-void __glXDisp_FrontFace(GLbyte * pc)
-{
- CALL_FrontFace( GET_DISPATCH(), (
- *(GLenum *)(pc + 0)
- ) );
-}
-
-void __glXDisp_Hint(GLbyte * pc)
-{
- CALL_Hint( GET_DISPATCH(), (
- *(GLenum *)(pc + 0),
- *(GLenum *)(pc + 4)
- ) );
-}
-
-void __glXDisp_Lightf(GLbyte * pc)
-{
- CALL_Lightf( GET_DISPATCH(), (
- *(GLenum *)(pc + 0),
- *(GLenum *)(pc + 4),
- *(GLfloat *)(pc + 8)
- ) );
-}
-
-void __glXDisp_Lightfv(GLbyte * pc)
-{
- const GLenum pname = *(GLenum *)(pc + 4);
- const GLfloat * params;
-
- params = (const GLfloat *) (pc + 8);
-
- CALL_Lightfv( GET_DISPATCH(), (
- *(GLenum *)(pc + 0),
- pname,
- params
- ) );
-}
-
-void __glXDisp_Lighti(GLbyte * pc)
-{
- CALL_Lighti( GET_DISPATCH(), (
- *(GLenum *)(pc + 0),
- *(GLenum *)(pc + 4),
- *(GLint *)(pc + 8)
- ) );
-}
-
-void __glXDisp_Lightiv(GLbyte * pc)
-{
- const GLenum pname = *(GLenum *)(pc + 4);
- const GLint * params;
-
- params = (const GLint *) (pc + 8);
-
- CALL_Lightiv( GET_DISPATCH(), (
- *(GLenum *)(pc + 0),
- pname,
- params
- ) );
-}
-
-void __glXDisp_LightModelf(GLbyte * pc)
-{
- CALL_LightModelf( GET_DISPATCH(), (
- *(GLenum *)(pc + 0),
- *(GLfloat *)(pc + 4)
- ) );
-}
-
-void __glXDisp_LightModelfv(GLbyte * pc)
-{
- const GLenum pname = *(GLenum *)(pc + 0);
- const GLfloat * params;
-
- params = (const GLfloat *) (pc + 4);
-
- CALL_LightModelfv( GET_DISPATCH(), (
- pname,
- params
- ) );
-}
-
-void __glXDisp_LightModeli(GLbyte * pc)
-{
- CALL_LightModeli( GET_DISPATCH(), (
- *(GLenum *)(pc + 0),
- *(GLint *)(pc + 4)
- ) );
-}
-
-void __glXDisp_LightModeliv(GLbyte * pc)
-{
- const GLenum pname = *(GLenum *)(pc + 0);
- const GLint * params;
-
- params = (const GLint *) (pc + 4);
-
- CALL_LightModeliv( GET_DISPATCH(), (
- pname,
- params
- ) );
-}
-
-void __glXDisp_LineStipple(GLbyte * pc)
-{
- CALL_LineStipple( GET_DISPATCH(), (
- *(GLint *)(pc + 0),
- *(GLushort *)(pc + 4)
- ) );
-}
-
-void __glXDisp_LineWidth(GLbyte * pc)
-{
- CALL_LineWidth( GET_DISPATCH(), (
- *(GLfloat *)(pc + 0)
- ) );
-}
-
-void __glXDisp_Materialf(GLbyte * pc)
-{
- CALL_Materialf( GET_DISPATCH(), (
- *(GLenum *)(pc + 0),
- *(GLenum *)(pc + 4),
- *(GLfloat *)(pc + 8)
- ) );
-}
-
-void __glXDisp_Materialfv(GLbyte * pc)
-{
- const GLenum pname = *(GLenum *)(pc + 4);
- const GLfloat * params;
-
- params = (const GLfloat *) (pc + 8);
-
- CALL_Materialfv( GET_DISPATCH(), (
- *(GLenum *)(pc + 0),
- pname,
- params
- ) );
-}
-
-void __glXDisp_Materiali(GLbyte * pc)
-{
- CALL_Materiali( GET_DISPATCH(), (
- *(GLenum *)(pc + 0),
- *(GLenum *)(pc + 4),
- *(GLint *)(pc + 8)
- ) );
-}
-
-void __glXDisp_Materialiv(GLbyte * pc)
-{
- const GLenum pname = *(GLenum *)(pc + 4);
- const GLint * params;
-
- params = (const GLint *) (pc + 8);
-
- CALL_Materialiv( GET_DISPATCH(), (
- *(GLenum *)(pc + 0),
- pname,
- params
- ) );
-}
-
-void __glXDisp_PointSize(GLbyte * pc)
-{
- CALL_PointSize( GET_DISPATCH(), (
- *(GLfloat *)(pc + 0)
- ) );
-}
-
-void __glXDisp_PolygonMode(GLbyte * pc)
-{
- CALL_PolygonMode( GET_DISPATCH(), (
- *(GLenum *)(pc + 0),
- *(GLenum *)(pc + 4)
- ) );
-}
-
-void __glXDisp_PolygonStipple(GLbyte * pc)
-{
- const GLubyte * const mask = (const GLubyte *) (pc + 20);
- __GLXpixelHeader * const hdr = (__GLXpixelHeader *)(pc);
-
- CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_LSB_FIRST, hdr->lsbFirst) );
- CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_ROW_LENGTH, (GLint) hdr->rowLength) );
- CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_ROWS, (GLint) hdr->skipRows) );
- CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_PIXELS, (GLint) hdr->skipPixels) );
- CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_ALIGNMENT, (GLint) hdr->alignment) );
-
- CALL_PolygonStipple( GET_DISPATCH(), (
- mask
- ) );
-}
-
-void __glXDisp_Scissor(GLbyte * pc)
-{
- CALL_Scissor( GET_DISPATCH(), (
- *(GLint *)(pc + 0),
- *(GLint *)(pc + 4),
- *(GLsizei *)(pc + 8),
- *(GLsizei *)(pc + 12)
- ) );
-}
-
-void __glXDisp_ShadeModel(GLbyte * pc)
-{
- CALL_ShadeModel( GET_DISPATCH(), (
- *(GLenum *)(pc + 0)
- ) );
-}
-
-void __glXDisp_TexParameterf(GLbyte * pc)
-{
- CALL_TexParameterf( GET_DISPATCH(), (
- *(GLenum *)(pc + 0),
- *(GLenum *)(pc + 4),
- *(GLfloat *)(pc + 8)
- ) );
-}
-
-void __glXDisp_TexParameterfv(GLbyte * pc)
-{
- const GLenum pname = *(GLenum *)(pc + 4);
- const GLfloat * params;
-
- params = (const GLfloat *) (pc + 8);
-
- CALL_TexParameterfv( GET_DISPATCH(), (
- *(GLenum *)(pc + 0),
- pname,
- params
- ) );
-}
-
-void __glXDisp_TexParameteri(GLbyte * pc)
-{
- CALL_TexParameteri( GET_DISPATCH(), (
- *(GLenum *)(pc + 0),
- *(GLenum *)(pc + 4),
- *(GLint *)(pc + 8)
- ) );
-}
-
-void __glXDisp_TexParameteriv(GLbyte * pc)
-{
- const GLenum pname = *(GLenum *)(pc + 4);
- const GLint * params;
-
- params = (const GLint *) (pc + 8);
-
- CALL_TexParameteriv( GET_DISPATCH(), (
- *(GLenum *)(pc + 0),
- pname,
- params
- ) );
-}
-
-void __glXDisp_TexImage1D(GLbyte * pc)
-{
- const GLvoid * const pixels = (const GLvoid *) (pc + 52);
- __GLXpixelHeader * const hdr = (__GLXpixelHeader *)(pc);
-
- CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SWAP_BYTES, hdr->swapBytes) );
- CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_LSB_FIRST, hdr->lsbFirst) );
- CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_ROW_LENGTH, (GLint) hdr->rowLength) );
- CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_ROWS, (GLint) hdr->skipRows) );
- CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_PIXELS, (GLint) hdr->skipPixels) );
- CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_ALIGNMENT, (GLint) hdr->alignment) );
-
- CALL_TexImage1D( GET_DISPATCH(), (
- *(GLenum *)(pc + 20),
- *(GLint *)(pc + 24),
- *(GLint *)(pc + 28),
- *(GLsizei *)(pc + 32),
- *(GLint *)(pc + 40),
- *(GLenum *)(pc + 44),
- *(GLenum *)(pc + 48),
- pixels
- ) );
-}
-
-void __glXDisp_TexImage2D(GLbyte * pc)
-{
- const GLvoid * const pixels = (const GLvoid *) (pc + 52);
- __GLXpixelHeader * const hdr = (__GLXpixelHeader *)(pc);
-
- CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SWAP_BYTES, hdr->swapBytes) );
- CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_LSB_FIRST, hdr->lsbFirst) );
- CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_ROW_LENGTH, (GLint) hdr->rowLength) );
- CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_ROWS, (GLint) hdr->skipRows) );
- CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_PIXELS, (GLint) hdr->skipPixels) );
- CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_ALIGNMENT, (GLint) hdr->alignment) );
-
- CALL_TexImage2D( GET_DISPATCH(), (
- *(GLenum *)(pc + 20),
- *(GLint *)(pc + 24),
- *(GLint *)(pc + 28),
- *(GLsizei *)(pc + 32),
- *(GLsizei *)(pc + 36),
- *(GLint *)(pc + 40),
- *(GLenum *)(pc + 44),
- *(GLenum *)(pc + 48),
- pixels
- ) );
-}
-
-void __glXDisp_TexEnvf(GLbyte * pc)
-{
- CALL_TexEnvf( GET_DISPATCH(), (
- *(GLenum *)(pc + 0),
- *(GLenum *)(pc + 4),
- *(GLfloat *)(pc + 8)
- ) );
-}
-
-void __glXDisp_TexEnvfv(GLbyte * pc)
-{
- const GLenum pname = *(GLenum *)(pc + 4);
- const GLfloat * params;
-
- params = (const GLfloat *) (pc + 8);
-
- CALL_TexEnvfv( GET_DISPATCH(), (
- *(GLenum *)(pc + 0),
- pname,
- params
- ) );
-}
-
-void __glXDisp_TexEnvi(GLbyte * pc)
-{
- CALL_TexEnvi( GET_DISPATCH(), (
- *(GLenum *)(pc + 0),
- *(GLenum *)(pc + 4),
- *(GLint *)(pc + 8)
- ) );
-}
-
-void __glXDisp_TexEnviv(GLbyte * pc)
-{
- const GLenum pname = *(GLenum *)(pc + 4);
- const GLint * params;
-
- params = (const GLint *) (pc + 8);
-
- CALL_TexEnviv( GET_DISPATCH(), (
- *(GLenum *)(pc + 0),
- pname,
- params
- ) );
-}
-
-void __glXDisp_TexGend(GLbyte * pc)
-{
-#ifdef __GLX_ALIGN64
- if ((unsigned long)(pc) & 7) {
- (void) memmove(pc-4, pc, 16);
- pc -= 4;
- }
-#endif
-
- CALL_TexGend( GET_DISPATCH(), (
- *(GLenum *)(pc + 8),
- *(GLenum *)(pc + 12),
- *(GLdouble *)(pc + 0)
- ) );
-}
-
-void __glXDisp_TexGendv(GLbyte * pc)
-{
- const GLenum pname = *(GLenum *)(pc + 4);
- const GLdouble * params;
-
-#ifdef __GLX_ALIGN64
- const GLuint compsize = __glTexGendv_size(pname);
- const GLuint cmdlen = 12 + __GLX_PAD((compsize * 8)) - 4;
- if ((unsigned long)(pc) & 7) {
- (void) memmove(pc-4, pc, cmdlen);
- pc -= 4;
- }
-#endif
-
- params = (const GLdouble *) (pc + 8);
-
- CALL_TexGendv( GET_DISPATCH(), (
- *(GLenum *)(pc + 0),
- pname,
- params
- ) );
-}
-
-void __glXDisp_TexGenf(GLbyte * pc)
-{
- CALL_TexGenf( GET_DISPATCH(), (
- *(GLenum *)(pc + 0),
- *(GLenum *)(pc + 4),
- *(GLfloat *)(pc + 8)
- ) );
-}
-
-void __glXDisp_TexGenfv(GLbyte * pc)
-{
- const GLenum pname = *(GLenum *)(pc + 4);
- const GLfloat * params;
-
- params = (const GLfloat *) (pc + 8);
-
- CALL_TexGenfv( GET_DISPATCH(), (
- *(GLenum *)(pc + 0),
- pname,
- params
- ) );
-}
-
-void __glXDisp_TexGeni(GLbyte * pc)
-{
- CALL_TexGeni( GET_DISPATCH(), (
- *(GLenum *)(pc + 0),
- *(GLenum *)(pc + 4),
- *(GLint *)(pc + 8)
- ) );
-}
-
-void __glXDisp_TexGeniv(GLbyte * pc)
-{
- const GLenum pname = *(GLenum *)(pc + 4);
- const GLint * params;
-
- params = (const GLint *) (pc + 8);
-
- CALL_TexGeniv( GET_DISPATCH(), (
- *(GLenum *)(pc + 0),
- pname,
- params
- ) );
-}
-
-void __glXDisp_InitNames(GLbyte * pc)
-{
- CALL_InitNames( GET_DISPATCH(), () );
-}
-
-void __glXDisp_LoadName(GLbyte * pc)
-{
- CALL_LoadName( GET_DISPATCH(), (
- *(GLuint *)(pc + 0)
- ) );
-}
-
-void __glXDisp_PassThrough(GLbyte * pc)
-{
- CALL_PassThrough( GET_DISPATCH(), (
- *(GLfloat *)(pc + 0)
- ) );
-}
-
-void __glXDisp_PopName(GLbyte * pc)
-{
- CALL_PopName( GET_DISPATCH(), () );
-}
-
-void __glXDisp_PushName(GLbyte * pc)
-{
- CALL_PushName( GET_DISPATCH(), (
- *(GLuint *)(pc + 0)
- ) );
-}
-
-void __glXDisp_DrawBuffer(GLbyte * pc)
-{
- CALL_DrawBuffer( GET_DISPATCH(), (
- *(GLenum *)(pc + 0)
- ) );
-}
-
-void __glXDisp_Clear(GLbyte * pc)
-{
- CALL_Clear( GET_DISPATCH(), (
- *(GLbitfield *)(pc + 0)
- ) );
-}
-
-void __glXDisp_ClearAccum(GLbyte * pc)
-{
- CALL_ClearAccum( GET_DISPATCH(), (
- *(GLfloat *)(pc + 0),
- *(GLfloat *)(pc + 4),
- *(GLfloat *)(pc + 8),
- *(GLfloat *)(pc + 12)
- ) );
-}
-
-void __glXDisp_ClearIndex(GLbyte * pc)
-{
- CALL_ClearIndex( GET_DISPATCH(), (
- *(GLfloat *)(pc + 0)
- ) );
-}
-
-void __glXDisp_ClearColor(GLbyte * pc)
-{
- CALL_ClearColor( GET_DISPATCH(), (
- *(GLclampf *)(pc + 0),
- *(GLclampf *)(pc + 4),
- *(GLclampf *)(pc + 8),
- *(GLclampf *)(pc + 12)
- ) );
-}
-
-void __glXDisp_ClearStencil(GLbyte * pc)
-{
- CALL_ClearStencil( GET_DISPATCH(), (
- *(GLint *)(pc + 0)
- ) );
-}
-
-void __glXDisp_ClearDepth(GLbyte * pc)
-{
-#ifdef __GLX_ALIGN64
- if ((unsigned long)(pc) & 7) {
- (void) memmove(pc-4, pc, 8);
- pc -= 4;
- }
-#endif
-
- CALL_ClearDepth( GET_DISPATCH(), (
- *(GLclampd *)(pc + 0)
- ) );
-}
-
-void __glXDisp_StencilMask(GLbyte * pc)
-{
- CALL_StencilMask( GET_DISPATCH(), (
- *(GLuint *)(pc + 0)
- ) );
-}
-
-void __glXDisp_ColorMask(GLbyte * pc)
-{
- CALL_ColorMask( GET_DISPATCH(), (
- *(GLboolean *)(pc + 0),
- *(GLboolean *)(pc + 1),
- *(GLboolean *)(pc + 2),
- *(GLboolean *)(pc + 3)
- ) );
-}
-
-void __glXDisp_DepthMask(GLbyte * pc)
-{
- CALL_DepthMask( GET_DISPATCH(), (
- *(GLboolean *)(pc + 0)
- ) );
-}
-
-void __glXDisp_IndexMask(GLbyte * pc)
-{
- CALL_IndexMask( GET_DISPATCH(), (
- *(GLuint *)(pc + 0)
- ) );
-}
-
-void __glXDisp_Accum(GLbyte * pc)
-{
- CALL_Accum( GET_DISPATCH(), (
- *(GLenum *)(pc + 0),
- *(GLfloat *)(pc + 4)
- ) );
-}
-
-void __glXDisp_Disable(GLbyte * pc)
-{
- CALL_Disable( GET_DISPATCH(), (
- *(GLenum *)(pc + 0)
- ) );
-}
-
-void __glXDisp_Enable(GLbyte * pc)
-{
- CALL_Enable( GET_DISPATCH(), (
- *(GLenum *)(pc + 0)
- ) );
-}
-
-void __glXDisp_PopAttrib(GLbyte * pc)
-{
- CALL_PopAttrib( GET_DISPATCH(), () );
-}
-
-void __glXDisp_PushAttrib(GLbyte * pc)
-{
- CALL_PushAttrib( GET_DISPATCH(), (
- *(GLbitfield *)(pc + 0)
- ) );
-}
-
-void __glXDisp_MapGrid1d(GLbyte * pc)
-{
-#ifdef __GLX_ALIGN64
- if ((unsigned long)(pc) & 7) {
- (void) memmove(pc-4, pc, 20);
- pc -= 4;
- }
-#endif
-
- CALL_MapGrid1d( GET_DISPATCH(), (
- *(GLint *)(pc + 16),
- *(GLdouble *)(pc + 0),
- *(GLdouble *)(pc + 8)
- ) );
-}
-
-void __glXDisp_MapGrid1f(GLbyte * pc)
-{
- CALL_MapGrid1f( GET_DISPATCH(), (
- *(GLint *)(pc + 0),
- *(GLfloat *)(pc + 4),
- *(GLfloat *)(pc + 8)
- ) );
-}
-
-void __glXDisp_MapGrid2d(GLbyte * pc)
-{
-#ifdef __GLX_ALIGN64
- if ((unsigned long)(pc) & 7) {
- (void) memmove(pc-4, pc, 40);
- pc -= 4;
- }
-#endif
-
- CALL_MapGrid2d( GET_DISPATCH(), (
- *(GLint *)(pc + 32),
- *(GLdouble *)(pc + 0),
- *(GLdouble *)(pc + 8),
- *(GLint *)(pc + 36),
- *(GLdouble *)(pc + 16),
- *(GLdouble *)(pc + 24)
- ) );
-}
-
-void __glXDisp_MapGrid2f(GLbyte * pc)
-{
- CALL_MapGrid2f( GET_DISPATCH(), (
- *(GLint *)(pc + 0),
- *(GLfloat *)(pc + 4),
- *(GLfloat *)(pc + 8),
- *(GLint *)(pc + 12),
- *(GLfloat *)(pc + 16),
- *(GLfloat *)(pc + 20)
- ) );
-}
-
-void __glXDisp_EvalCoord1dv(GLbyte * pc)
-{
-#ifdef __GLX_ALIGN64
- if ((unsigned long)(pc) & 7) {
- (void) memmove(pc-4, pc, 8);
- pc -= 4;
- }
-#endif
-
- CALL_EvalCoord1dv( GET_DISPATCH(), (
- (const GLdouble *)(pc + 0)
- ) );
-}
-
-void __glXDisp_EvalCoord1fv(GLbyte * pc)
-{
- CALL_EvalCoord1fv( GET_DISPATCH(), (
- (const GLfloat *)(pc + 0)
- ) );
-}
-
-void __glXDisp_EvalCoord2dv(GLbyte * pc)
-{
-#ifdef __GLX_ALIGN64
- if ((unsigned long)(pc) & 7) {
- (void) memmove(pc-4, pc, 16);
- pc -= 4;
- }
-#endif
-
- CALL_EvalCoord2dv( GET_DISPATCH(), (
- (const GLdouble *)(pc + 0)
- ) );
-}
-
-void __glXDisp_EvalCoord2fv(GLbyte * pc)
-{
- CALL_EvalCoord2fv( GET_DISPATCH(), (
- (const GLfloat *)(pc + 0)
- ) );
-}
-
-void __glXDisp_EvalMesh1(GLbyte * pc)
-{
- CALL_EvalMesh1( GET_DISPATCH(), (
- *(GLenum *)(pc + 0),
- *(GLint *)(pc + 4),
- *(GLint *)(pc + 8)
- ) );
-}
-
-void __glXDisp_EvalPoint1(GLbyte * pc)
-{
- CALL_EvalPoint1( GET_DISPATCH(), (
- *(GLint *)(pc + 0)
- ) );
-}
-
-void __glXDisp_EvalMesh2(GLbyte * pc)
-{
- CALL_EvalMesh2( GET_DISPATCH(), (
- *(GLenum *)(pc + 0),
- *(GLint *)(pc + 4),
- *(GLint *)(pc + 8),
- *(GLint *)(pc + 12),
- *(GLint *)(pc + 16)
- ) );
-}
-
-void __glXDisp_EvalPoint2(GLbyte * pc)
-{
- CALL_EvalPoint2( GET_DISPATCH(), (
- *(GLint *)(pc + 0),
- *(GLint *)(pc + 4)
- ) );
-}
-
-void __glXDisp_AlphaFunc(GLbyte * pc)
-{
- CALL_AlphaFunc( GET_DISPATCH(), (
- *(GLenum *)(pc + 0),
- *(GLclampf *)(pc + 4)
- ) );
-}
-
-void __glXDisp_BlendFunc(GLbyte * pc)
-{
- CALL_BlendFunc( GET_DISPATCH(), (
- *(GLenum *)(pc + 0),
- *(GLenum *)(pc + 4)
- ) );
-}
-
-void __glXDisp_LogicOp(GLbyte * pc)
-{
- CALL_LogicOp( GET_DISPATCH(), (
- *(GLenum *)(pc + 0)
- ) );
-}
-
-void __glXDisp_StencilFunc(GLbyte * pc)
-{
- CALL_StencilFunc( GET_DISPATCH(), (
- *(GLenum *)(pc + 0),
- *(GLint *)(pc + 4),
- *(GLuint *)(pc + 8)
- ) );
-}
-
-void __glXDisp_StencilOp(GLbyte * pc)
-{
- CALL_StencilOp( GET_DISPATCH(), (
- *(GLenum *)(pc + 0),
- *(GLenum *)(pc + 4),
- *(GLenum *)(pc + 8)
- ) );
-}
-
-void __glXDisp_DepthFunc(GLbyte * pc)
-{
- CALL_DepthFunc( GET_DISPATCH(), (
- *(GLenum *)(pc + 0)
- ) );
-}
-
-void __glXDisp_PixelZoom(GLbyte * pc)
-{
- CALL_PixelZoom( GET_DISPATCH(), (
- *(GLfloat *)(pc + 0),
- *(GLfloat *)(pc + 4)
- ) );
-}
-
-void __glXDisp_PixelTransferf(GLbyte * pc)
-{
- CALL_PixelTransferf( GET_DISPATCH(), (
- *(GLenum *)(pc + 0),
- *(GLfloat *)(pc + 4)
- ) );
-}
-
-void __glXDisp_PixelTransferi(GLbyte * pc)
-{
- CALL_PixelTransferi( GET_DISPATCH(), (
- *(GLenum *)(pc + 0),
- *(GLint *)(pc + 4)
- ) );
-}
-
-int __glXDisp_PixelStoref(__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 ) {
- CALL_PixelStoref( GET_DISPATCH(), (
- *(GLenum *)(pc + 0),
- *(GLfloat *)(pc + 4)
- ) );
- error = Success;
- }
-
- return error;
-}
-
-int __glXDisp_PixelStorei(__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 ) {
- CALL_PixelStorei( GET_DISPATCH(), (
- *(GLenum *)(pc + 0),
- *(GLint *)(pc + 4)
- ) );
- error = Success;
- }
-
- return error;
-}
-
-void __glXDisp_PixelMapfv(GLbyte * pc)
-{
- const GLsizei mapsize = *(GLsizei *)(pc + 4);
-
- CALL_PixelMapfv( GET_DISPATCH(), (
- *(GLenum *)(pc + 0),
- mapsize,
- (const GLfloat *)(pc + 8)
- ) );
-}
-
-void __glXDisp_PixelMapuiv(GLbyte * pc)
-{
- const GLsizei mapsize = *(GLsizei *)(pc + 4);
-
- CALL_PixelMapuiv( GET_DISPATCH(), (
- *(GLenum *)(pc + 0),
- mapsize,
- (const GLuint *)(pc + 8)
- ) );
-}
-
-void __glXDisp_PixelMapusv(GLbyte * pc)
-{
- const GLsizei mapsize = *(GLsizei *)(pc + 4);
-
- CALL_PixelMapusv( GET_DISPATCH(), (
- *(GLenum *)(pc + 0),
- mapsize,
- (const GLushort *)(pc + 8)
- ) );
-}
-
-void __glXDisp_ReadBuffer(GLbyte * pc)
-{
- CALL_ReadBuffer( GET_DISPATCH(), (
- *(GLenum *)(pc + 0)
- ) );
-}
-
-void __glXDisp_CopyPixels(GLbyte * pc)
-{
- CALL_CopyPixels( GET_DISPATCH(), (
- *(GLint *)(pc + 0),
- *(GLint *)(pc + 4),
- *(GLsizei *)(pc + 8),
- *(GLsizei *)(pc + 12),
- *(GLenum *)(pc + 16)
- ) );
-}
-
-void __glXDisp_DrawPixels(GLbyte * pc)
-{
- const GLvoid * const pixels = (const GLvoid *) (pc + 36);
- __GLXpixelHeader * const hdr = (__GLXpixelHeader *)(pc);
-
- CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SWAP_BYTES, hdr->swapBytes) );
- CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_LSB_FIRST, hdr->lsbFirst) );
- CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_ROW_LENGTH, (GLint) hdr->rowLength) );
- CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_ROWS, (GLint) hdr->skipRows) );
- CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_PIXELS, (GLint) hdr->skipPixels) );
- CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_ALIGNMENT, (GLint) hdr->alignment) );
-
- CALL_DrawPixels( GET_DISPATCH(), (
- *(GLsizei *)(pc + 20),
- *(GLsizei *)(pc + 24),
- *(GLenum *)(pc + 28),
- *(GLenum *)(pc + 32),
- pixels
- ) );
-}
-
-int __glXDisp_GetBooleanv(__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 + 0);
-
- const GLuint compsize = __glGetBooleanv_size(pname);
- GLboolean answerBuffer[200];
- GLboolean * params = __glXGetAnswerBuffer(cl, compsize, answerBuffer, sizeof(answerBuffer), 1);
-
- if (params == NULL) return BadAlloc;
- __glXClearErrorOccured();
-
- CALL_GetBooleanv( GET_DISPATCH(), (
- pname,
- params
- ) );
- __glXSendReply(cl->client, params, compsize, 1, GL_FALSE, 0);
- error = Success;
- }
-
- return error;
-}
-
-int __glXDisp_GetClipPlane(__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 ) {
- GLdouble equation[4];
- CALL_GetClipPlane( GET_DISPATCH(), (
- *(GLenum *)(pc + 0),
- equation
- ) );
- __glXSendReply(cl->client, equation, 4, 8, GL_TRUE, 0);
- error = Success;
- }
-
- return error;
-}
-
-int __glXDisp_GetDoublev(__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 + 0);
-
- const GLuint compsize = __glGetDoublev_size(pname);
- GLdouble answerBuffer[200];
- GLdouble * params = __glXGetAnswerBuffer(cl, compsize * 8, answerBuffer, sizeof(answerBuffer), 8);
-
- if (params == NULL) return BadAlloc;
- __glXClearErrorOccured();
-
- CALL_GetDoublev( GET_DISPATCH(), (
- pname,
- params
- ) );
- __glXSendReply(cl->client, params, compsize, 8, GL_FALSE, 0);
- error = Success;
- }
-
- return error;
-}
-
-int __glXDisp_GetError(__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 ) {
- GLenum retval;
- retval = CALL_GetError( GET_DISPATCH(), () );
- __glXSendReply(cl->client, dummy_answer, 0, 0, GL_FALSE, retval);
- error = Success;
- }
-
- return error;
-}
-
-int __glXDisp_GetFloatv(__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 + 0);
-
- const GLuint compsize = __glGetFloatv_size(pname);
- GLfloat answerBuffer[200];
- GLfloat * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4);
-
- if (params == NULL) return BadAlloc;
- __glXClearErrorOccured();
-
- CALL_GetFloatv( GET_DISPATCH(), (
- pname,
- params
- ) );
- __glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0);
- error = Success;
- }
-
- return error;
-}
-
-int __glXDisp_GetIntegerv(__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 + 0);
-
- const GLuint compsize = __glGetIntegerv_size(pname);
- GLint answerBuffer[200];
- GLint * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4);
-
- if (params == NULL) return BadAlloc;
- __glXClearErrorOccured();
-
- CALL_GetIntegerv( GET_DISPATCH(), (
- pname,
- params
- ) );
- __glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0);
- error = Success;
- }
-
- return error;
-}
-
-int __glXDisp_GetLightfv(__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 = __glGetLightfv_size(pname);
- GLfloat answerBuffer[200];
- GLfloat * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4);
-
- if (params == NULL) return BadAlloc;
- __glXClearErrorOccured();
-
- CALL_GetLightfv( GET_DISPATCH(), (
- *(GLenum *)(pc + 0),
- pname,
- params
- ) );
- __glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0);
- error = Success;
- }
-
- return error;
-}
-
-int __glXDisp_GetLightiv(__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 = __glGetLightiv_size(pname);
- GLint answerBuffer[200];
- GLint * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4);
-
- if (params == NULL) return BadAlloc;
- __glXClearErrorOccured();
-
- CALL_GetLightiv( GET_DISPATCH(), (
- *(GLenum *)(pc + 0),
- pname,
- params
- ) );
- __glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0);
- error = Success;
- }
-
- return error;
-}
-
-int __glXDisp_GetMapdv(__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 target = *(GLenum *)(pc + 0);
- const GLenum query = *(GLenum *)(pc + 4);
-
- const GLuint compsize = __glGetMapdv_size(target,query);
- GLdouble answerBuffer[200];
- GLdouble * v = __glXGetAnswerBuffer(cl, compsize * 8, answerBuffer, sizeof(answerBuffer), 8);
-
- if (v == NULL) return BadAlloc;
- __glXClearErrorOccured();
-
- CALL_GetMapdv( GET_DISPATCH(), (
- target,
- query,
- v
- ) );
- __glXSendReply(cl->client, v, compsize, 8, GL_FALSE, 0);
- error = Success;
- }
-
- return error;
-}
-
-int __glXDisp_GetMapfv(__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 target = *(GLenum *)(pc + 0);
- const GLenum query = *(GLenum *)(pc + 4);
-
- const GLuint compsize = __glGetMapfv_size(target,query);
- GLfloat answerBuffer[200];
- GLfloat * v = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4);
-
- if (v == NULL) return BadAlloc;
- __glXClearErrorOccured();
-
- CALL_GetMapfv( GET_DISPATCH(), (
- target,
- query,
- v
- ) );
- __glXSendReply(cl->client, v, compsize, 4, GL_FALSE, 0);
- error = Success;
- }
-
- return error;
-}
-
-int __glXDisp_GetMapiv(__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 target = *(GLenum *)(pc + 0);
- const GLenum query = *(GLenum *)(pc + 4);
-
- const GLuint compsize = __glGetMapiv_size(target,query);
- GLint answerBuffer[200];
- GLint * v = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4);
-
- if (v == NULL) return BadAlloc;
- __glXClearErrorOccured();
-
- CALL_GetMapiv( GET_DISPATCH(), (
- target,
- query,
- v
- ) );
- __glXSendReply(cl->client, v, compsize, 4, GL_FALSE, 0);
- error = Success;
- }
-
- return error;
-}
-
-int __glXDisp_GetMaterialfv(__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 = __glGetMaterialfv_size(pname);
- GLfloat answerBuffer[200];
- GLfloat * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4);
-
- if (params == NULL) return BadAlloc;
- __glXClearErrorOccured();
-
- CALL_GetMaterialfv( GET_DISPATCH(), (
- *(GLenum *)(pc + 0),
- pname,
- params
- ) );
- __glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0);
- error = Success;
- }
-
- return error;
-}
-
-int __glXDisp_GetMaterialiv(__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 = __glGetMaterialiv_size(pname);
- GLint answerBuffer[200];
- GLint * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4);
-
- if (params == NULL) return BadAlloc;
- __glXClearErrorOccured();
-
- CALL_GetMaterialiv( GET_DISPATCH(), (
- *(GLenum *)(pc + 0),
- pname,
- params
- ) );
- __glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0);
- error = Success;
- }
-
- return error;
-}
-
-int __glXDisp_GetPixelMapfv(__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 map = *(GLenum *)(pc + 0);
-
- const GLuint compsize = __glGetPixelMapfv_size(map);
- GLfloat answerBuffer[200];
- GLfloat * values = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4);
-
- if (values == NULL) return BadAlloc;
- __glXClearErrorOccured();
-
- CALL_GetPixelMapfv( GET_DISPATCH(), (
- map,
- values
- ) );
- __glXSendReply(cl->client, values, compsize, 4, GL_FALSE, 0);
- error = Success;
- }
-
- return error;
-}
-
-int __glXDisp_GetPixelMapuiv(__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 map = *(GLenum *)(pc + 0);
-
- const GLuint compsize = __glGetPixelMapuiv_size(map);
- GLuint answerBuffer[200];
- GLuint * values = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4);
-
- if (values == NULL) return BadAlloc;
- __glXClearErrorOccured();
-
- CALL_GetPixelMapuiv( GET_DISPATCH(), (
- map,
- values
- ) );
- __glXSendReply(cl->client, values, compsize, 4, GL_FALSE, 0);
- error = Success;
- }
-
- return error;
-}
-
-int __glXDisp_GetPixelMapusv(__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 map = *(GLenum *)(pc + 0);
-
- const GLuint compsize = __glGetPixelMapusv_size(map);
- GLushort answerBuffer[200];
- GLushort * values = __glXGetAnswerBuffer(cl, compsize * 2, answerBuffer, sizeof(answerBuffer), 2);
-
- if (values == NULL) return BadAlloc;
- __glXClearErrorOccured();
-
- CALL_GetPixelMapusv( GET_DISPATCH(), (
- map,
- values
- ) );
- __glXSendReply(cl->client, values, compsize, 2, GL_FALSE, 0);
- error = Success;
- }
-
- return error;
-}
-
-int __glXDisp_GetTexEnvfv(__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 = __glGetTexEnvfv_size(pname);
- GLfloat answerBuffer[200];
- GLfloat * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4);
-
- if (params == NULL) return BadAlloc;
- __glXClearErrorOccured();
-
- CALL_GetTexEnvfv( GET_DISPATCH(), (
- *(GLenum *)(pc + 0),
- pname,
- params
- ) );
- __glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0);
- error = Success;
- }
-
- return error;
-}
-
-int __glXDisp_GetTexEnviv(__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 = __glGetTexEnviv_size(pname);
- GLint answerBuffer[200];
- GLint * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4);
-
- if (params == NULL) return BadAlloc;
- __glXClearErrorOccured();
-
- CALL_GetTexEnviv( GET_DISPATCH(), (
- *(GLenum *)(pc + 0),
- pname,
- params
- ) );
- __glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0);
- error = Success;
- }
-
- return error;
-}
-
-int __glXDisp_GetTexGendv(__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 = __glGetTexGendv_size(pname);
- GLdouble answerBuffer[200];
- GLdouble * params = __glXGetAnswerBuffer(cl, compsize * 8, answerBuffer, sizeof(answerBuffer), 8);
-
- if (params == NULL) return BadAlloc;
- __glXClearErrorOccured();
-
- CALL_GetTexGendv( GET_DISPATCH(), (
- *(GLenum *)(pc + 0),
- pname,
- params
- ) );
- __glXSendReply(cl->client, params, compsize, 8, GL_FALSE, 0);
- error = Success;
- }
-
- return error;
-}
-
-int __glXDisp_GetTexGenfv(__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 = __glGetTexGenfv_size(pname);
- GLfloat answerBuffer[200];
- GLfloat * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4);
-
- if (params == NULL) return BadAlloc;
- __glXClearErrorOccured();
-
- CALL_GetTexGenfv( GET_DISPATCH(), (
- *(GLenum *)(pc + 0),
- pname,
- params
- ) );
- __glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0);
- error = Success;
- }
-
- return error;
-}
-
-int __glXDisp_GetTexGeniv(__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 = __glGetTexGeniv_size(pname);
- GLint answerBuffer[200];
- GLint * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4);
-
- if (params == NULL) return BadAlloc;
- __glXClearErrorOccured();
-
- CALL_GetTexGeniv( GET_DISPATCH(), (
- *(GLenum *)(pc + 0),
- pname,
- params
- ) );
- __glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0);
- error = Success;
- }
-
- return error;
-}
-
-int __glXDisp_GetTexParameterfv(__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 = __glGetTexParameterfv_size(pname);
- GLfloat answerBuffer[200];
- GLfloat * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4);
-
- if (params == NULL) return BadAlloc;
- __glXClearErrorOccured();
-
- CALL_GetTexParameterfv( GET_DISPATCH(), (
- *(GLenum *)(pc + 0),
- pname,
- params
- ) );
- __glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0);
- error = Success;
- }
-
- return error;
-}
-
-int __glXDisp_GetTexParameteriv(__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 = __glGetTexParameteriv_size(pname);
- GLint answerBuffer[200];
- GLint * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4);
-
- if (params == NULL) return BadAlloc;
- __glXClearErrorOccured();
-
- CALL_GetTexParameteriv( GET_DISPATCH(), (
- *(GLenum *)(pc + 0),
- pname,
- params
- ) );
- __glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0);
- error = Success;
- }
-
- return error;
-}
-
-int __glXDisp_GetTexLevelParameterfv(__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 + 8);
-
- const GLuint compsize = __glGetTexLevelParameterfv_size(pname);
- GLfloat answerBuffer[200];
- GLfloat * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4);
-
- if (params == NULL) return BadAlloc;
- __glXClearErrorOccured();
-
- CALL_GetTexLevelParameterfv( GET_DISPATCH(), (
- *(GLenum *)(pc + 0),
- *(GLint *)(pc + 4),
- pname,
- params
- ) );
- __glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0);
- error = Success;
- }
-
- return error;
-}
-
-int __glXDisp_GetTexLevelParameteriv(__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 + 8);
-
- const GLuint compsize = __glGetTexLevelParameteriv_size(pname);
- GLint answerBuffer[200];
- GLint * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4);
-
- if (params == NULL) return BadAlloc;
- __glXClearErrorOccured();
-
- CALL_GetTexLevelParameteriv( GET_DISPATCH(), (
- *(GLenum *)(pc + 0),
- *(GLint *)(pc + 4),
- pname,
- params
- ) );
- __glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0);
- error = Success;
- }
-
- return error;
-}
-
-int __glXDisp_IsEnabled(__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_IsEnabled( GET_DISPATCH(), (
- *(GLenum *)(pc + 0)
- ) );
- __glXSendReply(cl->client, dummy_answer, 0, 0, GL_FALSE, retval);
- error = Success;
- }
-
- return error;
-}
-
-int __glXDisp_IsList(__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_IsList( GET_DISPATCH(), (
- *(GLuint *)(pc + 0)
- ) );
- __glXSendReply(cl->client, dummy_answer, 0, 0, GL_FALSE, retval);
- error = Success;
- }
-
- return error;
-}
-
-void __glXDisp_DepthRange(GLbyte * pc)
-{
-#ifdef __GLX_ALIGN64
- if ((unsigned long)(pc) & 7) {
- (void) memmove(pc-4, pc, 16);
- pc -= 4;
- }
-#endif
-
- CALL_DepthRange( GET_DISPATCH(), (
- *(GLclampd *)(pc + 0),
- *(GLclampd *)(pc + 8)
- ) );
-}
-
-void __glXDisp_Frustum(GLbyte * pc)
-{
-#ifdef __GLX_ALIGN64
- if ((unsigned long)(pc) & 7) {
- (void) memmove(pc-4, pc, 48);
- pc -= 4;
- }
-#endif
-
- CALL_Frustum( GET_DISPATCH(), (
- *(GLdouble *)(pc + 0),
- *(GLdouble *)(pc + 8),
- *(GLdouble *)(pc + 16),
- *(GLdouble *)(pc + 24),
- *(GLdouble *)(pc + 32),
- *(GLdouble *)(pc + 40)
- ) );
-}
-
-void __glXDisp_LoadIdentity(GLbyte * pc)
-{
- CALL_LoadIdentity( GET_DISPATCH(), () );
-}
-
-void __glXDisp_LoadMatrixf(GLbyte * pc)
-{
- CALL_LoadMatrixf( GET_DISPATCH(), (
- (const GLfloat *)(pc + 0)
- ) );
-}
-
-void __glXDisp_LoadMatrixd(GLbyte * pc)
-{
-#ifdef __GLX_ALIGN64
- if ((unsigned long)(pc) & 7) {
- (void) memmove(pc-4, pc, 128);
- pc -= 4;
- }
-#endif
-
- CALL_LoadMatrixd( GET_DISPATCH(), (
- (const GLdouble *)(pc + 0)
- ) );
-}
-
-void __glXDisp_MatrixMode(GLbyte * pc)
-{
- CALL_MatrixMode( GET_DISPATCH(), (
- *(GLenum *)(pc + 0)
- ) );
-}
-
-void __glXDisp_MultMatrixf(GLbyte * pc)
-{
- CALL_MultMatrixf( GET_DISPATCH(), (
- (const GLfloat *)(pc + 0)
- ) );
-}
-
-void __glXDisp_MultMatrixd(GLbyte * pc)
-{
-#ifdef __GLX_ALIGN64
- if ((unsigned long)(pc) & 7) {
- (void) memmove(pc-4, pc, 128);
- pc -= 4;
- }
-#endif
-
- CALL_MultMatrixd( GET_DISPATCH(), (
- (const GLdouble *)(pc + 0)
- ) );
-}
-
-void __glXDisp_Ortho(GLbyte * pc)
-{
-#ifdef __GLX_ALIGN64
- if ((unsigned long)(pc) & 7) {
- (void) memmove(pc-4, pc, 48);
- pc -= 4;
- }
-#endif
-
- CALL_Ortho( GET_DISPATCH(), (
- *(GLdouble *)(pc + 0),
- *(GLdouble *)(pc + 8),
- *(GLdouble *)(pc + 16),
- *(GLdouble *)(pc + 24),
- *(GLdouble *)(pc + 32),
- *(GLdouble *)(pc + 40)
- ) );
-}
-
-void __glXDisp_PopMatrix(GLbyte * pc)
-{
- CALL_PopMatrix( GET_DISPATCH(), () );
-}
-
-void __glXDisp_PushMatrix(GLbyte * pc)
-{
- CALL_PushMatrix( GET_DISPATCH(), () );
-}
-
-void __glXDisp_Rotated(GLbyte * pc)
-{
-#ifdef __GLX_ALIGN64
- if ((unsigned long)(pc) & 7) {
- (void) memmove(pc-4, pc, 32);
- pc -= 4;
- }
-#endif
-
- CALL_Rotated( GET_DISPATCH(), (
- *(GLdouble *)(pc + 0),
- *(GLdouble *)(pc + 8),
- *(GLdouble *)(pc + 16),
- *(GLdouble *)(pc + 24)
- ) );
-}
-
-void __glXDisp_Rotatef(GLbyte * pc)
-{
- CALL_Rotatef( GET_DISPATCH(), (
- *(GLfloat *)(pc + 0),
- *(GLfloat *)(pc + 4),
- *(GLfloat *)(pc + 8),
- *(GLfloat *)(pc + 12)
- ) );
-}
-
-void __glXDisp_Scaled(GLbyte * pc)
-{
-#ifdef __GLX_ALIGN64
- if ((unsigned long)(pc) & 7) {
- (void) memmove(pc-4, pc, 24);
- pc -= 4;
- }
-#endif
-
- CALL_Scaled( GET_DISPATCH(), (
- *(GLdouble *)(pc + 0),
- *(GLdouble *)(pc + 8),
- *(GLdouble *)(pc + 16)
- ) );
-}
-
-void __glXDisp_Scalef(GLbyte * pc)
-{
- CALL_Scalef( GET_DISPATCH(), (
- *(GLfloat *)(pc + 0),
- *(GLfloat *)(pc + 4),
- *(GLfloat *)(pc + 8)
- ) );
-}
-
-void __glXDisp_Translated(GLbyte * pc)
-{
-#ifdef __GLX_ALIGN64
- if ((unsigned long)(pc) & 7) {
- (void) memmove(pc-4, pc, 24);
- pc -= 4;
- }
-#endif
-
- CALL_Translated( GET_DISPATCH(), (
- *(GLdouble *)(pc + 0),
- *(GLdouble *)(pc + 8),
- *(GLdouble *)(pc + 16)
- ) );
-}
-
-void __glXDisp_Translatef(GLbyte * pc)
-{
- CALL_Translatef( GET_DISPATCH(), (
- *(GLfloat *)(pc + 0),
- *(GLfloat *)(pc + 4),
- *(GLfloat *)(pc + 8)
- ) );
-}
-
-void __glXDisp_Viewport(GLbyte * pc)
-{
- CALL_Viewport( GET_DISPATCH(), (
- *(GLint *)(pc + 0),
- *(GLint *)(pc + 4),
- *(GLsizei *)(pc + 8),
- *(GLsizei *)(pc + 12)
- ) );
-}
-
-void __glXDisp_BindTexture(GLbyte * pc)
-{
- CALL_BindTexture( GET_DISPATCH(), (
- *(GLenum *)(pc + 0),
- *(GLuint *)(pc + 4)
- ) );
-}
-
-void __glXDisp_Indexubv(GLbyte * pc)
-{
- CALL_Indexubv( GET_DISPATCH(), (
- (const GLubyte *)(pc + 0)
- ) );
-}
-
-void __glXDisp_PolygonOffset(GLbyte * pc)
-{
- CALL_PolygonOffset( GET_DISPATCH(), (
- *(GLfloat *)(pc + 0),
- *(GLfloat *)(pc + 4)
- ) );
-}
-
-int __glXDisp_AreTexturesResident(__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);
-
- 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;
-}
-
-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(), (
- *(GLenum *)(pc + 0),
- *(GLint *)(pc + 4),
- *(GLenum *)(pc + 8),
- *(GLint *)(pc + 12),
- *(GLint *)(pc + 16),
- *(GLsizei *)(pc + 20),
- *(GLint *)(pc + 24)
- ) );
-}
-
-void __glXDisp_CopyTexImage2D(GLbyte * pc)
-{
- CALL_CopyTexImage2D( GET_DISPATCH(), (
- *(GLenum *)(pc + 0),
- *(GLint *)(pc + 4),
- *(GLenum *)(pc + 8),
- *(GLint *)(pc + 12),
- *(GLint *)(pc + 16),
- *(GLsizei *)(pc + 20),
- *(GLsizei *)(pc + 24),
- *(GLint *)(pc + 28)
- ) );
-}
-
-void __glXDisp_CopyTexSubImage1D(GLbyte * pc)
-{
- CALL_CopyTexSubImage1D( GET_DISPATCH(), (
- *(GLenum *)(pc + 0),
- *(GLint *)(pc + 4),
- *(GLint *)(pc + 8),
- *(GLint *)(pc + 12),
- *(GLint *)(pc + 16),
- *(GLsizei *)(pc + 20)
- ) );
-}
-
-void __glXDisp_CopyTexSubImage2D(GLbyte * pc)
-{
- CALL_CopyTexSubImage2D( GET_DISPATCH(), (
- *(GLenum *)(pc + 0),
- *(GLint *)(pc + 4),
- *(GLint *)(pc + 8),
- *(GLint *)(pc + 12),
- *(GLint *)(pc + 16),
- *(GLint *)(pc + 20),
- *(GLsizei *)(pc + 24),
- *(GLsizei *)(pc + 28)
- ) );
-}
-
-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;
- __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error);
-
- pc += __GLX_VENDPRIV_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_GenTextures(__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 * 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_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;
- int error;
- __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error);
-
- pc += __GLX_SINGLE_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;
-}
-
-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);
-
- CALL_PrioritizeTextures( GET_DISPATCH(), (
- n,
- (const GLuint *)(pc + 4),
- (const GLclampf *)(pc + 4)
- ) );
-}
-
-void __glXDisp_TexSubImage1D(GLbyte * pc)
-{
- const CARD32 ptr_is_null = *(CARD32 *)(pc + 52);
- const GLvoid * const pixels = (const GLvoid *) (ptr_is_null != 0) ? NULL : (pc + 56);
- __GLXpixelHeader * const hdr = (__GLXpixelHeader *)(pc);
-
- CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SWAP_BYTES, hdr->swapBytes) );
- CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_LSB_FIRST, hdr->lsbFirst) );
- CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_ROW_LENGTH, (GLint) hdr->rowLength) );
- CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_ROWS, (GLint) hdr->skipRows) );
- CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_PIXELS, (GLint) hdr->skipPixels) );
- CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_ALIGNMENT, (GLint) hdr->alignment) );
-
- CALL_TexSubImage1D( GET_DISPATCH(), (
- *(GLenum *)(pc + 20),
- *(GLint *)(pc + 24),
- *(GLint *)(pc + 28),
- *(GLsizei *)(pc + 36),
- *(GLenum *)(pc + 44),
- *(GLenum *)(pc + 48),
- pixels
- ) );
-}
-
-void __glXDisp_TexSubImage2D(GLbyte * pc)
-{
- const CARD32 ptr_is_null = *(CARD32 *)(pc + 52);
- const GLvoid * const pixels = (const GLvoid *) (ptr_is_null != 0) ? NULL : (pc + 56);
- __GLXpixelHeader * const hdr = (__GLXpixelHeader *)(pc);
-
- CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SWAP_BYTES, hdr->swapBytes) );
- CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_LSB_FIRST, hdr->lsbFirst) );
- CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_ROW_LENGTH, (GLint) hdr->rowLength) );
- CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_ROWS, (GLint) hdr->skipRows) );
- CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_PIXELS, (GLint) hdr->skipPixels) );
- CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_ALIGNMENT, (GLint) hdr->alignment) );
-
- CALL_TexSubImage2D( GET_DISPATCH(), (
- *(GLenum *)(pc + 20),
- *(GLint *)(pc + 24),
- *(GLint *)(pc + 28),
- *(GLint *)(pc + 32),
- *(GLsizei *)(pc + 36),
- *(GLsizei *)(pc + 40),
- *(GLenum *)(pc + 44),
- *(GLenum *)(pc + 48),
- pixels
- ) );
-}
-
-void __glXDisp_BlendColor(GLbyte * pc)
-{
- CALL_BlendColor( GET_DISPATCH(), (
- *(GLclampf *)(pc + 0),
- *(GLclampf *)(pc + 4),
- *(GLclampf *)(pc + 8),
- *(GLclampf *)(pc + 12)
- ) );
-}
-
-void __glXDisp_BlendEquation(GLbyte * pc)
-{
- CALL_BlendEquation( GET_DISPATCH(), (
- *(GLenum *)(pc + 0)
- ) );
-}
-
-void __glXDisp_ColorTable(GLbyte * pc)
-{
- const GLvoid * const table = (const GLvoid *) (pc + 40);
- __GLXpixelHeader * const hdr = (__GLXpixelHeader *)(pc);
-
- CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SWAP_BYTES, hdr->swapBytes) );
- CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_LSB_FIRST, hdr->lsbFirst) );
- CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_ROW_LENGTH, (GLint) hdr->rowLength) );
- CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_ROWS, (GLint) hdr->skipRows) );
- CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_PIXELS, (GLint) hdr->skipPixels) );
- CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_ALIGNMENT, (GLint) hdr->alignment) );
-
- CALL_ColorTable( GET_DISPATCH(), (
- *(GLenum *)(pc + 20),
- *(GLenum *)(pc + 24),
- *(GLsizei *)(pc + 28),
- *(GLenum *)(pc + 32),
- *(GLenum *)(pc + 36),
- table
- ) );
-}
-
-void __glXDisp_ColorTableParameterfv(GLbyte * pc)
-{
- const GLenum pname = *(GLenum *)(pc + 4);
- const GLfloat * params;
-
- params = (const GLfloat *) (pc + 8);
-
- CALL_ColorTableParameterfv( GET_DISPATCH(), (
- *(GLenum *)(pc + 0),
- pname,
- params
- ) );
-}
-
-void __glXDisp_ColorTableParameteriv(GLbyte * pc)
-{
- const GLenum pname = *(GLenum *)(pc + 4);
- const GLint * params;
-
- params = (const GLint *) (pc + 8);
-
- CALL_ColorTableParameteriv( GET_DISPATCH(), (
- *(GLenum *)(pc + 0),
- pname,
- params
- ) );
-}
-
-void __glXDisp_CopyColorTable(GLbyte * pc)
-{
- CALL_CopyColorTable( GET_DISPATCH(), (
- *(GLenum *)(pc + 0),
- *(GLenum *)(pc + 4),
- *(GLint *)(pc + 8),
- *(GLint *)(pc + 12),
- *(GLsizei *)(pc + 16)
- ) );
-}
-
-int __glXDisp_GetColorTableParameterfv(__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 = __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_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;
- 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 = __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;
-}
-
-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);
- __GLXpixelHeader * const hdr = (__GLXpixelHeader *)(pc);
-
- CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SWAP_BYTES, hdr->swapBytes) );
- CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_LSB_FIRST, hdr->lsbFirst) );
- CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_ROW_LENGTH, (GLint) hdr->rowLength) );
- CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_ROWS, (GLint) hdr->skipRows) );
- CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_PIXELS, (GLint) hdr->skipPixels) );
- CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_ALIGNMENT, (GLint) hdr->alignment) );
-
- CALL_ColorSubTable( GET_DISPATCH(), (
- *(GLenum *)(pc + 20),
- *(GLsizei *)(pc + 24),
- *(GLsizei *)(pc + 28),
- *(GLenum *)(pc + 32),
- *(GLenum *)(pc + 36),
- data
- ) );
-}
-
-void __glXDisp_CopyColorSubTable(GLbyte * pc)
-{
- CALL_CopyColorSubTable( GET_DISPATCH(), (
- *(GLenum *)(pc + 0),
- *(GLsizei *)(pc + 4),
- *(GLint *)(pc + 8),
- *(GLint *)(pc + 12),
- *(GLsizei *)(pc + 16)
- ) );
-}
-
-void __glXDisp_ConvolutionFilter1D(GLbyte * pc)
-{
- const GLvoid * const image = (const GLvoid *) (pc + 44);
- __GLXpixelHeader * const hdr = (__GLXpixelHeader *)(pc);
-
- CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SWAP_BYTES, hdr->swapBytes) );
- CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_LSB_FIRST, hdr->lsbFirst) );
- CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_ROW_LENGTH, (GLint) hdr->rowLength) );
- CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_ROWS, (GLint) hdr->skipRows) );
- CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_PIXELS, (GLint) hdr->skipPixels) );
- CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_ALIGNMENT, (GLint) hdr->alignment) );
-
- CALL_ConvolutionFilter1D( GET_DISPATCH(), (
- *(GLenum *)(pc + 20),
- *(GLenum *)(pc + 24),
- *(GLsizei *)(pc + 28),
- *(GLenum *)(pc + 36),
- *(GLenum *)(pc + 40),
- image
- ) );
-}
-
-void __glXDisp_ConvolutionFilter2D(GLbyte * pc)
-{
- const GLvoid * const image = (const GLvoid *) (pc + 44);
- __GLXpixelHeader * const hdr = (__GLXpixelHeader *)(pc);
-
- CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SWAP_BYTES, hdr->swapBytes) );
- CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_LSB_FIRST, hdr->lsbFirst) );
- CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_ROW_LENGTH, (GLint) hdr->rowLength) );
- CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_ROWS, (GLint) hdr->skipRows) );
- CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_PIXELS, (GLint) hdr->skipPixels) );
- CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_ALIGNMENT, (GLint) hdr->alignment) );
-
- CALL_ConvolutionFilter2D( GET_DISPATCH(), (
- *(GLenum *)(pc + 20),
- *(GLenum *)(pc + 24),
- *(GLsizei *)(pc + 28),
- *(GLsizei *)(pc + 32),
- *(GLenum *)(pc + 36),
- *(GLenum *)(pc + 40),
- image
- ) );
-}
-
-void __glXDisp_ConvolutionParameterf(GLbyte * pc)
-{
- CALL_ConvolutionParameterf( GET_DISPATCH(), (
- *(GLenum *)(pc + 0),
- *(GLenum *)(pc + 4),
- *(GLfloat *)(pc + 8)
- ) );
-}
-
-void __glXDisp_ConvolutionParameterfv(GLbyte * pc)
-{
- const GLenum pname = *(GLenum *)(pc + 4);
- const GLfloat * params;
-
- params = (const GLfloat *) (pc + 8);
-
- CALL_ConvolutionParameterfv( GET_DISPATCH(), (
- *(GLenum *)(pc + 0),
- pname,
- params
- ) );
-}
-
-void __glXDisp_ConvolutionParameteri(GLbyte * pc)
-{
- CALL_ConvolutionParameteri( GET_DISPATCH(), (
- *(GLenum *)(pc + 0),
- *(GLenum *)(pc + 4),
- *(GLint *)(pc + 8)
- ) );
-}
-
-void __glXDisp_ConvolutionParameteriv(GLbyte * pc)
-{
- const GLenum pname = *(GLenum *)(pc + 4);
- const GLint * params;
-
- params = (const GLint *) (pc + 8);
-
- CALL_ConvolutionParameteriv( GET_DISPATCH(), (
- *(GLenum *)(pc + 0),
- pname,
- params
- ) );
-}
-
-void __glXDisp_CopyConvolutionFilter1D(GLbyte * pc)
-{
- CALL_CopyConvolutionFilter1D( GET_DISPATCH(), (
- *(GLenum *)(pc + 0),
- *(GLenum *)(pc + 4),
- *(GLint *)(pc + 8),
- *(GLint *)(pc + 12),
- *(GLsizei *)(pc + 16)
- ) );
-}
-
-void __glXDisp_CopyConvolutionFilter2D(GLbyte * pc)
-{
- CALL_CopyConvolutionFilter2D( GET_DISPATCH(), (
- *(GLenum *)(pc + 0),
- *(GLenum *)(pc + 4),
- *(GLint *)(pc + 8),
- *(GLint *)(pc + 12),
- *(GLsizei *)(pc + 16),
- *(GLsizei *)(pc + 20)
- ) );
-}
-
-int __glXDisp_GetConvolutionParameterfv(__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 = __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_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;
- 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 = __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_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;
- 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 = __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_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;
- 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 = __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_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;
- 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 = __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_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;
- 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 = __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;
-}
-
-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(), (
- *(GLenum *)(pc + 0),
- *(GLsizei *)(pc + 4),
- *(GLenum *)(pc + 8),
- *(GLboolean *)(pc + 12)
- ) );
-}
-
-void __glXDisp_Minmax(GLbyte * pc)
-{
- CALL_Minmax( GET_DISPATCH(), (
- *(GLenum *)(pc + 0),
- *(GLenum *)(pc + 4),
- *(GLboolean *)(pc + 8)
- ) );
-}
-
-void __glXDisp_ResetHistogram(GLbyte * pc)
-{
- CALL_ResetHistogram( GET_DISPATCH(), (
- *(GLenum *)(pc + 0)
- ) );
-}
-
-void __glXDisp_ResetMinmax(GLbyte * pc)
-{
- CALL_ResetMinmax( GET_DISPATCH(), (
- *(GLenum *)(pc + 0)
- ) );
-}
-
-void __glXDisp_TexImage3D(GLbyte * pc)
-{
- const CARD32 ptr_is_null = *(CARD32 *)(pc + 76);
- const GLvoid * const pixels = (const GLvoid *) (ptr_is_null != 0) ? NULL : (pc + 80);
- __GLXpixel3DHeader * const hdr = (__GLXpixel3DHeader *)(pc);
-
- CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SWAP_BYTES, hdr->swapBytes) );
- CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_LSB_FIRST, hdr->lsbFirst) );
- CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_ROW_LENGTH, (GLint) hdr->rowLength) );
- CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_IMAGE_HEIGHT, (GLint) hdr->imageHeight) );
- CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_ROWS, (GLint) hdr->skipRows) );
- CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_IMAGES, (GLint) hdr->skipImages) );
- CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_PIXELS, (GLint) hdr->skipPixels) );
- CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_ALIGNMENT, (GLint) hdr->alignment) );
-
- CALL_TexImage3D( GET_DISPATCH(), (
- *(GLenum *)(pc + 36),
- *(GLint *)(pc + 40),
- *(GLint *)(pc + 44),
- *(GLsizei *)(pc + 48),
- *(GLsizei *)(pc + 52),
- *(GLsizei *)(pc + 56),
- *(GLint *)(pc + 64),
- *(GLenum *)(pc + 68),
- *(GLenum *)(pc + 72),
- pixels
- ) );
-}
-
-void __glXDisp_TexSubImage3D(GLbyte * pc)
-{
- const CARD32 ptr_is_null = *(CARD32 *)(pc + 84);
- const GLvoid * const pixels = (const GLvoid *) (ptr_is_null != 0) ? NULL : (pc + 88);
- __GLXpixel3DHeader * const hdr = (__GLXpixel3DHeader *)(pc);
-
- CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SWAP_BYTES, hdr->swapBytes) );
- CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_LSB_FIRST, hdr->lsbFirst) );
- CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_ROW_LENGTH, (GLint) hdr->rowLength) );
- CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_IMAGE_HEIGHT, (GLint) hdr->imageHeight) );
- CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_ROWS, (GLint) hdr->skipRows) );
- CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_IMAGES, (GLint) hdr->skipImages) );
- CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_PIXELS, (GLint) hdr->skipPixels) );
- CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_ALIGNMENT, (GLint) hdr->alignment) );
-
- CALL_TexSubImage3D( GET_DISPATCH(), (
- *(GLenum *)(pc + 36),
- *(GLint *)(pc + 40),
- *(GLint *)(pc + 44),
- *(GLint *)(pc + 48),
- *(GLint *)(pc + 52),
- *(GLsizei *)(pc + 60),
- *(GLsizei *)(pc + 64),
- *(GLsizei *)(pc + 68),
- *(GLenum *)(pc + 76),
- *(GLenum *)(pc + 80),
- pixels
- ) );
-}
-
-void __glXDisp_CopyTexSubImage3D(GLbyte * pc)
-{
- CALL_CopyTexSubImage3D( GET_DISPATCH(), (
- *(GLenum *)(pc + 0),
- *(GLint *)(pc + 4),
- *(GLint *)(pc + 8),
- *(GLint *)(pc + 12),
- *(GLint *)(pc + 16),
- *(GLint *)(pc + 20),
- *(GLint *)(pc + 24),
- *(GLsizei *)(pc + 28),
- *(GLsizei *)(pc + 32)
- ) );
-}
-
-void __glXDisp_ActiveTextureARB(GLbyte * pc)
-{
- CALL_ActiveTextureARB( GET_DISPATCH(), (
- *(GLenum *)(pc + 0)
- ) );
-}
-
-void __glXDisp_MultiTexCoord1dvARB(GLbyte * pc)
-{
-#ifdef __GLX_ALIGN64
- if ((unsigned long)(pc) & 7) {
- (void) memmove(pc-4, pc, 12);
- pc -= 4;
- }
-#endif
-
- CALL_MultiTexCoord1dvARB( GET_DISPATCH(), (
- *(GLenum *)(pc + 8),
- (const GLdouble *)(pc + 0)
- ) );
-}
-
-void __glXDisp_MultiTexCoord1fvARB(GLbyte * pc)
-{
- CALL_MultiTexCoord1fvARB( GET_DISPATCH(), (
- *(GLenum *)(pc + 0),
- (const GLfloat *)(pc + 4)
- ) );
-}
-
-void __glXDisp_MultiTexCoord1ivARB(GLbyte * pc)
-{
- CALL_MultiTexCoord1ivARB( GET_DISPATCH(), (
- *(GLenum *)(pc + 0),
- (const GLint *)(pc + 4)
- ) );
-}
-
-void __glXDisp_MultiTexCoord1svARB(GLbyte * pc)
-{
- CALL_MultiTexCoord1svARB( GET_DISPATCH(), (
- *(GLenum *)(pc + 0),
- (const GLshort *)(pc + 4)
- ) );
-}
-
-void __glXDisp_MultiTexCoord2dvARB(GLbyte * pc)
-{
-#ifdef __GLX_ALIGN64
- if ((unsigned long)(pc) & 7) {
- (void) memmove(pc-4, pc, 20);
- pc -= 4;
- }
-#endif
-
- CALL_MultiTexCoord2dvARB( GET_DISPATCH(), (
- *(GLenum *)(pc + 16),
- (const GLdouble *)(pc + 0)
- ) );
-}
-
-void __glXDisp_MultiTexCoord2fvARB(GLbyte * pc)
-{
- CALL_MultiTexCoord2fvARB( GET_DISPATCH(), (
- *(GLenum *)(pc + 0),
- (const GLfloat *)(pc + 4)
- ) );
-}
-
-void __glXDisp_MultiTexCoord2ivARB(GLbyte * pc)
-{
- CALL_MultiTexCoord2ivARB( GET_DISPATCH(), (
- *(GLenum *)(pc + 0),
- (const GLint *)(pc + 4)
- ) );
-}
-
-void __glXDisp_MultiTexCoord2svARB(GLbyte * pc)
-{
- CALL_MultiTexCoord2svARB( GET_DISPATCH(), (
- *(GLenum *)(pc + 0),
- (const GLshort *)(pc + 4)
- ) );
-}
-
-void __glXDisp_MultiTexCoord3dvARB(GLbyte * pc)
-{
-#ifdef __GLX_ALIGN64
- if ((unsigned long)(pc) & 7) {
- (void) memmove(pc-4, pc, 28);
- pc -= 4;
- }
-#endif
-
- CALL_MultiTexCoord3dvARB( GET_DISPATCH(), (
- *(GLenum *)(pc + 24),
- (const GLdouble *)(pc + 0)
- ) );
-}
-
-void __glXDisp_MultiTexCoord3fvARB(GLbyte * pc)
-{
- CALL_MultiTexCoord3fvARB( GET_DISPATCH(), (
- *(GLenum *)(pc + 0),
- (const GLfloat *)(pc + 4)
- ) );
-}
-
-void __glXDisp_MultiTexCoord3ivARB(GLbyte * pc)
-{
- CALL_MultiTexCoord3ivARB( GET_DISPATCH(), (
- *(GLenum *)(pc + 0),
- (const GLint *)(pc + 4)
- ) );
-}
-
-void __glXDisp_MultiTexCoord3svARB(GLbyte * pc)
-{
- CALL_MultiTexCoord3svARB( GET_DISPATCH(), (
- *(GLenum *)(pc + 0),
- (const GLshort *)(pc + 4)
- ) );
-}
-
-void __glXDisp_MultiTexCoord4dvARB(GLbyte * pc)
-{
-#ifdef __GLX_ALIGN64
- if ((unsigned long)(pc) & 7) {
- (void) memmove(pc-4, pc, 36);
- pc -= 4;
- }
-#endif
-
- CALL_MultiTexCoord4dvARB( GET_DISPATCH(), (
- *(GLenum *)(pc + 32),
- (const GLdouble *)(pc + 0)
- ) );
-}
-
-void __glXDisp_MultiTexCoord4fvARB(GLbyte * pc)
-{
- CALL_MultiTexCoord4fvARB( GET_DISPATCH(), (
- *(GLenum *)(pc + 0),
- (const GLfloat *)(pc + 4)
- ) );
-}
-
-void __glXDisp_MultiTexCoord4ivARB(GLbyte * pc)
-{
- CALL_MultiTexCoord4ivARB( GET_DISPATCH(), (
- *(GLenum *)(pc + 0),
- (const GLint *)(pc + 4)
- ) );
-}
-
-void __glXDisp_MultiTexCoord4svARB(GLbyte * pc)
-{
- CALL_MultiTexCoord4svARB( GET_DISPATCH(), (
- *(GLenum *)(pc + 0),
- (const GLshort *)(pc + 4)
- ) );
-}
-
-void __glXDisp_SampleCoverageARB(GLbyte * pc)
-{
- CALL_SampleCoverageARB( GET_DISPATCH(), (
- *(GLclampf *)(pc + 0),
- *(GLboolean *)(pc + 4)
- ) );
-}
-
-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);
-
- CALL_DrawBuffersARB( GET_DISPATCH(), (
- n,
- (const GLenum *)(pc + 4)
- ) );
-}
-
-void __glXDisp_SampleMaskSGIS(GLbyte * pc)
-{
- CALL_SampleMaskSGIS( GET_DISPATCH(), (
- *(GLclampf *)(pc + 0),
- *(GLboolean *)(pc + 4)
- ) );
-}
-
-void __glXDisp_SamplePatternSGIS(GLbyte * pc)
-{
- CALL_SamplePatternSGIS( GET_DISPATCH(), (
- *(GLenum *)(pc + 0)
- ) );
-}
-
-void __glXDisp_PointParameterfEXT(GLbyte * pc)
-{
- CALL_PointParameterfEXT( GET_DISPATCH(), (
- *(GLenum *)(pc + 0),
- *(GLfloat *)(pc + 4)
- ) );
-}
-
-void __glXDisp_PointParameterfvEXT(GLbyte * pc)
-{
- const GLenum pname = *(GLenum *)(pc + 0);
- const GLfloat * params;
-
- params = (const GLfloat *) (pc + 4);
-
- CALL_PointParameterfvEXT( GET_DISPATCH(), (
- pname,
- params
- ) );
-}
-
-void __glXDisp_SecondaryColor3bvEXT(GLbyte * pc)
-{
- CALL_SecondaryColor3bvEXT( GET_DISPATCH(), (
- (const GLbyte *)(pc + 0)
- ) );
-}
-
-void __glXDisp_SecondaryColor3dvEXT(GLbyte * pc)
-{
-#ifdef __GLX_ALIGN64
- if ((unsigned long)(pc) & 7) {
- (void) memmove(pc-4, pc, 24);
- pc -= 4;
- }
-#endif
-
- CALL_SecondaryColor3dvEXT( GET_DISPATCH(), (
- (const GLdouble *)(pc + 0)
- ) );
-}
-
-void __glXDisp_SecondaryColor3fvEXT(GLbyte * pc)
-{
- CALL_SecondaryColor3fvEXT( GET_DISPATCH(), (
- (const GLfloat *)(pc + 0)
- ) );
-}
-
-void __glXDisp_SecondaryColor3ivEXT(GLbyte * pc)
-{
- CALL_SecondaryColor3ivEXT( GET_DISPATCH(), (
- (const GLint *)(pc + 0)
- ) );
-}
-
-void __glXDisp_SecondaryColor3svEXT(GLbyte * pc)
-{
- CALL_SecondaryColor3svEXT( GET_DISPATCH(), (
- (const GLshort *)(pc + 0)
- ) );
-}
-
-void __glXDisp_SecondaryColor3ubvEXT(GLbyte * pc)
-{
- CALL_SecondaryColor3ubvEXT( GET_DISPATCH(), (
- (const GLubyte *)(pc + 0)
- ) );
-}
-
-void __glXDisp_SecondaryColor3uivEXT(GLbyte * pc)
-{
- CALL_SecondaryColor3uivEXT( GET_DISPATCH(), (
- (const GLuint *)(pc + 0)
- ) );
-}
-
-void __glXDisp_SecondaryColor3usvEXT(GLbyte * pc)
-{
- CALL_SecondaryColor3usvEXT( GET_DISPATCH(), (
- (const GLushort *)(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_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;
- 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_AreProgramsResidentNV( GET_DISPATCH(), (
- n,
- (const GLuint *)(pc + 4),
- residences
- ) );
- __glXSendReply(cl->client, residences, n, 1, GL_FALSE, retval);
- error = Success;
- }
-
- return error;
-}
-
-void __glXDisp_BindProgramNV(GLbyte * pc)
-{
- CALL_BindProgramNV( GET_DISPATCH(), (
- *(GLenum *)(pc + 0),
- *(GLuint *)(pc + 4)
- ) );
-}
-
-int __glXDisp_DeleteProgramsNV(__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);
-
- CALL_DeleteProgramsNV( GET_DISPATCH(), (
- n,
- (const GLuint *)(pc + 4)
- ) );
- error = Success;
- }
-
- return error;
-}
-
-void __glXDisp_ExecuteProgramNV(GLbyte * pc)
-{
- CALL_ExecuteProgramNV( GET_DISPATCH(), (
- *(GLenum *)(pc + 0),
- *(GLuint *)(pc + 4),
- (const GLfloat *)(pc + 8)
- ) );
-}
-
-int __glXDisp_GenProgramsNV(__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 * programs = __glXGetAnswerBuffer(cl, n * 4, answerBuffer, sizeof(answerBuffer), 4);
- CALL_GenProgramsNV( GET_DISPATCH(), (
- n,
- programs
- ) );
- __glXSendReply(cl->client, programs, n, 4, GL_TRUE, 0);
- error = Success;
- }
-
- return error;
-}
-
-int __glXDisp_GetProgramParameterdvNV(__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_GetProgramParameterdvNV( GET_DISPATCH(), (
- *(GLenum *)(pc + 0),
- *(GLuint *)(pc + 4),
- *(GLenum *)(pc + 8),
- params
- ) );
- __glXSendReply(cl->client, params, 4, 8, GL_FALSE, 0);
- error = Success;
- }
-
- return error;
-}
-
-int __glXDisp_GetProgramParameterfvNV(__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_GetProgramParameterfvNV( GET_DISPATCH(), (
- *(GLenum *)(pc + 0),
- *(GLuint *)(pc + 4),
- *(GLenum *)(pc + 8),
- params
- ) );
- __glXSendReply(cl->client, params, 4, 4, GL_FALSE, 0);
- error = Success;
- }
-
- return error;
-}
-
-int __glXDisp_GetProgramivNV(__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 = __glGetProgramivNV_size(pname);
- GLint answerBuffer[200];
- GLint * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4);
-
- if (params == NULL) return BadAlloc;
- __glXClearErrorOccured();
-
- CALL_GetProgramivNV( GET_DISPATCH(), (
- *(GLuint *)(pc + 0),
- pname,
- params
- ) );
- __glXSendReply(cl->client, params, compsize, 4, GL_FALSE, 0);
- error = Success;
- }
-
- return error;
-}
-
-int __glXDisp_GetTrackMatrixivNV(__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_GetTrackMatrixivNV( GET_DISPATCH(), (
- *(GLenum *)(pc + 0),
- *(GLuint *)(pc + 4),
- *(GLenum *)(pc + 8),
- params
- ) );
- __glXSendReply(cl->client, params, 1, 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;
-}
-
-int __glXDisp_IsProgramNV(__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_IsProgramNV( GET_DISPATCH(), (
- *(GLuint *)(pc + 0)
- ) );
- __glXSendReply(cl->client, dummy_answer, 0, 0, GL_FALSE, retval);
- error = Success;
- }
-
- return error;
-}
-
-void __glXDisp_LoadProgramNV(GLbyte * pc)
-{
- const GLsizei len = *(GLsizei *)(pc + 8);
-
- CALL_LoadProgramNV( GET_DISPATCH(), (
- *(GLenum *)(pc + 0),
- *(GLuint *)(pc + 4),
- len,
- (const GLubyte *)(pc + 12)
- ) );
-}
-
-void __glXDisp_ProgramParameters4dvNV(GLbyte * pc)
-{
- const GLuint num = *(GLuint *)(pc + 8);
-
-#ifdef __GLX_ALIGN64
- const GLuint cmdlen = 16 + __GLX_PAD((num * 32)) - 4;
- if ((unsigned long)(pc) & 7) {
- (void) memmove(pc-4, pc, cmdlen);
- pc -= 4;
- }
-#endif
-
- CALL_ProgramParameters4dvNV( GET_DISPATCH(), (
- *(GLenum *)(pc + 0),
- *(GLuint *)(pc + 4),
- num,
- (const GLdouble *)(pc + 12)
- ) );
-}
-
-void __glXDisp_ProgramParameters4fvNV(GLbyte * pc)
-{
- const GLuint num = *(GLuint *)(pc + 8);
-
- CALL_ProgramParameters4fvNV( GET_DISPATCH(), (
- *(GLenum *)(pc + 0),
- *(GLuint *)(pc + 4),
- num,
- (const GLfloat *)(pc + 12)
- ) );
-}
-
-void __glXDisp_RequestResidentProgramsNV(GLbyte * pc)
-{
- const GLsizei n = *(GLsizei *)(pc + 0);
-
- CALL_RequestResidentProgramsNV( GET_DISPATCH(), (
- n,
- (const GLuint *)(pc + 4)
- ) );
-}
-
-void __glXDisp_TrackMatrixNV(GLbyte * pc)
-{
- CALL_TrackMatrixNV( GET_DISPATCH(), (
- *(GLenum *)(pc + 0),
- *(GLuint *)(pc + 4),
- *(GLenum *)(pc + 8),
- *(GLenum *)(pc + 12)
- ) );
-}
-
-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)
- ) );
-}
-
-void __glXDisp_VertexAttribs1dvNV(GLbyte * pc)
-{
- const GLsizei n = *(GLsizei *)(pc + 4);
-
-#ifdef __GLX_ALIGN64
- const GLuint cmdlen = 12 + __GLX_PAD((n * 8)) - 4;
- if ((unsigned long)(pc) & 7) {
- (void) memmove(pc-4, pc, cmdlen);
- pc -= 4;
- }
-#endif
-
- CALL_VertexAttribs1dvNV( GET_DISPATCH(), (
- *(GLuint *)(pc + 0),
- n,
- (const GLdouble *)(pc + 8)
- ) );
-}
-
-void __glXDisp_VertexAttribs1fvNV(GLbyte * pc)
-{
- const GLsizei n = *(GLsizei *)(pc + 4);
-
- CALL_VertexAttribs1fvNV( GET_DISPATCH(), (
- *(GLuint *)(pc + 0),
- n,
- (const GLfloat *)(pc + 8)
- ) );
-}
-
-void __glXDisp_VertexAttribs1svNV(GLbyte * pc)
-{
- const GLsizei n = *(GLsizei *)(pc + 4);
-
- CALL_VertexAttribs1svNV( GET_DISPATCH(), (
- *(GLuint *)(pc + 0),
- n,
- (const GLshort *)(pc + 8)
- ) );
-}
-
-void __glXDisp_VertexAttribs2dvNV(GLbyte * pc)
-{
- const GLsizei n = *(GLsizei *)(pc + 4);
-
-#ifdef __GLX_ALIGN64
- const GLuint cmdlen = 12 + __GLX_PAD((n * 16)) - 4;
- if ((unsigned long)(pc) & 7) {
- (void) memmove(pc-4, pc, cmdlen);
- pc -= 4;
- }
-#endif
-
- CALL_VertexAttribs2dvNV( GET_DISPATCH(), (
- *(GLuint *)(pc + 0),
- n,
- (const GLdouble *)(pc + 8)
- ) );
-}
-
-void __glXDisp_VertexAttribs2fvNV(GLbyte * pc)
-{
- const GLsizei n = *(GLsizei *)(pc + 4);
-
- CALL_VertexAttribs2fvNV( GET_DISPATCH(), (
- *(GLuint *)(pc + 0),
- n,
- (const GLfloat *)(pc + 8)
- ) );
-}
-
-void __glXDisp_VertexAttribs2svNV(GLbyte * pc)
-{
- const GLsizei n = *(GLsizei *)(pc + 4);
-
- CALL_VertexAttribs2svNV( GET_DISPATCH(), (
- *(GLuint *)(pc + 0),
- n,
- (const GLshort *)(pc + 8)
- ) );
-}
-
-void __glXDisp_VertexAttribs3dvNV(GLbyte * pc)
-{
- const GLsizei n = *(GLsizei *)(pc + 4);
-
-#ifdef __GLX_ALIGN64
- const GLuint cmdlen = 12 + __GLX_PAD((n * 24)) - 4;
- if ((unsigned long)(pc) & 7) {
- (void) memmove(pc-4, pc, cmdlen);
- pc -= 4;
- }
-#endif
-
- CALL_VertexAttribs3dvNV( GET_DISPATCH(), (
- *(GLuint *)(pc + 0),
- n,
- (const GLdouble *)(pc + 8)
- ) );
-}
-
-void __glXDisp_VertexAttribs3fvNV(GLbyte * pc)
-{
- const GLsizei n = *(GLsizei *)(pc + 4);
-
- CALL_VertexAttribs3fvNV( GET_DISPATCH(), (
- *(GLuint *)(pc + 0),
- n,
- (const GLfloat *)(pc + 8)
- ) );
-}
-
-void __glXDisp_VertexAttribs3svNV(GLbyte * pc)
-{
- const GLsizei n = *(GLsizei *)(pc + 4);
-
- CALL_VertexAttribs3svNV( GET_DISPATCH(), (
- *(GLuint *)(pc + 0),
- n,
- (const GLshort *)(pc + 8)
- ) );
-}
-
-void __glXDisp_VertexAttribs4dvNV(GLbyte * pc)
-{
- const GLsizei n = *(GLsizei *)(pc + 4);
-
-#ifdef __GLX_ALIGN64
- const GLuint cmdlen = 12 + __GLX_PAD((n * 32)) - 4;
- if ((unsigned long)(pc) & 7) {
- (void) memmove(pc-4, pc, cmdlen);
- pc -= 4;
- }
-#endif
-
- CALL_VertexAttribs4dvNV( GET_DISPATCH(), (
- *(GLuint *)(pc + 0),
- n,
- (const GLdouble *)(pc + 8)
- ) );
-}
-
-void __glXDisp_VertexAttribs4fvNV(GLbyte * pc)
-{
- const GLsizei n = *(GLsizei *)(pc + 4);
-
- CALL_VertexAttribs4fvNV( GET_DISPATCH(), (
- *(GLuint *)(pc + 0),
- n,
- (const GLfloat *)(pc + 8)
- ) );
-}
-
-void __glXDisp_VertexAttribs4svNV(GLbyte * pc)
-{
- const GLsizei n = *(GLsizei *)(pc + 4);
-
- CALL_VertexAttribs4svNV( GET_DISPATCH(), (
- *(GLuint *)(pc + 0),
- n,
- (const GLshort *)(pc + 8)
- ) );
-}
-
-void __glXDisp_VertexAttribs4ubvNV(GLbyte * pc)
-{
- const GLsizei n = *(GLsizei *)(pc + 4);
-
- CALL_VertexAttribs4ubvNV( GET_DISPATCH(), (
- *(GLuint *)(pc + 0),
- n,
- (const GLubyte *)(pc + 8)
- ) );
-}
-
-void __glXDisp_PointParameteriNV(GLbyte * pc)
-{
- CALL_PointParameteriNV( GET_DISPATCH(), (
- *(GLenum *)(pc + 0),
- *(GLint *)(pc + 4)
- ) );
-}
-
-void __glXDisp_PointParameterivNV(GLbyte * pc)
-{
- const GLenum pname = *(GLenum *)(pc + 0);
- const GLint * params;
-
- params = (const GLint *) (pc + 4);
-
- CALL_PointParameterivNV( GET_DISPATCH(), (
- pname,
- params
- ) );
-}
-
-void __glXDisp_ActiveStencilFaceEXT(GLbyte * pc)
-{
- CALL_ActiveStencilFaceEXT( GET_DISPATCH(), (
- *(GLenum *)(pc + 0)
- ) );
-}
-
-int __glXDisp_GetProgramNamedParameterdvNV(__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 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;
- }
-
- return error;
-}
-
-int __glXDisp_GetProgramNamedParameterfvNV(__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 len = *(GLsizei *)(pc + 4);
-
- GLfloat params[4];
- CALL_GetProgramNamedParameterfvNV( GET_DISPATCH(), (
- *(GLuint *)(pc + 0),
- len,
- (const GLubyte *)(pc + 8),
- params
- ) );
- __glXSendReply(cl->client, params, 4, 4, GL_TRUE, 0);
- error = Success;
- }
-
- return error;
-}
-
-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)
- ) );
-}
-
-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_BlendEquationSeparateEXT(GLbyte * pc)
-{
- CALL_BlendEquationSeparateEXT( GET_DISPATCH(), (
- *(GLenum *)(pc + 0),
- *(GLenum *)(pc + 4)
- ) );
-}
-
-void __glXDisp_BindFramebufferEXT(GLbyte * pc)
-{
- CALL_BindFramebufferEXT( GET_DISPATCH(), (
- *(GLenum *)(pc + 0),
- *(GLuint *)(pc + 4)
- ) );
-}
-
-void __glXDisp_BindRenderbufferEXT(GLbyte * pc)
-{
- CALL_BindRenderbufferEXT( GET_DISPATCH(), (
- *(GLenum *)(pc + 0),
- *(GLuint *)(pc + 4)
- ) );
-}
-
-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);
-
- CALL_DeleteRenderbuffersEXT( GET_DISPATCH(), (
- n,
- (const GLuint *)(pc + 4)
- ) );
-}
-
-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;
- 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 * renderbuffers = __glXGetAnswerBuffer(cl, n * 4, answerBuffer, sizeof(answerBuffer), 4);
- CALL_GenRenderbuffersEXT( GET_DISPATCH(), (
- n,
- renderbuffers
- ) );
- __glXSendReply(cl->client, renderbuffers, n, 4, GL_TRUE, 0);
- error = Success;
- }
-
- return error;
-}
-
-void __glXDisp_GenerateMipmapEXT(GLbyte * pc)
-{
- 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;
- int error;
- __GLXcontext * const cx = __glXForceCurrent(cl, req->contextTag, &error);
-
- pc += __GLX_VENDPRIV_HDR_SIZE;
- if ( cx != NULL ) {
- GLint params[1];
- CALL_GetRenderbufferParameterivEXT( GET_DISPATCH(), (
- *(GLenum *)(pc + 0),
- *(GLenum *)(pc + 4),
- params
- ) );
- __glXSendReply(cl->client, params, 1, 4, GL_FALSE, 0);
- error = Success;
- }
-
- return error;
-}
-
-int __glXDisp_IsFramebufferEXT(__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_IsFramebufferEXT( GET_DISPATCH(), (
- *(GLuint *)(pc + 0)
- ) );
- __glXSendReply(cl->client, dummy_answer, 0, 0, GL_FALSE, retval);
- error = Success;
- }
-
- return error;
-}
-
-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_RenderbufferStorageEXT(GLbyte * pc)
-{
- CALL_RenderbufferStorageEXT( GET_DISPATCH(), (
- *(GLenum *)(pc + 0),
- *(GLenum *)(pc + 4),
- *(GLsizei *)(pc + 8),
- *(GLsizei *)(pc + 12)
- ) );
-}
-
diff --git a/src/glx/x11/indirect_dispatch.h b/src/glx/x11/indirect_dispatch.h
deleted file mode 100644
index e81c382f0a..0000000000
--- a/src/glx/x11/indirect_dispatch.h
+++ /dev/null
@@ -1,1047 +0,0 @@
-/* DO NOT EDIT - This file generated automatically by glX_proto_recv.py (from Mesa) script */
-
-/*
- * (C) Copyright IBM Corporation 2005
- * 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.
- */
-
-#if !defined( _INDIRECT_DISPATCH_H_ )
-# define _INDIRECT_DISPATCH_H_
-
-# if (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 3)) && defined(__ELF__)
-# define HIDDEN __attribute__((visibility("hidden")))
-# else
-# define HIDDEN
-# endif
-struct __GLXclientStateRec;
-
-extern HIDDEN void __glXDisp_MapGrid1d(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_MapGrid1d(GLbyte * pc);
-extern HIDDEN void __glXDisp_MapGrid1f(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_MapGrid1f(GLbyte * pc);
-extern HIDDEN int __glXDisp_NewList(struct __GLXclientStateRec *, GLbyte *);
-extern HIDDEN int __glXDispSwap_NewList(struct __GLXclientStateRec *, GLbyte *);
-extern HIDDEN void __glXDisp_LoadIdentity(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_LoadIdentity(GLbyte * pc);
-extern HIDDEN void __glXDisp_SampleCoverageARB(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_SampleCoverageARB(GLbyte * pc);
-extern HIDDEN void __glXDisp_ConvolutionFilter1D(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_ConvolutionFilter1D(GLbyte * pc);
-extern HIDDEN void __glXDisp_BeginQueryARB(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_BeginQueryARB(GLbyte * pc);
-extern HIDDEN void __glXDisp_RasterPos3dv(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_RasterPos3dv(GLbyte * pc);
-extern HIDDEN void __glXDisp_PointParameteriNV(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_PointParameteriNV(GLbyte * pc);
-extern HIDDEN void __glXDisp_TexCoord1iv(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_TexCoord1iv(GLbyte * pc);
-extern HIDDEN void __glXDisp_TexCoord4sv(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_TexCoord4sv(GLbyte * pc);
-extern HIDDEN void __glXDisp_ActiveTextureARB(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_ActiveTextureARB(GLbyte * pc);
-extern HIDDEN void __glXDisp_VertexAttrib4ubvNV(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_VertexAttrib4ubvNV(GLbyte * pc);
-extern HIDDEN int __glXDisp_GetProgramNamedParameterdvNV(struct __GLXclientStateRec *, GLbyte *);
-extern HIDDEN int __glXDispSwap_GetProgramNamedParameterdvNV(struct __GLXclientStateRec *, GLbyte *);
-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);
-extern HIDDEN void __glXDispSwap_Color3uiv(GLbyte * pc);
-extern HIDDEN int __glXDisp_IsEnabled(struct __GLXclientStateRec *, GLbyte *);
-extern HIDDEN int __glXDispSwap_IsEnabled(struct __GLXclientStateRec *, GLbyte *);
-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 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 *);
-extern HIDDEN int __glXDispSwap_GetQueryObjectivARB(struct __GLXclientStateRec *, GLbyte *);
-extern HIDDEN void __glXDisp_Vertex3dv(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_Vertex3dv(GLbyte * pc);
-extern HIDDEN void __glXDisp_CompressedTexSubImage2DARB(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_CompressedTexSubImage2DARB(GLbyte * pc);
-extern HIDDEN void __glXDisp_LightModeliv(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_LightModeliv(GLbyte * pc);
-extern HIDDEN void __glXDisp_VertexAttrib1svARB(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_VertexAttrib1svARB(GLbyte * pc);
-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 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_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);
-extern HIDDEN void __glXDispSwap_PassThrough(GLbyte * pc);
-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_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 *);
-extern HIDDEN int __glXDispSwap_GetProgramNamedParameterfvNV(struct __GLXclientStateRec *, GLbyte *);
-extern HIDDEN void __glXDisp_PointParameterfEXT(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_PointParameterfEXT(GLbyte * pc);
-extern HIDDEN void __glXDisp_TexCoord2sv(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_TexCoord2sv(GLbyte * pc);
-extern HIDDEN void __glXDisp_Vertex4dv(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_Vertex4dv(GLbyte * pc);
-extern HIDDEN void __glXDisp_CompressedTexImage3DARB(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_CompressedTexImage3DARB(GLbyte * pc);
-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);
-extern HIDDEN void __glXDispSwap_PointSize(GLbyte * pc);
-extern HIDDEN void __glXDisp_PopName(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_PopName(GLbyte * pc);
-extern HIDDEN void __glXDisp_VertexAttrib4NbvARB(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_VertexAttrib4NbvARB(GLbyte * pc);
-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_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_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);
-extern HIDDEN void __glXDispSwap_MultiTexCoord2svARB(GLbyte * pc);
-extern HIDDEN void __glXDisp_VertexAttribs3fvNV(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_VertexAttribs3fvNV(GLbyte * pc);
-extern HIDDEN void __glXDisp_GenerateMipmapEXT(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_GenerateMipmapEXT(GLbyte * pc);
-extern HIDDEN int __glXDisp_GenLists(struct __GLXclientStateRec *, GLbyte *);
-extern HIDDEN int __glXDispSwap_GenLists(struct __GLXclientStateRec *, GLbyte *);
-extern HIDDEN void __glXDisp_MapGrid2d(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_MapGrid2d(GLbyte * pc);
-extern HIDDEN void __glXDisp_MapGrid2f(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_MapGrid2f(GLbyte * pc);
-extern HIDDEN void __glXDisp_Scissor(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_Scissor(GLbyte * pc);
-extern HIDDEN void __glXDisp_Fogf(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_Fogf(GLbyte * pc);
-extern HIDDEN void __glXDisp_TexSubImage1D(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_TexSubImage1D(GLbyte * pc);
-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_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 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_PointParameterfvEXT(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_PointParameterfvEXT(GLbyte * pc);
-extern HIDDEN void __glXDisp_Color3bv(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_Color3bv(GLbyte * pc);
-extern HIDDEN void __glXDisp_SecondaryColor3bvEXT(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_SecondaryColor3bvEXT(GLbyte * pc);
-extern HIDDEN int __glXDisp_GetProgramLocalParameterfvARB(struct __GLXclientStateRec *, GLbyte *);
-extern HIDDEN int __glXDispSwap_GetProgramLocalParameterfvARB(struct __GLXclientStateRec *, GLbyte *);
-extern HIDDEN void __glXDisp_RenderbufferStorageEXT(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_RenderbufferStorageEXT(GLbyte * pc);
-extern HIDDEN void __glXDisp_ColorTable(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_ColorTable(GLbyte * pc);
-extern HIDDEN void __glXDisp_Accum(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_Accum(GLbyte * pc);
-extern HIDDEN int __glXDisp_GetTexImage(struct __GLXclientStateRec *, GLbyte *);
-extern HIDDEN int __glXDispSwap_GetTexImage(struct __GLXclientStateRec *, GLbyte *);
-extern HIDDEN void __glXDisp_ConvolutionFilter2D(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_ConvolutionFilter2D(GLbyte * pc);
-extern HIDDEN int __glXDisp_Finish(struct __GLXclientStateRec *, GLbyte *);
-extern HIDDEN int __glXDispSwap_Finish(struct __GLXclientStateRec *, GLbyte *);
-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);
-extern HIDDEN void __glXDispSwap_RasterPos2fv(GLbyte * pc);
-extern HIDDEN void __glXDisp_TexCoord1fv(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_TexCoord1fv(GLbyte * pc);
-extern HIDDEN void __glXDisp_ProgramEnvParameter4fvARB(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_ProgramEnvParameter4fvARB(GLbyte * pc);
-extern HIDDEN void __glXDisp_RasterPos4fv(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_RasterPos4fv(GLbyte * pc);
-extern HIDDEN void __glXDisp_ClearIndex(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_ClearIndex(GLbyte * pc);
-extern HIDDEN void __glXDisp_LoadMatrixd(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_LoadMatrixd(GLbyte * pc);
-extern HIDDEN void __glXDisp_PushMatrix(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_PushMatrix(GLbyte * pc);
-extern HIDDEN void __glXDisp_ConvolutionParameterfv(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_ConvolutionParameterfv(GLbyte * pc);
-extern HIDDEN int __glXDisp_GetTexGendv(struct __GLXclientStateRec *, GLbyte *);
-extern HIDDEN int __glXDispSwap_GetTexGendv(struct __GLXclientStateRec *, GLbyte *);
-extern HIDDEN void __glXDisp_LoadProgramNV(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_LoadProgramNV(GLbyte * pc);
-extern HIDDEN int __glXDisp_EndList(struct __GLXclientStateRec *, GLbyte *);
-extern HIDDEN int __glXDispSwap_EndList(struct __GLXclientStateRec *, GLbyte *);
-extern HIDDEN void __glXDisp_VertexAttrib4fvNV(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_VertexAttrib4fvNV(GLbyte * pc);
-extern HIDDEN void __glXDisp_EvalCoord1fv(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_EvalCoord1fv(GLbyte * pc);
-extern HIDDEN void __glXDisp_EvalMesh2(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_EvalMesh2(GLbyte * pc);
-extern HIDDEN void __glXDisp_Vertex4fv(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_Vertex4fv(GLbyte * pc);
-extern HIDDEN int __glXDisp_CheckFramebufferStatusEXT(struct __GLXclientStateRec *, GLbyte *);
-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);
-extern HIDDEN void __glXDispSwap_End(GLbyte * pc);
-extern HIDDEN void __glXDisp_VertexAttribs2dvNV(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_VertexAttribs2dvNV(GLbyte * pc);
-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);
-extern HIDDEN void __glXDispSwap_DeleteRenderbuffersEXT(GLbyte * pc);
-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 *);
-extern HIDDEN int __glXDispSwap_GetError(struct __GLXclientStateRec *, GLbyte *);
-extern HIDDEN void __glXDisp_TexCoord3dv(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_TexCoord3dv(GLbyte * pc);
-extern HIDDEN void __glXDisp_Indexdv(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_Indexdv(GLbyte * pc);
-extern HIDDEN void __glXDisp_PushName(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_PushName(GLbyte * pc);
-extern HIDDEN void __glXDisp_MultiTexCoord2dvARB(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_MultiTexCoord2dvARB(GLbyte * pc);
-extern HIDDEN void __glXDisp_ProgramNamedParameter4fvNV(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_ProgramNamedParameter4fvNV(GLbyte * pc);
-extern HIDDEN void __glXDisp_VertexAttrib4fvARB(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_VertexAttrib4fvARB(GLbyte * pc);
-extern HIDDEN int __glXDisp_CreateGLXPbufferSGIX(struct __GLXclientStateRec *, GLbyte *);
-extern HIDDEN int __glXDispSwap_CreateGLXPbufferSGIX(struct __GLXclientStateRec *, GLbyte *);
-extern HIDDEN void __glXDisp_MultiTexCoord1svARB(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_MultiTexCoord1svARB(GLbyte * pc);
-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_Color4iv(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_Color4iv(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);
-extern HIDDEN void __glXDispSwap_StencilOp(GLbyte * pc);
-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);
-extern HIDDEN void __glXDispSwap_Color4bv(GLbyte * pc);
-extern HIDDEN void __glXDisp_SecondaryColor3usvEXT(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_SecondaryColor3usvEXT(GLbyte * pc);
-extern HIDDEN void __glXDisp_VertexAttrib2fvNV(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_VertexAttrib2fvNV(GLbyte * pc);
-extern HIDDEN void __glXDisp_ProgramLocalParameter4dvARB(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_ProgramLocalParameter4dvARB(GLbyte * pc);
-extern HIDDEN int __glXDisp_DeleteLists(struct __GLXclientStateRec *, GLbyte *);
-extern HIDDEN int __glXDispSwap_DeleteLists(struct __GLXclientStateRec *, GLbyte *);
-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 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_RasterPos2sv(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_RasterPos2sv(GLbyte * pc);
-extern HIDDEN void __glXDisp_Color4ubv(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_Color4ubv(GLbyte * pc);
-extern HIDDEN void __glXDisp_DrawBuffer(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_DrawBuffer(GLbyte * pc);
-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);
-extern HIDDEN void __glXDispSwap_PixelMapusv(GLbyte * pc);
-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);
-extern HIDDEN void __glXDispSwap_ProgramNamedParameter4dvNV(GLbyte * pc);
-extern HIDDEN int __glXDisp_Flush(struct __GLXclientStateRec *, GLbyte *);
-extern HIDDEN int __glXDispSwap_Flush(struct __GLXclientStateRec *, GLbyte *);
-extern HIDDEN void __glXDisp_Color4uiv(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_Color4uiv(GLbyte * pc);
-extern HIDDEN void __glXDisp_RasterPos3sv(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_RasterPos3sv(GLbyte * pc);
-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 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_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 int __glXDisp_GetDrawableAttributesSGIX(struct __GLXclientStateRec *, GLbyte *);
-extern HIDDEN int __glXDispSwap_GetDrawableAttributesSGIX(struct __GLXclientStateRec *, GLbyte *);
-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);
-extern HIDDEN void __glXDispSwap_CopyTexImage2D(GLbyte * pc);
-extern HIDDEN void __glXDisp_Lightfv(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_Lightfv(GLbyte * pc);
-extern HIDDEN void __glXDisp_ClearDepth(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_ClearDepth(GLbyte * pc);
-extern HIDDEN void __glXDisp_ColorSubTable(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_ColorSubTable(GLbyte * pc);
-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 *);
-extern HIDDEN int __glXDispSwap_GetQueryObjectuivARB(struct __GLXclientStateRec *, GLbyte *);
-extern HIDDEN int __glXDisp_GetTexParameteriv(struct __GLXclientStateRec *, GLbyte *);
-extern HIDDEN int __glXDispSwap_GetTexParameteriv(struct __GLXclientStateRec *, GLbyte *);
-extern HIDDEN int __glXDisp_GenRenderbuffersEXT(struct __GLXclientStateRec *, GLbyte *);
-extern HIDDEN int __glXDispSwap_GenRenderbuffersEXT(struct __GLXclientStateRec *, GLbyte *);
-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_Rectdv(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_Rectdv(GLbyte * pc);
-extern HIDDEN void __glXDisp_VertexAttrib4NivARB(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_VertexAttrib4NivARB(GLbyte * pc);
-extern HIDDEN void __glXDisp_Materialiv(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_Materialiv(GLbyte * pc);
-extern HIDDEN void __glXDisp_SecondaryColor3fvEXT(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_SecondaryColor3fvEXT(GLbyte * pc);
-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_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);
-extern HIDDEN void __glXDispSwap_TexGenf(GLbyte * pc);
-extern HIDDEN void __glXDisp_TexGend(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_TexGend(GLbyte * pc);
-extern HIDDEN int __glXDisp_GetPolygonStipple(struct __GLXclientStateRec *, GLbyte *);
-extern HIDDEN int __glXDispSwap_GetPolygonStipple(struct __GLXclientStateRec *, GLbyte *);
-extern HIDDEN int __glXDisp_GetVertexAttribfvNV(struct __GLXclientStateRec *, GLbyte *);
-extern HIDDEN int __glXDispSwap_GetVertexAttribfvNV(struct __GLXclientStateRec *, GLbyte *);
-extern HIDDEN void __glXDisp_VertexAttrib2svNV(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_VertexAttrib2svNV(GLbyte * pc);
-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 *);
-extern HIDDEN int __glXDispSwap_IsProgramNV(struct __GLXclientStateRec *, GLbyte *);
-extern HIDDEN void __glXDisp_PixelZoom(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_PixelZoom(GLbyte * pc);
-extern HIDDEN void __glXDisp_ColorTableParameterfv(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_ColorTableParameterfv(GLbyte * pc);
-extern HIDDEN void __glXDisp_PixelMapuiv(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_PixelMapuiv(GLbyte * pc);
-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 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 int __glXDisp_DestroyGLXPbufferSGIX(struct __GLXclientStateRec *, GLbyte *);
-extern HIDDEN int __glXDispSwap_DestroyGLXPbufferSGIX(struct __GLXclientStateRec *, GLbyte *);
-extern HIDDEN void __glXDisp_EvalCoord2dv(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_EvalCoord2dv(GLbyte * pc);
-extern HIDDEN void __glXDisp_VertexAttrib3svARB(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_VertexAttrib3svARB(GLbyte * pc);
-extern HIDDEN void __glXDisp_ColorMaterial(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_ColorMaterial(GLbyte * pc);
-extern HIDDEN void __glXDisp_CompressedTexSubImage3DARB(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_CompressedTexSubImage3DARB(GLbyte * pc);
-extern HIDDEN int __glXDisp_IsFramebufferEXT(struct __GLXclientStateRec *, GLbyte *);
-extern HIDDEN int __glXDispSwap_IsFramebufferEXT(struct __GLXclientStateRec *, GLbyte *);
-extern HIDDEN int __glXDisp_GetVertexAttribdvARB(struct __GLXclientStateRec *, GLbyte *);
-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 *);
-extern HIDDEN int __glXDispSwap_FeedbackBuffer(struct __GLXclientStateRec *, GLbyte *);
-extern HIDDEN void __glXDisp_RasterPos2iv(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_RasterPos2iv(GLbyte * pc);
-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 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);
-extern HIDDEN void __glXDispSwap_Normal3dv(GLbyte * pc);
-extern HIDDEN void __glXDisp_Lightf(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_Lightf(GLbyte * pc);
-extern HIDDEN void __glXDisp_MatrixMode(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_MatrixMode(GLbyte * pc);
-extern HIDDEN void __glXDisp_FramebufferTexture2DEXT(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_FramebufferTexture2DEXT(GLbyte * pc);
-extern HIDDEN int __glXDisp_GetPixelMapusv(struct __GLXclientStateRec *, GLbyte *);
-extern HIDDEN int __glXDispSwap_GetPixelMapusv(struct __GLXclientStateRec *, GLbyte *);
-extern HIDDEN void __glXDisp_Lighti(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_Lighti(GLbyte * pc);
-extern HIDDEN int __glXDisp_GetFramebufferAttachmentParameterivEXT(struct __GLXclientStateRec *, GLbyte *);
-extern HIDDEN int __glXDispSwap_GetFramebufferAttachmentParameterivEXT(struct __GLXclientStateRec *, GLbyte *);
-extern HIDDEN int __glXDisp_ChangeDrawableAttributesSGIX(struct __GLXclientStateRec *, GLbyte *);
-extern HIDDEN int __glXDispSwap_ChangeDrawableAttributesSGIX(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);
-extern HIDDEN void __glXDispSwap_MultMatrixd(GLbyte * pc);
-extern HIDDEN void __glXDisp_MultMatrixf(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_MultMatrixf(GLbyte * pc);
-extern HIDDEN void __glXDisp_MultiTexCoord4fvARB(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_MultiTexCoord4fvARB(GLbyte * pc);
-extern HIDDEN void __glXDisp_TrackMatrixNV(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_TrackMatrixNV(GLbyte * pc);
-extern HIDDEN void __glXDisp_RasterPos4sv(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_RasterPos4sv(GLbyte * pc);
-extern HIDDEN void __glXDisp_VertexAttrib4NsvARB(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_VertexAttrib4NsvARB(GLbyte * pc);
-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 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 *);
-extern HIDDEN int __glXDispSwap_GetTexLevelParameterfv(struct __GLXclientStateRec *, GLbyte *);
-extern HIDDEN int __glXDisp_GenFramebuffersEXT(struct __GLXclientStateRec *, GLbyte *);
-extern HIDDEN int __glXDispSwap_GenFramebuffersEXT(struct __GLXclientStateRec *, GLbyte *);
-extern HIDDEN int __glXDisp_GetProgramParameterdvNV(struct __GLXclientStateRec *, GLbyte *);
-extern HIDDEN int __glXDispSwap_GetProgramParameterdvNV(struct __GLXclientStateRec *, GLbyte *);
-extern HIDDEN void __glXDisp_Vertex2sv(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_Vertex2sv(GLbyte * pc);
-extern HIDDEN int __glXDisp_GetIntegerv(struct __GLXclientStateRec *, GLbyte *);
-extern HIDDEN int __glXDispSwap_GetIntegerv(struct __GLXclientStateRec *, GLbyte *);
-extern HIDDEN int __glXDisp_GetProgramEnvParameterfvARB(struct __GLXclientStateRec *, GLbyte *);
-extern HIDDEN int __glXDispSwap_GetProgramEnvParameterfvARB(struct __GLXclientStateRec *, GLbyte *);
-extern HIDDEN int __glXDisp_GetTrackMatrixivNV(struct __GLXclientStateRec *, GLbyte *);
-extern HIDDEN int __glXDispSwap_GetTrackMatrixivNV(struct __GLXclientStateRec *, GLbyte *);
-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);
-extern HIDDEN void __glXDispSwap_Map1d(GLbyte * pc);
-extern HIDDEN void __glXDisp_Map1f(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_Map1f(GLbyte * pc);
-extern HIDDEN void __glXDisp_CompressedTexImage2DARB(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_CompressedTexImage2DARB(GLbyte * pc);
-extern HIDDEN void __glXDisp_TexImage2D(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_TexImage2D(GLbyte * pc);
-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);
-extern HIDDEN void __glXDispSwap_CopyTexImage1D(GLbyte * pc);
-extern HIDDEN void __glXDisp_RasterPos2dv(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_RasterPos2dv(GLbyte * pc);
-extern HIDDEN void __glXDisp_Fogiv(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_Fogiv(GLbyte * pc);
-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 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_Clear(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_Clear(GLbyte * pc);
-extern HIDDEN void __glXDisp_ReadBuffer(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_ReadBuffer(GLbyte * pc);
-extern HIDDEN void __glXDisp_ConvolutionParameteri(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_ConvolutionParameteri(GLbyte * pc);
-extern HIDDEN void __glXDisp_Ortho(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_Ortho(GLbyte * pc);
-extern HIDDEN void __glXDisp_ListBase(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_ListBase(GLbyte * pc);
-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 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_SecondaryColor3dvEXT(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_SecondaryColor3dvEXT(GLbyte * pc);
-extern HIDDEN void __glXDisp_Vertex2fv(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_Vertex2fv(GLbyte * pc);
-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 *);
-extern HIDDEN int __glXDispSwap_DeleteProgramsNV(struct __GLXclientStateRec *, GLbyte *);
-extern HIDDEN void __glXDisp_EvalMesh1(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_EvalMesh1(GLbyte * pc);
-extern HIDDEN void __glXDisp_MultiTexCoord1dvARB(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_MultiTexCoord1dvARB(GLbyte * pc);
-extern HIDDEN void __glXDisp_Vertex2iv(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_Vertex2iv(GLbyte * pc);
-extern HIDDEN int __glXDisp_GetProgramStringNV(struct __GLXclientStateRec *, GLbyte *);
-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_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 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);
-extern HIDDEN void __glXDispSwap_TexCoord3fv(GLbyte * pc);
-extern HIDDEN void __glXDisp_FogCoordfvEXT(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_FogCoordfvEXT(GLbyte * pc);
-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_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 void __glXDisp_Rotatef(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_Rotatef(GLbyte * pc);
-extern HIDDEN int __glXDisp_GetProgramivARB(struct __GLXclientStateRec *, GLbyte *);
-extern HIDDEN int __glXDispSwap_GetProgramivARB(struct __GLXclientStateRec *, GLbyte *);
-extern HIDDEN void __glXDisp_BlendFuncSeparateEXT(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_BlendFuncSeparateEXT(GLbyte * pc);
-extern HIDDEN void __glXDisp_ProgramParameters4dvNV(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_ProgramParameters4dvNV(GLbyte * pc);
-extern HIDDEN void __glXDisp_EvalPoint2(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_EvalPoint2(GLbyte * pc);
-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_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 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_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);
-extern HIDDEN void __glXDispSwap_Materialf(GLbyte * pc);
-extern HIDDEN void __glXDisp_Materiali(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_Materiali(GLbyte * pc);
-extern HIDDEN void __glXDisp_Indexsv(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_Indexsv(GLbyte * pc);
-extern HIDDEN void __glXDisp_MultiTexCoord4svARB(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_MultiTexCoord4svARB(GLbyte * pc);
-extern HIDDEN void __glXDisp_LightModelfv(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_LightModelfv(GLbyte * pc);
-extern HIDDEN void __glXDisp_TexCoord2dv(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_TexCoord2dv(GLbyte * pc);
-extern HIDDEN int __glXDisp_GenQueriesARB(struct __GLXclientStateRec *, GLbyte *);
-extern HIDDEN int __glXDispSwap_GenQueriesARB(struct __GLXclientStateRec *, GLbyte *);
-extern HIDDEN void __glXDisp_EvalCoord1dv(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_EvalCoord1dv(GLbyte * pc);
-extern HIDDEN void __glXDisp_Translated(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_Translated(GLbyte * pc);
-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_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 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);
-extern HIDDEN void __glXDispSwap_StencilFunc(GLbyte * pc);
-extern HIDDEN void __glXDisp_CopyPixels(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_CopyPixels(GLbyte * pc);
-extern HIDDEN void __glXDisp_Rectsv(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_Rectsv(GLbyte * pc);
-extern HIDDEN void __glXDisp_CopyConvolutionFilter2D(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_CopyConvolutionFilter2D(GLbyte * pc);
-extern HIDDEN void __glXDisp_TexParameterfv(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_TexParameterfv(GLbyte * pc);
-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_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);
-extern HIDDEN void __glXDispSwap_IndexMask(GLbyte * pc);
-extern HIDDEN void __glXDisp_BindProgramNV(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_BindProgramNV(GLbyte * pc);
-extern HIDDEN void __glXDisp_VertexAttrib4svARB(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_VertexAttrib4svARB(GLbyte * pc);
-extern HIDDEN int __glXDisp_GetFloatv(struct __GLXclientStateRec *, GLbyte *);
-extern HIDDEN int __glXDispSwap_GetFloatv(struct __GLXclientStateRec *, GLbyte *);
-extern HIDDEN void __glXDisp_TexCoord3sv(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_TexCoord3sv(GLbyte * pc);
-extern HIDDEN void __glXDisp_PopAttrib(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_PopAttrib(GLbyte * pc);
-extern HIDDEN void __glXDisp_Fogfv(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_Fogfv(GLbyte * pc);
-extern HIDDEN void __glXDisp_InitNames(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_InitNames(GLbyte * pc);
-extern HIDDEN void __glXDisp_Normal3sv(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_Normal3sv(GLbyte * pc);
-extern HIDDEN void __glXDisp_Minmax(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_Minmax(GLbyte * pc);
-extern HIDDEN void __glXDisp_FogCoorddvEXT(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_FogCoorddvEXT(GLbyte * pc);
-extern HIDDEN int __glXDisp_GetBooleanv(struct __GLXclientStateRec *, GLbyte *);
-extern HIDDEN int __glXDispSwap_GetBooleanv(struct __GLXclientStateRec *, GLbyte *);
-extern HIDDEN void __glXDisp_Hint(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_Hint(GLbyte * pc);
-extern HIDDEN void __glXDisp_Color4dv(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_Color4dv(GLbyte * pc);
-extern HIDDEN void __glXDisp_VertexAttrib2svARB(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_VertexAttrib2svARB(GLbyte * pc);
-extern HIDDEN int __glXDisp_AreProgramsResidentNV(struct __GLXclientStateRec *, GLbyte *);
-extern HIDDEN int __glXDispSwap_AreProgramsResidentNV(struct __GLXclientStateRec *, GLbyte *);
-extern HIDDEN void __glXDisp_CopyColorSubTable(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_CopyColorSubTable(GLbyte * pc);
-extern HIDDEN void __glXDisp_VertexAttrib4NubvARB(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_VertexAttrib4NubvARB(GLbyte * pc);
-extern HIDDEN void __glXDisp_VertexAttrib3dvNV(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_VertexAttrib3dvNV(GLbyte * pc);
-extern HIDDEN void __glXDisp_Vertex4iv(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_Vertex4iv(GLbyte * pc);
-extern HIDDEN int __glXDisp_GetProgramEnvParameterdvARB(struct __GLXclientStateRec *, GLbyte *);
-extern HIDDEN int __glXDispSwap_GetProgramEnvParameterdvARB(struct __GLXclientStateRec *, GLbyte *);
-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 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);
-extern HIDDEN void __glXDispSwap_LightModelf(GLbyte * pc);
-extern HIDDEN int __glXDisp_GetTexParameterfv(struct __GLXclientStateRec *, GLbyte *);
-extern HIDDEN int __glXDispSwap_GetTexParameterfv(struct __GLXclientStateRec *, GLbyte *);
-extern HIDDEN int __glXDisp_GetLightfv(struct __GLXclientStateRec *, GLbyte *);
-extern HIDDEN int __glXDispSwap_GetLightfv(struct __GLXclientStateRec *, GLbyte *);
-extern HIDDEN void __glXDisp_Disable(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_Disable(GLbyte * pc);
-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 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_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);
-extern HIDDEN void __glXDispSwap_VertexAttribs1svNV(GLbyte * pc);
-extern HIDDEN void __glXDisp_Vertex3fv(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_Vertex3fv(GLbyte * pc);
-extern HIDDEN int __glXDisp_GenProgramsNV(struct __GLXclientStateRec *, GLbyte *);
-extern HIDDEN int __glXDispSwap_GenProgramsNV(struct __GLXclientStateRec *, GLbyte *);
-extern HIDDEN void __glXDisp_VertexAttrib4dvNV(GLbyte * pc);
-extern HIDDEN void __glXDispSwap_VertexAttrib4dvNV(GLbyte * pc);
-
-# undef HIDDEN
-
-#endif /* !defined( _INDIRECT_DISPATCH_H_ ) */
diff --git a/src/glx/x11/indirect_dispatch_swap.c b/src/glx/x11/indirect_dispatch_swap.c
deleted file mode 100644
index f137cbe98a..0000000000
--- a/src/glx/x11/indirect_dispatch_swap.c
+++ /dev/null
@@ -1,6051 +0,0 @@
-/* DO NOT EDIT - This file generated automatically by glX_proto_recv.py (from Mesa) script */
-
-/*
- * (C) Copyright IBM Corporation 2005
- * 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 <X11/Xmd.h>
-#include <GL/gl.h>
-#include <GL/glxproto.h>
-#include <inttypes.h>
-#include "indirect_size.h"
-#include "indirect_size_get.h"
-#include "indirect_dispatch.h"
-#include "glxserver.h"
-#include "glxbyteorder.h"
-#include "indirect_util.h"
-#include "singlesize.h"
-#include "glapitable.h"
-#include "glapi.h"
-#include "glthread.h"
-#include "dispatch.h"
-
-#define __GLX_PAD(x) (((x) + 3) & ~3)
-
-typedef struct {
- __GLX_PIXEL_3D_HDR;
-} __GLXpixel3DHeader;
-
-extern GLboolean __glXErrorOccured( void );
-extern void __glXClearErrorOccured( void );
-
-static const unsigned dummy_answer[2] = {0, 0};
-
-static GLsizei
-bswap_CARD32( const void * src )
-{
- union { uint32_t dst; GLsizei ret; } x;
- x.dst = bswap_32( *(uint32_t *) src );
- return x.ret;
-}
-
-static GLshort
-bswap_CARD16( const void * src )
-{
- union { uint16_t dst; GLshort ret; } x;
- x.dst = bswap_16( *(uint16_t *) src );
- return x.ret;
-}
-
-static GLenum
-bswap_ENUM( const void * src )
-{
- union { uint32_t dst; GLenum ret; } x;
- x.dst = bswap_32( *(uint32_t *) src );
- return x.ret;
-}
-
-static GLdouble
-bswap_FLOAT64( const void * src )
-{
- union { uint64_t dst; GLdouble ret; } x;
- x.dst = bswap_64( *(uint64_t *) src );
- return x.ret;
-}
-
-static GLfloat
-bswap_FLOAT32( const void * src )
-{
- union { uint32_t dst; GLfloat ret; } x;
- x.dst = bswap_32( *(uint32_t *) src );
- return x.ret;
-}
-
-static void *
-bswap_16_array( uint16_t * src, unsigned count )
-{
- unsigned i;
-
- for ( i = 0 ; i < count ; i++ ) {
- uint16_t temp = bswap_16( src[i] );
- src[i] = temp;
- }
-
- return src;
-}
-
-static void *
-bswap_32_array( uint32_t * src, unsigned count )
-{
- unsigned i;
-
- for ( i = 0 ; i < count ; i++ ) {
- uint32_t temp = bswap_32( src[i] );
- src[i] = temp;
- }
-
- return src;
-}
-
-static void *
-bswap_64_array( uint64_t * src, unsigned count )
-{
- unsigned i;
-
- for ( i = 0 ; i < count ; i++ ) {
- uint64_t temp = bswap_64( src[i] );
- src[i] = temp;
- }
-
- return src;
-}
-
-int __glXDispSwap_NewList(__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 ) {
- CALL_NewList( GET_DISPATCH(), (
- (GLuint )bswap_CARD32 ( pc + 0 ),
- (GLenum )bswap_ENUM ( pc + 4 )
- ) );
- error = Success;
- }
-
- return error;
-}
-
-int __glXDispSwap_EndList(__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 ) {
- CALL_EndList( GET_DISPATCH(), () );
- error = Success;
- }
-
- return error;
-}
-
-void __glXDispSwap_CallList(GLbyte * pc)
-{
- CALL_CallList( GET_DISPATCH(), (
- (GLuint )bswap_CARD32 ( pc + 0 )
- ) );
-}
-
-void __glXDispSwap_CallLists(GLbyte * pc)
-{
- const GLsizei n = (GLsizei )bswap_CARD32 ( pc + 0 );
- const GLenum type = (GLenum )bswap_ENUM ( pc + 4 );
- const GLvoid * lists;
-
- switch(type) {
- case GL_BYTE:
- case GL_UNSIGNED_BYTE:
- case GL_2_BYTES:
- case GL_3_BYTES:
- case GL_4_BYTES:
- lists = (const GLvoid *) (pc + 8); break;
- case GL_SHORT:
- case GL_UNSIGNED_SHORT:
- lists = (const GLvoid *) bswap_16_array( (uint16_t *) (pc + 8), n ); break;
- case GL_INT:
- case GL_UNSIGNED_INT:
- case GL_FLOAT:
- lists = (const GLvoid *) bswap_32_array( (uint32_t *) (pc + 8), n ); break;
- default:
- return;
- }
-
- CALL_CallLists( GET_DISPATCH(), (
- n,
- type,
- lists
- ) );
-}
-
-int __glXDispSwap_DeleteLists(__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 ) {
- CALL_DeleteLists( GET_DISPATCH(), (
- (GLuint )bswap_CARD32 ( pc + 0 ),
- (GLsizei )bswap_CARD32 ( pc + 4 )
- ) );
- error = Success;
- }
-
- return error;
-}
-
-int __glXDispSwap_GenLists(__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 ) {
- GLuint retval;
- retval = CALL_GenLists( GET_DISPATCH(), (
- (GLsizei )bswap_CARD32 ( pc + 0 )
- ) );
- __glXSendReplySwap(cl->client, dummy_answer, 0, 0, GL_FALSE, retval);
- error = Success;
- }
-
- return error;
-}
-
-void __glXDispSwap_ListBase(GLbyte * pc)
-{
- CALL_ListBase( GET_DISPATCH(), (
- (GLuint )bswap_CARD32 ( pc + 0 )
- ) );
-}
-
-void __glXDispSwap_Begin(GLbyte * pc)
-{
- CALL_Begin( GET_DISPATCH(), (
- (GLenum )bswap_ENUM ( pc + 0 )
- ) );
-}
-
-void __glXDispSwap_Bitmap(GLbyte * pc)
-{
- const GLubyte * const bitmap = (const GLubyte *) (pc + 44);
- __GLXpixelHeader * const hdr = (__GLXpixelHeader *)(pc);
-
- CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_LSB_FIRST, hdr->lsbFirst) );
- CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_ROW_LENGTH, (GLint) bswap_CARD32( & hdr->rowLength )) );
- CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_ROWS, (GLint) bswap_CARD32( & hdr->skipRows )) );
- CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_PIXELS, (GLint) bswap_CARD32( & hdr->skipPixels )) );
- CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_ALIGNMENT, (GLint) bswap_CARD32( & hdr->alignment )) );
-
- CALL_Bitmap( GET_DISPATCH(), (
- (GLsizei )bswap_CARD32 ( pc + 20 ),
- (GLsizei )bswap_CARD32 ( pc + 24 ),
- (GLfloat )bswap_FLOAT32( pc + 28 ),
- (GLfloat )bswap_FLOAT32( pc + 32 ),
- (GLfloat )bswap_FLOAT32( pc + 36 ),
- (GLfloat )bswap_FLOAT32( pc + 40 ),
- bitmap
- ) );
-}
-
-void __glXDispSwap_Color3bv(GLbyte * pc)
-{
- CALL_Color3bv( GET_DISPATCH(), (
- (const GLbyte *)(pc + 0)
- ) );
-}
-
-void __glXDispSwap_Color3dv(GLbyte * pc)
-{
-#ifdef __GLX_ALIGN64
- if ((unsigned long)(pc) & 7) {
- (void) memmove(pc-4, pc, 24);
- pc -= 4;
- }
-#endif
-
- CALL_Color3dv( GET_DISPATCH(), (
- (const GLdouble *)bswap_64_array( (uint64_t *) (pc + 0), 3 )
- ) );
-}
-
-void __glXDispSwap_Color3fv(GLbyte * pc)
-{
- CALL_Color3fv( GET_DISPATCH(), (
- (const GLfloat *)bswap_32_array( (uint32_t *) (pc + 0), 3 )
- ) );
-}
-
-void __glXDispSwap_Color3iv(GLbyte * pc)
-{
- CALL_Color3iv( GET_DISPATCH(), (
- (const GLint *)bswap_32_array( (uint32_t *) (pc + 0), 3 )
- ) );
-}
-
-void __glXDispSwap_Color3sv(GLbyte * pc)
-{
- CALL_Color3sv( GET_DISPATCH(), (
- (const GLshort *)bswap_16_array( (uint16_t *) (pc + 0), 3 )
- ) );
-}
-
-void __glXDispSwap_Color3ubv(GLbyte * pc)
-{
- CALL_Color3ubv( GET_DISPATCH(), (
- (const GLubyte *)(pc + 0)
- ) );
-}
-
-void __glXDispSwap_Color3uiv(GLbyte * pc)
-{
- CALL_Color3uiv( GET_DISPATCH(), (
- (const GLuint *)bswap_32_array( (uint32_t *) (pc + 0), 3 )
- ) );
-}
-
-void __glXDispSwap_Color3usv(GLbyte * pc)
-{
- CALL_Color3usv( GET_DISPATCH(), (
- (const GLushort *)bswap_16_array( (uint16_t *) (pc + 0), 3 )
- ) );
-}
-
-void __glXDispSwap_Color4bv(GLbyte * pc)
-{
- CALL_Color4bv( GET_DISPATCH(), (
- (const GLbyte *)(pc + 0)
- ) );
-}
-
-void __glXDispSwap_Color4dv(GLbyte * pc)
-{
-#ifdef __GLX_ALIGN64
- if ((unsigned long)(pc) & 7) {
- (void) memmove(pc-4, pc, 32);
- pc -= 4;
- }
-#endif
-
- CALL_Color4dv( GET_DISPATCH(), (
- (const GLdouble *)bswap_64_array( (uint64_t *) (pc + 0), 4 )
- ) );
-}
-
-void __glXDispSwap_Color4fv(GLbyte * pc)
-{
- CALL_Color4fv( GET_DISPATCH(), (
- (const GLfloat *)bswap_32_array( (uint32_t *) (pc + 0), 4 )
- ) );
-}
-
-void __glXDispSwap_Color4iv(GLbyte * pc)
-{
- CALL_Color4iv( GET_DISPATCH(), (
- (const GLint *)bswap_32_array( (uint32_t *) (pc + 0), 4 )
- ) );
-}
-
-void __glXDispSwap_Color4sv(GLbyte * pc)
-{
- CALL_Color4sv( GET_DISPATCH(), (
- (const GLshort *)bswap_16_array( (uint16_t *) (pc + 0), 4 )
- ) );
-}
-
-void __glXDispSwap_Color4ubv(GLbyte * pc)
-{
- CALL_Color4ubv( GET_DISPATCH(), (
- (const GLubyte *)(pc + 0)
- ) );
-}
-
-void __glXDispSwap_Color4uiv(GLbyte * pc)
-{
- CALL_Color4uiv( GET_DISPATCH(), (
- (const GLuint *)bswap_32_array( (uint32_t *) (pc + 0), 4 )
- ) );
-}
-
-void __glXDispSwap_Color4usv(GLbyte * pc)
-{
- CALL_Color4usv( GET_DISPATCH(), (
- (const GLushort *)bswap_16_array( (uint16_t *) (pc + 0), 4 )
- ) );
-}
-
-void __glXDispSwap_EdgeFlagv(GLbyte * pc)
-{
- CALL_EdgeFlagv( GET_DISPATCH(), (
- (const GLboolean *)(pc + 0)
- ) );
-}
-
-void __glXDispSwap_End(GLbyte * pc)
-{
- CALL_End( GET_DISPATCH(), () );
-}
-
-void __glXDispSwap_Indexdv(GLbyte * pc)
-{
-#ifdef __GLX_ALIGN64
- if ((unsigned long)(pc) & 7) {
- (void) memmove(pc-4, pc, 8);
- pc -= 4;
- }
-#endif
-
- CALL_Indexdv( GET_DISPATCH(), (
- (const GLdouble *)bswap_64_array( (uint64_t *) (pc + 0), 1 )
- ) );
-}
-
-void __glXDispSwap_Indexfv(GLbyte * pc)
-{
- CALL_Indexfv( GET_DISPATCH(), (
- (const GLfloat *)bswap_32_array( (uint32_t *) (pc + 0), 1 )
- ) );
-}
-
-void __glXDispSwap_Indexiv(GLbyte * pc)
-{
- CALL_Indexiv( GET_DISPATCH(), (
- (const GLint *)bswap_32_array( (uint32_t *) (pc + 0), 1 )
- ) );
-}
-
-void __glXDispSwap_Indexsv(GLbyte * pc)
-{
- CALL_Indexsv( GET_DISPATCH(), (
- (const GLshort *)bswap_16_array( (uint16_t *) (pc + 0), 1 )
- ) );
-}
-
-void __glXDispSwap_Normal3bv(GLbyte * pc)
-{
- CALL_Normal3bv( GET_DISPATCH(), (
- (const GLbyte *)(pc + 0)
- ) );
-}
-
-void __glXDispSwap_Normal3dv(GLbyte * pc)
-{
-#ifdef __GLX_ALIGN64
- if ((unsigned long)(pc) & 7) {
- (void) memmove(pc-4, pc, 24);
- pc -= 4;
- }
-#endif
-
- CALL_Normal3dv( GET_DISPATCH(), (
- (const GLdouble *)bswap_64_array( (uint64_t *) (pc + 0), 3 )
- ) );
-}
-
-void __glXDispSwap_Normal3fv(GLbyte * pc)
-{
- CALL_Normal3fv( GET_DISPATCH(), (
- (const GLfloat *)bswap_32_array( (uint32_t *) (pc + 0), 3 )
- ) );
-}
-
-void __glXDispSwap_Normal3iv(GLbyte * pc)
-{
- CALL_Normal3iv( GET_DISPATCH(), (
- (const GLint *)bswap_32_array( (uint32_t *) (pc + 0), 3 )
- ) );
-}
-
-void __glXDispSwap_Normal3sv(GLbyte * pc)
-{
- CALL_Normal3sv( GET_DISPATCH(), (
- (const GLshort *)bswap_16_array( (uint16_t *) (pc + 0), 3 )
- ) );
-}
-
-void __glXDispSwap_RasterPos2dv(GLbyte * pc)
-{
-#ifdef __GLX_ALIGN64
- if ((unsigned long)(pc) & 7) {
- (void) memmove(pc-4, pc, 16);
- pc -= 4;
- }
-#endif
-
- CALL_RasterPos2dv( GET_DISPATCH(), (
- (const GLdouble *)bswap_64_array( (uint64_t *) (pc + 0), 2 )
- ) );
-}
-
-void __glXDispSwap_RasterPos2fv(GLbyte * pc)
-{
- CALL_RasterPos2fv( GET_DISPATCH(), (
- (const GLfloat *)bswap_32_array( (uint32_t *) (pc + 0), 2 )
- ) );
-}
-
-void __glXDispSwap_RasterPos2iv(GLbyte * pc)
-{
- CALL_RasterPos2iv( GET_DISPATCH(), (
- (const GLint *)bswap_32_array( (uint32_t *) (pc + 0), 2 )
- ) );
-}
-
-void __glXDispSwap_RasterPos2sv(GLbyte * pc)
-{
- CALL_RasterPos2sv( GET_DISPATCH(), (
- (const GLshort *)bswap_16_array( (uint16_t *) (pc + 0), 2 )
- ) );
-}
-
-void __glXDispSwap_RasterPos3dv(GLbyte * pc)
-{
-#ifdef __GLX_ALIGN64
- if ((unsigned long)(pc) & 7) {
- (void) memmove(pc-4, pc, 24);
- pc -= 4;
- }
-#endif
-
- CALL_RasterPos3dv( GET_DISPATCH(), (
- (const GLdouble *)bswap_64_array( (uint64_t *) (pc + 0), 3 )
- ) );
-}
-
-void __glXDispSwap_RasterPos3fv(GLbyte * pc)
-{
- CALL_RasterPos3fv( GET_DISPATCH(), (
- (const GLfloat *)bswap_32_array( (uint32_t *) (pc + 0), 3 )
- ) );
-}
-
-void __glXDispSwap_RasterPos3iv(GLbyte * pc)
-{
- CALL_RasterPos3iv( GET_DISPATCH(), (
- (const GLint *)bswap_32_array( (uint32_t *) (pc + 0), 3 )
- ) );
-}
-
-void __glXDispSwap_RasterPos3sv(GLbyte * pc)
-{
- CALL_RasterPos3sv( GET_DISPATCH(), (
- (const GLshort *)bswap_16_array( (uint16_t *) (pc + 0), 3 )
- ) );
-}
-
-void __glXDispSwap_RasterPos4dv(GLbyte * pc)
-{
-#ifdef __GLX_ALIGN64
- if ((unsigned long)(pc) & 7) {
- (void) memmove(pc-4, pc, 32);
- pc -= 4;
- }
-#endif
-
- CALL_RasterPos4dv( GET_DISPATCH(), (
- (const GLdouble *)bswap_64_array( (uint64_t *) (pc + 0), 4 )
- ) );
-}
-
-void __glXDispSwap_RasterPos4fv(GLbyte * pc)
-{
- CALL_RasterPos4fv( GET_DISPATCH(), (
- (const GLfloat *)bswap_32_array( (uint32_t *) (pc + 0), 4 )
- ) );
-}
-
-void __glXDispSwap_RasterPos4iv(GLbyte * pc)
-{
- CALL_RasterPos4iv( GET_DISPATCH(), (
- (const GLint *)bswap_32_array( (uint32_t *) (pc + 0), 4 )
- ) );
-}
-
-void __glXDispSwap_RasterPos4sv(GLbyte * pc)
-{
- CALL_RasterPos4sv( GET_DISPATCH(), (
- (const GLshort *)bswap_16_array( (uint16_t *) (pc + 0), 4 )
- ) );
-}
-
-void __glXDispSwap_Rectdv(GLbyte * pc)
-{
-#ifdef __GLX_ALIGN64
- if ((unsigned long)(pc) & 7) {
- (void) memmove(pc-4, pc, 32);
- pc -= 4;
- }
-#endif
-
- CALL_Rectdv( GET_DISPATCH(), (
- (const GLdouble *)bswap_64_array( (uint64_t *) (pc + 0), 2 ),
- (const GLdouble *)bswap_64_array( (uint64_t *) (pc + 16), 2 )
- ) );
-}
-
-void __glXDispSwap_Rectfv(GLbyte * pc)
-{
- CALL_Rectfv( GET_DISPATCH(), (
- (const GLfloat *)bswap_32_array( (uint32_t *) (pc + 0), 2 ),
- (const GLfloat *)bswap_32_array( (uint32_t *) (pc + 8), 2 )
- ) );
-}
-
-void __glXDispSwap_Rectiv(GLbyte * pc)
-{
- CALL_Rectiv( GET_DISPATCH(), (
- (const GLint *)bswap_32_array( (uint32_t *) (pc + 0), 2 ),
- (const GLint *)bswap_32_array( (uint32_t *) (pc + 8), 2 )
- ) );
-}
-
-void __glXDispSwap_Rectsv(GLbyte * pc)
-{
- CALL_Rectsv( GET_DISPATCH(), (
- (const GLshort *)bswap_16_array( (uint16_t *) (pc + 0), 2 ),
- (const GLshort *)bswap_16_array( (uint16_t *) (pc + 4), 2 )
- ) );
-}
-
-void __glXDispSwap_TexCoord1dv(GLbyte * pc)
-{
-#ifdef __GLX_ALIGN64
- if ((unsigned long)(pc) & 7) {
- (void) memmove(pc-4, pc, 8);
- pc -= 4;
- }
-#endif
-
- CALL_TexCoord1dv( GET_DISPATCH(), (
- (const GLdouble *)bswap_64_array( (uint64_t *) (pc + 0), 1 )
- ) );
-}
-
-void __glXDispSwap_TexCoord1fv(GLbyte * pc)
-{
- CALL_TexCoord1fv( GET_DISPATCH(), (
- (const GLfloat *)bswap_32_array( (uint32_t *) (pc + 0), 1 )
- ) );
-}
-
-void __glXDispSwap_TexCoord1iv(GLbyte * pc)
-{
- CALL_TexCoord1iv( GET_DISPATCH(), (
- (const GLint *)bswap_32_array( (uint32_t *) (pc + 0), 1 )
- ) );
-}
-
-void __glXDispSwap_TexCoord1sv(GLbyte * pc)
-{
- CALL_TexCoord1sv( GET_DISPATCH(), (
- (const GLshort *)bswap_16_array( (uint16_t *) (pc + 0), 1 )
- ) );
-}
-
-void __glXDispSwap_TexCoord2dv(GLbyte * pc)
-{
-#ifdef __GLX_ALIGN64
- if ((unsigned long)(pc) & 7) {
- (void) memmove(pc-4, pc, 16);
- pc -= 4;
- }
-#endif
-
- CALL_TexCoord2dv( GET_DISPATCH(), (
- (const GLdouble *)bswap_64_array( (uint64_t *) (pc + 0), 2 )
- ) );
-}
-
-void __glXDispSwap_TexCoord2fv(GLbyte * pc)
-{
- CALL_TexCoord2fv( GET_DISPATCH(), (
- (const GLfloat *)bswap_32_array( (uint32_t *) (pc + 0), 2 )
- ) );
-}
-
-void __glXDispSwap_TexCoord2iv(GLbyte * pc)
-{
- CALL_TexCoord2iv( GET_DISPATCH(), (
- (const GLint *)bswap_32_array( (uint32_t *) (pc + 0), 2 )
- ) );
-}
-
-void __glXDispSwap_TexCoord2sv(GLbyte * pc)
-{
- CALL_TexCoord2sv( GET_DISPATCH(), (
- (const GLshort *)bswap_16_array( (uint16_t *) (pc + 0), 2 )
- ) );
-}
-
-void __glXDispSwap_TexCoord3dv(GLbyte * pc)
-{
-#ifdef __GLX_ALIGN64
- if ((unsigned long)(pc) & 7) {
- (void) memmove(pc-4, pc, 24);
- pc -= 4;
- }
-#endif
-
- CALL_TexCoord3dv( GET_DISPATCH(), (
- (const GLdouble *)bswap_64_array( (uint64_t *) (pc + 0), 3 )
- ) );
-}
-
-void __glXDispSwap_TexCoord3fv(GLbyte * pc)
-{
- CALL_TexCoord3fv( GET_DISPATCH(), (
- (const GLfloat *)bswap_32_array( (uint32_t *) (pc + 0), 3 )
- ) );
-}
-
-void __glXDispSwap_TexCoord3iv(GLbyte * pc)
-{
- CALL_TexCoord3iv( GET_DISPATCH(), (
- (const GLint *)bswap_32_array( (uint32_t *) (pc + 0), 3 )
- ) );
-}
-
-void __glXDispSwap_TexCoord3sv(GLbyte * pc)
-{
- CALL_TexCoord3sv( GET_DISPATCH(), (
- (const GLshort *)bswap_16_array( (uint16_t *) (pc + 0), 3 )
- ) );
-}
-
-void __glXDispSwap_TexCoord4dv(GLbyte * pc)
-{
-#ifdef __GLX_ALIGN64
- if ((unsigned long)(pc) & 7) {
- (void) memmove(pc-4, pc, 32);
- pc -= 4;
- }
-#endif
-
- CALL_TexCoord4dv( GET_DISPATCH(), (
- (const GLdouble *)bswap_64_array( (uint64_t *) (pc + 0), 4 )
- ) );
-}
-
-void __glXDispSwap_TexCoord4fv(GLbyte * pc)
-{
- CALL_TexCoord4fv( GET_DISPATCH(), (
- (const GLfloat *)bswap_32_array( (uint32_t *) (pc + 0), 4 )
- ) );
-}
-
-void __glXDispSwap_TexCoord4iv(GLbyte * pc)
-{
- CALL_TexCoord4iv( GET_DISPATCH(), (
- (const GLint *)bswap_32_array( (uint32_t *) (pc + 0), 4 )
- ) );
-}
-
-void __glXDispSwap_TexCoord4sv(GLbyte * pc)
-{
- CALL_TexCoord4sv( GET_DISPATCH(), (
- (const GLshort *)bswap_16_array( (uint16_t *) (pc + 0), 4 )
- ) );
-}
-
-void __glXDispSwap_Vertex2dv(GLbyte * pc)
-{
-#ifdef __GLX_ALIGN64
- if ((unsigned long)(pc) & 7) {
- (void) memmove(pc-4, pc, 16);
- pc -= 4;
- }
-#endif
-
- CALL_Vertex2dv( GET_DISPATCH(), (
- (const GLdouble *)bswap_64_array( (uint64_t *) (pc + 0), 2 )
- ) );
-}
-
-void __glXDispSwap_Vertex2fv(GLbyte * pc)
-{
- CALL_Vertex2fv( GET_DISPATCH(), (
- (const GLfloat *)bswap_32_array( (uint32_t *) (pc + 0), 2 )
- ) );
-}
-
-void __glXDispSwap_Vertex2iv(GLbyte * pc)
-{
- CALL_Vertex2iv( GET_DISPATCH(), (
- (const GLint *)bswap_32_array( (uint32_t *) (pc + 0), 2 )
- ) );
-}
-
-void __glXDispSwap_Vertex2sv(GLbyte * pc)
-{
- CALL_Vertex2sv( GET_DISPATCH(), (
- (const GLshort *)bswap_16_array( (uint16_t *) (pc + 0), 2 )
- ) );
-}
-
-void __glXDispSwap_Vertex3dv(GLbyte * pc)
-{
-#ifdef __GLX_ALIGN64
- if ((unsigned long)(pc) & 7) {
- (void) memmove(pc-4, pc, 24);
- pc -= 4;
- }
-#endif
-
- CALL_Vertex3dv( GET_DISPATCH(), (
- (const GLdouble *)bswap_64_array( (uint64_t *) (pc + 0), 3 )
- ) );
-}
-
-void __glXDispSwap_Vertex3fv(GLbyte * pc)
-{
- CALL_Vertex3fv( GET_DISPATCH(), (
- (const GLfloat *)bswap_32_array( (uint32_t *) (pc + 0), 3 )
- ) );
-}
-
-void __glXDispSwap_Vertex3iv(GLbyte * pc)
-{
- CALL_Vertex3iv( GET_DISPATCH(), (
- (const GLint *)bswap_32_array( (uint32_t *) (pc + 0), 3 )
- ) );
-}
-
-void __glXDispSwap_Vertex3sv(GLbyte * pc)
-{
- CALL_Vertex3sv( GET_DISPATCH(), (
- (const GLshort *)bswap_16_array( (uint16_t *) (pc + 0), 3 )
- ) );
-}
-
-void __glXDispSwap_Vertex4dv(GLbyte * pc)
-{
-#ifdef __GLX_ALIGN64
- if ((unsigned long)(pc) & 7) {
- (void) memmove(pc-4, pc, 32);
- pc -= 4;
- }
-#endif
-
- CALL_Vertex4dv( GET_DISPATCH(), (
- (const GLdouble *)bswap_64_array( (uint64_t *) (pc + 0), 4 )
- ) );
-}
-
-void __glXDispSwap_Vertex4fv(GLbyte * pc)
-{
- CALL_Vertex4fv( GET_DISPATCH(), (
- (const GLfloat *)bswap_32_array( (uint32_t *) (pc + 0), 4 )
- ) );
-}
-
-void __glXDispSwap_Vertex4iv(GLbyte * pc)
-{
- CALL_Vertex4iv( GET_DISPATCH(), (
- (const GLint *)bswap_32_array( (uint32_t *) (pc + 0), 4 )
- ) );
-}
-
-void __glXDispSwap_Vertex4sv(GLbyte * pc)
-{
- CALL_Vertex4sv( GET_DISPATCH(), (
- (const GLshort *)bswap_16_array( (uint16_t *) (pc + 0), 4 )
- ) );
-}
-
-void __glXDispSwap_ClipPlane(GLbyte * pc)
-{
-#ifdef __GLX_ALIGN64
- if ((unsigned long)(pc) & 7) {
- (void) memmove(pc-4, pc, 36);
- pc -= 4;
- }
-#endif
-
- CALL_ClipPlane( GET_DISPATCH(), (
- (GLenum )bswap_ENUM ( pc + 32 ),
- (const GLdouble *)bswap_64_array( (uint64_t *) (pc + 0), 4 )
- ) );
-}
-
-void __glXDispSwap_ColorMaterial(GLbyte * pc)
-{
- CALL_ColorMaterial( GET_DISPATCH(), (
- (GLenum )bswap_ENUM ( pc + 0 ),
- (GLenum )bswap_ENUM ( pc + 4 )
- ) );
-}
-
-void __glXDispSwap_CullFace(GLbyte * pc)
-{
- CALL_CullFace( GET_DISPATCH(), (
- (GLenum )bswap_ENUM ( pc + 0 )
- ) );
-}
-
-void __glXDispSwap_Fogf(GLbyte * pc)
-{
- CALL_Fogf( GET_DISPATCH(), (
- (GLenum )bswap_ENUM ( pc + 0 ),
- (GLfloat )bswap_FLOAT32( pc + 4 )
- ) );
-}
-
-void __glXDispSwap_Fogfv(GLbyte * pc)
-{
- const GLenum pname = (GLenum )bswap_ENUM ( pc + 0 );
- const GLfloat * params;
-
- params = (const GLfloat *) bswap_32_array( (uint32_t *) (pc + 4), __glFogfv_size(pname) );
-
- CALL_Fogfv( GET_DISPATCH(), (
- pname,
- params
- ) );
-}
-
-void __glXDispSwap_Fogi(GLbyte * pc)
-{
- CALL_Fogi( GET_DISPATCH(), (
- (GLenum )bswap_ENUM ( pc + 0 ),
- (GLint )bswap_CARD32 ( pc + 4 )
- ) );
-}
-
-void __glXDispSwap_Fogiv(GLbyte * pc)
-{
- const GLenum pname = (GLenum )bswap_ENUM ( pc + 0 );
- const GLint * params;
-
- params = (const GLint *) bswap_32_array( (uint32_t *) (pc + 4), __glFogiv_size(pname) );
-
- CALL_Fogiv( GET_DISPATCH(), (
- pname,
- params
- ) );
-}
-
-void __glXDispSwap_FrontFace(GLbyte * pc)
-{
- CALL_FrontFace( GET_DISPATCH(), (
- (GLenum )bswap_ENUM ( pc + 0 )
- ) );
-}
-
-void __glXDispSwap_Hint(GLbyte * pc)
-{
- CALL_Hint( GET_DISPATCH(), (
- (GLenum )bswap_ENUM ( pc + 0 ),
- (GLenum )bswap_ENUM ( pc + 4 )
- ) );
-}
-
-void __glXDispSwap_Lightf(GLbyte * pc)
-{
- CALL_Lightf( GET_DISPATCH(), (
- (GLenum )bswap_ENUM ( pc + 0 ),
- (GLenum )bswap_ENUM ( pc + 4 ),
- (GLfloat )bswap_FLOAT32( pc + 8 )
- ) );
-}
-
-void __glXDispSwap_Lightfv(GLbyte * pc)
-{
- const GLenum pname = (GLenum )bswap_ENUM ( pc + 4 );
- const GLfloat * params;
-
- params = (const GLfloat *) bswap_32_array( (uint32_t *) (pc + 8), __glLightfv_size(pname) );
-
- CALL_Lightfv( GET_DISPATCH(), (
- (GLenum )bswap_ENUM ( pc + 0 ),
- pname,
- params
- ) );
-}
-
-void __glXDispSwap_Lighti(GLbyte * pc)
-{
- CALL_Lighti( GET_DISPATCH(), (
- (GLenum )bswap_ENUM ( pc + 0 ),
- (GLenum )bswap_ENUM ( pc + 4 ),
- (GLint )bswap_CARD32 ( pc + 8 )
- ) );
-}
-
-void __glXDispSwap_Lightiv(GLbyte * pc)
-{
- const GLenum pname = (GLenum )bswap_ENUM ( pc + 4 );
- const GLint * params;
-
- params = (const GLint *) bswap_32_array( (uint32_t *) (pc + 8), __glLightiv_size(pname) );
-
- CALL_Lightiv( GET_DISPATCH(), (
- (GLenum )bswap_ENUM ( pc + 0 ),
- pname,
- params
- ) );
-}
-
-void __glXDispSwap_LightModelf(GLbyte * pc)
-{
- CALL_LightModelf( GET_DISPATCH(), (
- (GLenum )bswap_ENUM ( pc + 0 ),
- (GLfloat )bswap_FLOAT32( pc + 4 )
- ) );
-}
-
-void __glXDispSwap_LightModelfv(GLbyte * pc)
-{
- const GLenum pname = (GLenum )bswap_ENUM ( pc + 0 );
- const GLfloat * params;
-
- params = (const GLfloat *) bswap_32_array( (uint32_t *) (pc + 4), __glLightModelfv_size(pname) );
-
- CALL_LightModelfv( GET_DISPATCH(), (
- pname,
- params
- ) );
-}
-
-void __glXDispSwap_LightModeli(GLbyte * pc)
-{
- CALL_LightModeli( GET_DISPATCH(), (
- (GLenum )bswap_ENUM ( pc + 0 ),
- (GLint )bswap_CARD32 ( pc + 4 )
- ) );
-}
-
-void __glXDispSwap_LightModeliv(GLbyte * pc)
-{
- const GLenum pname = (GLenum )bswap_ENUM ( pc + 0 );
- const GLint * params;
-
- params = (const GLint *) bswap_32_array( (uint32_t *) (pc + 4), __glLightModeliv_size(pname) );
-
- CALL_LightModeliv( GET_DISPATCH(), (
- pname,
- params
- ) );
-}
-
-void __glXDispSwap_LineStipple(GLbyte * pc)
-{
- CALL_LineStipple( GET_DISPATCH(), (
- (GLint )bswap_CARD32 ( pc + 0 ),
- (GLushort)bswap_CARD16 ( pc + 4 )
- ) );
-}
-
-void __glXDispSwap_LineWidth(GLbyte * pc)
-{
- CALL_LineWidth( GET_DISPATCH(), (
- (GLfloat )bswap_FLOAT32( pc + 0 )
- ) );
-}
-
-void __glXDispSwap_Materialf(GLbyte * pc)
-{
- CALL_Materialf( GET_DISPATCH(), (
- (GLenum )bswap_ENUM ( pc + 0 ),
- (GLenum )bswap_ENUM ( pc + 4 ),
- (GLfloat )bswap_FLOAT32( pc + 8 )
- ) );
-}
-
-void __glXDispSwap_Materialfv(GLbyte * pc)
-{
- const GLenum pname = (GLenum )bswap_ENUM ( pc + 4 );
- const GLfloat * params;
-
- params = (const GLfloat *) bswap_32_array( (uint32_t *) (pc + 8), __glMaterialfv_size(pname) );
-
- CALL_Materialfv( GET_DISPATCH(), (
- (GLenum )bswap_ENUM ( pc + 0 ),
- pname,
- params
- ) );
-}
-
-void __glXDispSwap_Materiali(GLbyte * pc)
-{
- CALL_Materiali( GET_DISPATCH(), (
- (GLenum )bswap_ENUM ( pc + 0 ),
- (GLenum )bswap_ENUM ( pc + 4 ),
- (GLint )bswap_CARD32 ( pc + 8 )
- ) );
-}
-
-void __glXDispSwap_Materialiv(GLbyte * pc)
-{
- const GLenum pname = (GLenum )bswap_ENUM ( pc + 4 );
- const GLint * params;
-
- params = (const GLint *) bswap_32_array( (uint32_t *) (pc + 8), __glMaterialiv_size(pname) );
-
- CALL_Materialiv( GET_DISPATCH(), (
- (GLenum )bswap_ENUM ( pc + 0 ),
- pname,
- params
- ) );
-}
-
-void __glXDispSwap_PointSize(GLbyte * pc)
-{
- CALL_PointSize( GET_DISPATCH(), (
- (GLfloat )bswap_FLOAT32( pc + 0 )
- ) );
-}
-
-void __glXDispSwap_PolygonMode(GLbyte * pc)
-{
- CALL_PolygonMode( GET_DISPATCH(), (
- (GLenum )bswap_ENUM ( pc + 0 ),
- (GLenum )bswap_ENUM ( pc + 4 )
- ) );
-}
-
-void __glXDispSwap_PolygonStipple(GLbyte * pc)
-{
- const GLubyte * const mask = (const GLubyte *) (pc + 20);
- __GLXpixelHeader * const hdr = (__GLXpixelHeader *)(pc);
-
- CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_LSB_FIRST, hdr->lsbFirst) );
- CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_ROW_LENGTH, (GLint) bswap_CARD32( & hdr->rowLength )) );
- CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_ROWS, (GLint) bswap_CARD32( & hdr->skipRows )) );
- CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_PIXELS, (GLint) bswap_CARD32( & hdr->skipPixels )) );
- CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_ALIGNMENT, (GLint) bswap_CARD32( & hdr->alignment )) );
-
- CALL_PolygonStipple( GET_DISPATCH(), (
- mask
- ) );
-}
-
-void __glXDispSwap_Scissor(GLbyte * pc)
-{
- CALL_Scissor( GET_DISPATCH(), (
- (GLint )bswap_CARD32 ( pc + 0 ),
- (GLint )bswap_CARD32 ( pc + 4 ),
- (GLsizei )bswap_CARD32 ( pc + 8 ),
- (GLsizei )bswap_CARD32 ( pc + 12 )
- ) );
-}
-
-void __glXDispSwap_ShadeModel(GLbyte * pc)
-{
- CALL_ShadeModel( GET_DISPATCH(), (
- (GLenum )bswap_ENUM ( pc + 0 )
- ) );
-}
-
-void __glXDispSwap_TexParameterf(GLbyte * pc)
-{
- CALL_TexParameterf( GET_DISPATCH(), (
- (GLenum )bswap_ENUM ( pc + 0 ),
- (GLenum )bswap_ENUM ( pc + 4 ),
- (GLfloat )bswap_FLOAT32( pc + 8 )
- ) );
-}
-
-void __glXDispSwap_TexParameterfv(GLbyte * pc)
-{
- const GLenum pname = (GLenum )bswap_ENUM ( pc + 4 );
- const GLfloat * params;
-
- params = (const GLfloat *) bswap_32_array( (uint32_t *) (pc + 8), __glTexParameterfv_size(pname) );
-
- CALL_TexParameterfv( GET_DISPATCH(), (
- (GLenum )bswap_ENUM ( pc + 0 ),
- pname,
- params
- ) );
-}
-
-void __glXDispSwap_TexParameteri(GLbyte * pc)
-{
- CALL_TexParameteri( GET_DISPATCH(), (
- (GLenum )bswap_ENUM ( pc + 0 ),
- (GLenum )bswap_ENUM ( pc + 4 ),
- (GLint )bswap_CARD32 ( pc + 8 )
- ) );
-}
-
-void __glXDispSwap_TexParameteriv(GLbyte * pc)
-{
- const GLenum pname = (GLenum )bswap_ENUM ( pc + 4 );
- const GLint * params;
-
- params = (const GLint *) bswap_32_array( (uint32_t *) (pc + 8), __glTexParameteriv_size(pname) );
-
- CALL_TexParameteriv( GET_DISPATCH(), (
- (GLenum )bswap_ENUM ( pc + 0 ),
- pname,
- params
- ) );
-}
-
-void __glXDispSwap_TexImage1D(GLbyte * pc)
-{
- const GLvoid * const pixels = (const GLvoid *) (pc + 52);
- __GLXpixelHeader * const hdr = (__GLXpixelHeader *)(pc);
-
- CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SWAP_BYTES, hdr->swapBytes) );
- CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_LSB_FIRST, hdr->lsbFirst) );
- CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_ROW_LENGTH, (GLint) bswap_CARD32( & hdr->rowLength )) );
- CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_ROWS, (GLint) bswap_CARD32( & hdr->skipRows )) );
- CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_PIXELS, (GLint) bswap_CARD32( & hdr->skipPixels )) );
- CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_ALIGNMENT, (GLint) bswap_CARD32( & hdr->alignment )) );
-
- CALL_TexImage1D( GET_DISPATCH(), (
- (GLenum )bswap_ENUM ( pc + 20 ),
- (GLint )bswap_CARD32 ( pc + 24 ),
- (GLint )bswap_CARD32 ( pc + 28 ),
- (GLsizei )bswap_CARD32 ( pc + 32 ),
- (GLint )bswap_CARD32 ( pc + 40 ),
- (GLenum )bswap_ENUM ( pc + 44 ),
- (GLenum )bswap_ENUM ( pc + 48 ),
- pixels
- ) );
-}
-
-void __glXDispSwap_TexImage2D(GLbyte * pc)
-{
- const GLvoid * const pixels = (const GLvoid *) (pc + 52);
- __GLXpixelHeader * const hdr = (__GLXpixelHeader *)(pc);
-
- CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SWAP_BYTES, hdr->swapBytes) );
- CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_LSB_FIRST, hdr->lsbFirst) );
- CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_ROW_LENGTH, (GLint) bswap_CARD32( & hdr->rowLength )) );
- CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_ROWS, (GLint) bswap_CARD32( & hdr->skipRows )) );
- CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_PIXELS, (GLint) bswap_CARD32( & hdr->skipPixels )) );
- CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_ALIGNMENT, (GLint) bswap_CARD32( & hdr->alignment )) );
-
- CALL_TexImage2D( GET_DISPATCH(), (
- (GLenum )bswap_ENUM ( pc + 20 ),
- (GLint )bswap_CARD32 ( pc + 24 ),
- (GLint )bswap_CARD32 ( pc + 28 ),
- (GLsizei )bswap_CARD32 ( pc + 32 ),
- (GLsizei )bswap_CARD32 ( pc + 36 ),
- (GLint )bswap_CARD32 ( pc + 40 ),
- (GLenum )bswap_ENUM ( pc + 44 ),
- (GLenum )bswap_ENUM ( pc + 48 ),
- pixels
- ) );
-}
-
-void __glXDispSwap_TexEnvf(GLbyte * pc)
-{
- CALL_TexEnvf( GET_DISPATCH(), (
- (GLenum )bswap_ENUM ( pc + 0 ),
- (GLenum )bswap_ENUM ( pc + 4 ),
- (GLfloat )bswap_FLOAT32( pc + 8 )
- ) );
-}
-
-void __glXDispSwap_TexEnvfv(GLbyte * pc)
-{
- const GLenum pname = (GLenum )bswap_ENUM ( pc + 4 );
- const GLfloat * params;
-
- params = (const GLfloat *) bswap_32_array( (uint32_t *) (pc + 8), __glTexEnvfv_size(pname) );
-
- CALL_TexEnvfv( GET_DISPATCH(), (
- (GLenum )bswap_ENUM ( pc + 0 ),
- pname,
- params
- ) );
-}
-
-void __glXDispSwap_TexEnvi(GLbyte * pc)
-{
- CALL_TexEnvi( GET_DISPATCH(), (
- (GLenum )bswap_ENUM ( pc + 0 ),
- (GLenum )bswap_ENUM ( pc + 4 ),
- (GLint )bswap_CARD32 ( pc + 8 )
- ) );
-}
-
-void __glXDispSwap_TexEnviv(GLbyte * pc)
-{
- const GLenum pname = (GLenum )bswap_ENUM ( pc + 4 );
- const GLint * params;
-
- params = (const GLint *) bswap_32_array( (uint32_t *) (pc + 8), __glTexEnviv_size(pname) );
-
- CALL_TexEnviv( GET_DISPATCH(), (
- (GLenum )bswap_ENUM ( pc + 0 ),
- pname,
- params
- ) );
-}
-
-void __glXDispSwap_TexGend(GLbyte * pc)
-{
-#ifdef __GLX_ALIGN64
- if ((unsigned long)(pc) & 7) {
- (void) memmove(pc-4, pc, 16);
- pc -= 4;
- }
-#endif
-
- CALL_TexGend( GET_DISPATCH(), (
- (GLenum )bswap_ENUM ( pc + 8 ),
- (GLenum )bswap_ENUM ( pc + 12 ),
- (GLdouble)bswap_FLOAT64( pc + 0 )
- ) );
-}
-
-void __glXDispSwap_TexGendv(GLbyte * pc)
-{
- const GLenum pname = (GLenum )bswap_ENUM ( pc + 4 );
- const GLdouble * params;
-
-#ifdef __GLX_ALIGN64
- const GLuint compsize = __glTexGendv_size(pname);
- const GLuint cmdlen = 12 + __GLX_PAD((compsize * 8)) - 4;
- if ((unsigned long)(pc) & 7) {
- (void) memmove(pc-4, pc, cmdlen);
- pc -= 4;
- }
-#endif
-
- params = (const GLdouble *) bswap_64_array( (uint64_t *) (pc + 8), __glTexGendv_size(pname) );
-
- CALL_TexGendv( GET_DISPATCH(), (
- (GLenum )bswap_ENUM ( pc + 0 ),
- pname,
- params
- ) );
-}
-
-void __glXDispSwap_TexGenf(GLbyte * pc)
-{
- CALL_TexGenf( GET_DISPATCH(), (
- (GLenum )bswap_ENUM ( pc + 0 ),
- (GLenum )bswap_ENUM ( pc + 4 ),
- (GLfloat )bswap_FLOAT32( pc + 8 )
- ) );
-}
-
-void __glXDispSwap_TexGenfv(GLbyte * pc)
-{
- const GLenum pname = (GLenum )bswap_ENUM ( pc + 4 );
- const GLfloat * params;
-
- params = (const GLfloat *) bswap_32_array( (uint32_t *) (pc + 8), __glTexGenfv_size(pname) );
-
- CALL_TexGenfv( GET_DISPATCH(), (
- (GLenum )bswap_ENUM ( pc + 0 ),
- pname,
- params
- ) );
-}
-
-void __glXDispSwap_TexGeni(GLbyte * pc)
-{
- CALL_TexGeni( GET_DISPATCH(), (
- (GLenum )bswap_ENUM ( pc + 0 ),
- (GLenum )bswap_ENUM ( pc + 4 ),
- (GLint )bswap_CARD32 ( pc + 8 )
- ) );
-}
-
-void __glXDispSwap_TexGeniv(GLbyte * pc)
-{
- const GLenum pname = (GLenum )bswap_ENUM ( pc + 4 );
- const GLint * params;
-
- params = (const GLint *) bswap_32_array( (uint32_t *) (pc + 8), __glTexGeniv_size(pname) );
-
- CALL_TexGeniv( GET_DISPATCH(), (
- (GLenum )bswap_ENUM ( pc + 0 ),
- pname,
- params
- ) );
-}
-
-void __glXDispSwap_InitNames(GLbyte * pc)
-{
- CALL_InitNames( GET_DISPATCH(), () );
-}
-
-void __glXDispSwap_LoadName(GLbyte * pc)
-{
- CALL_LoadName( GET_DISPATCH(), (
- (GLuint )bswap_CARD32 ( pc + 0 )
- ) );
-}
-
-void __glXDispSwap_PassThrough(GLbyte * pc)
-{
- CALL_PassThrough( GET_DISPATCH(), (
- (GLfloat )bswap_FLOAT32( pc + 0 )
- ) );
-}
-
-void __glXDispSwap_PopName(GLbyte * pc)
-{
- CALL_PopName( GET_DISPATCH(), () );
-}
-
-void __glXDispSwap_PushName(GLbyte * pc)
-{
- CALL_PushName( GET_DISPATCH(), (
- (GLuint )bswap_CARD32 ( pc + 0 )
- ) );
-}
-
-void __glXDispSwap_DrawBuffer(GLbyte * pc)
-{
- CALL_DrawBuffer( GET_DISPATCH(), (
- (GLenum )bswap_ENUM ( pc + 0 )
- ) );
-}
-
-void __glXDispSwap_Clear(GLbyte * pc)
-{
- CALL_Clear( GET_DISPATCH(), (
- (GLbitfield)bswap_CARD32 ( pc + 0 )
- ) );
-}
-
-void __glXDispSwap_ClearAccum(GLbyte * pc)
-{
- CALL_ClearAccum( GET_DISPATCH(), (
- (GLfloat )bswap_FLOAT32( pc + 0 ),
- (GLfloat )bswap_FLOAT32( pc + 4 ),
- (GLfloat )bswap_FLOAT32( pc + 8 ),
- (GLfloat )bswap_FLOAT32( pc + 12 )
- ) );
-}
-
-void __glXDispSwap_ClearIndex(GLbyte * pc)
-{
- CALL_ClearIndex( GET_DISPATCH(), (
- (GLfloat )bswap_FLOAT32( pc + 0 )
- ) );
-}
-
-void __glXDispSwap_ClearColor(GLbyte * pc)
-{
- CALL_ClearColor( GET_DISPATCH(), (
- (GLclampf)bswap_FLOAT32( pc + 0 ),
- (GLclampf)bswap_FLOAT32( pc + 4 ),
- (GLclampf)bswap_FLOAT32( pc + 8 ),
- (GLclampf)bswap_FLOAT32( pc + 12 )
- ) );
-}
-
-void __glXDispSwap_ClearStencil(GLbyte * pc)
-{
- CALL_ClearStencil( GET_DISPATCH(), (
- (GLint )bswap_CARD32 ( pc + 0 )
- ) );
-}
-
-void __glXDispSwap_ClearDepth(GLbyte * pc)
-{
-#ifdef __GLX_ALIGN64
- if ((unsigned long)(pc) & 7) {
- (void) memmove(pc-4, pc, 8);
- pc -= 4;
- }
-#endif
-
- CALL_ClearDepth( GET_DISPATCH(), (
- (GLclampd)bswap_FLOAT64( pc + 0 )
- ) );
-}
-
-void __glXDispSwap_StencilMask(GLbyte * pc)
-{
- CALL_StencilMask( GET_DISPATCH(), (
- (GLuint )bswap_CARD32 ( pc + 0 )
- ) );
-}
-
-void __glXDispSwap_ColorMask(GLbyte * pc)
-{
- CALL_ColorMask( GET_DISPATCH(), (
- *(GLboolean *)(pc + 0),
- *(GLboolean *)(pc + 1),
- *(GLboolean *)(pc + 2),
- *(GLboolean *)(pc + 3)
- ) );
-}
-
-void __glXDispSwap_DepthMask(GLbyte * pc)
-{
- CALL_DepthMask( GET_DISPATCH(), (
- *(GLboolean *)(pc + 0)
- ) );
-}
-
-void __glXDispSwap_IndexMask(GLbyte * pc)
-{
- CALL_IndexMask( GET_DISPATCH(), (
- (GLuint )bswap_CARD32 ( pc + 0 )
- ) );
-}
-
-void __glXDispSwap_Accum(GLbyte * pc)
-{
- CALL_Accum( GET_DISPATCH(), (
- (GLenum )bswap_ENUM ( pc + 0 ),
- (GLfloat )bswap_FLOAT32( pc + 4 )
- ) );
-}
-
-void __glXDispSwap_Disable(GLbyte * pc)
-{
- CALL_Disable( GET_DISPATCH(), (
- (GLenum )bswap_ENUM ( pc + 0 )
- ) );
-}
-
-void __glXDispSwap_Enable(GLbyte * pc)
-{
- CALL_Enable( GET_DISPATCH(), (
- (GLenum )bswap_ENUM ( pc + 0 )
- ) );
-}
-
-void __glXDispSwap_PopAttrib(GLbyte * pc)
-{
- CALL_PopAttrib( GET_DISPATCH(), () );
-}
-
-void __glXDispSwap_PushAttrib(GLbyte * pc)
-{
- CALL_PushAttrib( GET_DISPATCH(), (
- (GLbitfield)bswap_CARD32 ( pc + 0 )
- ) );
-}
-
-void __glXDispSwap_MapGrid1d(GLbyte * pc)
-{
-#ifdef __GLX_ALIGN64
- if ((unsigned long)(pc) & 7) {
- (void) memmove(pc-4, pc, 20);
- pc -= 4;
- }
-#endif
-
- CALL_MapGrid1d( GET_DISPATCH(), (
- (GLint )bswap_CARD32 ( pc + 16 ),
- (GLdouble)bswap_FLOAT64( pc + 0 ),
- (GLdouble)bswap_FLOAT64( pc + 8 )
- ) );
-}
-
-void __glXDispSwap_MapGrid1f(GLbyte * pc)
-{
- CALL_MapGrid1f( GET_DISPATCH(), (
- (GLint )bswap_CARD32 ( pc + 0 ),
- (GLfloat )bswap_FLOAT32( pc + 4 ),
- (GLfloat )bswap_FLOAT32( pc + 8 )
- ) );
-}
-
-void __glXDispSwap_MapGrid2d(GLbyte * pc)
-{
-#ifdef __GLX_ALIGN64
- if ((unsigned long)(pc) & 7) {
- (void) memmove(pc-4, pc, 40);
- pc -= 4;
- }
-#endif
-
- CALL_MapGrid2d( GET_DISPATCH(), (
- (GLint )bswap_CARD32 ( pc + 32 ),
- (GLdouble)bswap_FLOAT64( pc + 0 ),
- (GLdouble)bswap_FLOAT64( pc + 8 ),
- (GLint )bswap_CARD32 ( pc + 36 ),
- (GLdouble)bswap_FLOAT64( pc + 16 ),
- (GLdouble)bswap_FLOAT64( pc + 24 )
- ) );
-}
-
-void __glXDispSwap_MapGrid2f(GLbyte * pc)
-{
- CALL_MapGrid2f( GET_DISPATCH(), (
- (GLint )bswap_CARD32 ( pc + 0 ),
- (GLfloat )bswap_FLOAT32( pc + 4 ),
- (GLfloat )bswap_FLOAT32( pc + 8 ),
- (GLint )bswap_CARD32 ( pc + 12 ),
- (GLfloat )bswap_FLOAT32( pc + 16 ),
- (GLfloat )bswap_FLOAT32( pc + 20 )
- ) );
-}
-
-void __glXDispSwap_EvalCoord1dv(GLbyte * pc)
-{
-#ifdef __GLX_ALIGN64
- if ((unsigned long)(pc) & 7) {
- (void) memmove(pc-4, pc, 8);
- pc -= 4;
- }
-#endif
-
- CALL_EvalCoord1dv( GET_DISPATCH(), (
- (const GLdouble *)bswap_64_array( (uint64_t *) (pc + 0), 1 )
- ) );
-}
-
-void __glXDispSwap_EvalCoord1fv(GLbyte * pc)
-{
- CALL_EvalCoord1fv( GET_DISPATCH(), (
- (const GLfloat *)bswap_32_array( (uint32_t *) (pc + 0), 1 )
- ) );
-}
-
-void __glXDispSwap_EvalCoord2dv(GLbyte * pc)
-{
-#ifdef __GLX_ALIGN64
- if ((unsigned long)(pc) & 7) {
- (void) memmove(pc-4, pc, 16);
- pc -= 4;
- }
-#endif
-
- CALL_EvalCoord2dv( GET_DISPATCH(), (
- (const GLdouble *)bswap_64_array( (uint64_t *) (pc + 0), 2 )
- ) );
-}
-
-void __glXDispSwap_EvalCoord2fv(GLbyte * pc)
-{
- CALL_EvalCoord2fv( GET_DISPATCH(), (
- (const GLfloat *)bswap_32_array( (uint32_t *) (pc + 0), 2 )
- ) );
-}
-
-void __glXDispSwap_EvalMesh1(GLbyte * pc)
-{
- CALL_EvalMesh1( GET_DISPATCH(), (
- (GLenum )bswap_ENUM ( pc + 0 ),
- (GLint )bswap_CARD32 ( pc + 4 ),
- (GLint )bswap_CARD32 ( pc + 8 )
- ) );
-}
-
-void __glXDispSwap_EvalPoint1(GLbyte * pc)
-{
- CALL_EvalPoint1( GET_DISPATCH(), (
- (GLint )bswap_CARD32 ( pc + 0 )
- ) );
-}
-
-void __glXDispSwap_EvalMesh2(GLbyte * pc)
-{
- CALL_EvalMesh2( 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 )
- ) );
-}
-
-void __glXDispSwap_EvalPoint2(GLbyte * pc)
-{
- CALL_EvalPoint2( GET_DISPATCH(), (
- (GLint )bswap_CARD32 ( pc + 0 ),
- (GLint )bswap_CARD32 ( pc + 4 )
- ) );
-}
-
-void __glXDispSwap_AlphaFunc(GLbyte * pc)
-{
- CALL_AlphaFunc( GET_DISPATCH(), (
- (GLenum )bswap_ENUM ( pc + 0 ),
- (GLclampf)bswap_FLOAT32( pc + 4 )
- ) );
-}
-
-void __glXDispSwap_BlendFunc(GLbyte * pc)
-{
- CALL_BlendFunc( GET_DISPATCH(), (
- (GLenum )bswap_ENUM ( pc + 0 ),
- (GLenum )bswap_ENUM ( pc + 4 )
- ) );
-}
-
-void __glXDispSwap_LogicOp(GLbyte * pc)
-{
- CALL_LogicOp( GET_DISPATCH(), (
- (GLenum )bswap_ENUM ( pc + 0 )
- ) );
-}
-
-void __glXDispSwap_StencilFunc(GLbyte * pc)
-{
- CALL_StencilFunc( GET_DISPATCH(), (
- (GLenum )bswap_ENUM ( pc + 0 ),
- (GLint )bswap_CARD32 ( pc + 4 ),
- (GLuint )bswap_CARD32 ( pc + 8 )
- ) );
-}
-
-void __glXDispSwap_StencilOp(GLbyte * pc)
-{
- CALL_StencilOp( GET_DISPATCH(), (
- (GLenum )bswap_ENUM ( pc + 0 ),
- (GLenum )bswap_ENUM ( pc + 4 ),
- (GLenum )bswap_ENUM ( pc + 8 )
- ) );
-}
-
-void __glXDispSwap_DepthFunc(GLbyte * pc)
-{
- CALL_DepthFunc( GET_DISPATCH(), (
- (GLenum )bswap_ENUM ( pc + 0 )
- ) );
-}
-
-void __glXDispSwap_PixelZoom(GLbyte * pc)
-{
- CALL_PixelZoom( GET_DISPATCH(), (
- (GLfloat )bswap_FLOAT32( pc + 0 ),
- (GLfloat )bswap_FLOAT32( pc + 4 )
- ) );
-}
-
-void __glXDispSwap_PixelTransferf(GLbyte * pc)
-{
- CALL_PixelTransferf( GET_DISPATCH(), (
- (GLenum )bswap_ENUM ( pc + 0 ),
- (GLfloat )bswap_FLOAT32( pc + 4 )
- ) );
-}
-
-void __glXDispSwap_PixelTransferi(GLbyte * pc)
-{
- CALL_PixelTransferi( GET_DISPATCH(), (
- (GLenum )bswap_ENUM ( pc + 0 ),
- (GLint )bswap_CARD32 ( pc + 4 )
- ) );
-}
-
-int __glXDispSwap_PixelStoref(__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 ) {
- CALL_PixelStoref( GET_DISPATCH(), (
- (GLenum )bswap_ENUM ( pc + 0 ),
- (GLfloat )bswap_FLOAT32( pc + 4 )
- ) );
- error = Success;
- }
-
- return error;
-}
-
-int __glXDispSwap_PixelStorei(__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 ) {
- CALL_PixelStorei( GET_DISPATCH(), (
- (GLenum )bswap_ENUM ( pc + 0 ),
- (GLint )bswap_CARD32 ( pc + 4 )
- ) );
- error = Success;
- }
-
- return error;
-}
-
-void __glXDispSwap_PixelMapfv(GLbyte * pc)
-{
- const GLsizei mapsize = (GLsizei )bswap_CARD32 ( pc + 4 );
-
- CALL_PixelMapfv( GET_DISPATCH(), (
- (GLenum )bswap_ENUM ( pc + 0 ),
- mapsize,
- (const GLfloat *)bswap_32_array( (uint32_t *) (pc + 8), 0 )
- ) );
-}
-
-void __glXDispSwap_PixelMapuiv(GLbyte * pc)
-{
- const GLsizei mapsize = (GLsizei )bswap_CARD32 ( pc + 4 );
-
- CALL_PixelMapuiv( GET_DISPATCH(), (
- (GLenum )bswap_ENUM ( pc + 0 ),
- mapsize,
- (const GLuint *)bswap_32_array( (uint32_t *) (pc + 8), 0 )
- ) );
-}
-
-void __glXDispSwap_PixelMapusv(GLbyte * pc)
-{
- const GLsizei mapsize = (GLsizei )bswap_CARD32 ( pc + 4 );
-
- CALL_PixelMapusv( GET_DISPATCH(), (
- (GLenum )bswap_ENUM ( pc + 0 ),
- mapsize,
- (const GLushort *)bswap_16_array( (uint16_t *) (pc + 8), 0 )
- ) );
-}
-
-void __glXDispSwap_ReadBuffer(GLbyte * pc)
-{
- CALL_ReadBuffer( GET_DISPATCH(), (
- (GLenum )bswap_ENUM ( pc + 0 )
- ) );
-}
-
-void __glXDispSwap_CopyPixels(GLbyte * pc)
-{
- CALL_CopyPixels( GET_DISPATCH(), (
- (GLint )bswap_CARD32 ( pc + 0 ),
- (GLint )bswap_CARD32 ( pc + 4 ),
- (GLsizei )bswap_CARD32 ( pc + 8 ),
- (GLsizei )bswap_CARD32 ( pc + 12 ),
- (GLenum )bswap_ENUM ( pc + 16 )
- ) );
-}
-
-void __glXDispSwap_DrawPixels(GLbyte * pc)
-{
- const GLvoid * const pixels = (const GLvoid *) (pc + 36);
- __GLXpixelHeader * const hdr = (__GLXpixelHeader *)(pc);
-
- CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SWAP_BYTES, hdr->swapBytes) );
- CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_LSB_FIRST, hdr->lsbFirst) );
- CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_ROW_LENGTH, (GLint) bswap_CARD32( & hdr->rowLength )) );
- CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_ROWS, (GLint) bswap_CARD32( & hdr->skipRows )) );
- CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_PIXELS, (GLint) bswap_CARD32( & hdr->skipPixels )) );
- CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_ALIGNMENT, (GLint) bswap_CARD32( & hdr->alignment )) );
-
- CALL_DrawPixels( GET_DISPATCH(), (
- (GLsizei )bswap_CARD32 ( pc + 20 ),
- (GLsizei )bswap_CARD32 ( pc + 24 ),
- (GLenum )bswap_ENUM ( pc + 28 ),
- (GLenum )bswap_ENUM ( pc + 32 ),
- pixels
- ) );
-}
-
-int __glXDispSwap_GetBooleanv(__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 + 0 );
-
- const GLuint compsize = __glGetBooleanv_size(pname);
- GLboolean answerBuffer[200];
- GLboolean * params = __glXGetAnswerBuffer(cl, compsize, answerBuffer, sizeof(answerBuffer), 1);
-
- if (params == NULL) return BadAlloc;
- __glXClearErrorOccured();
-
- CALL_GetBooleanv( GET_DISPATCH(), (
- pname,
- params
- ) );
- __glXSendReplySwap(cl->client, params, compsize, 1, GL_FALSE, 0);
- error = Success;
- }
-
- return error;
-}
-
-int __glXDispSwap_GetClipPlane(__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 ) {
- GLdouble equation[4];
- CALL_GetClipPlane( GET_DISPATCH(), (
- (GLenum )bswap_ENUM ( pc + 0 ),
- equation
- ) );
- (void) bswap_64_array( (uint64_t *) equation, 4 );
- __glXSendReplySwap(cl->client, equation, 4, 8, GL_TRUE, 0);
- error = Success;
- }
-
- return error;
-}
-
-int __glXDispSwap_GetDoublev(__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 + 0 );
-
- const GLuint compsize = __glGetDoublev_size(pname);
- GLdouble answerBuffer[200];
- GLdouble * params = __glXGetAnswerBuffer(cl, compsize * 8, answerBuffer, sizeof(answerBuffer), 8);
-
- if (params == NULL) return BadAlloc;
- __glXClearErrorOccured();
-
- CALL_GetDoublev( GET_DISPATCH(), (
- 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_GetError(__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 ) {
- GLenum retval;
- retval = CALL_GetError( GET_DISPATCH(), () );
- __glXSendReplySwap(cl->client, dummy_answer, 0, 0, GL_FALSE, retval);
- error = Success;
- }
-
- return error;
-}
-
-int __glXDispSwap_GetFloatv(__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 + 0 );
-
- const GLuint compsize = __glGetFloatv_size(pname);
- GLfloat answerBuffer[200];
- GLfloat * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4);
-
- if (params == NULL) return BadAlloc;
- __glXClearErrorOccured();
-
- CALL_GetFloatv( GET_DISPATCH(), (
- 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_GetIntegerv(__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 + 0 );
-
- const GLuint compsize = __glGetIntegerv_size(pname);
- GLint answerBuffer[200];
- GLint * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4);
-
- if (params == NULL) return BadAlloc;
- __glXClearErrorOccured();
-
- CALL_GetIntegerv( GET_DISPATCH(), (
- 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_GetLightfv(__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 = __glGetLightfv_size(pname);
- GLfloat answerBuffer[200];
- GLfloat * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4);
-
- if (params == NULL) return BadAlloc;
- __glXClearErrorOccured();
-
- CALL_GetLightfv( 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_GetLightiv(__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 = __glGetLightiv_size(pname);
- GLint answerBuffer[200];
- GLint * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4);
-
- if (params == NULL) return BadAlloc;
- __glXClearErrorOccured();
-
- CALL_GetLightiv( 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_GetMapdv(__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 target = (GLenum )bswap_ENUM ( pc + 0 );
- const GLenum query = (GLenum )bswap_ENUM ( pc + 4 );
-
- const GLuint compsize = __glGetMapdv_size(target,query);
- GLdouble answerBuffer[200];
- GLdouble * v = __glXGetAnswerBuffer(cl, compsize * 8, answerBuffer, sizeof(answerBuffer), 8);
-
- if (v == NULL) return BadAlloc;
- __glXClearErrorOccured();
-
- CALL_GetMapdv( GET_DISPATCH(), (
- target,
- query,
- v
- ) );
- (void) bswap_64_array( (uint64_t *) v, compsize );
- __glXSendReplySwap(cl->client, v, compsize, 8, GL_FALSE, 0);
- error = Success;
- }
-
- return error;
-}
-
-int __glXDispSwap_GetMapfv(__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 target = (GLenum )bswap_ENUM ( pc + 0 );
- const GLenum query = (GLenum )bswap_ENUM ( pc + 4 );
-
- const GLuint compsize = __glGetMapfv_size(target,query);
- GLfloat answerBuffer[200];
- GLfloat * v = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4);
-
- if (v == NULL) return BadAlloc;
- __glXClearErrorOccured();
-
- CALL_GetMapfv( GET_DISPATCH(), (
- target,
- query,
- v
- ) );
- (void) bswap_32_array( (uint32_t *) v, compsize );
- __glXSendReplySwap(cl->client, v, compsize, 4, GL_FALSE, 0);
- error = Success;
- }
-
- return error;
-}
-
-int __glXDispSwap_GetMapiv(__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 target = (GLenum )bswap_ENUM ( pc + 0 );
- const GLenum query = (GLenum )bswap_ENUM ( pc + 4 );
-
- const GLuint compsize = __glGetMapiv_size(target,query);
- GLint answerBuffer[200];
- GLint * v = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4);
-
- if (v == NULL) return BadAlloc;
- __glXClearErrorOccured();
-
- CALL_GetMapiv( GET_DISPATCH(), (
- target,
- query,
- v
- ) );
- (void) bswap_32_array( (uint32_t *) v, compsize );
- __glXSendReplySwap(cl->client, v, compsize, 4, GL_FALSE, 0);
- error = Success;
- }
-
- return error;
-}
-
-int __glXDispSwap_GetMaterialfv(__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 = __glGetMaterialfv_size(pname);
- GLfloat answerBuffer[200];
- GLfloat * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4);
-
- if (params == NULL) return BadAlloc;
- __glXClearErrorOccured();
-
- CALL_GetMaterialfv( 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_GetMaterialiv(__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 = __glGetMaterialiv_size(pname);
- GLint answerBuffer[200];
- GLint * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4);
-
- if (params == NULL) return BadAlloc;
- __glXClearErrorOccured();
-
- CALL_GetMaterialiv( 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_GetPixelMapfv(__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 map = (GLenum )bswap_ENUM ( pc + 0 );
-
- const GLuint compsize = __glGetPixelMapfv_size(map);
- GLfloat answerBuffer[200];
- GLfloat * values = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4);
-
- if (values == NULL) return BadAlloc;
- __glXClearErrorOccured();
-
- CALL_GetPixelMapfv( GET_DISPATCH(), (
- map,
- values
- ) );
- (void) bswap_32_array( (uint32_t *) values, compsize );
- __glXSendReplySwap(cl->client, values, compsize, 4, GL_FALSE, 0);
- error = Success;
- }
-
- return error;
-}
-
-int __glXDispSwap_GetPixelMapuiv(__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 map = (GLenum )bswap_ENUM ( pc + 0 );
-
- const GLuint compsize = __glGetPixelMapuiv_size(map);
- GLuint answerBuffer[200];
- GLuint * values = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4);
-
- if (values == NULL) return BadAlloc;
- __glXClearErrorOccured();
-
- CALL_GetPixelMapuiv( GET_DISPATCH(), (
- map,
- values
- ) );
- (void) bswap_32_array( (uint32_t *) values, compsize );
- __glXSendReplySwap(cl->client, values, compsize, 4, GL_FALSE, 0);
- error = Success;
- }
-
- return error;
-}
-
-int __glXDispSwap_GetPixelMapusv(__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 map = (GLenum )bswap_ENUM ( pc + 0 );
-
- const GLuint compsize = __glGetPixelMapusv_size(map);
- GLushort answerBuffer[200];
- GLushort * values = __glXGetAnswerBuffer(cl, compsize * 2, answerBuffer, sizeof(answerBuffer), 2);
-
- if (values == NULL) return BadAlloc;
- __glXClearErrorOccured();
-
- CALL_GetPixelMapusv( GET_DISPATCH(), (
- map,
- values
- ) );
- (void) bswap_16_array( (uint16_t *) values, compsize );
- __glXSendReplySwap(cl->client, values, compsize, 2, GL_FALSE, 0);
- error = Success;
- }
-
- return error;
-}
-
-int __glXDispSwap_GetTexEnvfv(__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 = __glGetTexEnvfv_size(pname);
- GLfloat answerBuffer[200];
- GLfloat * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4);
-
- if (params == NULL) return BadAlloc;
- __glXClearErrorOccured();
-
- CALL_GetTexEnvfv( 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_GetTexEnviv(__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 = __glGetTexEnviv_size(pname);
- GLint answerBuffer[200];
- GLint * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4);
-
- if (params == NULL) return BadAlloc;
- __glXClearErrorOccured();
-
- CALL_GetTexEnviv( 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_GetTexGendv(__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 = __glGetTexGendv_size(pname);
- GLdouble answerBuffer[200];
- GLdouble * params = __glXGetAnswerBuffer(cl, compsize * 8, answerBuffer, sizeof(answerBuffer), 8);
-
- if (params == NULL) return BadAlloc;
- __glXClearErrorOccured();
-
- CALL_GetTexGendv( GET_DISPATCH(), (
- (GLenum )bswap_ENUM ( 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_GetTexGenfv(__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 = __glGetTexGenfv_size(pname);
- GLfloat answerBuffer[200];
- GLfloat * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4);
-
- if (params == NULL) return BadAlloc;
- __glXClearErrorOccured();
-
- CALL_GetTexGenfv( 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_GetTexGeniv(__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 = __glGetTexGeniv_size(pname);
- GLint answerBuffer[200];
- GLint * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4);
-
- if (params == NULL) return BadAlloc;
- __glXClearErrorOccured();
-
- CALL_GetTexGeniv( 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_GetTexParameterfv(__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 = __glGetTexParameterfv_size(pname);
- GLfloat answerBuffer[200];
- GLfloat * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4);
-
- if (params == NULL) return BadAlloc;
- __glXClearErrorOccured();
-
- CALL_GetTexParameterfv( 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_GetTexParameteriv(__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 = __glGetTexParameteriv_size(pname);
- GLint answerBuffer[200];
- GLint * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4);
-
- if (params == NULL) return BadAlloc;
- __glXClearErrorOccured();
-
- CALL_GetTexParameteriv( 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_GetTexLevelParameterfv(__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 + 8 );
-
- const GLuint compsize = __glGetTexLevelParameterfv_size(pname);
- GLfloat answerBuffer[200];
- GLfloat * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4);
-
- if (params == NULL) return BadAlloc;
- __glXClearErrorOccured();
-
- CALL_GetTexLevelParameterfv( GET_DISPATCH(), (
- (GLenum )bswap_ENUM ( pc + 0 ),
- (GLint )bswap_CARD32 ( pc + 4 ),
- 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_GetTexLevelParameteriv(__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 + 8 );
-
- const GLuint compsize = __glGetTexLevelParameteriv_size(pname);
- GLint answerBuffer[200];
- GLint * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4);
-
- if (params == NULL) return BadAlloc;
- __glXClearErrorOccured();
-
- CALL_GetTexLevelParameteriv( GET_DISPATCH(), (
- (GLenum )bswap_ENUM ( pc + 0 ),
- (GLint )bswap_CARD32 ( pc + 4 ),
- 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_IsEnabled(__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_IsEnabled( GET_DISPATCH(), (
- (GLenum )bswap_ENUM ( pc + 0 )
- ) );
- __glXSendReplySwap(cl->client, dummy_answer, 0, 0, GL_FALSE, retval);
- error = Success;
- }
-
- return error;
-}
-
-int __glXDispSwap_IsList(__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_IsList( GET_DISPATCH(), (
- (GLuint )bswap_CARD32 ( pc + 0 )
- ) );
- __glXSendReplySwap(cl->client, dummy_answer, 0, 0, GL_FALSE, retval);
- error = Success;
- }
-
- return error;
-}
-
-void __glXDispSwap_DepthRange(GLbyte * pc)
-{
-#ifdef __GLX_ALIGN64
- if ((unsigned long)(pc) & 7) {
- (void) memmove(pc-4, pc, 16);
- pc -= 4;
- }
-#endif
-
- CALL_DepthRange( GET_DISPATCH(), (
- (GLclampd)bswap_FLOAT64( pc + 0 ),
- (GLclampd)bswap_FLOAT64( pc + 8 )
- ) );
-}
-
-void __glXDispSwap_Frustum(GLbyte * pc)
-{
-#ifdef __GLX_ALIGN64
- if ((unsigned long)(pc) & 7) {
- (void) memmove(pc-4, pc, 48);
- pc -= 4;
- }
-#endif
-
- CALL_Frustum( GET_DISPATCH(), (
- (GLdouble)bswap_FLOAT64( pc + 0 ),
- (GLdouble)bswap_FLOAT64( pc + 8 ),
- (GLdouble)bswap_FLOAT64( pc + 16 ),
- (GLdouble)bswap_FLOAT64( pc + 24 ),
- (GLdouble)bswap_FLOAT64( pc + 32 ),
- (GLdouble)bswap_FLOAT64( pc + 40 )
- ) );
-}
-
-void __glXDispSwap_LoadIdentity(GLbyte * pc)
-{
- CALL_LoadIdentity( GET_DISPATCH(), () );
-}
-
-void __glXDispSwap_LoadMatrixf(GLbyte * pc)
-{
- CALL_LoadMatrixf( GET_DISPATCH(), (
- (const GLfloat *)bswap_32_array( (uint32_t *) (pc + 0), 16 )
- ) );
-}
-
-void __glXDispSwap_LoadMatrixd(GLbyte * pc)
-{
-#ifdef __GLX_ALIGN64
- if ((unsigned long)(pc) & 7) {
- (void) memmove(pc-4, pc, 128);
- pc -= 4;
- }
-#endif
-
- CALL_LoadMatrixd( GET_DISPATCH(), (
- (const GLdouble *)bswap_64_array( (uint64_t *) (pc + 0), 16 )
- ) );
-}
-
-void __glXDispSwap_MatrixMode(GLbyte * pc)
-{
- CALL_MatrixMode( GET_DISPATCH(), (
- (GLenum )bswap_ENUM ( pc + 0 )
- ) );
-}
-
-void __glXDispSwap_MultMatrixf(GLbyte * pc)
-{
- CALL_MultMatrixf( GET_DISPATCH(), (
- (const GLfloat *)bswap_32_array( (uint32_t *) (pc + 0), 16 )
- ) );
-}
-
-void __glXDispSwap_MultMatrixd(GLbyte * pc)
-{
-#ifdef __GLX_ALIGN64
- if ((unsigned long)(pc) & 7) {
- (void) memmove(pc-4, pc, 128);
- pc -= 4;
- }
-#endif
-
- CALL_MultMatrixd( GET_DISPATCH(), (
- (const GLdouble *)bswap_64_array( (uint64_t *) (pc + 0), 16 )
- ) );
-}
-
-void __glXDispSwap_Ortho(GLbyte * pc)
-{
-#ifdef __GLX_ALIGN64
- if ((unsigned long)(pc) & 7) {
- (void) memmove(pc-4, pc, 48);
- pc -= 4;
- }
-#endif
-
- CALL_Ortho( GET_DISPATCH(), (
- (GLdouble)bswap_FLOAT64( pc + 0 ),
- (GLdouble)bswap_FLOAT64( pc + 8 ),
- (GLdouble)bswap_FLOAT64( pc + 16 ),
- (GLdouble)bswap_FLOAT64( pc + 24 ),
- (GLdouble)bswap_FLOAT64( pc + 32 ),
- (GLdouble)bswap_FLOAT64( pc + 40 )
- ) );
-}
-
-void __glXDispSwap_PopMatrix(GLbyte * pc)
-{
- CALL_PopMatrix( GET_DISPATCH(), () );
-}
-
-void __glXDispSwap_PushMatrix(GLbyte * pc)
-{
- CALL_PushMatrix( GET_DISPATCH(), () );
-}
-
-void __glXDispSwap_Rotated(GLbyte * pc)
-{
-#ifdef __GLX_ALIGN64
- if ((unsigned long)(pc) & 7) {
- (void) memmove(pc-4, pc, 32);
- pc -= 4;
- }
-#endif
-
- CALL_Rotated( GET_DISPATCH(), (
- (GLdouble)bswap_FLOAT64( pc + 0 ),
- (GLdouble)bswap_FLOAT64( pc + 8 ),
- (GLdouble)bswap_FLOAT64( pc + 16 ),
- (GLdouble)bswap_FLOAT64( pc + 24 )
- ) );
-}
-
-void __glXDispSwap_Rotatef(GLbyte * pc)
-{
- CALL_Rotatef( GET_DISPATCH(), (
- (GLfloat )bswap_FLOAT32( pc + 0 ),
- (GLfloat )bswap_FLOAT32( pc + 4 ),
- (GLfloat )bswap_FLOAT32( pc + 8 ),
- (GLfloat )bswap_FLOAT32( pc + 12 )
- ) );
-}
-
-void __glXDispSwap_Scaled(GLbyte * pc)
-{
-#ifdef __GLX_ALIGN64
- if ((unsigned long)(pc) & 7) {
- (void) memmove(pc-4, pc, 24);
- pc -= 4;
- }
-#endif
-
- CALL_Scaled( GET_DISPATCH(), (
- (GLdouble)bswap_FLOAT64( pc + 0 ),
- (GLdouble)bswap_FLOAT64( pc + 8 ),
- (GLdouble)bswap_FLOAT64( pc + 16 )
- ) );
-}
-
-void __glXDispSwap_Scalef(GLbyte * pc)
-{
- CALL_Scalef( GET_DISPATCH(), (
- (GLfloat )bswap_FLOAT32( pc + 0 ),
- (GLfloat )bswap_FLOAT32( pc + 4 ),
- (GLfloat )bswap_FLOAT32( pc + 8 )
- ) );
-}
-
-void __glXDispSwap_Translated(GLbyte * pc)
-{
-#ifdef __GLX_ALIGN64
- if ((unsigned long)(pc) & 7) {
- (void) memmove(pc-4, pc, 24);
- pc -= 4;
- }
-#endif
-
- CALL_Translated( GET_DISPATCH(), (
- (GLdouble)bswap_FLOAT64( pc + 0 ),
- (GLdouble)bswap_FLOAT64( pc + 8 ),
- (GLdouble)bswap_FLOAT64( pc + 16 )
- ) );
-}
-
-void __glXDispSwap_Translatef(GLbyte * pc)
-{
- CALL_Translatef( GET_DISPATCH(), (
- (GLfloat )bswap_FLOAT32( pc + 0 ),
- (GLfloat )bswap_FLOAT32( pc + 4 ),
- (GLfloat )bswap_FLOAT32( pc + 8 )
- ) );
-}
-
-void __glXDispSwap_Viewport(GLbyte * pc)
-{
- CALL_Viewport( GET_DISPATCH(), (
- (GLint )bswap_CARD32 ( pc + 0 ),
- (GLint )bswap_CARD32 ( pc + 4 ),
- (GLsizei )bswap_CARD32 ( pc + 8 ),
- (GLsizei )bswap_CARD32 ( pc + 12 )
- ) );
-}
-
-void __glXDispSwap_BindTexture(GLbyte * pc)
-{
- CALL_BindTexture( GET_DISPATCH(), (
- (GLenum )bswap_ENUM ( pc + 0 ),
- (GLuint )bswap_CARD32 ( pc + 4 )
- ) );
-}
-
-void __glXDispSwap_Indexubv(GLbyte * pc)
-{
- CALL_Indexubv( GET_DISPATCH(), (
- (const GLubyte *)(pc + 0)
- ) );
-}
-
-void __glXDispSwap_PolygonOffset(GLbyte * pc)
-{
- CALL_PolygonOffset( GET_DISPATCH(), (
- (GLfloat )bswap_FLOAT32( pc + 0 ),
- (GLfloat )bswap_FLOAT32( pc + 4 )
- ) );
-}
-
-int __glXDispSwap_AreTexturesResident(__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 );
-
- 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;
-}
-
-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(), (
- (GLenum )bswap_ENUM ( pc + 0 ),
- (GLint )bswap_CARD32 ( pc + 4 ),
- (GLenum )bswap_ENUM ( pc + 8 ),
- (GLint )bswap_CARD32 ( pc + 12 ),
- (GLint )bswap_CARD32 ( pc + 16 ),
- (GLsizei )bswap_CARD32 ( pc + 20 ),
- (GLint )bswap_CARD32 ( pc + 24 )
- ) );
-}
-
-void __glXDispSwap_CopyTexImage2D(GLbyte * pc)
-{
- CALL_CopyTexImage2D( GET_DISPATCH(), (
- (GLenum )bswap_ENUM ( pc + 0 ),
- (GLint )bswap_CARD32 ( pc + 4 ),
- (GLenum )bswap_ENUM ( pc + 8 ),
- (GLint )bswap_CARD32 ( pc + 12 ),
- (GLint )bswap_CARD32 ( pc + 16 ),
- (GLsizei )bswap_CARD32 ( pc + 20 ),
- (GLsizei )bswap_CARD32 ( pc + 24 ),
- (GLint )bswap_CARD32 ( pc + 28 )
- ) );
-}
-
-void __glXDispSwap_CopyTexSubImage1D(GLbyte * pc)
-{
- CALL_CopyTexSubImage1D( 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 )
- ) );
-}
-
-void __glXDispSwap_CopyTexSubImage2D(GLbyte * pc)
-{
- CALL_CopyTexSubImage2D( 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 ),
- (GLint )bswap_CARD32 ( pc + 20 ),
- (GLsizei )bswap_CARD32 ( pc + 24 ),
- (GLsizei )bswap_CARD32 ( pc + 28 )
- ) );
-}
-
-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;
- __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 );
-
- CALL_DeleteTextures( GET_DISPATCH(), (
- n,
- (const GLuint *)bswap_32_array( (uint32_t *) (pc + 4), 0 )
- ) );
- error = Success;
- }
-
- return error;
-}
-
-int __glXDispSwap_GenTextures(__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 * 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_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;
- int error;
- __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
-
- pc += __GLX_SINGLE_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;
-}
-
-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 );
-
- CALL_PrioritizeTextures( GET_DISPATCH(), (
- n,
- (const GLuint *)bswap_32_array( (uint32_t *) (pc + 4), 0 ),
- (const GLclampf *)bswap_32_array( (uint32_t *) (pc + 4), 0 )
- ) );
-}
-
-void __glXDispSwap_TexSubImage1D(GLbyte * pc)
-{
- const CARD32 ptr_is_null = *(CARD32 *)(pc + 52);
- const GLvoid * const pixels = (const GLvoid *) (ptr_is_null != 0) ? NULL : (pc + 56);
- __GLXpixelHeader * const hdr = (__GLXpixelHeader *)(pc);
-
- CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SWAP_BYTES, hdr->swapBytes) );
- CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_LSB_FIRST, hdr->lsbFirst) );
- CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_ROW_LENGTH, (GLint) bswap_CARD32( & hdr->rowLength )) );
- CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_ROWS, (GLint) bswap_CARD32( & hdr->skipRows )) );
- CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_PIXELS, (GLint) bswap_CARD32( & hdr->skipPixels )) );
- CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_ALIGNMENT, (GLint) bswap_CARD32( & hdr->alignment )) );
-
- CALL_TexSubImage1D( GET_DISPATCH(), (
- (GLenum )bswap_ENUM ( pc + 20 ),
- (GLint )bswap_CARD32 ( pc + 24 ),
- (GLint )bswap_CARD32 ( pc + 28 ),
- (GLsizei )bswap_CARD32 ( pc + 36 ),
- (GLenum )bswap_ENUM ( pc + 44 ),
- (GLenum )bswap_ENUM ( pc + 48 ),
- pixels
- ) );
-}
-
-void __glXDispSwap_TexSubImage2D(GLbyte * pc)
-{
- const CARD32 ptr_is_null = *(CARD32 *)(pc + 52);
- const GLvoid * const pixels = (const GLvoid *) (ptr_is_null != 0) ? NULL : (pc + 56);
- __GLXpixelHeader * const hdr = (__GLXpixelHeader *)(pc);
-
- CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SWAP_BYTES, hdr->swapBytes) );
- CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_LSB_FIRST, hdr->lsbFirst) );
- CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_ROW_LENGTH, (GLint) bswap_CARD32( & hdr->rowLength )) );
- CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_ROWS, (GLint) bswap_CARD32( & hdr->skipRows )) );
- CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_PIXELS, (GLint) bswap_CARD32( & hdr->skipPixels )) );
- CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_ALIGNMENT, (GLint) bswap_CARD32( & hdr->alignment )) );
-
- CALL_TexSubImage2D( GET_DISPATCH(), (
- (GLenum )bswap_ENUM ( pc + 20 ),
- (GLint )bswap_CARD32 ( pc + 24 ),
- (GLint )bswap_CARD32 ( pc + 28 ),
- (GLint )bswap_CARD32 ( pc + 32 ),
- (GLsizei )bswap_CARD32 ( pc + 36 ),
- (GLsizei )bswap_CARD32 ( pc + 40 ),
- (GLenum )bswap_ENUM ( pc + 44 ),
- (GLenum )bswap_ENUM ( pc + 48 ),
- pixels
- ) );
-}
-
-void __glXDispSwap_BlendColor(GLbyte * pc)
-{
- CALL_BlendColor( GET_DISPATCH(), (
- (GLclampf)bswap_FLOAT32( pc + 0 ),
- (GLclampf)bswap_FLOAT32( pc + 4 ),
- (GLclampf)bswap_FLOAT32( pc + 8 ),
- (GLclampf)bswap_FLOAT32( pc + 12 )
- ) );
-}
-
-void __glXDispSwap_BlendEquation(GLbyte * pc)
-{
- CALL_BlendEquation( GET_DISPATCH(), (
- (GLenum )bswap_ENUM ( pc + 0 )
- ) );
-}
-
-void __glXDispSwap_ColorTable(GLbyte * pc)
-{
- const GLvoid * const table = (const GLvoid *) (pc + 40);
- __GLXpixelHeader * const hdr = (__GLXpixelHeader *)(pc);
-
- CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SWAP_BYTES, hdr->swapBytes) );
- CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_LSB_FIRST, hdr->lsbFirst) );
- CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_ROW_LENGTH, (GLint) bswap_CARD32( & hdr->rowLength )) );
- CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_ROWS, (GLint) bswap_CARD32( & hdr->skipRows )) );
- CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_PIXELS, (GLint) bswap_CARD32( & hdr->skipPixels )) );
- CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_ALIGNMENT, (GLint) bswap_CARD32( & hdr->alignment )) );
-
- CALL_ColorTable( GET_DISPATCH(), (
- (GLenum )bswap_ENUM ( pc + 20 ),
- (GLenum )bswap_ENUM ( pc + 24 ),
- (GLsizei )bswap_CARD32 ( pc + 28 ),
- (GLenum )bswap_ENUM ( pc + 32 ),
- (GLenum )bswap_ENUM ( pc + 36 ),
- table
- ) );
-}
-
-void __glXDispSwap_ColorTableParameterfv(GLbyte * pc)
-{
- const GLenum pname = (GLenum )bswap_ENUM ( pc + 4 );
- const GLfloat * params;
-
- params = (const GLfloat *) bswap_32_array( (uint32_t *) (pc + 8), __glColorTableParameterfv_size(pname) );
-
- CALL_ColorTableParameterfv( GET_DISPATCH(), (
- (GLenum )bswap_ENUM ( pc + 0 ),
- pname,
- params
- ) );
-}
-
-void __glXDispSwap_ColorTableParameteriv(GLbyte * pc)
-{
- const GLenum pname = (GLenum )bswap_ENUM ( pc + 4 );
- const GLint * params;
-
- params = (const GLint *) bswap_32_array( (uint32_t *) (pc + 8), __glColorTableParameteriv_size(pname) );
-
- CALL_ColorTableParameteriv( GET_DISPATCH(), (
- (GLenum )bswap_ENUM ( pc + 0 ),
- pname,
- params
- ) );
-}
-
-void __glXDispSwap_CopyColorTable(GLbyte * pc)
-{
- CALL_CopyColorTable( GET_DISPATCH(), (
- (GLenum )bswap_ENUM ( pc + 0 ),
- (GLenum )bswap_ENUM ( pc + 4 ),
- (GLint )bswap_CARD32 ( pc + 8 ),
- (GLint )bswap_CARD32 ( pc + 12 ),
- (GLsizei )bswap_CARD32 ( pc + 16 )
- ) );
-}
-
-int __glXDispSwap_GetColorTableParameterfv(__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 = __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_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;
- 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 = __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;
-}
-
-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);
- __GLXpixelHeader * const hdr = (__GLXpixelHeader *)(pc);
-
- CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SWAP_BYTES, hdr->swapBytes) );
- CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_LSB_FIRST, hdr->lsbFirst) );
- CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_ROW_LENGTH, (GLint) bswap_CARD32( & hdr->rowLength )) );
- CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_ROWS, (GLint) bswap_CARD32( & hdr->skipRows )) );
- CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_PIXELS, (GLint) bswap_CARD32( & hdr->skipPixels )) );
- CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_ALIGNMENT, (GLint) bswap_CARD32( & hdr->alignment )) );
-
- CALL_ColorSubTable( GET_DISPATCH(), (
- (GLenum )bswap_ENUM ( pc + 20 ),
- (GLsizei )bswap_CARD32 ( pc + 24 ),
- (GLsizei )bswap_CARD32 ( pc + 28 ),
- (GLenum )bswap_ENUM ( pc + 32 ),
- (GLenum )bswap_ENUM ( pc + 36 ),
- data
- ) );
-}
-
-void __glXDispSwap_CopyColorSubTable(GLbyte * pc)
-{
- CALL_CopyColorSubTable( GET_DISPATCH(), (
- (GLenum )bswap_ENUM ( pc + 0 ),
- (GLsizei )bswap_CARD32 ( pc + 4 ),
- (GLint )bswap_CARD32 ( pc + 8 ),
- (GLint )bswap_CARD32 ( pc + 12 ),
- (GLsizei )bswap_CARD32 ( pc + 16 )
- ) );
-}
-
-void __glXDispSwap_ConvolutionFilter1D(GLbyte * pc)
-{
- const GLvoid * const image = (const GLvoid *) (pc + 44);
- __GLXpixelHeader * const hdr = (__GLXpixelHeader *)(pc);
-
- CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SWAP_BYTES, hdr->swapBytes) );
- CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_LSB_FIRST, hdr->lsbFirst) );
- CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_ROW_LENGTH, (GLint) bswap_CARD32( & hdr->rowLength )) );
- CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_ROWS, (GLint) bswap_CARD32( & hdr->skipRows )) );
- CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_PIXELS, (GLint) bswap_CARD32( & hdr->skipPixels )) );
- CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_ALIGNMENT, (GLint) bswap_CARD32( & hdr->alignment )) );
-
- CALL_ConvolutionFilter1D( GET_DISPATCH(), (
- (GLenum )bswap_ENUM ( pc + 20 ),
- (GLenum )bswap_ENUM ( pc + 24 ),
- (GLsizei )bswap_CARD32 ( pc + 28 ),
- (GLenum )bswap_ENUM ( pc + 36 ),
- (GLenum )bswap_ENUM ( pc + 40 ),
- image
- ) );
-}
-
-void __glXDispSwap_ConvolutionFilter2D(GLbyte * pc)
-{
- const GLvoid * const image = (const GLvoid *) (pc + 44);
- __GLXpixelHeader * const hdr = (__GLXpixelHeader *)(pc);
-
- CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SWAP_BYTES, hdr->swapBytes) );
- CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_LSB_FIRST, hdr->lsbFirst) );
- CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_ROW_LENGTH, (GLint) bswap_CARD32( & hdr->rowLength )) );
- CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_ROWS, (GLint) bswap_CARD32( & hdr->skipRows )) );
- CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_PIXELS, (GLint) bswap_CARD32( & hdr->skipPixels )) );
- CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_ALIGNMENT, (GLint) bswap_CARD32( & hdr->alignment )) );
-
- CALL_ConvolutionFilter2D( GET_DISPATCH(), (
- (GLenum )bswap_ENUM ( pc + 20 ),
- (GLenum )bswap_ENUM ( pc + 24 ),
- (GLsizei )bswap_CARD32 ( pc + 28 ),
- (GLsizei )bswap_CARD32 ( pc + 32 ),
- (GLenum )bswap_ENUM ( pc + 36 ),
- (GLenum )bswap_ENUM ( pc + 40 ),
- image
- ) );
-}
-
-void __glXDispSwap_ConvolutionParameterf(GLbyte * pc)
-{
- CALL_ConvolutionParameterf( GET_DISPATCH(), (
- (GLenum )bswap_ENUM ( pc + 0 ),
- (GLenum )bswap_ENUM ( pc + 4 ),
- (GLfloat )bswap_FLOAT32( pc + 8 )
- ) );
-}
-
-void __glXDispSwap_ConvolutionParameterfv(GLbyte * pc)
-{
- const GLenum pname = (GLenum )bswap_ENUM ( pc + 4 );
- const GLfloat * params;
-
- params = (const GLfloat *) bswap_32_array( (uint32_t *) (pc + 8), __glConvolutionParameterfv_size(pname) );
-
- CALL_ConvolutionParameterfv( GET_DISPATCH(), (
- (GLenum )bswap_ENUM ( pc + 0 ),
- pname,
- params
- ) );
-}
-
-void __glXDispSwap_ConvolutionParameteri(GLbyte * pc)
-{
- CALL_ConvolutionParameteri( GET_DISPATCH(), (
- (GLenum )bswap_ENUM ( pc + 0 ),
- (GLenum )bswap_ENUM ( pc + 4 ),
- (GLint )bswap_CARD32 ( pc + 8 )
- ) );
-}
-
-void __glXDispSwap_ConvolutionParameteriv(GLbyte * pc)
-{
- const GLenum pname = (GLenum )bswap_ENUM ( pc + 4 );
- const GLint * params;
-
- params = (const GLint *) bswap_32_array( (uint32_t *) (pc + 8), __glConvolutionParameteriv_size(pname) );
-
- CALL_ConvolutionParameteriv( GET_DISPATCH(), (
- (GLenum )bswap_ENUM ( pc + 0 ),
- pname,
- params
- ) );
-}
-
-void __glXDispSwap_CopyConvolutionFilter1D(GLbyte * pc)
-{
- CALL_CopyConvolutionFilter1D( GET_DISPATCH(), (
- (GLenum )bswap_ENUM ( pc + 0 ),
- (GLenum )bswap_ENUM ( pc + 4 ),
- (GLint )bswap_CARD32 ( pc + 8 ),
- (GLint )bswap_CARD32 ( pc + 12 ),
- (GLsizei )bswap_CARD32 ( pc + 16 )
- ) );
-}
-
-void __glXDispSwap_CopyConvolutionFilter2D(GLbyte * pc)
-{
- CALL_CopyConvolutionFilter2D( GET_DISPATCH(), (
- (GLenum )bswap_ENUM ( pc + 0 ),
- (GLenum )bswap_ENUM ( pc + 4 ),
- (GLint )bswap_CARD32 ( pc + 8 ),
- (GLint )bswap_CARD32 ( pc + 12 ),
- (GLsizei )bswap_CARD32 ( pc + 16 ),
- (GLsizei )bswap_CARD32 ( pc + 20 )
- ) );
-}
-
-int __glXDispSwap_GetConvolutionParameterfv(__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 = __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_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;
- 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 = __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_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;
- 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 = __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_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;
- 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 = __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_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;
- 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 = __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_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;
- 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 = __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;
-}
-
-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(), (
- (GLenum )bswap_ENUM ( pc + 0 ),
- (GLsizei )bswap_CARD32 ( pc + 4 ),
- (GLenum )bswap_ENUM ( pc + 8 ),
- *(GLboolean *)(pc + 12)
- ) );
-}
-
-void __glXDispSwap_Minmax(GLbyte * pc)
-{
- CALL_Minmax( GET_DISPATCH(), (
- (GLenum )bswap_ENUM ( pc + 0 ),
- (GLenum )bswap_ENUM ( pc + 4 ),
- *(GLboolean *)(pc + 8)
- ) );
-}
-
-void __glXDispSwap_ResetHistogram(GLbyte * pc)
-{
- CALL_ResetHistogram( GET_DISPATCH(), (
- (GLenum )bswap_ENUM ( pc + 0 )
- ) );
-}
-
-void __glXDispSwap_ResetMinmax(GLbyte * pc)
-{
- CALL_ResetMinmax( GET_DISPATCH(), (
- (GLenum )bswap_ENUM ( pc + 0 )
- ) );
-}
-
-void __glXDispSwap_TexImage3D(GLbyte * pc)
-{
- const CARD32 ptr_is_null = *(CARD32 *)(pc + 76);
- const GLvoid * const pixels = (const GLvoid *) (ptr_is_null != 0) ? NULL : (pc + 80);
- __GLXpixel3DHeader * const hdr = (__GLXpixel3DHeader *)(pc);
-
- CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SWAP_BYTES, hdr->swapBytes) );
- CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_LSB_FIRST, hdr->lsbFirst) );
- CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_ROW_LENGTH, (GLint) bswap_CARD32( & hdr->rowLength )) );
- CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_IMAGE_HEIGHT, (GLint) bswap_CARD32( & hdr->imageHeight )) );
- CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_ROWS, (GLint) bswap_CARD32( & hdr->skipRows )) );
- CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_IMAGES, (GLint) bswap_CARD32( & hdr->skipImages )) );
- CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_PIXELS, (GLint) bswap_CARD32( & hdr->skipPixels )) );
- CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_ALIGNMENT, (GLint) bswap_CARD32( & hdr->alignment )) );
-
- CALL_TexImage3D( GET_DISPATCH(), (
- (GLenum )bswap_ENUM ( pc + 36 ),
- (GLint )bswap_CARD32 ( pc + 40 ),
- (GLint )bswap_CARD32 ( pc + 44 ),
- (GLsizei )bswap_CARD32 ( pc + 48 ),
- (GLsizei )bswap_CARD32 ( pc + 52 ),
- (GLsizei )bswap_CARD32 ( pc + 56 ),
- (GLint )bswap_CARD32 ( pc + 64 ),
- (GLenum )bswap_ENUM ( pc + 68 ),
- (GLenum )bswap_ENUM ( pc + 72 ),
- pixels
- ) );
-}
-
-void __glXDispSwap_TexSubImage3D(GLbyte * pc)
-{
- const CARD32 ptr_is_null = *(CARD32 *)(pc + 84);
- const GLvoid * const pixels = (const GLvoid *) (ptr_is_null != 0) ? NULL : (pc + 88);
- __GLXpixel3DHeader * const hdr = (__GLXpixel3DHeader *)(pc);
-
- CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SWAP_BYTES, hdr->swapBytes) );
- CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_LSB_FIRST, hdr->lsbFirst) );
- CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_ROW_LENGTH, (GLint) bswap_CARD32( & hdr->rowLength )) );
- CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_IMAGE_HEIGHT, (GLint) bswap_CARD32( & hdr->imageHeight )) );
- CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_ROWS, (GLint) bswap_CARD32( & hdr->skipRows )) );
- CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_IMAGES, (GLint) bswap_CARD32( & hdr->skipImages )) );
- CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_PIXELS, (GLint) bswap_CARD32( & hdr->skipPixels )) );
- CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_ALIGNMENT, (GLint) bswap_CARD32( & hdr->alignment )) );
-
- CALL_TexSubImage3D( GET_DISPATCH(), (
- (GLenum )bswap_ENUM ( pc + 36 ),
- (GLint )bswap_CARD32 ( pc + 40 ),
- (GLint )bswap_CARD32 ( pc + 44 ),
- (GLint )bswap_CARD32 ( pc + 48 ),
- (GLint )bswap_CARD32 ( pc + 52 ),
- (GLsizei )bswap_CARD32 ( pc + 60 ),
- (GLsizei )bswap_CARD32 ( pc + 64 ),
- (GLsizei )bswap_CARD32 ( pc + 68 ),
- (GLenum )bswap_ENUM ( pc + 76 ),
- (GLenum )bswap_ENUM ( pc + 80 ),
- pixels
- ) );
-}
-
-void __glXDispSwap_CopyTexSubImage3D(GLbyte * pc)
-{
- CALL_CopyTexSubImage3D( 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 ),
- (GLint )bswap_CARD32 ( pc + 20 ),
- (GLint )bswap_CARD32 ( pc + 24 ),
- (GLsizei )bswap_CARD32 ( pc + 28 ),
- (GLsizei )bswap_CARD32 ( pc + 32 )
- ) );
-}
-
-void __glXDispSwap_ActiveTextureARB(GLbyte * pc)
-{
- CALL_ActiveTextureARB( GET_DISPATCH(), (
- (GLenum )bswap_ENUM ( pc + 0 )
- ) );
-}
-
-void __glXDispSwap_MultiTexCoord1dvARB(GLbyte * pc)
-{
-#ifdef __GLX_ALIGN64
- if ((unsigned long)(pc) & 7) {
- (void) memmove(pc-4, pc, 12);
- pc -= 4;
- }
-#endif
-
- CALL_MultiTexCoord1dvARB( GET_DISPATCH(), (
- (GLenum )bswap_ENUM ( pc + 8 ),
- (const GLdouble *)bswap_64_array( (uint64_t *) (pc + 0), 1 )
- ) );
-}
-
-void __glXDispSwap_MultiTexCoord1fvARB(GLbyte * pc)
-{
- CALL_MultiTexCoord1fvARB( GET_DISPATCH(), (
- (GLenum )bswap_ENUM ( pc + 0 ),
- (const GLfloat *)bswap_32_array( (uint32_t *) (pc + 4), 1 )
- ) );
-}
-
-void __glXDispSwap_MultiTexCoord1ivARB(GLbyte * pc)
-{
- CALL_MultiTexCoord1ivARB( GET_DISPATCH(), (
- (GLenum )bswap_ENUM ( pc + 0 ),
- (const GLint *)bswap_32_array( (uint32_t *) (pc + 4), 1 )
- ) );
-}
-
-void __glXDispSwap_MultiTexCoord1svARB(GLbyte * pc)
-{
- CALL_MultiTexCoord1svARB( GET_DISPATCH(), (
- (GLenum )bswap_ENUM ( pc + 0 ),
- (const GLshort *)bswap_16_array( (uint16_t *) (pc + 4), 1 )
- ) );
-}
-
-void __glXDispSwap_MultiTexCoord2dvARB(GLbyte * pc)
-{
-#ifdef __GLX_ALIGN64
- if ((unsigned long)(pc) & 7) {
- (void) memmove(pc-4, pc, 20);
- pc -= 4;
- }
-#endif
-
- CALL_MultiTexCoord2dvARB( GET_DISPATCH(), (
- (GLenum )bswap_ENUM ( pc + 16 ),
- (const GLdouble *)bswap_64_array( (uint64_t *) (pc + 0), 2 )
- ) );
-}
-
-void __glXDispSwap_MultiTexCoord2fvARB(GLbyte * pc)
-{
- CALL_MultiTexCoord2fvARB( GET_DISPATCH(), (
- (GLenum )bswap_ENUM ( pc + 0 ),
- (const GLfloat *)bswap_32_array( (uint32_t *) (pc + 4), 2 )
- ) );
-}
-
-void __glXDispSwap_MultiTexCoord2ivARB(GLbyte * pc)
-{
- CALL_MultiTexCoord2ivARB( GET_DISPATCH(), (
- (GLenum )bswap_ENUM ( pc + 0 ),
- (const GLint *)bswap_32_array( (uint32_t *) (pc + 4), 2 )
- ) );
-}
-
-void __glXDispSwap_MultiTexCoord2svARB(GLbyte * pc)
-{
- CALL_MultiTexCoord2svARB( GET_DISPATCH(), (
- (GLenum )bswap_ENUM ( pc + 0 ),
- (const GLshort *)bswap_16_array( (uint16_t *) (pc + 4), 2 )
- ) );
-}
-
-void __glXDispSwap_MultiTexCoord3dvARB(GLbyte * pc)
-{
-#ifdef __GLX_ALIGN64
- if ((unsigned long)(pc) & 7) {
- (void) memmove(pc-4, pc, 28);
- pc -= 4;
- }
-#endif
-
- CALL_MultiTexCoord3dvARB( GET_DISPATCH(), (
- (GLenum )bswap_ENUM ( pc + 24 ),
- (const GLdouble *)bswap_64_array( (uint64_t *) (pc + 0), 3 )
- ) );
-}
-
-void __glXDispSwap_MultiTexCoord3fvARB(GLbyte * pc)
-{
- CALL_MultiTexCoord3fvARB( GET_DISPATCH(), (
- (GLenum )bswap_ENUM ( pc + 0 ),
- (const GLfloat *)bswap_32_array( (uint32_t *) (pc + 4), 3 )
- ) );
-}
-
-void __glXDispSwap_MultiTexCoord3ivARB(GLbyte * pc)
-{
- CALL_MultiTexCoord3ivARB( GET_DISPATCH(), (
- (GLenum )bswap_ENUM ( pc + 0 ),
- (const GLint *)bswap_32_array( (uint32_t *) (pc + 4), 3 )
- ) );
-}
-
-void __glXDispSwap_MultiTexCoord3svARB(GLbyte * pc)
-{
- CALL_MultiTexCoord3svARB( GET_DISPATCH(), (
- (GLenum )bswap_ENUM ( pc + 0 ),
- (const GLshort *)bswap_16_array( (uint16_t *) (pc + 4), 3 )
- ) );
-}
-
-void __glXDispSwap_MultiTexCoord4dvARB(GLbyte * pc)
-{
-#ifdef __GLX_ALIGN64
- if ((unsigned long)(pc) & 7) {
- (void) memmove(pc-4, pc, 36);
- pc -= 4;
- }
-#endif
-
- CALL_MultiTexCoord4dvARB( GET_DISPATCH(), (
- (GLenum )bswap_ENUM ( pc + 32 ),
- (const GLdouble *)bswap_64_array( (uint64_t *) (pc + 0), 4 )
- ) );
-}
-
-void __glXDispSwap_MultiTexCoord4fvARB(GLbyte * pc)
-{
- CALL_MultiTexCoord4fvARB( GET_DISPATCH(), (
- (GLenum )bswap_ENUM ( pc + 0 ),
- (const GLfloat *)bswap_32_array( (uint32_t *) (pc + 4), 4 )
- ) );
-}
-
-void __glXDispSwap_MultiTexCoord4ivARB(GLbyte * pc)
-{
- CALL_MultiTexCoord4ivARB( GET_DISPATCH(), (
- (GLenum )bswap_ENUM ( pc + 0 ),
- (const GLint *)bswap_32_array( (uint32_t *) (pc + 4), 4 )
- ) );
-}
-
-void __glXDispSwap_MultiTexCoord4svARB(GLbyte * pc)
-{
- CALL_MultiTexCoord4svARB( GET_DISPATCH(), (
- (GLenum )bswap_ENUM ( pc + 0 ),
- (const GLshort *)bswap_16_array( (uint16_t *) (pc + 4), 4 )
- ) );
-}
-
-void __glXDispSwap_SampleCoverageARB(GLbyte * pc)
-{
- CALL_SampleCoverageARB( GET_DISPATCH(), (
- (GLclampf)bswap_FLOAT32( pc + 0 ),
- *(GLboolean *)(pc + 4)
- ) );
-}
-
-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 );
-
- CALL_DrawBuffersARB( GET_DISPATCH(), (
- n,
- (const GLenum *)bswap_32_array( (uint32_t *) (pc + 4), 0 )
- ) );
-}
-
-void __glXDispSwap_SampleMaskSGIS(GLbyte * pc)
-{
- CALL_SampleMaskSGIS( GET_DISPATCH(), (
- (GLclampf)bswap_FLOAT32( pc + 0 ),
- *(GLboolean *)(pc + 4)
- ) );
-}
-
-void __glXDispSwap_SamplePatternSGIS(GLbyte * pc)
-{
- CALL_SamplePatternSGIS( GET_DISPATCH(), (
- (GLenum )bswap_ENUM ( pc + 0 )
- ) );
-}
-
-void __glXDispSwap_PointParameterfEXT(GLbyte * pc)
-{
- CALL_PointParameterfEXT( GET_DISPATCH(), (
- (GLenum )bswap_ENUM ( pc + 0 ),
- (GLfloat )bswap_FLOAT32( pc + 4 )
- ) );
-}
-
-void __glXDispSwap_PointParameterfvEXT(GLbyte * pc)
-{
- const GLenum pname = (GLenum )bswap_ENUM ( pc + 0 );
- const GLfloat * params;
-
- params = (const GLfloat *) bswap_32_array( (uint32_t *) (pc + 4), __glPointParameterfvEXT_size(pname) );
-
- CALL_PointParameterfvEXT( GET_DISPATCH(), (
- pname,
- params
- ) );
-}
-
-void __glXDispSwap_SecondaryColor3bvEXT(GLbyte * pc)
-{
- CALL_SecondaryColor3bvEXT( GET_DISPATCH(), (
- (const GLbyte *)(pc + 0)
- ) );
-}
-
-void __glXDispSwap_SecondaryColor3dvEXT(GLbyte * pc)
-{
-#ifdef __GLX_ALIGN64
- if ((unsigned long)(pc) & 7) {
- (void) memmove(pc-4, pc, 24);
- pc -= 4;
- }
-#endif
-
- CALL_SecondaryColor3dvEXT( GET_DISPATCH(), (
- (const GLdouble *)bswap_64_array( (uint64_t *) (pc + 0), 3 )
- ) );
-}
-
-void __glXDispSwap_SecondaryColor3fvEXT(GLbyte * pc)
-{
- CALL_SecondaryColor3fvEXT( GET_DISPATCH(), (
- (const GLfloat *)bswap_32_array( (uint32_t *) (pc + 0), 3 )
- ) );
-}
-
-void __glXDispSwap_SecondaryColor3ivEXT(GLbyte * pc)
-{
- CALL_SecondaryColor3ivEXT( GET_DISPATCH(), (
- (const GLint *)bswap_32_array( (uint32_t *) (pc + 0), 3 )
- ) );
-}
-
-void __glXDispSwap_SecondaryColor3svEXT(GLbyte * pc)
-{
- CALL_SecondaryColor3svEXT( GET_DISPATCH(), (
- (const GLshort *)bswap_16_array( (uint16_t *) (pc + 0), 3 )
- ) );
-}
-
-void __glXDispSwap_SecondaryColor3ubvEXT(GLbyte * pc)
-{
- CALL_SecondaryColor3ubvEXT( GET_DISPATCH(), (
- (const GLubyte *)(pc + 0)
- ) );
-}
-
-void __glXDispSwap_SecondaryColor3uivEXT(GLbyte * pc)
-{
- CALL_SecondaryColor3uivEXT( GET_DISPATCH(), (
- (const GLuint *)bswap_32_array( (uint32_t *) (pc + 0), 3 )
- ) );
-}
-
-void __glXDispSwap_SecondaryColor3usvEXT(GLbyte * pc)
-{
- CALL_SecondaryColor3usvEXT( GET_DISPATCH(), (
- (const GLushort *)bswap_16_array( (uint16_t *) (pc + 0), 3 )
- ) );
-}
-
-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;
- 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_AreProgramsResidentNV( GET_DISPATCH(), (
- n,
- (const GLuint *)bswap_32_array( (uint32_t *) (pc + 4), 0 ),
- residences
- ) );
- __glXSendReplySwap(cl->client, residences, n, 1, GL_FALSE, retval);
- error = Success;
- }
-
- return error;
-}
-
-void __glXDispSwap_BindProgramNV(GLbyte * pc)
-{
- CALL_BindProgramNV( GET_DISPATCH(), (
- (GLenum )bswap_ENUM ( pc + 0 ),
- (GLuint )bswap_CARD32 ( pc + 4 )
- ) );
-}
-
-int __glXDispSwap_DeleteProgramsNV(__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 );
-
- CALL_DeleteProgramsNV( GET_DISPATCH(), (
- n,
- (const GLuint *)bswap_32_array( (uint32_t *) (pc + 4), 0 )
- ) );
- error = Success;
- }
-
- return error;
-}
-
-void __glXDispSwap_ExecuteProgramNV(GLbyte * pc)
-{
- CALL_ExecuteProgramNV( GET_DISPATCH(), (
- (GLenum )bswap_ENUM ( pc + 0 ),
- (GLuint )bswap_CARD32 ( pc + 4 ),
- (const GLfloat *)bswap_32_array( (uint32_t *) (pc + 8), 4 )
- ) );
-}
-
-int __glXDispSwap_GenProgramsNV(__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 * programs = __glXGetAnswerBuffer(cl, n * 4, answerBuffer, sizeof(answerBuffer), 4);
- CALL_GenProgramsNV( GET_DISPATCH(), (
- n,
- programs
- ) );
- (void) bswap_32_array( (uint32_t *) programs, n );
- __glXSendReplySwap(cl->client, programs, n, 4, GL_TRUE, 0);
- error = Success;
- }
-
- return error;
-}
-
-int __glXDispSwap_GetProgramParameterdvNV(__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_GetProgramParameterdvNV( GET_DISPATCH(), (
- (GLenum )bswap_ENUM ( pc + 0 ),
- (GLuint )bswap_CARD32 ( pc + 4 ),
- (GLenum )bswap_ENUM ( pc + 8 ),
- params
- ) );
- (void) bswap_64_array( (uint64_t *) params, 4 );
- __glXSendReplySwap(cl->client, params, 4, 8, GL_FALSE, 0);
- error = Success;
- }
-
- return error;
-}
-
-int __glXDispSwap_GetProgramParameterfvNV(__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_GetProgramParameterfvNV( GET_DISPATCH(), (
- (GLenum )bswap_ENUM ( pc + 0 ),
- (GLuint )bswap_CARD32 ( pc + 4 ),
- (GLenum )bswap_ENUM ( pc + 8 ),
- params
- ) );
- (void) bswap_32_array( (uint32_t *) params, 4 );
- __glXSendReplySwap(cl->client, params, 4, 4, GL_FALSE, 0);
- error = Success;
- }
-
- return error;
-}
-
-int __glXDispSwap_GetProgramivNV(__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 = __glGetProgramivNV_size(pname);
- GLint answerBuffer[200];
- GLint * params = __glXGetAnswerBuffer(cl, compsize * 4, answerBuffer, sizeof(answerBuffer), 4);
-
- if (params == NULL) return BadAlloc;
- __glXClearErrorOccured();
-
- CALL_GetProgramivNV( 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_GetTrackMatrixivNV(__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_GetTrackMatrixivNV( GET_DISPATCH(), (
- (GLenum )bswap_ENUM ( pc + 0 ),
- (GLuint )bswap_CARD32 ( 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_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;
-}
-
-int __glXDispSwap_IsProgramNV(__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_IsProgramNV( GET_DISPATCH(), (
- (GLuint )bswap_CARD32 ( pc + 0 )
- ) );
- __glXSendReplySwap(cl->client, dummy_answer, 0, 0, GL_FALSE, retval);
- error = Success;
- }
-
- return error;
-}
-
-void __glXDispSwap_LoadProgramNV(GLbyte * pc)
-{
- const GLsizei len = (GLsizei )bswap_CARD32 ( pc + 8 );
-
- CALL_LoadProgramNV( GET_DISPATCH(), (
- (GLenum )bswap_ENUM ( pc + 0 ),
- (GLuint )bswap_CARD32 ( pc + 4 ),
- len,
- (const GLubyte *)(pc + 12)
- ) );
-}
-
-void __glXDispSwap_ProgramParameters4dvNV(GLbyte * pc)
-{
- const GLuint num = (GLuint )bswap_CARD32 ( pc + 8 );
-
-#ifdef __GLX_ALIGN64
- const GLuint cmdlen = 16 + __GLX_PAD((num * 32)) - 4;
- if ((unsigned long)(pc) & 7) {
- (void) memmove(pc-4, pc, cmdlen);
- pc -= 4;
- }
-#endif
-
- CALL_ProgramParameters4dvNV( GET_DISPATCH(), (
- (GLenum )bswap_ENUM ( pc + 0 ),
- (GLuint )bswap_CARD32 ( pc + 4 ),
- num,
- (const GLdouble *)bswap_64_array( (uint64_t *) (pc + 12), 0 )
- ) );
-}
-
-void __glXDispSwap_ProgramParameters4fvNV(GLbyte * pc)
-{
- const GLuint num = (GLuint )bswap_CARD32 ( pc + 8 );
-
- CALL_ProgramParameters4fvNV( GET_DISPATCH(), (
- (GLenum )bswap_ENUM ( pc + 0 ),
- (GLuint )bswap_CARD32 ( pc + 4 ),
- num,
- (const GLfloat *)bswap_32_array( (uint32_t *) (pc + 12), 0 )
- ) );
-}
-
-void __glXDispSwap_RequestResidentProgramsNV(GLbyte * pc)
-{
- const GLsizei n = (GLsizei )bswap_CARD32 ( pc + 0 );
-
- CALL_RequestResidentProgramsNV( GET_DISPATCH(), (
- n,
- (const GLuint *)bswap_32_array( (uint32_t *) (pc + 4), 0 )
- ) );
-}
-
-void __glXDispSwap_TrackMatrixNV(GLbyte * pc)
-{
- CALL_TrackMatrixNV( GET_DISPATCH(), (
- (GLenum )bswap_ENUM ( pc + 0 ),
- (GLuint )bswap_CARD32 ( pc + 4 ),
- (GLenum )bswap_ENUM ( pc + 8 ),
- (GLenum )bswap_ENUM ( pc + 12 )
- ) );
-}
-
-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)
- ) );
-}
-
-void __glXDispSwap_VertexAttribs1dvNV(GLbyte * pc)
-{
- const GLsizei n = (GLsizei )bswap_CARD32 ( pc + 4 );
-
-#ifdef __GLX_ALIGN64
- const GLuint cmdlen = 12 + __GLX_PAD((n * 8)) - 4;
- if ((unsigned long)(pc) & 7) {
- (void) memmove(pc-4, pc, cmdlen);
- pc -= 4;
- }
-#endif
-
- CALL_VertexAttribs1dvNV( GET_DISPATCH(), (
- (GLuint )bswap_CARD32 ( pc + 0 ),
- n,
- (const GLdouble *)bswap_64_array( (uint64_t *) (pc + 8), 0 )
- ) );
-}
-
-void __glXDispSwap_VertexAttribs1fvNV(GLbyte * pc)
-{
- const GLsizei n = (GLsizei )bswap_CARD32 ( pc + 4 );
-
- CALL_VertexAttribs1fvNV( GET_DISPATCH(), (
- (GLuint )bswap_CARD32 ( pc + 0 ),
- n,
- (const GLfloat *)bswap_32_array( (uint32_t *) (pc + 8), 0 )
- ) );
-}
-
-void __glXDispSwap_VertexAttribs1svNV(GLbyte * pc)
-{
- const GLsizei n = (GLsizei )bswap_CARD32 ( pc + 4 );
-
- CALL_VertexAttribs1svNV( GET_DISPATCH(), (
- (GLuint )bswap_CARD32 ( pc + 0 ),
- n,
- (const GLshort *)bswap_16_array( (uint16_t *) (pc + 8), 0 )
- ) );
-}
-
-void __glXDispSwap_VertexAttribs2dvNV(GLbyte * pc)
-{
- const GLsizei n = (GLsizei )bswap_CARD32 ( pc + 4 );
-
-#ifdef __GLX_ALIGN64
- const GLuint cmdlen = 12 + __GLX_PAD((n * 16)) - 4;
- if ((unsigned long)(pc) & 7) {
- (void) memmove(pc-4, pc, cmdlen);
- pc -= 4;
- }
-#endif
-
- CALL_VertexAttribs2dvNV( GET_DISPATCH(), (
- (GLuint )bswap_CARD32 ( pc + 0 ),
- n,
- (const GLdouble *)bswap_64_array( (uint64_t *) (pc + 8), 0 )
- ) );
-}
-
-void __glXDispSwap_VertexAttribs2fvNV(GLbyte * pc)
-{
- const GLsizei n = (GLsizei )bswap_CARD32 ( pc + 4 );
-
- CALL_VertexAttribs2fvNV( GET_DISPATCH(), (
- (GLuint )bswap_CARD32 ( pc + 0 ),
- n,
- (const GLfloat *)bswap_32_array( (uint32_t *) (pc + 8), 0 )
- ) );
-}
-
-void __glXDispSwap_VertexAttribs2svNV(GLbyte * pc)
-{
- const GLsizei n = (GLsizei )bswap_CARD32 ( pc + 4 );
-
- CALL_VertexAttribs2svNV( GET_DISPATCH(), (
- (GLuint )bswap_CARD32 ( pc + 0 ),
- n,
- (const GLshort *)bswap_16_array( (uint16_t *) (pc + 8), 0 )
- ) );
-}
-
-void __glXDispSwap_VertexAttribs3dvNV(GLbyte * pc)
-{
- const GLsizei n = (GLsizei )bswap_CARD32 ( pc + 4 );
-
-#ifdef __GLX_ALIGN64
- const GLuint cmdlen = 12 + __GLX_PAD((n * 24)) - 4;
- if ((unsigned long)(pc) & 7) {
- (void) memmove(pc-4, pc, cmdlen);
- pc -= 4;
- }
-#endif
-
- CALL_VertexAttribs3dvNV( GET_DISPATCH(), (
- (GLuint )bswap_CARD32 ( pc + 0 ),
- n,
- (const GLdouble *)bswap_64_array( (uint64_t *) (pc + 8), 0 )
- ) );
-}
-
-void __glXDispSwap_VertexAttribs3fvNV(GLbyte * pc)
-{
- const GLsizei n = (GLsizei )bswap_CARD32 ( pc + 4 );
-
- CALL_VertexAttribs3fvNV( GET_DISPATCH(), (
- (GLuint )bswap_CARD32 ( pc + 0 ),
- n,
- (const GLfloat *)bswap_32_array( (uint32_t *) (pc + 8), 0 )
- ) );
-}
-
-void __glXDispSwap_VertexAttribs3svNV(GLbyte * pc)
-{
- const GLsizei n = (GLsizei )bswap_CARD32 ( pc + 4 );
-
- CALL_VertexAttribs3svNV( GET_DISPATCH(), (
- (GLuint )bswap_CARD32 ( pc + 0 ),
- n,
- (const GLshort *)bswap_16_array( (uint16_t *) (pc + 8), 0 )
- ) );
-}
-
-void __glXDispSwap_VertexAttribs4dvNV(GLbyte * pc)
-{
- const GLsizei n = (GLsizei )bswap_CARD32 ( pc + 4 );
-
-#ifdef __GLX_ALIGN64
- const GLuint cmdlen = 12 + __GLX_PAD((n * 32)) - 4;
- if ((unsigned long)(pc) & 7) {
- (void) memmove(pc-4, pc, cmdlen);
- pc -= 4;
- }
-#endif
-
- CALL_VertexAttribs4dvNV( GET_DISPATCH(), (
- (GLuint )bswap_CARD32 ( pc + 0 ),
- n,
- (const GLdouble *)bswap_64_array( (uint64_t *) (pc + 8), 0 )
- ) );
-}
-
-void __glXDispSwap_VertexAttribs4fvNV(GLbyte * pc)
-{
- const GLsizei n = (GLsizei )bswap_CARD32 ( pc + 4 );
-
- CALL_VertexAttribs4fvNV( GET_DISPATCH(), (
- (GLuint )bswap_CARD32 ( pc + 0 ),
- n,
- (const GLfloat *)bswap_32_array( (uint32_t *) (pc + 8), 0 )
- ) );
-}
-
-void __glXDispSwap_VertexAttribs4svNV(GLbyte * pc)
-{
- const GLsizei n = (GLsizei )bswap_CARD32 ( pc + 4 );
-
- CALL_VertexAttribs4svNV( GET_DISPATCH(), (
- (GLuint )bswap_CARD32 ( pc + 0 ),
- n,
- (const GLshort *)bswap_16_array( (uint16_t *) (pc + 8), 0 )
- ) );
-}
-
-void __glXDispSwap_VertexAttribs4ubvNV(GLbyte * pc)
-{
- const GLsizei n = (GLsizei )bswap_CARD32 ( pc + 4 );
-
- CALL_VertexAttribs4ubvNV( GET_DISPATCH(), (
- (GLuint )bswap_CARD32 ( pc + 0 ),
- n,
- (const GLubyte *)(pc + 8)
- ) );
-}
-
-void __glXDispSwap_PointParameteriNV(GLbyte * pc)
-{
- CALL_PointParameteriNV( GET_DISPATCH(), (
- (GLenum )bswap_ENUM ( pc + 0 ),
- (GLint )bswap_CARD32 ( pc + 4 )
- ) );
-}
-
-void __glXDispSwap_PointParameterivNV(GLbyte * pc)
-{
- const GLenum pname = (GLenum )bswap_ENUM ( pc + 0 );
- const GLint * params;
-
- params = (const GLint *) bswap_32_array( (uint32_t *) (pc + 4), __glPointParameterivNV_size(pname) );
-
- CALL_PointParameterivNV( GET_DISPATCH(), (
- pname,
- params
- ) );
-}
-
-void __glXDispSwap_ActiveStencilFaceEXT(GLbyte * pc)
-{
- CALL_ActiveStencilFaceEXT( GET_DISPATCH(), (
- (GLenum )bswap_ENUM ( pc + 0 )
- ) );
-}
-
-int __glXDispSwap_GetProgramNamedParameterdvNV(__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 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;
- }
-
- return error;
-}
-
-int __glXDispSwap_GetProgramNamedParameterfvNV(__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 len = (GLsizei )bswap_CARD32 ( pc + 4 );
-
- GLfloat params[4];
- CALL_GetProgramNamedParameterfvNV( GET_DISPATCH(), (
- (GLuint )bswap_CARD32 ( pc + 0 ),
- len,
- (const GLubyte *)(pc + 8),
- params
- ) );
- (void) bswap_32_array( (uint32_t *) params, 4 );
- __glXSendReplySwap(cl->client, params, 4, 4, GL_TRUE, 0);
- error = Success;
- }
-
- return error;
-}
-
-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 )
- ) );
-}
-
-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_BlendEquationSeparateEXT(GLbyte * pc)
-{
- CALL_BlendEquationSeparateEXT( GET_DISPATCH(), (
- (GLenum )bswap_ENUM ( pc + 0 ),
- (GLenum )bswap_ENUM ( pc + 4 )
- ) );
-}
-
-void __glXDispSwap_BindFramebufferEXT(GLbyte * pc)
-{
- CALL_BindFramebufferEXT( GET_DISPATCH(), (
- (GLenum )bswap_ENUM ( pc + 0 ),
- (GLuint )bswap_CARD32 ( pc + 4 )
- ) );
-}
-
-void __glXDispSwap_BindRenderbufferEXT(GLbyte * pc)
-{
- CALL_BindRenderbufferEXT( GET_DISPATCH(), (
- (GLenum )bswap_ENUM ( pc + 0 ),
- (GLuint )bswap_CARD32 ( pc + 4 )
- ) );
-}
-
-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 );
-
- CALL_DeleteRenderbuffersEXT( GET_DISPATCH(), (
- n,
- (const GLuint *)bswap_32_array( (uint32_t *) (pc + 4), 0 )
- ) );
-}
-
-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;
- 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 * renderbuffers = __glXGetAnswerBuffer(cl, n * 4, answerBuffer, sizeof(answerBuffer), 4);
- CALL_GenRenderbuffersEXT( GET_DISPATCH(), (
- n,
- renderbuffers
- ) );
- (void) bswap_32_array( (uint32_t *) renderbuffers, n );
- __glXSendReplySwap(cl->client, renderbuffers, n, 4, GL_TRUE, 0);
- error = Success;
- }
-
- return error;
-}
-
-void __glXDispSwap_GenerateMipmapEXT(GLbyte * pc)
-{
- 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;
- int error;
- __GLXcontext * const cx = __glXForceCurrent(cl, bswap_CARD32( &req->contextTag ), &error);
-
- pc += __GLX_VENDPRIV_HDR_SIZE;
- if ( cx != NULL ) {
- GLint params[1];
- CALL_GetRenderbufferParameterivEXT( GET_DISPATCH(), (
- (GLenum )bswap_ENUM ( pc + 0 ),
- (GLenum )bswap_ENUM ( pc + 4 ),
- params
- ) );
- (void) bswap_32_array( (uint32_t *) params, 1 );
- __glXSendReplySwap(cl->client, params, 1, 4, GL_FALSE, 0);
- error = Success;
- }
-
- return error;
-}
-
-int __glXDispSwap_IsFramebufferEXT(__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_IsFramebufferEXT( GET_DISPATCH(), (
- (GLuint )bswap_CARD32 ( pc + 0 )
- ) );
- __glXSendReplySwap(cl->client, dummy_answer, 0, 0, GL_FALSE, retval);
- error = Success;
- }
-
- return error;
-}
-
-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_RenderbufferStorageEXT(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 )
- ) );
-}
-
diff --git a/src/glx/x11/indirect_reqsize.c b/src/glx/x11/indirect_reqsize.c
deleted file mode 100644
index 954eecd972..0000000000
--- a/src/glx/x11/indirect_reqsize.c
+++ /dev/null
@@ -1,832 +0,0 @@
-/* DO NOT EDIT - This file generated automatically by glX_proto_size.py (from Mesa) script */
-
-/*
- * (C) Copyright IBM Corporation 2005
- * 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 <GL/gl.h>
-#include "glxserver.h"
-#include "glxbyteorder.h"
-#include "indirect_size.h"
-#include "indirect_reqsize.h"
-
-#define __GLX_PAD(x) (((x) + 3) & ~3)
-
-#if defined(__CYGWIN__) || defined(__MINGW32__)
-# undef HAVE_ALIAS
-#endif
-#ifdef HAVE_ALIAS
-# define ALIAS2(from,to) \
- GLint __glX ## from ## ReqSize( const GLbyte * pc, Bool swap ) \
- __attribute__ ((alias( # to )));
-# define ALIAS(from,to) ALIAS2( from, __glX ## to ## ReqSize )
-#else
-# define ALIAS(from,to) \
- GLint __glX ## from ## ReqSize( const GLbyte * pc, Bool swap ) \
- { return __glX ## to ## ReqSize( pc, swap ); }
-#endif
-
-
-int
-__glXCallListsReqSize(const GLbyte *pc, Bool swap)
-{
- GLsizei n = *(GLsizei *) (pc + 0);
- GLenum type = *(GLenum *) (pc + 4);
- GLsizei compsize;
-
- if (swap) {
- n = bswap_32(n);
- type = bswap_32(type);
- }
-
- compsize = __glCallLists_size(type);
- return __GLX_PAD((compsize * n));
-}
-
-int
-__glXBitmapReqSize(const GLbyte *pc, Bool swap)
-{
- GLint row_length = *(GLint *) (pc + 4);
- GLint image_height = 0;
- GLint skip_images = 0;
- GLint skip_rows = *(GLint *) (pc + 8);
- GLint alignment = *(GLint *) (pc + 16);
- GLsizei width = *(GLsizei *) (pc + 20);
- GLsizei height = *(GLsizei *) (pc + 24);
-
- if (swap) {
- row_length = bswap_32(row_length);
- skip_rows = bswap_32(skip_rows);
- alignment = bswap_32(alignment);
- width = bswap_32(width);
- height = bswap_32(height);
- }
-
- return __glXImageSize(GL_COLOR_INDEX, GL_BITMAP, 0, width, height, 1,
- image_height, row_length, skip_images,
- skip_rows, alignment);
-}
-
-int
-__glXFogfvReqSize(const GLbyte *pc, Bool swap)
-{
- GLenum pname = *(GLenum *) (pc + 0);
- GLsizei compsize;
-
- if (swap) {
- pname = bswap_32(pname);
- }
-
- compsize = __glFogfv_size(pname);
- return __GLX_PAD((compsize * 4));
-}
-
-int
-__glXLightfvReqSize(const GLbyte *pc, Bool swap)
-{
- GLenum pname = *(GLenum *) (pc + 4);
- GLsizei compsize;
-
- if (swap) {
- pname = bswap_32(pname);
- }
-
- compsize = __glLightfv_size(pname);
- return __GLX_PAD((compsize * 4));
-}
-
-int
-__glXLightModelfvReqSize(const GLbyte *pc, Bool swap)
-{
- GLenum pname = *(GLenum *) (pc + 0);
- GLsizei compsize;
-
- if (swap) {
- pname = bswap_32(pname);
- }
-
- compsize = __glLightModelfv_size(pname);
- return __GLX_PAD((compsize * 4));
-}
-
-int
-__glXMaterialfvReqSize(const GLbyte *pc, Bool swap)
-{
- GLenum pname = *(GLenum *) (pc + 4);
- GLsizei compsize;
-
- if (swap) {
- pname = bswap_32(pname);
- }
-
- compsize = __glMaterialfv_size(pname);
- return __GLX_PAD((compsize * 4));
-}
-
-int
-__glXPolygonStippleReqSize(const GLbyte *pc, Bool swap)
-{
- GLint row_length = *(GLint *) (pc + 4);
- GLint image_height = 0;
- GLint skip_images = 0;
- GLint skip_rows = *(GLint *) (pc + 8);
- GLint alignment = *(GLint *) (pc + 16);
-
- if (swap) {
- row_length = bswap_32(row_length);
- skip_rows = bswap_32(skip_rows);
- alignment = bswap_32(alignment);
- }
-
- return __glXImageSize(GL_COLOR_INDEX, GL_BITMAP, 0, 32, 32, 1,
- image_height, row_length, skip_images,
- skip_rows, alignment);
-}
-
-int
-__glXTexParameterfvReqSize(const GLbyte *pc, Bool swap)
-{
- GLenum pname = *(GLenum *) (pc + 4);
- GLsizei compsize;
-
- if (swap) {
- pname = bswap_32(pname);
- }
-
- compsize = __glTexParameterfv_size(pname);
- return __GLX_PAD((compsize * 4));
-}
-
-int
-__glXTexImage1DReqSize(const GLbyte *pc, Bool swap)
-{
- GLint row_length = *(GLint *) (pc + 4);
- GLint image_height = 0;
- GLint skip_images = 0;
- GLint skip_rows = *(GLint *) (pc + 8);
- GLint alignment = *(GLint *) (pc + 16);
- GLenum target = *(GLenum *) (pc + 20);
- GLsizei width = *(GLsizei *) (pc + 32);
- GLenum format = *(GLenum *) (pc + 44);
- GLenum type = *(GLenum *) (pc + 48);
-
- if (swap) {
- row_length = bswap_32(row_length);
- skip_rows = bswap_32(skip_rows);
- alignment = bswap_32(alignment);
- target = bswap_32(target);
- width = bswap_32(width);
- format = bswap_32(format);
- type = bswap_32(type);
- }
-
- return __glXImageSize(format, type, target, width, 1, 1,
- image_height, row_length, skip_images,
- skip_rows, alignment);
-}
-
-int
-__glXTexImage2DReqSize(const GLbyte *pc, Bool swap)
-{
- GLint row_length = *(GLint *) (pc + 4);
- GLint image_height = 0;
- GLint skip_images = 0;
- GLint skip_rows = *(GLint *) (pc + 8);
- GLint alignment = *(GLint *) (pc + 16);
- GLenum target = *(GLenum *) (pc + 20);
- GLsizei width = *(GLsizei *) (pc + 32);
- GLsizei height = *(GLsizei *) (pc + 36);
- GLenum format = *(GLenum *) (pc + 44);
- GLenum type = *(GLenum *) (pc + 48);
-
- if (swap) {
- row_length = bswap_32(row_length);
- skip_rows = bswap_32(skip_rows);
- alignment = bswap_32(alignment);
- target = bswap_32(target);
- width = bswap_32(width);
- height = bswap_32(height);
- format = bswap_32(format);
- type = bswap_32(type);
- }
-
- return __glXImageSize(format, type, target, width, height, 1,
- image_height, row_length, skip_images,
- skip_rows, alignment);
-}
-
-int
-__glXTexEnvfvReqSize(const GLbyte *pc, Bool swap)
-{
- GLenum pname = *(GLenum *) (pc + 4);
- GLsizei compsize;
-
- if (swap) {
- pname = bswap_32(pname);
- }
-
- compsize = __glTexEnvfv_size(pname);
- return __GLX_PAD((compsize * 4));
-}
-
-int
-__glXTexGendvReqSize(const GLbyte *pc, Bool swap)
-{
- GLenum pname = *(GLenum *) (pc + 4);
- GLsizei compsize;
-
- if (swap) {
- pname = bswap_32(pname);
- }
-
- compsize = __glTexGendv_size(pname);
- return __GLX_PAD((compsize * 8));
-}
-
-int
-__glXTexGenfvReqSize(const GLbyte *pc, Bool swap)
-{
- GLenum pname = *(GLenum *) (pc + 4);
- GLsizei compsize;
-
- if (swap) {
- pname = bswap_32(pname);
- }
-
- compsize = __glTexGenfv_size(pname);
- return __GLX_PAD((compsize * 4));
-}
-
-int
-__glXPixelMapfvReqSize(const GLbyte *pc, Bool swap)
-{
- GLsizei mapsize = *(GLsizei *) (pc + 4);
-
- if (swap) {
- mapsize = bswap_32(mapsize);
- }
-
- return __GLX_PAD((mapsize * 4));
-}
-
-int
-__glXPixelMapusvReqSize(const GLbyte *pc, Bool swap)
-{
- GLsizei mapsize = *(GLsizei *) (pc + 4);
-
- if (swap) {
- mapsize = bswap_32(mapsize);
- }
-
- return __GLX_PAD((mapsize * 2));
-}
-
-int
-__glXDrawPixelsReqSize(const GLbyte *pc, Bool swap)
-{
- GLint row_length = *(GLint *) (pc + 4);
- GLint image_height = 0;
- GLint skip_images = 0;
- GLint skip_rows = *(GLint *) (pc + 8);
- GLint alignment = *(GLint *) (pc + 16);
- GLsizei width = *(GLsizei *) (pc + 20);
- GLsizei height = *(GLsizei *) (pc + 24);
- GLenum format = *(GLenum *) (pc + 28);
- GLenum type = *(GLenum *) (pc + 32);
-
- if (swap) {
- row_length = bswap_32(row_length);
- skip_rows = bswap_32(skip_rows);
- alignment = bswap_32(alignment);
- width = bswap_32(width);
- height = bswap_32(height);
- format = bswap_32(format);
- type = bswap_32(type);
- }
-
- return __glXImageSize(format, type, 0, width, height, 1,
- image_height, row_length, skip_images,
- skip_rows, alignment);
-}
-
-int
-__glXPrioritizeTexturesReqSize(const GLbyte *pc, Bool swap)
-{
- GLsizei n = *(GLsizei *) (pc + 0);
-
- if (swap) {
- n = bswap_32(n);
- }
-
- return __GLX_PAD((n * 4) + (n * 4));
-}
-
-int
-__glXTexSubImage1DReqSize(const GLbyte *pc, Bool swap)
-{
- GLint row_length = *(GLint *) (pc + 4);
- GLint image_height = 0;
- GLint skip_images = 0;
- GLint skip_rows = *(GLint *) (pc + 8);
- GLint alignment = *(GLint *) (pc + 16);
- GLenum target = *(GLenum *) (pc + 20);
- GLsizei width = *(GLsizei *) (pc + 36);
- GLenum format = *(GLenum *) (pc + 44);
- GLenum type = *(GLenum *) (pc + 48);
-
- if (swap) {
- row_length = bswap_32(row_length);
- skip_rows = bswap_32(skip_rows);
- alignment = bswap_32(alignment);
- target = bswap_32(target);
- width = bswap_32(width);
- format = bswap_32(format);
- type = bswap_32(type);
- }
-
- return __glXImageSize(format, type, target, width, 1, 1,
- image_height, row_length, skip_images,
- skip_rows, alignment);
-}
-
-int
-__glXTexSubImage2DReqSize(const GLbyte *pc, Bool swap)
-{
- GLint row_length = *(GLint *) (pc + 4);
- GLint image_height = 0;
- GLint skip_images = 0;
- GLint skip_rows = *(GLint *) (pc + 8);
- GLint alignment = *(GLint *) (pc + 16);
- GLenum target = *(GLenum *) (pc + 20);
- GLsizei width = *(GLsizei *) (pc + 36);
- GLsizei height = *(GLsizei *) (pc + 40);
- GLenum format = *(GLenum *) (pc + 44);
- GLenum type = *(GLenum *) (pc + 48);
-
- if (swap) {
- row_length = bswap_32(row_length);
- skip_rows = bswap_32(skip_rows);
- alignment = bswap_32(alignment);
- target = bswap_32(target);
- width = bswap_32(width);
- height = bswap_32(height);
- format = bswap_32(format);
- type = bswap_32(type);
- }
-
- return __glXImageSize(format, type, target, width, height, 1,
- image_height, row_length, skip_images,
- skip_rows, alignment);
-}
-
-int
-__glXColorTableReqSize(const GLbyte *pc, Bool swap)
-{
- GLint row_length = *(GLint *) (pc + 4);
- GLint image_height = 0;
- GLint skip_images = 0;
- GLint skip_rows = *(GLint *) (pc + 8);
- GLint alignment = *(GLint *) (pc + 16);
- GLenum target = *(GLenum *) (pc + 20);
- GLsizei width = *(GLsizei *) (pc + 28);
- GLenum format = *(GLenum *) (pc + 32);
- GLenum type = *(GLenum *) (pc + 36);
-
- if (swap) {
- row_length = bswap_32(row_length);
- skip_rows = bswap_32(skip_rows);
- alignment = bswap_32(alignment);
- target = bswap_32(target);
- width = bswap_32(width);
- format = bswap_32(format);
- type = bswap_32(type);
- }
-
- return __glXImageSize(format, type, target, width, 1, 1,
- image_height, row_length, skip_images,
- skip_rows, alignment);
-}
-
-int
-__glXColorTableParameterfvReqSize(const GLbyte *pc, Bool swap)
-{
- GLenum pname = *(GLenum *) (pc + 4);
- GLsizei compsize;
-
- if (swap) {
- pname = bswap_32(pname);
- }
-
- compsize = __glColorTableParameterfv_size(pname);
- return __GLX_PAD((compsize * 4));
-}
-
-int
-__glXColorSubTableReqSize(const GLbyte *pc, Bool swap)
-{
- GLint row_length = *(GLint *) (pc + 4);
- GLint image_height = 0;
- GLint skip_images = 0;
- GLint skip_rows = *(GLint *) (pc + 8);
- GLint alignment = *(GLint *) (pc + 16);
- GLenum target = *(GLenum *) (pc + 20);
- GLsizei count = *(GLsizei *) (pc + 28);
- GLenum format = *(GLenum *) (pc + 32);
- GLenum type = *(GLenum *) (pc + 36);
-
- if (swap) {
- row_length = bswap_32(row_length);
- skip_rows = bswap_32(skip_rows);
- alignment = bswap_32(alignment);
- target = bswap_32(target);
- count = bswap_32(count);
- format = bswap_32(format);
- type = bswap_32(type);
- }
-
- return __glXImageSize(format, type, target, count, 1, 1,
- image_height, row_length, skip_images,
- skip_rows, alignment);
-}
-
-int
-__glXConvolutionFilter1DReqSize(const GLbyte *pc, Bool swap)
-{
- GLint row_length = *(GLint *) (pc + 4);
- GLint image_height = 0;
- GLint skip_images = 0;
- GLint skip_rows = *(GLint *) (pc + 8);
- GLint alignment = *(GLint *) (pc + 16);
- GLenum target = *(GLenum *) (pc + 20);
- GLsizei width = *(GLsizei *) (pc + 28);
- GLenum format = *(GLenum *) (pc + 36);
- GLenum type = *(GLenum *) (pc + 40);
-
- if (swap) {
- row_length = bswap_32(row_length);
- skip_rows = bswap_32(skip_rows);
- alignment = bswap_32(alignment);
- target = bswap_32(target);
- width = bswap_32(width);
- format = bswap_32(format);
- type = bswap_32(type);
- }
-
- return __glXImageSize(format, type, target, width, 1, 1,
- image_height, row_length, skip_images,
- skip_rows, alignment);
-}
-
-int
-__glXConvolutionFilter2DReqSize(const GLbyte *pc, Bool swap)
-{
- GLint row_length = *(GLint *) (pc + 4);
- GLint image_height = 0;
- GLint skip_images = 0;
- GLint skip_rows = *(GLint *) (pc + 8);
- GLint alignment = *(GLint *) (pc + 16);
- GLenum target = *(GLenum *) (pc + 20);
- GLsizei width = *(GLsizei *) (pc + 28);
- GLsizei height = *(GLsizei *) (pc + 32);
- GLenum format = *(GLenum *) (pc + 36);
- GLenum type = *(GLenum *) (pc + 40);
-
- if (swap) {
- row_length = bswap_32(row_length);
- skip_rows = bswap_32(skip_rows);
- alignment = bswap_32(alignment);
- target = bswap_32(target);
- width = bswap_32(width);
- height = bswap_32(height);
- format = bswap_32(format);
- type = bswap_32(type);
- }
-
- return __glXImageSize(format, type, target, width, height, 1,
- image_height, row_length, skip_images,
- skip_rows, alignment);
-}
-
-int
-__glXConvolutionParameterfvReqSize(const GLbyte *pc, Bool swap)
-{
- GLenum pname = *(GLenum *) (pc + 4);
- GLsizei compsize;
-
- if (swap) {
- pname = bswap_32(pname);
- }
-
- compsize = __glConvolutionParameterfv_size(pname);
- return __GLX_PAD((compsize * 4));
-}
-
-int
-__glXTexImage3DReqSize(const GLbyte *pc, Bool swap)
-{
- GLint row_length = *(GLint *) (pc + 4);
- GLint image_height = *(GLint *) (pc + 8);
- GLint skip_rows = *(GLint *) (pc + 16);
- GLint skip_images = *(GLint *) (pc + 20);
- GLint alignment = *(GLint *) (pc + 32);
- GLenum target = *(GLenum *) (pc + 36);
- GLsizei width = *(GLsizei *) (pc + 48);
- GLsizei height = *(GLsizei *) (pc + 52);
- GLsizei depth = *(GLsizei *) (pc + 56);
- GLenum format = *(GLenum *) (pc + 68);
- GLenum type = *(GLenum *) (pc + 72);
-
- if (swap) {
- row_length = bswap_32(row_length);
- image_height = bswap_32(image_height);
- skip_rows = bswap_32(skip_rows);
- skip_images = bswap_32(skip_images);
- alignment = bswap_32(alignment);
- target = bswap_32(target);
- width = bswap_32(width);
- height = bswap_32(height);
- depth = bswap_32(depth);
- format = bswap_32(format);
- type = bswap_32(type);
- }
-
- return __glXImageSize(format, type, target, width, height, depth,
- image_height, row_length, skip_images,
- skip_rows, alignment);
-}
-
-int
-__glXTexSubImage3DReqSize(const GLbyte *pc, Bool swap)
-{
- GLint row_length = *(GLint *) (pc + 4);
- GLint image_height = *(GLint *) (pc + 8);
- GLint skip_rows = *(GLint *) (pc + 16);
- GLint skip_images = *(GLint *) (pc + 20);
- GLint alignment = *(GLint *) (pc + 32);
- GLenum target = *(GLenum *) (pc + 36);
- GLsizei width = *(GLsizei *) (pc + 60);
- GLsizei height = *(GLsizei *) (pc + 64);
- GLsizei depth = *(GLsizei *) (pc + 68);
- GLenum format = *(GLenum *) (pc + 76);
- GLenum type = *(GLenum *) (pc + 80);
-
- if (swap) {
- row_length = bswap_32(row_length);
- image_height = bswap_32(image_height);
- skip_rows = bswap_32(skip_rows);
- skip_images = bswap_32(skip_images);
- alignment = bswap_32(alignment);
- target = bswap_32(target);
- width = bswap_32(width);
- height = bswap_32(height);
- depth = bswap_32(depth);
- format = bswap_32(format);
- type = bswap_32(type);
- }
-
- return __glXImageSize(format, type, target, width, height, depth,
- image_height, row_length, skip_images,
- skip_rows, alignment);
-}
-
-int
-__glXCompressedTexImage1DARBReqSize(const GLbyte *pc, Bool swap)
-{
- GLsizei imageSize = *(GLsizei *) (pc + 20);
-
- if (swap) {
- imageSize = bswap_32(imageSize);
- }
-
- return __GLX_PAD(imageSize);
-}
-
-int
-__glXCompressedTexImage2DARBReqSize(const GLbyte *pc, Bool swap)
-{
- GLsizei imageSize = *(GLsizei *) (pc + 24);
-
- if (swap) {
- imageSize = bswap_32(imageSize);
- }
-
- return __GLX_PAD(imageSize);
-}
-
-int
-__glXCompressedTexImage3DARBReqSize(const GLbyte *pc, Bool swap)
-{
- GLsizei imageSize = *(GLsizei *) (pc + 28);
-
- if (swap) {
- imageSize = bswap_32(imageSize);
- }
-
- return __GLX_PAD(imageSize);
-}
-
-int
-__glXCompressedTexSubImage3DARBReqSize(const GLbyte *pc, Bool swap)
-{
- GLsizei imageSize = *(GLsizei *) (pc + 36);
-
- if (swap) {
- imageSize = bswap_32(imageSize);
- }
-
- return __GLX_PAD(imageSize);
-}
-
-int
-__glXProgramStringARBReqSize(const GLbyte *pc, Bool swap)
-{
- GLsizei len = *(GLsizei *) (pc + 8);
-
- if (swap) {
- len = bswap_32(len);
- }
-
- return __GLX_PAD(len);
-}
-
-int
-__glXDrawBuffersARBReqSize(const GLbyte *pc, Bool swap)
-{
- GLsizei n = *(GLsizei *) (pc + 0);
-
- if (swap) {
- n = bswap_32(n);
- }
-
- return __GLX_PAD((n * 4));
-}
-
-int
-__glXPointParameterfvEXTReqSize(const GLbyte *pc, Bool swap)
-{
- GLenum pname = *(GLenum *) (pc + 0);
- GLsizei compsize;
-
- if (swap) {
- pname = bswap_32(pname);
- }
-
- compsize = __glPointParameterfvEXT_size(pname);
- return __GLX_PAD((compsize * 4));
-}
-
-int
-__glXProgramParameters4dvNVReqSize(const GLbyte *pc, Bool swap)
-{
- GLuint num = *(GLuint *) (pc + 8);
-
- if (swap) {
- num = bswap_32(num);
- }
-
- return __GLX_PAD((num * 32));
-}
-
-int
-__glXProgramParameters4fvNVReqSize(const GLbyte *pc, Bool swap)
-{
- GLuint num = *(GLuint *) (pc + 8);
-
- if (swap) {
- num = bswap_32(num);
- }
-
- return __GLX_PAD((num * 16));
-}
-
-int
-__glXVertexAttribs1dvNVReqSize(const GLbyte *pc, Bool swap)
-{
- GLsizei n = *(GLsizei *) (pc + 4);
-
- if (swap) {
- n = bswap_32(n);
- }
-
- return __GLX_PAD((n * 8));
-}
-
-int
-__glXVertexAttribs2dvNVReqSize(const GLbyte *pc, Bool swap)
-{
- GLsizei n = *(GLsizei *) (pc + 4);
-
- if (swap) {
- n = bswap_32(n);
- }
-
- return __GLX_PAD((n * 16));
-}
-
-int
-__glXVertexAttribs3dvNVReqSize(const GLbyte *pc, Bool swap)
-{
- GLsizei n = *(GLsizei *) (pc + 4);
-
- if (swap) {
- n = bswap_32(n);
- }
-
- return __GLX_PAD((n * 24));
-}
-
-int
-__glXVertexAttribs3fvNVReqSize(const GLbyte *pc, Bool swap)
-{
- GLsizei n = *(GLsizei *) (pc + 4);
-
- if (swap) {
- n = bswap_32(n);
- }
-
- return __GLX_PAD((n * 12));
-}
-
-int
-__glXVertexAttribs3svNVReqSize(const GLbyte *pc, Bool swap)
-{
- GLsizei n = *(GLsizei *) (pc + 4);
-
- if (swap) {
- n = bswap_32(n);
- }
-
- return __GLX_PAD((n * 6));
-}
-
-int
-__glXVertexAttribs4dvNVReqSize(const GLbyte *pc, Bool swap)
-{
- GLsizei n = *(GLsizei *) (pc + 4);
-
- if (swap) {
- n = bswap_32(n);
- }
-
- return __GLX_PAD((n * 32));
-}
-
-int
-__glXProgramNamedParameter4fvNVReqSize(const GLbyte *pc, Bool swap)
-{
- GLsizei len = *(GLsizei *) (pc + 4);
-
- if (swap) {
- len = bswap_32(len);
- }
-
- return __GLX_PAD(len);
-}
-
-ALIAS(Fogiv, Fogfv)
- ALIAS(Lightiv, Lightfv)
- ALIAS(LightModeliv, LightModelfv)
- ALIAS(Materialiv, Materialfv)
- ALIAS(TexParameteriv, TexParameterfv)
- ALIAS(TexEnviv, TexEnvfv)
- ALIAS(TexGeniv, TexGenfv)
- ALIAS(PixelMapuiv, PixelMapfv)
- ALIAS(ColorTableParameteriv, ColorTableParameterfv)
- ALIAS(ConvolutionParameteriv, ConvolutionParameterfv)
- ALIAS(CompressedTexSubImage1DARB, CompressedTexImage1DARB)
- ALIAS(CompressedTexSubImage2DARB, CompressedTexImage3DARB)
- ALIAS(LoadProgramNV, ProgramStringARB)
- ALIAS(RequestResidentProgramsNV, DrawBuffersARB)
- ALIAS(VertexAttribs1fvNV, PixelMapfv)
- ALIAS(VertexAttribs1svNV, PixelMapusv)
- ALIAS(VertexAttribs2fvNV, VertexAttribs1dvNV)
- ALIAS(VertexAttribs2svNV, PixelMapfv)
- ALIAS(VertexAttribs4fvNV, VertexAttribs2dvNV)
- ALIAS(VertexAttribs4svNV, VertexAttribs1dvNV)
- ALIAS(VertexAttribs4ubvNV, PixelMapfv)
- ALIAS(PointParameterivNV, PointParameterfvEXT)
- ALIAS(ProgramNamedParameter4dvNV, CompressedTexSubImage3DARB)
- ALIAS(DeleteFramebuffersEXT, DrawBuffersARB)
- ALIAS(DeleteRenderbuffersEXT, DrawBuffersARB)
diff --git a/src/glx/x11/indirect_reqsize.h b/src/glx/x11/indirect_reqsize.h
deleted file mode 100644
index 26211ee5ca..0000000000
--- a/src/glx/x11/indirect_reqsize.h
+++ /dev/null
@@ -1,121 +0,0 @@
-/* DO NOT EDIT - This file generated automatically by glX_proto_size.py (from Mesa) script */
-
-/*
- * (C) Copyright IBM Corporation 2005
- * 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.
- */
-
-#if !defined( _INDIRECT_REQSIZE_H_ )
-# define _INDIRECT_REQSIZE_H_
-
-# if (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 3)) && defined(__ELF__)
-# define HIDDEN __attribute__((visibility("hidden")))
-# else
-# define HIDDEN
-# endif
-
-# if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 96)
-# define PURE __attribute__((pure))
-# else
-# define PURE
-# endif
-
-extern PURE HIDDEN int __glXCallListsReqSize(const GLbyte *pc, Bool swap);
-extern PURE HIDDEN int __glXBitmapReqSize(const GLbyte *pc, Bool swap);
-extern PURE HIDDEN int __glXFogfvReqSize(const GLbyte *pc, Bool swap);
-extern PURE HIDDEN int __glXFogivReqSize(const GLbyte *pc, Bool swap);
-extern PURE HIDDEN int __glXLightfvReqSize(const GLbyte *pc, Bool swap);
-extern PURE HIDDEN int __glXLightivReqSize(const GLbyte *pc, Bool swap);
-extern PURE HIDDEN int __glXLightModelfvReqSize(const GLbyte *pc, Bool swap);
-extern PURE HIDDEN int __glXLightModelivReqSize(const GLbyte *pc, Bool swap);
-extern PURE HIDDEN int __glXMaterialfvReqSize(const GLbyte *pc, Bool swap);
-extern PURE HIDDEN int __glXMaterialivReqSize(const GLbyte *pc, Bool swap);
-extern PURE HIDDEN int __glXPolygonStippleReqSize(const GLbyte *pc, Bool swap);
-extern PURE HIDDEN int __glXTexParameterfvReqSize(const GLbyte *pc, Bool swap);
-extern PURE HIDDEN int __glXTexParameterivReqSize(const GLbyte *pc, Bool swap);
-extern PURE HIDDEN int __glXTexImage1DReqSize(const GLbyte *pc, Bool swap);
-extern PURE HIDDEN int __glXTexImage2DReqSize(const GLbyte *pc, Bool swap);
-extern PURE HIDDEN int __glXTexEnvfvReqSize(const GLbyte *pc, Bool swap);
-extern PURE HIDDEN int __glXTexEnvivReqSize(const GLbyte *pc, Bool swap);
-extern PURE HIDDEN int __glXTexGendvReqSize(const GLbyte *pc, Bool swap);
-extern PURE HIDDEN int __glXTexGenfvReqSize(const GLbyte *pc, Bool swap);
-extern PURE HIDDEN int __glXTexGenivReqSize(const GLbyte *pc, Bool swap);
-extern PURE HIDDEN int __glXMap1dReqSize(const GLbyte *pc, Bool swap);
-extern PURE HIDDEN int __glXMap1fReqSize(const GLbyte *pc, Bool swap);
-extern PURE HIDDEN int __glXMap2dReqSize(const GLbyte *pc, Bool swap);
-extern PURE HIDDEN int __glXMap2fReqSize(const GLbyte *pc, Bool swap);
-extern PURE HIDDEN int __glXPixelMapfvReqSize(const GLbyte *pc, Bool swap);
-extern PURE HIDDEN int __glXPixelMapuivReqSize(const GLbyte *pc, Bool swap);
-extern PURE HIDDEN int __glXPixelMapusvReqSize(const GLbyte *pc, Bool swap);
-extern PURE HIDDEN int __glXDrawPixelsReqSize(const GLbyte *pc, Bool swap);
-extern PURE HIDDEN int __glXDrawArraysReqSize(const GLbyte *pc, Bool swap);
-extern PURE HIDDEN int __glXPrioritizeTexturesReqSize(const GLbyte *pc, Bool swap);
-extern PURE HIDDEN int __glXTexSubImage1DReqSize(const GLbyte *pc, Bool swap);
-extern PURE HIDDEN int __glXTexSubImage2DReqSize(const GLbyte *pc, Bool swap);
-extern PURE HIDDEN int __glXColorTableReqSize(const GLbyte *pc, Bool swap);
-extern PURE HIDDEN int __glXColorTableParameterfvReqSize(const GLbyte *pc, Bool swap);
-extern PURE HIDDEN int __glXColorTableParameterivReqSize(const GLbyte *pc, Bool swap);
-extern PURE HIDDEN int __glXColorSubTableReqSize(const GLbyte *pc, Bool swap);
-extern PURE HIDDEN int __glXConvolutionFilter1DReqSize(const GLbyte *pc, Bool swap);
-extern PURE HIDDEN int __glXConvolutionFilter2DReqSize(const GLbyte *pc, Bool swap);
-extern PURE HIDDEN int __glXConvolutionParameterfvReqSize(const GLbyte *pc, Bool swap);
-extern PURE HIDDEN int __glXConvolutionParameterivReqSize(const GLbyte *pc, Bool swap);
-extern PURE HIDDEN int __glXSeparableFilter2DReqSize(const GLbyte *pc, Bool swap);
-extern PURE HIDDEN int __glXTexImage3DReqSize(const GLbyte *pc, Bool swap);
-extern PURE HIDDEN int __glXTexSubImage3DReqSize(const GLbyte *pc, Bool swap);
-extern PURE HIDDEN int __glXCompressedTexImage1DARBReqSize(const GLbyte *pc, Bool swap);
-extern PURE HIDDEN int __glXCompressedTexImage2DARBReqSize(const GLbyte *pc, Bool swap);
-extern PURE HIDDEN int __glXCompressedTexImage3DARBReqSize(const GLbyte *pc, Bool swap);
-extern PURE HIDDEN int __glXCompressedTexSubImage1DARBReqSize(const GLbyte *pc, Bool swap);
-extern PURE HIDDEN int __glXCompressedTexSubImage2DARBReqSize(const GLbyte *pc, Bool swap);
-extern PURE HIDDEN int __glXCompressedTexSubImage3DARBReqSize(const GLbyte *pc, Bool swap);
-extern PURE HIDDEN int __glXProgramStringARBReqSize(const GLbyte *pc, Bool swap);
-extern PURE HIDDEN int __glXDrawBuffersARBReqSize(const GLbyte *pc, Bool swap);
-extern PURE HIDDEN int __glXPointParameterfvEXTReqSize(const GLbyte *pc, Bool swap);
-extern PURE HIDDEN int __glXLoadProgramNVReqSize(const GLbyte *pc, Bool swap);
-extern PURE HIDDEN int __glXProgramParameters4dvNVReqSize(const GLbyte *pc, Bool swap);
-extern PURE HIDDEN int __glXProgramParameters4fvNVReqSize(const GLbyte *pc, Bool swap);
-extern PURE HIDDEN int __glXRequestResidentProgramsNVReqSize(const GLbyte *pc, Bool swap);
-extern PURE HIDDEN int __glXVertexAttribs1dvNVReqSize(const GLbyte *pc, Bool swap);
-extern PURE HIDDEN int __glXVertexAttribs1fvNVReqSize(const GLbyte *pc, Bool swap);
-extern PURE HIDDEN int __glXVertexAttribs1svNVReqSize(const GLbyte *pc, Bool swap);
-extern PURE HIDDEN int __glXVertexAttribs2dvNVReqSize(const GLbyte *pc, Bool swap);
-extern PURE HIDDEN int __glXVertexAttribs2fvNVReqSize(const GLbyte *pc, Bool swap);
-extern PURE HIDDEN int __glXVertexAttribs2svNVReqSize(const GLbyte *pc, Bool swap);
-extern PURE HIDDEN int __glXVertexAttribs3dvNVReqSize(const GLbyte *pc, Bool swap);
-extern PURE HIDDEN int __glXVertexAttribs3fvNVReqSize(const GLbyte *pc, Bool swap);
-extern PURE HIDDEN int __glXVertexAttribs3svNVReqSize(const GLbyte *pc, Bool swap);
-extern PURE HIDDEN int __glXVertexAttribs4dvNVReqSize(const GLbyte *pc, Bool swap);
-extern PURE HIDDEN int __glXVertexAttribs4fvNVReqSize(const GLbyte *pc, Bool swap);
-extern PURE HIDDEN int __glXVertexAttribs4svNVReqSize(const GLbyte *pc, Bool swap);
-extern PURE HIDDEN int __glXVertexAttribs4ubvNVReqSize(const GLbyte *pc, Bool swap);
-extern PURE HIDDEN int __glXPointParameterivNVReqSize(const GLbyte *pc, Bool swap);
-extern PURE HIDDEN int __glXProgramNamedParameter4dvNVReqSize(const GLbyte *pc, Bool swap);
-extern PURE HIDDEN int __glXProgramNamedParameter4fvNVReqSize(const GLbyte *pc, Bool swap);
-extern PURE HIDDEN int __glXDeleteFramebuffersEXTReqSize(const GLbyte *pc, Bool swap);
-extern PURE HIDDEN int __glXDeleteRenderbuffersEXTReqSize(const GLbyte *pc, Bool swap);
-
-# undef HIDDEN
-# undef PURE
-
-#endif /* !defined( _INDIRECT_REQSIZE_H_ ) */
diff --git a/src/glx/x11/indirect_size_get.c b/src/glx/x11/indirect_size_get.c
deleted file mode 100644
index 8f726904fd..0000000000
--- a/src/glx/x11/indirect_size_get.c
+++ /dev/null
@@ -1,1210 +0,0 @@
-/* DO NOT EDIT - This file generated automatically by glX_proto_size.py (from Mesa) script */
-
-/*
- * (C) Copyright IBM Corporation 2004
- * 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 <GL/gl.h>
-#include "indirect_size_get.h"
-#include "glxserver.h"
-#include "indirect_util.h"
-#include "indirect_size.h"
-
-# if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 96)
-# define PURE __attribute__((pure))
-# else
-# define PURE
-# endif
-
-# if defined(__i386__) && defined(__GNUC__) && !defined(__CYGWIN__) && !defined(__MINGW32__)
-# define FASTCALL __attribute__((fastcall))
-# else
-# define FASTCALL
-# endif
-
-# if (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 3)) && defined(__ELF__)
-# define INTERNAL __attribute__((visibility("internal")))
-# else
-# define INTERNAL
-# endif
-
-
-#if defined(__CYGWIN__) || defined(__MINGW32__) || defined(__APPLE__)
-# undef HAVE_ALIAS
-#endif
-#ifdef HAVE_ALIAS
-# define ALIAS2(from,to) \
- INTERNAL PURE FASTCALL GLint __gl ## from ## _size( GLenum e ) \
- __attribute__ ((alias( # to )));
-# define ALIAS(from,to) ALIAS2( from, __gl ## to ## _size )
-#else
-# define ALIAS(from,to) \
- INTERNAL PURE FASTCALL GLint __gl ## from ## _size( GLenum e ) \
- { return __gl ## to ## _size( e ); }
-#endif
-
-
-INTERNAL PURE FASTCALL GLint
-__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;
- }
-}
-
-INTERNAL PURE FASTCALL GLint
-__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;
- }
-}
-
-INTERNAL PURE FASTCALL GLint
-__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;
- }
-}
-
-INTERNAL PURE FASTCALL GLint
-__glLightModelfv_size(GLenum e)
-{
- 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;
- }
-}
-
-INTERNAL PURE FASTCALL GLint
-__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;
- }
-}
-
-INTERNAL PURE FASTCALL GLint
-__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:
-/* 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_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_LOD_BIAS_EXT:*/
- case GL_DEPTH_TEXTURE_MODE:
-/* case GL_DEPTH_TEXTURE_MODE_ARB:*/
- case GL_TEXTURE_COMPARE_MODE:
-/* case GL_TEXTURE_COMPARE_MODE_ARB:*/
- 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;
- }
-}
-
-INTERNAL PURE FASTCALL GLint
-__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:
-/* case GL_COORD_REPLACE_NV:*/
- return 1;
- case GL_TEXTURE_ENV_COLOR:
- return 4;
- default:
- return 0;
- }
-}
-
-INTERNAL PURE FASTCALL GLint
-__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;
- }
-}
-
-INTERNAL PURE FASTCALL GLint
-__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;
- }
-}
-
-INTERNAL PURE FASTCALL GLint
-__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;
- }
-}
-
-INTERNAL PURE FASTCALL GLint
-__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_CLIENT_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_MAX_CLIENT_ATTRIB_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_MAX_CONVOLUTION_WIDTH_EXT:*/
- case GL_MAX_CONVOLUTION_HEIGHT:
-/* case GL_MAX_CONVOLUTION_HEIGHT_EXT:*/
- 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_EXT:*/
- 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_EXT:*/
- 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_EXT:*/
- 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_EXT:*/
- 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_MAX_3D_TEXTURE_SIZE:
- 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_ARB:*/
- case GL_SAMPLE_ALPHA_TO_ONE:
-/* case GL_SAMPLE_ALPHA_TO_ONE_ARB:*/
- case GL_SAMPLE_COVERAGE:
-/* case GL_SAMPLE_COVERAGE_ARB:*/
- case GL_SAMPLE_BUFFERS:
-/* case GL_SAMPLE_BUFFERS_ARB:*/
- case GL_SAMPLES:
-/* case GL_SAMPLES_ARB:*/
- case GL_SAMPLE_COVERAGE_VALUE:
-/* case GL_SAMPLE_COVERAGE_VALUE_ARB:*/
- 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_POINT_SIZE_MIN:
- case GL_POINT_SIZE_MAX:
- case GL_POINT_FADE_THRESHOLD_SIZE:
- 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_ARB:*/
- case GL_MAX_TEXTURE_UNITS:
-/* case GL_MAX_TEXTURE_UNITS_ARB:*/
- case GL_MAX_RENDERBUFFER_SIZE_EXT:
- case GL_TEXTURE_COMPRESSION_HINT:
-/* case GL_TEXTURE_COMPRESSION_HINT_ARB:*/
- case GL_TEXTURE_RECTANGLE_ARB:
-/* case GL_TEXTURE_RECTANGLE_NV:*/
- 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_NV:*/
- 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_ARB:*/
- 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_NUM_COMPRESSED_TEXTURE_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_STENCIL_BACK_FUNC_ATI:
- case GL_STENCIL_BACK_FAIL_ATI:
- case GL_STENCIL_BACK_PASS_DEPTH_FAIL_ATI:
- case GL_STENCIL_BACK_PASS_DEPTH_PASS_ATI:
- 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_ATI:*/
- case GL_DRAW_BUFFER1_ARB:
-/* case GL_DRAW_BUFFER1_ATI:*/
- case GL_DRAW_BUFFER2_ARB:
-/* case GL_DRAW_BUFFER2_ATI:*/
- case GL_DRAW_BUFFER3_ARB:
-/* case GL_DRAW_BUFFER3_ATI:*/
- case GL_DRAW_BUFFER4_ARB:
-/* case GL_DRAW_BUFFER4_ATI:*/
- case GL_DRAW_BUFFER5_ARB:
-/* case GL_DRAW_BUFFER5_ATI:*/
- case GL_DRAW_BUFFER6_ARB:
-/* case GL_DRAW_BUFFER6_ATI:*/
- case GL_DRAW_BUFFER7_ARB:
-/* case GL_DRAW_BUFFER7_ATI:*/
- case GL_DRAW_BUFFER8_ARB:
-/* case GL_DRAW_BUFFER8_ATI:*/
- case GL_DRAW_BUFFER9_ARB:
-/* case GL_DRAW_BUFFER9_ATI:*/
- case GL_DRAW_BUFFER10_ARB:
-/* case GL_DRAW_BUFFER10_ATI:*/
- case GL_DRAW_BUFFER11_ARB:
-/* case GL_DRAW_BUFFER11_ATI:*/
- case GL_DRAW_BUFFER12_ARB:
-/* case GL_DRAW_BUFFER12_ATI:*/
- case GL_DRAW_BUFFER13_ARB:
-/* case GL_DRAW_BUFFER13_ATI:*/
- case GL_DRAW_BUFFER14_ARB:
-/* case GL_DRAW_BUFFER14_ATI:*/
- 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_COMPARE_REF_DEPTH_TO_TEXTURE_EXT:
- 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_MAX_TEXTURE_COORDS_ARB:
- case GL_MAX_TEXTURE_IMAGE_UNITS_ARB:
- case GL_DEPTH_BOUNDS_TEST_EXT:
- case GL_MAX_ARRAY_TEXTURE_LAYERS_EXT:
- case GL_STENCIL_TEST_TWO_SIDE_EXT:
- case GL_ACTIVE_STENCIL_FACE_EXT:
- case GL_TEXTURE_BINDING_1D_ARRAY_EXT:
- case GL_TEXTURE_BINDING_2D_ARRAY_EXT:
- case GL_DRAW_FRAMEBUFFER_BINDING_EXT:
- case GL_RENDERBUFFER_BINDING_EXT:
- case GL_READ_FRAMEBUFFER_BINDING_EXT:
- case GL_MAX_COLOR_ATTACHMENTS_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:
- case GL_POINT_DISTANCE_ATTENUATION:
- 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;
- }
-}
-
-INTERNAL PURE FASTCALL GLint
-__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:
-/* 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_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_LOD_BIAS_EXT:*/
- case GL_DEPTH_TEXTURE_MODE:
-/* case GL_DEPTH_TEXTURE_MODE_ARB:*/
- case GL_TEXTURE_COMPARE_MODE:
-/* case GL_TEXTURE_COMPARE_MODE_ARB:*/
- 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;
- }
-}
-
-INTERNAL PURE FASTCALL GLint
-__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:
-/* case GL_TEXTURE_RED_SIZE_EXT:*/
- case GL_TEXTURE_GREEN_SIZE:
-/* case GL_TEXTURE_GREEN_SIZE_EXT:*/
- case GL_TEXTURE_BLUE_SIZE:
-/* case GL_TEXTURE_BLUE_SIZE_EXT:*/
- case GL_TEXTURE_ALPHA_SIZE:
-/* case GL_TEXTURE_ALPHA_SIZE_EXT:*/
- case GL_TEXTURE_LUMINANCE_SIZE:
-/* case GL_TEXTURE_LUMINANCE_SIZE_EXT:*/
- 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_COMPRESSED_IMAGE_SIZE_ARB:*/
- case GL_TEXTURE_COMPRESSED:
-/* case GL_TEXTURE_COMPRESSED_ARB:*/
- case GL_TEXTURE_DEPTH_SIZE:
-/* case GL_TEXTURE_DEPTH_SIZE_ARB:*/
- return 1;
- default:
- return 0;
- }
-}
-
-INTERNAL PURE FASTCALL GLint
-__glColorTableParameterfv_size(GLenum e)
-{
- 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)
-{
- switch (e) {
- case GL_COLOR_TABLE_FORMAT:
-/* case GL_COLOR_TABLE_FORMAT_EXT:*/
- case GL_COLOR_TABLE_WIDTH:
-/* case GL_COLOR_TABLE_WIDTH_EXT:*/
- 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_EXT:*/
- 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_EXT:*/
- 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_EXT:*/
- 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)
-{
- switch (e) {
- case GL_CONVOLUTION_BORDER_MODE:
-/* case GL_CONVOLUTION_BORDER_MODE_EXT:*/
- return 1;
- case GL_CONVOLUTION_FILTER_SCALE:
-/* case GL_CONVOLUTION_FILTER_SCALE_EXT:*/
- case GL_CONVOLUTION_FILTER_BIAS:
-/* case GL_CONVOLUTION_FILTER_BIAS_EXT:*/
- case GL_CONVOLUTION_BORDER_COLOR:
-/* case GL_CONVOLUTION_BORDER_COLOR_HP:*/
- return 4;
- default:
- return 0;
- }
-}
-
-INTERNAL PURE FASTCALL GLint
-__glGetConvolutionParameterfv_size(GLenum e)
-{
- switch (e) {
- case GL_CONVOLUTION_BORDER_MODE:
-/* case GL_CONVOLUTION_BORDER_MODE_EXT:*/
- case GL_CONVOLUTION_FORMAT:
-/* case GL_CONVOLUTION_FORMAT_EXT:*/
- case GL_CONVOLUTION_WIDTH:
-/* case GL_CONVOLUTION_WIDTH_EXT:*/
- case GL_CONVOLUTION_HEIGHT:
-/* case GL_CONVOLUTION_HEIGHT_EXT:*/
- case GL_MAX_CONVOLUTION_WIDTH:
-/* case GL_MAX_CONVOLUTION_WIDTH_EXT:*/
- case GL_MAX_CONVOLUTION_HEIGHT:
-/* case GL_MAX_CONVOLUTION_HEIGHT_EXT:*/
- return 1;
- case GL_CONVOLUTION_FILTER_SCALE:
-/* case GL_CONVOLUTION_FILTER_SCALE_EXT:*/
- case GL_CONVOLUTION_FILTER_BIAS:
-/* case GL_CONVOLUTION_FILTER_BIAS_EXT:*/
- case GL_CONVOLUTION_BORDER_COLOR:
-/* case GL_CONVOLUTION_BORDER_COLOR_HP:*/
- return 4;
- default:
- return 0;
- }
-}
-
-INTERNAL PURE FASTCALL GLint
-__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;
- }
-}
-
-INTERNAL PURE FASTCALL GLint
-__glGetMinmaxParameterfv_size(GLenum e)
-{
- switch (e) {
- case GL_MINMAX_FORMAT:
- case GL_MINMAX_SINK:
- return 1;
- default:
- return 0;
- }
-}
-
-INTERNAL PURE FASTCALL GLint
-__glGetProgramivARB_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_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_ARB:*/
-/* case GL_POINT_SIZE_MAX_SGIS:*/
- 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_DISTANCE_ATTENUATION_ARB:*/
-/* case GL_POINT_DISTANCE_ATTENUATION_SGIS:*/
- return 3;
- default:
- return 0;
- }
-}
-
-INTERNAL PURE FASTCALL GLint
-__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;
- }
-}
-
-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(GetQueryObjectuivARB, GetQueryObjectivARB)
- ALIAS(GetVertexAttribfvNV, GetVertexAttribdvNV)
- ALIAS(GetVertexAttribivNV, GetVertexAttribdvNV)
- ALIAS(PointParameterivNV, PointParameterfvEXT)
-# undef PURE
-# undef FASTCALL
-# undef INTERNAL
diff --git a/src/glx/x11/indirect_size_get.h b/src/glx/x11/indirect_size_get.h
deleted file mode 100644
index 4fcb55b4e1..0000000000
--- a/src/glx/x11/indirect_size_get.h
+++ /dev/null
@@ -1,102 +0,0 @@
-/* DO NOT EDIT - This file generated automatically by glX_proto_size.py (from Mesa) script */
-
-/*
- * (C) Copyright IBM Corporation 2004
- * 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.
- */
-
-#if !defined( _INDIRECT_SIZE_GET_H_ )
-# define _INDIRECT_SIZE_GET_H_
-
-/**
- * \file
- * Prototypes for functions used to determine the number of data elements in
- * various GLX protocol messages.
- *
- * \author Ian Romanick <idr@us.ibm.com>
- */
-
-# if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 96)
-# define PURE __attribute__((pure))
-# else
-# define PURE
-# endif
-
-# if defined(__i386__) && defined(__GNUC__) && !defined(__CYGWIN__) && !defined(__MINGW32__)
-# define FASTCALL __attribute__((fastcall))
-# else
-# define FASTCALL
-# endif
-
-# if (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 3)) && defined(__ELF__)
-# define INTERNAL __attribute__((visibility("internal")))
-# else
-# define INTERNAL
-# endif
-
-extern INTERNAL PURE FASTCALL GLint __glGetBooleanv_size(GLenum);
-extern INTERNAL PURE FASTCALL GLint __glGetDoublev_size(GLenum);
-extern INTERNAL PURE FASTCALL GLint __glGetFloatv_size(GLenum);
-extern INTERNAL PURE FASTCALL GLint __glGetIntegerv_size(GLenum);
-extern INTERNAL PURE FASTCALL GLint __glGetLightfv_size(GLenum);
-extern INTERNAL PURE FASTCALL GLint __glGetLightiv_size(GLenum);
-extern INTERNAL PURE FASTCALL GLint __glGetMaterialfv_size(GLenum);
-extern INTERNAL PURE FASTCALL GLint __glGetMaterialiv_size(GLenum);
-extern INTERNAL PURE FASTCALL GLint __glGetTexEnvfv_size(GLenum);
-extern INTERNAL PURE FASTCALL GLint __glGetTexEnviv_size(GLenum);
-extern INTERNAL PURE FASTCALL GLint __glGetTexGendv_size(GLenum);
-extern INTERNAL PURE FASTCALL GLint __glGetTexGenfv_size(GLenum);
-extern INTERNAL PURE FASTCALL GLint __glGetTexGeniv_size(GLenum);
-extern INTERNAL PURE FASTCALL GLint __glGetTexParameterfv_size(GLenum);
-extern INTERNAL PURE FASTCALL GLint __glGetTexParameteriv_size(GLenum);
-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 __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 __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 __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);
-
-# undef PURE
-# undef FASTCALL
-# undef INTERNAL
-
-#endif /* !defined( _INDIRECT_SIZE_GET_H_ ) */
diff --git a/src/glx/x11/indirect_table.c b/src/glx/x11/indirect_table.c
deleted file mode 100644
index cb3202605d..0000000000
--- a/src/glx/x11/indirect_table.c
+++ /dev/null
@@ -1,1596 +0,0 @@
-/* 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 <inttypes.h>
-#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_ProgramEnvParameter4fvARB, __glXDispSwap_ProgramEnvParameter4fvARB},
- /* [ 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 = 12 */
-static const int_fast16_t VendorPriv_dispatch_tree[152] = {
- /* [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,
- LEAF(88),
- EMPTY_LEAF,
-
-};
-
-static const void *VendorPriv_function_table[104][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 */ {__glXDisp_CreateGLXPbufferSGIX, __glXDispSwap_CreateGLXPbufferSGIX},
- /* [ 96] = 65544 */ {__glXDisp_DestroyGLXPbufferSGIX, __glXDispSwap_DestroyGLXPbufferSGIX},
- /* [ 97] = 65545 */ {__glXDisp_ChangeDrawableAttributesSGIX, __glXDispSwap_ChangeDrawableAttributesSGIX},
- /* [ 98] = 65546 */ {__glXDisp_GetDrawableAttributesSGIX, __glXDispSwap_GetDrawableAttributesSGIX},
- /* [ 99] = 65547 */ {NULL, NULL},
- /* [ 100] = 65548 */ {NULL, NULL},
- /* [ 101] = 65549 */ {NULL, NULL},
- /* [ 102] = 65550 */ {NULL, NULL},
- /* [ 103] = 65551 */ {NULL, NULL},
-};
-
-const struct __glXDispatchInfo VendorPriv_dispatch_info = {
- 17,
- VendorPriv_dispatch_tree,
- VendorPriv_function_table,
- NULL,
- NULL
-};
-
diff --git a/src/mesa/Makefile b/src/mesa/Makefile
index 633bfb19a3..08d723553e 100644
--- a/src/mesa/Makefile
+++ b/src/mesa/Makefile
@@ -24,25 +24,38 @@ GL_TINY = 0$(MESA_MAJOR)0$(MESA_MINOR)0$(MESA_TINY)
# Figure out what to make here
-default:
+default: depend
@for driver in $(DRIVER_DIRS) ; do \
case "$$driver" in \
- x11) $(MAKE) stand-alone ;; \
- dri) $(MAKE) linux-solo ;; \
- osmesa) $(MAKE) osmesa-only ;; \
- beos) $(MAKE) beos ;; \
- directfb) $(MAKE) directfb ;; \
- fbdev) $(MAKE) fbdev ;; \
+ x11) $(MAKE) stand-alone || exit 1 ;; \
+ dri) $(MAKE) linux-solo || exit 1 ;; \
+ osmesa) $(MAKE) osmesa-only || exit 1 ;; \
+ beos) $(MAKE) beos || exit 1 ;; \
+ directfb) $(MAKE) directfb || exit 1 ;; \
+ fbdev) $(MAKE) fbdev || exit 1 ;; \
*) echo "$$driver is invalid in DRIVER_DIRS" >&2; exit 1;; \
esac ; \
done
+install: default
+ @for driver in $(DRIVER_DIRS) ; do \
+ case "$$driver" in \
+ osmesa) if [ "$(DRIVER_DIRS)" = osmesa ]; then \
+ $(MAKE) install-headers install-osmesa || exit 1 ; \
+ else \
+ $(MAKE) install-osmesa || exit 1 ; \
+ fi ;; \
+ dri) $(MAKE) install-libgl install-dri || exit 1 ;; \
+ *) $(MAKE) install-libgl || exit 1 ;; \
+ esac ; \
+ done
+
######################################################################
# BeOS driver target
beos: depend subdirs libmesa.a
- cd drivers/beos; $(MAKE)
+ cd drivers/beos && $(MAKE)
######################################################################
@@ -56,7 +69,7 @@ libmesa.a: $(SOLO_OBJECTS)
fi
linux-solo: depend subdirs libmesa.a
- cd drivers/dri ; $(MAKE)
+ cd drivers/dri && $(MAKE)
#####################################################################
@@ -69,7 +82,7 @@ libgl-core: $(CORE_OBJECTS)
$(GL_LIB_DEPS)
directfb: depend subdirs libgl-core
- cd drivers/directfb ; $(MAKE)
+ cd drivers/directfb && $(MAKE)
#####################################################################
@@ -145,11 +158,11 @@ depend: $(ALL_SOURCES)
subdirs:
@ if echo "$(ASM_FLAGS)" | grep -q USE_X86_ASM ; then \
- (cd x86 ; $(MAKE)) ; \
+ (cd x86 && $(MAKE)) || exit 1 ; \
fi
@ if echo "$(ASM_FLAGS)" | grep -q USE_X86_64_ASM ; then \
- (cd x86 ; $(MAKE)) ; \
- (cd x86-64 ; $(MAKE)) ; \
+ (cd x86 && $(MAKE)) || exit 1 ; \
+ (cd x86-64 && $(MAKE)) || exit 1 ; \
fi
pcedit = sed \
@@ -160,31 +173,25 @@ pcedit = sed \
gl.pc: gl.pc.in
$(pcedit) $< > $@
-install-libgl: gl.pc
+install-headers:
$(INSTALL) -d $(DESTDIR)$(INSTALL_DIR)/include/GL
+ $(INSTALL) -m 644 $(TOP)/include/GL/*.h \
+ $(DESTDIR)$(INSTALL_DIR)/include/GL
+
+install-libgl: default gl.pc install-headers
$(INSTALL) -d $(DESTDIR)$(INSTALL_DIR)/$(LIB_DIR)
$(INSTALL) -d $(DESTDIR)$(INSTALL_DIR)/$(LIB_DIR)/pkgconfig
- $(INSTALL) -m 644 $(TOP)/include/GL/*.h $(DESTDIR)$(INSTALL_DIR)/include/GL
- @if [ -e $(TOP)/$(LIB_DIR)/$(GL_LIB_NAME) ]; then \
- $(INSTALL) $(TOP)/$(LIB_DIR)/libGL* \
- $(DESTDIR)$(INSTALL_DIR)/$(LIB_DIR); \
- fi
+ $(INSTALL) $(TOP)/$(LIB_DIR)/$(GL_LIB_NAME)* \
+ $(DESTDIR)$(INSTALL_DIR)/$(LIB_DIR)
$(INSTALL) -m 644 gl.pc $(DESTDIR)$(INSTALL_DIR)/$(LIB_DIR)/pkgconfig
-install-osmesa:
- @if [ -e $(TOP)/$(LIB_DIR)/$(OSMESA_LIB_NAME) ]; then \
- $(INSTALL) $(TOP)/$(LIB_DIR)/libOSMesa* \
- $(DESTDIR)$(INSTALL_DIR)/$(LIB_DIR); \
- fi
-
-install-drivers:
- @for target in $(DRIVER_DIRS); do \
- case "$$target" in \
- dri) cd drivers/dri ; $(MAKE) install ;; \
- esac; \
- done
+install-osmesa: default
+ $(INSTALL) -d $(DESTDIR)$(INSTALL_DIR)/$(LIB_DIR)
+ $(INSTALL) $(TOP)/$(LIB_DIR)/$(OSMESA_LIB_NAME)* \
+ $(DESTDIR)$(INSTALL_DIR)/$(LIB_DIR)
-install: default install-libgl install-osmesa install-drivers
+install-dri:
+ cd drivers/dri && $(MAKE) install
## NOT INSTALLED YET:
## $(INSTALL) -d $(DESTDIR)$(INSTALL_DIR)/include/GLES
@@ -200,9 +207,10 @@ clean:
-rm -f */*/*.o
-rm -f depend depend.bak libmesa.a
-rm -f drivers/*/*.o
- (cd drivers/dri && $(MAKE) clean)
- (cd x86 && $(MAKE) clean)
- (cd x86-64 && $(MAKE) clean)
+ -@cd drivers/dri && $(MAKE) clean
+ -@cd drivers/xorg && $(MAKE) clean
+ -@cd x86 && $(MAKE) clean
+ -@cd x86-64 && $(MAKE) clean
-include depend
diff --git a/src/mesa/drivers/beos/Makefile b/src/mesa/drivers/beos/Makefile
index 9c7d6affc3..0448650a8c 100644
--- a/src/mesa/drivers/beos/Makefile
+++ b/src/mesa/drivers/beos/Makefile
@@ -170,10 +170,10 @@ OBJECTS := $(DRIVER_OBJECTS:.cpp=.o)
default: depend $(TOP)/$(LIB_DIR) $(TOP)/$(LIB_DIR)/$(GL_LIB_NAME)
$(MESA_MODULES):
- cd $(TOP)/src/mesa; $(MAKE) mesa.a ;
+ cd $(TOP)/src/mesa && $(MAKE) mesa.a ;
$(GLU_MODULES):
- cd $(GLU_DIR); $(MAKE) $(subst $(GLU_DIR)/,,$(GLU_MODULES)) ;
+ cd $(GLU_DIR) && $(MAKE) $(subst $(GLU_DIR)/,,$(GLU_MODULES)) ;
$(TOP)/$(LIB_DIR):
mkdir $(TOP)/$(LIB_DIR)
@@ -184,13 +184,13 @@ $(TOP)/$(LIB_DIR)/$(GL_LIB_NAME): $(OBJECTS) $(MESA_MODULES) $(GLU_MODULES)
$(MKLIB_OPTIONS) $(GL_LIB_DEPS) $(OBJECTS) $(MESA_MODULES) $(GLU_MODULES)
# $(GLU_OBJECTS):
-# cd $(GLU_DIR); $(MAKE) $< ;
+# cd $(GLU_DIR) && $(MAKE) $< ;
depend: $(DRIVER_SOURCES) $(GLU_SOURCES)
touch depend
$(MKDEP) $(MKDEP_OPTIONS) $(INCLUDES) $(DRIVER_SOURCES) $(GLU_SOURCES) > /dev/null
clean:
- rm -f depend $(OBJECTS)
+ -rm -f depend depend.bak $(OBJECTS)
include depend
diff --git a/src/mesa/drivers/common/driverfuncs.c b/src/mesa/drivers/common/driverfuncs.c
index 03fbab69e3..e61b9f59cf 100644
--- a/src/mesa/drivers/common/driverfuncs.c
+++ b/src/mesa/drivers/common/driverfuncs.c
@@ -29,6 +29,7 @@
#include "buffers.h"
#include "context.h"
#include "framebuffer.h"
+#include "mipmap.h"
#include "queryobj.h"
#include "renderbuffer.h"
#include "texcompress.h"
@@ -98,6 +99,7 @@ _mesa_init_driver_functions(struct dd_function_table *driver)
driver->CopyTexSubImage1D = _swrast_copy_texsubimage1d;
driver->CopyTexSubImage2D = _swrast_copy_texsubimage2d;
driver->CopyTexSubImage3D = _swrast_copy_texsubimage3d;
+ driver->GenerateMipmap = _mesa_generate_mipmap;
driver->TestProxyTexImage = _mesa_test_proxy_teximage;
driver->CompressedTexImage1D = _mesa_store_compressed_teximage1d;
driver->CompressedTexImage2D = _mesa_store_compressed_teximage2d;
@@ -260,43 +262,6 @@ _mesa_init_driver_functions(struct dd_function_table *driver)
/**
- * Plug in Mesa's GLSL functions.
- */
-void
-_mesa_init_glsl_driver_functions(struct dd_function_table *driver)
-{
- driver->AttachShader = _mesa_attach_shader;
- driver->BindAttribLocation = _mesa_bind_attrib_location;
- driver->CompileShader = _mesa_compile_shader;
- driver->CreateProgram = _mesa_create_program;
- driver->CreateShader = _mesa_create_shader;
- driver->DeleteProgram2 = _mesa_delete_program2;
- driver->DeleteShader = _mesa_delete_shader;
- driver->DetachShader = _mesa_detach_shader;
- driver->GetActiveAttrib = _mesa_get_active_attrib;
- driver->GetActiveUniform = _mesa_get_active_uniform;
- driver->GetAttachedShaders = _mesa_get_attached_shaders;
- driver->GetAttribLocation = _mesa_get_attrib_location;
- driver->GetHandle = _mesa_get_handle;
- driver->GetProgramiv = _mesa_get_programiv;
- driver->GetProgramInfoLog = _mesa_get_program_info_log;
- driver->GetShaderiv = _mesa_get_shaderiv;
- driver->GetShaderInfoLog = _mesa_get_shader_info_log;
- driver->GetShaderSource = _mesa_get_shader_source;
- driver->GetUniformfv = _mesa_get_uniformfv;
- driver->GetUniformLocation = _mesa_get_uniform_location;
- driver->IsProgram = _mesa_is_program;
- driver->IsShader = _mesa_is_shader;
- driver->LinkProgram = _mesa_link_program;
- driver->ShaderSource = _mesa_shader_source;
- driver->Uniform = _mesa_uniform;
- driver->UniformMatrix = _mesa_uniform_matrix;
- driver->UseProgram = _mesa_use_program;
- driver->ValidateProgram = _mesa_validate_program;
-}
-
-
-/**
* Call the ctx->Driver.* state functions with current values to initialize
* driver state.
* Only the Intel drivers use this so far.
diff --git a/src/mesa/drivers/common/driverfuncs.h b/src/mesa/drivers/common/driverfuncs.h
index 6ed23c4520..4c90ed12f6 100644
--- a/src/mesa/drivers/common/driverfuncs.h
+++ b/src/mesa/drivers/common/driverfuncs.h
@@ -31,10 +31,6 @@ _mesa_init_driver_functions(struct dd_function_table *driver);
extern void
-_mesa_init_glsl_driver_functions(struct dd_function_table *driver);
-
-
-extern void
_mesa_init_driver_state(GLcontext *ctx);
diff --git a/src/mesa/drivers/directfb/Makefile b/src/mesa/drivers/directfb/Makefile
index c515785b2a..dc71b385ca 100644
--- a/src/mesa/drivers/directfb/Makefile
+++ b/src/mesa/drivers/directfb/Makefile
@@ -50,5 +50,5 @@ install:
clean:
- rm -f *.o *.so
+ -rm -f *.o *.so
diff --git a/src/mesa/drivers/dri/Makefile b/src/mesa/drivers/dri/Makefile
index 69a8c55394..c6464a2a24 100644
--- a/src/mesa/drivers/dri/Makefile
+++ b/src/mesa/drivers/dri/Makefile
@@ -33,7 +33,7 @@ install:
clean:
- @for dir in $(DRI_DIRS) ; do \
+ -@for dir in $(DRI_DIRS) ; do \
if [ -d $$dir ] ; then \
(cd $$dir && $(MAKE) clean) ; \
fi \
diff --git a/src/mesa/drivers/dri/common/dri_util.c b/src/mesa/drivers/dri/common/dri_util.c
index b7718f50fd..58702089e5 100644
--- a/src/mesa/drivers/dri/common/dri_util.c
+++ b/src/mesa/drivers/dri/common/dri_util.c
@@ -31,6 +31,7 @@
#include "dri_util.h"
#include "drm_sarea.h"
+#include "utils.h"
#ifndef GLX_OML_sync_control
typedef GLboolean ( * PFNGLXGETMSCRATEOMLPROC) (__DRIdrawable *drawable, int32_t *numerator, int32_t *denominator);
@@ -66,6 +67,18 @@ __driUtilMessage(const char *f, ...)
}
}
+GLint
+driIntersectArea( drm_clip_rect_t rect1, drm_clip_rect_t rect2 )
+{
+ if (rect2.x1 > rect1.x1) rect1.x1 = rect2.x1;
+ if (rect2.x2 < rect1.x2) rect1.x2 = rect2.x2;
+ if (rect2.y1 > rect1.y1) rect1.y1 = rect2.y1;
+ if (rect2.y2 < rect1.y2) rect1.y2 = rect2.y2;
+
+ if (rect1.x1 > rect1.x2 || rect1.y1 > rect1.y2) return 0;
+
+ return (rect1.x2 - rect1.x1) * (rect1.y2 - rect1.y1);
+}
/*****************************************************************/
/** \name Context (un)binding functions */
@@ -965,117 +978,6 @@ static const __DRIextension **driGetExtensions(__DRIscreen *psp)
return psp->extensions;
}
-#define __ATTRIB(attrib, field) \
- { attrib, offsetof(__GLcontextModes, field) }
-
-static const struct { unsigned int attrib, offset; } attribMap[] = {
- __ATTRIB(__DRI_ATTRIB_BUFFER_SIZE, rgbBits),
- __ATTRIB(__DRI_ATTRIB_LEVEL, level),
- __ATTRIB(__DRI_ATTRIB_RED_SIZE, redBits),
- __ATTRIB(__DRI_ATTRIB_GREEN_SIZE, greenBits),
- __ATTRIB(__DRI_ATTRIB_BLUE_SIZE, blueBits),
- __ATTRIB(__DRI_ATTRIB_ALPHA_SIZE, alphaBits),
- __ATTRIB(__DRI_ATTRIB_DEPTH_SIZE, depthBits),
- __ATTRIB(__DRI_ATTRIB_STENCIL_SIZE, stencilBits),
- __ATTRIB(__DRI_ATTRIB_ACCUM_RED_SIZE, accumRedBits),
- __ATTRIB(__DRI_ATTRIB_ACCUM_GREEN_SIZE, accumGreenBits),
- __ATTRIB(__DRI_ATTRIB_ACCUM_BLUE_SIZE, accumBlueBits),
- __ATTRIB(__DRI_ATTRIB_ACCUM_ALPHA_SIZE, accumAlphaBits),
- __ATTRIB(__DRI_ATTRIB_SAMPLE_BUFFERS, sampleBuffers),
- __ATTRIB(__DRI_ATTRIB_SAMPLES, samples),
- __ATTRIB(__DRI_ATTRIB_DOUBLE_BUFFER, doubleBufferMode),
- __ATTRIB(__DRI_ATTRIB_STEREO, stereoMode),
- __ATTRIB(__DRI_ATTRIB_AUX_BUFFERS, numAuxBuffers),
- __ATTRIB(__DRI_ATTRIB_TRANSPARENT_TYPE, transparentPixel),
- __ATTRIB(__DRI_ATTRIB_TRANSPARENT_INDEX_VALUE, transparentPixel),
- __ATTRIB(__DRI_ATTRIB_TRANSPARENT_RED_VALUE, transparentRed),
- __ATTRIB(__DRI_ATTRIB_TRANSPARENT_GREEN_VALUE, transparentGreen),
- __ATTRIB(__DRI_ATTRIB_TRANSPARENT_BLUE_VALUE, transparentBlue),
- __ATTRIB(__DRI_ATTRIB_TRANSPARENT_ALPHA_VALUE, transparentAlpha),
- __ATTRIB(__DRI_ATTRIB_FLOAT_MODE, floatMode),
- __ATTRIB(__DRI_ATTRIB_RED_MASK, redMask),
- __ATTRIB(__DRI_ATTRIB_GREEN_MASK, greenMask),
- __ATTRIB(__DRI_ATTRIB_BLUE_MASK, blueMask),
- __ATTRIB(__DRI_ATTRIB_ALPHA_MASK, alphaMask),
- __ATTRIB(__DRI_ATTRIB_MAX_PBUFFER_WIDTH, maxPbufferWidth),
- __ATTRIB(__DRI_ATTRIB_MAX_PBUFFER_HEIGHT, maxPbufferHeight),
- __ATTRIB(__DRI_ATTRIB_MAX_PBUFFER_PIXELS, maxPbufferPixels),
- __ATTRIB(__DRI_ATTRIB_OPTIMAL_PBUFFER_WIDTH, optimalPbufferWidth),
- __ATTRIB(__DRI_ATTRIB_OPTIMAL_PBUFFER_HEIGHT, optimalPbufferHeight),
- __ATTRIB(__DRI_ATTRIB_SWAP_METHOD, swapMethod),
- __ATTRIB(__DRI_ATTRIB_BIND_TO_TEXTURE_RGB, bindToTextureRgb),
- __ATTRIB(__DRI_ATTRIB_BIND_TO_TEXTURE_RGBA, bindToTextureRgba),
- __ATTRIB(__DRI_ATTRIB_BIND_TO_MIPMAP_TEXTURE, bindToMipmapTexture),
- __ATTRIB(__DRI_ATTRIB_BIND_TO_TEXTURE_TARGETS, bindToTextureTargets),
- __ATTRIB(__DRI_ATTRIB_YINVERTED, yInverted),
-
- /* The struct field doesn't matter here, these are handled by the
- * switch in driGetConfigAttribIndex. We need them in the array
- * so the iterator includes them though.*/
- __ATTRIB(__DRI_ATTRIB_RENDER_TYPE, level),
- __ATTRIB(__DRI_ATTRIB_CONFIG_CAVEAT, level),
- __ATTRIB(__DRI_ATTRIB_SWAP_METHOD, level)
-};
-
-#define ARRAY_SIZE(a) (sizeof (a) / sizeof ((a)[0]))
-
-static int
-driGetConfigAttribIndex(const __DRIconfig *config,
- unsigned int index, unsigned int *value)
-{
- switch (attribMap[index].attrib) {
- case __DRI_ATTRIB_RENDER_TYPE:
- if (config->modes.rgbMode)
- *value = __DRI_ATTRIB_RGBA_BIT;
- else
- *value = __DRI_ATTRIB_COLOR_INDEX_BIT;
- break;
- case __DRI_ATTRIB_CONFIG_CAVEAT:
- if (config->modes.visualRating == GLX_NON_CONFORMANT_CONFIG)
- *value = __DRI_ATTRIB_NON_CONFORMANT_CONFIG;
- else if (config->modes.visualRating == GLX_SLOW_CONFIG)
- *value = __DRI_ATTRIB_SLOW_BIT;
- else
- *value = 0;
- break;
- case __DRI_ATTRIB_SWAP_METHOD:
- break;
-
- default:
- *value = *(unsigned int *)
- ((char *) &config->modes + attribMap[index].offset);
-
- break;
- }
-
- return GL_TRUE;
-}
-
-static int
-driGetConfigAttrib(const __DRIconfig *config,
- unsigned int attrib, unsigned int *value)
-{
- int i;
-
- for (i = 0; i < ARRAY_SIZE(attribMap); i++)
- if (attribMap[i].attrib == attrib)
- return driGetConfigAttribIndex(config, i, value);
-
- return GL_FALSE;
-}
-
-static int
-driIndexConfigAttrib(const __DRIconfig *config, int index,
- unsigned int *attrib, unsigned int *value)
-{
- if (index >= 0 && index < ARRAY_SIZE(attribMap)) {
- *attrib = attribMap[index].attrib;
- return driGetConfigAttribIndex(config, index, value);
- }
-
- return GL_FALSE;
-}
-
const __DRIlegacyExtension driLegacyExtension = {
{ __DRI_LEGACY, __DRI_LEGACY_VERSION },
driCreateNewScreen,
diff --git a/src/mesa/drivers/dri/common/dri_util.h b/src/mesa/drivers/dri/common/dri_util.h
index 06e1d20a3c..8e1cdfc893 100644
--- a/src/mesa/drivers/dri/common/dri_util.h
+++ b/src/mesa/drivers/dri/common/dri_util.h
@@ -61,7 +61,6 @@
#define GLX_BAD_CONTEXT 5
typedef struct __DRIswapInfoRec __DRIswapInfo;
-typedef struct __DRIutilversionRec2 __DRIutilversion2;
/* Typedefs to avoid rewriting the world. */
typedef struct __DRIscreenRec __DRIscreenPrivate;
@@ -536,22 +535,6 @@ struct __DRIscreenRec {
drmLock *lock;
};
-struct __DRIconfigRec {
- __GLcontextModes modes;
-};
-
-/**
- * Used to store a version which includes a major range instead of a single
- * major version number.
- */
-struct __DRIutilversionRec2 {
- int major_min; /** min allowed Major version number. */
- int major_max; /** max allowed Major version number. */
- int minor; /**< Minor version number. */
- int patch; /**< Patch-level. */
-};
-
-
extern void
__driUtilMessage(const char *f, ...);
@@ -566,4 +549,7 @@ extern float
driCalculateSwapUsage( __DRIdrawable *dPriv,
int64_t last_swap_ust, int64_t current_ust );
+extern GLint
+driIntersectArea( drm_clip_rect_t rect1, drm_clip_rect_t rect2 );
+
#endif /* _DRI_UTIL_H_ */
diff --git a/src/mesa/drivers/dri/common/utils.c b/src/mesa/drivers/dri/common/utils.c
index 237d51cf22..7fbe0d855d 100644
--- a/src/mesa/drivers/dri/common/utils.c
+++ b/src/mesa/drivers/dri/common/utils.c
@@ -419,21 +419,6 @@ driCheckDriDdxDrmVersions2(const char * driver_name,
drmActual, drmExpected);
}
-
-
-GLint
-driIntersectArea( drm_clip_rect_t rect1, drm_clip_rect_t rect2 )
-{
- if (rect2.x1 > rect1.x1) rect1.x1 = rect2.x1;
- if (rect2.x2 < rect1.x2) rect1.x2 = rect2.x2;
- if (rect2.y1 > rect1.y1) rect1.y1 = rect2.y1;
- if (rect2.y2 < rect1.y2) rect1.y2 = rect2.y2;
-
- if (rect1.x1 > rect1.x2 || rect1.y1 > rect1.y2) return 0;
-
- return (rect1.x2 - rect1.x1) * (rect1.y2 - rect1.y1);
-}
-
GLboolean driClipRectToFramebuffer( const GLframebuffer *buffer,
GLint *x, GLint *y,
GLsizei *width, GLsizei *height )
@@ -540,68 +525,62 @@ driCreateConfigs(GLenum fb_format, GLenum fb_type,
unsigned num_depth_stencil_bits,
const GLenum * db_modes, unsigned num_db_modes)
{
- static const u_int8_t bits_table[3][4] = {
+ static const u_int8_t bits_table[4][4] = {
/* R G B A */
+ { 3, 3, 2, 0 }, /* Any GL_UNSIGNED_BYTE_3_3_2 */
{ 5, 6, 5, 0 }, /* Any GL_UNSIGNED_SHORT_5_6_5 */
{ 8, 8, 8, 0 }, /* Any RGB with any GL_UNSIGNED_INT_8_8_8_8 */
{ 8, 8, 8, 8 } /* Any RGBA with any GL_UNSIGNED_INT_8_8_8_8 */
};
- /* The following arrays are all indexed by the fb_type masked with 0x07.
- * Given the four supported fb_type values, this results in valid array
- * indices of 3, 4, 5, and 7.
- */
- static const u_int32_t masks_table_rgb[8][4] = {
- { 0x00000000, 0x00000000, 0x00000000, 0x00000000 },
- { 0x00000000, 0x00000000, 0x00000000, 0x00000000 },
- { 0x00000000, 0x00000000, 0x00000000, 0x00000000 },
+ static const u_int32_t masks_table_rgb[6][4] = {
+ { 0x000000E0, 0x0000001C, 0x00000003, 0x00000000 }, /* 3_3_2 */
+ { 0x00000007, 0x00000038, 0x000000C0, 0x00000000 }, /* 2_3_3_REV */
{ 0x0000F800, 0x000007E0, 0x0000001F, 0x00000000 }, /* 5_6_5 */
{ 0x0000001F, 0x000007E0, 0x0000F800, 0x00000000 }, /* 5_6_5_REV */
{ 0xFF000000, 0x00FF0000, 0x0000FF00, 0x00000000 }, /* 8_8_8_8 */
- { 0x00000000, 0x00000000, 0x00000000, 0x00000000 },
{ 0x000000FF, 0x0000FF00, 0x00FF0000, 0x00000000 } /* 8_8_8_8_REV */
};
- static const u_int32_t masks_table_rgba[8][4] = {
- { 0x00000000, 0x00000000, 0x00000000, 0x00000000 },
- { 0x00000000, 0x00000000, 0x00000000, 0x00000000 },
- { 0x00000000, 0x00000000, 0x00000000, 0x00000000 },
+ static const u_int32_t masks_table_rgba[6][4] = {
+ { 0x000000E0, 0x0000001C, 0x00000003, 0x00000000 }, /* 3_3_2 */
+ { 0x00000007, 0x00000038, 0x000000C0, 0x00000000 }, /* 2_3_3_REV */
{ 0x0000F800, 0x000007E0, 0x0000001F, 0x00000000 }, /* 5_6_5 */
{ 0x0000001F, 0x000007E0, 0x0000F800, 0x00000000 }, /* 5_6_5_REV */
{ 0xFF000000, 0x00FF0000, 0x0000FF00, 0x000000FF }, /* 8_8_8_8 */
- { 0x00000000, 0x00000000, 0x00000000, 0x00000000 },
{ 0x000000FF, 0x0000FF00, 0x00FF0000, 0xFF000000 }, /* 8_8_8_8_REV */
};
- static const u_int32_t masks_table_bgr[8][4] = {
- { 0x00000000, 0x00000000, 0x00000000, 0x00000000 },
- { 0x00000000, 0x00000000, 0x00000000, 0x00000000 },
- { 0x00000000, 0x00000000, 0x00000000, 0x00000000 },
+ static const u_int32_t masks_table_bgr[6][4] = {
+ { 0x00000007, 0x00000038, 0x000000C0, 0x00000000 }, /* 3_3_2 */
+ { 0x000000E0, 0x0000001C, 0x00000003, 0x00000000 }, /* 2_3_3_REV */
{ 0x0000001F, 0x000007E0, 0x0000F800, 0x00000000 }, /* 5_6_5 */
{ 0x0000F800, 0x000007E0, 0x0000001F, 0x00000000 }, /* 5_6_5_REV */
{ 0x0000FF00, 0x00FF0000, 0xFF000000, 0x00000000 }, /* 8_8_8_8 */
- { 0x00000000, 0x00000000, 0x00000000, 0x00000000 },
{ 0x00FF0000, 0x0000FF00, 0x000000FF, 0x00000000 }, /* 8_8_8_8_REV */
};
- static const u_int32_t masks_table_bgra[8][4] = {
- { 0x00000000, 0x00000000, 0x00000000, 0x00000000 },
- { 0x00000000, 0x00000000, 0x00000000, 0x00000000 },
- { 0x00000000, 0x00000000, 0x00000000, 0x00000000 },
+ static const u_int32_t masks_table_bgra[6][4] = {
+ { 0x00000007, 0x00000038, 0x000000C0, 0x00000000 }, /* 3_3_2 */
+ { 0x000000E0, 0x0000001C, 0x00000003, 0x00000000 }, /* 2_3_3_REV */
{ 0x0000001F, 0x000007E0, 0x0000F800, 0x00000000 }, /* 5_6_5 */
{ 0x0000F800, 0x000007E0, 0x0000001F, 0x00000000 }, /* 5_6_5_REV */
{ 0x0000FF00, 0x00FF0000, 0xFF000000, 0x000000FF }, /* 8_8_8_8 */
- { 0x00000000, 0x00000000, 0x00000000, 0x00000000 },
{ 0x00FF0000, 0x0000FF00, 0x000000FF, 0xFF000000 }, /* 8_8_8_8_REV */
};
- static const u_int8_t bytes_per_pixel[8] = {
- 0, 0, 0, 2, 2, 4, 0, 4
+ static const u_int8_t bytes_per_pixel[6] = {
+ 1, /* 3_3_2 */
+ 1, /* 2_3_3_REV */
+ 2, /* 5_6_5 */
+ 2, /* 5_6_5_REV */
+ 4, /* 8_8_8_8 */
+ 4 /* 8_8_8_8_REV */
};
const u_int8_t * bits;
const u_int32_t * masks;
- const int index = fb_type & 0x07;
+ int index;
__DRIconfig **configs, **c;
__GLcontextModes *modes;
unsigned i;
@@ -610,10 +589,29 @@ driCreateConfigs(GLenum fb_format, GLenum fb_type,
unsigned num_modes;
unsigned num_accum_bits = 2;
- if ( bytes_per_pixel[ index ] == 0 ) {
- fprintf( stderr, "[%s:%u] Framebuffer type 0x%04x has 0 bytes per pixel.\n",
- __FUNCTION__, __LINE__, fb_type );
- return NULL;
+ switch ( fb_type ) {
+ case GL_UNSIGNED_BYTE_3_3_2:
+ index = 0;
+ break;
+ case GL_UNSIGNED_BYTE_2_3_3_REV:
+ index = 1;
+ break;
+ case GL_UNSIGNED_SHORT_5_6_5:
+ index = 2;
+ break;
+ case GL_UNSIGNED_SHORT_5_6_5_REV:
+ index = 3;
+ break;
+ case GL_UNSIGNED_INT_8_8_8_8:
+ index = 4;
+ break;
+ case GL_UNSIGNED_INT_8_8_8_8_REV:
+ index = 5;
+ break;
+ default:
+ fprintf( stderr, "[%s:%u] Unknown framebuffer type 0x%04x.\n",
+ __FUNCTION__, __LINE__, fb_type );
+ return NULL;
}
@@ -625,35 +623,41 @@ driCreateConfigs(GLenum fb_format, GLenum fb_type,
switch ( fb_format ) {
case GL_RGB:
- bits = (bytes_per_pixel[ index ] == 2)
- ? bits_table[0] : bits_table[1];
masks = masks_table_rgb[ index ];
break;
case GL_RGBA:
- bits = (bytes_per_pixel[ index ] == 2)
- ? bits_table[0] : bits_table[2];
masks = masks_table_rgba[ index ];
break;
case GL_BGR:
- bits = (bytes_per_pixel[ index ] == 2)
- ? bits_table[0] : bits_table[1];
masks = masks_table_bgr[ index ];
break;
case GL_BGRA:
- bits = (bytes_per_pixel[ index ] == 2)
- ? bits_table[0] : bits_table[2];
masks = masks_table_bgra[ index ];
break;
default:
- fprintf( stderr, "[%s:%u] Framebuffer format 0x%04x is not GL_RGB, GL_RGBA, GL_BGR, or GL_BGRA.\n",
- __FUNCTION__, __LINE__, fb_format );
+ fprintf( stderr, "[%s:%u] Unknown framebuffer format 0x%04x.\n",
+ __FUNCTION__, __LINE__, fb_format );
return NULL;
}
+ switch ( bytes_per_pixel[ index ] ) {
+ case 1:
+ bits = bits_table[0];
+ break;
+ case 2:
+ bits = bits_table[1];
+ break;
+ default:
+ bits = ((fb_format == GL_RGB) || (fb_format == GL_BGR))
+ ? bits_table[2]
+ : bits_table[3];
+ break;
+ }
+
num_modes = num_depth_stencil_bits * num_db_modes * num_accum_bits;
configs = _mesa_calloc((num_modes + 1) * sizeof *configs);
if (configs == NULL)
@@ -755,3 +759,114 @@ const __DRIconfig **driConcatConfigs(__DRIconfig **a, __DRIconfig **b)
return all;
}
+
+#define __ATTRIB(attrib, field) \
+ { attrib, offsetof(__GLcontextModes, field) }
+
+static const struct { unsigned int attrib, offset; } attribMap[] = {
+ __ATTRIB(__DRI_ATTRIB_BUFFER_SIZE, rgbBits),
+ __ATTRIB(__DRI_ATTRIB_LEVEL, level),
+ __ATTRIB(__DRI_ATTRIB_RED_SIZE, redBits),
+ __ATTRIB(__DRI_ATTRIB_GREEN_SIZE, greenBits),
+ __ATTRIB(__DRI_ATTRIB_BLUE_SIZE, blueBits),
+ __ATTRIB(__DRI_ATTRIB_ALPHA_SIZE, alphaBits),
+ __ATTRIB(__DRI_ATTRIB_DEPTH_SIZE, depthBits),
+ __ATTRIB(__DRI_ATTRIB_STENCIL_SIZE, stencilBits),
+ __ATTRIB(__DRI_ATTRIB_ACCUM_RED_SIZE, accumRedBits),
+ __ATTRIB(__DRI_ATTRIB_ACCUM_GREEN_SIZE, accumGreenBits),
+ __ATTRIB(__DRI_ATTRIB_ACCUM_BLUE_SIZE, accumBlueBits),
+ __ATTRIB(__DRI_ATTRIB_ACCUM_ALPHA_SIZE, accumAlphaBits),
+ __ATTRIB(__DRI_ATTRIB_SAMPLE_BUFFERS, sampleBuffers),
+ __ATTRIB(__DRI_ATTRIB_SAMPLES, samples),
+ __ATTRIB(__DRI_ATTRIB_DOUBLE_BUFFER, doubleBufferMode),
+ __ATTRIB(__DRI_ATTRIB_STEREO, stereoMode),
+ __ATTRIB(__DRI_ATTRIB_AUX_BUFFERS, numAuxBuffers),
+ __ATTRIB(__DRI_ATTRIB_TRANSPARENT_TYPE, transparentPixel),
+ __ATTRIB(__DRI_ATTRIB_TRANSPARENT_INDEX_VALUE, transparentPixel),
+ __ATTRIB(__DRI_ATTRIB_TRANSPARENT_RED_VALUE, transparentRed),
+ __ATTRIB(__DRI_ATTRIB_TRANSPARENT_GREEN_VALUE, transparentGreen),
+ __ATTRIB(__DRI_ATTRIB_TRANSPARENT_BLUE_VALUE, transparentBlue),
+ __ATTRIB(__DRI_ATTRIB_TRANSPARENT_ALPHA_VALUE, transparentAlpha),
+ __ATTRIB(__DRI_ATTRIB_FLOAT_MODE, floatMode),
+ __ATTRIB(__DRI_ATTRIB_RED_MASK, redMask),
+ __ATTRIB(__DRI_ATTRIB_GREEN_MASK, greenMask),
+ __ATTRIB(__DRI_ATTRIB_BLUE_MASK, blueMask),
+ __ATTRIB(__DRI_ATTRIB_ALPHA_MASK, alphaMask),
+ __ATTRIB(__DRI_ATTRIB_MAX_PBUFFER_WIDTH, maxPbufferWidth),
+ __ATTRIB(__DRI_ATTRIB_MAX_PBUFFER_HEIGHT, maxPbufferHeight),
+ __ATTRIB(__DRI_ATTRIB_MAX_PBUFFER_PIXELS, maxPbufferPixels),
+ __ATTRIB(__DRI_ATTRIB_OPTIMAL_PBUFFER_WIDTH, optimalPbufferWidth),
+ __ATTRIB(__DRI_ATTRIB_OPTIMAL_PBUFFER_HEIGHT, optimalPbufferHeight),
+ __ATTRIB(__DRI_ATTRIB_SWAP_METHOD, swapMethod),
+ __ATTRIB(__DRI_ATTRIB_BIND_TO_TEXTURE_RGB, bindToTextureRgb),
+ __ATTRIB(__DRI_ATTRIB_BIND_TO_TEXTURE_RGBA, bindToTextureRgba),
+ __ATTRIB(__DRI_ATTRIB_BIND_TO_MIPMAP_TEXTURE, bindToMipmapTexture),
+ __ATTRIB(__DRI_ATTRIB_BIND_TO_TEXTURE_TARGETS, bindToTextureTargets),
+ __ATTRIB(__DRI_ATTRIB_YINVERTED, yInverted),
+
+ /* The struct field doesn't matter here, these are handled by the
+ * switch in driGetConfigAttribIndex. We need them in the array
+ * so the iterator includes them though.*/
+ __ATTRIB(__DRI_ATTRIB_RENDER_TYPE, level),
+ __ATTRIB(__DRI_ATTRIB_CONFIG_CAVEAT, level),
+ __ATTRIB(__DRI_ATTRIB_SWAP_METHOD, level)
+};
+
+#define ARRAY_SIZE(a) (sizeof (a) / sizeof ((a)[0]))
+
+static int
+driGetConfigAttribIndex(const __DRIconfig *config,
+ unsigned int index, unsigned int *value)
+{
+ switch (attribMap[index].attrib) {
+ case __DRI_ATTRIB_RENDER_TYPE:
+ if (config->modes.rgbMode)
+ *value = __DRI_ATTRIB_RGBA_BIT;
+ else
+ *value = __DRI_ATTRIB_COLOR_INDEX_BIT;
+ break;
+ case __DRI_ATTRIB_CONFIG_CAVEAT:
+ if (config->modes.visualRating == GLX_NON_CONFORMANT_CONFIG)
+ *value = __DRI_ATTRIB_NON_CONFORMANT_CONFIG;
+ else if (config->modes.visualRating == GLX_SLOW_CONFIG)
+ *value = __DRI_ATTRIB_SLOW_BIT;
+ else
+ *value = 0;
+ break;
+ case __DRI_ATTRIB_SWAP_METHOD:
+ break;
+
+ default:
+ *value = *(unsigned int *)
+ ((char *) &config->modes + attribMap[index].offset);
+
+ break;
+ }
+
+ return GL_TRUE;
+}
+
+int
+driGetConfigAttrib(const __DRIconfig *config,
+ unsigned int attrib, unsigned int *value)
+{
+ int i;
+
+ for (i = 0; i < ARRAY_SIZE(attribMap); i++)
+ if (attribMap[i].attrib == attrib)
+ return driGetConfigAttribIndex(config, i, value);
+
+ return GL_FALSE;
+}
+
+int
+driIndexConfigAttrib(const __DRIconfig *config, int index,
+ unsigned int *attrib, unsigned int *value)
+{
+ if (index >= 0 && index < ARRAY_SIZE(attribMap)) {
+ *attrib = attribMap[index].attrib;
+ return driGetConfigAttribIndex(config, index, value);
+ }
+
+ return GL_FALSE;
+}
diff --git a/src/mesa/drivers/dri/common/utils.h b/src/mesa/drivers/dri/common/utils.h
index 45a78e5ca5..0c09a7e68f 100644
--- a/src/mesa/drivers/dri/common/utils.h
+++ b/src/mesa/drivers/dri/common/utils.h
@@ -29,8 +29,11 @@
#ifndef DRI_DEBUG_H
#define DRI_DEBUG_H
+#include <GL/gl.h>
+#include <GL/internal/dri_interface.h>
#include "context.h"
-#include "dri_util.h"
+
+typedef struct __DRIutilversionRec2 __DRIutilversion2;
struct dri_debug_control {
const char * string;
@@ -84,6 +87,17 @@ struct dri_extension {
const struct dri_extension_function * functions;
};
+/**
+ * Used to store a version which includes a major range instead of a single
+ * major version number.
+ */
+struct __DRIutilversionRec2 {
+ int major_min; /** min allowed Major version number. */
+ int major_max; /** max allowed Major version number. */
+ int minor; /**< Minor version number. */
+ int patch; /**< Patch-level. */
+};
+
extern unsigned driParseDebugString( const char * debug,
const struct dri_debug_control * control );
@@ -106,12 +120,14 @@ extern GLboolean driCheckDriDdxDrmVersions3(const char * driver_name,
const __DRIversion * ddxActual, const __DRIutilversion2 * ddxExpected,
const __DRIversion * drmActual, const __DRIversion * drmExpected);
-extern GLint driIntersectArea( drm_clip_rect_t rect1, drm_clip_rect_t rect2 );
-
extern GLboolean driClipRectToFramebuffer( const GLframebuffer *buffer,
GLint *x, GLint *y,
GLsizei *width, GLsizei *height );
+struct __DRIconfigRec {
+ __GLcontextModes modes;
+};
+
extern __DRIconfig **
driCreateConfigs(GLenum fb_format, GLenum fb_type,
const u_int8_t * depth_bits, const u_int8_t * stencil_bits,
@@ -120,4 +136,11 @@ driCreateConfigs(GLenum fb_format, GLenum fb_type,
const __DRIconfig **driConcatConfigs(__DRIconfig **a, __DRIconfig **b);
+int
+driGetConfigAttrib(const __DRIconfig *config,
+ unsigned int attrib, unsigned int *value);
+int
+driIndexConfigAttrib(const __DRIconfig *config, int index,
+ unsigned int *attrib, unsigned int *value);
+
#endif /* DRI_DEBUG_H */
diff --git a/src/mesa/drivers/dri/common/vblank.c b/src/mesa/drivers/dri/common/vblank.c
index e81cc6886f..dc2cbcc84d 100644
--- a/src/mesa/drivers/dri/common/vblank.c
+++ b/src/mesa/drivers/dri/common/vblank.c
@@ -260,8 +260,8 @@ static int do_wait( drmVBlank * vbl, GLuint * vbl_seq, int fd )
if ( first_time ) {
fprintf(stderr,
"%s: drmWaitVBlank returned %d, IRQs don't seem to be"
- " working correctly.\nTry running with LIBGL_THROTTLE_REFRESH"
- " and LIBL_SYNC_REFRESH unset.\n", __FUNCTION__, ret);
+ " working correctly.\nTry adjusting the vblank_mode"
+ " configuration parameter.\n", __FUNCTION__, ret);
first_time = GL_FALSE;
}
diff --git a/src/mesa/drivers/dri/common/xmlpool/Makefile b/src/mesa/drivers/dri/common/xmlpool/Makefile
index b077809cd1..62ec919ea6 100644
--- a/src/mesa/drivers/dri/common/xmlpool/Makefile
+++ b/src/mesa/drivers/dri/common/xmlpool/Makefile
@@ -57,8 +57,8 @@ all: options.h
# Only intermediate files are cleaned up. options.h is not deleted because
# it's in CVS.
clean:
- rm -f $(POT) *~
- rm -rf $(LANGS)
+ -rm -f $(POT) *~
+ -rm -rf $(LANGS)
# Default target options.h
options.h: t_options.h mo
diff --git a/src/mesa/drivers/dri/glcore/Makefile b/src/mesa/drivers/dri/glcore/Makefile
deleted file mode 100644
index 968190acfc..0000000000
--- a/src/mesa/drivers/dri/glcore/Makefile
+++ /dev/null
@@ -1,84 +0,0 @@
-# src/mesa/drivers/dri/glcore/Makefile
-
-TOP = ../../../../..
-include $(TOP)/configs/current
-
-LIBNAME = glcore_dri.so
-
-DRIVER_SOURCES = glcore_driver.c \
- $(TOP)/src/mesa/drivers/common/driverfuncs.c \
- ../common/dri_util.c
-
-C_SOURCES = \
- $(DRIVER_SOURCES) \
- $(DRI_SOURCES)
-
-
-# Include directories
-INCLUDE_DIRS = \
- -I. \
- -I../common \
- -I../dri_client \
- -I../dri_client/imports \
- -Iserver \
- -I$(TOP)/include \
- -I$(DRM_SOURCE_PATH)/shared-core \
- -I$(TOP)/src/mesa \
- -I$(TOP)/src/mesa/main \
- -I$(TOP)/src/mesa/glapi \
- -I$(TOP)/src/mesa/math \
- -I$(TOP)/src/mesa/transform \
- -I$(TOP)/src/mesa/shader \
- -I$(TOP)/src/mesa/swrast \
- -I$(TOP)/src/mesa/swrast_setup
-
-# Core Mesa objects
-MESA_MODULES = $(TOP)/src/mesa/libmesa.a
-
-# Libraries that the driver shared lib depends on
-LIB_DEPS = -lm -lpthread -lc
-# LIB_DEPS = -lGL -lm -lpthread -lc
-
-
-ASM_SOURCES =
-
-OBJECTS = $(C_SOURCES:.c=.o) \
- $(ASM_SOURCES:.S=.o)
-
-
-##### RULES #####
-
-.c.o:
- $(CC) -c $(INCLUDE_DIRS) $(CFLAGS) $(DEFINES) $< -o $@
-
-.S.o:
- $(CC) -c $(INCLUDE_DIRS) $(CFLAGS) $(DEFINES) $< -o $@
-
-
-##### TARGETS #####
-
-default: depend $(TOP)/$(LIB_DIR)/$(LIBNAME)
-
-
-$(TOP)/$(LIB_DIR)/$(LIBNAME): $(OBJECTS) $(MESA_MODULES) $(WINOBJ) Makefile
- CC="$(CC)" CXX="$(CXX)" $(TOP)/bin/mklib -o $(LIBNAME) -noprefix \
- -ldflags '$(LDFLAGS)' -install $(TOP)/$(LIB_DIR) \
- $(OBJECTS) $(WINLIB) $(LIB_DEPS) $(WINOBJ) $(MESA_MODULES)
-
-
-depend: $(C_SOURCES) $(ASM_SOURCES)
- touch depend
- $(MKDEP) $(MKDEP_OPTIONS) $(INCLUDE_DIRS) $(C_SOURCES) $(ASM_SOURCES) \
- > /dev/null
-
-
-# Emacs tags
-tags:
- etags `find . -name \*.[ch]` `find ../include`
-
-
-clean:
- -rm -f *.o server/*.o
-
-
-include depend
diff --git a/src/mesa/drivers/dri/glcore/glcore_driver.c b/src/mesa/drivers/dri/glcore/glcore_driver.c
deleted file mode 100644
index 2577816041..0000000000
--- a/src/mesa/drivers/dri/glcore/glcore_driver.c
+++ /dev/null
@@ -1,128 +0,0 @@
-/*
- * Copyright 2006 Red Hat, Inc.
- *
- * 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 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.
- */
-
-/*
- * This implements a software-only "DRI" driver. It doesn't actually speak
- * any DRI protocol or talk to the DRM, it just looks enough like a DRI driver
- * that libglx in the server can load it for software rendering in the
- * unaccelerated case.
- */
-
-static GLboolean
-glcoreInitDriver(__DRIscreenPrivate *driScreenPriv)
-{
-}
-
-static void
-glcoreDestroyScreen(__DRIScreenPrivate *driScreenPriv)
-{
-}
-
-static GLboolean
-glcoreCreateContext(const __GLcontextModes *glVisual,
- __DRIcontextPrivate *driContextPriv,
- void *shared_context)
-{
-}
-
-static void
-glcoreDestroyContext(__DRIcontextPrivate *driContextPriv)
-{
-}
-
-static GLboolean
-glcoreCreateBuffer(__DRIscreenPrivate *driScreenPriv,
- __DRIdrawablePrivate *driDrawablePriv,
- const __GLcontextModes *mesaVisual,
- GLboolean isPixmap)
-{
-}
-
-static void
-glcoreDestroyBuffer(__DRIdrawablePrivate *driDrawablePriv)
-{
-}
-
-static void
-glcoreSwapBuffers(__DRIdrawablePrivate *driDrawablePriv)
-{
-}
-
-static GLboolean
-glcoreMakeCurrent(__DRIcontextPrivate *driContextPriv,
- __DRIdrawablePrivate *driDrawablePriv,
- __DRIdrawablePrivate *driReadablePriv)
-{
-}
-
-static GLboolean
-glcoreUnbindContext(__DRIcontextPrivate *driContextPriv)
-{
-}
-
-static struct __DriverAPIRec glcore_api = {
- .InitDriver = glcoreInitDriver,
- .DestroyScreen = glcoreDestroyScreen,
- .CreateContext = glcoreCreateContext,
- .DestroyContext = glcoreDestroyContext,
- .CreateBuffer = glcoreCreateBuffer,
- .DestroyBuffer = glcoreDestroyBuffer,
- .SwapBuffers = glcoreSwapBuffers,
- .MakeCurrent = glcoreMakeCurrent,
- .UnbindContext = glcoreUnbindContext,
-};
-
-static __GLcontextModes *
-glcoreFillInModes(unsigned pixel_bits)
-{
-}
-
-PUBLIC void *
-__driCreateNewScreen_20050727(__DRInativeDisplay *dpy, int scrn,
- __DRIscreen *psc, const __GLcontextModes *modes,
- const __DRIversion *ddx_version,
- const __DRIversion *dri_version,
- const __DRIversion *drm_version,
- const __DRIframebuffer *fb, drmAddress pSarea,
- int fd, int internal_api_version,
- const ___DRIinterfaceMethods *interface,
- __GLcontextModes **driver_modes)
-{
- __DRIscreenPrivate *driScreenPriv;
- glcoreDriverPrivate *glcoreDriverPriv;
-
- /* would normally check ddx/dri/drm versions here */
-
- driScreenPriv = __driUtilCreateNewScreen(dpy, scrn, psc, NULL, ddx_version,
- dri_version, drm_version, fb,
- internal_api_version, &glcore_api);
- if (!driScreenPriv)
- return NULL;
-
- glcoreDriverPriv = driScreenPriv->pDrvPriv;
-
- *driver_modes = glcoreFillInModes(glcoreDriverPriv->bpp);
-
- driInitExtensions(NULL, NULL, GL_FALSE);
-
- return driScreenPriv;
-}
diff --git a/src/mesa/drivers/dri/i965/brw_draw.c b/src/mesa/drivers/dri/i965/brw_draw.c
index 6124ab6b0f..f90c5f7b08 100644
--- a/src/mesa/drivers/dri/i965/brw_draw.c
+++ b/src/mesa/drivers/dri/i965/brw_draw.c
@@ -257,10 +257,12 @@ static GLboolean brw_try_draw_prims( GLcontext *ctx,
struct intel_context *intel = intel_context(ctx);
struct brw_context *brw = brw_context(ctx);
GLboolean retval = GL_FALSE;
- GLuint i, ret;
+ GLuint i;
GLuint ib_offset;
dri_bo *ib_bo;
GLboolean force_flush = GL_FALSE;
+ int ret;
+
if (ctx->NewState)
_mesa_update_state( ctx );
@@ -316,6 +318,14 @@ static GLboolean brw_try_draw_prims( GLcontext *ctx,
goto flush;
}
+ /* Various fallback checks:
+ */
+ if (brw->intel.Fallback)
+ goto out;
+
+ if (check_fallbacks( brw, prim, nr_prims ))
+ goto out;
+
/* need to account for index buffer and vertex buffer */
if (ib) {
ret = brw_prepare_indices( brw, ib , &ib_bo, &ib_offset);
@@ -333,16 +343,6 @@ static GLboolean brw_try_draw_prims( GLcontext *ctx,
force_flush = GL_TRUE;
goto flush;
}
-
-
-
- /* Various fallback checks:
- */
- if (brw->intel.Fallback)
- goto out;
-
- if (check_fallbacks( brw, prim, nr_prims ))
- goto out;
/* Upload index, vertex data:
*/
diff --git a/src/mesa/drivers/dri/i965/brw_draw_upload.c b/src/mesa/drivers/dri/i965/brw_draw_upload.c
index aa985d68b6..2d99238ddc 100644
--- a/src/mesa/drivers/dri/i965/brw_draw_upload.c
+++ b/src/mesa/drivers/dri/i965/brw_draw_upload.c
@@ -404,6 +404,7 @@ int brw_prepare_vertices( struct brw_context *brw,
*/
copy_array_to_vbo_array(brw, upload[0], interleave);
+ ret |= dri_bufmgr_check_aperture_space(upload[0]->bo);
for (i = 1; i < nr_uploads; i++) {
/* Then, just point upload[i] at upload[0]'s buffer. */
upload[i]->stride = interleave;
@@ -416,13 +417,13 @@ int brw_prepare_vertices( struct brw_context *brw,
else {
/* Upload non-interleaved arrays */
for (i = 0; i < nr_uploads; i++) {
- copy_array_to_vbo_array(brw, upload[i], upload[i]->element_size);
+ copy_array_to_vbo_array(brw, upload[i], upload[i]->element_size);
+ if (upload[i]->bo) {
+ ret |= dri_bufmgr_check_aperture_space(upload[i]->bo);
+ }
}
}
- if (brw->vb.upload.bo) {
- ret |= dri_bufmgr_check_aperture_space(brw->vb.upload.bo);
- }
if (ret)
return 1;
diff --git a/src/mesa/drivers/dri/intel/intel_tex.c b/src/mesa/drivers/dri/intel/intel_tex.c
index 329af0d1b0..f1d6a6dbfc 100644
--- a/src/mesa/drivers/dri/intel/intel_tex.c
+++ b/src/mesa/drivers/dri/intel/intel_tex.c
@@ -172,14 +172,13 @@ timed_memcpy(void *dest, const void *src, size_t n)
*/
void
intel_generate_mipmap(GLcontext *ctx, GLenum target,
- const struct gl_texture_unit *texUnit,
struct gl_texture_object *texObj)
{
struct intel_texture_object *intelObj = intel_texture_object(texObj);
GLuint nr_faces = (intelObj->base.Target == GL_TEXTURE_CUBE_MAP) ? 6 : 1;
int face, i;
- _mesa_generate_mipmap(ctx, target, texUnit, texObj);
+ _mesa_generate_mipmap(ctx, target, texObj);
/* Update the level information in our private data in the new images, since
* it didn't get set as part of a normal TexImage path.
@@ -198,6 +197,15 @@ intel_generate_mipmap(GLcontext *ctx, GLenum target,
}
}
+static void intelGenerateMipmap(GLcontext *ctx, GLenum target, struct gl_texture_object *texObj)
+{
+ struct intel_context *intel = intel_context(ctx);
+ struct intel_texture_object *intelObj = intel_texture_object(texObj);
+
+ intel_tex_map_images(intel, intelObj);
+ intel_generate_mipmap(ctx, target, texObj);
+ intel_tex_unmap_images(intel, intelObj);
+}
void
intelInitTextureFuncs(struct dd_function_table *functions)
@@ -221,6 +229,7 @@ intelInitTextureFuncs(struct dd_function_table *functions)
functions->CopyTexSubImage2D = _swrast_copy_texsubimage2d;
#endif
functions->GetTexImage = intelGetTexImage;
+ functions->GenerateMipmap = intelGenerateMipmap;
/* compressed texture functions */
functions->CompressedTexImage2D = intelCompressedTexImage2D;
diff --git a/src/mesa/drivers/dri/intel/intel_tex.h b/src/mesa/drivers/dri/intel/intel_tex.h
index 3a87137cc9..60ab8203e5 100644
--- a/src/mesa/drivers/dri/intel/intel_tex.h
+++ b/src/mesa/drivers/dri/intel/intel_tex.h
@@ -151,7 +151,6 @@ void intel_tex_unmap_images(struct intel_context *intel,
int intel_compressed_num_bytes(GLuint mesaFormat);
void intel_generate_mipmap(GLcontext *ctx, GLenum target,
- const struct gl_texture_unit *texUnit,
struct gl_texture_object *texObj);
#endif
diff --git a/src/mesa/drivers/dri/intel/intel_tex_copy.c b/src/mesa/drivers/dri/intel/intel_tex_copy.c
index 7facc469f4..1add7c6188 100644
--- a/src/mesa/drivers/dri/intel/intel_tex_copy.c
+++ b/src/mesa/drivers/dri/intel/intel_tex_copy.c
@@ -161,9 +161,7 @@ do_copy_texsubimage(struct intel_context *intel,
/* GL_SGIS_generate_mipmap */
if (intelImage->level == texObj->BaseLevel && texObj->GenerateMipmap) {
- intel_generate_mipmap(ctx, target,
- &ctx->Texture.Unit[ctx->Texture.CurrentUnit],
- texObj);
+ intel_generate_mipmap(ctx, target, texObj);
}
return GL_TRUE;
diff --git a/src/mesa/drivers/dri/intel/intel_tex_image.c b/src/mesa/drivers/dri/intel/intel_tex_image.c
index bcb65835c6..95ddbd5920 100644
--- a/src/mesa/drivers/dri/intel/intel_tex_image.c
+++ b/src/mesa/drivers/dri/intel/intel_tex_image.c
@@ -522,9 +522,7 @@ intelTexImage(GLcontext * ctx,
/* GL_SGIS_generate_mipmap */
if (level == texObj->BaseLevel && texObj->GenerateMipmap) {
- intel_generate_mipmap(ctx, target,
- &ctx->Texture.Unit[ctx->Texture.CurrentUnit],
- texObj);
+ intel_generate_mipmap(ctx, target, texObj);
}
_mesa_unmap_teximage_pbo(ctx, unpack);
diff --git a/src/mesa/drivers/dri/intel/intel_tex_subimage.c b/src/mesa/drivers/dri/intel/intel_tex_subimage.c
index 78621814c3..5428a1d068 100644
--- a/src/mesa/drivers/dri/intel/intel_tex_subimage.c
+++ b/src/mesa/drivers/dri/intel/intel_tex_subimage.c
@@ -103,9 +103,7 @@ intelTexSubimage(GLcontext * ctx,
/* GL_SGIS_generate_mipmap */
if (level == texObj->BaseLevel && texObj->GenerateMipmap) {
- intel_generate_mipmap(ctx, target,
- &ctx->Texture.Unit[ctx->Texture.CurrentUnit],
- texObj);
+ intel_generate_mipmap(ctx, target, texObj);
}
_mesa_unmap_teximage_pbo(ctx, packing);
diff --git a/src/mesa/drivers/dri/r300/r300_reg.h b/src/mesa/drivers/dri/r300/r300_reg.h
index 8b0da0db4e..acdd72b74b 100644
--- a/src/mesa/drivers/dri/r300/r300_reg.h
+++ b/src/mesa/drivers/dri/r300/r300_reg.h
@@ -67,7 +67,6 @@ USE OR OTHER DEALINGS IN THE SOFTWARE.
/*
* Vertex Array Processing (VAP) Control
- * Stolen from r200 code from Christoph Brill (It's a guess!)
*/
#define R300_VAP_CNTL 0x2080
# define R300_PVS_NUM_SLOTS_SHIFT 0
diff --git a/src/mesa/drivers/dri/r300/r300_state.c b/src/mesa/drivers/dri/r300/r300_state.c
index 6f1f4aac74..cb39ce0110 100644
--- a/src/mesa/drivers/dri/r300/r300_state.c
+++ b/src/mesa/drivers/dri/r300/r300_state.c
@@ -1891,9 +1891,11 @@ static inline void r300SetupVertexProgramFragment(r300ContextPtr r300, int dest,
}
}
-#define MIN3(a,b,c) ((a)<(b) ? MIN2(a, c): MIN2(b, c))
+#define MIN3(a, b, c) ((a) < (b) ? MIN2(a, c) : MIN2(b, c))
-static void r300VapCntl(r300ContextPtr rmesa, GLuint input_count, GLuint output_count, GLuint temp_count)
+
+static void r300VapCntl(r300ContextPtr rmesa, GLuint input_count,
+ GLuint output_count, GLuint temp_count)
{
int vtx_mem_size;
int pvs_num_slots;
diff --git a/src/mesa/drivers/dri/r300/r300_vertprog.c b/src/mesa/drivers/dri/r300/r300_vertprog.c
index e91d96852d..861f0427cf 100644
--- a/src/mesa/drivers/dri/r300/r300_vertprog.c
+++ b/src/mesa/drivers/dri/r300/r300_vertprog.c
@@ -1426,6 +1426,8 @@ void r300SelectVertexShader(r300ContextPtr r300)
GLint wpos_idx;
vpc = (struct r300_vertex_program_cont *)ctx->VertexProgram._Current;
+ wanted_key.InputsRead = vpc->mesa_program.Base.InputsRead;
+ wanted_key.OutputsWritten = vpc->mesa_program.Base.OutputsWritten;
InputsRead = ctx->FragmentProgram._Current->Base.InputsRead;
wpos_idx = -1;
@@ -1439,11 +1441,9 @@ void r300SelectVertexShader(r300ContextPtr r300)
_mesa_exit(-1);
}
- InputsRead |= (FRAG_BIT_TEX0 << i);
+ wanted_key.OutputsWritten |= 1 << (VERT_RESULT_TEX0 + i);
wpos_idx = i;
}
- wanted_key.InputsRead = vpc->mesa_program.Base.InputsRead;
- wanted_key.OutputsWritten = vpc->mesa_program.Base.OutputsWritten;
add_outputs(&wanted_key, VERT_RESULT_HPOS);
diff --git a/src/mesa/drivers/dri/swrast/Makefile b/src/mesa/drivers/dri/swrast/Makefile
new file mode 100644
index 0000000000..5f3a4f2191
--- /dev/null
+++ b/src/mesa/drivers/dri/swrast/Makefile
@@ -0,0 +1,24 @@
+# src/mesa/drivers/dri/swrast/Makefile
+
+TOP = ../../../../..
+include $(TOP)/configs/current
+
+LIBNAME = swrast_dri.so
+
+DRIVER_SOURCES = \
+ swrast.c \
+ swrast_span.c
+
+C_SOURCES = \
+ $(SWRAST_COMMON_SOURCES) \
+ $(DRIVER_SOURCES)
+
+ASM_SOURCES =
+
+SWRAST_COMMON_SOURCES = \
+ ../../common/driverfuncs.c \
+ ../common/utils.c
+
+include ../Makefile.template
+
+symlinks:
diff --git a/src/mesa/drivers/dri/swrast/swrast.c b/src/mesa/drivers/dri/swrast/swrast.c
new file mode 100644
index 0000000000..c4dba59198
--- /dev/null
+++ b/src/mesa/drivers/dri/swrast/swrast.c
@@ -0,0 +1,727 @@
+/*
+ * Copyright (C) 2008 George Sapountzis <gsap7@yahoo.gr>
+ *
+ * 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
+ * BRIAN PAUL 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.
+ */
+
+/*
+ * DRI software rasterizer
+ *
+ * This is the mesa swrast module packaged into a DRI driver structure.
+ *
+ * The front-buffer is allocated by the loader. The loader provides read/write
+ * callbacks for access to the front-buffer. The driver uses a scratch row for
+ * front-buffer rendering to avoid repeated calls to the loader.
+ *
+ * The back-buffer is allocated by the driver and is private.
+ */
+
+#include "context.h"
+#include "extensions.h"
+#include "framebuffer.h"
+#include "imports.h"
+#include "renderbuffer.h"
+#include "swrast/swrast.h"
+#include "swrast_setup/swrast_setup.h"
+#include "tnl/tnl.h"
+#include "tnl/t_context.h"
+#include "tnl/t_pipeline.h"
+#include "vbo/vbo.h"
+#include "drivers/common/driverfuncs.h"
+
+#include "swrast_priv.h"
+
+
+#define need_GL_VERSION_1_3
+#define need_GL_VERSION_1_4
+#define need_GL_VERSION_1_5
+#define need_GL_VERSION_2_0
+
+/* sw extensions for imaging */
+#define need_GL_EXT_blend_color
+#define need_GL_EXT_blend_minmax
+#define need_GL_EXT_convolution
+#define need_GL_EXT_histogram
+#define need_GL_SGI_color_table
+
+/* sw extensions not associated with some GL version */
+#define need_GL_ARB_shader_objects
+#define need_GL_ARB_vertex_program
+#define need_GL_APPLE_vertex_array_object
+#define need_GL_ATI_fragment_shader
+#define need_GL_EXT_depth_bounds_test
+#define need_GL_EXT_framebuffer_object
+#define need_GL_EXT_framebuffer_blit
+#define need_GL_EXT_gpu_program_parameters
+#define need_GL_EXT_paletted_texture
+#define need_GL_IBM_multimode_draw_arrays
+#define need_GL_MESA_resize_buffers
+#define need_GL_NV_vertex_program
+#define need_GL_NV_fragment_program
+
+#include "extension_helper.h"
+#include "utils.h"
+
+const struct dri_extension card_extensions[] =
+{
+ { "GL_VERSION_1_3", GL_VERSION_1_3_functions },
+ { "GL_VERSION_1_4", GL_VERSION_1_4_functions },
+ { "GL_VERSION_1_5", GL_VERSION_1_5_functions },
+ { "GL_VERSION_2_0", GL_VERSION_2_0_functions },
+
+ { "GL_EXT_blend_color", GL_EXT_blend_color_functions },
+ { "GL_EXT_blend_minmax", GL_EXT_blend_minmax_functions },
+ { "GL_EXT_convolution", GL_EXT_convolution_functions },
+ { "GL_EXT_histogram", GL_EXT_histogram_functions },
+ { "GL_SGI_color_table", GL_SGI_color_table_functions },
+
+ { "GL_ARB_shader_objects", GL_ARB_shader_objects_functions },
+ { "GL_ARB_vertex_program", GL_ARB_vertex_program_functions },
+ { "GL_APPLE_vertex_array_object", GL_APPLE_vertex_array_object_functions },
+ { "GL_ATI_fragment_shader", GL_ATI_fragment_shader_functions },
+ { "GL_EXT_depth_bounds_test", GL_EXT_depth_bounds_test_functions },
+ { "GL_EXT_framebuffer_object", GL_EXT_framebuffer_object_functions },
+ { "GL_EXT_framebuffer_blit", GL_EXT_framebuffer_blit_functions },
+ { "GL_EXT_gpu_program_parameters", GL_EXT_gpu_program_parameters_functions },
+ { "GL_EXT_paletted_texture", GL_EXT_paletted_texture_functions },
+ { "GL_IBM_multimode_draw_arrays", GL_IBM_multimode_draw_arrays_functions },
+ { "GL_MESA_resize_buffers", GL_MESA_resize_buffers_functions },
+ { "GL_NV_vertex_program", GL_NV_vertex_program_functions },
+ { "GL_NV_fragment_program", GL_NV_fragment_program_functions },
+ { NULL, NULL }
+};
+
+
+/**
+ * Screen and config-related functions
+ */
+
+static void
+setupLoaderExtensions(__DRIscreen *psp,
+ const __DRIextension **extensions)
+{
+ int i;
+
+ for (i = 0; extensions[i]; i++) {
+ if (strcmp(extensions[i]->name, __DRI_SWRAST_LOADER) == 0)
+ psp->swrast_loader = (__DRIswrastLoaderExtension *) extensions[i];
+ }
+}
+
+static __DRIconfig **
+swrastFillInModes(__DRIscreen *psp,
+ unsigned pixel_bits, unsigned depth_bits,
+ unsigned stencil_bits, GLboolean have_back_buffer)
+{
+ __DRIconfig **configs;
+ unsigned depth_buffer_factor;
+ unsigned back_buffer_factor;
+ GLenum fb_format;
+ GLenum fb_type;
+
+ /* GLX_SWAP_COPY_OML is only supported because the Intel driver doesn't
+ * support pageflipping at all.
+ */
+ static const GLenum back_buffer_modes[] = {
+ GLX_NONE, GLX_SWAP_UNDEFINED_OML
+ };
+
+ u_int8_t depth_bits_array[4];
+ u_int8_t stencil_bits_array[4];
+
+ depth_bits_array[0] = 0;
+ depth_bits_array[1] = 0;
+ depth_bits_array[2] = depth_bits;
+ depth_bits_array[3] = depth_bits;
+
+ /* Just like with the accumulation buffer, always provide some modes
+ * with a stencil buffer.
+ */
+ stencil_bits_array[0] = 0;
+ stencil_bits_array[1] = (stencil_bits == 0) ? 8 : stencil_bits;
+ stencil_bits_array[2] = 0;
+ stencil_bits_array[3] = (stencil_bits == 0) ? 8 : stencil_bits;
+
+ depth_buffer_factor = 4;
+ back_buffer_factor = 2;
+
+ if (pixel_bits == 8) {
+ fb_format = GL_RGB;
+ fb_type = GL_UNSIGNED_BYTE_2_3_3_REV;
+ }
+ else if (pixel_bits == 16) {
+ fb_format = GL_RGB;
+ fb_type = GL_UNSIGNED_SHORT_5_6_5;
+ }
+ else {
+ fb_format = GL_BGRA;
+ fb_type = GL_UNSIGNED_INT_8_8_8_8_REV;
+ }
+
+ configs = driCreateConfigs(fb_format, fb_type,
+ depth_bits_array, stencil_bits_array,
+ depth_buffer_factor, back_buffer_modes,
+ back_buffer_factor);
+ if (configs == NULL) {
+ fprintf(stderr, "[%s:%u] Error creating FBConfig!\n", __func__,
+ __LINE__);
+ return NULL;
+ }
+
+ return configs;
+}
+
+static __DRIscreen *
+driCreateNewScreen(int scrn, const __DRIextension **extensions,
+ const __DRIconfig ***driver_configs, void *data)
+{
+ static const __DRIextension *emptyExtensionList[] = { NULL };
+ __DRIscreen *psp;
+ __DRIconfig **configs8, **configs16, **configs32;
+
+ (void) data;
+
+ TRACE;
+
+ psp = _mesa_calloc(sizeof(*psp));
+ if (!psp)
+ return NULL;
+
+ setupLoaderExtensions(psp, extensions);
+
+ psp->num = scrn;
+ psp->extensions = emptyExtensionList;
+
+ configs8 = swrastFillInModes(psp, 8, 8, 0, 1);
+ configs16 = swrastFillInModes(psp, 16, 16, 0, 1);
+ configs32 = swrastFillInModes(psp, 32, 24, 8, 1);
+
+ configs16 = (__DRIconfig **)driConcatConfigs(configs8, configs16);
+
+ *driver_configs = driConcatConfigs(configs16, configs32);
+
+ driInitExtensions( NULL, card_extensions, GL_FALSE );
+
+ return psp;
+}
+
+static void driDestroyScreen(__DRIscreen *psp)
+{
+ TRACE;
+
+ if (psp) {
+ _mesa_free(psp);
+ }
+}
+
+static const __DRIextension **driGetExtensions(__DRIscreen *psp)
+{
+ TRACE;
+
+ return psp->extensions;
+}
+
+
+/**
+ * Framebuffer and renderbuffer-related functions.
+ */
+
+static GLuint
+choose_pixel_format(const GLvisual *v)
+{
+ if (v->rgbMode) {
+ int bpp = v->rgbBits;
+
+ if (bpp == 32
+ && v->redMask == 0xff0000
+ && v->greenMask == 0x00ff00
+ && v->blueMask == 0x0000ff)
+ return PF_A8R8G8B8;
+ else if (bpp == 16
+ && v->redMask == 0xf800
+ && v->greenMask == 0x07e0
+ && v->blueMask == 0x001f)
+ return PF_R5G6B5;
+ else if (bpp == 8
+ && v->redMask == 0x07
+ && v->greenMask == 0x38
+ && v->blueMask == 0xc0)
+ return PF_R3G3B2;
+ }
+ else {
+ if (v->indexBits == 8)
+ return PF_CI8;
+ }
+
+ _mesa_problem( NULL, "unexpected format in %s", __FUNCTION__ );
+ return 0;
+}
+
+static void
+swrast_delete_renderbuffer(struct gl_renderbuffer *rb)
+{
+ TRACE;
+
+ _mesa_free(rb->Data);
+ _mesa_free(rb);
+}
+
+static GLboolean
+swrast_alloc_front_storage(GLcontext *ctx, struct gl_renderbuffer *rb,
+ GLenum internalFormat, GLuint width, GLuint height)
+{
+ struct swrast_renderbuffer *xrb = swrast_renderbuffer(rb);
+ int bpp;
+ unsigned mask = PITCH_ALIGN_BITS - 1;
+
+ TRACE;
+
+ rb->Data = NULL;
+ rb->Width = width;
+ rb->Height = height;
+
+ switch (internalFormat) {
+ case GL_RGB:
+ bpp = rb->RedBits + rb->GreenBits + rb->BlueBits;
+ break;
+ case GL_RGBA:
+ bpp = rb->RedBits + rb->GreenBits + rb->BlueBits + rb->AlphaBits;
+ break;
+ case GL_COLOR_INDEX8_EXT:
+ bpp = rb->IndexBits;
+ break;
+ default:
+ _mesa_problem( NULL, "unexpected format in %s", __FUNCTION__ );
+ return GL_FALSE;
+ }
+
+ /* always pad to PITCH_ALIGN_BITS */
+ xrb->pitch = ((width * bpp + mask) & ~mask) / 8;
+
+ return GL_TRUE;
+}
+
+static GLboolean
+swrast_alloc_back_storage(GLcontext *ctx, struct gl_renderbuffer *rb,
+ GLenum internalFormat, GLuint width, GLuint height)
+{
+ struct swrast_renderbuffer *xrb = swrast_renderbuffer(rb);
+
+ TRACE;
+
+ _mesa_free(rb->Data);
+
+ (void) swrast_alloc_front_storage(ctx, rb, internalFormat, width, height);
+
+ rb->Data = _mesa_malloc(height * xrb->pitch);
+
+ return GL_TRUE;
+}
+
+static struct swrast_renderbuffer *
+swrast_new_renderbuffer(const GLvisual *visual, GLboolean front)
+{
+ struct swrast_renderbuffer *xrb = _mesa_calloc(sizeof *xrb);
+ GLuint pixel_format;
+
+ TRACE;
+
+ if (xrb) {
+ _mesa_init_renderbuffer(&xrb->Base, 0);
+
+ pixel_format = choose_pixel_format(visual);
+
+ xrb->Base.Delete = swrast_delete_renderbuffer;
+ if (front) {
+ xrb->Base.AllocStorage = swrast_alloc_front_storage;
+ swrast_set_span_funcs_front(xrb, pixel_format);
+ }
+ else {
+ xrb->Base.AllocStorage = swrast_alloc_back_storage;
+ swrast_set_span_funcs_back(xrb, pixel_format);
+ }
+
+ switch (pixel_format) {
+ case PF_A8R8G8B8:
+ xrb->Base.InternalFormat = GL_RGBA;
+ xrb->Base._BaseFormat = GL_RGBA;
+ xrb->Base.DataType = GL_UNSIGNED_BYTE;
+ xrb->Base.RedBits = 8 * sizeof(GLubyte);
+ xrb->Base.GreenBits = 8 * sizeof(GLubyte);
+ xrb->Base.BlueBits = 8 * sizeof(GLubyte);
+ xrb->Base.AlphaBits = 8 * sizeof(GLubyte);
+ break;
+ case PF_R5G6B5:
+ xrb->Base.InternalFormat = GL_RGB;
+ xrb->Base._BaseFormat = GL_RGB;
+ xrb->Base.DataType = GL_UNSIGNED_BYTE;
+ xrb->Base.RedBits = 5 * sizeof(GLubyte);
+ xrb->Base.GreenBits = 6 * sizeof(GLubyte);
+ xrb->Base.BlueBits = 5 * sizeof(GLubyte);
+ xrb->Base.AlphaBits = 0;
+ break;
+ case PF_R3G3B2:
+ xrb->Base.InternalFormat = GL_RGB;
+ xrb->Base._BaseFormat = GL_RGB;
+ xrb->Base.DataType = GL_UNSIGNED_BYTE;
+ xrb->Base.RedBits = 3 * sizeof(GLubyte);
+ xrb->Base.GreenBits = 3 * sizeof(GLubyte);
+ xrb->Base.BlueBits = 2 * sizeof(GLubyte);
+ xrb->Base.AlphaBits = 0;
+ break;
+ case PF_CI8:
+ xrb->Base.InternalFormat = GL_COLOR_INDEX8_EXT;
+ xrb->Base._BaseFormat = GL_COLOR_INDEX;
+ xrb->Base.DataType = GL_UNSIGNED_BYTE;
+ xrb->Base.IndexBits = 8 * sizeof(GLubyte);
+ break;
+ default:
+ return NULL;
+ }
+ }
+ return xrb;
+}
+
+static __DRIdrawable *
+driCreateNewDrawable(__DRIscreen *screen,
+ const __DRIconfig *config, void *data)
+{
+ __DRIdrawable *buf;
+ struct swrast_renderbuffer *frontrb, *backrb;
+
+ TRACE;
+
+ buf = _mesa_calloc(sizeof *buf);
+ if (!buf)
+ return NULL;
+
+ buf->loaderPrivate = data;
+
+ buf->driScreenPriv = screen;
+
+ buf->row = _mesa_malloc(MAX_WIDTH * 4);
+
+ /* basic framebuffer setup */
+ _mesa_initialize_framebuffer(&buf->Base, &config->modes);
+
+ /* add front renderbuffer */
+ frontrb = swrast_new_renderbuffer(&config->modes, GL_TRUE);
+ _mesa_add_renderbuffer(&buf->Base, BUFFER_FRONT_LEFT, &frontrb->Base);
+
+ /* add back renderbuffer */
+ if (config->modes.doubleBufferMode) {
+ backrb = swrast_new_renderbuffer(&config->modes, GL_FALSE);
+ _mesa_add_renderbuffer(&buf->Base, BUFFER_BACK_LEFT, &backrb->Base);
+ }
+
+ /* add software renderbuffers */
+ _mesa_add_soft_renderbuffers(&buf->Base,
+ GL_FALSE, /* color */
+ config->modes.haveDepthBuffer,
+ config->modes.haveStencilBuffer,
+ config->modes.haveAccumBuffer,
+ GL_FALSE, /* alpha */
+ GL_FALSE /* aux bufs */);
+
+ return buf;
+}
+
+static void
+driDestroyDrawable(__DRIdrawable *buf)
+{
+ TRACE;
+
+ if (buf) {
+ struct gl_framebuffer *fb = &buf->Base;
+
+ _mesa_free(buf->row);
+
+ fb->DeletePending = GL_TRUE;
+ _mesa_unreference_framebuffer(&fb);
+ }
+}
+
+static void driSwapBuffers(__DRIdrawable *buf)
+{
+ GET_CURRENT_CONTEXT(ctx);
+
+ struct swrast_renderbuffer *frontrb =
+ swrast_renderbuffer(buf->Base.Attachment[BUFFER_FRONT_LEFT].Renderbuffer);
+ struct swrast_renderbuffer *backrb =
+ swrast_renderbuffer(buf->Base.Attachment[BUFFER_BACK_LEFT].Renderbuffer);
+
+ __DRIscreen *screen = buf->driScreenPriv;
+
+ TRACE;
+
+ /* check for signle-buffered */
+ if (backrb == NULL)
+ return;
+
+ /* check if swapping currently bound buffer */
+ if (ctx && ctx->DrawBuffer == &(buf->Base)) {
+ /* flush pending rendering */
+ _mesa_notifySwapBuffers(ctx);
+ }
+
+ screen->swrast_loader->putImage(buf, __DRI_SWRAST_IMAGE_OP_SWAP,
+ 0, 0,
+ frontrb->Base.Width,
+ frontrb->Base.Height,
+ backrb->Base.Data,
+ buf->loaderPrivate);
+}
+
+
+/**
+ * General device driver functions.
+ */
+
+static void
+get_window_size( GLframebuffer *fb, GLsizei *w, GLsizei *h )
+{
+ __DRIdrawable *buf = swrast_drawable(fb);
+ __DRIscreen *screen = buf->driScreenPriv;
+ int x, y;
+
+ screen->swrast_loader->getDrawableInfo(buf,
+ &x, &y, w, h,
+ buf->loaderPrivate);
+}
+
+static void
+swrast_check_and_update_window_size( GLcontext *ctx, GLframebuffer *fb )
+{
+ GLsizei width, height;
+
+ get_window_size(fb, &width, &height);
+ if (fb->Width != width || fb->Height != height) {
+ _mesa_resize_framebuffer(ctx, fb, width, height);
+ }
+}
+
+static const GLubyte *
+get_string(GLcontext *ctx, GLenum pname)
+{
+ (void) ctx;
+ switch (pname) {
+ case GL_VENDOR:
+ return (const GLubyte *) "Mesa Project";
+ case GL_RENDERER:
+ return (const GLubyte *) "Software Rasterizer";
+ default:
+ return NULL;
+ }
+}
+
+static void
+update_state( GLcontext *ctx, GLuint new_state )
+{
+ /* not much to do here - pass it on */
+ _swrast_InvalidateState( ctx, new_state );
+ _swsetup_InvalidateState( ctx, new_state );
+ _vbo_InvalidateState( ctx, new_state );
+ _tnl_InvalidateState( ctx, new_state );
+}
+
+static void
+viewport(GLcontext *ctx, GLint x, GLint y, GLsizei w, GLsizei h)
+{
+ GLframebuffer *draw = ctx->WinSysDrawBuffer;
+ GLframebuffer *read = ctx->WinSysReadBuffer;
+
+ swrast_check_and_update_window_size(ctx, draw);
+ swrast_check_and_update_window_size(ctx, read);
+}
+
+static void
+swrast_init_driver_functions(struct dd_function_table *driver)
+{
+ driver->GetString = get_string;
+ driver->UpdateState = update_state;
+ driver->GetBufferSize = NULL;
+ driver->Viewport = viewport;
+}
+
+
+/**
+ * Context-related functions.
+ */
+
+static __DRIcontext *
+driCreateNewContext(__DRIscreen *screen, const __DRIconfig *config,
+ __DRIcontext *shared, void *data)
+{
+ __DRIcontext *ctx;
+ GLcontext *mesaCtx;
+ struct dd_function_table functions;
+
+ TRACE;
+
+ ctx = _mesa_calloc(sizeof *ctx);
+ if (!ctx)
+ return NULL;
+
+ ctx->loaderPrivate = data;
+
+ ctx->driScreenPriv = screen;
+
+ /* build table of device driver functions */
+ _mesa_init_driver_functions(&functions);
+ swrast_init_driver_functions(&functions);
+
+ if (!_mesa_initialize_context(&ctx->Base, &config->modes,
+ shared ? &shared->Base : NULL,
+ &functions, (void *) ctx)) {
+ _mesa_free(ctx);
+ return NULL;
+ }
+
+ mesaCtx = &ctx->Base;
+
+ /* do bounds checking to prevent segfaults and server crashes! */
+ mesaCtx->Const.CheckArrayBounds = GL_TRUE;
+
+ /* create module contexts */
+ _swrast_CreateContext( mesaCtx );
+ _vbo_CreateContext( mesaCtx );
+ _tnl_CreateContext( mesaCtx );
+ _swsetup_CreateContext( mesaCtx );
+ _swsetup_Wakeup( mesaCtx );
+
+ /* use default TCL pipeline */
+ {
+ TNLcontext *tnl = TNL_CONTEXT(mesaCtx);
+ tnl->Driver.RunPipeline = _tnl_run_pipeline;
+ }
+
+ _mesa_enable_sw_extensions(mesaCtx);
+ _mesa_enable_1_3_extensions(mesaCtx);
+ _mesa_enable_1_4_extensions(mesaCtx);
+ _mesa_enable_1_5_extensions(mesaCtx);
+ _mesa_enable_2_0_extensions(mesaCtx);
+ _mesa_enable_2_1_extensions(mesaCtx);
+
+ return ctx;
+}
+
+static void
+driDestroyContext(__DRIcontext *ctx)
+{
+ GLcontext *mesaCtx;
+ TRACE;
+
+ if (ctx) {
+ mesaCtx = &ctx->Base;
+ _swsetup_DestroyContext( mesaCtx );
+ _swrast_DestroyContext( mesaCtx );
+ _tnl_DestroyContext( mesaCtx );
+ _vbo_DestroyContext( mesaCtx );
+ _mesa_destroy_context( mesaCtx );
+ }
+}
+
+static int
+driCopyContext(__DRIcontext *dst, __DRIcontext *src, unsigned long mask)
+{
+ TRACE;
+
+ _mesa_copy_context(&src->Base, &dst->Base, mask);
+ return GL_TRUE;
+}
+
+static int driBindContext(__DRIcontext *ctx,
+ __DRIdrawable *draw,
+ __DRIdrawable *read)
+{
+ GLcontext *mesaCtx;
+ GLframebuffer *mesaDraw;
+ GLframebuffer *mesaRead;
+ TRACE;
+
+ if (ctx) {
+ if (!draw || !read)
+ return GL_FALSE;
+
+ mesaCtx = &ctx->Base;
+ mesaDraw = &draw->Base;
+ mesaRead = &read->Base;
+
+ /* check for same context and buffer */
+ if (mesaCtx == _mesa_get_current_context()
+ && mesaCtx->DrawBuffer == mesaDraw
+ && mesaCtx->ReadBuffer == mesaRead) {
+ return GL_TRUE;
+ }
+
+ _glapi_check_multithread();
+
+ swrast_check_and_update_window_size(mesaCtx, mesaDraw);
+ if (read != draw)
+ swrast_check_and_update_window_size(mesaCtx, mesaRead);
+
+ _mesa_make_current( mesaCtx,
+ mesaDraw,
+ mesaRead );
+ }
+ else {
+ /* unbind */
+ _mesa_make_current( NULL, NULL, NULL );
+ }
+
+ return GL_TRUE;
+}
+
+static int driUnbindContext(__DRIcontext *ctx)
+{
+ TRACE;
+ (void) ctx;
+ _mesa_make_current(NULL, NULL, NULL);
+ return GL_TRUE;
+}
+
+
+static const __DRIcoreExtension driCoreExtension = {
+ { __DRI_CORE, __DRI_CORE_VERSION },
+ NULL, /* driCreateNewScreen */
+ driDestroyScreen,
+ driGetExtensions,
+ driGetConfigAttrib,
+ driIndexConfigAttrib,
+ NULL, /* driCreateNewDrawable */
+ driDestroyDrawable,
+ driSwapBuffers,
+ driCreateNewContext,
+ driCopyContext,
+ driDestroyContext,
+ driBindContext,
+ driUnbindContext
+};
+
+static const __DRIswrastExtension driSWRastExtension = {
+ { __DRI_SWRAST, __DRI_SWRAST_VERSION },
+ driCreateNewScreen,
+ driCreateNewDrawable
+};
+
+/* This is the table of extensions that the loader will dlsym() for. */
+PUBLIC const __DRIextension *__driDriverExtensions[] = {
+ &driCoreExtension.base,
+ &driSWRastExtension.base,
+ NULL
+};
diff --git a/src/mesa/drivers/dri/swrast/swrast_priv.h b/src/mesa/drivers/dri/swrast/swrast_priv.h
new file mode 100644
index 0000000000..a3e3922f12
--- /dev/null
+++ b/src/mesa/drivers/dri/swrast/swrast_priv.h
@@ -0,0 +1,142 @@
+/*
+ * Mesa 3-D graphics library
+ * Version: 7.1
+ *
+ * Copyright (C) 1999-2008 Brian Paul 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, 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
+ * BRIAN PAUL 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:
+ * George Sapountzis <gsap7@yahoo.gr>
+ */
+
+
+#ifndef _SWRAST_PRIV_H
+#define _SWRAST_PRIV_H
+
+#include <GL/gl.h>
+#include <GL/internal/dri_interface.h>
+#include "mtypes.h"
+
+
+/**
+ * Debugging
+ */
+#define DEBUG_CORE 0
+#define DEBUG_SPAN 0
+
+#if DEBUG_CORE
+#define TRACE _mesa_printf("--> %s\n", __FUNCTION__)
+#else
+#define TRACE
+#endif
+
+#if DEBUG_SPAN
+#define TRACE_SPAN _mesa_printf("--> %s\n", __FUNCTION__)
+#else
+#define TRACE_SPAN
+#endif
+
+
+/**
+ * Data types
+ */
+struct __DRIscreenRec {
+ int num;
+
+ const __DRIextension **extensions;
+
+ const __DRIswrastLoaderExtension *swrast_loader;
+};
+
+struct __DRIcontextRec {
+ GLcontext Base;
+
+ void *loaderPrivate;
+
+ __DRIscreen *driScreenPriv;
+};
+
+struct __DRIdrawableRec {
+ GLframebuffer Base;
+
+ void *loaderPrivate;
+
+ __DRIscreen *driScreenPriv;
+
+ /* scratch row for optimized front-buffer rendering */
+ char *row;
+};
+
+struct swrast_renderbuffer {
+ struct gl_renderbuffer Base;
+
+ /* renderbuffer pitch (in bytes) */
+ GLuint pitch;
+};
+
+static inline __DRIcontext *
+swrast_context(GLcontext *ctx)
+{
+ return (__DRIcontext *) ctx;
+}
+
+static inline __DRIdrawable *
+swrast_drawable(GLframebuffer *fb)
+{
+ return (__DRIdrawable *) fb;
+}
+
+static inline struct swrast_renderbuffer *
+swrast_renderbuffer(struct gl_renderbuffer *rb)
+{
+ return (struct swrast_renderbuffer *) rb;
+}
+
+
+/**
+ * Pixel formats we support
+ */
+#define PF_CI8 1 /**< Color Index mode */
+#define PF_A8R8G8B8 2 /**< 32-bit TrueColor: 8-A, 8-R, 8-G, 8-B bits */
+#define PF_R5G6B5 3 /**< 16-bit TrueColor: 5-R, 6-G, 5-B bits */
+#define PF_R3G3B2 4 /**< 8-bit TrueColor: 3-R, 3-G, 2-B bits */
+
+
+/**
+ * Renderbuffer pitch alignment (in bits).
+ *
+ * The xorg loader requires padding images to 32 bits. However, this should
+ * become a screen/drawable parameter XXX
+ */
+#define PITCH_ALIGN_BITS 32
+
+
+/* swrast_span.c */
+
+extern void
+swrast_set_span_funcs_back(struct swrast_renderbuffer *xrb,
+ GLuint pixel_format);
+
+extern void
+swrast_set_span_funcs_front(struct swrast_renderbuffer *xrb,
+ GLuint pixel_format);
+
+#endif /* _SWRAST_PRIV_H_ */
diff --git a/src/mesa/drivers/dri/swrast/swrast_span.c b/src/mesa/drivers/dri/swrast/swrast_span.c
new file mode 100644
index 0000000000..5e990368b2
--- /dev/null
+++ b/src/mesa/drivers/dri/swrast/swrast_span.c
@@ -0,0 +1,367 @@
+/*
+ * Mesa 3-D graphics library
+ * Version: 7.1
+ *
+ * Copyright (C) 1999-2008 Brian Paul 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, 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
+ * BRIAN PAUL 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:
+ * George Sapountzis <gsap7@yahoo.gr>
+ */
+
+#include "swrast_priv.h"
+
+#define YFLIP(_xrb, Y) ((_xrb)->Base.Height - (Y) - 1)
+
+/*
+ * Dithering support takes the "computation" extreme in the "computation vs.
+ * storage" trade-off. This approach is very simple to implement and any
+ * computational overhead should be acceptable. XMesa uses table lookups for
+ * around 8KB of storage overhead per visual.
+ */
+#define DITHER 1
+
+static const GLubyte kernel[16] = {
+ 0*16, 8*16, 2*16, 10*16,
+ 12*16, 4*16, 14*16, 6*16,
+ 3*16, 11*16, 1*16, 9*16,
+ 15*16, 7*16, 13*16, 5*16,
+};
+
+#if DITHER
+#define DITHER_COMP(X, Y) kernel[((X) & 0x3) | (((Y) & 0x3) << 2)]
+
+#define DITHER_CLAMP(X) (((X) < CHAN_MAX) ? (X) : CHAN_MAX)
+#else
+#define DITHER_COMP(X, Y) 0
+
+#define DITHER_CLAMP(X) (X)
+#endif
+
+
+/*
+ * Pixel macros shared across front/back buffer span functions.
+ */
+
+/* 32-bit BGRA */
+#define STORE_PIXEL_A8R8G8B8(DST, X, Y, VALUE) \
+ DST[3] = VALUE[ACOMP]; \
+ DST[2] = VALUE[RCOMP]; \
+ DST[1] = VALUE[GCOMP]; \
+ DST[0] = VALUE[BCOMP]
+#define STORE_PIXEL_RGB_A8R8G8B8(DST, X, Y, VALUE) \
+ DST[3] = 0xff; \
+ DST[2] = VALUE[RCOMP]; \
+ DST[1] = VALUE[GCOMP]; \
+ DST[0] = VALUE[BCOMP]
+#define FETCH_PIXEL_A8R8G8B8(DST, SRC) \
+ DST[ACOMP] = SRC[3]; \
+ DST[RCOMP] = SRC[2]; \
+ DST[GCOMP] = SRC[1]; \
+ DST[BCOMP] = SRC[0]
+
+
+/* 16-bit BGR */
+#define STORE_PIXEL_R5G6B5(DST, X, Y, VALUE) \
+ do { \
+ int d = DITHER_COMP(X, Y) >> 6; \
+ GLushort *p = (GLushort *)DST; \
+ *p = ( ((DITHER_CLAMP((VALUE[RCOMP]) + d) & 0xf8) << 8) | \
+ ((DITHER_CLAMP((VALUE[GCOMP]) + d) & 0xfc) << 3) | \
+ ((DITHER_CLAMP((VALUE[BCOMP]) + d) & 0xf8) >> 3) ); \
+ } while(0)
+#define FETCH_PIXEL_R5G6B5(DST, SRC) \
+ do { \
+ GLushort p = *(GLushort *)SRC; \
+ DST[ACOMP] = 0xff; \
+ DST[RCOMP] = ((p >> 8) & 0xf8) * 255 / 0xf8; \
+ DST[GCOMP] = ((p >> 3) & 0xfc) * 255 / 0xfc; \
+ DST[BCOMP] = ((p << 3) & 0xf8) * 255 / 0xf8; \
+ } while(0)
+
+
+/* 8-bit BGR */
+#define STORE_PIXEL_R3G3B2(DST, X, Y, VALUE) \
+ do { \
+ int d = DITHER_COMP(X, Y) >> 3; \
+ GLubyte *p = (GLubyte *)DST; \
+ *p = ( ((DITHER_CLAMP((VALUE[RCOMP]) + d) & 0xe0) >> 5) | \
+ ((DITHER_CLAMP((VALUE[GCOMP]) + d) & 0xe0) >> 2) | \
+ ((DITHER_CLAMP((VALUE[BCOMP]) + d) & 0xc0) >> 0) ); \
+ } while(0)
+#define FETCH_PIXEL_R3G3B2(DST, SRC) \
+ do { \
+ GLubyte p = *(GLubyte *)SRC; \
+ DST[ACOMP] = 0xff; \
+ DST[RCOMP] = ((p << 5) & 0xe0) * 255 / 0xe0; \
+ DST[GCOMP] = ((p << 2) & 0xe0) * 255 / 0xe0; \
+ DST[BCOMP] = ((p << 0) & 0xc0) * 255 / 0xc0; \
+ } while(0)
+
+
+/*
+ * Generate code for back-buffer span functions.
+ */
+
+/* 32-bit BGRA */
+#define NAME(FUNC) FUNC##_A8R8G8B8
+#define RB_TYPE GLubyte
+#define SPAN_VARS \
+ struct swrast_renderbuffer *xrb = swrast_renderbuffer(rb);
+#define INIT_PIXEL_PTR(P, X, Y) \
+ GLubyte *P = (GLubyte *)xrb->Base.Data + YFLIP(xrb, Y) * xrb->pitch + (X) * 4;
+#define INC_PIXEL_PTR(P) P += 4
+#define STORE_PIXEL(DST, X, Y, VALUE) \
+ STORE_PIXEL_A8R8G8B8(DST, X, Y, VALUE)
+#define STORE_PIXEL_RGB(DST, X, Y, VALUE) \
+ STORE_PIXEL_RGB_A8R8G8B8(DST, X, Y, VALUE)
+#define FETCH_PIXEL(DST, SRC) \
+ FETCH_PIXEL_A8R8G8B8(DST, SRC)
+
+#include "swrast/s_spantemp.h"
+
+
+/* 16-bit BGR */
+#define NAME(FUNC) FUNC##_R5G6B5
+#define RB_TYPE GLubyte
+#define SPAN_VARS \
+ struct swrast_renderbuffer *xrb = swrast_renderbuffer(rb);
+#define INIT_PIXEL_PTR(P, X, Y) \
+ GLubyte *P = (GLubyte *)xrb->Base.Data + YFLIP(xrb, Y) * xrb->pitch + (X) * 2;
+#define INC_PIXEL_PTR(P) P += 2
+#define STORE_PIXEL(DST, X, Y, VALUE) \
+ STORE_PIXEL_R5G6B5(DST, X, Y, VALUE)
+#define FETCH_PIXEL(DST, SRC) \
+ FETCH_PIXEL_R5G6B5(DST, SRC)
+
+#include "swrast/s_spantemp.h"
+
+
+/* 8-bit BGR */
+#define NAME(FUNC) FUNC##_R3G3B2
+#define RB_TYPE GLubyte
+#define SPAN_VARS \
+ struct swrast_renderbuffer *xrb = swrast_renderbuffer(rb);
+#define INIT_PIXEL_PTR(P, X, Y) \
+ GLubyte *P = (GLubyte *)xrb->Base.Data + YFLIP(xrb, Y) * xrb->pitch + (X) * 1;
+#define INC_PIXEL_PTR(P) P += 1
+#define STORE_PIXEL(DST, X, Y, VALUE) \
+ STORE_PIXEL_R3G3B2(DST, X, Y, VALUE)
+#define FETCH_PIXEL(DST, SRC) \
+ FETCH_PIXEL_R3G3B2(DST, SRC)
+
+#include "swrast/s_spantemp.h"
+
+
+/* 8-bit color index */
+#define NAME(FUNC) FUNC##_CI8
+#define CI_MODE
+#define RB_TYPE GLubyte
+#define SPAN_VARS \
+ struct swrast_renderbuffer *xrb = swrast_renderbuffer(rb);
+#define INIT_PIXEL_PTR(P, X, Y) \
+ GLubyte *P = (GLubyte *)xrb->Base.Data + YFLIP(xrb, Y) * xrb->pitch + (X);
+#define INC_PIXEL_PTR(P) P += 1
+#define STORE_PIXEL(DST, X, Y, VALUE) \
+ *DST = VALUE[0]
+#define FETCH_PIXEL(DST, SRC) \
+ DST = SRC[0]
+
+#include "swrast/s_spantemp.h"
+
+
+/*
+ * Generate code for front-buffer span functions.
+ */
+
+/* 32-bit BGRA */
+#define NAME(FUNC) FUNC##_A8R8G8B8_front
+#define RB_TYPE GLubyte
+#define SPAN_VARS \
+ struct swrast_renderbuffer *xrb = swrast_renderbuffer(rb);
+#define INIT_PIXEL_PTR(P, X, Y) \
+ GLubyte *P = (GLubyte *)row;
+#define INC_PIXEL_PTR(P) P += 4
+#define STORE_PIXEL(DST, X, Y, VALUE) \
+ STORE_PIXEL_A8R8G8B8(DST, X, Y, VALUE)
+#define STORE_PIXEL_RGB(DST, X, Y, VALUE) \
+ STORE_PIXEL_RGB_A8R8G8B8(DST, X, Y, VALUE)
+#define FETCH_PIXEL(DST, SRC) \
+ FETCH_PIXEL_A8R8G8B8(DST, SRC)
+
+#include "swrast_spantemp.h"
+
+
+/* 16-bit BGR */
+#define NAME(FUNC) FUNC##_R5G6B5_front
+#define RB_TYPE GLubyte
+#define SPAN_VARS \
+ struct swrast_renderbuffer *xrb = swrast_renderbuffer(rb);
+#define INIT_PIXEL_PTR(P, X, Y) \
+ GLubyte *P = (GLubyte *)row;
+#define INC_PIXEL_PTR(P) P += 2
+#define STORE_PIXEL(DST, X, Y, VALUE) \
+ STORE_PIXEL_R5G6B5(DST, X, Y, VALUE)
+#define FETCH_PIXEL(DST, SRC) \
+ FETCH_PIXEL_R5G6B5(DST, SRC)
+
+#include "swrast_spantemp.h"
+
+
+/* 8-bit BGR */
+#define NAME(FUNC) FUNC##_R3G3B2_front
+#define RB_TYPE GLubyte
+#define SPAN_VARS \
+ struct swrast_renderbuffer *xrb = swrast_renderbuffer(rb);
+#define INIT_PIXEL_PTR(P, X, Y) \
+ GLubyte *P = (GLubyte *)row;
+#define INC_PIXEL_PTR(P) P += 1
+#define STORE_PIXEL(DST, X, Y, VALUE) \
+ STORE_PIXEL_R3G3B2(DST, X, Y, VALUE)
+#define FETCH_PIXEL(DST, SRC) \
+ FETCH_PIXEL_R3G3B2(DST, SRC)
+
+#include "swrast_spantemp.h"
+
+
+/* 8-bit color index */
+#define NAME(FUNC) FUNC##_CI8_front
+#define CI_MODE
+#define RB_TYPE GLubyte
+#define SPAN_VARS \
+ struct swrast_renderbuffer *xrb = swrast_renderbuffer(rb);
+#define INIT_PIXEL_PTR(P, X, Y) \
+ GLubyte *P = (GLubyte *)row;
+#define INC_PIXEL_PTR(P) P += 1
+#define STORE_PIXEL(DST, X, Y, VALUE) \
+ *DST = VALUE[0]
+#define FETCH_PIXEL(DST, SRC) \
+ DST = SRC[0]
+
+#include "swrast_spantemp.h"
+
+
+/*
+ * Back-buffers are malloced memory and always private.
+ *
+ * BACK_PIXMAP (not supported)
+ * BACK_XIMAGE
+ */
+void
+swrast_set_span_funcs_back(struct swrast_renderbuffer *xrb,
+ GLuint pixel_format)
+{
+ switch (pixel_format) {
+ case PF_A8R8G8B8:
+ xrb->Base.GetRow = get_row_A8R8G8B8;
+ xrb->Base.GetValues = get_values_A8R8G8B8;
+ xrb->Base.PutRow = put_row_A8R8G8B8;
+ xrb->Base.PutRowRGB = put_row_rgb_A8R8G8B8;
+ xrb->Base.PutMonoRow = put_mono_row_A8R8G8B8;
+ xrb->Base.PutValues = put_values_A8R8G8B8;
+ xrb->Base.PutMonoValues = put_mono_values_A8R8G8B8;
+ break;
+ case PF_R5G6B5:
+ xrb->Base.GetRow = get_row_R5G6B5;
+ xrb->Base.GetValues = get_values_R5G6B5;
+ xrb->Base.PutRow = put_row_R5G6B5;
+ xrb->Base.PutRowRGB = put_row_rgb_R5G6B5;
+ xrb->Base.PutMonoRow = put_mono_row_R5G6B5;
+ xrb->Base.PutValues = put_values_R5G6B5;
+ xrb->Base.PutMonoValues = put_mono_values_R5G6B5;
+ break;
+ case PF_R3G3B2:
+ xrb->Base.GetRow = get_row_R3G3B2;
+ xrb->Base.GetValues = get_values_R3G3B2;
+ xrb->Base.PutRow = put_row_R3G3B2;
+ xrb->Base.PutRowRGB = put_row_rgb_R3G3B2;
+ xrb->Base.PutMonoRow = put_mono_row_R3G3B2;
+ xrb->Base.PutValues = put_values_R3G3B2;
+ xrb->Base.PutMonoValues = put_mono_values_R3G3B2;
+ break;
+ case PF_CI8:
+ xrb->Base.GetRow = get_row_CI8;
+ xrb->Base.GetValues = get_values_CI8;
+ xrb->Base.PutRow = put_row_CI8;
+ xrb->Base.PutMonoRow = put_mono_row_CI8;
+ xrb->Base.PutValues = put_values_CI8;
+ xrb->Base.PutMonoValues = put_mono_values_CI8;
+ break;
+ default:
+ assert(0);
+ return;
+ }
+}
+
+
+/*
+ * Front-buffers are provided by the loader, the xorg loader uses pixmaps.
+ *
+ * WINDOW, An X window
+ * GLXWINDOW, GLX window
+ * PIXMAP, GLX pixmap
+ * PBUFFER GLX Pbuffer
+ */
+void
+swrast_set_span_funcs_front(struct swrast_renderbuffer *xrb,
+ GLuint pixel_format)
+{
+ switch (pixel_format) {
+ case PF_A8R8G8B8:
+ xrb->Base.GetRow = get_row_A8R8G8B8_front;
+ xrb->Base.GetValues = get_values_A8R8G8B8_front;
+ xrb->Base.PutRow = put_row_A8R8G8B8_front;
+ xrb->Base.PutRowRGB = put_row_rgb_A8R8G8B8_front;
+ xrb->Base.PutMonoRow = put_mono_row_A8R8G8B8_front;
+ xrb->Base.PutValues = put_values_A8R8G8B8_front;
+ xrb->Base.PutMonoValues = put_mono_values_A8R8G8B8_front;
+ break;
+ case PF_R5G6B5:
+ xrb->Base.GetRow = get_row_R5G6B5_front;
+ xrb->Base.GetValues = get_values_R5G6B5_front;
+ xrb->Base.PutRow = put_row_R5G6B5_front;
+ xrb->Base.PutRowRGB = put_row_rgb_R5G6B5_front;
+ xrb->Base.PutMonoRow = put_mono_row_R5G6B5_front;
+ xrb->Base.PutValues = put_values_R5G6B5_front;
+ xrb->Base.PutMonoValues = put_mono_values_R5G6B5_front;
+ break;
+ case PF_R3G3B2:
+ xrb->Base.GetRow = get_row_R3G3B2_front;
+ xrb->Base.GetValues = get_values_R3G3B2_front;
+ xrb->Base.PutRow = put_row_R3G3B2_front;
+ xrb->Base.PutRowRGB = put_row_rgb_R3G3B2_front;
+ xrb->Base.PutMonoRow = put_mono_row_R3G3B2_front;
+ xrb->Base.PutValues = put_values_R3G3B2_front;
+ xrb->Base.PutMonoValues = put_mono_values_R3G3B2_front;
+ break;
+ case PF_CI8:
+ xrb->Base.GetRow = get_row_CI8_front;
+ xrb->Base.GetValues = get_values_CI8_front;
+ xrb->Base.PutRow = put_row_CI8_front;
+ xrb->Base.PutMonoRow = put_mono_row_CI8_front;
+ xrb->Base.PutValues = put_values_CI8_front;
+ xrb->Base.PutMonoValues = put_mono_values_CI8_front;
+ break;
+ default:
+ assert(0);
+ return;
+ }
+}
diff --git a/src/mesa/drivers/dri/swrast/swrast_spantemp.h b/src/mesa/drivers/dri/swrast/swrast_spantemp.h
new file mode 100644
index 0000000000..e7a9c86d7d
--- /dev/null
+++ b/src/mesa/drivers/dri/swrast/swrast_spantemp.h
@@ -0,0 +1,328 @@
+/*
+ * Mesa 3-D graphics library
+ * Version: 6.5.1
+ *
+ * Copyright (C) 1999-2006 Brian Paul 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, 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
+ * BRIAN PAUL 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.
+ */
+
+
+/*
+ * Modified version of swrast/s_spantemp.h for front-buffer rendering. The
+ * no-mask paths use a scratch row to avoid repeated calls to the loader.
+ *
+ * For the mask paths we always use an array of 4 elements of RB_TYPE. This is
+ * to satisfy the xorg loader requirement of an image pitch of 32 bits and
+ * should be ok for other loaders also.
+ */
+
+
+#ifndef _SWRAST_SPANTEMP_ONCE
+#define _SWRAST_SPANTEMP_ONCE
+
+static inline void
+PUT_PIXEL( GLcontext *glCtx, GLint x, GLint y, GLubyte *p )
+{
+ __DRIcontext *ctx = swrast_context(glCtx);
+ __DRIdrawable *draw = swrast_drawable(glCtx->DrawBuffer);
+
+ __DRIscreen *screen = ctx->driScreenPriv;
+
+ screen->swrast_loader->putImage(draw, __DRI_SWRAST_IMAGE_OP_DRAW,
+ x, y, 1, 1, (char *)p,
+ draw->loaderPrivate);
+}
+
+
+static inline void
+GET_PIXEL( GLcontext *glCtx, GLint x, GLint y, GLubyte *p )
+{
+ __DRIcontext *ctx = swrast_context(glCtx);
+ __DRIdrawable *read = swrast_drawable(glCtx->ReadBuffer);
+
+ __DRIscreen *screen = ctx->driScreenPriv;
+
+ screen->swrast_loader->getImage(read, x, y, 1, 1, (char *)p,
+ read->loaderPrivate);
+}
+
+static inline void
+PUT_ROW( GLcontext *glCtx, GLint x, GLint y, GLuint n, char *row )
+{
+ __DRIcontext *ctx = swrast_context(glCtx);
+ __DRIdrawable *draw = swrast_drawable(glCtx->DrawBuffer);
+
+ __DRIscreen *screen = ctx->driScreenPriv;
+
+ screen->swrast_loader->putImage(draw, __DRI_SWRAST_IMAGE_OP_DRAW,
+ x, y, n, 1, row,
+ draw->loaderPrivate);
+}
+
+static inline void
+GET_ROW( GLcontext *glCtx, GLint x, GLint y, GLuint n, char *row )
+{
+ __DRIcontext *ctx = swrast_context(glCtx);
+ __DRIdrawable *read = swrast_drawable(glCtx->ReadBuffer);
+
+ __DRIscreen *screen = ctx->driScreenPriv;
+
+ screen->swrast_loader->getImage(read, x, y, n, 1, row,
+ read->loaderPrivate);
+}
+
+#endif /* _SWRAST_SPANTEMP_ONCE */
+
+
+/*
+ * Templates for the span/pixel-array write/read functions called via
+ * the gl_renderbuffer's GetRow, GetValues, PutRow, PutMonoRow, PutValues
+ * and PutMonoValues functions.
+ *
+ * Define the following macros before including this file:
+ * NAME(BASE) to generate the function name (i.e. add prefix or suffix)
+ * RB_TYPE the renderbuffer DataType
+ * CI_MODE if set, color index mode, else RGBA
+ * SPAN_VARS to declare any local variables
+ * INIT_PIXEL_PTR(P, X, Y) to initialize a pointer to a pixel
+ * INC_PIXEL_PTR(P) to increment a pixel pointer by one pixel
+ * STORE_PIXEL(DST, X, Y, VALUE) to store pixel values in buffer
+ * FETCH_PIXEL(DST, SRC) to fetch pixel values from buffer
+ *
+ * Note that in the STORE_PIXEL macros, we also pass in the (X,Y) coordinates
+ * for the pixels to be stored. This is useful when dithering and probably
+ * ignored otherwise.
+ */
+
+#include "macros.h"
+
+
+#ifdef CI_MODE
+#define RB_COMPONENTS 1
+#elif !defined(RB_COMPONENTS)
+#define RB_COMPONENTS 4
+#endif
+
+
+static void
+NAME(get_row)( GLcontext *ctx, struct gl_renderbuffer *rb,
+ GLuint count, GLint x, GLint y, void *values )
+{
+#ifdef SPAN_VARS
+ SPAN_VARS
+#endif
+#ifdef CI_MODE
+ RB_TYPE *dest = (RB_TYPE *) values;
+#else
+ RB_TYPE (*dest)[RB_COMPONENTS] = (RB_TYPE (*)[RB_COMPONENTS]) values;
+#endif
+ GLuint i;
+ char *row = swrast_drawable(ctx->ReadBuffer)->row;
+ INIT_PIXEL_PTR(pixel, x, y);
+ GET_ROW( ctx, x, YFLIP(xrb, y), count, row );
+ for (i = 0; i < count; i++) {
+ FETCH_PIXEL(dest[i], pixel);
+ INC_PIXEL_PTR(pixel);
+ }
+ (void) rb;
+}
+
+
+static void
+NAME(get_values)( GLcontext *ctx, struct gl_renderbuffer *rb,
+ GLuint count, const GLint x[], const GLint y[], void *values )
+{
+#ifdef SPAN_VARS
+ SPAN_VARS
+#endif
+#ifdef CI_MODE
+ RB_TYPE *dest = (RB_TYPE *) values;
+#else
+ RB_TYPE (*dest)[RB_COMPONENTS] = (RB_TYPE (*)[RB_COMPONENTS]) values;
+#endif
+ GLuint i;
+ for (i = 0; i < count; i++) {
+ RB_TYPE pixel[4];
+ GET_PIXEL(ctx, x[i], YFLIP(xrb, y[i]), pixel);
+ FETCH_PIXEL(dest[i], pixel);
+ }
+ (void) rb;
+}
+
+
+static void
+NAME(put_row)( GLcontext *ctx, struct gl_renderbuffer *rb,
+ GLuint count, GLint x, GLint y,
+ const void *values, const GLubyte mask[] )
+{
+#ifdef SPAN_VARS
+ SPAN_VARS
+#endif
+ const RB_TYPE (*src)[RB_COMPONENTS] = (const RB_TYPE (*)[RB_COMPONENTS]) values;
+ GLuint i;
+ if (mask) {
+ for (i = 0; i < count; i++) {
+ if (mask[i]) {
+ RB_TYPE pixel[4];
+ STORE_PIXEL(pixel, x + i, y, src[i]);
+ PUT_PIXEL(ctx, x + i, YFLIP(xrb, y), pixel);
+ }
+ }
+ }
+ else {
+ char *row = swrast_drawable(ctx->DrawBuffer)->row;
+ INIT_PIXEL_PTR(pixel, x, y);
+ for (i = 0; i < count; i++) {
+ STORE_PIXEL(pixel, x + i, y, src[i]);
+ INC_PIXEL_PTR(pixel);
+ }
+ PUT_ROW( ctx, x, YFLIP(xrb, y), count, row );
+ }
+ (void) rb;
+}
+
+
+#if !defined(CI_MODE)
+static void
+NAME(put_row_rgb)( GLcontext *ctx, struct gl_renderbuffer *rb,
+ GLuint count, GLint x, GLint y,
+ const void *values, const GLubyte mask[] )
+{
+#ifdef SPAN_VARS
+ SPAN_VARS
+#endif
+ const RB_TYPE (*src)[3] = (const RB_TYPE (*)[3]) values;
+ GLuint i;
+ if (mask) {
+ for (i = 0; i < count; i++) {
+ if (mask[i]) {
+ RB_TYPE pixel[4];
+#ifdef STORE_PIXEL_RGB
+ STORE_PIXEL_RGB(pixel, x + i, y, src[i]);
+#else
+ STORE_PIXEL(pixel, x + i, y, src[i]);
+#endif
+ PUT_PIXEL(ctx, x + i, YFLIP(xrb, y), pixel);
+ }
+ }
+ }
+ else {
+ char *row = swrast_drawable(ctx->DrawBuffer)->row;
+ INIT_PIXEL_PTR(pixel, x, y);
+ for (i = 0; i < count; i++) {
+#ifdef STORE_PIXEL_RGB
+ STORE_PIXEL_RGB(pixel, x + i, y, src[i]);
+#else
+ STORE_PIXEL(pixel, x + i, y, src[i]);
+#endif
+ INC_PIXEL_PTR(pixel);
+ }
+ PUT_ROW( ctx, x, YFLIP(xrb, y), count, row );
+ }
+ (void) rb;
+}
+#endif
+
+
+static void
+NAME(put_mono_row)( GLcontext *ctx, struct gl_renderbuffer *rb,
+ GLuint count, GLint x, GLint y,
+ const void *value, const GLubyte mask[] )
+{
+#ifdef SPAN_VARS
+ SPAN_VARS
+#endif
+ const RB_TYPE *src = (const RB_TYPE *) value;
+ GLuint i;
+ if (mask) {
+ for (i = 0; i < count; i++) {
+ if (mask[i]) {
+ RB_TYPE pixel[4];
+ STORE_PIXEL(pixel, x + i, y, src);
+ PUT_PIXEL(ctx, x + i, YFLIP(xrb, y), pixel);
+ }
+ }
+ }
+ else {
+ char *row = swrast_drawable(ctx->DrawBuffer)->row;
+ INIT_PIXEL_PTR(pixel, x, y);
+ for (i = 0; i < count; i++) {
+ STORE_PIXEL(pixel, x + i, y, src);
+ INC_PIXEL_PTR(pixel);
+ }
+ PUT_ROW( ctx, x, YFLIP(xrb, y), count, row );
+ }
+ (void) rb;
+}
+
+
+static void
+NAME(put_values)( GLcontext *ctx, struct gl_renderbuffer *rb,
+ GLuint count, const GLint x[], const GLint y[],
+ const void *values, const GLubyte mask[] )
+{
+#ifdef SPAN_VARS
+ SPAN_VARS
+#endif
+ const RB_TYPE (*src)[RB_COMPONENTS] = (const RB_TYPE (*)[RB_COMPONENTS]) values;
+ GLuint i;
+ ASSERT(mask);
+ for (i = 0; i < count; i++) {
+ if (mask[i]) {
+ RB_TYPE pixel[4];
+ STORE_PIXEL(pixel, x[i], y[i], src[i]);
+ PUT_PIXEL(ctx, x[i], YFLIP(xrb, y[i]), pixel);
+ }
+ }
+ (void) rb;
+}
+
+
+static void
+NAME(put_mono_values)( GLcontext *ctx, struct gl_renderbuffer *rb,
+ GLuint count, const GLint x[], const GLint y[],
+ const void *value, const GLubyte mask[] )
+{
+#ifdef SPAN_VARS
+ SPAN_VARS
+#endif
+ const RB_TYPE *src = (const RB_TYPE *) value;
+ GLuint i;
+ ASSERT(mask);
+ for (i = 0; i < count; i++) {
+ if (mask[i]) {
+ RB_TYPE pixel[4];
+ STORE_PIXEL(pixel, x[i], y[i], src);
+ PUT_PIXEL(ctx, x[i], YFLIP(xrb, y[i]), pixel);
+ }
+ }
+ (void) rb;
+}
+
+
+#undef NAME
+#undef RB_TYPE
+#undef RB_COMPONENTS
+#undef CI_MODE
+#undef SPAN_VARS
+#undef INIT_PIXEL_PTR
+#undef INC_PIXEL_PTR
+#undef STORE_PIXEL
+#undef STORE_PIXEL_RGB
+#undef FETCH_PIXEL
diff --git a/src/mesa/drivers/dri/unichrome/via_screen.c b/src/mesa/drivers/dri/unichrome/via_screen.c
index ca193bfa53..3648710533 100644
--- a/src/mesa/drivers/dri/unichrome/via_screen.c
+++ b/src/mesa/drivers/dri/unichrome/via_screen.c
@@ -24,8 +24,8 @@
#include <stdio.h>
-#include "utils.h"
#include "dri_util.h"
+#include "utils.h"
#include "glheader.h"
#include "context.h"
#include "framebuffer.h"
diff --git a/src/mesa/drivers/dri/unichrome/via_tex.c b/src/mesa/drivers/dri/unichrome/via_tex.c
index 0261a3ff17..15f15a89a6 100644
--- a/src/mesa/drivers/dri/unichrome/via_tex.c
+++ b/src/mesa/drivers/dri/unichrome/via_tex.c
@@ -820,9 +820,7 @@ static void viaTexImage(GLcontext *ctx,
/* GL_SGIS_generate_mipmap */
if (level == texObj->BaseLevel && texObj->GenerateMipmap) {
- _mesa_generate_mipmap(ctx, target,
- &ctx->Texture.Unit[ctx->Texture.CurrentUnit],
- texObj);
+ _mesa_generate_mipmap(ctx, target, texObj);
}
_mesa_unmap_teximage_pbo(ctx, packing);
diff --git a/src/mesa/drivers/glslcompiler/Makefile b/src/mesa/drivers/glslcompiler/Makefile
index 858457ddd4..dc4abd44d4 100644
--- a/src/mesa/drivers/glslcompiler/Makefile
+++ b/src/mesa/drivers/glslcompiler/Makefile
@@ -41,4 +41,4 @@ glslcompiler.o: glslcompiler.c
clean:
- rm -f *.o *~ $(PROGRAM)
+ -rm -f *.o *~ $(PROGRAM)
diff --git a/src/mesa/drivers/x11/fakeglx.c b/src/mesa/drivers/x11/fakeglx.c
index 7a170b4d3d..e5cd8f0b80 100644
--- a/src/mesa/drivers/x11/fakeglx.c
+++ b/src/mesa/drivers/x11/fakeglx.c
@@ -1183,11 +1183,12 @@ choose_visual( Display *dpy, int screen, const int *list, GLboolean fbConfig )
* GLX_ARB_multisample
*/
case GLX_SAMPLE_BUFFERS_ARB:
- /* ms not supported */
- return NULL;
case GLX_SAMPLES_ARB:
- /* ms not supported */
- return NULL;
+ parselist++;
+ if (*parselist++ != 0)
+ /* ms not supported */
+ return NULL;
+ break;
/*
* FBConfig attribs.
diff --git a/src/mesa/drivers/xorg/.gitignore b/src/mesa/drivers/xorg/.gitignore
deleted file mode 100644
index 18a777939c..0000000000
--- a/src/mesa/drivers/xorg/.gitignore
+++ /dev/null
@@ -1,3 +0,0 @@
-glxheader.h
-xmesaP.h
-xm_*
diff --git a/src/mesa/drivers/xorg/Makefile b/src/mesa/drivers/xorg/Makefile
deleted file mode 100644
index a1b417447b..0000000000
--- a/src/mesa/drivers/xorg/Makefile
+++ /dev/null
@@ -1,95 +0,0 @@
-# src/mesa/drivers/xorg/Makefile
-
-TOP = ../../../..
-include $(TOP)/configs/current
-
-LIBNAME = libGLcore.so
-
-SYMLINKS = \
- glxheader.h \
- xmesaP.h \
- xm_api.c \
- xm_buffer.c \
- xm_dd.c \
- xm_image.c \
- xm_image.h \
- xm_line.c \
- xm_span.c \
- xm_tri.c
-
-C_SOURCES = \
- xm_api.c \
- xm_buffer.c \
- xm_dd.c \
- xm_image.c \
- xm_line.c \
- xm_span.c \
- xm_tri.c \
- glcore.c
-
-########################################
-
-MESA_MODULES = $(TOP)/src/mesa/libmesa.a
-
-C_SOURCES += ../common/driverfuncs.c
-ifeq ("${DRIVER_DIRS}", "dri")
-C_SOURCES += ../dri/common/utils.c
-endif
-
-OBJECTS = $(C_SOURCES:.c=.o)
-
-### Include directories
-INCLUDES = \
- -I. \
- -I.. \
- -I$(TOP)/include \
- -I$(TOP)/src/mesa \
- -I$(TOP)/src/mesa/main \
- -I$(TOP)/src/mesa/glapi \
- `pkg-config --cflags xorg-server`
-
-ifeq ("${DRIVER_DIRS}", "dri")
-INCLUDES += \
- -I$(TOP)/src/mesa/drivers/dri/common \
- `pkg-config --cflags libdrm`
-endif
-
-# undef 'USE_XSHM' to make it explicit that 'XFree86Server' takes precedence
-DRIVER_DEFINES = -UUSE_XSHM -DXFree86Server
-
-##### RULES #####
-
-.c.o:
- $(CC) -c $(INCLUDES) $(CFLAGS) $(DRIVER_DEFINES) $< -o $@
-
-
-##### TARGETS #####
-
-default: depend symlinks $(LIBNAME)
-
-
-$(LIBNAME): $(OBJECTS) $(MESA_MODULES) Makefile
- $(TOP)/bin/mklib -noprefix -o $@ \
- $(OBJECTS) $(MESA_MODULES) $(GLCORE_LIB_DEPS)
-
-
-depend: $(C_SOURCES) $(SYMLINKS)
- touch depend
- $(MKDEP) $(MKDEP_OPTIONS) $(DRIVER_DEFINES) $(INCLUDES) $(C_SOURCES) \
- > /dev/null
-
-
-clean:
- -rm -f *.o *.so $(SYMLINKS)
- -rm -f depend depend.bak
-
-install: $(LIBNAME)
- $(INSTALL) -d $(DESTDIR)$(DRI_DRIVER_INSTALL_DIR)
- $(INSTALL) -m 755 $(LIBNAME) $(DESTDIR)$(DRI_DRIVER_INSTALL_DIR)
-
-$(SYMLINKS):
- @[ -e $@ ] || ln -sf ../x11/$@ ./
-
-symlinks: $(SYMLINKS)
-
-include depend
diff --git a/src/mesa/drivers/xorg/glcore.c b/src/mesa/drivers/xorg/glcore.c
deleted file mode 100644
index a0199117c6..0000000000
--- a/src/mesa/drivers/xorg/glcore.c
+++ /dev/null
@@ -1,24 +0,0 @@
-
-#define _NEED_GL_CORE_IF
-#include <GL/xmesa.h>
-#include <GL/internal/glcore.h>
-#include "xmesaP.h"
-
-PUBLIC
-__GLcoreModule GL_Core = {
- XMesaCreateVisual,
- XMesaDestroyVisual,
-
- XMesaCreateWindowBuffer,
- XMesaCreatePixmapBuffer,
- XMesaDestroyBuffer,
- XMesaSwapBuffers,
- XMesaResizeBuffers,
-
- XMesaCreateContext,
- XMesaDestroyContext,
- XMesaCopyContext,
- XMesaMakeCurrent2,
- XMesaForceCurrent,
- XMesaLoseCurrent
-};
diff --git a/src/mesa/glapi/Makefile b/src/mesa/glapi/Makefile
index 6520f75e13..adc53d9249 100644
--- a/src/mesa/glapi/Makefile
+++ b/src/mesa/glapi/Makefile
@@ -7,27 +7,43 @@
TOP = ../../..
include $(TOP)/configs/current
-GLX_DIR = ../../glx/x11
-
OUTPUTS = glprocs.h glapitemp.h glapioffsets.h glapitable.h dispatch.h \
../main/enums.c \
../x86/glapi_x86.S \
../x86-64/glapi_x86-64.S \
../sparc/glapi_sparc.S \
../drivers/dri/common/extension_helper.h \
- $(GLX_DIR)/indirect.c \
- $(GLX_DIR)/indirect.h \
- $(GLX_DIR)/indirect_init.c \
- $(GLX_DIR)/indirect_size.h \
- $(GLX_DIR)/indirect_size.c \
+ ../../glx/x11/indirect.c \
+ ../../glx/x11/indirect.h \
+ ../../glx/x11/indirect_init.c \
+ ../../glx/x11/indirect_size.h \
+ ../../glx/x11/indirect_size.c
+
+
+GLX_DIR = $(XORG_BASE)/glx
+
+SERVER_GLAPI_FILES = \
+ $(GLX_DIR)/glapi.h \
+ $(GLX_DIR)/glapi.c \
+ $(GLX_DIR)/glthread.c \
+ $(GLX_DIR)/glthread.h
+
+SERVER_OUTPUTS = \
$(GLX_DIR)/indirect_dispatch.c \
$(GLX_DIR)/indirect_dispatch_swap.c \
$(GLX_DIR)/indirect_dispatch.h \
$(GLX_DIR)/indirect_reqsize.c \
$(GLX_DIR)/indirect_reqsize.h \
+ $(GLX_DIR)/indirect_size.h \
$(GLX_DIR)/indirect_size_get.c \
$(GLX_DIR)/indirect_size_get.h \
- $(GLX_DIR)/indirect_table.c
+ $(GLX_DIR)/indirect_table.c \
+ $(GLX_DIR)/glapitemp.h \
+ $(GLX_DIR)/glapitable.h \
+ $(GLX_DIR)/glapioffsets.h \
+ $(GLX_DIR)/glprocs.h \
+ $(GLX_DIR)/dispatch.h \
+ $(SERVER_GLAPI_FILES)
API_XML = gl_API.xml \
EXT_framebuffer_object.xml \
@@ -36,21 +52,33 @@ API_XML = gl_API.xml \
COMMON = gl_XML.py glX_XML.py license.py $(API_XML) typeexpr.py
COMMON_GLX = $(COMMON) glX_API.xml glX_XML.py glX_proto_common.py
-all: $(OUTPUTS)
+all: check-xorg-source $(OUTPUTS) $(SERVER_OUTPUTS)
+
+check-xorg-source:
+ @if ! test -d $(GLX_DIR); then \
+ echo "ERROR: Must specify path to xserver checkout; set XORG_BASE."; \
+ exit 1; \
+ fi
+
+$(GLX_DIR)/%.c: %.c
+ cp $< $@
+
+$(GLX_DIR)/%.h: %.h
+ cp $< $@
-glprocs.h: gl_procs.py $(COMMON)
+glprocs.h $(GLX_DIR)/glprocs.h: gl_procs.py $(COMMON)
$(PYTHON2) $(PYTHON_FLAGS) $< > $@
-glapitemp.h: gl_apitemp.py $(COMMON)
+glapitemp.h $(GLX_DIR)/glapitemp.h: gl_apitemp.py $(COMMON)
$(PYTHON2) $(PYTHON_FLAGS) $< > $@
-glapioffsets.h: gl_offsets.py $(COMMON)
+glapioffsets.h $(GLX_DIR)/glapioffsets.h: gl_offsets.py $(COMMON)
$(PYTHON2) $(PYTHON_FLAGS) $< > $@
-glapitable.h: gl_table.py $(COMMON)
+glapitable.h $(GLX_DIR)/glapitable.h: gl_table.py $(COMMON)
$(PYTHON2) $(PYTHON_FLAGS) $< > $@
-dispatch.h: gl_table.py $(COMMON)
+dispatch.h $(GLX_DIR)/dispatch.h: gl_table.py $(COMMON)
$(PYTHON2) $(PYTHON_FLAGS) $< -m remap_table > $@
../main/enums.c: gl_enums.py $(COMMON)
@@ -69,20 +97,20 @@ dispatch.h: gl_table.py $(COMMON)
../drivers/dri/common/extension_helper.h: extension_helper.py $(COMMON)
$(PYTHON2) $(PYTHON_FLAGS) $< > $@
-$(GLX_DIR)/indirect.c: glX_proto_send.py $(COMMON_GLX)
+../../glx/x11/indirect.c: glX_proto_send.py $(COMMON_GLX)
$(PYTHON2) $(PYTHON_FLAGS) $< -m proto | $(INDENT) $(INDENT_FLAGS) > $@
-$(GLX_DIR)/indirect.h: glX_proto_send.py $(COMMON_GLX)
+../../glx/x11/indirect.h: glX_proto_send.py $(COMMON_GLX)
$(PYTHON2) $(PYTHON_FLAGS) $< -m init_h > $@
-$(GLX_DIR)/indirect_init.c: glX_proto_send.py $(COMMON_GLX)
+../../glx/x11/indirect_init.c: glX_proto_send.py $(COMMON_GLX)
$(PYTHON2) $(PYTHON_FLAGS) $< -m init_c > $@
-$(GLX_DIR)/indirect_size.h: glX_proto_size.py $(COMMON_GLX)
+../../glx/x11/indirect_size.h $(GLX_DIR)/indirect_size.h: glX_proto_size.py $(COMMON_GLX)
$(PYTHON2) $(PYTHON_FLAGS) $< -m size_h --only-set -h _INDIRECT_SIZE_H_ \
| $(INDENT) $(INDENT_FLAGS) > $@
-$(GLX_DIR)/indirect_size.c: glX_proto_size.py $(COMMON_GLX)
+../../glx/x11/indirect_size.c: glX_proto_size.py $(COMMON_GLX)
$(PYTHON2) $(PYTHON_FLAGS) $< -m size_c --only-set \
| $(INDENT) $(INDENT_FLAGS) > $@
@@ -113,5 +141,5 @@ $(GLX_DIR)/indirect_table.c: glX_server_table.py gl_and_glX_API.xml $(COMMON_GLX
$(PYTHON2) $(PYTHON_FLAGS) $< -f gl_and_glX_API.xml > $@
clean:
- rm -f *~ *.pyo
- rm -f $(OUTPUTS)
+ -rm -f *~ *.pyo
+ -rm -f $(OUTPUTS)
diff --git a/src/mesa/glapi/glapi.c b/src/mesa/glapi/glapi.c
index 36b09e68e5..c4d101aee5 100644
--- a/src/mesa/glapi/glapi.c
+++ b/src/mesa/glapi/glapi.c
@@ -51,10 +51,19 @@
#ifdef HAVE_DIX_CONFIG_H
+
#include <dix-config.h>
-#endif
+#define PUBLIC
+
+#else
#include "glheader.h"
+
+#endif
+
+#include <stdlib.h>
+#include <string.h>
+
#include "glapi.h"
#include "glapioffsets.h"
#include "glapitable.h"
diff --git a/src/mesa/glapi/glthread.c b/src/mesa/glapi/glthread.c
index 92f2e5bf56..813d6f9dbc 100644
--- a/src/mesa/glapi/glthread.c
+++ b/src/mesa/glapi/glthread.c
@@ -25,7 +25,7 @@
/*
* XXX There's probably some work to do in order to make this file
- * truly reusable outside of Mesa. First, the glheader.h include must go.
+ * truly reusable outside of Mesa.
*/
@@ -33,7 +33,7 @@
#include <dix-config.h>
#endif
-#include "glheader.h"
+#include <stdlib.h>
#include "glthread.h"
diff --git a/src/mesa/glapi/glthread.h b/src/mesa/glapi/glthread.h
index a61086d0dc..e2765cebb1 100644
--- a/src/mesa/glapi/glthread.h
+++ b/src/mesa/glapi/glthread.h
@@ -259,11 +259,11 @@ typedef benaphore _glthread_Mutex;
* THREADS not defined
*/
-typedef GLuint _glthread_TSD;
+typedef int _glthread_TSD;
-typedef GLuint _glthread_Thread;
+typedef int _glthread_Thread;
-typedef GLuint _glthread_Mutex;
+typedef int _glthread_Mutex;
#define _glthread_DECLARE_STATIC_MUTEX(name) static _glthread_Mutex name = 0
diff --git a/src/mesa/main/config.h b/src/mesa/main/config.h
index ab0f035b45..58a39d11d4 100644
--- a/src/mesa/main/config.h
+++ b/src/mesa/main/config.h
@@ -188,6 +188,7 @@
#define MAX_PROGRAM_ADDRESS_REGS 2
#define MAX_UNIFORMS 128
#define MAX_VARYING 8
+#define MAX_SAMPLERS 8
/*@}*/
/** For GL_NV_vertex_program */
diff --git a/src/mesa/main/context.c b/src/mesa/main/context.c
index 733aaad030..2c387d8e2c 100644
--- a/src/mesa/main/context.c
+++ b/src/mesa/main/context.c
@@ -149,8 +149,6 @@ int MESA_DEBUG_FLAGS = 0;
/* ubyte -> float conversion */
GLfloat _mesa_ubyte_to_float_color_tab[256];
-static void
-free_shared_state( GLcontext *ctx, struct gl_shared_state *ss );
/**
@@ -420,12 +418,14 @@ alloc_shared_state( GLcontext *ctx )
#endif
#if FEATURE_ARB_vertex_program
- ss->DefaultVertexProgram = ctx->Driver.NewProgram(ctx, GL_VERTEX_PROGRAM_ARB, 0);
+ ss->DefaultVertexProgram = (struct gl_vertex_program *)
+ ctx->Driver.NewProgram(ctx, GL_VERTEX_PROGRAM_ARB, 0);
if (!ss->DefaultVertexProgram)
goto cleanup;
#endif
#if FEATURE_ARB_fragment_program
- ss->DefaultFragmentProgram = ctx->Driver.NewProgram(ctx, GL_FRAGMENT_PROGRAM_ARB, 0);
+ ss->DefaultFragmentProgram = (struct gl_fragment_program *)
+ ctx->Driver.NewProgram(ctx, GL_FRAGMENT_PROGRAM_ARB, 0);
if (!ss->DefaultFragmentProgram)
goto cleanup;
#endif
@@ -502,12 +502,10 @@ cleanup:
_mesa_DeleteHashTable(ss->Programs);
#endif
#if FEATURE_ARB_vertex_program
- if (ss->DefaultVertexProgram)
- ctx->Driver.DeleteProgram(ctx, ss->DefaultVertexProgram);
+ _mesa_reference_vertprog(ctx, &ss->DefaultVertexProgram, NULL);
#endif
#if FEATURE_ARB_fragment_program
- if (ss->DefaultFragmentProgram)
- ctx->Driver.DeleteProgram(ctx, ss->DefaultFragmentProgram);
+ _mesa_reference_fragprog(ctx, &ss->DefaultFragmentProgram, NULL);
#endif
#if FEATURE_ATI_fragment_shader
if (ss->DefaultFragmentShader)
@@ -584,6 +582,8 @@ delete_program_cb(GLuint id, void *data, void *userData)
{
struct gl_program *prog = (struct gl_program *) data;
GLcontext *ctx = (GLcontext *) userData;
+ ASSERT(prog->RefCount == 1); /* should only be referenced by hash table */
+ prog->RefCount = 0; /* now going away */
ctx->Driver.DeleteProgram(ctx, prog);
}
@@ -709,15 +709,21 @@ free_shared_state( GLcontext *ctx, struct gl_shared_state *ss )
_mesa_HashDeleteAll(ss->DisplayList, delete_displaylist_cb, ctx);
_mesa_DeleteHashTable(ss->DisplayList);
+#if FEATURE_ARB_shader_objects
+ _mesa_HashWalk(ss->ShaderObjects, free_shader_program_data_cb, ctx);
+ _mesa_HashDeleteAll(ss->ShaderObjects, delete_shader_cb, ctx);
+ _mesa_DeleteHashTable(ss->ShaderObjects);
+#endif
+
#if defined(FEATURE_NV_vertex_program) || defined(FEATURE_NV_fragment_program)
_mesa_HashDeleteAll(ss->Programs, delete_program_cb, ctx);
_mesa_DeleteHashTable(ss->Programs);
#endif
#if FEATURE_ARB_vertex_program
- ctx->Driver.DeleteProgram(ctx, ss->DefaultVertexProgram);
+ _mesa_reference_vertprog(ctx, &ss->DefaultVertexProgram, NULL);
#endif
#if FEATURE_ARB_fragment_program
- ctx->Driver.DeleteProgram(ctx, ss->DefaultFragmentProgram);
+ _mesa_reference_fragprog(ctx, &ss->DefaultFragmentProgram, NULL);
#endif
#if FEATURE_ATI_fragment_shader
@@ -734,12 +740,6 @@ free_shared_state( GLcontext *ctx, struct gl_shared_state *ss )
_mesa_HashDeleteAll(ss->ArrayObjects, delete_arrayobj_cb, ctx);
_mesa_DeleteHashTable(ss->ArrayObjects);
-#if FEATURE_ARB_shader_objects
- _mesa_HashWalk(ss->ShaderObjects, free_shader_program_data_cb, ctx);
- _mesa_HashDeleteAll(ss->ShaderObjects, delete_shader_cb, ctx);
- _mesa_DeleteHashTable(ss->ShaderObjects);
-#endif
-
#if FEATURE_EXT_framebuffer_object
_mesa_HashDeleteAll(ss->FrameBuffers, delete_framebuffer_cb, ctx);
_mesa_DeleteHashTable(ss->FrameBuffers);
@@ -1251,6 +1251,14 @@ _mesa_free_context_data( GLcontext *ctx )
_mesa_unreference_framebuffer(&ctx->DrawBuffer);
_mesa_unreference_framebuffer(&ctx->ReadBuffer);
+ _mesa_reference_vertprog(ctx, &ctx->VertexProgram.Current, NULL);
+ _mesa_reference_vertprog(ctx, &ctx->VertexProgram._Current, NULL);
+ _mesa_reference_vertprog(ctx, &ctx->VertexProgram._TnlProgram, NULL);
+
+ _mesa_reference_fragprog(ctx, &ctx->FragmentProgram.Current, NULL);
+ _mesa_reference_fragprog(ctx, &ctx->FragmentProgram._Current, NULL);
+ _mesa_reference_fragprog(ctx, &ctx->FragmentProgram._TexEnvProgram, NULL);
+
_mesa_free_attrib_data(ctx);
_mesa_free_lighting_data( ctx );
_mesa_free_eval_data( ctx );
diff --git a/src/mesa/main/dd.h b/src/mesa/main/dd.h
index ce33905af1..e3ded41aca 100644
--- a/src/mesa/main/dd.h
+++ b/src/mesa/main/dd.h
@@ -328,6 +328,12 @@ struct dd_function_table {
GLsizei width, GLsizei height );
/**
+ * Called by glGenerateMipmap() or when GL_GENERATE_MIPMAP_SGIS is enabled.
+ */
+ void (*GenerateMipmap)(GLcontext *ctx, GLenum target,
+ struct gl_texture_object *texObj);
+
+ /**
* Called by glTexImage[123]D when user specifies a proxy texture
* target.
*
diff --git a/src/mesa/main/dlist.c b/src/mesa/main/dlist.c
index 23ede7bb68..63a00e04f5 100644
--- a/src/mesa/main/dlist.c
+++ b/src/mesa/main/dlist.c
@@ -3248,6 +3248,36 @@ save_StencilFuncSeparate(GLenum face, GLenum func, GLint ref, GLuint mask)
static void GLAPIENTRY
+save_StencilFuncSeparateATI(GLenum frontfunc, GLenum backfunc, GLint ref,
+ GLuint mask)
+{
+ GET_CURRENT_CONTEXT(ctx);
+ Node *n;
+ ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
+ /* GL_FRONT */
+ n = ALLOC_INSTRUCTION(ctx, OPCODE_STENCIL_FUNC_SEPARATE, 4);
+ if (n) {
+ n[1].e = GL_FRONT;
+ n[2].e = frontfunc;
+ n[3].i = ref;
+ n[4].ui = mask;
+ }
+ /* GL_BACK */
+ n = ALLOC_INSTRUCTION(ctx, OPCODE_STENCIL_FUNC_SEPARATE, 4);
+ if (n) {
+ n[1].e = GL_BACK;
+ n[2].e = backfunc;
+ n[3].i = ref;
+ n[4].ui = mask;
+ }
+ if (ctx->ExecuteFlag) {
+ CALL_StencilFuncSeparate(ctx->Exec, (GL_FRONT, frontfunc, ref, mask));
+ CALL_StencilFuncSeparate(ctx->Exec, (GL_BACK, backfunc, ref, mask));
+ }
+}
+
+
+static void GLAPIENTRY
save_StencilMaskSeparate(GLenum face, GLuint mask)
{
GET_CURRENT_CONTEXT(ctx);
@@ -7838,6 +7868,9 @@ _mesa_init_dlist_table(struct _glapi_table *table)
SET_StencilMaskSeparate(table, save_StencilMaskSeparate);
SET_StencilOpSeparate(table, save_StencilOpSeparate);
+ /* ATI_separate_stencil */
+ SET_StencilFuncSeparateATI(table, save_StencilFuncSeparateATI);
+
/* GL_ARB_imaging */
/* Not all are supported */
SET_BlendColor(table, save_BlendColor);
diff --git a/src/mesa/main/fbobject.c b/src/mesa/main/fbobject.c
index 9b60c73294..8e9948cb45 100644
--- a/src/mesa/main/fbobject.c
+++ b/src/mesa/main/fbobject.c
@@ -1544,7 +1544,7 @@ _mesa_GenerateMipmapEXT(GLenum target)
/* XXX this might not handle cube maps correctly */
_mesa_lock_texture(ctx, texObj);
- _mesa_generate_mipmap(ctx, target, texUnit, texObj);
+ ctx->Driver.GenerateMipmap(ctx, target, texObj);
_mesa_unlock_texture(ctx, texObj);
}
diff --git a/src/mesa/main/mipmap.c b/src/mesa/main/mipmap.c
index 44357fbd6a..8ca912b3a9 100644
--- a/src/mesa/main/mipmap.c
+++ b/src/mesa/main/mipmap.c
@@ -934,7 +934,6 @@ make_2d_stack_mipmap(const struct gl_texture_format *format, GLint border,
*/
void
_mesa_generate_mipmap(GLcontext *ctx, GLenum target,
- const struct gl_texture_unit *texUnit,
struct gl_texture_object *texObj)
{
const struct gl_texture_image *srcImage;
diff --git a/src/mesa/main/mipmap.h b/src/mesa/main/mipmap.h
index df78603283..46e16902c8 100644
--- a/src/mesa/main/mipmap.h
+++ b/src/mesa/main/mipmap.h
@@ -30,7 +30,6 @@
extern void
_mesa_generate_mipmap(GLcontext *ctx, GLenum target,
- const struct gl_texture_unit *texUnit,
struct gl_texture_object *texObj);
diff --git a/src/mesa/main/mtypes.h b/src/mesa/main/mtypes.h
index c8718a7f63..04da767ec9 100644
--- a/src/mesa/main/mtypes.h
+++ b/src/mesa/main/mtypes.h
@@ -1544,19 +1544,17 @@ struct gl_texture_unit
/*@}*/
};
-struct texenvprog_cache_item {
- GLuint hash;
- void *key;
- struct gl_fragment_program *data;
- struct texenvprog_cache_item *next;
-};
-struct texenvprog_cache {
+struct texenvprog_cache_item;
+
+struct texenvprog_cache
+{
struct texenvprog_cache_item **items;
GLuint size, n_items;
GLcontext *ctx;
};
+
/**
* Texture attribute group (GL_TEXTURE_BIT).
*/
@@ -1865,6 +1863,7 @@ enum register_file
/** Vertex and fragment instructions */
struct prog_instruction;
struct gl_program_parameter_list;
+struct gl_uniform_list;
/**
@@ -1884,6 +1883,7 @@ struct gl_program
GLbitfield InputsRead; /**< Bitmask of which input regs are read */
GLbitfield OutputsWritten; /**< Bitmask of which output regs are written to */
GLbitfield TexturesUsed[MAX_TEXTURE_IMAGE_UNITS]; /**< TEXTURE_x_BIT bitmask */
+ GLbitfield SamplersUsed; /**< Bitfield of which samplers are used */
GLbitfield ShadowSamplers; /**< Texture units used for shadow sampling. */
/** Named parameters, constants, etc. from program text */
@@ -1896,6 +1896,11 @@ struct gl_program
/** Vertex program user-defined attributes */
struct gl_program_parameter_list *Attributes;
+ /** Map from sampler unit to texture unit (set by glUniform1i()) */
+ GLubyte SamplerUnits[MAX_SAMPLERS];
+ /** Which texture target is being sampled (TEXTURE_1D/2D/3D/etc_INDEX) */
+ GLubyte SamplerTargets[MAX_SAMPLERS];
+
/** Logical counts */
/*@{*/
GLuint NumInstructions;
@@ -2088,7 +2093,7 @@ struct gl_query_state
/**
- * A GLSL shader object.
+ * A GLSL vertex or fragment shader object.
*/
struct gl_shader
{
@@ -2106,7 +2111,8 @@ struct gl_shader
/**
- * A GLSL program object. Basically a linked collection of "shaders".
+ * A GLSL program object.
+ * Basically a linked collection of vertex and fragment shaders.
*/
struct gl_shader_program
{
@@ -2121,7 +2127,7 @@ struct gl_shader_program
/* post-link info: */
struct gl_vertex_program *VertexProgram; /**< Linked vertex program */
struct gl_fragment_program *FragmentProgram; /**< Linked fragment prog */
- struct gl_program_parameter_list *Uniforms; /**< Plus constants, etc */
+ struct gl_uniform_list *Uniforms;
struct gl_program_parameter_list *Varying;
struct gl_program_parameter_list *Attributes; /**< Vertex attributes */
GLboolean LinkStatus; /**< GL_LINK_STATUS */
@@ -2185,10 +2191,10 @@ struct gl_shared_state
/*@{*/
struct _mesa_HashTable *Programs; /**< All vertex/fragment programs */
#if FEATURE_ARB_vertex_program
- struct gl_program *DefaultVertexProgram;
+ struct gl_vertex_program *DefaultVertexProgram;
#endif
#if FEATURE_ARB_fragment_program
- struct gl_program *DefaultFragmentProgram;
+ struct gl_fragment_program *DefaultFragmentProgram;
#endif
/*@}*/
diff --git a/src/mesa/main/state.c b/src/mesa/main/state.c
index 5ff67b654e..1c73c5c462 100644
--- a/src/mesa/main/state.c
+++ b/src/mesa/main/state.c
@@ -978,50 +978,60 @@ update_program(GLcontext *ctx)
* 3. Programs derived from fixed-function state.
*/
- ctx->FragmentProgram._Current = NULL;
+ _mesa_reference_fragprog(ctx, &ctx->FragmentProgram._Current, NULL);
if (shProg && shProg->LinkStatus) {
/* Use shader programs */
/* XXX this isn't quite right, since we may have either a vertex
* _or_ fragment shader (not always both).
*/
- ctx->VertexProgram._Current = shProg->VertexProgram;
- ctx->FragmentProgram._Current = shProg->FragmentProgram;
+ _mesa_reference_vertprog(ctx, &ctx->VertexProgram._Current,
+ shProg->VertexProgram);
+ _mesa_reference_fragprog(ctx, &ctx->FragmentProgram._Current,
+ shProg->FragmentProgram);
}
else {
if (ctx->VertexProgram._Enabled) {
/* use user-defined vertex program */
- ctx->VertexProgram._Current = ctx->VertexProgram.Current;
+ _mesa_reference_vertprog(ctx, &ctx->VertexProgram._Current,
+ ctx->VertexProgram.Current);
}
else if (ctx->VertexProgram._MaintainTnlProgram) {
/* Use vertex program generated from fixed-function state.
* The _Current pointer will get set in
* _tnl_UpdateFixedFunctionProgram() later if appropriate.
*/
- ctx->VertexProgram._Current = NULL;
+ _mesa_reference_vertprog(ctx, &ctx->VertexProgram._Current, NULL);
}
else {
/* no vertex program */
- ctx->VertexProgram._Current = NULL;
+ _mesa_reference_vertprog(ctx, &ctx->VertexProgram._Current, NULL);
}
if (ctx->FragmentProgram._Enabled) {
/* use user-defined vertex program */
- ctx->FragmentProgram._Current = ctx->FragmentProgram.Current;
+ _mesa_reference_fragprog(ctx, &ctx->FragmentProgram._Current,
+ ctx->FragmentProgram.Current);
}
else if (ctx->FragmentProgram._MaintainTexEnvProgram) {
/* Use fragment program generated from fixed-function state.
* The _Current pointer will get set in _mesa_UpdateTexEnvProgram()
* later if appropriate.
*/
- ctx->FragmentProgram._Current = NULL;
+ _mesa_reference_fragprog(ctx, &ctx->FragmentProgram._Current, NULL);
}
else {
/* no fragment program */
- ctx->FragmentProgram._Current = NULL;
+ _mesa_reference_fragprog(ctx, &ctx->FragmentProgram._Current, NULL);
}
}
+ if (ctx->VertexProgram._Current)
+ assert(ctx->VertexProgram._Current->Base.Parameters);
+ if (ctx->FragmentProgram._Current)
+ assert(ctx->FragmentProgram._Current->Base.Parameters);
+
+
ctx->FragmentProgram._Active = ctx->FragmentProgram._Enabled;
if (ctx->FragmentProgram._MaintainTexEnvProgram &&
!ctx->FragmentProgram._Enabled) {
diff --git a/src/mesa/main/texenvprogram.c b/src/mesa/main/texenvprogram.c
index fb68bf0720..68a4db9197 100644
--- a/src/mesa/main/texenvprogram.c
+++ b/src/mesa/main/texenvprogram.c
@@ -28,12 +28,23 @@
#include "glheader.h"
#include "macros.h"
#include "enums.h"
+#include "shader/program.h"
#include "shader/prog_parameter.h"
#include "shader/prog_instruction.h"
#include "shader/prog_print.h"
#include "shader/prog_statevars.h"
#include "texenvprogram.h"
+
+struct texenvprog_cache_item
+{
+ GLuint hash;
+ void *key;
+ struct gl_fragment_program *data;
+ struct texenvprog_cache_item *next;
+};
+
+
/**
* This MAX is probably a bit generous, but that's OK. There can be
* up to four instructions per texture unit (TEX + 3 for combine),
@@ -1133,7 +1144,7 @@ search_cache(const struct texenvprog_cache *cache,
for (c = cache->items[hash % cache->size]; c; c = c->next) {
if (c->hash == hash && memcmp(c->key, key, keysize) == 0)
- return (struct gl_fragment_program *) c->data;
+ return c->data;
}
return NULL;
@@ -1161,7 +1172,7 @@ static void rehash( struct texenvprog_cache *cache )
cache->size = size;
}
-static void clear_cache( struct texenvprog_cache *cache )
+static void clear_cache(GLcontext *ctx, struct texenvprog_cache *cache)
{
struct texenvprog_cache_item *c, *next;
GLuint i;
@@ -1170,8 +1181,7 @@ static void clear_cache( struct texenvprog_cache *cache )
for (c = cache->items[i]; c; c = next) {
next = c->next;
_mesa_free(c->key);
- cache->ctx->Driver.DeleteProgram(cache->ctx,
- (struct gl_program *) c->data);
+ _mesa_reference_fragprog(ctx, &c->data, NULL);
_mesa_free(c);
}
cache->items[i] = NULL;
@@ -1182,25 +1192,25 @@ static void clear_cache( struct texenvprog_cache *cache )
}
-static void cache_item( struct texenvprog_cache *cache,
+static void cache_item( GLcontext *ctx,
+ struct texenvprog_cache *cache,
GLuint hash,
const struct state_key *key,
- void *data )
+ struct gl_fragment_program *prog)
{
- struct texenvprog_cache_item *c
- = (struct texenvprog_cache_item *) MALLOC(sizeof(*c));
+ struct texenvprog_cache_item *c = CALLOC_STRUCT(texenvprog_cache_item);
c->hash = hash;
c->key = _mesa_malloc(sizeof(*key));
memcpy(c->key, key, sizeof(*key));
- c->data = (struct gl_fragment_program *) data;
+ _mesa_reference_fragprog(ctx, &c->data, prog);
if (cache->n_items > cache->size * 1.5) {
if (cache->size < 1000)
rehash(cache);
else
- clear_cache(cache);
+ clear_cache(ctx, cache);
}
cache->n_items++;
@@ -1243,32 +1253,29 @@ _mesa_UpdateTexEnvProgram( GLcontext *ctx )
/* If a conventional fragment program/shader isn't in effect... */
if (!ctx->FragmentProgram._Enabled &&
(!ctx->Shader.CurrentProgram || !ctx->Shader.CurrentProgram->FragmentProgram)) {
+ struct gl_fragment_program *newProg;
+
make_state_key(ctx, &key);
hash = hash_key(&key);
- ctx->FragmentProgram._Current =
- ctx->FragmentProgram._TexEnvProgram =
- search_cache(&ctx->Texture.env_fp_cache, hash, &key, sizeof(key));
+ newProg = search_cache(&ctx->Texture.env_fp_cache, hash, &key, sizeof(key));
+
+ if (!newProg) {
+ /* create new tex env program */
- if (!ctx->FragmentProgram._TexEnvProgram) {
if (0)
_mesa_printf("Building new texenv proggy for key %x\n", hash);
- /* create new tex env program */
- ctx->FragmentProgram._Current =
- ctx->FragmentProgram._TexEnvProgram =
- (struct gl_fragment_program *)
+ newProg = (struct gl_fragment_program *)
ctx->Driver.NewProgram(ctx, GL_FRAGMENT_PROGRAM_ARB, 0);
- create_new_program(ctx, &key, ctx->FragmentProgram._TexEnvProgram);
+ create_new_program(ctx, &key, newProg);
- cache_item(&ctx->Texture.env_fp_cache, hash, &key,
- ctx->FragmentProgram._TexEnvProgram);
- }
- else {
- if (0)
- _mesa_printf("Found existing texenv program for key %x\n", hash);
+ cache_item(ctx, &ctx->Texture.env_fp_cache, hash, &key, newProg);
}
+
+ _mesa_reference_fragprog(ctx, &ctx->FragmentProgram._Current, newProg);
+ _mesa_reference_fragprog(ctx, &ctx->FragmentProgram._TexEnvProgram, newProg);
}
else {
/* _Current pointer has been updated in update_program */
@@ -1298,6 +1305,6 @@ void _mesa_TexEnvProgramCacheInit( GLcontext *ctx )
void _mesa_TexEnvProgramCacheDestroy( GLcontext *ctx )
{
- clear_cache(&ctx->Texture.env_fp_cache);
+ clear_cache(ctx, &ctx->Texture.env_fp_cache);
_mesa_free(ctx->Texture.env_fp_cache.items);
}
diff --git a/src/mesa/main/texstore.c b/src/mesa/main/texstore.c
index 90edca86e8..5363e9e080 100644
--- a/src/mesa/main/texstore.c
+++ b/src/mesa/main/texstore.c
@@ -2918,9 +2918,7 @@ _mesa_store_teximage1d(GLcontext *ctx, GLenum target, GLint level,
/* GL_SGIS_generate_mipmap */
if (level == texObj->BaseLevel && texObj->GenerateMipmap) {
- _mesa_generate_mipmap(ctx, target,
- &ctx->Texture.Unit[ctx->Texture.CurrentUnit],
- texObj);
+ ctx->Driver.GenerateMipmap(ctx, target, texObj);
}
_mesa_unmap_teximage_pbo(ctx, packing);
@@ -3004,9 +3002,7 @@ _mesa_store_teximage2d(GLcontext *ctx, GLenum target, GLint level,
/* GL_SGIS_generate_mipmap */
if (level == texObj->BaseLevel && texObj->GenerateMipmap) {
- _mesa_generate_mipmap(ctx, target,
- &ctx->Texture.Unit[ctx->Texture.CurrentUnit],
- texObj);
+ ctx->Driver.GenerateMipmap(ctx, target, texObj);
}
_mesa_unmap_teximage_pbo(ctx, packing);
@@ -3080,9 +3076,7 @@ _mesa_store_teximage3d(GLcontext *ctx, GLenum target, GLint level,
/* GL_SGIS_generate_mipmap */
if (level == texObj->BaseLevel && texObj->GenerateMipmap) {
- _mesa_generate_mipmap(ctx, target,
- &ctx->Texture.Unit[ctx->Texture.CurrentUnit],
- texObj);
+ ctx->Driver.GenerateMipmap(ctx, target, texObj);
}
_mesa_unmap_teximage_pbo(ctx, packing);
@@ -3128,9 +3122,7 @@ _mesa_store_texsubimage1d(GLcontext *ctx, GLenum target, GLint level,
/* GL_SGIS_generate_mipmap */
if (level == texObj->BaseLevel && texObj->GenerateMipmap) {
- _mesa_generate_mipmap(ctx, target,
- &ctx->Texture.Unit[ctx->Texture.CurrentUnit],
- texObj);
+ ctx->Driver.GenerateMipmap(ctx, target, texObj);
}
_mesa_unmap_teximage_pbo(ctx, packing);
@@ -3183,9 +3175,7 @@ _mesa_store_texsubimage2d(GLcontext *ctx, GLenum target, GLint level,
/* GL_SGIS_generate_mipmap */
if (level == texObj->BaseLevel && texObj->GenerateMipmap) {
- _mesa_generate_mipmap(ctx, target,
- &ctx->Texture.Unit[ctx->Texture.CurrentUnit],
- texObj);
+ ctx->Driver.GenerateMipmap(ctx, target, texObj);
}
_mesa_unmap_teximage_pbo(ctx, packing);
@@ -3238,9 +3228,7 @@ _mesa_store_texsubimage3d(GLcontext *ctx, GLenum target, GLint level,
/* GL_SGIS_generate_mipmap */
if (level == texObj->BaseLevel && texObj->GenerateMipmap) {
- _mesa_generate_mipmap(ctx, target,
- &ctx->Texture.Unit[ctx->Texture.CurrentUnit],
- texObj);
+ ctx->Driver.GenerateMipmap(ctx, target, texObj);
}
_mesa_unmap_teximage_pbo(ctx, packing);
@@ -3314,9 +3302,7 @@ _mesa_store_compressed_teximage2d(GLcontext *ctx, GLenum target, GLint level,
/* GL_SGIS_generate_mipmap */
if (level == texObj->BaseLevel && texObj->GenerateMipmap) {
- _mesa_generate_mipmap(ctx, target,
- &ctx->Texture.Unit[ctx->Texture.CurrentUnit],
- texObj);
+ ctx->Driver.GenerateMipmap(ctx, target, texObj);
}
_mesa_unmap_teximage_pbo(ctx, &ctx->Unpack);
@@ -3426,9 +3412,7 @@ _mesa_store_compressed_texsubimage2d(GLcontext *ctx, GLenum target,
/* GL_SGIS_generate_mipmap */
if (level == texObj->BaseLevel && texObj->GenerateMipmap) {
- _mesa_generate_mipmap(ctx, target,
- &ctx->Texture.Unit[ctx->Texture.CurrentUnit],
- texObj);
+ ctx->Driver.GenerateMipmap(ctx, target, texObj);
}
_mesa_unmap_teximage_pbo(ctx, &ctx->Unpack);
diff --git a/src/mesa/main/version.h b/src/mesa/main/version.h
index 9229077f42..2f459e517a 100644
--- a/src/mesa/main/version.h
+++ b/src/mesa/main/version.h
@@ -31,7 +31,7 @@
#define MESA_MAJOR 7
#define MESA_MINOR 1
#define MESA_PATCH 0
-#define MESA_VERSION_STRING "7.1"
+#define MESA_VERSION_STRING "7.1 rc1"
/* To make version comparison easy */
#define MESA_VERSION(a,b,c) (((a) << 16) + ((b) << 8) + (c))
diff --git a/src/mesa/shader/arbprogparse.c b/src/mesa/shader/arbprogparse.c
index 74004e9b13..60aaabe679 100644
--- a/src/mesa/shader/arbprogparse.c
+++ b/src/mesa/shader/arbprogparse.c
@@ -3851,8 +3851,11 @@ _mesa_parse_arb_fragment_program(GLcontext* ctx, GLenum target,
program->Base.NumNativeTexIndirections = ap.Base.NumTexIndirections;
program->Base.InputsRead = ap.Base.InputsRead;
program->Base.OutputsWritten = ap.Base.OutputsWritten;
- for (i = 0; i < MAX_TEXTURE_IMAGE_UNITS; i++)
+ for (i = 0; i < MAX_TEXTURE_IMAGE_UNITS; i++) {
program->Base.TexturesUsed[i] = ap.TexturesUsed[i];
+ if (ap.TexturesUsed[i])
+ program->Base.SamplersUsed |= (1 << i);
+ }
program->Base.ShadowSamplers = ap.ShadowSamplers;
program->FogOption = ap.FogOption;
program->UsesKill = ap.UsesKill;
diff --git a/src/mesa/shader/descrip.mms b/src/mesa/shader/descrip.mms
index 157c193c79..bdac946efe 100644
--- a/src/mesa/shader/descrip.mms
+++ b/src/mesa/shader/descrip.mms
@@ -1,6 +1,6 @@
# Makefile for core library for VMS
# contributed by Jouk Jansen joukj@hrem.nano.tudelft.nl
-# Last revision : 3 October 2007
+# Last revision : 27 May 2008
.first
define gl [---.include.gl]
define math [-.math]
@@ -35,7 +35,7 @@ SOURCES = \
prog_parameter.c \
prog_print.c \
prog_statevars.c \
- shader_api.c
+ shader_api.c prog_uniform.c
OBJECTS = \
atifragshader.obj,\
@@ -52,7 +52,7 @@ OBJECTS = \
prog_parameter.obj,\
prog_print.obj,\
prog_statevars.obj,\
- shader_api.obj
+ shader_api.obj,prog_uniform.obj
##### RULES #####
@@ -90,3 +90,4 @@ prog_parameter.obj : prog_parameter.c
prog_print.obj : prog_print.c
prog_statevars.obj : prog_statevars.c
shader_api.obj : shader_api.c
+prog_uniform.obj : prog_uniform.c
diff --git a/src/mesa/shader/prog_execute.c b/src/mesa/shader/prog_execute.c
index cb17aa501c..8ce2ca3964 100644
--- a/src/mesa/shader/prog_execute.c
+++ b/src/mesa/shader/prog_execute.c
@@ -310,6 +310,8 @@ fetch_texel(GLcontext *ctx,
const GLfloat texcoord[4], GLfloat lodBias,
GLfloat color[4])
{
+ const GLuint unit = machine->Samplers[inst->TexSrcUnit];
+
/* Note: we only have the right derivatives for fragment input attribs.
*/
if (machine->NumDeriv > 0 &&
@@ -320,12 +322,10 @@ fetch_texel(GLcontext *ctx,
machine->FetchTexelDeriv(ctx, texcoord,
machine->DerivX[attr],
machine->DerivY[attr],
- lodBias,
- inst->TexSrcUnit, color);
+ lodBias, unit, color);
}
else {
- machine->FetchTexelLod(ctx, texcoord, lodBias,
- inst->TexSrcUnit, color);
+ machine->FetchTexelLod(ctx, texcoord, lodBias, unit, color);
}
}
@@ -1522,9 +1522,7 @@ _mesa_execute_program(GLcontext * ctx,
default:
_mesa_problem(ctx, "Bad opcode %d in _mesa_execute_program",
inst->Opcode);
- assert(0);
return GL_TRUE; /* return value doesn't matter */
-
}
numExec++;
diff --git a/src/mesa/shader/prog_execute.h b/src/mesa/shader/prog_execute.h
index 3ea0ba1565..18b13e11a4 100644
--- a/src/mesa/shader/prog_execute.h
+++ b/src/mesa/shader/prog_execute.h
@@ -63,6 +63,8 @@ struct gl_program_machine
GLuint CondCodes[4]; /**< COND_* value for x/y/z/w */
GLint AddressReg[MAX_PROGRAM_ADDRESS_REGS][4];
+ const GLubyte *Samplers; /** Array mapping sampler var to tex unit */
+
GLuint CallStack[MAX_PROGRAM_CALL_DEPTH]; /**< For CAL/RET instructions */
GLuint StackDepth; /**< Index/ptr to top of CallStack[] */
diff --git a/src/mesa/shader/prog_instruction.c b/src/mesa/shader/prog_instruction.c
index d6b5652a27..bea5d0551e 100644
--- a/src/mesa/shader/prog_instruction.c
+++ b/src/mesa/shader/prog_instruction.c
@@ -119,6 +119,23 @@ _mesa_copy_instructions(struct prog_instruction *dest,
/**
+ * Free an array of instructions
+ */
+void
+_mesa_free_instructions(struct prog_instruction *inst, GLuint count)
+{
+ GLuint i;
+ for (i = 0; i < count; i++) {
+ if (inst[i].Data)
+ _mesa_free(inst[i].Data);
+ if (inst[i].Comment)
+ _mesa_free((char *) inst[i].Comment);
+ }
+ _mesa_free(inst);
+}
+
+
+/**
* Basic info about each instruction
*/
struct instruction_info
@@ -126,6 +143,7 @@ struct instruction_info
gl_inst_opcode Opcode;
const char *Name;
GLuint NumSrcRegs;
+ GLuint NumDstRegs;
};
/**
@@ -133,91 +151,91 @@ struct instruction_info
* \note Opcode should equal array index!
*/
static const struct instruction_info InstInfo[MAX_OPCODE] = {
- { OPCODE_NOP, "NOP", 0 },
- { OPCODE_ABS, "ABS", 1 },
- { OPCODE_ADD, "ADD", 2 },
- { OPCODE_ARA, "ARA", 1 },
- { OPCODE_ARL, "ARL", 1 },
- { OPCODE_ARL_NV, "ARL", 1 },
- { OPCODE_ARR, "ARL", 1 },
- { OPCODE_BGNLOOP,"BGNLOOP", 0 },
- { OPCODE_BGNSUB, "BGNSUB", 0 },
- { OPCODE_BRA, "BRA", 0 },
- { OPCODE_BRK, "BRK", 0 },
- { OPCODE_CAL, "CAL", 0 },
- { OPCODE_CMP, "CMP", 3 },
- { OPCODE_CONT, "CONT", 0 },
- { OPCODE_COS, "COS", 1 },
- { OPCODE_DDX, "DDX", 1 },
- { OPCODE_DDY, "DDY", 1 },
- { OPCODE_DP3, "DP3", 2 },
- { OPCODE_DP4, "DP4", 2 },
- { OPCODE_DPH, "DPH", 2 },
- { OPCODE_DST, "DST", 2 },
- { OPCODE_ELSE, "ELSE", 0 },
- { OPCODE_END, "END", 0 },
- { OPCODE_ENDIF, "ENDIF", 0 },
- { OPCODE_ENDLOOP,"ENDLOOP", 0 },
- { OPCODE_ENDSUB, "ENDSUB", 0 },
- { OPCODE_EX2, "EX2", 1 },
- { OPCODE_EXP, "EXP", 1 },
- { OPCODE_FLR, "FLR", 1 },
- { OPCODE_FRC, "FRC", 1 },
- { OPCODE_IF, "IF", 0 },
- { OPCODE_INT, "INT", 1 },
- { OPCODE_KIL, "KIL", 1 },
- { OPCODE_KIL_NV, "KIL", 0 },
- { OPCODE_LG2, "LG2", 1 },
- { OPCODE_LIT, "LIT", 1 },
- { OPCODE_LOG, "LOG", 1 },
- { OPCODE_LRP, "LRP", 3 },
- { OPCODE_MAD, "MAD", 3 },
- { OPCODE_MAX, "MAX", 2 },
- { OPCODE_MIN, "MIN", 2 },
- { OPCODE_MOV, "MOV", 1 },
- { OPCODE_MUL, "MUL", 2 },
- { OPCODE_NOISE1, "NOISE1", 1 },
- { OPCODE_NOISE2, "NOISE2", 1 },
- { OPCODE_NOISE3, "NOISE3", 1 },
- { OPCODE_NOISE4, "NOISE4", 1 },
- { OPCODE_PK2H, "PK2H", 1 },
- { OPCODE_PK2US, "PK2US", 1 },
- { OPCODE_PK4B, "PK4B", 1 },
- { OPCODE_PK4UB, "PK4UB", 1 },
- { OPCODE_POW, "POW", 2 },
- { OPCODE_POPA, "POPA", 0 },
- { OPCODE_PRINT, "PRINT", 1 },
- { OPCODE_PUSHA, "PUSHA", 0 },
- { OPCODE_RCC, "RCC", 1 },
- { OPCODE_RCP, "RCP", 1 },
- { OPCODE_RET, "RET", 0 },
- { OPCODE_RFL, "RFL", 1 },
- { OPCODE_RSQ, "RSQ", 1 },
- { OPCODE_SCS, "SCS", 1 },
- { OPCODE_SEQ, "SEQ", 2 },
- { OPCODE_SFL, "SFL", 0 },
- { OPCODE_SGE, "SGE", 2 },
- { OPCODE_SGT, "SGT", 2 },
- { OPCODE_SIN, "SIN", 1 },
- { OPCODE_SLE, "SLE", 2 },
- { OPCODE_SLT, "SLT", 2 },
- { OPCODE_SNE, "SNE", 2 },
- { OPCODE_SSG, "SSG", 1 },
- { OPCODE_STR, "STR", 0 },
- { OPCODE_SUB, "SUB", 2 },
- { OPCODE_SWZ, "SWZ", 1 },
- { OPCODE_TEX, "TEX", 1 },
- { OPCODE_TXB, "TXB", 1 },
- { OPCODE_TXD, "TXD", 3 },
- { OPCODE_TXL, "TXL", 1 },
- { OPCODE_TXP, "TXP", 1 },
- { OPCODE_TXP_NV, "TXP", 1 },
- { OPCODE_UP2H, "UP2H", 1 },
- { OPCODE_UP2US, "UP2US", 1 },
- { OPCODE_UP4B, "UP4B", 1 },
- { OPCODE_UP4UB, "UP4UB", 1 },
- { OPCODE_X2D, "X2D", 3 },
- { OPCODE_XPD, "XPD", 2 }
+ { OPCODE_NOP, "NOP", 0, 0 },
+ { OPCODE_ABS, "ABS", 1, 1 },
+ { OPCODE_ADD, "ADD", 2, 1 },
+ { OPCODE_ARA, "ARA", 1, 1 },
+ { OPCODE_ARL, "ARL", 1, 1 },
+ { OPCODE_ARL_NV, "ARL", 1, 1 },
+ { OPCODE_ARR, "ARL", 1, 1 },
+ { OPCODE_BGNLOOP,"BGNLOOP", 0, 0 },
+ { OPCODE_BGNSUB, "BGNSUB", 0, 0 },
+ { OPCODE_BRA, "BRA", 0, 0 },
+ { OPCODE_BRK, "BRK", 0, 0 },
+ { OPCODE_CAL, "CAL", 0, 0 },
+ { OPCODE_CMP, "CMP", 3, 1 },
+ { OPCODE_CONT, "CONT", 0, 0 },
+ { OPCODE_COS, "COS", 1, 1 },
+ { OPCODE_DDX, "DDX", 1, 1 },
+ { OPCODE_DDY, "DDY", 1, 1 },
+ { OPCODE_DP3, "DP3", 2, 1 },
+ { OPCODE_DP4, "DP4", 2, 1 },
+ { OPCODE_DPH, "DPH", 2, 1 },
+ { OPCODE_DST, "DST", 2, 1 },
+ { OPCODE_ELSE, "ELSE", 0, 0 },
+ { OPCODE_END, "END", 0, 0 },
+ { OPCODE_ENDIF, "ENDIF", 0, 0 },
+ { OPCODE_ENDLOOP,"ENDLOOP", 0, 0 },
+ { OPCODE_ENDSUB, "ENDSUB", 0, 0 },
+ { OPCODE_EX2, "EX2", 1, 1 },
+ { OPCODE_EXP, "EXP", 1, 1 },
+ { OPCODE_FLR, "FLR", 1, 1 },
+ { OPCODE_FRC, "FRC", 1, 1 },
+ { OPCODE_IF, "IF", 1, 0 },
+ { OPCODE_INT, "INT", 1, 1 },
+ { OPCODE_KIL, "KIL", 1, 0 },
+ { OPCODE_KIL_NV, "KIL", 0, 0 },
+ { OPCODE_LG2, "LG2", 1, 1 },
+ { OPCODE_LIT, "LIT", 1, 1 },
+ { OPCODE_LOG, "LOG", 1, 1 },
+ { OPCODE_LRP, "LRP", 3, 1 },
+ { OPCODE_MAD, "MAD", 3, 1 },
+ { OPCODE_MAX, "MAX", 2, 1 },
+ { OPCODE_MIN, "MIN", 2, 1 },
+ { OPCODE_MOV, "MOV", 1, 1 },
+ { OPCODE_MUL, "MUL", 2, 1 },
+ { OPCODE_NOISE1, "NOISE1", 1, 1 },
+ { OPCODE_NOISE2, "NOISE2", 1, 1 },
+ { OPCODE_NOISE3, "NOISE3", 1, 1 },
+ { OPCODE_NOISE4, "NOISE4", 1, 1 },
+ { OPCODE_PK2H, "PK2H", 1, 1 },
+ { OPCODE_PK2US, "PK2US", 1, 1 },
+ { OPCODE_PK4B, "PK4B", 1, 1 },
+ { OPCODE_PK4UB, "PK4UB", 1, 1 },
+ { OPCODE_POW, "POW", 2, 1 },
+ { OPCODE_POPA, "POPA", 0, 0 },
+ { OPCODE_PRINT, "PRINT", 1, 0 },
+ { OPCODE_PUSHA, "PUSHA", 0, 0 },
+ { OPCODE_RCC, "RCC", 1, 1 },
+ { OPCODE_RCP, "RCP", 1, 1 },
+ { OPCODE_RET, "RET", 0, 0 },
+ { OPCODE_RFL, "RFL", 1, 1 },
+ { OPCODE_RSQ, "RSQ", 1, 1 },
+ { OPCODE_SCS, "SCS", 1, 1 },
+ { OPCODE_SEQ, "SEQ", 2, 1 },
+ { OPCODE_SFL, "SFL", 0, 1 },
+ { OPCODE_SGE, "SGE", 2, 1 },
+ { OPCODE_SGT, "SGT", 2, 1 },
+ { OPCODE_SIN, "SIN", 1, 1 },
+ { OPCODE_SLE, "SLE", 2, 1 },
+ { OPCODE_SLT, "SLT", 2, 1 },
+ { OPCODE_SNE, "SNE", 2, 1 },
+ { OPCODE_SSG, "SSG", 1, 1 },
+ { OPCODE_STR, "STR", 0, 1 },
+ { OPCODE_SUB, "SUB", 2, 1 },
+ { OPCODE_SWZ, "SWZ", 1, 1 },
+ { OPCODE_TEX, "TEX", 1, 1 },
+ { OPCODE_TXB, "TXB", 1, 1 },
+ { OPCODE_TXD, "TXD", 3, 1 },
+ { OPCODE_TXL, "TXL", 1, 1 },
+ { OPCODE_TXP, "TXP", 1, 1 },
+ { OPCODE_TXP_NV, "TXP", 1, 1 },
+ { OPCODE_UP2H, "UP2H", 1, 1 },
+ { OPCODE_UP2US, "UP2US", 1, 1 },
+ { OPCODE_UP4B, "UP4B", 1, 1 },
+ { OPCODE_UP4UB, "UP4UB", 1, 1 },
+ { OPCODE_X2D, "X2D", 3, 1 },
+ { OPCODE_XPD, "XPD", 2, 1 }
};
@@ -234,6 +252,29 @@ _mesa_num_inst_src_regs(gl_inst_opcode opcode)
/**
+ * Return the number of dst registers for the given instruction/opcode.
+ */
+GLuint
+_mesa_num_inst_dst_regs(gl_inst_opcode opcode)
+{
+ ASSERT(opcode == InstInfo[opcode].Opcode);
+ ASSERT(OPCODE_XPD == InstInfo[OPCODE_XPD].Opcode);
+ return InstInfo[opcode].NumDstRegs;
+}
+
+
+GLboolean
+_mesa_is_tex_instruction(gl_inst_opcode opcode)
+{
+ return (opcode == OPCODE_TEX ||
+ opcode == OPCODE_TXB ||
+ opcode == OPCODE_TXD ||
+ opcode == OPCODE_TXL ||
+ opcode == OPCODE_TXP);
+}
+
+
+/**
* Return string name for given program opcode.
*/
const char *
diff --git a/src/mesa/shader/prog_instruction.h b/src/mesa/shader/prog_instruction.h
index c800757aa0..aca768376a 100644
--- a/src/mesa/shader/prog_instruction.h
+++ b/src/mesa/shader/prog_instruction.h
@@ -437,9 +437,18 @@ extern struct prog_instruction *
_mesa_copy_instructions(struct prog_instruction *dest,
const struct prog_instruction *src, GLuint n);
+extern void
+_mesa_free_instructions(struct prog_instruction *inst, GLuint count);
+
extern GLuint
_mesa_num_inst_src_regs(gl_inst_opcode opcode);
+extern GLuint
+_mesa_num_inst_dst_regs(gl_inst_opcode opcode);
+
+extern GLboolean
+_mesa_is_tex_instruction(gl_inst_opcode opcode);
+
extern const char *
_mesa_opcode_string(gl_inst_opcode opcode);
diff --git a/src/mesa/shader/prog_parameter.c b/src/mesa/shader/prog_parameter.c
index 3ad7215755..152bd79f69 100644
--- a/src/mesa/shader/prog_parameter.c
+++ b/src/mesa/shader/prog_parameter.c
@@ -282,6 +282,8 @@ _mesa_add_uniform(struct gl_program_parameter_list *paramList,
* Add a sampler to the parameter list.
* \param name uniform's name
* \param datatype GL_SAMPLER_2D, GL_SAMPLER_2D_RECT_ARB, etc.
+ * \param index the sampler number (as seen in TEX instructions)
+ * \return sampler index (starting at zero) or -1 if error
*/
GLint
_mesa_add_sampler(struct gl_program_parameter_list *paramList,
@@ -292,13 +294,20 @@ _mesa_add_sampler(struct gl_program_parameter_list *paramList,
ASSERT(paramList->Parameters[i].Size == 1);
ASSERT(paramList->Parameters[i].DataType == datatype);
/* already in list */
- return i;
+ return (GLint) paramList->ParameterValues[i][0];
}
else {
const GLint size = 1; /* a sampler is basically a texture unit number */
- i = _mesa_add_parameter(paramList, PROGRAM_SAMPLER, name,
- size, datatype, NULL, NULL);
- return i;
+ GLfloat value;
+ GLint numSamplers = 0;
+ for (i = 0; i < paramList->NumParameters; i++) {
+ if (paramList->Parameters[i].Type == PROGRAM_SAMPLER)
+ numSamplers++;
+ }
+ value = (GLfloat) numSamplers;
+ (void) _mesa_add_parameter(paramList, PROGRAM_SAMPLER, name,
+ size, datatype, &value, NULL);
+ return numSamplers;
}
}
@@ -599,11 +608,46 @@ _mesa_clone_parameter_list(const struct gl_program_parameter_list *list)
}
}
+ clone->StateFlags = list->StateFlags;
+
return clone;
}
/**
+ * Return a new parameter list which is listA + listB.
+ */
+struct gl_program_parameter_list *
+_mesa_combine_parameter_lists(const struct gl_program_parameter_list *listA,
+ const struct gl_program_parameter_list *listB)
+{
+ struct gl_program_parameter_list *list;
+
+ if (listA) {
+ list = _mesa_clone_parameter_list(listA);
+ if (list && listB) {
+ GLuint i;
+ for (i = 0; i < listB->NumParameters; i++) {
+ struct gl_program_parameter *param = listB->Parameters + i;
+ _mesa_add_parameter(list, param->Type, param->Name, param->Size,
+ param->DataType,
+ listB->ParameterValues[i],
+ param->StateIndexes);
+ }
+ }
+ }
+ else if (listB) {
+ list = _mesa_clone_parameter_list(listB);
+ }
+ else {
+ list = NULL;
+ }
+ return list;
+}
+
+
+
+/**
* Find longest name of all uniform parameters in list.
*/
GLuint
diff --git a/src/mesa/shader/prog_parameter.h b/src/mesa/shader/prog_parameter.h
index 09ff851ea7..105f6f24de 100644
--- a/src/mesa/shader/prog_parameter.h
+++ b/src/mesa/shader/prog_parameter.h
@@ -78,6 +78,16 @@ _mesa_free_parameter_list(struct gl_program_parameter_list *paramList);
extern struct gl_program_parameter_list *
_mesa_clone_parameter_list(const struct gl_program_parameter_list *list);
+extern struct gl_program_parameter_list *
+_mesa_combine_parameter_lists(const struct gl_program_parameter_list *a,
+ const struct gl_program_parameter_list *b);
+
+static INLINE GLuint
+_mesa_num_parameters(const struct gl_program_parameter_list *list)
+{
+ return list ? list->NumParameters : 0;
+}
+
extern GLint
_mesa_add_parameter(struct gl_program_parameter_list *paramList,
enum register_file type, const char *name,
diff --git a/src/mesa/shader/prog_print.c b/src/mesa/shader/prog_print.c
index 308cce2206..1c35ce3fec 100644
--- a/src/mesa/shader/prog_print.c
+++ b/src/mesa/shader/prog_print.c
@@ -320,7 +320,7 @@ _mesa_swizzle_string(GLuint swizzle, GLuint negateBase, GLboolean extended)
if (!extended)
s[i++] = '.';
- if (negateBase & 0x1)
+ if (negateBase & NEGATE_X)
s[i++] = '-';
s[i++] = swz[GET_SWZ(swizzle, 0)];
@@ -328,7 +328,7 @@ _mesa_swizzle_string(GLuint swizzle, GLuint negateBase, GLboolean extended)
s[i++] = ',';
}
- if (negateBase & 0x2)
+ if (negateBase & NEGATE_Y)
s[i++] = '-';
s[i++] = swz[GET_SWZ(swizzle, 1)];
@@ -336,7 +336,7 @@ _mesa_swizzle_string(GLuint swizzle, GLuint negateBase, GLboolean extended)
s[i++] = ',';
}
- if (negateBase & 0x4)
+ if (negateBase & NEGATE_Z)
s[i++] = '-';
s[i++] = swz[GET_SWZ(swizzle, 2)];
@@ -344,7 +344,7 @@ _mesa_swizzle_string(GLuint swizzle, GLuint negateBase, GLboolean extended)
s[i++] = ',';
}
- if (negateBase & 0x8)
+ if (negateBase & NEGATE_W)
s[i++] = '-';
s[i++] = swz[GET_SWZ(swizzle, 3)];
@@ -541,7 +541,7 @@ _mesa_print_instruction_opt(const struct prog_instruction *inst, GLint indent,
_mesa_printf("_SAT");
_mesa_printf(" ");
print_dst_reg(&inst->DstReg, mode, prog);
- _mesa_printf("%s[%d], %s",
+ _mesa_printf(", %s[%d], %s",
file_string((enum register_file) inst->SrcReg[0].File,
mode),
inst->SrcReg[0].Index,
@@ -551,6 +551,7 @@ _mesa_print_instruction_opt(const struct prog_instruction *inst, GLint indent,
break;
case OPCODE_TEX:
case OPCODE_TXP:
+ case OPCODE_TXL:
case OPCODE_TXB:
_mesa_printf("%s", _mesa_opcode_string(inst->Opcode));
if (inst->SaturateMode == SATURATE_ZERO_ONE)
@@ -571,6 +572,23 @@ _mesa_print_instruction_opt(const struct prog_instruction *inst, GLint indent,
}
print_comment(inst);
break;
+
+ case OPCODE_KIL:
+ _mesa_printf("%s", _mesa_opcode_string(inst->Opcode));
+ _mesa_printf(" ");
+ print_src_reg(&inst->SrcReg[0], mode, prog);
+ print_comment(inst);
+ break;
+ case OPCODE_KIL_NV:
+ _mesa_printf("%s", _mesa_opcode_string(inst->Opcode));
+ _mesa_printf(" ");
+ _mesa_printf("%s.%s",
+ _mesa_condcode_string(inst->DstReg.CondMask),
+ _mesa_swizzle_string(inst->DstReg.CondSwizzle,
+ GL_FALSE, GL_FALSE));
+ print_comment(inst);
+ break;
+
case OPCODE_ARL:
_mesa_printf("ARL addr.x, ");
print_src_reg(&inst->SrcReg[0], mode, prog);
@@ -735,6 +753,8 @@ _mesa_print_program_opt(const struct gl_program *prog,
void
_mesa_print_program_parameters(GLcontext *ctx, const struct gl_program *prog)
{
+ GLuint i;
+
_mesa_printf("InputsRead: 0x%x\n", prog->InputsRead);
_mesa_printf("OutputsWritten: 0x%x\n", prog->OutputsWritten);
_mesa_printf("NumInstructions=%d\n", prog->NumInstructions);
@@ -742,9 +762,14 @@ _mesa_print_program_parameters(GLcontext *ctx, const struct gl_program *prog)
_mesa_printf("NumParameters=%d\n", prog->NumParameters);
_mesa_printf("NumAttributes=%d\n", prog->NumAttributes);
_mesa_printf("NumAddressRegs=%d\n", prog->NumAddressRegs);
-
+ _mesa_printf("Samplers=[ ");
+ for (i = 0; i < MAX_SAMPLERS; i++) {
+ _mesa_printf("%d ", prog->SamplerUnits[i]);
+ }
+ _mesa_printf("]\n");
+
_mesa_load_state_parameters(ctx, prog->Parameters);
-
+
#if 0
_mesa_printf("Local Params:\n");
for (i = 0; i < MAX_PROGRAM_LOCAL_PARAMS; i++){
@@ -762,6 +787,9 @@ _mesa_print_parameter_list(const struct gl_program_parameter_list *list)
const gl_prog_print_mode mode = PROG_PRINT_DEBUG;
GLuint i;
+ if (!list)
+ return;
+
_mesa_printf("param list %p\n", (void *) list);
for (i = 0; i < list->NumParameters; i++){
struct gl_program_parameter *param = list->Parameters + i;
diff --git a/src/mesa/shader/prog_statevars.c b/src/mesa/shader/prog_statevars.c
index 4ae74c1d42..539057b438 100644
--- a/src/mesa/shader/prog_statevars.c
+++ b/src/mesa/shader/prog_statevars.c
@@ -253,7 +253,8 @@ _mesa_fetch_state(GLcontext *ctx, const gl_state_index state[],
value[0] = ctx->Fog.Density;
value[1] = ctx->Fog.Start;
value[2] = ctx->Fog.End;
- value[3] = 1.0F / (ctx->Fog.End - ctx->Fog.Start);
+ value[3] = (ctx->Fog.End == ctx->Fog.Start)
+ ? 1.0 : 1.0F / (ctx->Fog.End - ctx->Fog.Start);
return;
case STATE_CLIPPLANE:
{
@@ -278,6 +279,7 @@ _mesa_fetch_state(GLcontext *ctx, const gl_state_index state[],
case STATE_MVP_MATRIX:
case STATE_TEXTURE_MATRIX:
case STATE_PROGRAM_MATRIX:
+ case STATE_COLOR_MATRIX:
{
/* state[0] = modelview, projection, texture, etc. */
/* state[1] = which texture matrix or program matrix */
@@ -311,6 +313,9 @@ _mesa_fetch_state(GLcontext *ctx, const gl_state_index state[],
else if (mat == STATE_PROGRAM_MATRIX) {
matrix = ctx->ProgramMatrixStack[index].Top;
}
+ else if (mat == STATE_COLOR_MATRIX) {
+ matrix = ctx->ColorMatrixStack.Top;
+ }
else {
_mesa_problem(ctx, "Bad matrix name in _mesa_fetch_state()");
return;
@@ -420,8 +425,9 @@ _mesa_fetch_state(GLcontext *ctx, const gl_state_index state[],
* exp: 2^-(density/ln(2) * fogcoord)
* exp2: 2^-((density/(ln(2)^2) * fogcoord)^2)
*/
- value[0] = -1.0F / (ctx->Fog.End - ctx->Fog.Start);
- value[1] = ctx->Fog.End / (ctx->Fog.End - ctx->Fog.Start);
+ value[0] = (ctx->Fog.End == ctx->Fog.Start)
+ ? 1.0 : -1.0F / (ctx->Fog.End - ctx->Fog.Start);
+ value[1] = ctx->Fog.End * -value[0];
value[2] = ctx->Fog.Density * ONE_DIV_LN2;
value[3] = ctx->Fog.Density * ONE_DIV_SQRT_LN2;
return;
@@ -434,6 +440,24 @@ _mesa_fetch_state(GLcontext *ctx, const gl_state_index state[],
value[3] = ctx->Light.Light[ln]._CosCutoff;
return;
}
+ case STATE_PT_SCALE:
+ value[0] = ctx->Pixel.RedScale;
+ value[1] = ctx->Pixel.GreenScale;
+ value[2] = ctx->Pixel.BlueScale;
+ value[3] = ctx->Pixel.AlphaScale;
+ break;
+ case STATE_PT_BIAS:
+ value[0] = ctx->Pixel.RedBias;
+ value[1] = ctx->Pixel.GreenBias;
+ value[2] = ctx->Pixel.BlueBias;
+ value[3] = ctx->Pixel.AlphaBias;
+ break;
+ case STATE_PCM_SCALE:
+ COPY_4V(value, ctx->Pixel.PostColorMatrixScale);
+ break;
+ case STATE_PCM_BIAS:
+ COPY_4V(value, ctx->Pixel.PostColorMatrixBias);
+ break;
default:
/* unknown state indexes are silently ignored
* should be handled by the driver.
@@ -492,6 +516,8 @@ _mesa_program_state_flags(const gl_state_index state[STATE_LENGTH])
return _NEW_TEXTURE_MATRIX;
case STATE_PROGRAM_MATRIX:
return _NEW_TRACK_MATRIX;
+ case STATE_COLOR_MATRIX:
+ return _NEW_COLOR_MATRIX;
case STATE_DEPTH_RANGE:
return _NEW_VIEWPORT;
@@ -585,6 +611,9 @@ append_token(char *dst, gl_state_index k)
case STATE_PROGRAM_MATRIX:
append(dst, "matrix.program");
break;
+ case STATE_COLOR_MATRIX:
+ append(dst, "matrix.color");
+ break;
case STATE_MATRIX_INVERSE:
append(dst, ".inverse");
break;
@@ -670,6 +699,18 @@ append_token(char *dst, gl_state_index k)
case STATE_POSITION_NORMALIZED:
append(dst, "(internal)");
break;
+ case STATE_PT_SCALE:
+ append(dst, "PTscale");
+ break;
+ case STATE_PT_BIAS:
+ append(dst, "PTbias");
+ break;
+ case STATE_PCM_SCALE:
+ append(dst, "PCMscale");
+ break;
+ case STATE_PCM_BIAS:
+ append(dst, "PCMbias");
+ break;
default:
;
}
@@ -748,6 +789,7 @@ _mesa_program_state_string(const gl_state_index state[STATE_LENGTH])
case STATE_MVP_MATRIX:
case STATE_TEXTURE_MATRIX:
case STATE_PROGRAM_MATRIX:
+ case STATE_COLOR_MATRIX:
{
/* state[0] = modelview, projection, texture, etc. */
/* state[1] = which texture matrix or program matrix */
@@ -815,10 +857,12 @@ _mesa_load_state_parameters(GLcontext *ctx,
if (!paramList)
return;
+ /*assert(ctx->Driver.NeedFlush == 0);*/
+
for (i = 0; i < paramList->NumParameters; i++) {
if (paramList->Parameters[i].Type == PROGRAM_STATE_VAR) {
_mesa_fetch_state(ctx,
- paramList->Parameters[i].StateIndexes,
+ (gl_state_index *) paramList->Parameters[i].StateIndexes,
paramList->ParameterValues[i]);
}
}
diff --git a/src/mesa/shader/prog_statevars.h b/src/mesa/shader/prog_statevars.h
index 22bb8e07ad..64820a5b68 100644
--- a/src/mesa/shader/prog_statevars.h
+++ b/src/mesa/shader/prog_statevars.h
@@ -67,6 +67,7 @@ typedef enum gl_state_index_ {
STATE_MVP_MATRIX,
STATE_TEXTURE_MATRIX,
STATE_PROGRAM_MATRIX,
+ STATE_COLOR_MATRIX,
STATE_MATRIX_INVERSE,
STATE_MATRIX_TRANSPOSE,
STATE_MATRIX_INVTRANS,
@@ -108,6 +109,10 @@ typedef enum gl_state_index_ {
STATE_POSITION_NORMALIZED, /* normalized light position */
STATE_FOG_PARAMS_OPTIMIZED, /* for faster fog calc */
STATE_SPOT_DIR_NORMALIZED, /* pre-normalized spot dir */
+ STATE_PT_SCALE, /**< Pixel transfer RGBA scale */
+ STATE_PT_BIAS, /**< Pixel transfer RGBA bias */
+ STATE_PCM_SCALE, /**< Post color matrix RGBA scale */
+ STATE_PCM_BIAS, /**< Post color matrix RGBA bias */
STATE_INTERNAL_DRIVER /* first available state index for drivers (must be last) */
} gl_state_index;
diff --git a/src/mesa/shader/prog_uniform.c b/src/mesa/shader/prog_uniform.c
new file mode 100644
index 0000000000..20e004b350
--- /dev/null
+++ b/src/mesa/shader/prog_uniform.c
@@ -0,0 +1,157 @@
+/*
+ * Mesa 3-D graphics library
+ * Version: 7.1
+ *
+ * Copyright (C) 1999-2008 Brian Paul 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, 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
+ * BRIAN PAUL 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 prog_uniform.c
+ * Shader uniform functions.
+ * \author Brian Paul
+ */
+
+#include "main/imports.h"
+#include "main/mtypes.h"
+#include "prog_uniform.h"
+
+
+struct gl_uniform_list *
+_mesa_new_uniform_list(void)
+{
+ return CALLOC_STRUCT(gl_uniform_list);
+}
+
+
+void
+_mesa_free_uniform_list(struct gl_uniform_list *list)
+{
+ GLuint i;
+ for (i = 0; i < list->NumUniforms; i++) {
+ _mesa_free((void *) list->Uniforms[i].Name);
+ }
+ _mesa_free(list->Uniforms);
+ _mesa_free(list);
+}
+
+
+GLboolean
+_mesa_append_uniform(struct gl_uniform_list *list,
+ const char *name, GLenum target, GLuint progPos)
+{
+ const GLuint oldNum = list->NumUniforms;
+ GLint index;
+
+ assert(target == GL_VERTEX_PROGRAM_ARB ||
+ target == GL_FRAGMENT_PROGRAM_ARB);
+
+ index = _mesa_lookup_uniform(list, name);
+ if (index < 0) {
+ /* not found - append to list */
+
+ if (oldNum + 1 > list->Size) {
+ /* Need to grow the list array (alloc some extra) */
+ list->Size += 4;
+
+ /* realloc arrays */
+ list->Uniforms = (struct gl_uniform *)
+ _mesa_realloc(list->Uniforms,
+ oldNum * sizeof(struct gl_uniform),
+ list->Size * sizeof(struct gl_uniform));
+ }
+
+ if (!list->Uniforms) {
+ /* out of memory */
+ list->NumUniforms = 0;
+ list->Size = 0;
+ return GL_FALSE;
+ }
+
+ list->Uniforms[oldNum].Name = _mesa_strdup(name);
+ list->Uniforms[oldNum].VertPos = -1;
+ list->Uniforms[oldNum].FragPos = -1;
+ index = oldNum;
+ list->NumUniforms++;
+ }
+
+ /* update position for the vertex or fragment program */
+ if (target == GL_VERTEX_PROGRAM_ARB) {
+ if (list->Uniforms[index].VertPos != -1) {
+ /* this uniform is already in the list - that shouldn't happen */
+ return GL_FALSE;
+ }
+ list->Uniforms[index].VertPos = progPos;
+ }
+ else {
+ if (list->Uniforms[index].FragPos != -1) {
+ /* this uniform is already in the list - that shouldn't happen */
+ return GL_FALSE;
+ }
+ list->Uniforms[index].FragPos = progPos;
+ }
+
+ return GL_TRUE;
+}
+
+
+/**
+ * Return the location/index of the named uniform in the uniform list,
+ * or -1 if not found.
+ */
+GLint
+_mesa_lookup_uniform(const struct gl_uniform_list *list, const char *name)
+{
+ GLuint i;
+ for (i = 0; i < list->NumUniforms; i++) {
+ if (!_mesa_strcmp(list->Uniforms[i].Name, name)) {
+ return i;
+ }
+ }
+ return -1;
+}
+
+
+GLint
+_mesa_longest_uniform_name(const struct gl_uniform_list *list)
+{
+ GLint max = 0;
+ GLuint i;
+ for (i = 0; i < list->NumUniforms; i++) {
+ GLuint len = _mesa_strlen(list->Uniforms[i].Name);
+ if (len > max)
+ max = len;
+ }
+ return max;
+}
+
+
+void
+_mesa_print_uniforms(const struct gl_uniform_list *list)
+{
+ GLuint i;
+ printf("Uniform list %p:\n", (void *) list);
+ for (i = 0; i < list->NumUniforms; i++) {
+ printf("%d: %s %d %d\n",
+ i,
+ list->Uniforms[i].Name,
+ list->Uniforms[i].VertPos,
+ list->Uniforms[i].FragPos);
+ }
+}
diff --git a/src/mesa/shader/prog_uniform.h b/src/mesa/shader/prog_uniform.h
new file mode 100644
index 0000000000..735de28705
--- /dev/null
+++ b/src/mesa/shader/prog_uniform.h
@@ -0,0 +1,91 @@
+/*
+ * Mesa 3-D graphics library
+ * Version: 7.1
+ *
+ * Copyright (C) 1999-2008 Brian Paul 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, 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
+ * BRIAN PAUL 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 prog_uniform.c
+ * Shader uniform functions.
+ * \author Brian Paul
+ */
+
+#ifndef PROG_UNIFORM_H
+#define PROG_UNIFORM_H
+
+#include "main/mtypes.h"
+#include "prog_statevars.h"
+
+
+/**
+ * Shader program uniform variable.
+ * The glGetUniformLocation() and glUniform() commands will use this
+ * information.
+ * Note that a uniform such as "binormal" might be used in both the
+ * vertex shader and the fragment shader. When glUniform() is called to
+ * set the uniform's value, it must be updated in both the vertex and
+ * fragment shaders. The uniform may be in different locations in the
+ * two shaders so we keep track of that here.
+ */
+struct gl_uniform
+{
+ const char *Name; /**< Null-terminated string */
+ GLint VertPos;
+ GLint FragPos;
+#if 0
+ GLenum DataType; /**< GL_FLOAT, GL_FLOAT_VEC2, etc */
+ GLuint Size; /**< Number of components (1..4) */
+#endif
+};
+
+
+/**
+ * List of gl_uniforms
+ */
+struct gl_uniform_list
+{
+ GLuint Size; /**< allocated size of Uniforms array */
+ GLuint NumUniforms; /**< number of uniforms in the array */
+ struct gl_uniform *Uniforms; /**< Array [Size] */
+};
+
+
+extern struct gl_uniform_list *
+_mesa_new_uniform_list(void);
+
+extern void
+_mesa_free_uniform_list(struct gl_uniform_list *list);
+
+extern GLboolean
+_mesa_append_uniform(struct gl_uniform_list *list,
+ const char *name, GLenum target, GLuint progPos);
+
+extern GLint
+_mesa_lookup_uniform(const struct gl_uniform_list *list, const char *name);
+
+extern GLint
+_mesa_longest_uniform_name(const struct gl_uniform_list *list);
+
+extern void
+_mesa_print_uniforms(const struct gl_uniform_list *list);
+
+
+#endif /* PROG_UNIFORM_H */
diff --git a/src/mesa/shader/program.c b/src/mesa/shader/program.c
index c539b52720..7048770cf7 100644
--- a/src/mesa/shader/program.c
+++ b/src/mesa/shader/program.c
@@ -59,9 +59,9 @@ _mesa_init_program(GLcontext *ctx)
ctx->VertexProgram.Enabled = GL_FALSE;
ctx->VertexProgram.PointSizeEnabled = GL_FALSE;
ctx->VertexProgram.TwoSideEnabled = GL_FALSE;
- ctx->VertexProgram.Current = (struct gl_vertex_program *) ctx->Shared->DefaultVertexProgram;
+ _mesa_reference_vertprog(ctx, &ctx->VertexProgram.Current,
+ ctx->Shared->DefaultVertexProgram);
assert(ctx->VertexProgram.Current);
- ctx->VertexProgram.Current->Base.RefCount++;
for (i = 0; i < MAX_NV_VERTEX_PROGRAM_PARAMS / 4; i++) {
ctx->VertexProgram.TrackMatrix[i] = GL_NONE;
ctx->VertexProgram.TrackMatrixTransform[i] = GL_IDENTITY_NV;
@@ -70,9 +70,9 @@ _mesa_init_program(GLcontext *ctx)
#if FEATURE_NV_fragment_program || FEATURE_ARB_fragment_program
ctx->FragmentProgram.Enabled = GL_FALSE;
- ctx->FragmentProgram.Current = (struct gl_fragment_program *) ctx->Shared->DefaultFragmentProgram;
+ _mesa_reference_fragprog(ctx, &ctx->FragmentProgram.Current,
+ ctx->Shared->DefaultFragmentProgram);
assert(ctx->FragmentProgram.Current);
- ctx->FragmentProgram.Current->Base.RefCount++;
#endif
/* XXX probably move this stuff */
@@ -92,18 +92,10 @@ void
_mesa_free_program_data(GLcontext *ctx)
{
#if FEATURE_NV_vertex_program || FEATURE_ARB_vertex_program
- if (ctx->VertexProgram.Current) {
- ctx->VertexProgram.Current->Base.RefCount--;
- if (ctx->VertexProgram.Current->Base.RefCount <= 0)
- ctx->Driver.DeleteProgram(ctx, &(ctx->VertexProgram.Current->Base));
- }
+ _mesa_reference_vertprog(ctx, &ctx->VertexProgram.Current, NULL);
#endif
#if FEATURE_NV_fragment_program || FEATURE_ARB_fragment_program
- if (ctx->FragmentProgram.Current) {
- ctx->FragmentProgram.Current->Base.RefCount--;
- if (ctx->FragmentProgram.Current->Base.RefCount <= 0)
- ctx->Driver.DeleteProgram(ctx, &(ctx->FragmentProgram.Current->Base));
- }
+ _mesa_reference_fragprog(ctx, &ctx->FragmentProgram.Current, NULL);
#endif
/* XXX probably move this stuff */
#if FEATURE_ATI_fragment_shader
@@ -127,25 +119,17 @@ void
_mesa_update_default_objects_program(GLcontext *ctx)
{
#if FEATURE_NV_vertex_program || FEATURE_ARB_vertex_program
- if (ctx->VertexProgram.Current) {
- ctx->VertexProgram.Current->Base.RefCount--;
- if (ctx->VertexProgram.Current->Base.RefCount <= 0)
- ctx->Driver.DeleteProgram(ctx, &(ctx->VertexProgram.Current->Base));
- }
- ctx->VertexProgram.Current = (struct gl_vertex_program *) ctx->Shared->DefaultVertexProgram;
+ _mesa_reference_vertprog(ctx, &ctx->VertexProgram.Current,
+ (struct gl_vertex_program *)
+ ctx->Shared->DefaultVertexProgram);
assert(ctx->VertexProgram.Current);
- ctx->VertexProgram.Current->Base.RefCount++;
#endif
#if FEATURE_NV_fragment_program || FEATURE_ARB_fragment_program
- if (ctx->FragmentProgram.Current) {
- ctx->FragmentProgram.Current->Base.RefCount--;
- if (ctx->FragmentProgram.Current->Base.RefCount <= 0)
- ctx->Driver.DeleteProgram(ctx, &(ctx->FragmentProgram.Current->Base));
- }
- ctx->FragmentProgram.Current = (struct gl_fragment_program *) ctx->Shared->DefaultFragmentProgram;
+ _mesa_reference_fragprog(ctx, &ctx->FragmentProgram.Current,
+ (struct gl_fragment_program *)
+ ctx->Shared->DefaultFragmentProgram);
assert(ctx->FragmentProgram.Current);
- ctx->FragmentProgram.Current->Base.RefCount++;
#endif
/* XXX probably move this stuff */
@@ -230,11 +214,17 @@ _mesa_init_program_struct( GLcontext *ctx, struct gl_program *prog,
{
(void) ctx;
if (prog) {
+ GLuint i;
+ _mesa_bzero(prog, sizeof(*prog));
prog->Id = id;
prog->Target = target;
prog->Resident = GL_TRUE;
prog->RefCount = 1;
prog->Format = GL_PROGRAM_FORMAT_ASCII_ARB;
+
+ /* default mapping from samplers to texture units */
+ for (i = 0; i < MAX_SAMPLERS; i++)
+ prog->SamplerUnits[i] = i;
}
return prog;
@@ -284,19 +274,23 @@ _mesa_init_vertex_program( GLcontext *ctx, struct gl_vertex_program *prog,
struct gl_program *
_mesa_new_program(GLcontext *ctx, GLenum target, GLuint id)
{
+ struct gl_program *prog;
switch (target) {
case GL_VERTEX_PROGRAM_ARB: /* == GL_VERTEX_PROGRAM_NV */
- return _mesa_init_vertex_program(ctx, CALLOC_STRUCT(gl_vertex_program),
+ prog = _mesa_init_vertex_program(ctx, CALLOC_STRUCT(gl_vertex_program),
target, id );
+ break;
case GL_FRAGMENT_PROGRAM_NV:
case GL_FRAGMENT_PROGRAM_ARB:
- return _mesa_init_fragment_program(ctx,
+ prog =_mesa_init_fragment_program(ctx,
CALLOC_STRUCT(gl_fragment_program),
target, id );
+ break;
default:
_mesa_problem(ctx, "bad target in _mesa_new_program");
- return NULL;
+ prog = NULL;
}
+ return prog;
}
@@ -311,6 +305,7 @@ _mesa_delete_program(GLcontext *ctx, struct gl_program *prog)
{
(void) ctx;
ASSERT(prog);
+ ASSERT(prog->RefCount==0);
if (prog == &_mesa_DummyProgram)
return;
@@ -318,16 +313,7 @@ _mesa_delete_program(GLcontext *ctx, struct gl_program *prog)
if (prog->String)
_mesa_free(prog->String);
- if (prog->Instructions) {
- GLuint i;
- for (i = 0; i < prog->NumInstructions; i++) {
- if (prog->Instructions[i].Data)
- _mesa_free(prog->Instructions[i].Data);
- if (prog->Instructions[i].Comment)
- _mesa_free((char *) prog->Instructions[i].Comment);
- }
- _mesa_free(prog->Instructions);
- }
+ _mesa_free_instructions(prog->Instructions, prog->NumInstructions);
if (prog->Parameters) {
_mesa_free_parameter_list(prog->Parameters);
@@ -366,6 +352,63 @@ _mesa_lookup_program(GLcontext *ctx, GLuint id)
/**
+ * Reference counting for vertex/fragment programs
+ */
+void
+_mesa_reference_program(GLcontext *ctx,
+ struct gl_program **ptr,
+ struct gl_program *prog)
+{
+ assert(ptr);
+ if (*ptr && prog) {
+ /* sanity check */
+ ASSERT((*ptr)->Target == prog->Target);
+ }
+ if (*ptr == prog) {
+ return; /* no change */
+ }
+ if (*ptr) {
+ GLboolean deleteFlag;
+
+ /*_glthread_LOCK_MUTEX((*ptr)->Mutex);*/
+#if 0
+ printf("Program %p ID=%u Target=%s Refcount-- to %d\n",
+ *ptr, (*ptr)->Id,
+ ((*ptr)->Target == GL_VERTEX_PROGRAM_ARB ? "VP" : "FP"),
+ (*ptr)->RefCount - 1);
+#endif
+ ASSERT((*ptr)->RefCount > 0);
+ (*ptr)->RefCount--;
+
+ deleteFlag = ((*ptr)->RefCount == 0);
+ /*_glthread_UNLOCK_MUTEX((*ptr)->Mutex);*/
+
+ if (deleteFlag) {
+ ASSERT(ctx);
+ ctx->Driver.DeleteProgram(ctx, *ptr);
+ }
+
+ *ptr = NULL;
+ }
+
+ assert(!*ptr);
+ if (prog) {
+ /*_glthread_LOCK_MUTEX(prog->Mutex);*/
+ prog->RefCount++;
+#if 0
+ printf("Program %p ID=%u Target=%s Refcount++ to %d\n",
+ prog, prog->Id,
+ (prog->Target == GL_VERTEX_PROGRAM_ARB ? "VP" : "FP"),
+ prog->RefCount);
+#endif
+ /*_glthread_UNLOCK_MUTEX(prog->Mutex);*/
+ }
+
+ *ptr = prog;
+}
+
+
+/**
* Return a copy of a program.
* XXX Problem here if the program object is actually OO-derivation
* made by a device driver.
@@ -380,18 +423,20 @@ _mesa_clone_program(GLcontext *ctx, const struct gl_program *prog)
return NULL;
assert(clone->Target == prog->Target);
+ assert(clone->RefCount == 1);
+
clone->String = (GLubyte *) _mesa_strdup((char *) prog->String);
- clone->RefCount = 1;
clone->Format = prog->Format;
clone->Instructions = _mesa_alloc_instructions(prog->NumInstructions);
if (!clone->Instructions) {
- ctx->Driver.DeleteProgram(ctx, clone);
+ _mesa_reference_program(ctx, &clone, NULL);
return NULL;
}
_mesa_copy_instructions(clone->Instructions, prog->Instructions,
prog->NumInstructions);
clone->InputsRead = prog->InputsRead;
clone->OutputsWritten = prog->OutputsWritten;
+ clone->SamplersUsed = prog->SamplersUsed;
memcpy(clone->TexturesUsed, prog->TexturesUsed, sizeof(prog->TexturesUsed));
if (prog->Parameters)
@@ -445,6 +490,236 @@ _mesa_clone_program(GLcontext *ctx, const struct gl_program *prog)
}
+/**
+ * Insert 'count' NOP instructions at 'start' in the given program.
+ * Adjust branch targets accordingly.
+ */
+GLboolean
+_mesa_insert_instructions(struct gl_program *prog, GLuint start, GLuint count)
+{
+ const GLuint origLen = prog->NumInstructions;
+ const GLuint newLen = origLen + count;
+ struct prog_instruction *newInst;
+ GLuint i;
+
+ /* adjust branches */
+ for (i = 0; i < prog->NumInstructions; i++) {
+ struct prog_instruction *inst = prog->Instructions + i;
+ if (inst->BranchTarget > 0) {
+ if (inst->BranchTarget >= start) {
+ inst->BranchTarget += count;
+ }
+ }
+ }
+
+ /* Alloc storage for new instructions */
+ newInst = _mesa_alloc_instructions(newLen);
+ if (!newInst) {
+ return GL_FALSE;
+ }
+
+ /* Copy 'start' instructions into new instruction buffer */
+ _mesa_copy_instructions(newInst, prog->Instructions, start);
+
+ /* init the new instructions */
+ _mesa_init_instructions(newInst + start, count);
+
+ /* Copy the remaining/tail instructions to new inst buffer */
+ _mesa_copy_instructions(newInst + start + count,
+ prog->Instructions + start,
+ origLen - start);
+
+ /* free old instructions */
+ _mesa_free_instructions(prog->Instructions, origLen);
+
+ /* install new instructions */
+ prog->Instructions = newInst;
+ prog->NumInstructions = newLen;
+
+ return GL_TRUE;
+}
+
+
+/**
+ * Search instructions for registers that match (oldFile, oldIndex),
+ * replacing them with (newFile, newIndex).
+ */
+static void
+replace_registers(struct prog_instruction *inst, GLuint numInst,
+ GLuint oldFile, GLuint oldIndex,
+ GLuint newFile, GLuint newIndex)
+{
+ GLuint i, j;
+ for (i = 0; i < numInst; i++) {
+ /* src regs */
+ for (j = 0; j < _mesa_num_inst_src_regs(inst->Opcode); j++) {
+ if (inst[i].SrcReg[j].File == oldFile &&
+ inst[i].SrcReg[j].Index == oldIndex) {
+ inst[i].SrcReg[j].File = newFile;
+ inst[i].SrcReg[j].Index = newIndex;
+ }
+ }
+ /* dst reg */
+ if (inst[i].DstReg.File == oldFile && inst[i].DstReg.Index == oldIndex) {
+ inst[i].DstReg.File = newFile;
+ inst[i].DstReg.Index = newIndex;
+ }
+ }
+}
+
+
+/**
+ * Search instructions for references to program parameters. When found,
+ * increment the parameter index by 'offset'.
+ * Used when combining programs.
+ */
+static void
+adjust_param_indexes(struct prog_instruction *inst, GLuint numInst,
+ GLuint offset)
+{
+ GLuint i, j;
+ for (i = 0; i < numInst; i++) {
+ for (j = 0; j < _mesa_num_inst_src_regs(inst->Opcode); j++) {
+ GLuint f = inst[i].SrcReg[j].File;
+ if (f == PROGRAM_CONSTANT ||
+ f == PROGRAM_UNIFORM ||
+ f == PROGRAM_STATE_VAR) {
+ inst[i].SrcReg[j].Index += offset;
+ }
+ }
+ }
+}
+
+
+/**
+ * Combine two programs into one. Fix instructions so the outputs of
+ * the first program go to the inputs of the second program.
+ */
+struct gl_program *
+_mesa_combine_programs(GLcontext *ctx,
+ const struct gl_program *progA,
+ const struct gl_program *progB)
+{
+ struct prog_instruction *newInst;
+ struct gl_program *newProg;
+ const GLuint lenA = progA->NumInstructions - 1; /* omit END instr */
+ const GLuint lenB = progB->NumInstructions;
+ const GLuint numParamsA = _mesa_num_parameters(progA->Parameters);
+ const GLuint newLength = lenA + lenB;
+ GLbitfield inputsB;
+ GLuint i;
+
+ ASSERT(progA->Target == progB->Target);
+
+ newInst = _mesa_alloc_instructions(newLength);
+ if (!newInst)
+ return GL_FALSE;
+
+ _mesa_copy_instructions(newInst, progA->Instructions, lenA);
+ _mesa_copy_instructions(newInst + lenA, progB->Instructions, lenB);
+
+ /* adjust branch / instruction addresses for B's instructions */
+ for (i = 0; i < lenB; i++) {
+ newInst[lenA + i].BranchTarget += lenA;
+ }
+
+ newProg = ctx->Driver.NewProgram(ctx, progA->Target, 0);
+ newProg->Instructions = newInst;
+ newProg->NumInstructions = newLength;
+
+ if (newProg->Target == GL_FRAGMENT_PROGRAM_ARB) {
+ struct gl_fragment_program *fprogA, *fprogB, *newFprog;
+ fprogA = (struct gl_fragment_program *) progA;
+ fprogB = (struct gl_fragment_program *) progB;
+ newFprog = (struct gl_fragment_program *) newProg;
+
+ newFprog->UsesKill = fprogA->UsesKill || fprogB->UsesKill;
+
+ /* Connect color outputs of fprogA to color inputs of fprogB, via a
+ * new temporary register.
+ */
+ if ((progA->OutputsWritten & (1 << FRAG_RESULT_COLR)) &&
+ (progB->InputsRead & (1 << FRAG_ATTRIB_COL0))) {
+ GLint tempReg = _mesa_find_free_register(newProg, PROGRAM_TEMPORARY);
+ if (tempReg < 0) {
+ _mesa_problem(ctx, "No free temp regs found in "
+ "_mesa_combine_programs(), using 31");
+ tempReg = 31;
+ }
+ /* replace writes to result.color[0] with tempReg */
+ replace_registers(newInst, lenA,
+ PROGRAM_OUTPUT, FRAG_RESULT_COLR,
+ PROGRAM_TEMPORARY, tempReg);
+ /* replace reads from input.color[0] with tempReg */
+ replace_registers(newInst + lenA, lenB,
+ PROGRAM_INPUT, FRAG_ATTRIB_COL0,
+ PROGRAM_TEMPORARY, tempReg);
+ }
+
+ inputsB = progB->InputsRead;
+ if (progA->OutputsWritten & (1 << FRAG_RESULT_COLR)) {
+ inputsB &= ~(1 << FRAG_ATTRIB_COL0);
+ }
+ newProg->InputsRead = progA->InputsRead | inputsB;
+ newProg->OutputsWritten = progB->OutputsWritten;
+ newProg->SamplersUsed = progA->SamplersUsed | progB->SamplersUsed;
+ }
+ else {
+ /* vertex program */
+ assert(0); /* XXX todo */
+ }
+
+ /*
+ * Merge parameters (uniforms, constants, etc)
+ */
+ newProg->Parameters = _mesa_combine_parameter_lists(progA->Parameters,
+ progB->Parameters);
+
+ adjust_param_indexes(newInst + lenA, lenB, numParamsA);
+
+
+ return newProg;
+}
+
+
+
+
+/**
+ * Scan the given program to find a free register of the given type.
+ * \param regFile - PROGRAM_INPUT, PROGRAM_OUTPUT or PROGRAM_TEMPORARY
+ */
+GLint
+_mesa_find_free_register(const struct gl_program *prog, GLuint regFile)
+{
+ GLboolean used[MAX_PROGRAM_TEMPS];
+ GLuint i, k;
+
+ assert(regFile == PROGRAM_INPUT ||
+ regFile == PROGRAM_OUTPUT ||
+ regFile == PROGRAM_TEMPORARY);
+
+ _mesa_memset(used, 0, sizeof(used));
+
+ for (i = 0; i < prog->NumInstructions; i++) {
+ const struct prog_instruction *inst = prog->Instructions + i;
+ const GLuint n = _mesa_num_inst_src_regs(inst->Opcode);
+
+ for (k = 0; k < n; k++) {
+ if (inst->SrcReg[k].File == regFile) {
+ used[inst->SrcReg[k].Index] = GL_TRUE;
+ }
+ }
+ }
+
+ for (i = 0; i < MAX_PROGRAM_TEMPS; i++) {
+ if (!used[i])
+ return i;
+ }
+
+ return -1;
+}
+
+
/**
* Mixing ARB and NV vertex/fragment programs can be tricky.
@@ -513,9 +788,9 @@ _mesa_BindProgram(GLenum target, GLuint id)
/* Bind a default program */
newProg = NULL;
if (target == GL_VERTEX_PROGRAM_ARB) /* == GL_VERTEX_PROGRAM_NV */
- newProg = ctx->Shared->DefaultVertexProgram;
+ newProg = &ctx->Shared->DefaultVertexProgram->Base;
else
- newProg = ctx->Shared->DefaultFragmentProgram;
+ newProg = &ctx->Shared->DefaultFragmentProgram->Base;
}
else {
/* Bind a user program */
@@ -543,26 +818,16 @@ _mesa_BindProgram(GLenum target, GLuint id)
return;
}
- /* unbind/delete oldProg */
- if (curProg->Id != 0) {
- /* decrement refcount on previously bound fragment program */
- curProg->RefCount--;
- /* and delete if refcount goes below one */
- if (curProg->RefCount <= 0) {
- /* the program ID was already removed from the hash table */
- ctx->Driver.DeleteProgram(ctx, curProg);
- }
- }
-
/* bind newProg */
if (target == GL_VERTEX_PROGRAM_ARB) { /* == GL_VERTEX_PROGRAM_NV */
- ctx->VertexProgram.Current = (struct gl_vertex_program *) newProg;
+ _mesa_reference_vertprog(ctx, &ctx->VertexProgram.Current,
+ (struct gl_vertex_program *) newProg);
}
else if (target == GL_FRAGMENT_PROGRAM_NV ||
target == GL_FRAGMENT_PROGRAM_ARB) {
- ctx->FragmentProgram.Current = (struct gl_fragment_program *) newProg;
+ _mesa_reference_fragprog(ctx, &ctx->FragmentProgram.Current,
+ (struct gl_fragment_program *) newProg);
}
- newProg->RefCount++;
/* Never null pointers */
ASSERT(ctx->VertexProgram.Current);
@@ -620,10 +885,7 @@ _mesa_DeletePrograms(GLsizei n, const GLuint *ids)
}
/* The ID is immediately available for re-use now */
_mesa_HashRemove(ctx->Shared->Programs, ids[i]);
- prog->RefCount--;
- if (prog->RefCount <= 0) {
- ctx->Driver.DeleteProgram(ctx, prog);
- }
+ _mesa_reference_program(ctx, &prog, NULL);
}
}
}
diff --git a/src/mesa/shader/program.h b/src/mesa/shader/program.h
index ea2c8c3050..f1a69a2c01 100644
--- a/src/mesa/shader/program.h
+++ b/src/mesa/shader/program.h
@@ -86,10 +86,43 @@ _mesa_delete_program(GLcontext *ctx, struct gl_program *prog);
extern struct gl_program *
_mesa_lookup_program(GLcontext *ctx, GLuint id);
+extern void
+_mesa_reference_program(GLcontext *ctx,
+ struct gl_program **ptr,
+ struct gl_program *prog);
+
+static INLINE void
+_mesa_reference_vertprog(GLcontext *ctx,
+ struct gl_vertex_program **ptr,
+ struct gl_vertex_program *prog)
+{
+ _mesa_reference_program(ctx, (struct gl_program **) ptr,
+ (struct gl_program *) prog);
+}
+
+static INLINE void
+_mesa_reference_fragprog(GLcontext *ctx,
+ struct gl_fragment_program **ptr,
+ struct gl_fragment_program *prog)
+{
+ _mesa_reference_program(ctx, (struct gl_program **) ptr,
+ (struct gl_program *) prog);
+}
extern struct gl_program *
_mesa_clone_program(GLcontext *ctx, const struct gl_program *prog);
+extern GLboolean
+_mesa_insert_instructions(struct gl_program *prog, GLuint start, GLuint count);
+
+extern struct gl_program *
+_mesa_combine_programs(GLcontext *ctx,
+ const struct gl_program *progA,
+ const struct gl_program *progB);
+
+extern GLint
+_mesa_find_free_register(const struct gl_program *prog, GLuint regFile);
+
/*
* API functions common to ARB/NV_vertex/fragment_program
diff --git a/src/mesa/shader/programopt.c b/src/mesa/shader/programopt.c
index fc5b0497fe..7d560c74a5 100644
--- a/src/mesa/shader/programopt.c
+++ b/src/mesa/shader/programopt.c
@@ -35,6 +35,7 @@
#include "context.h"
#include "prog_parameter.h"
#include "prog_statevars.h"
+#include "program.h"
#include "programopt.h"
#include "prog_instruction.h"
@@ -102,7 +103,7 @@ _mesa_insert_mvp_code(GLcontext *ctx, struct gl_vertex_program *vprog)
_mesa_copy_instructions (newInst + 4, vprog->Base.Instructions, origLen);
/* free old instructions */
- _mesa_free(vprog->Base.Instructions);
+ _mesa_free_instructions(vprog->Base.Instructions, origLen);
/* install new instructions */
vprog->Base.Instructions = newInst;
@@ -192,13 +193,13 @@ _mesa_append_fog_code(GLcontext *ctx, struct gl_fragment_program *fprog)
inst->DstReg.WriteMask = WRITEMASK_X;
inst->SrcReg[0].File = PROGRAM_INPUT;
inst->SrcReg[0].Index = FRAG_ATTRIB_FOGC;
- inst->SrcReg[0].Swizzle = SWIZZLE_X;
+ inst->SrcReg[0].Swizzle = SWIZZLE_XXXX;
inst->SrcReg[1].File = PROGRAM_STATE_VAR;
inst->SrcReg[1].Index = fogPRefOpt;
- inst->SrcReg[1].Swizzle = SWIZZLE_X;
+ inst->SrcReg[1].Swizzle = SWIZZLE_XXXX;
inst->SrcReg[2].File = PROGRAM_STATE_VAR;
inst->SrcReg[2].Index = fogPRefOpt;
- inst->SrcReg[2].Swizzle = SWIZZLE_Y;
+ inst->SrcReg[2].Swizzle = SWIZZLE_YYYY;
inst->SaturateMode = SATURATE_ZERO_ONE;
inst++;
}
@@ -214,10 +215,10 @@ _mesa_append_fog_code(GLcontext *ctx, struct gl_fragment_program *fprog)
inst->SrcReg[0].File = PROGRAM_STATE_VAR;
inst->SrcReg[0].Index = fogPRefOpt;
inst->SrcReg[0].Swizzle
- = (fprog->FogOption == GL_EXP) ? SWIZZLE_Z : SWIZZLE_W;
+ = (fprog->FogOption == GL_EXP) ? SWIZZLE_ZZZZ : SWIZZLE_WWWW;
inst->SrcReg[1].File = PROGRAM_INPUT;
inst->SrcReg[1].Index = FRAG_ATTRIB_FOGC;
- inst->SrcReg[1].Swizzle = SWIZZLE_X;
+ inst->SrcReg[1].Swizzle = SWIZZLE_XXXX;
inst++;
if (fprog->FogOption == GL_EXP2) {
/* MUL fogFactorTemp.x, fogFactorTemp.x, fogFactorTemp.x; */
@@ -227,10 +228,10 @@ _mesa_append_fog_code(GLcontext *ctx, struct gl_fragment_program *fprog)
inst->DstReg.WriteMask = WRITEMASK_X;
inst->SrcReg[0].File = PROGRAM_TEMPORARY;
inst->SrcReg[0].Index = fogFactorTemp;
- inst->SrcReg[0].Swizzle = SWIZZLE_X;
+ inst->SrcReg[0].Swizzle = SWIZZLE_XXXX;
inst->SrcReg[1].File = PROGRAM_TEMPORARY;
inst->SrcReg[1].Index = fogFactorTemp;
- inst->SrcReg[1].Swizzle = SWIZZLE_X;
+ inst->SrcReg[1].Swizzle = SWIZZLE_XXXX;
inst++;
}
/* EX2_SAT fogFactorTemp.x, -fogFactorTemp.x; */
@@ -240,8 +241,8 @@ _mesa_append_fog_code(GLcontext *ctx, struct gl_fragment_program *fprog)
inst->DstReg.WriteMask = WRITEMASK_X;
inst->SrcReg[0].File = PROGRAM_TEMPORARY;
inst->SrcReg[0].Index = fogFactorTemp;
- inst->SrcReg[0].NegateBase = GL_TRUE;
- inst->SrcReg[0].Swizzle = SWIZZLE_X;
+ inst->SrcReg[0].NegateBase = NEGATE_XYZW;
+ inst->SrcReg[0].Swizzle = SWIZZLE_XXXX;
inst->SaturateMode = SATURATE_ZERO_ONE;
inst++;
}
@@ -252,8 +253,7 @@ _mesa_append_fog_code(GLcontext *ctx, struct gl_fragment_program *fprog)
inst->DstReg.WriteMask = WRITEMASK_XYZ;
inst->SrcReg[0].File = PROGRAM_TEMPORARY;
inst->SrcReg[0].Index = fogFactorTemp;
- inst->SrcReg[0].Swizzle
- = MAKE_SWIZZLE4(SWIZZLE_X, SWIZZLE_X, SWIZZLE_X, SWIZZLE_X);
+ inst->SrcReg[0].Swizzle = SWIZZLE_XXXX;
inst->SrcReg[1].File = PROGRAM_TEMPORARY;
inst->SrcReg[1].Index = colorTemp;
inst->SrcReg[1].Swizzle = SWIZZLE_NOOP;
@@ -275,7 +275,7 @@ _mesa_append_fog_code(GLcontext *ctx, struct gl_fragment_program *fprog)
inst++;
/* free old instructions */
- _mesa_free(fprog->Base.Instructions);
+ _mesa_free_instructions(fprog->Base.Instructions, origLen);
/* install new instructions */
fprog->Base.Instructions = newInst;
@@ -365,3 +365,94 @@ _mesa_count_texture_instructions(struct gl_program *prog)
}
}
+
+/**
+ * Scan/rewrite program to remove reads of varying (output) registers.
+ * In GLSL vertex shaders, varying vars can be read and written.
+ * Normally, vertex varying vars are implemented as output registers.
+ * On some hardware, trying to read an output register causes trouble.
+ * So, rewrite the program to use a temporary register in this case.
+ */
+void
+_mesa_remove_varying_reads(struct gl_program *prog)
+{
+ GLuint i;
+ GLint outputMap[VERT_RESULT_MAX];
+ GLuint numVaryingReads = 0;
+
+ assert(prog->Target == GL_VERTEX_PROGRAM_ARB);
+
+ for (i = 0; i < VERT_RESULT_MAX; i++)
+ outputMap[i] = -1;
+
+ /* look for instructions which read from varying vars */
+ for (i = 0; i < prog->NumInstructions; i++) {
+ struct prog_instruction *inst = prog->Instructions + i;
+ const GLuint numSrc = _mesa_num_inst_src_regs(inst->Opcode);
+ GLuint j;
+ for (j = 0; j < numSrc; j++) {
+ if (inst->SrcReg[j].File == PROGRAM_VARYING) {
+ /* replace the read with a temp reg */
+ const GLuint var = inst->SrcReg[j].Index;
+ if (outputMap[var] == -1) {
+ numVaryingReads++;
+ outputMap[var] = _mesa_find_free_register(prog,
+ PROGRAM_TEMPORARY);
+ }
+ inst->SrcReg[j].File = PROGRAM_TEMPORARY;
+ inst->SrcReg[j].Index = outputMap[var];
+ }
+ }
+ }
+
+ if (numVaryingReads == 0)
+ return; /* nothing to be done */
+
+ /* look for instructions which write to the varying vars identified above */
+ for (i = 0; i < prog->NumInstructions; i++) {
+ struct prog_instruction *inst = prog->Instructions + i;
+ const GLuint numSrc = _mesa_num_inst_src_regs(inst->Opcode);
+ GLuint j;
+ for (j = 0; j < numSrc; j++) {
+ if (inst->DstReg.File == PROGRAM_VARYING &&
+ outputMap[inst->DstReg.Index] >= 0) {
+ /* change inst to write to the temp reg, instead of the varying */
+ inst->DstReg.File = PROGRAM_TEMPORARY;
+ inst->DstReg.Index = outputMap[inst->DstReg.Index];
+ }
+ }
+ }
+
+ /* insert new instructions to copy the temp vars to the varying vars */
+ {
+ struct prog_instruction *inst;
+ GLint endPos, var;
+
+ /* Look for END instruction and insert the new varying writes */
+ endPos = -1;
+ for (i = 0; i < prog->NumInstructions; i++) {
+ struct prog_instruction *inst = prog->Instructions + i;
+ if (inst->Opcode == OPCODE_END) {
+ endPos = i;
+ _mesa_insert_instructions(prog, i, numVaryingReads);
+ break;
+ }
+ }
+
+ assert(endPos >= 0);
+
+ /* insert new MOV instructions here */
+ inst = prog->Instructions + endPos;
+ for (var = 0; var < VERT_RESULT_MAX; var++) {
+ if (outputMap[var] >= 0) {
+ /* MOV VAR[var], TEMP[tmp]; */
+ inst->Opcode = OPCODE_MOV;
+ inst->DstReg.File = PROGRAM_VARYING;
+ inst->DstReg.Index = var;
+ inst->SrcReg[0].File = PROGRAM_TEMPORARY;
+ inst->SrcReg[0].Index = outputMap[var];
+ inst++;
+ }
+ }
+ }
+}
diff --git a/src/mesa/shader/programopt.h b/src/mesa/shader/programopt.h
index ce63644bbf..47ff2f0c7b 100644
--- a/src/mesa/shader/programopt.h
+++ b/src/mesa/shader/programopt.h
@@ -39,5 +39,7 @@ _mesa_count_texture_indirections(struct gl_program *prog);
extern void
_mesa_count_texture_instructions(struct gl_program *prog);
+extern void
+_mesa_remove_varying_reads(struct gl_program *prog);
#endif /* PROGRAMOPT_H */
diff --git a/src/mesa/shader/shader_api.c b/src/mesa/shader/shader_api.c
index b0f79c29c1..0bb96a0d6c 100644
--- a/src/mesa/shader/shader_api.c
+++ b/src/mesa/shader/shader_api.c
@@ -43,6 +43,7 @@
#include "prog_parameter.h"
#include "prog_print.h"
#include "prog_statevars.h"
+#include "prog_uniform.h"
#include "shader/shader_api.h"
#include "shader/slang/slang_compile.h"
#include "shader/slang/slang_link.h"
@@ -52,7 +53,7 @@
/**
* Allocate a new gl_shader_program object, initialize it.
*/
-struct gl_shader_program *
+static struct gl_shader_program *
_mesa_new_shader_program(GLcontext *ctx, GLuint name)
{
struct gl_shader_program *shProg;
@@ -74,26 +75,11 @@ void
_mesa_clear_shader_program_data(GLcontext *ctx,
struct gl_shader_program *shProg)
{
- if (shProg->VertexProgram) {
- if (shProg->VertexProgram->Base.Parameters == shProg->Uniforms) {
- /* to prevent a double-free in the next call */
- shProg->VertexProgram->Base.Parameters = NULL;
- }
- ctx->Driver.DeleteProgram(ctx, &shProg->VertexProgram->Base);
- shProg->VertexProgram = NULL;
- }
-
- if (shProg->FragmentProgram) {
- if (shProg->FragmentProgram->Base.Parameters == shProg->Uniforms) {
- /* to prevent a double-free in the next call */
- shProg->FragmentProgram->Base.Parameters = NULL;
- }
- ctx->Driver.DeleteProgram(ctx, &shProg->FragmentProgram->Base);
- shProg->FragmentProgram = NULL;
- }
+ _mesa_reference_vertprog(ctx, &shProg->VertexProgram, NULL);
+ _mesa_reference_fragprog(ctx, &shProg->FragmentProgram, NULL);
if (shProg->Uniforms) {
- _mesa_free_parameter_list(shProg->Uniforms);
+ _mesa_free_uniform_list(shProg->Uniforms);
shProg->Uniforms = NULL;
}
@@ -177,8 +163,10 @@ _mesa_reference_shader_program(GLcontext *ctx,
ASSERT(old->RefCount > 0);
old->RefCount--;
- /*printf("SHPROG DECR %p (%d) to %d\n",
- (void*) old, old->Name, old->RefCount);*/
+#if 0
+ printf("ShaderProgram %p ID=%u RefCount-- to %d\n",
+ (void *) old, old->Name, old->RefCount);
+#endif
deleteFlag = (old->RefCount == 0);
if (deleteFlag) {
@@ -192,8 +180,10 @@ _mesa_reference_shader_program(GLcontext *ctx,
if (shProg) {
shProg->RefCount++;
- /*printf("SHPROG INCR %p (%d) to %d\n",
- (void*) shProg, shProg->Name, shProg->RefCount);*/
+#if 0
+ printf("ShaderProgram %p ID=%u RefCount++ to %d\n",
+ (void *) shProg, shProg->Name, shProg->RefCount);
+#endif
*ptr = shProg;
}
}
@@ -248,10 +238,8 @@ _mesa_free_shader(GLcontext *ctx, struct gl_shader *sh)
_mesa_free((void *) sh->Source);
if (sh->InfoLog)
_mesa_free(sh->InfoLog);
- for (i = 0; i < sh->NumPrograms; i++) {
- assert(sh->Programs[i]);
- ctx->Driver.DeleteProgram(ctx, sh->Programs[i]);
- }
+ for (i = 0; i < sh->NumPrograms; i++)
+ _mesa_reference_program(ctx, &sh->Programs[i], NULL);
if (sh->Programs)
_mesa_free(sh->Programs);
_mesa_free(sh);
@@ -373,57 +361,9 @@ copy_string(GLchar *dst, GLsizei maxLength, GLsizei *length, const GLchar *src)
/**
- * Return size (in floats) of the given GLSL type.
- * See also _slang_sizeof_type_specifier().
- */
-static GLint
-sizeof_glsl_type(GLenum type)
-{
- switch (type) {
- case GL_BOOL:
- case GL_FLOAT:
- case GL_INT:
- return 1;
- case GL_BOOL_VEC2:
- case GL_FLOAT_VEC2:
- case GL_INT_VEC2:
- return 2;
- case GL_BOOL_VEC3:
- case GL_FLOAT_VEC3:
- case GL_INT_VEC3:
- return 3;
- case GL_BOOL_VEC4:
- case GL_FLOAT_VEC4:
- case GL_INT_VEC4:
- return 4;
- case GL_FLOAT_MAT2:
- return 8; /* 2 rows of 4, actually */
- case GL_FLOAT_MAT3:
- return 12; /* 3 rows of 4, actually */
- case GL_FLOAT_MAT4:
- return 16;
- case GL_FLOAT_MAT2x3:
- return 8; /* 2 rows of 4, actually */
- case GL_FLOAT_MAT2x4:
- return 8;
- case GL_FLOAT_MAT3x2:
- return 12; /* 3 rows of 4, actually */
- case GL_FLOAT_MAT3x4:
- return 12;
- case GL_FLOAT_MAT4x2:
- return 16; /* 4 rows of 4, actually */
- case GL_FLOAT_MAT4x3:
- return 16; /* 4 rows of 4, actually */
- default:
- return 0; /* error */
- }
-}
-
-
-/**
* Called via ctx->Driver.AttachShader()
*/
-void
+static void
_mesa_attach_shader(GLcontext *ctx, GLuint program, GLuint shader)
{
struct gl_shader_program *shProg
@@ -464,7 +404,38 @@ _mesa_attach_shader(GLcontext *ctx, GLuint program, GLuint shader)
}
-void
+static GLint
+_mesa_get_attrib_location(GLcontext *ctx, GLuint program,
+ const GLchar *name)
+{
+ struct gl_shader_program *shProg
+ = _mesa_lookup_shader_program(ctx, program);
+
+ if (!shProg) {
+ _mesa_error(ctx, GL_INVALID_VALUE, "glGetAttribLocation");
+ return -1;
+ }
+
+ if (!shProg->LinkStatus) {
+ _mesa_error(ctx, GL_INVALID_OPERATION,
+ "glGetAttribLocation(program not linked)");
+ return -1;
+ }
+
+ if (!name)
+ return -1;
+
+ if (shProg->Attributes) {
+ GLint i = _mesa_lookup_parameter_index(shProg->Attributes, -1, name);
+ if (i >= 0) {
+ return shProg->Attributes->Parameters[i].StateIndexes[0];
+ }
+ }
+ return -1;
+}
+
+
+static void
_mesa_bind_attrib_location(GLcontext *ctx, GLuint program, GLuint index,
const GLchar *name)
{
@@ -510,7 +481,7 @@ _mesa_bind_attrib_location(GLcontext *ctx, GLuint program, GLuint index,
}
-GLuint
+static GLuint
_mesa_create_shader(GLcontext *ctx, GLenum type)
{
struct gl_shader *sh;
@@ -534,7 +505,7 @@ _mesa_create_shader(GLcontext *ctx, GLenum type)
}
-GLuint
+static GLuint
_mesa_create_program(GLcontext *ctx)
{
GLuint name;
@@ -555,7 +526,7 @@ _mesa_create_program(GLcontext *ctx)
* Named w/ "2" to indicate OpenGL 2.x vs GL_ARB_fragment_programs's
* DeleteProgramARB.
*/
-void
+static void
_mesa_delete_program2(GLcontext *ctx, GLuint name)
{
/*
@@ -581,7 +552,7 @@ _mesa_delete_program2(GLcontext *ctx, GLuint name)
}
-void
+static void
_mesa_delete_shader(GLcontext *ctx, GLuint shader)
{
struct gl_shader *sh = _mesa_lookup_shader(ctx, shader);
@@ -596,7 +567,7 @@ _mesa_delete_shader(GLcontext *ctx, GLuint shader)
}
-void
+static void
_mesa_detach_shader(GLcontext *ctx, GLuint program, GLuint shader)
{
struct gl_shader_program *shProg
@@ -658,7 +629,7 @@ _mesa_detach_shader(GLcontext *ctx, GLuint program, GLuint shader)
}
-void
+static void
_mesa_get_active_attrib(GLcontext *ctx, GLuint program, GLuint index,
GLsizei maxLength, GLsizei *length, GLint *size,
GLenum *type, GLchar *nameOut)
@@ -684,64 +655,64 @@ _mesa_get_active_attrib(GLcontext *ctx, GLuint program, GLuint index,
shProg->Attributes->Parameters[index].Name);
sz = shProg->Attributes->Parameters[index].Size;
if (size)
- *size = 1; /* attributes may not be arrays */
- if (type && sz > 0 && sz <= 4) /* XXX this is a temporary hack */
- *type = vec_types[sz - 1];
+ *size = sz;
+ if (type)
+ *type = vec_types[sz]; /* XXX this is a temporary hack */
}
/**
* Called via ctx->Driver.GetActiveUniform().
*/
-void
+static void
_mesa_get_active_uniform(GLcontext *ctx, GLuint program, GLuint index,
GLsizei maxLength, GLsizei *length, GLint *size,
GLenum *type, GLchar *nameOut)
{
- struct gl_shader_program *shProg
+ const struct gl_shader_program *shProg
= _mesa_lookup_shader_program(ctx, program);
- GLuint ind, j;
+ const struct gl_program *prog;
+ GLint progPos;
if (!shProg) {
_mesa_error(ctx, GL_INVALID_VALUE, "glGetActiveUniform");
return;
}
- if (!shProg->Uniforms || index >= shProg->Uniforms->NumParameters) {
+ if (!shProg->Uniforms || index >= shProg->Uniforms->NumUniforms) {
_mesa_error(ctx, GL_INVALID_VALUE, "glGetActiveUniform(index)");
return;
}
- ind = 0;
- for (j = 0; j < shProg->Uniforms->NumParameters; j++) {
- if (shProg->Uniforms->Parameters[j].Type == PROGRAM_UNIFORM ||
- shProg->Uniforms->Parameters[j].Type == PROGRAM_SAMPLER) {
- if (ind == index) {
- GLuint uSize = shProg->Uniforms->Parameters[j].Size;
- GLenum uType = shProg->Uniforms->Parameters[j].DataType;
- /* found it */
- copy_string(nameOut, maxLength, length,
- shProg->Uniforms->Parameters[j].Name);
- if (size) {
- /* convert from floats to 'type' (eg: sizeof(mat4x4)=1) */
- *size = uSize / sizeof_glsl_type(uType);
- }
- if (type)
- *type = uType;
- return;
- }
- ind++;
+ progPos = shProg->Uniforms->Uniforms[index].VertPos;
+ if (progPos >= 0) {
+ prog = &shProg->VertexProgram->Base;
+ }
+ else {
+ progPos = shProg->Uniforms->Uniforms[index].FragPos;
+ if (progPos >= 0) {
+ prog = &shProg->FragmentProgram->Base;
}
}
- _mesa_error(ctx, GL_INVALID_VALUE, "glGetActiveUniform(index)");
+ if (!prog || progPos < 0)
+ return; /* should never happen */
+
+ if (nameOut)
+ copy_string(nameOut, maxLength, length,
+ prog->Parameters->Parameters[progPos].Name);
+ if (size)
+ *size = prog->Parameters->Parameters[progPos].Size;
+
+ if (type)
+ *type = prog->Parameters->Parameters[progPos].DataType;
}
/**
* Called via ctx->Driver.GetAttachedShaders().
*/
-void
+static void
_mesa_get_attached_shaders(GLcontext *ctx, GLuint program, GLsizei maxCount,
GLsizei *count, GLuint *obj)
{
@@ -761,38 +732,7 @@ _mesa_get_attached_shaders(GLcontext *ctx, GLuint program, GLsizei maxCount,
}
-GLint
-_mesa_get_attrib_location(GLcontext *ctx, GLuint program,
- const GLchar *name)
-{
- struct gl_shader_program *shProg
- = _mesa_lookup_shader_program(ctx, program);
-
- if (!shProg) {
- _mesa_error(ctx, GL_INVALID_VALUE, "glGetAttribLocation");
- return -1;
- }
-
- if (!shProg->LinkStatus) {
- _mesa_error(ctx, GL_INVALID_OPERATION,
- "glGetAttribLocation(program not linked)");
- return -1;
- }
-
- if (!name)
- return -1;
-
- if (shProg->Attributes) {
- GLint i = _mesa_lookup_parameter_index(shProg->Attributes, -1, name);
- if (i >= 0) {
- return shProg->Attributes->Parameters[i].StateIndexes[0];
- }
- }
- return -1;
-}
-
-
-GLuint
+static GLuint
_mesa_get_handle(GLcontext *ctx, GLenum pname)
{
#if 0
@@ -816,7 +756,7 @@ _mesa_get_handle(GLcontext *ctx, GLenum pname)
}
-void
+static void
_mesa_get_programiv(GLcontext *ctx, GLuint program,
GLenum pname, GLint *params)
{
@@ -852,14 +792,10 @@ _mesa_get_programiv(GLcontext *ctx, GLuint program,
PROGRAM_INPUT) + 1;
break;
case GL_ACTIVE_UNIFORMS:
- *params
- = _mesa_num_parameters_of_type(shProg->Uniforms, PROGRAM_UNIFORM)
- + _mesa_num_parameters_of_type(shProg->Uniforms, PROGRAM_SAMPLER);
+ *params = shProg->Uniforms ? shProg->Uniforms->NumUniforms : 0;
break;
case GL_ACTIVE_UNIFORM_MAX_LENGTH:
- *params = MAX2(
- _mesa_longest_parameter_name(shProg->Uniforms, PROGRAM_UNIFORM),
- _mesa_longest_parameter_name(shProg->Uniforms, PROGRAM_SAMPLER));
+ *params = _mesa_longest_uniform_name(shProg->Uniforms);
if (*params > 0)
(*params)++; /* add one for terminating zero */
break;
@@ -870,7 +806,7 @@ _mesa_get_programiv(GLcontext *ctx, GLuint program,
}
-void
+static void
_mesa_get_shaderiv(GLcontext *ctx, GLuint name, GLenum pname, GLint *params)
{
struct gl_shader *shader = _mesa_lookup_shader(ctx, name);
@@ -903,7 +839,7 @@ _mesa_get_shaderiv(GLcontext *ctx, GLuint name, GLenum pname, GLint *params)
}
-void
+static void
_mesa_get_program_info_log(GLcontext *ctx, GLuint program, GLsizei bufSize,
GLsizei *length, GLchar *infoLog)
{
@@ -917,7 +853,7 @@ _mesa_get_program_info_log(GLcontext *ctx, GLuint program, GLsizei bufSize,
}
-void
+static void
_mesa_get_shader_info_log(GLcontext *ctx, GLuint shader, GLsizei bufSize,
GLsizei *length, GLchar *infoLog)
{
@@ -933,7 +869,7 @@ _mesa_get_shader_info_log(GLcontext *ctx, GLuint shader, GLsizei bufSize,
/**
* Called via ctx->Driver.GetShaderSource().
*/
-void
+static void
_mesa_get_shader_source(GLcontext *ctx, GLuint shader, GLsizei maxLength,
GLsizei *length, GLchar *sourceOut)
{
@@ -949,49 +885,34 @@ _mesa_get_shader_source(GLcontext *ctx, GLuint shader, GLsizei maxLength,
/**
* Called via ctx->Driver.GetUniformfv().
*/
-void
+static void
_mesa_get_uniformfv(GLcontext *ctx, GLuint program, GLint location,
GLfloat *params)
{
struct gl_shader_program *shProg
= _mesa_lookup_shader_program(ctx, program);
if (shProg) {
- GLint i;
- if (location >= 0 && location < shProg->Uniforms->NumParameters) {
- GLuint uSize;
- GLenum uType;
- GLint rows = 0;
- uType = shProg->Uniforms->Parameters[location].DataType;
- uSize = sizeof_glsl_type(uType);
- /* Matrix types need special handling, because they span several
- * parameters, and may also not be fully packed.
- */
- switch (shProg->Uniforms->Parameters[location].DataType) {
- case GL_FLOAT_MAT2:
- case GL_FLOAT_MAT3x2:
- case GL_FLOAT_MAT4x2:
- rows = 2;
- break;
- case GL_FLOAT_MAT2x3:
- case GL_FLOAT_MAT3:
- case GL_FLOAT_MAT4x3:
- rows = 3;
- break;
- case GL_FLOAT_MAT2x4:
- case GL_FLOAT_MAT3x4:
- case GL_FLOAT_MAT4:
- rows = 4;
+ if (location < shProg->Uniforms->NumUniforms) {
+ GLint progPos, i;
+ const struct gl_program *prog = NULL;
+
+ progPos = shProg->Uniforms->Uniforms[location].VertPos;
+ if (progPos >= 0) {
+ prog = &shProg->VertexProgram->Base;
}
- if (rows != 0) {
- GLint r, c;
- for (c = 0, i = 0; c * 4 < uSize; c++)
- for (r = 0; r < rows; r++, i++)
- params[i] = shProg->Uniforms->ParameterValues[location + c][r];
+ else {
+ progPos = shProg->Uniforms->Uniforms[location].FragPos;
+ if (progPos >= 0) {
+ prog = &shProg->FragmentProgram->Base;
+ }
}
- else
- for (i = 0; i < uSize; i++) {
- params[i] = shProg->Uniforms->ParameterValues[location][i];
+
+ ASSERT(prog);
+ if (prog) {
+ for (i = 0; i < prog->Parameters->Parameters[progPos].Size; i++) {
+ params[i] = prog->Parameters->ParameterValues[progPos][i];
}
+ }
}
else {
_mesa_error(ctx, GL_INVALID_VALUE, "glGetUniformfv(location)");
@@ -1006,32 +927,19 @@ _mesa_get_uniformfv(GLcontext *ctx, GLuint program, GLint location,
/**
* Called via ctx->Driver.GetUniformLocation().
*/
-GLint
+static GLint
_mesa_get_uniform_location(GLcontext *ctx, GLuint program, const GLchar *name)
{
struct gl_shader_program *shProg
= _mesa_lookup_shader_program(ctx, program);
- if (shProg) {
- GLuint loc;
- for (loc = 0; loc < shProg->Uniforms->NumParameters; loc++) {
- const struct gl_program_parameter *u
- = shProg->Uniforms->Parameters + loc;
- /* XXX this is a temporary simplification / short-cut.
- * We need to handle things like "e.c[0].b" as seen in the
- * GLSL orange book, page 189.
- */
- if ((u->Type == PROGRAM_UNIFORM ||
- u->Type == PROGRAM_SAMPLER) && !strcmp(u->Name, name)) {
- return loc;
- }
- }
- }
- return -1;
+ if (!shProg)
+ return -1;
+ return _mesa_lookup_uniform(shProg->Uniforms, name);
}
-GLboolean
+static GLboolean
_mesa_is_program(GLcontext *ctx, GLuint name)
{
struct gl_shader_program *shProg = _mesa_lookup_shader_program(ctx, name);
@@ -1039,7 +947,7 @@ _mesa_is_program(GLcontext *ctx, GLuint name)
}
-GLboolean
+static GLboolean
_mesa_is_shader(GLcontext *ctx, GLuint name)
{
struct gl_shader *shader = _mesa_lookup_shader(ctx, name);
@@ -1051,7 +959,7 @@ _mesa_is_shader(GLcontext *ctx, GLuint name)
/**
* Called via ctx->Driver.ShaderSource()
*/
-void
+static void
_mesa_shader_source(GLcontext *ctx, GLuint shader, const GLchar *source)
{
struct gl_shader *sh = _mesa_lookup_shader(ctx, shader);
@@ -1072,7 +980,7 @@ _mesa_shader_source(GLcontext *ctx, GLuint shader, const GLchar *source)
/**
* Called via ctx->Driver.CompileShader()
*/
-void
+static void
_mesa_compile_shader(GLcontext *ctx, GLuint shaderObj)
{
struct gl_shader *sh = _mesa_lookup_shader(ctx, shaderObj);
@@ -1089,7 +997,7 @@ _mesa_compile_shader(GLcontext *ctx, GLuint shaderObj)
/**
* Called via ctx->Driver.LinkProgram()
*/
-void
+static void
_mesa_link_program(GLcontext *ctx, GLuint program)
{
struct gl_shader_program *shProg;
@@ -1100,6 +1008,8 @@ _mesa_link_program(GLcontext *ctx, GLuint program)
return;
}
+ FLUSH_VERTICES(ctx, _NEW_PROGRAM);
+
_slang_link(ctx, program, shProg);
}
@@ -1136,55 +1046,121 @@ _mesa_use_program(GLcontext *ctx, GLuint program)
}
+
/**
- * Called via ctx->Driver.Uniform().
+ * Update the vertex and fragment program's TexturesUsed arrays.
*/
-void
-_mesa_uniform(GLcontext *ctx, GLint location, GLsizei count,
- const GLvoid *values, GLenum type)
+static void
+update_textures_used(struct gl_program *prog)
{
- struct gl_shader_program *shProg = ctx->Shader.CurrentProgram;
- GLint elems, i, k;
- GLenum uType;
- GLsizei maxCount;
+ GLuint s;
- if (!shProg || !shProg->LinkStatus) {
- _mesa_error(ctx, GL_INVALID_OPERATION, "glUniform(program not linked)");
- return;
- }
+ memset(prog->TexturesUsed, 0, sizeof(prog->TexturesUsed));
- if (location == -1)
- return; /* The standard specifies this as a no-op */
-
- /* The spec says this is GL_INVALID_OPERATION, although it seems like it
- * ought to be GL_INVALID_VALUE
- */
- if (location < 0 || location >= (GLint) shProg->Uniforms->NumParameters) {
- _mesa_error(ctx, GL_INVALID_OPERATION, "glUniform(location)");
- return;
+ for (s = 0; s < MAX_SAMPLERS; s++) {
+ if (prog->SamplersUsed & (1 << s)) {
+ GLuint u = prog->SamplerUnits[s];
+ GLuint t = prog->SamplerTargets[s];
+ assert(u < MAX_TEXTURE_IMAGE_UNITS);
+ prog->TexturesUsed[u] |= (1 << t);
+ }
}
+}
- FLUSH_VERTICES(ctx, _NEW_PROGRAM);
- uType = shProg->Uniforms->Parameters[location].DataType;
- /*
- * If we're setting a sampler, we must use glUniformi1()!
- */
- if (shProg->Uniforms->Parameters[location].Type == PROGRAM_SAMPLER) {
- GLint unit;
+/**
+ * Set the value of a program's uniform variable.
+ * \param program the program whose uniform to update
+ * \param location the location/index of the uniform
+ * \param type the datatype of the uniform
+ * \param count the number of uniforms to set
+ * \param elems number of elements per uniform
+ * \param values the new values
+ */
+static void
+set_program_uniform(GLcontext *ctx, struct gl_program *program, GLint location,
+ GLenum type, GLint count, GLint elems, const void *values)
+{
+ if (program->Parameters->Parameters[location].Type == PROGRAM_SAMPLER) {
+ /* This controls which texture unit which is used by a sampler */
+ GLuint texUnit, sampler;
+
+ /* data type for setting samplers must be int */
if (type != GL_INT || count != 1) {
_mesa_error(ctx, GL_INVALID_OPERATION,
"glUniform(only glUniform1i can be used "
"to set sampler uniforms)");
return;
}
+
+ sampler = (GLuint) program->Parameters->ParameterValues[location][0];
+ texUnit = ((GLuint *) values)[0];
+
/* check that the sampler (tex unit index) is legal */
- unit = ((GLint *) values)[0];
- if (unit >= ctx->Const.MaxTextureImageUnits) {
+ if (texUnit >= ctx->Const.MaxTextureImageUnits) {
_mesa_error(ctx, GL_INVALID_VALUE,
"glUniform1(invalid sampler/tex unit index)");
return;
}
+
+ /* This maps a sampler to a texture unit: */
+ program->SamplerUnits[sampler] = texUnit;
+ update_textures_used(program);
+
+ FLUSH_VERTICES(ctx, _NEW_TEXTURE);
+ }
+ else {
+ /* ordinary uniform variable */
+ GLint k, i;
+
+ if (count * elems > program->Parameters->Parameters[location].Size) {
+ _mesa_error(ctx, GL_INVALID_OPERATION, "glUniform(count too large)");
+ return;
+ }
+
+ for (k = 0; k < count; k++) {
+ GLfloat *uniformVal = program->Parameters->ParameterValues[location + k];
+ if (type == GL_INT ||
+ type == GL_INT_VEC2 ||
+ type == GL_INT_VEC3 ||
+ type == GL_INT_VEC4) {
+ const GLint *iValues = ((const GLint *) values) + k * elems;
+ for (i = 0; i < elems; i++) {
+ uniformVal[i] = (GLfloat) iValues[i];
+ }
+ }
+ else {
+ const GLfloat *fValues = ((const GLfloat *) values) + k * elems;
+ for (i = 0; i < elems; i++) {
+ uniformVal[i] = fValues[i];
+ }
+ }
+ }
+ }
+}
+
+
+/**
+ * Called via ctx->Driver.Uniform().
+ */
+static void
+_mesa_uniform(GLcontext *ctx, GLint location, GLsizei count,
+ const GLvoid *values, GLenum type)
+{
+ struct gl_shader_program *shProg = ctx->Shader.CurrentProgram;
+ GLint elems;
+
+ if (!shProg || !shProg->LinkStatus) {
+ _mesa_error(ctx, GL_INVALID_OPERATION, "glUniform(program not linked)");
+ return;
+ }
+
+ if (location == -1)
+ return; /* The standard specifies this as a no-op */
+
+ if (location < 0 || location >= (GLint) shProg->Uniforms->NumUniforms) {
+ _mesa_error(ctx, GL_INVALID_VALUE, "glUniform(location)");
+ return;
}
if (count < 0) {
@@ -1214,69 +1190,56 @@ _mesa_uniform(GLcontext *ctx, GLint location, GLsizei count,
return;
}
- /* OpenGL requires types to match exactly, except that one can convert
- * float or int array to boolean array.
+ FLUSH_VERTICES(ctx, _NEW_PROGRAM);
+
+ /* A uniform var may be used by both a vertex shader and a fragment
+ * shader. We may need to update one or both shader's uniform here:
*/
- switch (uType)
- {
- case GL_BOOL:
- case GL_BOOL_VEC2:
- case GL_BOOL_VEC3:
- case GL_BOOL_VEC4:
- if (elems != sizeof_glsl_type(uType)) {
- _mesa_error(ctx, GL_INVALID_OPERATION, "glUniform(count mismatch)");
- }
- break;
- case PROGRAM_SAMPLER:
- break;
- default:
- if (shProg->Uniforms->Parameters[location].Type != PROGRAM_SAMPLER
- && uType != type) {
- _mesa_error(ctx, GL_INVALID_OPERATION, "glUniform(type mismatch)");
- }
- break;
+ if (shProg->VertexProgram) {
+ GLint loc = shProg->Uniforms->Uniforms[location].VertPos;
+ if (loc >= 0) {
+ set_program_uniform(ctx, &shProg->VertexProgram->Base,
+ loc, type, count, elems, values);
+ }
+ }
+
+ if (shProg->FragmentProgram) {
+ GLint loc = shProg->Uniforms->Uniforms[location].FragPos;
+ if (loc >= 0) {
+ set_program_uniform(ctx, &shProg->FragmentProgram->Base,
+ loc, type, count, elems, values);
+ }
}
+}
+
- /* XXX if this is a base type, then count must equal 1. However, we
- * don't have enough information from the compiler to distinguish a
- * base type from a 1-element array of that type. The standard allows
- * count to overrun an array, in which case the overflow is ignored.
+static void
+set_program_uniform_matrix(GLcontext *ctx, struct gl_program *program,
+ GLuint location, GLuint rows, GLuint cols,
+ GLboolean transpose, const GLfloat *values)
+{
+ /*
+ * Note: the _columns_ of a matrix are stored in program registers, not
+ * the rows.
*/
- maxCount = shProg->Uniforms->Parameters[location].Size / elems;
- if (count > maxCount) count = maxCount;
-
- for (k = 0; k < count; k++) {
- GLfloat *uniformVal = shProg->Uniforms->ParameterValues[location + k];
- if (type == GL_INT ||
- type == GL_INT_VEC2 ||
- type == GL_INT_VEC3 ||
- type == GL_INT_VEC4) {
- const GLint *iValues = ((const GLint *) values) + k * elems;
- for (i = 0; i < elems; i++) {
- uniformVal[i] = (GLfloat) iValues[i];
+ /* XXXX need to test 3x3 and 2x2 matrices... */
+ if (transpose) {
+ GLuint row, col;
+ for (col = 0; col < cols; col++) {
+ GLfloat *v = program->Parameters->ParameterValues[location + col];
+ for (row = 0; row < rows; row++) {
+ v[row] = values[row * cols + col];
}
}
- else {
- const GLfloat *fValues = ((const GLfloat *) values) + k * elems;
- for (i = 0; i < elems; i++) {
- uniformVal[i] = fValues[i];
+ }
+ else {
+ GLuint row, col;
+ for (col = 0; col < cols; col++) {
+ GLfloat *v = program->Parameters->ParameterValues[location + col];
+ for (row = 0; row < rows; row++) {
+ v[row] = values[col * rows + row];
}
}
- if (uType == GL_BOOL ||
- uType == GL_BOOL_VEC2 ||
- uType == GL_BOOL_VEC3 ||
- uType == GL_BOOL_VEC4) {
- for (i = 0; i < elems; i++)
- uniformVal[i] = uniformVal[i] ? 1.0f : 0.0f;
- }
- }
-
- if (shProg->Uniforms->Parameters[location].Type == PROGRAM_SAMPLER) {
- if (shProg->VertexProgram)
- _slang_resolve_samplers(shProg, &shProg->VertexProgram->Base);
- if (shProg->FragmentProgram)
- _slang_resolve_samplers(shProg, &shProg->FragmentProgram->Base);
- FLUSH_VERTICES(ctx, _NEW_TEXTURE);
}
}
@@ -1284,72 +1247,52 @@ _mesa_uniform(GLcontext *ctx, GLint location, GLsizei count,
/**
* Called by ctx->Driver.UniformMatrix().
*/
-void
+static void
_mesa_uniform_matrix(GLcontext *ctx, GLint cols, GLint rows,
GLenum matrixType, GLint location, GLsizei count,
GLboolean transpose, const GLfloat *values)
{
- GLsizei maxCount, i;
struct gl_shader_program *shProg = ctx->Shader.CurrentProgram;
+
if (!shProg || !shProg->LinkStatus) {
_mesa_error(ctx, GL_INVALID_OPERATION,
"glUniformMatrix(program not linked)");
return;
}
+
if (location == -1)
return; /* The standard specifies this as a no-op */
- /* The spec says this is GL_INVALID_OPERATION, although it seems like it
- * ought to be GL_INVALID_VALUE
- */
- if (location < 0 || location >= (GLint) shProg->Uniforms->NumParameters) {
- _mesa_error(ctx, GL_INVALID_OPERATION, "glUniformMatrix(location)");
+
+ if (location < 0 || location >= shProg->Uniforms->NumUniforms) {
+ _mesa_error(ctx, GL_INVALID_VALUE, "glUniformMatrix(location)");
return;
}
if (values == NULL) {
_mesa_error(ctx, GL_INVALID_VALUE, "glUniformMatrix");
return;
}
- if (count < 0) {
- _mesa_error(ctx, GL_INVALID_VALUE, "glUniformMatrix(count < 0)");
- return;
- }
FLUSH_VERTICES(ctx, _NEW_PROGRAM);
- /*
- * Note: the _columns_ of a matrix are stored in program registers, not
- * the rows.
- */
- /* XXXX need to test 3x3 and 2x2 matrices... */
- maxCount = shProg->Uniforms->Parameters[location].Size / (4 * cols);
- if (count > maxCount)
- count = maxCount;
- for (i = 0; i < count; i++) {
- if (transpose) {
- GLuint row, col;
- for (col = 0; col < cols; col++) {
- GLfloat *v = shProg->Uniforms->ParameterValues[location + col];
- for (row = 0; row < rows; row++) {
- v[row] = values[row * cols + col];
- }
- }
+ if (shProg->VertexProgram) {
+ GLint loc = shProg->Uniforms->Uniforms[location].VertPos;
+ if (loc >= 0) {
+ set_program_uniform_matrix(ctx, &shProg->VertexProgram->Base,
+ loc, rows, cols, transpose, values);
}
- else {
- GLuint row, col;
- for (col = 0; col < cols; col++) {
- GLfloat *v = shProg->Uniforms->ParameterValues[location + col];
- for (row = 0; row < rows; row++) {
- v[row] = values[col * rows + row];
- }
- }
+ }
+
+ if (shProg->FragmentProgram) {
+ GLint loc = shProg->Uniforms->Uniforms[location].FragPos;
+ if (loc >= 0) {
+ set_program_uniform_matrix(ctx, &shProg->FragmentProgram->Base,
+ loc, rows, cols, transpose, values);
}
- location += cols;
- values += rows * cols;
}
}
-void
+static void
_mesa_validate_program(GLcontext *ctx, GLuint program)
{
struct gl_shader_program *shProg;
@@ -1375,3 +1318,40 @@ _mesa_validate_program(GLcontext *ctx, GLuint program)
image units allowed.
*/
}
+
+
+/**
+ * Plug in Mesa's GLSL functions into the device driver function table.
+ */
+void
+_mesa_init_glsl_driver_functions(struct dd_function_table *driver)
+{
+ driver->AttachShader = _mesa_attach_shader;
+ driver->BindAttribLocation = _mesa_bind_attrib_location;
+ driver->CompileShader = _mesa_compile_shader;
+ driver->CreateProgram = _mesa_create_program;
+ driver->CreateShader = _mesa_create_shader;
+ driver->DeleteProgram2 = _mesa_delete_program2;
+ driver->DeleteShader = _mesa_delete_shader;
+ driver->DetachShader = _mesa_detach_shader;
+ driver->GetActiveAttrib = _mesa_get_active_attrib;
+ driver->GetActiveUniform = _mesa_get_active_uniform;
+ driver->GetAttachedShaders = _mesa_get_attached_shaders;
+ driver->GetAttribLocation = _mesa_get_attrib_location;
+ driver->GetHandle = _mesa_get_handle;
+ driver->GetProgramiv = _mesa_get_programiv;
+ driver->GetProgramInfoLog = _mesa_get_program_info_log;
+ driver->GetShaderiv = _mesa_get_shaderiv;
+ driver->GetShaderInfoLog = _mesa_get_shader_info_log;
+ driver->GetShaderSource = _mesa_get_shader_source;
+ driver->GetUniformfv = _mesa_get_uniformfv;
+ driver->GetUniformLocation = _mesa_get_uniform_location;
+ driver->IsProgram = _mesa_is_program;
+ driver->IsShader = _mesa_is_shader;
+ driver->LinkProgram = _mesa_link_program;
+ driver->ShaderSource = _mesa_shader_source;
+ driver->Uniform = _mesa_uniform;
+ driver->UniformMatrix = _mesa_uniform_matrix;
+ driver->UseProgram = _mesa_use_program;
+ driver->ValidateProgram = _mesa_validate_program;
+}
diff --git a/src/mesa/shader/shader_api.h b/src/mesa/shader/shader_api.h
index 27e5870d70..5521c585b5 100644
--- a/src/mesa/shader/shader_api.h
+++ b/src/mesa/shader/shader_api.h
@@ -41,9 +41,10 @@ _mesa_init_shader_state(GLcontext * ctx);
extern void
_mesa_free_shader_state(GLcontext *ctx);
+/*
extern struct gl_shader_program *
_mesa_new_shader_program(GLcontext *ctx, GLuint name);
-
+*/
extern void
_mesa_clear_shader_program_data(GLcontext *ctx,
struct gl_shader_program *shProg);
@@ -78,108 +79,12 @@ extern struct gl_shader *
_mesa_lookup_shader(GLcontext *ctx, GLuint name);
-/**
- * API/Driver functions
- */
-
-extern void
-_mesa_attach_shader(GLcontext *ctx, GLuint program, GLuint shader);
-
-extern void
-_mesa_bind_attrib_location(GLcontext *ctx, GLuint program, GLuint index,
- const GLchar *name);
-
-extern void
-_mesa_compile_shader(GLcontext *ctx, GLuint shaderObj);
-
-extern GLuint
-_mesa_create_shader(GLcontext *ctx, GLenum type);
-
-extern GLuint
-_mesa_create_program(GLcontext *ctx);
-
-extern void
-_mesa_delete_program2(GLcontext *ctx, GLuint name);
-
-extern void
-_mesa_delete_shader(GLcontext *ctx, GLuint shader);
-
-extern void
-_mesa_detach_shader(GLcontext *ctx, GLuint program, GLuint shader);
-
-extern void
-_mesa_get_active_attrib(GLcontext *ctx, GLuint program, GLuint index,
- GLsizei maxLength, GLsizei *length, GLint *size,
- GLenum *type, GLchar *name);
-
-extern void
-_mesa_get_active_uniform(GLcontext *ctx, GLuint program, GLuint index,
- GLsizei maxLength, GLsizei *length, GLint *size,
- GLenum *type, GLchar *name);
-
-extern void
-_mesa_get_attached_shaders(GLcontext *ctx, GLuint program, GLsizei maxCount,
- GLsizei *count, GLuint *obj);
-
-extern GLint
-_mesa_get_attrib_location(GLcontext *ctx, GLuint program,
- const GLchar *name);
-
-extern GLuint
-_mesa_get_handle(GLcontext *ctx, GLenum pname);
-
-extern void
-_mesa_get_programiv(GLcontext *ctx, GLuint program,
- GLenum pname, GLint *params);
-
-extern void
-_mesa_get_program_info_log(GLcontext *ctx, GLuint program, GLsizei bufSize,
- GLsizei *length, GLchar *infoLog);
-
-extern void
-_mesa_get_shaderiv(GLcontext *ctx, GLuint shader, GLenum pname, GLint *params);
-
-extern void
-_mesa_get_shader_info_log(GLcontext *ctx, GLuint shader, GLsizei bufSize,
- GLsizei *length, GLchar *infoLog);
-
-extern void
-_mesa_get_shader_source(GLcontext *ctx, GLuint shader, GLsizei maxLength,
- GLsizei *length, GLchar *sourceOut);
-
-extern void
-_mesa_get_uniformfv(GLcontext *ctx, GLuint program, GLint location,
- GLfloat *params);
-
-extern GLint
-_mesa_get_uniform_location(GLcontext *ctx, GLuint program, const GLchar *name);
-
-extern GLboolean
-_mesa_is_program(GLcontext *ctx, GLuint name);
-
-extern GLboolean
-_mesa_is_shader(GLcontext *ctx, GLuint name);
-
-extern void
-_mesa_link_program(GLcontext *ctx, GLuint program);
-
-extern void
-_mesa_shader_source(GLcontext *ctx, GLuint shader, const GLchar *source);
-
-extern void
-_mesa_uniform(GLcontext *ctx, GLint location, GLsizei count,
- const GLvoid *values, GLenum type);
-
-void
-_mesa_uniform_matrix(GLcontext *ctx, GLint cols, GLint rows,
- GLenum matrixType, GLint location, GLsizei count,
- GLboolean transpose, const GLfloat *values);
-
extern void
_mesa_use_program(GLcontext *ctx, GLuint program);
+
extern void
-_mesa_validate_program(GLcontext *ctx, GLuint program);
+_mesa_init_glsl_driver_functions(struct dd_function_table *driver);
#endif /* SHADER_API_H */
diff --git a/src/mesa/shader/slang/library/Makefile b/src/mesa/shader/slang/library/Makefile
index dc67b59088..0e03fac2ee 100644
--- a/src/mesa/shader/slang/library/Makefile
+++ b/src/mesa/shader/slang/library/Makefile
@@ -17,7 +17,7 @@ LIB_DEP = $(TOP)/$(LIB_DIR)/$(GL_LIB_NAME)
default: syntax builtin
clean:
- rm -f syn_to_c gc_to_bin *_syn.h *_gc.h
+ -rm -f syn_to_c gc_to_bin *_syn.h *_gc.h
syntax: slang_pp_directives_syn.h slang_pp_expression_syn.h slang_shader_syn.h slang_pp_version_syn.h
diff --git a/src/mesa/shader/slang/slang_codegen.c b/src/mesa/shader/slang/slang_codegen.c
index ebead3274e..d19d5a0abb 100644
--- a/src/mesa/shader/slang/slang_codegen.c
+++ b/src/mesa/shader/slang/slang_codegen.c
@@ -1090,7 +1090,7 @@ slang_inline_function_call(slang_assemble_ctx * A, slang_function *fun,
slang_operation_copy(inlined, fun->body);
/*** XXX review this */
- assert(inlined->type = SLANG_OPER_BLOCK_NO_NEW_SCOPE);
+ assert(inlined->type == SLANG_OPER_BLOCK_NO_NEW_SCOPE);
inlined->type = SLANG_OPER_BLOCK_NEW_SCOPE;
#if 0
@@ -2836,14 +2836,13 @@ _slang_codegen_global_variable(slang_assemble_ctx *A, slang_variable *var,
const GLint texIndex = sampler_to_texture_index(var->type.specifier.type);
if (texIndex != -1) {
- /* Texture sampler:
+ /* This is a texture sampler variable...
* store->File = PROGRAM_SAMPLER
- * store->Index = sampler uniform location
+ * store->Index = sampler number (0..7, typically)
* store->Size = texture type index (1D, 2D, 3D, cube, etc)
*/
- GLint samplerUniform
- = _mesa_add_sampler(prog->Parameters, varName, datatype);
- store = _slang_new_ir_storage(PROGRAM_SAMPLER, samplerUniform, texIndex);
+ GLint sampNum = _mesa_add_sampler(prog->Parameters, varName, datatype);
+ store = _slang_new_ir_storage(PROGRAM_SAMPLER, sampNum, texIndex);
if (dbg) printf("SAMPLER ");
}
else if (var->type.qualifier == SLANG_QUAL_UNIFORM) {
diff --git a/src/mesa/shader/slang/slang_compile.c b/src/mesa/shader/slang/slang_compile.c
index 2be89a5ce0..46b5c54bbe 100644
--- a/src/mesa/shader/slang/slang_compile.c
+++ b/src/mesa/shader/slang/slang_compile.c
@@ -31,6 +31,8 @@
#include "main/imports.h"
#include "main/context.h"
#include "shader/program.h"
+#include "shader/programopt.h"
+#include "shader/prog_print.h"
#include "shader/prog_parameter.h"
#include "shader/grammar/grammar_mesa.h"
#include "slang_codegen.h"
@@ -2180,6 +2182,19 @@ _slang_compile(GLcontext *ctx, struct gl_shader *shader)
_slang_delete_mempool((slang_mempool *) ctx->Shader.MemPool);
ctx->Shader.MemPool = NULL;
+ if (shader->Type == GL_VERTEX_SHADER) {
+ /* remove any reads of varying (output) registers */
+#if 0
+ printf("Pre-remove output reads:\n");
+ _mesa_print_program(shader->Programs[0]);
+#endif
+ _mesa_remove_varying_reads(shader->Programs[0]);
+#if 0
+ printf("Post-remove output reads:\n");
+ _mesa_print_program(shader->Programs[0]);
+#endif
+ }
+
return success;
}
diff --git a/src/mesa/shader/slang/slang_emit.c b/src/mesa/shader/slang/slang_emit.c
index 9c307c6275..ff63e05dd2 100644
--- a/src/mesa/shader/slang/slang_emit.c
+++ b/src/mesa/shader/slang/slang_emit.c
@@ -79,7 +79,7 @@ new_subroutine(slang_emit_info *emitInfo, GLuint *id)
_mesa_realloc(emitInfo->Subroutines,
n * sizeof(struct gl_program),
(n + 1) * sizeof(struct gl_program));
- emitInfo->Subroutines[n] = _mesa_new_program(ctx, emitInfo->prog->Target, 0);
+ emitInfo->Subroutines[n] = ctx->Driver.NewProgram(ctx, emitInfo->prog->Target, 0);
emitInfo->Subroutines[n]->Parameters = emitInfo->prog->Parameters;
emitInfo->NumSubroutines++;
*id = n;
@@ -922,11 +922,15 @@ emit_tex(slang_emit_info *emitInfo, slang_ir_node *n)
assert(n->Children[0]->Store->Size >= TEXTURE_1D_INDEX);
assert(n->Children[0]->Store->Size <= TEXTURE_RECT_INDEX);
- inst->Sampler = n->Children[0]->Store->Index; /* i.e. uniform's index */
inst->TexSrcTarget = n->Children[0]->Store->Size;
+#if 0
inst->TexSrcUnit = 27; /* Dummy value; the TexSrcUnit will be computed at
* link time, using the sampler uniform's value.
*/
+ inst->Sampler = n->Children[0]->Store->Index; /* i.e. uniform's index */
+#else
+ inst->TexSrcUnit = n->Children[0]->Store->Index; /* i.e. uniform's index */
+#endif
return inst;
}
@@ -1793,7 +1797,7 @@ _slang_resolve_subroutines(slang_emit_info *emitInfo)
sub->NumInstructions);
/* delete subroutine code */
sub->Parameters = NULL; /* prevent double-free */
- _mesa_delete_program(ctx, sub);
+ _mesa_reference_program(ctx, &emitInfo->Subroutines[i], NULL);
}
/* free subroutine list */
diff --git a/src/mesa/shader/slang/slang_link.c b/src/mesa/shader/slang/slang_link.c
index c8457fc483..80cd4b6df6 100644
--- a/src/mesa/shader/slang/slang_link.c
+++ b/src/mesa/shader/slang/slang_link.c
@@ -37,12 +37,17 @@
#include "shader/prog_parameter.h"
#include "shader/prog_print.h"
#include "shader/prog_statevars.h"
+#include "shader/prog_uniform.h"
#include "shader/shader_api.h"
#include "slang_link.h"
-
+/**
+ * Linking varying vars involves rearranging varying vars so that the
+ * vertex program's output varyings matches the order of the fragment
+ * program's input varyings.
+ */
static GLboolean
link_varying_vars(struct gl_shader_program *shProg, struct gl_program *prog)
{
@@ -132,145 +137,65 @@ link_varying_vars(struct gl_shader_program *shProg, struct gl_program *prog)
}
-static GLboolean
-is_uniform(GLuint file)
-{
- return (file == PROGRAM_ENV_PARAM ||
- file == PROGRAM_STATE_VAR ||
- file == PROGRAM_NAMED_PARAM ||
- file == PROGRAM_CONSTANT ||
- file == PROGRAM_SAMPLER ||
- file == PROGRAM_UNIFORM);
-}
-
-
-static GLboolean
-link_uniform_vars(struct gl_shader_program *shProg, struct gl_program *prog)
+/**
+ * Build the shProg->Uniforms list.
+ * This is basically a list/index of all uniforms found in either/both of
+ * the vertex and fragment shaders.
+ */
+static void
+link_uniform_vars(struct gl_shader_program *shProg,
+ struct gl_program *prog,
+ GLuint *numSamplers)
{
- GLuint *map, i;
-
-#if 0
- printf("================ pre link uniforms ===============\n");
- _mesa_print_parameter_list(shProg->Uniforms);
-#endif
-
- map = (GLuint *) malloc(prog->Parameters->NumParameters * sizeof(GLuint));
- if (!map)
- return GL_FALSE;
+ GLuint samplerMap[MAX_SAMPLERS];
+ GLuint i;
- for (i = 0; i < prog->Parameters->NumParameters; /* incr below*/) {
- /* see if this uniform is in the linked uniform list */
+ for (i = 0; i < prog->Parameters->NumParameters; i++) {
const struct gl_program_parameter *p = prog->Parameters->Parameters + i;
- const GLfloat *pVals = prog->Parameters->ParameterValues[i];
- GLint j;
- GLint size;
-
- /* sanity check */
- assert(is_uniform(p->Type));
-
- if (p->Name) {
- j = _mesa_lookup_parameter_index(shProg->Uniforms, -1, p->Name);
- }
- else {
- /*GLuint swizzle;*/
- ASSERT(p->Type == PROGRAM_CONSTANT);
- if (_mesa_lookup_parameter_constant(shProg->Uniforms, pVals,
- p->Size, &j, NULL)) {
- assert(j >= 0);
- }
- else {
- j = -1;
- }
- }
- if (j >= 0) {
- /* already in list, check size XXX check this */
-#if 0
- assert(p->Size == shProg->Uniforms->Parameters[j].Size);
-#endif
- }
- else {
- /* not already in linked list */
- switch (p->Type) {
- case PROGRAM_ENV_PARAM:
- j = _mesa_add_named_parameter(shProg->Uniforms, p->Name, pVals);
- break;
- case PROGRAM_CONSTANT:
- j = _mesa_add_named_constant(shProg->Uniforms, p->Name, pVals, p->Size);
- break;
- case PROGRAM_STATE_VAR:
- j = _mesa_add_state_reference(shProg->Uniforms, p->StateIndexes);
- break;
- case PROGRAM_UNIFORM:
- j = _mesa_add_uniform(shProg->Uniforms, p->Name, p->Size, p->DataType);
- break;
- case PROGRAM_SAMPLER:
- j = _mesa_add_sampler(shProg->Uniforms, p->Name, p->DataType);
- break;
- default:
- _mesa_problem(NULL, "bad parameter type in link_uniform_vars()");
- return GL_FALSE;
- }
+ /*
+ * XXX FIX NEEDED HERE
+ * We should also be adding a uniform if p->Type == PROGRAM_STATE_VAR.
+ * For example, modelview matrix, light pos, etc.
+ * Also, we need to update the state-var name-generator code to
+ * generate GLSL-style names, like "gl_LightSource[0].position".
+ * Furthermore, we'll need to fix the state-var's size/datatype info.
+ */
+
+ if (p->Type == PROGRAM_UNIFORM ||
+ p->Type == PROGRAM_SAMPLER) {
+ _mesa_append_uniform(shProg->Uniforms, p->Name, prog->Target, i);
}
- ASSERT(j >= 0);
-
- size = p->Size;
- while (size > 0) {
- map[i] = j;
- i++;
- j++;
- size -= 4;
+ if (p->Type == PROGRAM_SAMPLER) {
+ /* Allocate a new sampler index */
+ GLuint sampNum = *numSamplers;
+ GLuint oldSampNum = (GLuint) prog->Parameters->ParameterValues[i][0];
+ assert(oldSampNum < MAX_SAMPLERS);
+ samplerMap[oldSampNum] = sampNum;
+ (*numSamplers)++;
}
-
}
-#if 0
- printf("================ post link uniforms ===============\n");
- _mesa_print_parameter_list(shProg->Uniforms);
-#endif
-#if 0
- {
- GLuint i;
- for (i = 0; i < prog->Parameters->NumParameters; i++) {
- printf("map[%d] = %d\n", i, map[i]);
- }
- _mesa_print_parameter_list(shProg->Uniforms);
- }
-#endif
-
- /* OK, now scan the program/shader instructions looking for uniform vars,
+ /* OK, now scan the program/shader instructions looking for sampler vars,
* replacing the old index with the new index.
*/
+ prog->SamplersUsed = 0x0;
for (i = 0; i < prog->NumInstructions; i++) {
struct prog_instruction *inst = prog->Instructions + i;
- GLuint j;
-
- if (is_uniform(inst->DstReg.File)) {
- inst->DstReg.Index = map[ inst->DstReg.Index ];
- }
-
- for (j = 0; j < 3; j++) {
- if (is_uniform(inst->SrcReg[j].File)) {
- inst->SrcReg[j].Index = map[ inst->SrcReg[j].Index ];
- }
- }
-
- if (inst->Opcode == OPCODE_TEX ||
- inst->Opcode == OPCODE_TXB ||
- inst->Opcode == OPCODE_TXP) {
+ if (_mesa_is_tex_instruction(inst->Opcode)) {
/*
printf("====== remap sampler from %d to %d\n",
inst->Sampler, map[ inst->Sampler ]);
*/
- inst->Sampler = map[ inst->Sampler ];
+ /* here, texUnit is really samplerUnit */
+ inst->TexSrcUnit = samplerMap[inst->TexSrcUnit];
+ prog->SamplerTargets[inst->TexSrcUnit] = inst->TexSrcTarget;
+ prog->SamplersUsed |= (1 << inst->TexSrcUnit);
}
}
- free(map);
-
- return GL_TRUE;
}
@@ -329,10 +254,8 @@ _slang_resolve_attributes(struct gl_shader_program *shProg,
* glVertex/position.
*/
for (attr = 1; attr < MAX_VERTEX_ATTRIBS; attr++) {
- if (((1 << attr) & usedAttributes) == 0) {
- usedAttributes |= (1 << attr);
+ if (((1 << attr) & usedAttributes) == 0)
break;
- }
}
if (attr == MAX_VERTEX_ATTRIBS) {
/* too many! XXX record error log */
@@ -406,36 +329,6 @@ _slang_remap_attribute(struct gl_program *prog, GLuint oldAttrib, GLuint newAttr
-/**
- * Scan program for texture instructions, lookup sampler/uniform's value
- * to determine which texture unit to use.
- * Also, update the program's TexturesUsed[] array.
- */
-void
-_slang_resolve_samplers(struct gl_shader_program *shProg,
- struct gl_program *prog)
-{
- GLuint i;
-
- for (i = 0; i < MAX_TEXTURE_IMAGE_UNITS; i++)
- prog->TexturesUsed[i] = 0;
-
- for (i = 0; i < prog->NumInstructions; i++) {
- struct prog_instruction *inst = prog->Instructions + i;
- if (inst->Opcode == OPCODE_TEX ||
- inst->Opcode == OPCODE_TXB ||
- inst->Opcode == OPCODE_TXP) {
- GLint sampleUnit = (GLint) shProg->Uniforms->ParameterValues[inst->Sampler][0];
- assert(sampleUnit < MAX_TEXTURE_IMAGE_UNITS);
- inst->TexSrcUnit = sampleUnit;
-
- prog->TexturesUsed[inst->TexSrcUnit] |= (1 << inst->TexSrcTarget);
- }
- }
-}
-
-
-
/** cast wrapper */
static struct gl_vertex_program *
vertex_program(struct gl_program *prog)
@@ -476,12 +369,9 @@ link_error(struct gl_shader_program *shProg, const char *msg)
* 2. Varying vars in the two shaders are combined so their locations
* agree between the vertex and fragment stages. They're treated as
* vertex program output attribs and as fragment program input attribs.
- * 3. Uniform vars (including state references, constants, etc) from the
- * vertex and fragment shaders are merged into one group. Recall that
- * GLSL uniforms are shared by all linked shaders.
- * 4. The vertex and fragment programs are cloned and modified to update
- * src/dst register references so they use the new, linked uniform/
- * varying storage locations.
+ * 3. The vertex and fragment programs are cloned and modified to update
+ * src/dst register references so they use the new, linked varying
+ * storage locations.
*/
void
_slang_link(GLcontext *ctx,
@@ -490,11 +380,12 @@ _slang_link(GLcontext *ctx,
{
const struct gl_vertex_program *vertProg;
const struct gl_fragment_program *fragProg;
+ GLuint numSamplers = 0;
GLuint i;
_mesa_clear_shader_program_data(ctx, shProg);
- shProg->Uniforms = _mesa_new_parameter_list();
+ shProg->Uniforms = _mesa_new_uniform_list();
shProg->Varying = _mesa_new_parameter_list();
/**
@@ -515,48 +406,35 @@ _slang_link(GLcontext *ctx,
* Make copies of the vertex/fragment programs now since we'll be
* changing src/dst registers after merging the uniforms and varying vars.
*/
+ _mesa_reference_vertprog(ctx, &shProg->VertexProgram, NULL);
if (vertProg) {
- shProg->VertexProgram
- = vertex_program(_mesa_clone_program(ctx, &vertProg->Base));
- }
- else {
- shProg->VertexProgram = NULL;
+ struct gl_vertex_program *linked_vprog =
+ vertex_program(_mesa_clone_program(ctx, &vertProg->Base));
+ shProg->VertexProgram = linked_vprog; /* refcount OK */
+ ASSERT(shProg->VertexProgram->Base.RefCount == 1);
}
+ _mesa_reference_fragprog(ctx, &shProg->FragmentProgram, NULL);
if (fragProg) {
- shProg->FragmentProgram
- = fragment_program(_mesa_clone_program(ctx, &fragProg->Base));
- }
- else {
- shProg->FragmentProgram = NULL;
+ struct gl_fragment_program *linked_fprog =
+ fragment_program(_mesa_clone_program(ctx, &fragProg->Base));
+ shProg->FragmentProgram = linked_fprog; /* refcount OK */
+ ASSERT(shProg->FragmentProgram->Base.RefCount == 1);
}
+ /* link varying vars */
if (shProg->VertexProgram)
link_varying_vars(shProg, &shProg->VertexProgram->Base);
if (shProg->FragmentProgram)
link_varying_vars(shProg, &shProg->FragmentProgram->Base);
+ /* link uniform vars */
if (shProg->VertexProgram)
- link_uniform_vars(shProg, &shProg->VertexProgram->Base);
+ link_uniform_vars(shProg, &shProg->VertexProgram->Base, &numSamplers);
if (shProg->FragmentProgram)
- link_uniform_vars(shProg, &shProg->FragmentProgram->Base);
-
- /* The vertex and fragment programs share a common set of uniforms now */
- if (shProg->VertexProgram) {
- _mesa_free_parameter_list(shProg->VertexProgram->Base.Parameters);
- shProg->VertexProgram->Base.Parameters = shProg->Uniforms;
- }
- if (shProg->FragmentProgram) {
- _mesa_free_parameter_list(shProg->FragmentProgram->Base.Parameters);
- shProg->FragmentProgram->Base.Parameters = shProg->Uniforms;
- }
+ link_uniform_vars(shProg, &shProg->FragmentProgram->Base, &numSamplers);
- if (shProg->VertexProgram) {
- _slang_resolve_samplers(shProg, &shProg->VertexProgram->Base);
- }
- if (shProg->FragmentProgram) {
- _slang_resolve_samplers(shProg, &shProg->FragmentProgram->Base);
- }
+ /*_mesa_print_uniforms(shProg->Uniforms);*/
if (shProg->VertexProgram) {
if (!_slang_resolve_attributes(shProg, &shProg->VertexProgram->Base)) {
diff --git a/src/mesa/shader/slang/slang_link.h b/src/mesa/shader/slang/slang_link.h
index 606b9e46b1..8ef8a6b4b3 100644
--- a/src/mesa/shader/slang/slang_link.h
+++ b/src/mesa/shader/slang/slang_link.h
@@ -33,10 +33,6 @@ _slang_link(GLcontext *ctx, GLhandleARB h,
struct gl_shader_program *shProg);
extern void
-_slang_resolve_samplers(struct gl_shader_program *shProg,
- struct gl_program *prog);
-
-extern void
_slang_remap_attribute(struct gl_program *prog, GLuint oldAttrib,
GLuint newAttrib);
diff --git a/src/mesa/sources b/src/mesa/sources
index dbfc01d0ed..054f667a25 100644
--- a/src/mesa/sources
+++ b/src/mesa/sources
@@ -165,6 +165,7 @@ SHADER_SOURCES = \
shader/prog_parameter.c \
shader/prog_print.c \
shader/prog_statevars.c \
+ shader/prog_uniform.c \
shader/programopt.c \
shader/shader_api.c \
diff --git a/src/mesa/swrast/s_drawpix.c b/src/mesa/swrast/s_drawpix.c
index 81f5caa270..730798c908 100644
--- a/src/mesa/swrast/s_drawpix.c
+++ b/src/mesa/swrast/s_drawpix.c
@@ -840,8 +840,10 @@ _swrast_DrawPixels( GLcontext *ctx,
_swrast_validate_derived( ctx );
pixels = _mesa_map_drawpix_pbo(ctx, unpack, pixels);
- if (!pixels)
+ if (!pixels) {
+ RENDER_FINISH(swrast,ctx);
return;
+ }
switch (format) {
case GL_STENCIL_INDEX:
diff --git a/src/mesa/swrast/s_fragprog.c b/src/mesa/swrast/s_fragprog.c
index 2dfc033d50..ecace9c502 100644
--- a/src/mesa/swrast/s_fragprog.c
+++ b/src/mesa/swrast/s_fragprog.c
@@ -33,18 +33,19 @@
/**
- * Fetch a texel.
+ * Fetch a texel with given lod.
+ * Called via machine->FetchTexelLod()
*/
static void
-fetch_texel( GLcontext *ctx, const GLfloat texcoord[4], GLfloat lambda,
- GLuint unit, GLfloat color[4] )
+fetch_texel_lod( GLcontext *ctx, const GLfloat texcoord[4], GLfloat lambda,
+ GLuint unit, GLfloat color[4] )
{
GLchan rgba[4];
SWcontext *swrast = SWRAST_CONTEXT(ctx);
const struct gl_texture_object *texObj = ctx->Texture.Unit[unit]._Current;
lambda = CLAMP(lambda, texObj->MinLod, texObj->MaxLod);
-
+
/* XXX use a float-valued TextureSample routine here!!! */
swrast->TextureSample[unit](ctx, texObj, 1, (const GLfloat (*)[4]) texcoord,
&lambda, &rgba);
@@ -58,6 +59,7 @@ fetch_texel( GLcontext *ctx, const GLfloat texcoord[4], GLfloat lambda,
/**
* Fetch a texel with the given partial derivatives to compute a level
* of detail in the mipmap.
+ * Called via machine->FetchTexelDeriv()
*/
static void
fetch_texel_deriv( GLcontext *ctx, const GLfloat texcoord[4],
@@ -117,6 +119,8 @@ init_machine(GLcontext *ctx, struct gl_program_machine *machine,
machine->DerivY = (GLfloat (*)[4]) span->attrStepY;
machine->NumDeriv = FRAG_ATTRIB_MAX;
+ machine->Samplers = program->Base.SamplerUnits;
+
/* if running a GLSL program (not ARB_fragment_program) */
if (ctx->Shader.CurrentProgram) {
/* Store front/back facing value in register FOGC.Y */
@@ -134,7 +138,7 @@ init_machine(GLcontext *ctx, struct gl_program_machine *machine,
/* init call stack */
machine->StackDepth = 0;
- machine->FetchTexelLod = fetch_texel;
+ machine->FetchTexelLod = fetch_texel_lod;
machine->FetchTexelDeriv = fetch_texel_deriv;
}
diff --git a/src/mesa/swrast/s_span.c b/src/mesa/swrast/s_span.c
index 656a90a99a..4c58f8de87 100644
--- a/src/mesa/swrast/s_span.c
+++ b/src/mesa/swrast/s_span.c
@@ -1401,7 +1401,6 @@ _swrast_write_rgba_span( GLcontext *ctx, SWspan *span)
* Write to renderbuffers
*/
{
- const struct gl_fragment_program *fp = ctx->FragmentProgram._Current;
const GLuint numBuffers = fb->_NumColorDrawBuffers;
const GLboolean multiFragOutputs = numBuffers > 1;
GLuint buf;
diff --git a/src/mesa/swrast/s_texstore.c b/src/mesa/swrast/s_texstore.c
index 3f49b40d9c..547d5b9ea0 100644
--- a/src/mesa/swrast/s_texstore.c
+++ b/src/mesa/swrast/s_texstore.c
@@ -305,7 +305,7 @@ _swrast_copy_teximage1d( GLcontext *ctx, GLenum target, GLint level,
/* GL_SGIS_generate_mipmap */
if (level == texObj->BaseLevel && texObj->GenerateMipmap) {
- _mesa_generate_mipmap(ctx, target, texUnit, texObj);
+ ctx->Driver.GenerateMipmap(ctx, target, texObj);
}
}
@@ -381,7 +381,7 @@ _swrast_copy_teximage2d( GLcontext *ctx, GLenum target, GLint level,
/* GL_SGIS_generate_mipmap */
if (level == texObj->BaseLevel && texObj->GenerateMipmap) {
- _mesa_generate_mipmap(ctx, target, texUnit, texObj);
+ ctx->Driver.GenerateMipmap(ctx, target, texObj);
}
}
@@ -450,7 +450,7 @@ _swrast_copy_texsubimage1d( GLcontext *ctx, GLenum target, GLint level,
/* GL_SGIS_generate_mipmap */
if (level == texObj->BaseLevel && texObj->GenerateMipmap) {
- _mesa_generate_mipmap(ctx, target, texUnit, texObj);
+ ctx->Driver.GenerateMipmap(ctx, target, texObj);
}
}
@@ -526,7 +526,7 @@ _swrast_copy_texsubimage2d( GLcontext *ctx,
/* GL_SGIS_generate_mipmap */
if (level == texObj->BaseLevel && texObj->GenerateMipmap) {
- _mesa_generate_mipmap(ctx, target, texUnit, texObj);
+ ctx->Driver.GenerateMipmap(ctx, target, texObj);
}
}
@@ -599,6 +599,6 @@ _swrast_copy_texsubimage3d( GLcontext *ctx,
/* GL_SGIS_generate_mipmap */
if (level == texObj->BaseLevel && texObj->GenerateMipmap) {
- _mesa_generate_mipmap(ctx, target, texUnit, texObj);
+ ctx->Driver.GenerateMipmap(ctx, target, texObj);
}
}
diff --git a/src/mesa/tnl/t_context.h b/src/mesa/tnl/t_context.h
index baf283ef0f..1ac508f033 100644
--- a/src/mesa/tnl/t_context.h
+++ b/src/mesa/tnl/t_context.h
@@ -388,7 +388,7 @@ struct tnl_clipspace
struct tnl_cache_item {
GLuint hash;
void *key;
- void *data;
+ struct gl_vertex_program *prog;
struct tnl_cache_item *next;
};
diff --git a/src/mesa/tnl/t_vp_build.c b/src/mesa/tnl/t_vp_build.c
index a7fd815a26..46446d4885 100644
--- a/src/mesa/tnl/t_vp_build.c
+++ b/src/mesa/tnl/t_vp_build.c
@@ -1464,21 +1464,22 @@ create_new_program( const struct state_key *key,
build_tnl_program( &p );
}
-static void *search_cache( struct tnl_cache *cache,
- GLuint hash,
- const void *key,
- GLuint keysize)
+
+static struct gl_vertex_program *
+search_cache(struct tnl_cache *cache, GLuint hash,
+ const void *key, GLuint keysize)
{
struct tnl_cache_item *c;
for (c = cache->items[hash % cache->size]; c; c = c->next) {
if (c->hash == hash && _mesa_memcmp(c->key, key, keysize) == 0)
- return c->data;
+ return c->prog;
}
return NULL;
}
+
static void rehash( struct tnl_cache *cache )
{
struct tnl_cache_item **items;
@@ -1501,15 +1502,16 @@ static void rehash( struct tnl_cache *cache )
cache->size = size;
}
-static void cache_item( struct tnl_cache *cache,
+static void cache_item( GLcontext *ctx,
+ struct tnl_cache *cache,
GLuint hash,
void *key,
- void *data )
+ struct gl_vertex_program *prog )
{
- struct tnl_cache_item *c = (struct tnl_cache_item*) _mesa_malloc(sizeof(*c));
+ struct tnl_cache_item *c = CALLOC_STRUCT(tnl_cache_item);
c->hash = hash;
c->key = key;
- c->data = data;
+ _mesa_reference_vertprog(ctx, &c->prog, prog);
if (++cache->n_items > cache->size * 1.5)
rehash(cache);
@@ -1540,6 +1542,8 @@ void _tnl_UpdateFixedFunctionProgram( GLcontext *ctx )
if (!ctx->VertexProgram._Current ||
ctx->VertexProgram._Current == ctx->VertexProgram._TnlProgram) {
+ struct gl_vertex_program *newProg;
+
/* Grab all the relevent state and put it in a single structure:
*/
key = make_state_key(ctx);
@@ -1547,33 +1551,34 @@ void _tnl_UpdateFixedFunctionProgram( GLcontext *ctx )
/* Look for an already-prepared program for this state:
*/
- ctx->VertexProgram._TnlProgram = (struct gl_vertex_program *)
- search_cache( tnl->vp_cache, hash, key, sizeof(*key) );
+ newProg = search_cache( tnl->vp_cache, hash, key, sizeof(*key));
/* OK, we'll have to build a new one:
*/
- if (!ctx->VertexProgram._TnlProgram) {
+ if (!newProg) {
+
if (0)
_mesa_printf("Build new TNL program\n");
- ctx->VertexProgram._TnlProgram = (struct gl_vertex_program *)
+ newProg = (struct gl_vertex_program *)
ctx->Driver.NewProgram(ctx, GL_VERTEX_PROGRAM_ARB, 0);
- create_new_program( key, ctx->VertexProgram._TnlProgram,
- ctx->Const.VertexProgram.MaxTemps );
+ create_new_program( key, newProg, ctx->Const.VertexProgram.MaxTemps );
if (ctx->Driver.ProgramStringNotify)
ctx->Driver.ProgramStringNotify( ctx, GL_VERTEX_PROGRAM_ARB,
- &ctx->VertexProgram._TnlProgram->Base );
+ &newProg->Base );
+
+ cache_item(ctx, tnl->vp_cache, hash, key, newProg);
- cache_item(tnl->vp_cache, hash, key, ctx->VertexProgram._TnlProgram );
+ _mesa_reference_vertprog(ctx, &ctx->VertexProgram._TnlProgram, newProg);
}
else {
FREE(key);
- if (0)
- _mesa_printf("Found existing TNL program for key %x\n", hash);
}
- ctx->VertexProgram._Current = ctx->VertexProgram._TnlProgram;
+
+ _mesa_reference_vertprog(ctx, &ctx->VertexProgram._TnlProgram, newProg);
+ _mesa_reference_vertprog(ctx, &ctx->VertexProgram._Current, newProg);
}
/* Tell the driver about the change. Could define a new target for
@@ -1606,7 +1611,7 @@ void _tnl_ProgramCacheDestroy( GLcontext *ctx )
for (c = tnl->vp_cache->items[i]; c; c = next) {
next = c->next;
FREE(c->key);
- FREE(c->data);
+ _mesa_reference_vertprog(ctx, &c->prog, NULL);
FREE(c);
}
diff --git a/src/mesa/vbo/vbo_exec_draw.c b/src/mesa/vbo/vbo_exec_draw.c
index 0ef26cdfe3..68ce7ba837 100644
--- a/src/mesa/vbo/vbo_exec_draw.c
+++ b/src/mesa/vbo/vbo_exec_draw.c
@@ -187,7 +187,7 @@ static void vbo_exec_bind_arrays( GLcontext *ctx )
arrays[attr].BufferObj = exec->vtx.bufferobj; /* NullBufferObj */
arrays[attr]._MaxElement = count; /* ??? */
- data += exec->vtx.attrsz[attr] * sizeof(GLfloat);
+ data += exec->vtx.attrsz[src] * sizeof(GLfloat);
}
}
}
diff --git a/src/mesa/vbo/vbo_save_draw.c b/src/mesa/vbo/vbo_save_draw.c
index ee6df22605..bf5c6d4eef 100644
--- a/src/mesa/vbo/vbo_save_draw.c
+++ b/src/mesa/vbo/vbo_save_draw.c
@@ -146,7 +146,7 @@ static void vbo_bind_vertex_list( GLcontext *ctx,
assert(arrays[attr].BufferObj->Name);
- data += node->attrsz[attr] * sizeof(GLfloat);
+ data += node->attrsz[src] * sizeof(GLfloat);
}
}
}
diff --git a/src/mesa/x86-64/Makefile b/src/mesa/x86-64/Makefile
index 252218ca86..c6b69bafe8 100644
--- a/src/mesa/x86-64/Makefile
+++ b/src/mesa/x86-64/Makefile
@@ -19,7 +19,7 @@ INCLUDE_DIRS = \
default: matypes.h
clean:
- rm -f matypes.h
+ -rm -f matypes.h
# need some special rules here, unfortunately
diff --git a/src/mesa/x86/Makefile b/src/mesa/x86/Makefile
index 3c6a6b11c0..dc8c7f355e 100644
--- a/src/mesa/x86/Makefile
+++ b/src/mesa/x86/Makefile
@@ -17,7 +17,7 @@ INCLUDE_DIRS = \
default: gen_matypes matypes.h
clean:
- rm -f matypes.h gen_matypes
+ -rm -f matypes.h gen_matypes
gen_matypes: gen_matypes.c
diff --git a/src/mesa/x86/read_rgba_span_x86.S b/src/mesa/x86/read_rgba_span_x86.S
index 2e5c3be83f..80144b889c 100644
--- a/src/mesa/x86/read_rgba_span_x86.S
+++ b/src/mesa/x86/read_rgba_span_x86.S
@@ -434,7 +434,8 @@ _generic_read_RGBA_span_BGRA8888_REV_SSE2:
je .L47
movq (%ebx), %xmm0
-
+ addl $8, %ebx
+
movdqa %xmm0, %xmm3
movdqa %xmm0, %xmm4
andps %xmm1, %xmm0
@@ -448,6 +449,7 @@ _generic_read_RGBA_span_BGRA8888_REV_SSE2:
orps %xmm3, %xmm0
movq %xmm0, (%ecx)
+ addl $8, %ecx
.L47:
testl $1, %edx
diff --git a/windows/VC8/mesa/mesa.sln b/windows/VC8/mesa/mesa.sln
index 46d361ae28..5eff488430 100644
--- a/windows/VC8/mesa/mesa.sln
+++ b/windows/VC8/mesa/mesa.sln
@@ -6,6 +6,9 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "gdi", "gdi\gdi.vcproj", "{A
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "glu", "glu\glu.vcproj", "{2E50FDAF-430B-475B-AE6B-60B68F2875BA}"
+ ProjectSection(ProjectDependencies) = postProject
+ {A1B24907-E196-4826-B6AF-26723629B633} = {A1B24907-E196-4826-B6AF-26723629B633}
+ EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mesa", "mesa\mesa.vcproj", "{2120C974-2717-4709-B44F-D6E6D0A56448}"
EndProject