summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbrianp <brianp>2000-06-08 14:38:13 +0000
committerbrianp <brianp>2000-06-08 14:38:13 +0000
commitd17039a0dac43e745db16c16dd30060ff1855ecf (patch)
tree7cf72267df12e4cb97f627805e735d2d485a96a2
parenta425b9b17d33766e0153c242d04296b9cde9a926 (diff)
Merged glxmisc-3-0-0glxmisc-3-0-0-20000608-merge
-rw-r--r--xc/config/cf/Imake.tmpl88
-rw-r--r--xc/config/cf/X11.tmpl249
-rw-r--r--xc/config/cf/linux.cf4
-rw-r--r--xc/extras/Mesa/include/GL/gl.h315
-rw-r--r--xc/extras/Mesa/include/GL/glext.h384
-rw-r--r--xc/extras/Mesa/include/GL/osmesa.h246
-rw-r--r--xc/extras/Mesa/src/FX/fxapi.c5
-rw-r--r--xc/extras/Mesa/src/FX/fxdd.c3
-rw-r--r--xc/extras/Mesa/src/FX/fxddtex.c66
-rw-r--r--xc/extras/Mesa/src/FX/fxdrv.h10
-rw-r--r--xc/extras/Mesa/src/FX/fxglidew.c17
-rw-r--r--xc/extras/Mesa/src/FX/fxsetup.c10
-rw-r--r--xc/extras/Mesa/src/FX/fxtritmp.h23
-rw-r--r--xc/extras/Mesa/src/OSmesa/osmesa.c1637
-rw-r--r--xc/extras/Mesa/src/X/fakeglx.c27
-rw-r--r--xc/extras/Mesa/src/X/xfonts.c8
-rw-r--r--xc/extras/Mesa/src/X/xmesa1.c20
-rw-r--r--xc/extras/Mesa/src/X/xmesa2.c5
-rw-r--r--xc/extras/Mesa/src/X/xmesa3.c5
-rw-r--r--xc/extras/Mesa/src/X/xmesa4.c5
-rw-r--r--xc/extras/Mesa/src/X/xmesaP.h5
-rw-r--r--xc/extras/Mesa/src/X86/glapi_x86.S3862
-rw-r--r--xc/extras/Mesa/src/X86/vertex_3dnow.S2
-rw-r--r--xc/extras/Mesa/src/X86/x86.c15
-rw-r--r--xc/extras/Mesa/src/alphabuf.c4
-rw-r--r--xc/extras/Mesa/src/attrib.c6
-rw-r--r--xc/extras/Mesa/src/bitmap.c4
-rw-r--r--xc/extras/Mesa/src/colortab.c65
-rw-r--r--xc/extras/Mesa/src/config.h7
-rw-r--r--xc/extras/Mesa/src/context.c462
-rw-r--r--xc/extras/Mesa/src/context.h135
-rw-r--r--xc/extras/Mesa/src/copypix.c12
-rw-r--r--xc/extras/Mesa/src/dd.h69
-rw-r--r--xc/extras/Mesa/src/ddsample.c9
-rw-r--r--xc/extras/Mesa/src/dlist.c832
-rw-r--r--xc/extras/Mesa/src/dlist.h2
-rw-r--r--xc/extras/Mesa/src/drawpix.c1
-rw-r--r--xc/extras/Mesa/src/enable.c57
-rw-r--r--xc/extras/Mesa/src/extensions.c15
-rw-r--r--xc/extras/Mesa/src/feedback.c1
-rw-r--r--xc/extras/Mesa/src/fog.c2
-rw-r--r--xc/extras/Mesa/src/get.c450
-rw-r--r--xc/extras/Mesa/src/glapi.c771
-rw-r--r--xc/extras/Mesa/src/glapioffsets.h10
-rw-r--r--xc/extras/Mesa/src/glapitable.h12
-rw-r--r--xc/extras/Mesa/src/glapitemp.h432
-rw-r--r--xc/extras/Mesa/src/glheader.h88
-rw-r--r--xc/extras/Mesa/src/hint.c14
-rw-r--r--xc/extras/Mesa/src/image.c45
-rw-r--r--xc/extras/Mesa/src/image.h2
-rw-r--r--xc/extras/Mesa/src/imaging.c1374
-rw-r--r--xc/extras/Mesa/src/imaging.h2
-rw-r--r--xc/extras/Mesa/src/lines.c88
-rw-r--r--xc/extras/Mesa/src/lnaatemp.h2
-rw-r--r--xc/extras/Mesa/src/mem.h8
-rw-r--r--xc/extras/Mesa/src/pb.c75
-rw-r--r--xc/extras/Mesa/src/pb.h237
-rw-r--r--xc/extras/Mesa/src/pixel.c72
-rw-r--r--xc/extras/Mesa/src/points.c394
-rw-r--r--xc/extras/Mesa/src/readpix.c6
-rw-r--r--xc/extras/Mesa/src/span.c7
-rw-r--r--xc/extras/Mesa/src/state.c195
-rw-r--r--xc/extras/Mesa/src/state.h7
-rw-r--r--xc/extras/Mesa/src/teximage.c955
-rw-r--r--xc/extras/Mesa/src/teximage.h59
-rw-r--r--xc/extras/Mesa/src/texobj.c129
-rw-r--r--xc/extras/Mesa/src/texobj.h7
-rw-r--r--xc/extras/Mesa/src/texstate.c186
-rw-r--r--xc/extras/Mesa/src/texture.c221
-rw-r--r--xc/extras/Mesa/src/texture.h3
-rw-r--r--xc/extras/Mesa/src/types.h1647
-rw-r--r--xc/extras/Mesa/src/vb.c6
-rw-r--r--xc/extras/Mesa/src/vbrender.c3
-rw-r--r--xc/include/GL/Imakefile3
-rw-r--r--xc/lib/GL/Imakefile7
-rw-r--r--xc/lib/GL/dri/XF86dri.c7
-rw-r--r--xc/lib/GL/dri/dri_glx.c6
-rw-r--r--xc/lib/GL/dri/dri_glx.h6
-rw-r--r--xc/lib/GL/dri/xf86dristr.h16
-rw-r--r--xc/lib/GL/glx/glxcmds.c3
-rw-r--r--xc/lib/GL/mesa/dri/dri_mesa.c37
-rw-r--r--xc/lib/GL/mesa/dri/dri_mesa.h3
-rw-r--r--xc/lib/GL/mesa/dri/dri_mesaint.h20
-rw-r--r--xc/lib/GL/mesa/include/GL/Imakefile1
-rw-r--r--xc/lib/GL/mesa/src/Imakefile2
-rw-r--r--xc/lib/GL/mesa/src/OSmesa/Imakefile249
-rw-r--r--xc/lib/GL/mesa/src/drv/gamma/gamma_xmesa.c50
-rw-r--r--xc/lib/GL/mesa/src/drv/i810/i810_xmesa.c53
-rw-r--r--xc/lib/GL/mesa/src/drv/i810/i810dd.c2
-rw-r--r--xc/lib/GL/mesa/src/drv/i810/i810tris.c1
-rw-r--r--xc/lib/GL/mesa/src/drv/mga/mga_xmesa.c57
-rw-r--r--xc/lib/GL/mesa/src/drv/mga/mgadd.c6
-rw-r--r--xc/lib/GL/mesa/src/drv/mga/mgafastpath.c8
-rw-r--r--xc/lib/GL/mesa/src/drv/mga/mgalib.h8
-rw-r--r--xc/lib/GL/mesa/src/drv/mga/mgaspan.c8
-rw-r--r--xc/lib/GL/mesa/src/drv/mga/mgavb.c4
-rw-r--r--xc/lib/GL/mesa/src/drv/r128/r128_dd.c2
-rw-r--r--xc/lib/GL/mesa/src/drv/r128/r128_screen.c40
-rw-r--r--xc/lib/GL/mesa/src/drv/r128/r128_xmesa.c5
-rw-r--r--xc/lib/GL/mesa/src/drv/tdfx/tdfx_xmesa.c78
-rw-r--r--xc/programs/Xserver/GL/dri/dri.c226
-rw-r--r--xc/programs/Xserver/GL/dri/dri.h289
-rw-r--r--xc/programs/Xserver/GL/dri/xf86dri.c13
-rw-r--r--xc/programs/Xserver/GL/glx/glxscreens.c5
-rw-r--r--xc/programs/Xserver/GL/mesa/src/X/xf86glx.c14
-rw-r--r--xc/programs/Xserver/Imakefile3
-rw-r--r--xc/programs/Xserver/hw/xfree86/drivers/glint/glint.h10
-rw-r--r--xc/programs/Xserver/hw/xfree86/drivers/glint/glint_dri.c43
-rw-r--r--xc/programs/Xserver/hw/xfree86/drivers/glint/glint_driver.c13
-rw-r--r--xc/programs/Xserver/hw/xfree86/drivers/i810/i810.h8
-rw-r--r--xc/programs/Xserver/hw/xfree86/drivers/i810/i810_dri.c307
-rw-r--r--xc/programs/Xserver/hw/xfree86/drivers/i810/i810_driver.c11
-rw-r--r--xc/programs/Xserver/hw/xfree86/drivers/mga/mga.h7
-rw-r--r--xc/programs/Xserver/hw/xfree86/drivers/mga/mga_dri.c578
-rw-r--r--xc/programs/Xserver/hw/xfree86/drivers/mga/mga_driver.c13
-rw-r--r--xc/programs/Xserver/hw/xfree86/drivers/mga/mga_wrap.c4
-rw-r--r--xc/programs/Xserver/hw/xfree86/drivers/r128/r128.h4
-rw-r--r--xc/programs/Xserver/hw/xfree86/drivers/r128/r128_dri.c50
-rw-r--r--xc/programs/Xserver/hw/xfree86/drivers/tdfx/tdfx.h12
-rw-r--r--xc/programs/Xserver/hw/xfree86/drivers/tdfx/tdfx_accel.c2
-rw-r--r--xc/programs/Xserver/hw/xfree86/drivers/tdfx/tdfx_dri.c70
-rw-r--r--xc/programs/Xserver/hw/xfree86/drivers/tdfx/tdfx_driver.c12
-rw-r--r--xc/programs/Xserver/hw/xfree86/drivers/tdfx/tdfx_priv.c17
-rw-r--r--xc/programs/Xserver/hw/xfree86/loader/xf86sym.c2
-rw-r--r--xc/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel/Makefile.linux39
-rw-r--r--xc/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel/agpsupport.c5
-rw-r--r--xc/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel/auth.c6
-rw-r--r--xc/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel/bufs.c8
-rw-r--r--xc/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel/context.c5
-rw-r--r--xc/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel/ctxbitmap.c7
-rw-r--r--xc/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel/dma.c7
-rw-r--r--xc/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel/drawable.c5
-rw-r--r--xc/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel/drm.h8
-rw-r--r--xc/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel/drmP.h7
-rw-r--r--xc/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel/drmstat.c4
-rw-r--r--xc/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel/fops.c19
-rw-r--r--xc/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel/gamma_dma.c7
-rw-r--r--xc/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel/gamma_drv.c13
-rw-r--r--xc/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel/gamma_drv.h4
-rw-r--r--xc/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel/i810_bufs.c7
-rw-r--r--xc/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel/i810_context.c6
-rw-r--r--xc/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel/i810_dma.c9
-rw-r--r--xc/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel/i810_drv.c11
-rw-r--r--xc/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel/i810_drv.h6
-rw-r--r--xc/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel/init.c14
-rw-r--r--xc/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel/ioctl.c5
-rw-r--r--xc/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel/lists.c5
-rw-r--r--xc/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel/lock.c5
-rw-r--r--xc/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel/memory.c5
-rw-r--r--xc/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel/mga_bufs.c7
-rw-r--r--xc/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel/mga_context.c6
-rw-r--r--xc/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel/mga_dma.c9
-rw-r--r--xc/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel/mga_drm.h6
-rw-r--r--xc/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel/mga_drv.c16
-rw-r--r--xc/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel/mga_drv.h6
-rw-r--r--xc/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel/mga_state.c7
-rw-r--r--xc/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel/proc.c7
-rw-r--r--xc/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel/r128_drv.c6
-rw-r--r--xc/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel/tdfx_context.c8
-rw-r--r--xc/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel/tdfx_drv.c10
-rw-r--r--xc/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel/tdfx_drv.h3
-rw-r--r--xc/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel/vm.c6
-rw-r--r--xc/programs/Xserver/hw/xfree86/os-support/linux/drm/xf86drm.c108
-rw-r--r--xc/programs/Xserver/hw/xfree86/os-support/shared/drm/kernel/drm.h8
-rw-r--r--xc/programs/Xserver/hw/xfree86/os-support/shared/libc_wrapper.c12
-rw-r--r--xc/programs/Xserver/hw/xfree86/os-support/xf86_ansic.h2
-rw-r--r--xc/programs/Xserver/hw/xfree86/os-support/xf86_libc.h4
167 files changed, 13200 insertions, 5844 deletions
diff --git a/xc/config/cf/Imake.tmpl b/xc/config/cf/Imake.tmpl
index 774f3d290..432a3a241 100644
--- a/xc/config/cf/Imake.tmpl
+++ b/xc/config/cf/Imake.tmpl
@@ -5,7 +5,7 @@ XCOMM
XCOMM
XCOMM
XCOMM
-XCOMM $XFree86: xc/config/cf/Imake.tmpl,v 3.64 1999/08/14 10:48:58 dawes Exp $
+XCOMM $XFree86: xc/config/cf/Imake.tmpl,v 3.70 2000/03/07 14:31:34 dawes Exp $
XCOMM ----------------------------------------------------------------------
/*
@@ -105,6 +105,12 @@ XCOMM the platform-specific parameters - edit site.def to change
#ifndef HasVarDirectory
#define HasVarDirectory YES
#endif
+#ifndef UseEtcX11
+#define UseEtcX11 YES
+#endif
+#ifndef UseSeparateConfDir
+#define UseSeparateConfDir (UseEtcX11 || HasVarDirectory)
+#endif
#ifndef SystemV
#define SystemV NO /* SYSV (R3) */
#endif
@@ -126,6 +132,12 @@ XCOMM the platform-specific parameters - edit site.def to change
#ifndef HasGnuMake
#define HasGnuMake NO
#endif
+/*
+ * The following fixes a glitch with GNU make -j
+ */
+#ifndef ForceServerRemake
+#define ForceServerRemake HasGnuMake
+#endif
#ifndef HasBsdMake
#define HasBsdMake NO
#endif
@@ -158,8 +170,8 @@ XCOMM the platform-specific parameters - edit site.def to change
#endif
#endif
-#ifndef HasVarDirectory
-#define HasVarDirectory YES
+#ifndef HasSymLinks
+#define HasSymLinks YES
#endif
#include <Imake.rules>
@@ -289,6 +301,8 @@ XCOMM the platform-specific parameters - edit site.def to change
#define ByteOrder X_BIG_ENDIAN
#elif defined(i386Architecture)
#define ByteOrder X_LITTLE_ENDIAN
+#elif defined(ia64Architecture)
+#define ByteOrder X_LITTLE_ENDIAN
#elif defined(SparcArchitecture)
#define ByteOrder X_BIG_ENDIAN
#elif defined(AlphaArchitecture)
@@ -325,7 +339,7 @@ XCOMM the platform-specific parameters - edit site.def to change
#define HasKrb5 NO /* if you have Kerberos V5 */
#endif
#ifndef HasLatex
-#define HasLatex YES
+#define HasLatex NO
#endif
#ifndef HasShm
#if SystemV || SystemV4
@@ -401,17 +415,28 @@ NCURSESLIBDIR = NCursesLibDir
#ifdef NCursesIncDir
NCURSESINCDIR = NCursesIncDir
#endif
-#ifndef HasGlide
-#define HasGlide NO
+#ifndef HasGlide2
+#define HasGlide2 NO
+#endif
+#ifndef Glide2IncDir
+#if HasGlide2
+#define Glide2IncDir /usr/include/glide
+#else
+#define Glide2IncDir
+#endif
#endif
-#ifndef GlideIncDir
-#if HasGlide
-#define GlideIncDir /usr/include/glide
+GLIDE2INCDIR = Glide2IncDir
+#ifndef HasGlide3
+#define HasGlide3 NO
+#endif
+#ifndef Glide3IncDir
+#if HasGlide3
+#define Glide3IncDir /usr/include/glide3
#else
-#define GlideIncDir
+#define Glide3IncDir
#endif
#endif
-GLIDEINCDIR = GlideIncDir
+GLIDE3INCDIR = Glide3IncDir
#ifndef HasTk
#define HasTk NO
#endif
@@ -536,6 +561,15 @@ TCLIBDIR = TclLibDir
#endif
#endif
+/*
+ * SystemUsrLibDir is independent of ProjectRoot. It is used primarily
+ * to allow links for shared libraries in /usr/lib for compliance to
+ * various standards (e.g., Linux/OpenGL).
+ */
+#ifndef SystemUsrLibDir
+#define SystemUsrLibDir /usr/lib
+#endif
+
#ifndef ShLibDir
#define ShLibDir UsrLibDir
#endif
@@ -604,7 +638,7 @@ TCLIBDIR = TclLibDir
#define DriverManDefs -D__drivermansuffix__=$(DRIVERMANSUFFIX)
#endif
#ifndef ExtraManDefs
-#define ExtraManDefs /**/
+#define ExtraManDefs -D__projectroot__=$(PROJECTROOT)
#endif
#ifndef LogDirectory
@@ -615,6 +649,26 @@ TCLIBDIR = TclLibDir
#endif
#endif
+#ifndef HasVarRun
+#define HasVarRun NO
+#endif
+
+#ifndef VarRunDirectory
+#if HasVarRun
+#define VarRunDirectory /var/run
+#endif
+#endif
+
+#ifndef HasVarDb
+#define HasVarDb NO
+#endif
+
+#ifndef VarDbDirectory
+#if HasVarDb
+#define VarDbDirectory /var/db
+#endif
+#endif
+
#ifndef ConfigSrc
#define ConfigSrc $(TOP)/config
#endif
@@ -860,9 +914,6 @@ TCLIBDIR = TclLibDir
#ifndef CpCmd
#define CpCmd cp
#endif
-#ifndef HasSymLinks
-#define HasSymLinks YES
-#endif
#ifndef LnCmd /* can use cp instead of ln if necessary */
#if HasSymLinks
#define LnCmd ln -s
@@ -1218,6 +1269,7 @@ TCLIBDIR = TclLibDir
INCROOT = IncRoot /* base of where to put header files */
USRLIBDIR = UsrLibDir /* nonshared libraries */
VARLIBDIR = VarLibDir /* xdm runtime files */
+ SYSTEMUSRLIBDIR = SystemUsrLibDir /* system's "/usr/lib" */
SHLIBDIR = ShLibDir /* shared libraries */
LINTLIBDIR = LintlibDir /* lint libraries */
MANPATH = ManPath /* top of manual page tree */
@@ -1228,6 +1280,12 @@ TCLIBDIR = TclLibDir
MISCMANDIR = MiscManDir /* man pages for miscellaneous files */
DRIVERMANDIR = DriverManDir /* man pages for drivers */
LOGDIRECTORY = LogDirectory /* OS location of log files */
+#ifdef VarRunDirectory
+ VARRUNDIR = VarRunDirectory /* OS location of PID files */
+#endif
+#ifdef VarDbDirectory
+ VARDBDIR = VarDbDirectory /* OS location of db/state files */
+#endif
AR = ArCmd
BOOTSTRAPCFLAGS = BootstrapCFlags /* set if cpp does not have uniq sym */
diff --git a/xc/config/cf/X11.tmpl b/xc/config/cf/X11.tmpl
index 2d0691e2c..d55f6eb04 100644
--- a/xc/config/cf/X11.tmpl
+++ b/xc/config/cf/X11.tmpl
@@ -5,7 +5,7 @@ XCOMM
XCOMM
XCOMM
XCOMM
-XCOMM $XFree86: xc/config/cf/X11.tmpl,v 1.51 1999/08/28 09:00:18 dawes Exp $
+XCOMM $XFree86: xc/config/cf/X11.tmpl,v 1.62 2000/03/02 17:52:50 dawes Exp $
/***************************************************************************
* *
@@ -67,6 +67,9 @@ XCOMM $XFree86: xc/config/cf/X11.tmpl,v 1.51 1999/08/28 09:00:18 dawes Exp $
#ifndef BuildXTrueType
#define BuildXTrueType NO
#endif
+#ifndef BuildBuiltinFonts
+#define BuildBuiltinFonts NO
+#endif
#ifndef BuildFonts
#define BuildFonts (BuildServer | BuildFontServer)
#endif
@@ -148,6 +151,12 @@ XCOMM $XFree86: xc/config/cf/X11.tmpl,v 1.51 1999/08/28 09:00:18 dawes Exp $
#ifndef BuildDPMS
#define BuildDPMS YES
#endif
+#ifndef BuildFontCache
+#define BuildFontCache YES
+#endif
+#ifndef BuildFontCacheLib
+#define BuildFontCacheLib BuildFontCache
+#endif
#ifndef BuildLowMem
#define BuildLowMem NO
#endif
@@ -197,6 +206,9 @@ XCOMM $XFree86: xc/config/cf/X11.tmpl,v 1.51 1999/08/28 09:00:18 dawes Exp $
#ifndef BuildXinerama
#define BuildXinerama NO
#endif
+#ifndef BuildXineramaLibrary
+#define BuildXineramaLibrary BuildXinerama
+#endif
#ifndef BuildXCSecurity
#define BuildXCSecurity YES
#endif
@@ -247,15 +259,15 @@ XCOMM $XFree86: xc/config/cf/X11.tmpl,v 1.51 1999/08/28 09:00:18 dawes Exp $
#ifndef BuildXF86MiscLibrary
#define BuildXF86MiscLibrary BuildXF86MiscExt
#endif
+#ifndef BuildXF86BigfontExt
+#define BuildXF86BigfontExt NO
+#endif
#ifndef BuildXF86DGA
#define BuildXF86DGA NO
#endif
#ifndef BuildXF86DGALibrary
#define BuildXF86DGALibrary BuildXF86DGA
#endif
-#ifndef BuildXF86RushLibrary
-#define BuildXF86RushLibrary NO
-#endif
#ifndef BuildXvExt
#define BuildXvExt NO
#endif
@@ -274,6 +286,24 @@ XCOMM $XFree86: xc/config/cf/X11.tmpl,v 1.51 1999/08/28 09:00:18 dawes Exp $
#ifndef BuildGLXLibrary
#define BuildGLXLibrary BuildGlxExt
#endif
+#ifndef BuildXF86RushExt
+#define BuildXF86RushExt NO
+#endif
+#ifndef BuildXF86RushLibrary
+#define BuildXF86RushLibrary BuildXF86RushExt
+#endif
+#ifndef BuildDPSLibraries
+#define BuildDPSLibraries YES
+#endif
+#ifndef BuildDPSLibrary
+#define BuildDPSLibrary BuildDPSLibraries
+#endif
+#ifndef BuildDPSTkLibrary
+#define BuildDPSTkLibrary BuildDPSLibraries
+#endif
+#ifndef BuildPSResLibrary
+#define BuildPSResLibrary BuildDPSLibraries
+#endif
#ifndef BuildMiscDocs
#define BuildMiscDocs NO
@@ -620,6 +650,14 @@ FCHOWN_DEFINES = -DHAS_FCHOWN
#endif
#endif
+#ifndef XF86BigfontExtensionDefines
+#if BuildXF86BigfontExt
+#define XF86BigfontExtensionDefines -DXF86BIGFONT
+#else
+#define XF86BigfontExtensionDefines /**/
+#endif
+#endif
+
#ifndef XvExtensionDefines
#if BuildXvExt
#define XvExtensionDefines -DXV
@@ -684,13 +722,22 @@ FCHOWN_DEFINES = -DHAS_FCHOWN
#endif
#endif
+#ifndef FontCacheExtentionDefines
+#if BuildFontCache
+#define FontCacheExtensionDefines -DFONTCACHE
+#else
+#define FontCacheExtensionDefines /**/
+#endif
+#endif
+
#ifndef SitePervasiveExtensionDefines
#define SitePervasiveExtensionDefines /**/
#endif
#ifndef PervasiveExtensionDefines
#define PervasiveExtensionDefines \
ShapeDefines XInputDefines XkbDefines LbxDefines AppgroupDefines \
- XCSecurityDefines CupDefines PervasiveDBEDefines DPMSDefines \
+ XCSecurityDefines CupDefines PervasiveDBEDefines \
+ XF86BigfontExtensionDefines DPMSDefines \
LowMemDefines XprintDefines XineramaDefines \
SitePervasiveExtensionDefines
#endif
@@ -704,7 +751,7 @@ FCHOWN_DEFINES = -DHAS_FCHOWN
PexDefines ShmDefines XieDefines BigReqDefines VidModeExtensionDefines \
XF86MiscExtensionDefines DBEDefines DPMSDefines EVIDefines \
ScreenSaverExtensionDefines XvExtensionDefines XantiExtensionDefines \
- GlxDefines SiteExtensionDefines
+ GlxDefines FontCacheExtensionDefines SiteExtensionDefines
#endif
#define ExtensionDefines BaseExtensionDefines ExtensionOSDefines
#endif /* ExtensionDefines */
@@ -788,7 +835,11 @@ FCHOWN_DEFINES = -DHAS_FCHOWN
#define HasBlindFaithInUnicode YES
#endif
#ifndef XTrueTypeCConvModule
+#if DoLoadableServer
#define XTrueTypeCConvModule YES
+#else
+#define XTrueTypeCConvModule NO
+#endif
#endif
#ifndef XTrueTypeUseOptEncodings
#define XTrueTypeUseOptEncodings YES
@@ -799,6 +850,12 @@ FCHOWN_DEFINES = -DHAS_FCHOWN
#ifndef XTrueTypeInstallCConvHeaders
#define XTrueTypeInstallCConvHeaders YES
#endif
+#ifndef XTrueTypeCConvModuleDir
+#define XTrueTypeCConvModuleDir $(USRLIBDIR)/modules
+#endif
+#ifndef XTrueTypeCConvModuleSubDir
+#define XTrueTypeCConvModuleSubDir codeconv
+#endif
#ifndef XTrueTypeDebugXTT
#define XTrueTypeDebugXTT NO
#endif
@@ -878,6 +935,13 @@ FCHOWN_DEFINES = -DHAS_FCHOWN
#ifndef ModuleDir
#define ModuleDir $(USRLIBDIR)/modules
#endif
+#ifndef LibexecDir
+#ifdef ProjectRoot
+#define LibexecDir Concat(ProjectRoot,/libexec)
+#else
+#define LibexecDir /usr/X11/libexec
+#endif
+#endif
#ifndef ConfigDir
#define ConfigDir $(LIBDIR)/config
#endif
@@ -944,6 +1008,9 @@ FCHOWN_DEFINES = -DHAS_FCHOWN
#ifndef VarDirectory
#define VarDirectory /var/X11
#endif
+#ifndef EtcX11Directory
+#define EtcX11Directory /etc/X11
+#endif
#ifndef InstallSecurityConfig
#define InstallSecurityConfig YES /* Install sample security policy */
#endif
@@ -1034,12 +1101,21 @@ XCOMM X Window System make variables; these need to be coordinated with rules
INCDIR = $(INCROOT) /* header files */
ADMDIR = AdmDir /* server log files */
LIBDIR = LibDir /* rgb, XErrorDB, etc. */
+ LIBEXECDIR = LibexecDir
MODULEDIR = ModuleDir
TOP_X_INCLUDES = TopXInclude
#ifdef VarDirectory
VARDIR = VarDirectory
#endif
+#ifdef EtcX11Directory
+ ETCX11DIR = EtcX11Directory
+#endif
+#if UseEtcX11
+ CONFDIR = $(ETCX11DIR)
+#elif HasVarDirectory
+ CONFDIR = $(VARDIR)
+#endif
DOCDIR = DocDir
DOCHTMLDIR = DocHtmlDir
DOCPSDIR = DocPsDir
@@ -1265,6 +1341,67 @@ ProjectUnsharedLibReferences(XTHRSTUB,XThrStub,$(XTHRSTUBSRC),XBuildLibDir)
#endif
#endif
+#if BuildXineramaLibrary
+#ifndef SharedLibXinerama
+#define SharedLibXinerama NO
+#endif
+#ifndef NormalLibXinerama
+#define NormalLibXinerama YES
+#endif
+#ifndef DebugLibXinerama
+#define DebugLibXinerama NO
+#endif
+#ifndef ProfileLibXinerama
+#define ProfileLibXinerama NO
+#endif
+#endif
+
+
+#if BuildDPSLibrary
+#ifndef SharedLibDps
+#define SharedLibDps HasSharedLibraries
+#endif
+#ifndef NormalLibDps
+#define NormalLibDps YES
+#endif
+#ifndef DebugLibDps
+#define DebugLibDps NO
+#endif
+#ifndef ProfileLibDps
+#define ProfileLibDps NO
+#endif
+#endif
+
+#if BuildDPSTkLibrary
+#ifndef SharedLibDpsTk
+#define SharedLibDpsTk HasSharedLibraries
+#endif
+#ifndef NormalLibDpsTk
+#define NormalLibDpsTk YES
+#endif
+#ifndef DebugLibDpsTk
+#define DebugLibDpsTk NO
+#endif
+#ifndef ProfileLibDpsTk
+#define ProfileLibDpsTk NO
+#endif
+#endif
+
+#if BuildPSResLibrary
+#ifndef SharedLibPSRes
+#define SharedLibPSRes HasSharedLibraries
+#endif
+#ifndef NormalLibPSRes
+#define NormalLibPSRes YES
+#endif
+#ifndef DebugLibPSRes
+#define DebugLibPSRes NO
+#endif
+#ifndef ProfileLibPSRes
+#define ProfileLibPSRes NO
+#endif
+#endif
+
#if BuildXantiLibrary
#ifndef SharedLibXanti
#define SharedLibXanti NO
@@ -1285,7 +1422,7 @@ ProjectUnsharedLibReferences(XTHRSTUB,XThrStub,$(XTHRSTUBSRC),XBuildLibDir)
#define SharedLibGlx HasSharedLibraries
#endif
#ifndef NormalLibGlx
-#define NormalLibGlx YES
+#define NormalLibGlx (!SharedLibX11 | ForceNormalLib)
#endif
#ifndef DebugLibGlx
#define DebugLibGlx NO
@@ -1293,6 +1430,9 @@ ProjectUnsharedLibReferences(XTHRSTUB,XThrStub,$(XTHRSTUBSRC),XBuildLibDir)
#ifndef ProfileLibGlx
#define ProfileLibGlx NO
#endif
+#ifndef LinkGLToUsrLib
+#define LinkGLToUsrLib NO
+#endif
#endif
#ifndef SharedLibXext
@@ -1395,6 +1535,54 @@ ProjectUnsharedLibReferences(XV,Xv,$(XVLIBSRC),XBuildLibDir)
#endif
#endif
+#if BuildXineramaLibrary
+ XINERAMALIBSRC = $(LIBSRC)/Xinerama
+#if SharedLibXinerama
+#ifndef SharedXineramaRev
+#define SharedXineramaRev 1.0
+#endif
+SharedLibReferences(XINERAMA,Xinerama,$(XINERAMALIBSRC),SOXINERAMAREV,SharedXineramaRev)
+#else
+ProjectUnsharedLibReferences(XINERAMA,Xinerama,$(XINERAMALIBSRC),XBuildLibDir)
+#endif
+#endif
+
+#if BuildDPSLibrary
+ DPSLIBSRC = $(LIBSRC)/dps
+#if SharedLibDps
+#ifndef SharedDpsRev
+#define SharedDpsRev 1.0
+#endif
+SharedLibReferences(DPS,dps,$(DPSLIBSRC),SODPSREV,SharedDpsRev)
+#else
+ProjectUnsharedLibReferences(DPS,dps,$(DPSLIBSRC),XBuildLibDir)
+#endif
+#endif
+
+#if BuildDPSTkLibrary
+ DPSTKLIBSRC = $(LIBSRC)/dpstk
+#if SharedLibDpsTk
+#ifndef SharedDpsTkRev
+#define SharedDpsTkRev 1.0
+#endif
+SharedLibReferences(DPSTK,dpstk,$(DPSTKLIBSRC),SODPSTKREV,SharedDpsTkRev)
+#else
+ProjectUnsharedLibReferences(DPSTK,dpstk,$(DPSTKLIBSRC),XBuildLibDir)
+#endif
+#endif
+
+#if BuildPSResLibrary
+ PSRESLIBSRC = $(LIBSRC)/psres
+#if SharedLibPSRes
+#ifndef SharedPSResRev
+#define SharedPSResRev 1.0
+#endif
+SharedLibReferences(PSRES,psres,$(PSRESLIBSRC),SOPSRESREV,SharedPSResRev)
+#else
+ProjectUnsharedLibReferences(PSRES,psres,$(PSRESLIBSRC),XBuildLibDir)
+#endif
+#endif
+
#if BuildXantiLibrary
XANTILIBSRC = $(LIBSRC)/Xanti
#if SharedLibXanti
@@ -1421,6 +1609,30 @@ ProjectUnsharedLibReferences(GLX,GL,$(GLXLIBSRC),XBuildLibDir)
+#if BuildFontCacheLib
+# ifndef SharedLibXfontcache
+# define SharedLibXfontcache NO
+# endif
+# ifndef NormalLibXfontcache
+# define NormalLibXfontcache YES
+# endif
+# ifndef DebugLibXfontcache
+# define DebugLibXfontcache NO
+# endif
+# ifndef ProfileLibXfontcache
+# define ProfileLibXfontcache NO
+# endif
+ XFONTCACHELIBSRC = $(LIBSRC)/Xfontcache
+#if SharedLibXfontcache
+#ifndef SharedXfontcacheRev
+#define SharedXfontcacheRev 1.2
+#endif
+SharedLibReferences(XFONTCACHE,Xfontcache,$(XFONTCACHELIBSRC),SOXFONTCACHEREV,SharedXfontcacheRev)
+#else
+ProjectUnsharedLibReferences(XFONTCACHE,Xfontcache,$(XFONTCACHELIBSRC),XBuildLibDir)
+#endif
+#endif
+
#ifndef SharedLibXau
#define SharedLibXau NO /* don't need shared form */
#endif
@@ -1480,7 +1692,7 @@ ProjectUnsharedLibReferences(XDMCP,Xdmcp,$(XDMCPLIBSRC),XBuildLibDir)
XMUSRC = $(LIBSRC)/Xmu
#if SharedLibXmu
#ifndef SharedXmuRev
-#define SharedXmuRev 6.0
+#define SharedXmuRev 6.1
#endif
SharedDSLibReferences(XMU,Xmu,$(XMUSRC),SOXMUREV,SharedXmuRev)
#else
@@ -1838,11 +2050,13 @@ ProjectUnsharedLibReferences(FS,FS,$(FSLIBSRC),XBuildLibDir)
FONTLIBSRC = $(LIBSRC)/font
#if SharedLibFont
#ifndef SharedFontRev
-#define SharedFontRev 1.0
+#define SharedFontRev 1.3
#endif
-SharedLibReferences(XFONT,Xfont,$(FONTLIBSRC),SOFONTREV,SharedFontRev)
+SharedFontLibReferences()
+XCOMM SharedLibReferences(XFONT,Xfont,$(FONTLIBSRC),SOFONTREV,SharedFontRev)
#else
-ProjectUnsharedLibReferences(XFONT,Xfont,$(FONTLIBSRC),XBuildLibDir)
+ProjectUnsharedFontLibReferences()
+XCOMM ProjectUnsharedLibReferences(XFONT,Xfont,$(FONTLIBSRC),XBuildLibDir)
#endif
FONTSTUBLIBSRC = $(FONTLIBSRC)/stubs
@@ -1973,11 +2187,11 @@ ProjectUnsharedLibReferences(XKBUI,xkbui,$(XKBUILIBSRC),XBuildLibDir)
#ifndef InstallAppDefaultsLong
#if InstallAppDefFiles
#define InstallAppDefaultsLong(file,class) @@\
-LinkVarDirectory(app-defaults,.,app-defaults,.) @@\
+LinkConfDirectory(app-defaults,.,app-defaults,.) @@\
InstallNamedTarget(install,file.ad,$(INSTAPPFLAGS),$(XAPPLOADDIR),class)
#else
#define InstallAppDefaultsLong(file,class) @@\
-LinkVarDirectory(app-defaults,.,app-defaults,.) @@\
+LinkConfDirectory(app-defaults,.,app-defaults,.) @@\
InstallNamedTargetNoClobber(install,file.ad,$(INSTAPPFLAGS),$(XAPPLOADDIR),class)
#endif /* InstallAppDefFiles */
#endif /* InstallAppDefaultsLong */
@@ -2193,7 +2407,7 @@ clean:: @@\
#ifndef MakeSimpleDoc
#define MakeSimpleDoc(file,srcs) @@\
-all:: file.PS @@\
+all:: file.PS file.txt @@\
.PRECIOUS: file.PS @@\
@@\
file.PS: srcs @@\
@@ -2210,7 +2424,7 @@ clean:: @@\
#ifndef MakeTblDoc
#define MakeTblDoc(file,srcs) @@\
-all:: file.PS @@\
+all:: file.PS file.txt @@\
.PRECIOUS: file.PS @@\
@@\
file.PS: srcs @@\
@@ -2227,7 +2441,7 @@ clean:: @@\
#ifndef MakeEqnDoc
#define MakeEqnDoc(file,srcs) @@\
-all:: file.PS @@\
+all:: file.PS file.txt @@\
.PRECIOUS: file.PS @@\
@@\
file.PS: srcs @@\
@@ -2280,7 +2494,7 @@ file.PS: src @@\
#endif /* MakeLatexDoc */
#ifndef InstallDoc
-#define InstallDoc(name,deps) @@\
+#define InstallDoc(name,deps) @@\
install:: deps @@\
MakeDir($(DESTDIR)$(DOCPSDIR)) @@\
@if [ -f name.PS ]; then set -x; \ @@\
@@ -2293,5 +2507,6 @@ install:: deps @@\
#endif
#ifndef InstallRoffDoc
+
#define InstallRoffDoc(name) InstallDoc(name,name.PS name.txt)
#endif
diff --git a/xc/config/cf/linux.cf b/xc/config/cf/linux.cf
index d51ba9785..be7f79931 100644
--- a/xc/config/cf/linux.cf
+++ b/xc/config/cf/linux.cf
@@ -512,6 +512,10 @@ XCOMM binutils: (LinuxBinUtilsMajorVersion)
#define StaticLibrary(libpath,libname) -Wl,-Bstatic Concat(-L,libpath) Concat(-l,libname) -Wl,-Bdynamic
#endif
+#ifndef LinkGLToUsrLib
+#define LinkGLToUsrLib YES
+#endif
+
#define HasGnuMake YES
#define MakeNamedTargetSubdir(dir,flags,subname)\
diff --git a/xc/extras/Mesa/include/GL/gl.h b/xc/extras/Mesa/include/GL/gl.h
index b5323f4b0..f7d1224cf 100644
--- a/xc/extras/Mesa/include/GL/gl.h
+++ b/xc/extras/Mesa/include/GL/gl.h
@@ -32,115 +32,57 @@
#endif
+/**********************************************************************
+ * Begin system-specific stuff.
+ */
#if defined(__BEOS__)
#include <stdlib.h> /* to get some BeOS-isms */
#endif
-
#if !defined(OPENSTEP) && (defined(NeXT) || defined(NeXT_PDO))
#define OPENSTEP
#endif
-
-/*
- * XXX move as many of these pragma's and MS Windows-isms into
- * the new src/glheader.h file.
- */
-
#if defined(_WIN32) && !defined(__WIN32__)
-# define __WIN32__
+#define __WIN32__
#endif
-#if !defined(OPENSTEP) && (defined(__WIN32__) || defined(__CYGWIN32__))
-# pragma warning( disable : 4068 ) /* unknown pragma */
-# pragma warning( disable : 4710 ) /* function 'foo' not inlined */
-# pragma warning( disable : 4711 ) /* function 'foo' selected for automatic inline expansion */
-# pragma warning( disable : 4127 ) /* conditional expression is constant */
-# if defined(MESA_MINWARN)
-# pragma warning( disable : 4244 ) /* '=' : conversion from 'const double ' to 'float ', possible loss of data */
-# pragma warning( disable : 4018 ) /* '<' : signed/unsigned mismatch */
-# pragma warning( disable : 4305 ) /* '=' : truncation from 'const double ' to 'float ' */
-# pragma warning( disable : 4550 ) /* 'function' undefined; assuming extern returning int */
-# pragma warning( disable : 4761 ) /* integral size mismatch in argument; conversion supplied */
-# endif
+#if !defined(OPENSTEP) && (defined(__WIN32__) || defined(__CYGWIN__))
# if defined(_MSC_VER) && defined(BUILD_GL32) /* tag specify we're building mesa as a DLL */
# define GLAPI __declspec(dllexport)
-# define WGLAPI __declspec(dllexport)
# elif defined(_MSC_VER) && defined(_DLL) /* tag specifying we're building for DLL runtime support */
# define GLAPI __declspec(dllimport)
-# define WGLAPI __declspec(dllimport)
# else /* for use with static link lib build of Win32 edition only */
# define GLAPI extern
-# define WGLAPI __declspec(dllimport)
# endif /* _STATIC_MESA support */
# define GLAPIENTRY __stdcall
-# define GLAPIENTRYP __stdcall *
-# define GLCALLBACK __stdcall
-# define GLCALLBACKP __stdcall *
-# if defined(__CYGWIN32__)
-# define GLCALLBACKPCAST *
-# else
-# define GLCALLBACKPCAST __stdcall *
-# endif
-# define GLWINAPI __stdcall
-# define GLWINAPIV __cdecl
#else
/* non-Windows compilation */
# define GLAPI extern
# define GLAPIENTRY
-# define GLAPIENTRYP *
-# define GLCALLBACK
-# define GLCALLBACKP *
-# define GLCALLBACKPCAST *
-# define GLWINAPI
-# define GLWINAPIV
-#endif /* WIN32 / CYGWIN32 bracket */
-
-/* compatability guard so we don't need to change client code */
-
-#if defined(_WIN32) && !defined(_WINDEF_) && !defined(_GNU_H_WINDOWS32_BASE) && !defined(OPENSTEP)
-# define CALLBACK GLCALLBACK
-typedef int (GLAPIENTRY *PROC)();
-typedef void *HGLRC;
-typedef void *HDC;
-typedef unsigned long COLORREF;
-#endif
+#endif /* WIN32 / CYGWIN bracket */
#if defined(_WIN32) && !defined(_WINGDI_) && !defined(_GNU_H_WINDOWS32_DEFINES) && !defined(OPENSTEP)
-# define WGL_FONT_LINES 0
-# define WGL_FONT_POLYGONS 1
-#ifndef _GNU_H_WINDOWS32_FUNCTIONS
-# ifdef UNICODE
-# define wglUseFontBitmaps wglUseFontBitmapsW
-# define wglUseFontOutlines wglUseFontOutlinesW
-# else
-# define wglUseFontBitmaps wglUseFontBitmapsA
-# define wglUseFontOutlines wglUseFontOutlinesA
-# endif /* !UNICODE */
-#endif /* _GNU_H_WINDOWS32_FUNCTIONS */
-typedef struct tagLAYERPLANEDESCRIPTOR LAYERPLANEDESCRIPTOR, *PLAYERPLANEDESCRIPTOR, *LPLAYERPLANEDESCRIPTOR;
-typedef struct _GLYPHMETRICSFLOAT GLYPHMETRICSFLOAT, *PGLYPHMETRICSFLOAT, *LPGLYPHMETRICSFLOAT;
-typedef struct tagPIXELFORMATDESCRIPTOR PIXELFORMATDESCRIPTOR, *PPIXELFORMATDESCRIPTOR, *LPPIXELFORMATDESCRIPTOR;
#include <gl/mesa_wgl.h>
#endif
-#ifdef __cplusplus
-extern "C" {
+#if defined(macintosh) && PRAGMA_IMPORT_SUPPORTED
+#pragma import on
#endif
+/*
+ * End system-specific stuff.
+ **********************************************************************/
+
-#ifdef macintosh
- #pragma enumsalwaysint on
- #if PRAGMA_IMPORT_SUPPORTED
- #pragma import on
- #endif
+#ifdef __cplusplus
+extern "C" {
#endif
#define GL_VERSION_1_1 1
#define GL_VERSION_1_2 1
-#define GL_HAS_GLEXT 1
@@ -1780,14 +1722,93 @@ GLAPI void GLAPIENTRY glGetSeparableFilter( GLenum target, GLenum format,
-
/*
- * XXX these extensions may eventually be moved into glext.h
+ * GL_ARB_multitexture (ARB extension 1 and OpenGL 1.2.1)
*/
+#ifndef GL_ARB_multitexture
+#define GL_ARB_multitexture 1
+
+#define GL_TEXTURE0_ARB 0x84C0
+#define GL_TEXTURE1_ARB 0x84C1
+#define GL_TEXTURE2_ARB 0x84C2
+#define GL_TEXTURE3_ARB 0x84C3
+#define GL_TEXTURE4_ARB 0x84C4
+#define GL_TEXTURE5_ARB 0x84C5
+#define GL_TEXTURE6_ARB 0x84C6
+#define GL_TEXTURE7_ARB 0x84C7
+#define GL_TEXTURE8_ARB 0x84C8
+#define GL_TEXTURE9_ARB 0x84C9
+#define GL_TEXTURE10_ARB 0x84CA
+#define GL_TEXTURE11_ARB 0x84CB
+#define GL_TEXTURE12_ARB 0x84CC
+#define GL_TEXTURE13_ARB 0x84CD
+#define GL_TEXTURE14_ARB 0x84CE
+#define GL_TEXTURE15_ARB 0x84CF
+#define GL_TEXTURE16_ARB 0x84D0
+#define GL_TEXTURE17_ARB 0x84D1
+#define GL_TEXTURE18_ARB 0x84D2
+#define GL_TEXTURE19_ARB 0x84D3
+#define GL_TEXTURE20_ARB 0x84D4
+#define GL_TEXTURE21_ARB 0x84D5
+#define GL_TEXTURE22_ARB 0x84D6
+#define GL_TEXTURE23_ARB 0x84D7
+#define GL_TEXTURE24_ARB 0x84D8
+#define GL_TEXTURE25_ARB 0x84D9
+#define GL_TEXTURE26_ARB 0x84DA
+#define GL_TEXTURE27_ARB 0x84DB
+#define GL_TEXTURE28_ARB 0x84DC
+#define GL_TEXTURE29_ARB 0x84DD
+#define GL_TEXTURE30_ARB 0x84DE
+#define GL_TEXTURE31_ARB 0x84DF
+#define GL_ACTIVE_TEXTURE_ARB 0x84E0
+#define GL_CLIENT_ACTIVE_TEXTURE_ARB 0x84E1
+#define GL_MAX_TEXTURE_UNITS_ARB 0x84E2
+
+GLAPI void GLAPIENTRY glActiveTextureARB(GLenum texture);
+GLAPI void GLAPIENTRY glClientActiveTextureARB(GLenum texture);
+GLAPI void GLAPIENTRY glMultiTexCoord1dARB(GLenum target, GLdouble s);
+GLAPI void GLAPIENTRY glMultiTexCoord1dvARB(GLenum target, const GLdouble *v);
+GLAPI void GLAPIENTRY glMultiTexCoord1fARB(GLenum target, GLfloat s);
+GLAPI void GLAPIENTRY glMultiTexCoord1fvARB(GLenum target, const GLfloat *v);
+GLAPI void GLAPIENTRY glMultiTexCoord1iARB(GLenum target, GLint s);
+GLAPI void GLAPIENTRY glMultiTexCoord1ivARB(GLenum target, const GLint *v);
+GLAPI void GLAPIENTRY glMultiTexCoord1sARB(GLenum target, GLshort s);
+GLAPI void GLAPIENTRY glMultiTexCoord1svARB(GLenum target, const GLshort *v);
+GLAPI void GLAPIENTRY glMultiTexCoord2dARB(GLenum target, GLdouble s, GLdouble t);
+GLAPI void GLAPIENTRY glMultiTexCoord2dvARB(GLenum target, const GLdouble *v);
+GLAPI void GLAPIENTRY glMultiTexCoord2fARB(GLenum target, GLfloat s, GLfloat t);
+GLAPI void GLAPIENTRY glMultiTexCoord2fvARB(GLenum target, const GLfloat *v);
+GLAPI void GLAPIENTRY glMultiTexCoord2iARB(GLenum target, GLint s, GLint t);
+GLAPI void GLAPIENTRY glMultiTexCoord2ivARB(GLenum target, const GLint *v);
+GLAPI void GLAPIENTRY glMultiTexCoord2sARB(GLenum target, GLshort s, GLshort t);
+GLAPI void GLAPIENTRY glMultiTexCoord2svARB(GLenum target, const GLshort *v);
+GLAPI void GLAPIENTRY glMultiTexCoord3dARB(GLenum target, GLdouble s, GLdouble t, GLdouble r);
+GLAPI void GLAPIENTRY glMultiTexCoord3dvARB(GLenum target, const GLdouble *v);
+GLAPI void GLAPIENTRY glMultiTexCoord3fARB(GLenum target, GLfloat s, GLfloat t, GLfloat r);
+GLAPI void GLAPIENTRY glMultiTexCoord3fvARB(GLenum target, const GLfloat *v);
+GLAPI void GLAPIENTRY glMultiTexCoord3iARB(GLenum target, GLint s, GLint t, GLint r);
+GLAPI void GLAPIENTRY glMultiTexCoord3ivARB(GLenum target, const GLint *v);
+GLAPI void GLAPIENTRY glMultiTexCoord3sARB(GLenum target, GLshort s, GLshort t, GLshort r);
+GLAPI void GLAPIENTRY glMultiTexCoord3svARB(GLenum target, const GLshort *v);
+GLAPI void GLAPIENTRY glMultiTexCoord4dARB(GLenum target, GLdouble s, GLdouble t, GLdouble r, GLdouble q);
+GLAPI void GLAPIENTRY glMultiTexCoord4dvARB(GLenum target, const GLdouble *v);
+GLAPI void GLAPIENTRY glMultiTexCoord4fARB(GLenum target, GLfloat s, GLfloat t, GLfloat r, GLfloat q);
+GLAPI void GLAPIENTRY glMultiTexCoord4fvARB(GLenum target, const GLfloat *v);
+GLAPI void GLAPIENTRY glMultiTexCoord4iARB(GLenum target, GLint s, GLint t, GLint r, GLint q);
+GLAPI void GLAPIENTRY glMultiTexCoord4ivARB(GLenum target, const GLint *v);
+GLAPI void GLAPIENTRY glMultiTexCoord4sARB(GLenum target, GLshort s, GLshort t, GLshort r, GLshort q);
+GLAPI void GLAPIENTRY glMultiTexCoord4svARB(GLenum target, const GLshort *v);
+
+#endif /* GL_ARB_multitexture */
+
+
+
+
+#if defined(GL_GLEXT_LEGACY)
/*
- * GL_EXT_abgr (number 1)
+ * 1. GL_EXT_abgr
*/
#ifndef GL_EXT_abgr
#define GL_EXT_abgr 1
@@ -1799,7 +1820,7 @@ GLAPI void GLAPIENTRY glGetSeparableFilter( GLenum target, GLenum format,
/*
- * GL_EXT_blend_color (number 2)
+ * 2. GL_EXT_blend_color
*/
#ifndef GL_EXT_blend_color
#define GL_EXT_blend_color 1
@@ -1817,7 +1838,7 @@ GLAPI void GLAPIENTRY glBlendColorEXT( GLclampf red, GLclampf green, GLclampf bl
/*
- * GL_EXT_polygon_offset (number 3)
+ * 3. GL_EXT_polygon_offset
*/
#ifndef GL_EXT_polygon_offset
#define GL_EXT_polygon_offset 1
@@ -1833,7 +1854,7 @@ GLAPI void GLAPIENTRY glPolygonOffsetEXT( GLfloat factor, GLfloat bias );
/*
- * GL_EXT_texture3D (number 6)
+ * 6. GL_EXT_texture3D
*/
#ifndef GL_EXT_texture3D
#define GL_EXT_texture3D 1
@@ -1860,7 +1881,7 @@ GLAPI void GLAPIENTRY glCopyTexSubImage3DEXT( GLenum target, GLint level, GLint
/*
- * GL_EXT_texture_object (number 20)
+ * 20. GL_EXT_texture_object
*/
#ifndef GL_EXT_texture_object
#define GL_EXT_texture_object 1
@@ -1887,7 +1908,7 @@ GLAPI GLboolean GLAPIENTRY glIsTextureEXT( GLuint texture );
/*
- * GL_EXT_rescale_normal (number 27)
+ * 27. GL_EXT_rescale_normal
*/
#ifndef GL_EXT_rescale_normal
#define GL_EXT_rescale_normal 1
@@ -1899,7 +1920,7 @@ GLAPI GLboolean GLAPIENTRY glIsTextureEXT( GLuint texture );
/*
- * GL_EXT_vertex_array (number 30)
+ * 30. GL_EXT_vertex_array
*/
#ifndef GL_EXT_vertex_array
#define GL_EXT_vertex_array 1
@@ -1960,7 +1981,7 @@ GLAPI void GLAPIENTRY glDrawArraysEXT( GLenum mode, GLint first, GLsizei count )
/*
- * GL_SGIS_texture_edge_clamp (number 35)
+ * 35. GL_SGIS_texture_edge_clamp
*/
#ifndef GL_SGIS_texture_edge_clamp
#define GL_SGIS_texture_edge_clamp 1
@@ -1972,7 +1993,7 @@ GLAPI void GLAPIENTRY glDrawArraysEXT( GLenum mode, GLint first, GLsizei count )
/*
- * GL_EXT_blend_minmax (number 37)
+ * 37. GL_EXT_blend_minmax
*/
#ifndef GL_EXT_blend_minmax
#define GL_EXT_blend_minmax 1
@@ -1989,7 +2010,7 @@ GLAPI void GLAPIENTRY glBlendEquationEXT( GLenum mode );
/*
- * GL_EXT_blend_subtract (number 38) (requires GL_EXT_blend_max )
+ * 38. GL_EXT_blend_subtract (requires GL_EXT_blend_max )
*/
#ifndef GL_EXT_blend_subtract
#define GL_EXT_blend_subtract 1
@@ -2002,7 +2023,7 @@ GLAPI void GLAPIENTRY glBlendEquationEXT( GLenum mode );
/*
- * GL_EXT_blend_logic_op (number 39)
+ * 39. GL_EXT_blend_logic_op
*/
#ifndef GL_EXT_blend_logic_op
#define GL_EXT_blend_logic_op 1
@@ -2014,7 +2035,7 @@ GLAPI void GLAPIENTRY glBlendEquationEXT( GLenum mode );
/*
- * GL_EXT_point_parameters (number 54)
+ * 54. GL_EXT_point_parameters
*/
#ifndef GL_EXT_point_parameters
#define GL_EXT_point_parameters 1
@@ -2026,13 +2047,15 @@ GLAPI void GLAPIENTRY glBlendEquationEXT( GLenum mode );
GLAPI void GLAPIENTRY glPointParameterfEXT( GLenum pname, GLfloat param );
GLAPI void GLAPIENTRY glPointParameterfvEXT( GLenum pname, const GLfloat *params );
+GLAPI void GLAPIENTRY glPointParameterfSGIS(GLenum pname, GLfloat param);
+GLAPI void GLAPIENTRY glPointParameterfvSGIS(GLenum pname, const GLfloat *params);
#endif /* GL_EXT_point_parameters */
/*
- * GL_EXT_paletted_texture (number 78)
+ * 78. GL_EXT_paletted_texture
*/
#ifndef GL_EXT_paletted_texture
#define GL_EXT_paletted_texture 1
@@ -2069,19 +2092,19 @@ GLAPI void GLAPIENTRY glGetColorTableParameterivEXT( GLenum target, GLenum pname
/*
- * GL_EXT_clip_volume_hint (number 79)
+ * 79. GL_EXT_clip_volume_hint
*/
#ifndef GL_EXT_clip_volume_hint
#define GL_EXT_clip_volume_hint 1
-#define GL_CLIP_VOLUME_CLIPPING_HINT_EXT 0x80F
+#define GL_CLIP_VOLUME_CLIPPING_HINT_EXT 0x80F0
#endif /* GL_EXT_clip_volume_hint */
/*
- * GL_EXT_compiled_vertex_array (number 97)
+ * 97. GL_EXT_compiled_vertex_array
*/
#ifndef GL_EXT_compiled_vertex_array
#define GL_EXT_compiled_vertex_array 1
@@ -2107,7 +2130,7 @@ GLAPI void GLAPIENTRY glUnlockArraysEXT( void );
/*
- * GL_EXT_shared_texture_palette (number 141) (req's GL_EXT_paletted_texture)
+ * 141. GL_EXT_shared_texture_palette (req's GL_EXT_paletted_texture)
*/
#ifndef GL_EXT_shared_texture_palette
#define GL_EXT_shared_texture_palette 1
@@ -2119,7 +2142,7 @@ GLAPI void GLAPIENTRY glUnlockArraysEXT( void );
/*
- * GL_EXT_stencil_wrap (number 176)
+ * 176. GL_EXT_stencil_wrap
*/
#ifndef GL_EXT_stencil_wrap
#define GL_EXT_stencil_wrap 1
@@ -2132,7 +2155,7 @@ GLAPI void GLAPIENTRY glUnlockArraysEXT( void );
/*
- * GL_NV_texgen_reflection (number 179)
+ * 179. GL_NV_texgen_reflection
*/
#ifndef GL_NV_texgen_reflection
#define GL_NV_texgen_reflection 1
@@ -2145,7 +2168,7 @@ GLAPI void GLAPIENTRY glUnlockArraysEXT( void );
/*
- * GL_EXT_texture_env_add (number 185)
+ * 185. GL_EXT_texture_env_add
*/
#ifndef GL_EXT_texture_env_add
#define GL_EXT_texture_env_add 1
@@ -2156,89 +2179,10 @@ GLAPI void GLAPIENTRY glUnlockArraysEXT( void );
-/*
- * GL_ARB_multitexture (ARB 0)
- */
-#ifndef GL_ARB_multitexture
-#define GL_ARB_multitexture 1
-
-#define GL_TEXTURE0_ARB 0x84C0
-#define GL_TEXTURE1_ARB 0x84C1
-#define GL_TEXTURE2_ARB 0x84C2
-#define GL_TEXTURE3_ARB 0x84C3
-#define GL_TEXTURE4_ARB 0x84C4
-#define GL_TEXTURE5_ARB 0x84C5
-#define GL_TEXTURE6_ARB 0x84C6
-#define GL_TEXTURE7_ARB 0x84C7
-#define GL_TEXTURE8_ARB 0x84C8
-#define GL_TEXTURE9_ARB 0x84C9
-#define GL_TEXTURE10_ARB 0x84CA
-#define GL_TEXTURE11_ARB 0x84CB
-#define GL_TEXTURE12_ARB 0x84CC
-#define GL_TEXTURE13_ARB 0x84CD
-#define GL_TEXTURE14_ARB 0x84CE
-#define GL_TEXTURE15_ARB 0x84CF
-#define GL_TEXTURE16_ARB 0x84D0
-#define GL_TEXTURE17_ARB 0x84D1
-#define GL_TEXTURE18_ARB 0x84D2
-#define GL_TEXTURE19_ARB 0x84D3
-#define GL_TEXTURE20_ARB 0x84D4
-#define GL_TEXTURE21_ARB 0x84D5
-#define GL_TEXTURE22_ARB 0x84D6
-#define GL_TEXTURE23_ARB 0x84D7
-#define GL_TEXTURE24_ARB 0x84D8
-#define GL_TEXTURE25_ARB 0x84D9
-#define GL_TEXTURE26_ARB 0x84DA
-#define GL_TEXTURE27_ARB 0x84DB
-#define GL_TEXTURE28_ARB 0x84DC
-#define GL_TEXTURE29_ARB 0x84DD
-#define GL_TEXTURE30_ARB 0x84DE
-#define GL_TEXTURE31_ARB 0x84DF
-#define GL_ACTIVE_TEXTURE_ARB 0x84E0
-#define GL_CLIENT_ACTIVE_TEXTURE_ARB 0x84E1
-#define GL_MAX_TEXTURE_UNITS_ARB 0x84E2
-
-GLAPI void GLAPIENTRY glActiveTextureARB(GLenum texture);
-GLAPI void GLAPIENTRY glClientActiveTextureARB(GLenum texture);
-GLAPI void GLAPIENTRY glMultiTexCoord1dARB(GLenum target, GLdouble s);
-GLAPI void GLAPIENTRY glMultiTexCoord1dvARB(GLenum target, const GLdouble *v);
-GLAPI void GLAPIENTRY glMultiTexCoord1fARB(GLenum target, GLfloat s);
-GLAPI void GLAPIENTRY glMultiTexCoord1fvARB(GLenum target, const GLfloat *v);
-GLAPI void GLAPIENTRY glMultiTexCoord1iARB(GLenum target, GLint s);
-GLAPI void GLAPIENTRY glMultiTexCoord1ivARB(GLenum target, const GLint *v);
-GLAPI void GLAPIENTRY glMultiTexCoord1sARB(GLenum target, GLshort s);
-GLAPI void GLAPIENTRY glMultiTexCoord1svARB(GLenum target, const GLshort *v);
-GLAPI void GLAPIENTRY glMultiTexCoord2dARB(GLenum target, GLdouble s, GLdouble t);
-GLAPI void GLAPIENTRY glMultiTexCoord2dvARB(GLenum target, const GLdouble *v);
-GLAPI void GLAPIENTRY glMultiTexCoord2fARB(GLenum target, GLfloat s, GLfloat t);
-GLAPI void GLAPIENTRY glMultiTexCoord2fvARB(GLenum target, const GLfloat *v);
-GLAPI void GLAPIENTRY glMultiTexCoord2iARB(GLenum target, GLint s, GLint t);
-GLAPI void GLAPIENTRY glMultiTexCoord2ivARB(GLenum target, const GLint *v);
-GLAPI void GLAPIENTRY glMultiTexCoord2sARB(GLenum target, GLshort s, GLshort t);
-GLAPI void GLAPIENTRY glMultiTexCoord2svARB(GLenum target, const GLshort *v);
-GLAPI void GLAPIENTRY glMultiTexCoord3dARB(GLenum target, GLdouble s, GLdouble t, GLdouble r);
-GLAPI void GLAPIENTRY glMultiTexCoord3dvARB(GLenum target, const GLdouble *v);
-GLAPI void GLAPIENTRY glMultiTexCoord3fARB(GLenum target, GLfloat s, GLfloat t, GLfloat r);
-GLAPI void GLAPIENTRY glMultiTexCoord3fvARB(GLenum target, const GLfloat *v);
-GLAPI void GLAPIENTRY glMultiTexCoord3iARB(GLenum target, GLint s, GLint t, GLint r);
-GLAPI void GLAPIENTRY glMultiTexCoord3ivARB(GLenum target, const GLint *v);
-GLAPI void GLAPIENTRY glMultiTexCoord3sARB(GLenum target, GLshort s, GLshort t, GLshort r);
-GLAPI void GLAPIENTRY glMultiTexCoord3svARB(GLenum target, const GLshort *v);
-GLAPI void GLAPIENTRY glMultiTexCoord4dARB(GLenum target, GLdouble s, GLdouble t, GLdouble r, GLdouble q);
-GLAPI void GLAPIENTRY glMultiTexCoord4dvARB(GLenum target, const GLdouble *v);
-GLAPI void GLAPIENTRY glMultiTexCoord4fARB(GLenum target, GLfloat s, GLfloat t, GLfloat r, GLfloat q);
-GLAPI void GLAPIENTRY glMultiTexCoord4fvARB(GLenum target, const GLfloat *v);
-GLAPI void GLAPIENTRY glMultiTexCoord4iARB(GLenum target, GLint s, GLint t, GLint r, GLint q);
-GLAPI void GLAPIENTRY glMultiTexCoord4ivARB(GLenum target, const GLint *v);
-GLAPI void GLAPIENTRY glMultiTexCoord4sARB(GLenum target, GLshort s, GLshort t, GLshort r, GLshort q);
-GLAPI void GLAPIENTRY glMultiTexCoord4svARB(GLenum target, const GLshort *v);
-
-#endif /* GL_ARB_multitexture */
-
/*
- * GL_MESA_window_pos (197)
+ * 197. GL_MESA_window_pos
*/
#ifndef GL_MESA_window_pos
#define GL_MESA_window_pos 1
@@ -2273,7 +2217,7 @@ GLAPI void GLAPIENTRY glWindowPos4dvMESA( const GLdouble *p );
/*
- * GL_MESA_resize_bufffers (196)
+ * 196. GL_MESA_resize_bufffers
*/
#ifndef GL_MESA_resize_bufffers
#define GL_MESA_resize_buffers 1
@@ -2283,18 +2227,27 @@ GLAPI void GLAPIENTRY glResizeBuffersMESA( void );
#endif /* GL_MESA_resize_bufffers */
+#else /* GL_GLEXT_LEGACY */
+
+#include <GL/glext.h>
+
+#endif /* GL_GLEXT_LEGACY */
+
+
+/**********************************************************************
+ * Begin system-specific stuff
+ */
#if defined(__BEOS__) || defined(__QUICKDRAW__)
#pragma export off
#endif
-
-#ifdef macintosh
- #pragma enumsalwaysint reset
- #if PRAGMA_IMPORT_SUPPORTED
- #pragma import off
- #endif
+#if defined(macintosh) && PRAGMA_IMPORT_SUPPORTED
+#pragma import off
#endif
+/*
+ * End system-specific stuff
+ **********************************************************************/
#ifdef __cplusplus
diff --git a/xc/extras/Mesa/include/GL/glext.h b/xc/extras/Mesa/include/GL/glext.h
index b2df4e806..0eb4ca49a 100644
--- a/xc/extras/Mesa/include/GL/glext.h
+++ b/xc/extras/Mesa/include/GL/glext.h
@@ -15,7 +15,7 @@ extern "C" {
#endif
-#if defined(_WIN32) && !defined(__CYGWIN32__)
+#if defined(_WIN32) && !defined(__CYGWIN__)
#define WIN32_LEAN_AND_MEAN 1
#include <windows.h>
#endif
@@ -52,8 +52,12 @@ extern "C" {
* 8. Brian Paul, 15 Apr 2000
* Added GL_EXT_texture_cube_map, GL_NV_texgen_emboss, adding some
* missing tokens values.
+ * 9. Brian Paul, 4 May 2000
+ * Added a bunch of missing token values.
+ * 10. Brian Paul, 11 May 2000
+ * Added extensions 198 .. 212.
*/
-#define GL_GLEXT_VERSION_EXT 8
+#define GL_GLEXT_VERSION_EXT 10
/*
@@ -445,10 +449,10 @@ typedef void (APIENTRY * PFNGLPIXELTEXGENSGIXPROC) (GLenum mode);
#ifndef GL_SGIS_pixel_texture
#define GL_SGIS_pixel_texture 1
-#define GL_PIXEL_TEXTURE_SGIS 0x1000 /*?*/
-#define GL_PIXEL_FRAGMENT_RGB_SOURCE_SGIS 0x1001 /*?*/
-#define GL_PIXEL_FRAGMENT_ALPHA_SOURCE_SGIS 0x1002 /*?*/
-#define GL_PIXEL_GROUP_COLOR_SGIS 0x1003 /*?*/
+#define GL_PIXEL_TEXTURE_SGIS 0x8353
+#define GL_PIXEL_FRAGMENT_RGB_SOURCE_SGIS 0x8354
+#define GL_PIXEL_FRAGMENT_ALPHA_SOURCE_SGIS 0x8355
+#define GL_PIXEL_GROUP_COLOR_SGIS 0x8356
GLAPI void APIENTRY glPixelTexGenParameterfSGIS(GLenum target, GLfloat value);
GLAPI void APIENTRY glPixelTexGenParameterfvSGIS(GLenum target, const GLfloat *value);
@@ -485,10 +489,10 @@ typedef void (APIENTRY * PFNGLGETPIXELTEXGENPARAMETERIVSGISPROC) (GLenum target,
#define GL_MAX_4D_TEXTURE_SIZE_SGIS 0x8138
#define GL_TEXTURE_4D_BINDING_SGIS 0x814F
-GLAPI void APIENTRY glTexImage4DSGIS(GLenum target, GLint level, GLint internalFormat, GLsizei width, GLsizei height, GLsizei depth, GLsizei extent, GLint border, GLenum format, GLenum type, const void *pixels);
+GLAPI void APIENTRY glTexImage4DSGIS(GLenum target, GLint level, GLenum internalFormat, GLsizei width, GLsizei height, GLsizei depth, GLsizei extent, GLint border, GLenum format, GLenum type, const void *pixels);
GLAPI void APIENTRY glTexSubImage4DSGIS(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint woffset, GLsizei width, GLsizei height, GLsizei depth, GLsizei extent, GLenum format, GLenum type, const void *pixels);
-typedef void (APIENTRY * PFNGLTEXIMAGE4DSGISPROC) (GLenum target, GLint level, GLint internalFormat, GLsizei width, GLsizei height, GLsizei depth, GLsizei extent, GLint border, GLenum format, GLenum type, const void *pixels);
+typedef void (APIENTRY * PFNGLTEXIMAGE4DSGISPROC) (GLenum target, GLint level, GLenum internalFormat, GLsizei width, GLsizei height, GLsizei depth, GLsizei extent, GLint border, GLenum format, GLenum type, const void *pixels);
typedef void (APIENTRY * PFNGLTEXSUBIMAGE4DSGISPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint woffset, GLsizei width, GLsizei height, GLsizei depth, GLsizei extent, GLenum format, GLenum type, const void *pixels);
#endif /* GL_SGIS_texture4D */
@@ -1002,9 +1006,13 @@ typedef void (APIENTRY * PFNGLSPRITEPARAMETERIVSGIXPROC) (GLenum pname, const GL
GLAPI void APIENTRY glPointParameterfEXT(GLenum pname, GLfloat param);
GLAPI void APIENTRY glPointParameterfvEXT(GLenum pname, const GLfloat *params);
+GLAPI void APIENTRY glPointParameterfSGIS(GLenum pname, GLfloat param);
+GLAPI void APIENTRY glPointParameterfvSGIS(GLenum pname, const GLfloat *params);
typedef void (APIENTRY * PFNGLPOINTPARAMETERFEXTPROC) (GLenum pname, GLfloat param);
typedef void (APIENTRY * PFNGLPOINTPARAMETERFVEXTPROC) (GLenum pname, const GLfloat *params);
+typedef void (APIENTRY * PFNGLPOINTPARAMETERFSGISPROC) (GLenum pname, GLfloat param);
+typedef void (APIENTRY * PFNGLPOINTPARAMETERFVSGISPROC) (GLenum pname, const GLfloat *params);
#endif /* GL_EXT_point_parameters */
@@ -1174,21 +1182,21 @@ typedef void (APIENTRY * PFNGLFLUSHRASTERSGIXPROC) (void);
#ifndef GL_HP_image_transform
#define GL_HP_image_transform 1
-#define GL_IMAGE_SCALE_X_HP ?
-#define GL_IMAGE_SCALE_Y_HP ?
-#define GL_IMAGE_TRANSLATE_X_HP ?
-#define GL_IMAGE_TRANSLATE_Y_HP ?
-#define GL_IMAGE_ROTATE_ANGLE_HP ?
-#define GL_IMAGE_ROTATE_ORIGIN_X_HP ?
-#define GL_IMAGE_ROTATE_ORIGIN_Y_HP ?
-#define GL_IMAGE_MAG_FILTER_HP ?
-#define GL_IMAGE_MIN_FILTER_HP ?
-#define GL_IMAGE_CUBIC_WEIGHT_HP ?
-#define GL_CUBIC_HP ?
-#define GL_AVERAGE_HP ?
-#define GL_IMAGE_TRANSFORM_2D_HP ?
-#define GL_POST_IMAGE_TRANSFORM_COLOR_TABLE_HP ?
-#define GL_PROXY_POST_IMAGE_TRANSFORM_COLOR_TABLE_HP ?
+#define GL_IMAGE_SCALE_X_HP 0x8155
+#define GL_IMAGE_SCALE_Y_HP 0x8156
+#define GL_IMAGE_TRANSLATE_X_HP 0x8157
+#define GL_IMAGE_TRANSLATE_Y_HP 0x8158
+#define GL_IMAGE_ROTATE_ANGLE_HP 0x8159
+#define GL_IMAGE_ROTATE_ORIGIN_X_HP 0x815A
+#define GL_IMAGE_ROTATE_ORIGIN_Y_HP 0x815B
+#define GL_IMAGE_MAG_FILTER_HP 0x815C
+#define GL_IMAGE_MIN_FILTER_HP 0x815D
+#define GL_IMAGE_CUBIC_WEIGHT_HP 0x815E
+#define GL_CUBIC_HP 0x815F
+#define GL_AVERAGE_HP 0x8160
+#define GL_IMAGE_TRANSFORM_2D_HP 0x8161
+#define GL_POST_IMAGE_TRANSFORM_COLOR_TABLE_HP 0x8162
+#define GL_PROXY_POST_IMAGE_TRANSFORM_COLOR_TABLE_HP 0x8163
GLAPI void APIENTRY glImageTransformParameteriHP(GLenum target, GLenum pname, const GLint param);
GLAPI void APIENTRY glImageTransformParameterfHP(GLenum target, GLenum pname, const GLfloat param);
@@ -1214,10 +1222,10 @@ typedef void (APIENTRY * PFNGLGETIMAGETRANSFORMPARAMETERFVHPPROC) (GLenum target
#ifndef GL_HP_convolution_border_modes
#define GL_HP_convolution_border_modes 1
-#define GL_IGNORE_BORDER_HP ?
-#define GL_CONSTANT_BORDER_HP ?
-#define GL_REPLICATE_BORDER_HP ?
-#define GL_CONVOLUTION_BORDER_COLOR_HP ?
+#define GL_IGNORE_BORDER_HP 0x8150
+#define GL_CONSTANT_BORDER_HP 0x8151
+#define GL_REPLICATE_BORDER_HP 0x8153
+#define GL_CONVOLUTION_BORDER_COLOR_HP 0x8154
#endif /* GL_HP_convolution_border_modes */
@@ -1370,7 +1378,9 @@ GLAPI void APIENTRY glGetColorTableParameterfvEXT(GLenum target, GLenum pname, G
GLAPI void APIENTRY glGetColorTableParameterivEXT(GLenum target, GLenum pname, GLint *params);
typedef void (APIENTRY * PFNGLCOLORTABLEEXTPROC) (GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const GLvoid *table);
+#ifndef GL_EXT_color_subtable
typedef void (APIENTRY * PFNGLCOLORSUBTABLEEXTPROC) (GLenum target, GLsizei start, GLsizei count, GLenum format, GLenum type, const GLvoid *data);
+#endif
typedef void (APIENTRY * PFNGLGETCOLORTABLEEXTPROC) (GLenum target, GLenum format, GLenum type, GLvoid *table);
typedef void (APIENTRY * PFNGLGETCOLORTABLEPARAMETERFVEXTPROC) (GLenum target, GLenum pname, GLfloat *params);
typedef void (APIENTRY * PFNGLGETCOLORTABLEPARAMETERIVEXTPROC) (GLenum target, GLenum pname, GLint *params);
@@ -1481,9 +1491,9 @@ typedef void (APIENTRY * PFNGLLISTPARAMETERIVSGIXPROC) (GLuint list, GLenum name
#ifndef GL_EXT_index_material
#define GL_EXT_index_material 1
-#define GL_INDEX_MATERIAL_EXT ?
-#define GL_INDEX_MATERIAL_PARAMETER_EXT ?
-#define GL_INDEX_MATERIAL_FACE_EXT ?
+#define GL_INDEX_MATERIAL_EXT 0x81B8
+#define GL_INDEX_MATERIAL_PARAMETER_EXT 0x81B9
+#define GL_INDEX_MATERIAL_FACE_EXT 0x81BA
GLAPI void APIENTRY glIndexMaterialEXT(GLenum face, GLenum mode);
@@ -1499,9 +1509,9 @@ typedef void (APIENTRY * PFNGLINDEXMATERIALEXTPROC) (GLenum face, GLenum mode);
#ifndef GL_EXT_index_func
#define GL_EXT_index_func 1
-#define GL_INDEX_TEST_EXT ?
-#define GL_INDEX_TEST_FUNC_EXT ?
-#define GL_INDEX_TEST_REF_EXT ?
+#define GL_INDEX_TEST_EXT 0x81B5
+#define GL_INDEX_TEST_FUNC_EXT 0x81B6
+#define GL_INDEX_TEST_REF_EXT 0x81B7
GLAPI void APIENTRY glIndexFuncEXT(GLenum func, GLfloat ref);
@@ -1517,14 +1527,14 @@ typedef void (APIENTRY * PFNGLINDEXFUNCEXTPROC) (GLenum func, GLfloat ref);
#ifndef GL_EXT_index_array_formats
#define GL_EXT_index_array_formats 1
-#define GL_IUI_V2F_EXT ?
-#define GL_IUI_V3F_EXT ?
-#define GL_IUI_N3F_V2F_EXT ?
-#define GL_IUI_N3F_V3F_EXT ?
-#define GL_T2F_IUI_V2F_EXT ?
-#define GL_T2F_IUI_V3F_EXT ?
-#define GL_T2F_IUI_N3F_V2F_EXT ?
-#define GL_T2F_IUI_N3F_V3F_EXT ?
+#define GL_IUI_V2F_EXT 0x81AD
+#define GL_IUI_V3F_EXT 0x81AE
+#define GL_IUI_N3F_V2F_EXT 0x81AF
+#define GL_IUI_N3F_V3F_EXT 0x81B0
+#define GL_T2F_IUI_V2F_EXT 0x81B1
+#define GL_T2F_IUI_V3F_EXT 0x81B2
+#define GL_T2F_IUI_N3F_V2F_EXT 0x81B3
+#define GL_T2F_IUI_N3F_V3F_EXT 0x81B4
#endif /* GL_EXT_index_array_formats */
@@ -1665,9 +1675,9 @@ typedef void (APIENTRY * PFNGLLIGHTENVISGIXPROC) (GLenum pname, GLint param);
#ifndef GL_HP_texture_lighting
#define GL_HP_texture_lighting 1
-#define GL_TEXTURE_LIGHTING_MODE_HP ?
-#define GL_TEXTURE_POST_SPECULAR_HP ?
-#define GL_TEXTURE_PRE_SPECULAR_HP ?
+#define GL_TEXTURE_LIGHTING_MODE_HP 0x8167
+#define GL_TEXTURE_POST_SPECULAR_HP 0x8168
+#define GL_TEXTURE_PRE_SPECULAR_HP 0x8169
#endif /* GL_HP_texture_lighting */
@@ -1842,11 +1852,11 @@ typedef void (APIENTRY * PFNGLTEXSCISSORFUNCINTELPROC) (GLenum target, GLenum lf
#ifndef GL_INTEL_parallel_arrays
#define GL_INTEL_parallel_arrays 1
-#define GL_PARALLEL_ARRAYS_INTEL ?
-#define GL_VERTEX_ARRAY_PARALLEL_POINTERS_INTEL ?
-#define GL_NORMAL_ARRAY_PARALLEL_POINTERS_INTEL ?
-#define GL_COLOR_ARRAY_PARALLEL_POINTERS_INTEL ?
-#define GL_TEXTURE_COORD_ARRAY_PARALLEL_POINTERS_INTEL ?
+#define GL_PARALLEL_ARRAYS_INTEL 0x83F4
+#define GL_VERTEX_ARRAY_PARALLEL_POINTERS_INTEL 0x83F5
+#define GL_NORMAL_ARRAY_PARALLEL_POINTERS_INTEL 0x83F6
+#define GL_COLOR_ARRAY_PARALLEL_POINTERS_INTEL 0x83F7
+#define GL_TEXTURE_COORD_ARRAY_PARALLEL_POINTERS_INTEL 0x83F8
GLAPI void APIENTRY glVertexPointervINTEL(GLint size, GLenum type, const void ** pointer);
GLAPI void APIENTRY glNormalPointervINTEL(GLenum type, const void** pointer);
@@ -1898,7 +1908,7 @@ GLAPI void APIENTRY glPixelTransformParameterfvEXT(GLenum target, GLenum pname,
GLAPI void APIENTRY glGetPixelTransformParameterivEXT(GLenum target, GLenum pname, const GLint *params);
GLAPI void APIENTRY glGetPixelTransformParameterfvEXT(GLenum target, GLenum pname, const GLfloat *params);
-#endif /* #define GL_EXT_pixel_transform */
+#endif /* GL_EXT_pixel_transform */
@@ -2129,7 +2139,7 @@ typedef void (APIENTRY * PFNGLFOGCOORDPOINTEREXTPROC) (GLenum type, GLsizei stri
/*
- * 156. GL_EXT_coordinate_frame
+ * 156. GL_EXT_coordinate_frame
*/
#ifndef GL_EXT_coordinate_frame
#define GL_EXT_coordinate_frame 1
@@ -2937,6 +2947,195 @@ typedef void (APIENTRY * PFNGLWINDOWPOS4DVMESAPROC) (const GLdouble *p);
/*
+ * 198. GL_EXT_texture_compression_s3tc
+ */
+#ifndef GL_EXT_texture_compression_s3tc
+#define GL_EXT_texture_compression_s3tc 1
+
+#define GL_COMPRESSED_RGB_S3TC_DXT1_EXT 0x83F0
+#define GL_COMPRESSED_RGBA_S3TC_DXT1_EXT 0x83F1
+#define GL_COMPRESSED_RGBA_S3TC_DXT3_EXT 0x83F2
+#define GL_COMPRESSED_RGBA_S3TC_DXT5_EXT 0x83F3
+
+#endif /* GL_EXT_texture_compression_s3tc */
+
+
+
+/*
+ * 199. GL_IBM_cull_vertex
+ */
+#ifndef GL_IBM_cull_vertex
+#define GL_IBM_cull_vertex 1
+
+#define GL_CULL_VERTEX_IBM 103050
+
+#endif /* GL_IBM_cull_vertex */
+
+
+/*
+ * 200. GL_IBM_multimode_draw_arrays
+ */
+#ifndef GL_IBM_multimode_draw_arrays
+#define GL_IBM_multimode_draw_arrays 1
+
+GLAPI void APIENTRY glMultiModeDrawArraysIBM(GLenum *mode, GLint *first, GLsizei *count, GLsizei primcount, GLint modestride);
+GLAPI void APIENTRY glMultiModeDrawElementsIBM(GLenum *mode, GLsizei *count, GLenum type, const GLvoid **indices, GLsizei primcount, GLint modestride);
+
+typedef void (APIENTRY * PFNGLGLMULTIMODEDRAWARRAYSIBMPROC) (GLenum *mode, GLint *first, GLsizei *count, GLsizei primcount, GLint modestride);
+typedef void (APIENTRY * PFNGLMULTIMODEDRAWELEMENTSIBMPROC) (GLenum *mode, GLsizei *count, GLenum type, const GLvoid **indices, GLsizei primcount, GLint modestride);
+
+#endif /* GL_IBM_multimode_draw_arrays */
+
+
+
+/*
+ * 201. GL_IBM_vertex_array_lists
+ */
+#ifndef GL_IBM_multimode_draw_arrays
+#define GL_IBM_multimode_draw_arrays 1
+
+#define GL_VERTEX_ARRAY_LIST_IBM 103070
+#define GL_NORMAL_ARRAY_LIST_IBM 103071
+#define GL_COLOR_ARRAY_LIST_IBM 103072
+#define GL_INDEX_ARRAY_LIST_IBM 103073
+#define GL_TEXTURE_COORD_ARRAY_LIST_IBM 103074
+#define GL_EDGE_FLAG_ARRAY_LIST_IBM 103075
+#define GL_FOG_COORDINATE_ARRAY_LIST_IBM 103076
+#define GL_SECONDARY_COLOR_ARRAY_LIST_IBM 103077
+#define GL_VERTEX_ARRAY_LIST_STRIDE_IBM 103080
+#define GL_NORMAL_ARRAY_LIST_STRIDE_IBM 103081
+#define GL_COLOR_ARRAY_LIST_STRIDE_IBM 103082
+#define GL_INDEX_ARRAY_LIST_STRIDE_IBM 103083
+#define GL_TEXTURE_COORD_ARRAY_LIST_STRIDE_IBM 103084
+#define GL_EDGE_FLAG_ARRAY_LIST_STRIDE_IBM 103085
+#define GL_FOG_COORDINATE_ARRAY_LIST_STRIDE_IBM 103086
+#define GL_SECONDARY_COLOR_ARRAY_LIST_STRIDE_IBM 103087
+
+GLAPI void APIENTRY glColorPointerListIBM(GLint size, GLenum type, GLint stride, const GLvoid **pointer, GLint ptrstride);
+GLAPI void APIENTRY glSecondaryColorPointerListIBM(GLint size, GLenum type, GLint stride, const GLvoid **pointer, GLint ptrstride);
+GLAPI void APIENTRY glEdgeFlagPointerListIBM(GLint stride, const GLboolean **pointer, GLint ptrstride);
+GLAPI void APIENTRY glFogCoordPointerListIBM(GLenum type, GLint stride, const GLvoid **pointer, GLint ptrstride);
+GLAPI void APIENTRY glIndexPointerListIBM(GLenum type, GLint stride, const GLvoid **pointer, GLint ptrstride);
+GLAPI void APIENTRY glNormalPointerListIBM(GLenum type, GLint stride, const GLvoid **pointer, GLint ptrstride);
+GLAPI void APIENTRY glTexCoordPointerListIBM(GLint size, GLenum type, GLint stride, const GLvoid **pointer, GLint ptrstride);
+GLAPI void APIENTRY glVertexPointerListIBM(GLint size, GLenum type, GLint stride, const GLvoid **pointer, GLint ptrstride);
+
+typedef void (APIENTRY * PFNGLCOLORPOINTERLISTIBMPROC) (GLint size, GLenum type, GLint stride, const GLvoid **pointer, GLint ptrstride);
+typedef void (APIENTRY * PFNGLSECONDARYCOLORPOINTERLISTIBMPROC) (GLint size, GLenum type, GLint stride, const GLvoid **pointer, GLint ptrstride);
+typedef void (APIENTRY * PFNGLEDGEFLAGPOINTERLISTIBMPROC) (GLint stride, const GLboolean **pointer, GLint ptrstride);
+typedef void (APIENTRY * PFNGLFOGCOORDPOINTERLISTIBMPROC) (GLenum type, GLint stride, const GLvoid **pointer, GLint ptrstride);
+typedef void (APIENTRY * PFNGLINDEXPOINTERLISTIBMPROC) (GLenum type, GLint stride, const GLvoid **pointer, GLint ptrstride);
+typedef void (APIENTRY * PFNGLNORMALPOINTERLISTIBMPROC) (GLenum type, GLint stride, const GLvoid **pointer, GLint ptrstride);
+typedef void (APIENTRY * PFNGLTEXCOORDPOINTERLISTIBMPROC) (GLint size, GLenum type, GLint stride, const GLvoid **pointer, GLint ptrstride);
+typedef void (APIENTRY * PFNGLVERTEXPOINTERLISTIBMPROC) (GLint size, GLenum type, GLint stride, const GLvoid **pointer, GLint ptrstride);
+
+#endif /* GL_IBM_multimode_draw_arrays */
+
+
+
+/*
+ * 202. ?
+ * 203. ?
+ * 204. ?
+ * 205. ?
+ */
+
+
+/*
+ * 206. GL_3DFX_texture_compression_FXT1
+ */
+#ifndef GL_3DFX_texture_compression_FXT1
+#define GL_3DFX_texture_compression_FXT1 1
+
+#define GL_COMPRESSED_RGB_FXT1_3DFX 0x86B0
+#define GL_COMPRESSED_RGBA_FXT1_3DFX 0x86B1
+
+#endif /* GL_3DFX_texture_compression_FXT1 */
+
+
+
+/*
+ * 207. GL_3DFX_multisample
+ */
+#ifndef GL_3DFX_multisample
+#define GL_3DFX_multisample 1
+
+#define GL_MULTISAMPLE_3DFX 0x86B2
+#define GL_SAMPLE_BUFFERS_3DFX 0x86B3
+#define GL_SAMPLES_3DFX 0x86B4
+#define GL_MULTISAMPLE_BIT_3DFX 0x20000000
+
+#endif /* GL_3DFX_multisample */
+
+
+
+/*
+ * 208. GL_3DFX_tbuffer
+ */
+#ifndef GL_3DFX_tbuffer
+#define GL_3DFX_tbuffer 1
+
+GLAPI void APIENTRY glTbufferMask3DFX(GLuint mask);
+
+typedef void (APIENTRY * PFNGLTBUFFERMASK3DFXPROC) (GLuint mask );
+
+#endif /* GL_3DFX_tbuffer */
+
+
+
+/*
+ * 209. WGL_EXT_multisample
+ */
+#ifndef WGL_EXT_multisample
+#define WGL_EXT_multisample 1
+
+#define WGL_SAMPLE_BUFFERS_EXT 0x2041
+#define WGL_SAMPLES_EXT 0x2042
+#define GL_MULTISAMPLE_EXT 0x809D
+#define GL_SAMPLE_ALPHA_TO_MASK_EXT 0x809E
+#define GL_SAMPLE_ALPHA_TO_ONE_EXT 0x809F
+#define GL_SAMPLE_MASK_EXT 0x80A0
+
+GLAPI void APIENTRY glSampleMaskEXT(GLclampf value, GLboolean invert);
+GLAPI void APIENTRY glSamplePatternEXT(GLenum pattern);
+
+typedef void (APIENTRY * PFNGLSAMPLEMASKEXTPROC) (GLclampf value, GLboolean invert);
+typedef void (APIENTRY * PFNGLSAMPLEPATTERNEXTPROC) (GLenum pattern);
+
+#endif /* WGL_EXT_multisample */
+
+
+
+/*
+ * 210. GL_SGIX_vertex_preclip
+ */
+#ifndef GL_SGIX_vertex_preclip
+#define GL_SGIX_vertex_preclip 1
+
+#define GL_VERTEX_PRECLIP_SGIX 0x83EE
+#define GL_VERTEX_PRECLIP_HINT_SGIX 0x83EF
+
+#endif /* GL_SGIX_vertex_preclip */
+
+
+
+/*
+ * 212. GL_SGIX_resample
+ */
+#ifndef GL_SGIX_resample
+#define GL_SGIX_resample 1
+
+#define GL_PACK_RESAMPLE_SGIX 0x842E
+#define GL_UNPACK_RESAMPLE_SGIX 0x842F
+#define GL_RESAMPLE_REPLICATE_SGIX 0x8433
+#define GL_RESAMPLE_ZERO_FILL_SGIX 0x8434
+#define GL_RESAMPLE_DECIMATE_SGIX 0x0 /*?*/
+
+#endif /* GL_SGIX_resample */
+
+
+
+/*
* ARB 1. GL_ARB_multitexture
*/
#ifndef GL_ARB_multitexture
@@ -3137,7 +3336,39 @@ typedef void (APIENTRY * PFNGLSAMPLECOVERAGEARBPROC) (GLclampf value, GLboolean
/*
- * ARB ?. GL_ARB_texture_compression
+ * ARB 7. GL_ARB_texture_cube_map
+ */
+#ifndef GL_ARB_texture_cube_map
+#define GL_ARB_texture_cube_map 1
+
+#define GL_NORMAL_MAP_ARB 0x8511
+#define GL_REFLECTION_MAP_ARB 0x8512
+#define GL_TEXTURE_CUBE_MAP_ARB 0x8513
+#define GL_TEXTURE_BINDING_CUBE_MAP_ARB 0x8514
+#define GL_TEXTURE_CUBE_MAP_POSITIVE_X_ARB 0x8515
+#define GL_TEXTURE_CUBE_MAP_NEGATIVE_X_ARB 0x8516
+#define GL_TEXTURE_CUBE_MAP_POSITIVE_Y_ARB 0x8517
+#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Y_ARB 0x8518
+#define GL_TEXTURE_CUBE_MAP_POSITIVE_Z_ARB 0x8519
+#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Z_ARB 0x851A
+#define GL_PROXY_TEXTURE_CUBE_MAP_ARB 0x851B
+#define GL_MAX_CUBE_MAP_TEXTURE_SIZE_ARB 0x851C
+
+#endif /* GL_ARB_texture_cube_map */
+
+
+
+/*
+ * ARB 8. WGL_ARB_extensions_string
+ * ARB 9. WGL_ARB_pixel_format
+ * ARB 10. WGL_ARB_make_current_read
+ * ARB 11. WGL_ARB_pbuffer
+ */
+
+
+
+/*
+ * ARB 12. GL_ARB_texture_compression
*/
#ifndef GL_ARB_texture_compression
#define GL_ARB_texture_compression 1
@@ -3154,20 +3385,20 @@ typedef void (APIENTRY * PFNGLSAMPLECOVERAGEARBPROC) (GLclampf value, GLboolean
#define GL_NUM_COMPRESSED_TEXTURE_FORMATS_ARB 0x86A2
#define GL_COMPRESSED_TEXTURE_FORMATS_ARB 0x86A3
-GLAPI void APIENTRY glCompressedTexImage3DARB(GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, GLvoid *data);
-GLAPI void APIENTRY glCompressedTexImage2DARB(GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, GLvoid *data);
-GLAPI void APIENTRY glCompressedTexImage1DARB(GLenum target, GLint level, GLint internalformat, GLsizei width, GLint border, GLsizei imageSize, GLvoid *data);
-GLAPI void APIENTRY glCompressedTexSubImage3DARB(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, GLvoid *data);
-GLAPI void APIENTRY glCompressedTexSubImage2DARB(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, GLvoid *data);
-GLAPI void APIENTRY glCompressedTexSubImage1DARB(GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, GLvoid *data);
+GLAPI void APIENTRY glCompressedTexImage3DARB(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const GLvoid *data);
+GLAPI void APIENTRY glCompressedTexImage2DARB(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const GLvoid *data);
+GLAPI void APIENTRY glCompressedTexImage1DARB(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLsizei imageSize, const GLvoid *data);
+GLAPI void APIENTRY glCompressedTexSubImage3DARB(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const GLvoid *data);
+GLAPI void APIENTRY glCompressedTexSubImage2DARB(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const GLvoid *data);
+GLAPI void APIENTRY glCompressedTexSubImage1DARB(GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, const GLvoid *data);
GLAPI void APIENTRY glGetCompressedTexImageARB(GLenum target, GLint lod, GLvoid *img);
-typedef void (APIENTRY * PFNGLCOMPRESSEDTEXIMAGE3DARBPROC) (GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, GLvoid *data);
-typedef void (APIENTRY * PFNGLCOMPRESSEDTEXIMAGE2DARBPROC) (GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, GLvoid *data);
-typedef void (APIENTRY * PFNGLCOMPRESSEDTEXIMAGE1DARBPROC) (GLenum target, GLint level, GLint internalformat, GLsizei width, GLint border, GLsizei imageSize, GLvoid *data);
-typedef void (APIENTRY * PFNGLCOMPRESSEDTEXSUBIMAGE3DARBPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, GLvoid *data);
-typedef void (APIENTRY * PFNGLCOMPRESSEDTEXSUBIMAGE2DARBPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, GLvoid *data);
-typedef void (APIENTRY * PFNGLCOMPRESSEDTEXSUBIMAGE1DARBPROC) (GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, GLvoid *data);
+typedef void (APIENTRY * PFNGLCOMPRESSEDTEXIMAGE3DARBPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const GLvoid *data);
+typedef void (APIENTRY * PFNGLCOMPRESSEDTEXIMAGE2DARBPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const GLvoid *data);
+typedef void (APIENTRY * PFNGLCOMPRESSEDTEXIMAGE1DARBPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLsizei imageSize, const GLvoid *data);
+typedef void (APIENTRY * PFNGLCOMPRESSEDTEXSUBIMAGE3DARBPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const GLvoid *data);
+typedef void (APIENTRY * PFNGLCOMPRESSEDTEXSUBIMAGE2DARBPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const GLvoid *data);
+typedef void (APIENTRY * PFNGLCOMPRESSEDTEXSUBIMAGE1DARBPROC) (GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, const GLvoid *data);
typedef void (APIENTRY * PFNGLGETCOMPRESSEDTEXIMAGEARBPROC) (GLenum target, GLint lod, GLvoid *img);
#endif /* GL_ARB_texture_compression */
@@ -3175,29 +3406,6 @@ typedef void (APIENTRY * PFNGLGETCOMPRESSEDTEXIMAGEARBPROC) (GLenum target, GLin
/*
- * ?. GL_EXT_texture_cube_map
- */
-#ifndef GL_EXT_texture_cube_map
-#define GL_EXT_texture_cube_map 1
-
-#define GL_NORMAL_MAP_EXT 0x8511
-#define GL_REFLECTION_MAP_EXT 0x8512
-#define GL_TEXTURE_CUBE_MAP_EXT 0x8513
-#define GL_TEXTURE_BINDING_CUBE_MAP_EXT 0x8514
-#define GL_TEXTURE_CUBE_MAP_POSITIVE_X_EXT 0x8515
-#define GL_TEXTURE_CUBE_MAP_NEGATIVE_X_EXT 0x8516
-#define GL_TEXTURE_CUBE_MAP_POSITIVE_Y_EXT 0x8517
-#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Y_EXT 0x8518
-#define GL_TEXTURE_CUBE_MAP_POSITIVE_Z_EXT 0x8519
-#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Z_EXT 0x851A
-#define GL_PROXY_TEXTURE_CUBE_MAP_EXT 0x851B
-#define GL_MAX_CUBE_MAP_TEXTURE_SIZE_EXT 0x851C
-
-#endif /* GL_EXT_texture_cube_map */
-
-
-
-/*
* ? GL_NV_texgen_emboss
*/
@@ -3213,7 +3421,7 @@ typedef void (APIENTRY * PFNGLGETCOMPRESSEDTEXIMAGEARBPROC) (GLenum target, GLin
/*
- * ??. GL_WIN_swap_hint
+ * ?. GL_WIN_swap_hint
*/
#ifndef GL_WIN_swap_hint
#define GL_WIN_swap_hint 1
diff --git a/xc/extras/Mesa/include/GL/osmesa.h b/xc/extras/Mesa/include/GL/osmesa.h
new file mode 100644
index 000000000..c3bc43d0c
--- /dev/null
+++ b/xc/extras/Mesa/include/GL/osmesa.h
@@ -0,0 +1,246 @@
+
+/*
+ * Mesa 3-D graphics library
+ * Version: 3.3
+ *
+ * Copyright (C) 1999-2000 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.
+ */
+
+
+/*
+ * Mesa Off-Screen rendering interface.
+ *
+ * This is an operating system and window system independent interface to
+ * Mesa which allows one to render images into a client-supplied buffer in
+ * main memory. Such images may manipulated or saved in whatever way the
+ * client wants.
+ *
+ * These are the API functions:
+ * OSMesaCreateContext - create a new Off-Screen Mesa rendering context
+ * OSMesaMakeCurrent - bind an OSMesaContext to a client's image buffer
+ * and make the specified context the current one.
+ * OSMesaDestroyContext - destroy an OSMesaContext
+ * OSMesaGetCurrentContext - return thread's current context ID
+ * OSMesaPixelStore - controls how pixels are stored in image buffer
+ * OSMesaGetIntegerv - return OSMesa state parameters
+ *
+ *
+ * The limits on the width and height of an image buffer are MAX_WIDTH and
+ * MAX_HEIGHT as defined in Mesa/src/config.h. Defaults are 1280 and 1024.
+ * You can increase them as needed but beware that many temporary arrays in
+ * Mesa are dimensioned by MAX_WIDTH or MAX_HEIGHT.
+ */
+
+
+#ifndef OSMESA_H
+#define OSMESA_H
+
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
+#include "GL/gl.h"
+
+
+#define OSMESA_MAJOR_VERSION 3
+#define OSMESA_MINOR_VERSION 3
+
+
+
+/*
+ * Values for the format parameter of OSMesaCreateContext()
+ * New in version 2.0.
+ */
+#define OSMESA_COLOR_INDEX GL_COLOR_INDEX
+#define OSMESA_RGBA GL_RGBA
+#define OSMESA_BGRA 0x1
+#define OSMESA_ARGB 0x2
+#define OSMESA_RGB GL_RGB
+#define OSMESA_BGR 0x4
+
+
+/*
+ * OSMesaPixelStore() parameters:
+ * New in version 2.0.
+ */
+#define OSMESA_ROW_LENGTH 0x10
+#define OSMESA_Y_UP 0x11
+
+
+/*
+ * Accepted by OSMesaGetIntegerv:
+ */
+#define OSMESA_WIDTH 0x20
+#define OSMESA_HEIGHT 0x21
+#define OSMESA_FORMAT 0x22
+#define OSMESA_TYPE 0x23
+
+
+typedef struct osmesa_context *OSMesaContext;
+
+
+#if defined(__BEOS__) || defined(__QUICKDRAW__)
+#pragma export on
+#endif
+
+
+/*
+ * Create an Off-Screen Mesa rendering context. The only attribute needed is
+ * an RGBA vs Color-Index mode flag.
+ *
+ * Input: format - one of OSMESA_COLOR_INDEX, OSMESA_RGBA, OSMESA_BGRA,
+ * OSMESA_ARGB, OSMESA_RGB, or OSMESA_BGR.
+ * sharelist - specifies another OSMesaContext with which to share
+ * display lists. NULL indicates no sharing.
+ * Return: an OSMesaContext or 0 if error
+ */
+GLAPI OSMesaContext GLAPIENTRY OSMesaCreateContext( GLenum format,
+ OSMesaContext sharelist );
+
+
+
+
+/*
+ * Destroy an Off-Screen Mesa rendering context.
+ *
+ * Input: ctx - the context to destroy
+ */
+GLAPI void GLAPIENTRY OSMesaDestroyContext( OSMesaContext ctx );
+
+
+
+/*
+ * Bind an OSMesaContext to an image buffer. The image buffer is just a
+ * block of memory which the client provides. Its size must be at least
+ * as large as width*height*sizeof(type). Its address should be a multiple
+ * of 4 if using RGBA mode.
+ *
+ * Image data is stored in the order of glDrawPixels: row-major order
+ * with the lower-left image pixel stored in the first array position
+ * (ie. bottom-to-top).
+ *
+ * Since the only type initially supported is GL_UNSIGNED_BYTE, if the
+ * context is in RGBA mode, each pixel will be stored as a 4-byte RGBA
+ * value. If the context is in color indexed mode, each pixel will be
+ * stored as a 1-byte value.
+ *
+ * If the context's viewport hasn't been initialized yet, it will now be
+ * initialized to (0,0,width,height).
+ *
+ * Input: ctx - the rendering context
+ * buffer - the image buffer memory
+ * type - data type for pixel components, only GL_UNSIGNED_BYTE
+ * supported now
+ * width, height - size of image buffer in pixels, at least 1
+ * Return: GL_TRUE if success, GL_FALSE if error because of invalid ctx,
+ * invalid buffer address, type!=GL_UNSIGNED_BYTE, width<1, height<1,
+ * width>internal limit or height>internal limit.
+ */
+GLAPI GLboolean GLAPIENTRY OSMesaMakeCurrent( OSMesaContext ctx,
+ void *buffer, GLenum type,
+ GLsizei width, GLsizei height );
+
+
+
+
+/*
+ * Return the current Off-Screen Mesa rendering context handle.
+ */
+GLAPI OSMesaContext GLAPIENTRY OSMesaGetCurrentContext( void );
+
+
+
+/*
+ * Set pixel store/packing parameters for the current context.
+ * This is similar to glPixelStore.
+ * Input: pname - OSMESA_ROW_LENGTH
+ * specify actual pixels per row in image buffer
+ * 0 = same as image width (default)
+ * OSMESA_Y_UP
+ * zero = Y coordinates increase downward
+ * non-zero = Y coordinates increase upward (default)
+ * value - the value for the parameter pname
+ *
+ * New in version 2.0.
+ */
+GLAPI void GLAPIENTRY OSMesaPixelStore( GLint pname, GLint value );
+
+
+
+/*
+ * Return an integer value like glGetIntegerv.
+ * Input: pname -
+ * OSMESA_WIDTH return current image width
+ * OSMESA_HEIGHT return current image height
+ * OSMESA_FORMAT return image format
+ * OSMESA_TYPE return color component data type
+ * OSMESA_ROW_LENGTH return row length in pixels
+ * OSMESA_Y_UP returns 1 or 0 to indicate Y axis direction
+ * value - pointer to integer in which to return result.
+ */
+GLAPI void GLAPIENTRY OSMesaGetIntegerv( GLint pname, GLint *value );
+
+
+
+/*
+ * Return the depth buffer associated with an OSMesa context.
+ * Input: c - the OSMesa context
+ * Output: width, height - size of buffer in pixels
+ * bytesPerValue - bytes per depth value (2 or 4)
+ * buffer - pointer to depth buffer values
+ * Return: GL_TRUE or GL_FALSE to indicate success or failure.
+ *
+ * New in Mesa 2.4.
+ */
+GLAPI GLboolean GLAPIENTRY OSMesaGetDepthBuffer( OSMesaContext c,
+ GLint *width, GLint *height,
+ GLint *bytesPerValue,
+ void **buffer );
+
+
+/*
+ * Return the color buffer associated with an OSMesa context.
+ * Input: c - the OSMesa context
+ * Output: width, height - size of buffer in pixels
+ * format - buffer format (OSMESA_FORMAT)
+ * buffer - pointer to depth buffer values
+ * Return: GL_TRUE or GL_FALSE to indicate success or failure.
+ *
+ * New in Mesa 3.3.
+ */
+GLAPI GLboolean GLAPIENTRY OSMesaGetColorBuffer( OSMesaContext c,
+ GLint *width, GLint *height,
+ GLint *format,
+ void **buffer );
+
+
+#if defined(__BEOS__) || defined(__QUICKDRAW__)
+#pragma export off
+#endif
+
+
+#ifdef __cplusplus
+}
+#endif
+
+
+#endif
diff --git a/xc/extras/Mesa/src/FX/fxapi.c b/xc/extras/Mesa/src/FX/fxapi.c
index 4beff2cfe..da2b905fa 100644
--- a/xc/extras/Mesa/src/FX/fxapi.c
+++ b/xc/extras/Mesa/src/FX/fxapi.c
@@ -623,7 +623,7 @@
#if defined(FX)
#include "fxdrv.h"
-fxMesaContext fxMesaCurrentCtx=NULL;
+static fxMesaContext fxMesaCurrentCtx=NULL;
/*
* Status of 3Dfx hardware initialization
@@ -989,7 +989,8 @@ fxMesaContext GLAPIENTRY fxMesaCreateContext(GLuint win,
else if (voodoo->nTexelfx == 2 &&
voodoo->fbiRev == 260 &&
voodoo->tmuConfig[0].tmuRev == 4 &&
- voodoo->tmuConfig[0].tmuRam == 2) {
+ (voodoo->tmuConfig[0].tmuRam == 2 ||
+ voodoo->tmuConfig[0].tmuRam == 4)) {
/* Voodoo 2 */
useBGR = GL_TRUE;
system = "Voodoo2";
diff --git a/xc/extras/Mesa/src/FX/fxdd.c b/xc/extras/Mesa/src/FX/fxdd.c
index a979cad04..2705d6bc1 100644
--- a/xc/extras/Mesa/src/FX/fxdd.c
+++ b/xc/extras/Mesa/src/FX/fxdd.c
@@ -700,7 +700,7 @@ static const GLubyte *fxDDGetString(GLcontext *ctx, GLenum name)
}
}
/* now make the GL_RENDERER string */
- sprintf(buffer, "Mesa DRI %s 20000420", hardware);
+ sprintf(buffer, "Mesa DRI %s 20000510", hardware);
return buffer;
}
case GL_VENDOR:
@@ -900,7 +900,6 @@ void fxDDInitExtensions( GLcontext *ctx )
gl_extensions_disable(ctx, "GL_EXT_blend_minmax");
gl_extensions_disable(ctx, "GL_EXT_blend_subtract");
gl_extensions_disable(ctx, "GL_EXT_blend_color");
- gl_extensions_disable(ctx, "GL_EXT_paletted_texture");
gl_extensions_add(ctx, DEFAULT_ON, "3DFX_set_global_palette", 0);
diff --git a/xc/extras/Mesa/src/FX/fxddtex.c b/xc/extras/Mesa/src/FX/fxddtex.c
index 55e0be6bf..db0acb6b4 100644
--- a/xc/extras/Mesa/src/FX/fxddtex.c
+++ b/xc/extras/Mesa/src/FX/fxddtex.c
@@ -325,31 +325,31 @@ void fxDDTexParam(GLcontext *ctx, GLenum target, struct gl_texture_object *tObj,
void fxDDTexDel(GLcontext *ctx, struct gl_texture_object *tObj)
{
- fxMesaContext fxMesa=(fxMesaContext)ctx->DriverCtx;
- tfxTexInfo *ti=fxTMGetTexInfo(tObj);
+ fxMesaContext fxMesa = FX_CONTEXT(ctx);
+ tfxTexInfo *ti = fxTMGetTexInfo(tObj);
- if (MESA_VERBOSE&VERBOSE_DRIVER) {
- fprintf(stderr,"fxmesa: fxDDTexDel(%d,%x)\n",tObj->Name,(GLuint)ti);
+ if (MESA_VERBOSE & VERBOSE_DRIVER) {
+ fprintf(stderr, "fxmesa: fxDDTexDel(%d,%p)\n", tObj->Name, ti);
}
if (!ti)
return;
- fxTMFreeTexture(fxMesa,tObj);
+ fxTMFreeTexture(fxMesa, tObj);
FREE(ti);
- tObj->DriverData=NULL;
+ tObj->DriverData = NULL;
- ctx->NewState|=NEW_TEXTURING;
+ ctx->NewState |= NEW_TEXTURING;
}
/*
- * Convert gl_color_table table to Glide's format.
+ * Convert a gl_color_table texture palette to Glide's format.
*/
-
-static void convertPalette(FxU32 data[256], const struct gl_color_table *table)
+static void
+convertPalette(FxU32 data[256], const struct gl_color_table *table)
{
const GLubyte *tableUB = (const GLubyte *) table->Table;
GLint width = table->Size;
@@ -415,28 +415,28 @@ static void convertPalette(FxU32 data[256], const struct gl_color_table *table)
void fxDDTexPalette(GLcontext *ctx, struct gl_texture_object *tObj)
{
- fxMesaContext fxMesa=(fxMesaContext)ctx->DriverCtx;
+ fxMesaContext fxMesa = FX_CONTEXT(ctx);
if (tObj) {
/* per-texture palette */
tfxTexInfo *ti;
- if (MESA_VERBOSE&VERBOSE_DRIVER) {
- fprintf(stderr,"fxmesa: fxDDTexPalette(%d,%x)\n",
- tObj->Name,(GLuint)tObj->DriverData);
+ if (MESA_VERBOSE & VERBOSE_DRIVER) {
+ fprintf(stderr, "fxmesa: fxDDTexPalette(%d,%x)\n",
+ tObj->Name, (GLuint) tObj->DriverData);
}
if (!tObj->DriverData)
- tObj->DriverData=fxAllocTexObjData(fxMesa);
- ti=fxTMGetTexInfo(tObj);
+ tObj->DriverData = fxAllocTexObjData(fxMesa);
+ ti = fxTMGetTexInfo(tObj);
convertPalette(ti->palette.data, &tObj->Palette);
- fxTexInvalidate(ctx,tObj);
+ fxTexInvalidate(ctx, tObj);
}
else {
/* global texture palette */
- if (MESA_VERBOSE&VERBOSE_DRIVER) {
- fprintf(stderr,"fxmesa: fxDDTexPalette(global)\n");
+ if (MESA_VERBOSE & VERBOSE_DRIVER) {
+ fprintf(stderr, "fxmesa: fxDDTexPalette(global)\n");
}
convertPalette(fxMesa->glbPalette.data, &ctx->Texture.Palette);
- fxMesa->new_state|=FX_NEW_TEXTURING;
+ fxMesa->new_state |= FX_NEW_TEXTURING;
ctx->Driver.RenderStart = fxSetupFXUnits;
}
}
@@ -444,33 +444,35 @@ void fxDDTexPalette(GLcontext *ctx, struct gl_texture_object *tObj)
void fxDDTexUseGlbPalette(GLcontext *ctx, GLboolean state)
{
- fxMesaContext fxMesa=(fxMesaContext)ctx->DriverCtx;
+ fxMesaContext fxMesa = FX_CONTEXT(ctx);
if (MESA_VERBOSE&VERBOSE_DRIVER) {
fprintf(stderr,"fxmesa: fxDDTexUseGlbPalette(%d)\n",state);
}
- if(state) {
- fxMesa->haveGlobalPaletteTexture=1;
+ if (state) {
+ fxMesa->haveGlobalPaletteTexture = 1;
- FX_grTexDownloadTable(GR_TMU0,GR_TEXTABLE_PALETTE,&(fxMesa->glbPalette));
+ FX_grTexDownloadTable(GR_TMU0,GR_TEXTABLE_PALETTE, &(fxMesa->glbPalette));
if (fxMesa->haveTwoTMUs)
- FX_grTexDownloadTable(GR_TMU1,GR_TEXTABLE_PALETTE,&(fxMesa->glbPalette));
- } else {
- fxMesa->haveGlobalPaletteTexture=0;
+ FX_grTexDownloadTable(GR_TMU1, GR_TEXTABLE_PALETTE, &(fxMesa->glbPalette));
+ }
+ else {
+ fxMesa->haveGlobalPaletteTexture = 0;
- if((ctx->Texture.Unit[0].Current==ctx->Texture.Unit[0].CurrentD[2]) &&
- (ctx->Texture.Unit[0].Current!=NULL)) {
- struct gl_texture_object *tObj=ctx->Texture.Unit[0].Current;
+ if ((ctx->Texture.Unit[0].Current == ctx->Texture.Unit[0].CurrentD[2]) &&
+ (ctx->Texture.Unit[0].Current != NULL)) {
+ struct gl_texture_object *tObj = ctx->Texture.Unit[0].Current;
if (!tObj->DriverData)
- tObj->DriverData=fxAllocTexObjData(fxMesa);
+ tObj->DriverData = fxAllocTexObjData(fxMesa);
- fxTexInvalidate(ctx,tObj);
+ fxTexInvalidate(ctx, tObj);
}
}
}
+
static int logbase2(int n)
{
GLint i = 1;
diff --git a/xc/extras/Mesa/src/FX/fxdrv.h b/xc/extras/Mesa/src/FX/fxdrv.h
index 79976042a..c85c73d8e 100644
--- a/xc/extras/Mesa/src/FX/fxdrv.h
+++ b/xc/extras/Mesa/src/FX/fxdrv.h
@@ -50,14 +50,10 @@
* you turn debugging on/off from the debugger.
*/
-#ifndef XFree86Server
-#include <math.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <limits.h>
-#include <assert.h>
-#else
+#ifdef XFree86Server
#include "GL/xf86glx.h"
+#else
+#include "glheader.h"
#endif
diff --git a/xc/extras/Mesa/src/FX/fxglidew.c b/xc/extras/Mesa/src/FX/fxglidew.c
index 0303054bf..5155c825a 100644
--- a/xc/extras/Mesa/src/FX/fxglidew.c
+++ b/xc/extras/Mesa/src/FX/fxglidew.c
@@ -154,7 +154,17 @@ extern FxU32 FX_grTexMaxAddress(GrChipID_t tmu) {
FxBool FX_grSstControl(FxU32 code)
{
#if defined(FX_GLIDE3)
- (void) code;
+ /* The glide 3 sources call for grEnable/grDisable to be called in exchange
+ * for grSstControl. */
+ switch(code) {
+ case GR_CONTROL_ACTIVATE:
+ grEnable(GR_PASSTHRU);
+ break;
+ case GR_CONTROL_DEACTIVATE:
+ grDisable(GR_PASSTHRU);
+ break;
+ }
+ /* Appearently GR_CONTROL_RESIZE can be ignored. */
return 1; /* OK? */
#else
FxU32 result;
@@ -385,6 +395,10 @@ int FX_grSstQueryHardware(GrHwConfiguration *c)
return i;
}
+
+#endif /* FX_GLIDE3 */
+
+/* It appears to me that this function is needed either way. */
FX_GrContext_t FX_grSstWinOpen( FxU32 hWnd,
GrScreenResolution_t screen_resolution,
GrScreenRefresh_t refresh_rate,
@@ -423,7 +437,6 @@ FX_GrContext_t FX_grSstWinOpen( FxU32 hWnd,
-#endif
#else
/*
diff --git a/xc/extras/Mesa/src/FX/fxsetup.c b/xc/extras/Mesa/src/FX/fxsetup.c
index 5e82443d7..f1a56650b 100644
--- a/xc/extras/Mesa/src/FX/fxsetup.c
+++ b/xc/extras/Mesa/src/FX/fxsetup.c
@@ -1384,12 +1384,14 @@ static void fxSetupDepthTest(GLcontext *ctx)
fxMesaContext fxMesa=(fxMesaContext)ctx->DriverCtx;
tfxUnitsState *us=&fxMesa->unitsState;
- if(us->depthTestEnabled)
+ if (us->depthTestEnabled) {
FX_grDepthBufferFunction(us->depthTestFunc);
- else
+ FX_grDepthMask(us->depthMask);
+ }
+ else {
FX_grDepthBufferFunction(GR_CMP_ALWAYS);
-
- FX_grDepthMask(us->depthMask);
+ FX_grDepthMask(FXFALSE);
+ }
}
/************************************************************************/
diff --git a/xc/extras/Mesa/src/FX/fxtritmp.h b/xc/extras/Mesa/src/FX/fxtritmp.h
index 737758fff..9e59b4fc7 100644
--- a/xc/extras/Mesa/src/FX/fxtritmp.h
+++ b/xc/extras/Mesa/src/FX/fxtritmp.h
@@ -259,9 +259,10 @@ static void TAG(fx_quad)(GLcontext *ctx, GLuint e1, GLuint e2, GLuint e3,
}
}
-#define DRAW_LINE(tmp0, tmp1, width) \
- do { \
- GrVertex verts[4]; \
+#define DRAW_LINE(tmp0, tmp1, width) \
+ do { \
+ const float xoff = 0.125, yoff = 0.125; \
+ GrVertex verts[4]; \
float dx, dy, wx, wy; \
\
dx = tmp0->x - tmp1->x; \
@@ -280,17 +281,17 @@ static void TAG(fx_quad)(GLcontext *ctx, GLuint e1, GLuint e2, GLuint e3,
verts[2] = *tmp1; \
verts[3] = *tmp1; \
\
- verts[0].x = tmp0->x - wx; \
- verts[0].y = tmp0->y - wy; \
+ verts[0].x = tmp0->x - wx + xoff; \
+ verts[0].y = tmp0->y - wy + yoff; \
\
- verts[1].x = tmp0->x + wx; \
- verts[1].y = tmp0->y + wy; \
+ verts[1].x = tmp0->x + wx + xoff; \
+ verts[1].y = tmp0->y + wy + yoff; \
\
- verts[2].x = tmp1->x + wx; \
- verts[2].y = tmp1->y + wy; \
+ verts[2].x = tmp1->x + wx + xoff; \
+ verts[2].y = tmp1->y + wy + yoff; \
\
- verts[3].x = tmp1->x - wx; \
- verts[3].y = tmp1->y - wy; \
+ verts[3].x = tmp1->x - wx + xoff; \
+ verts[3].y = tmp1->y - wy + yoff; \
\
FX_grDrawPolygonVertexList(4, verts); \
} while (0)
diff --git a/xc/extras/Mesa/src/OSmesa/osmesa.c b/xc/extras/Mesa/src/OSmesa/osmesa.c
new file mode 100644
index 000000000..62b18f9e6
--- /dev/null
+++ b/xc/extras/Mesa/src/OSmesa/osmesa.c
@@ -0,0 +1,1637 @@
+
+/*
+ * Mesa 3-D graphics library
+ * Version: 3.3
+ *
+ * Copyright (C) 1999-2000 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.
+ */
+
+
+/*
+ * Off-Screen Mesa rendering / Rendering into client memory space
+ *
+ * Note on thread safety: this driver is thread safe. All
+ * functions are reentrant. The notion of current context is
+ * managed by the core gl_make_current() and gl_get_current_context()
+ * functions. Those functions are thread-safe.
+ */
+
+
+#ifdef PC_HEADER
+#include "all.h"
+#else
+#include "glheader.h"
+#include "GL/osmesa.h"
+#include "context.h"
+#include "depth.h"
+#include "mem.h"
+#include "matrix.h"
+#include "types.h"
+#include "vb.h"
+#include "extensions.h"
+#endif
+
+
+/*
+ * This is the OS/Mesa context struct.
+ * Notice how it includes a GLcontext. By doing this we're mimicking
+ * C++ inheritance/derivation.
+ * Later, we can cast a GLcontext pointer into an OSMesaContext pointer
+ * or vice versa.
+ */
+struct osmesa_context {
+ GLcontext gl_ctx; /* The core GL/Mesa context */
+ GLvisual *gl_visual; /* Describes the buffers */
+ GLframebuffer *gl_buffer; /* Depth, stencil, accum, etc buffers */
+ GLenum format; /* either GL_RGBA or GL_COLOR_INDEX */
+ void *buffer; /* the image buffer */
+ GLint width, height; /* size of image buffer */
+ GLuint pixel; /* current color index or RGBA pixel value */
+ GLuint clearpixel; /* pixel for clearing the color buffer */
+ GLint rowlength; /* number of pixels per row */
+ GLint userRowLength; /* user-specified number of pixels per row */
+ GLint rshift, gshift; /* bit shifts for RGBA formats */
+ GLint bshift, ashift;
+ GLint rind, gind, bind; /* index offsets for RGBA formats */
+ void *rowaddr[MAX_HEIGHT]; /* address of first pixel in each image row */
+ GLboolean yup; /* TRUE -> Y increases upward */
+ /* FALSE -> Y increases downward */
+};
+
+
+
+/* A forward declaration: */
+static void osmesa_update_state( GLcontext *ctx );
+
+
+
+/**********************************************************************/
+/***** Public Functions *****/
+/**********************************************************************/
+
+
+/*
+ * Create an Off-Screen Mesa rendering context. The only attribute needed is
+ * an RGBA vs Color-Index mode flag.
+ *
+ * Input: format - either GL_RGBA or GL_COLOR_INDEX
+ * sharelist - specifies another OSMesaContext with which to share
+ * display lists. NULL indicates no sharing.
+ * Return: an OSMesaContext or 0 if error
+ */
+OSMesaContext GLAPIENTRY
+OSMesaCreateContext( GLenum format, OSMesaContext sharelist )
+{
+ OSMesaContext osmesa;
+ GLint rshift, gshift, bshift, ashift;
+ GLint rind, gind, bind;
+ GLint indexBits, alphaBits;
+ GLboolean rgbmode;
+ GLboolean swalpha;
+ GLuint i4 = 1;
+ GLubyte *i1 = (GLubyte *) &i4;
+ GLint little_endian = *i1;
+
+ swalpha = GL_FALSE;
+ rind = gind = bind = 0;
+ if (format==OSMESA_COLOR_INDEX) {
+ indexBits = 8;
+ rshift = gshift = bshift = ashift = 0;
+ rgbmode = GL_FALSE;
+ }
+ else if (format==OSMESA_RGBA) {
+ indexBits = 0;
+ alphaBits = 8;
+ if (little_endian) {
+ rshift = 0;
+ gshift = 8;
+ bshift = 16;
+ ashift = 24;
+ }
+ else {
+ rshift = 24;
+ gshift = 16;
+ bshift = 8;
+ ashift = 0;
+ }
+ rgbmode = GL_TRUE;
+ }
+ else if (format==OSMESA_BGRA) {
+ indexBits = 0;
+ alphaBits = 8;
+ if (little_endian) {
+ ashift = 0;
+ rshift = 8;
+ gshift = 16;
+ bshift = 24;
+ }
+ else {
+ bshift = 24;
+ gshift = 16;
+ rshift = 8;
+ ashift = 0;
+ }
+ rgbmode = GL_TRUE;
+ }
+ else if (format==OSMESA_ARGB) {
+ indexBits = 0;
+ alphaBits = 8;
+ if (little_endian) {
+ bshift = 0;
+ gshift = 8;
+ rshift = 16;
+ ashift = 24;
+ }
+ else {
+ ashift = 24;
+ rshift = 16;
+ gshift = 8;
+ bshift = 0;
+ }
+ rgbmode = GL_TRUE;
+ }
+ else if (format==OSMESA_RGB) {
+ indexBits = 0;
+ alphaBits = 0;
+ bshift = 0;
+ gshift = 8;
+ rshift = 16;
+ ashift = 24;
+ bind = 2;
+ gind = 1;
+ rind = 0;
+ rgbmode = GL_TRUE;
+ swalpha = GL_TRUE;
+ }
+ else if (format==OSMESA_BGR) {
+ indexBits = 0;
+ alphaBits = 0;
+ bshift = 0;
+ gshift = 8;
+ rshift = 16;
+ ashift = 24;
+ bind = 0;
+ gind = 1;
+ rind = 2;
+ rgbmode = GL_TRUE;
+ swalpha = GL_TRUE;
+ }
+ else {
+ return NULL;
+ }
+
+
+ osmesa = (OSMesaContext) CALLOC_STRUCT(osmesa_context);
+ if (osmesa) {
+ osmesa->gl_visual = gl_create_visual( rgbmode,
+ swalpha, /* software alpha */
+ GL_FALSE, /* double buffer */
+ GL_FALSE, /* stereo */
+ DEFAULT_SOFTWARE_DEPTH_BITS,
+ STENCIL_BITS,
+ rgbmode ? ACCUM_BITS : 0,
+ indexBits,
+ 8, 8, 8, alphaBits );
+ if (!osmesa->gl_visual) {
+ FREE(osmesa);
+ return NULL;
+ }
+
+ if (!_mesa_initialize_context(&osmesa->gl_ctx,
+ osmesa->gl_visual,
+ sharelist ? &sharelist->gl_ctx
+ : (GLcontext *) NULL,
+ (void *) osmesa, GL_TRUE )) {
+ _mesa_destroy_visual( osmesa->gl_visual );
+ FREE(osmesa);
+ return NULL;
+ }
+ gl_extensions_enable(&(osmesa->gl_ctx),"GL_HP_occlusion_test");
+ gl_extensions_enable(&(osmesa->gl_ctx), "GL_ARB_texture_cube_map");
+
+ osmesa->gl_buffer = gl_create_framebuffer( osmesa->gl_visual,
+ osmesa->gl_visual->DepthBits > 0,
+ osmesa->gl_visual->StencilBits > 0,
+ osmesa->gl_visual->AccumRedBits > 0,
+ osmesa->gl_visual->AlphaBits > 0 );
+
+ if (!osmesa->gl_buffer) {
+ gl_destroy_visual( osmesa->gl_visual );
+ gl_free_context_data( &osmesa->gl_ctx );
+ FREE(osmesa);
+ return NULL;
+ }
+ osmesa->format = format;
+ osmesa->buffer = NULL;
+ osmesa->width = 0;
+ osmesa->height = 0;
+ osmesa->pixel = 0;
+ osmesa->clearpixel = 0;
+ osmesa->userRowLength = 0;
+ osmesa->rowlength = 0;
+ osmesa->yup = GL_TRUE;
+ osmesa->rshift = rshift;
+ osmesa->gshift = gshift;
+ osmesa->bshift = bshift;
+ osmesa->ashift = ashift;
+ osmesa->rind = rind;
+ osmesa->gind = gind;
+ osmesa->bind = bind;
+ }
+ return osmesa;
+}
+
+
+
+/*
+ * Destroy an Off-Screen Mesa rendering context.
+ *
+ * Input: ctx - the context to destroy
+ */
+void GLAPIENTRY OSMesaDestroyContext( OSMesaContext ctx )
+{
+ if (ctx) {
+ gl_destroy_visual( ctx->gl_visual );
+ gl_destroy_framebuffer( ctx->gl_buffer );
+ gl_free_context_data( &ctx->gl_ctx );
+ FREE( ctx );
+ }
+}
+
+
+
+/*
+ * Recompute the values of the context's rowaddr array.
+ */
+static void compute_row_addresses( OSMesaContext ctx )
+{
+ GLint i;
+
+ if (ctx->yup) {
+ /* Y=0 is bottom line of window */
+ if (ctx->format==OSMESA_COLOR_INDEX) {
+ /* 1-byte CI mode */
+ GLubyte *origin = (GLubyte *) ctx->buffer;
+ for (i=0;i<MAX_HEIGHT;i++) {
+ ctx->rowaddr[i] = origin + i * ctx->rowlength;
+ }
+ }
+ else {
+ if ((ctx->format==OSMESA_RGB) || (ctx->format==OSMESA_BGR)) {
+ /* 3-byte RGB mode */
+ GLubyte *origin = (GLubyte *) ctx->buffer;
+ for (i=0;i<MAX_HEIGHT;i++) {
+ ctx->rowaddr[i] = origin + (i * (ctx->rowlength*3));
+ }
+ } else {
+ /* 4-byte RGBA mode */
+ GLuint *origin = (GLuint *) ctx->buffer;
+ for (i=0;i<MAX_HEIGHT;i++) {
+ ctx->rowaddr[i] = origin + i * ctx->rowlength;
+ }
+ }
+ }
+ }
+ else {
+ /* Y=0 is top line of window */
+ if (ctx->format==OSMESA_COLOR_INDEX) {
+ /* 1-byte CI mode */
+ GLubyte *origin = (GLubyte *) ctx->buffer;
+ for (i=0;i<MAX_HEIGHT;i++) {
+ ctx->rowaddr[i] = origin + (ctx->height-i-1) * ctx->rowlength;
+ }
+ }
+ else {
+ if ((ctx->format==OSMESA_RGB) || (ctx->format==OSMESA_BGR)) {
+ /* 3-byte RGB mode */
+ GLubyte *origin = (GLubyte *) ctx->buffer;
+ for (i=0;i<MAX_HEIGHT;i++) {
+ ctx->rowaddr[i] = origin + ((ctx->height-i-1) * (ctx->rowlength*3));
+ }
+ } else {
+ /* 4-byte RGBA mode */
+ GLuint *origin = (GLuint *) ctx->buffer;
+ for (i=0;i<MAX_HEIGHT;i++) {
+ ctx->rowaddr[i] = origin + (ctx->height-i-1) * ctx->rowlength;
+ }
+ }
+ }
+ }
+}
+
+
+/*
+ * Bind an OSMesaContext to an image buffer. The image buffer is just a
+ * block of memory which the client provides. Its size must be at least
+ * as large as width*height*sizeof(type). Its address should be a multiple
+ * of 4 if using RGBA mode.
+ *
+ * Image data is stored in the order of glDrawPixels: row-major order
+ * with the lower-left image pixel stored in the first array position
+ * (ie. bottom-to-top).
+ *
+ * Since the only type initially supported is GL_UNSIGNED_BYTE, if the
+ * context is in RGBA mode, each pixel will be stored as a 4-byte RGBA
+ * value. If the context is in color indexed mode, each pixel will be
+ * stored as a 1-byte value.
+ *
+ * If the context's viewport hasn't been initialized yet, it will now be
+ * initialized to (0,0,width,height).
+ *
+ * Input: ctx - the rendering context
+ * buffer - the image buffer memory
+ * type - data type for pixel components, only GL_UNSIGNED_BYTE
+ * supported now
+ * width, height - size of image buffer in pixels, at least 1
+ * Return: GL_TRUE if success, GL_FALSE if error because of invalid ctx,
+ * invalid buffer address, type!=GL_UNSIGNED_BYTE, width<1, height<1,
+ * width>internal limit or height>internal limit.
+ */
+GLboolean GLAPIENTRY
+OSMesaMakeCurrent( OSMesaContext ctx, void *buffer, GLenum type,
+ GLsizei width, GLsizei height )
+{
+ if (!ctx || !buffer || type!=GL_UNSIGNED_BYTE
+ || width<1 || height<1 || width>MAX_WIDTH || height>MAX_HEIGHT) {
+ return GL_FALSE;
+ }
+
+ osmesa_update_state( &ctx->gl_ctx );
+ gl_make_current( &ctx->gl_ctx, ctx->gl_buffer );
+
+ ctx->buffer = buffer;
+ ctx->width = width;
+ ctx->height = height;
+ if (ctx->userRowLength)
+ ctx->rowlength = ctx->userRowLength;
+ else
+ ctx->rowlength = width;
+
+ compute_row_addresses( ctx );
+
+ /* init viewport */
+ if (ctx->gl_ctx.Viewport.Width==0) {
+ /* initialize viewport and scissor box to buffer size */
+ _mesa_Viewport( 0, 0, width, height );
+ ctx->gl_ctx.Scissor.Width = width;
+ ctx->gl_ctx.Scissor.Height = height;
+ }
+
+ return GL_TRUE;
+}
+
+
+
+OSMesaContext GLAPIENTRY OSMesaGetCurrentContext( void )
+{
+ GLcontext *ctx = gl_get_current_context();
+ if (ctx)
+ return (OSMesaContext) ctx;
+ else
+ return NULL;
+}
+
+
+
+void GLAPIENTRY OSMesaPixelStore( GLint pname, GLint value )
+{
+ OSMesaContext ctx = OSMesaGetCurrentContext();
+
+ switch (pname) {
+ case OSMESA_ROW_LENGTH:
+ if (value<0) {
+ gl_error( &ctx->gl_ctx, GL_INVALID_VALUE,
+ "OSMesaPixelStore(value)" );
+ return;
+ }
+ ctx->userRowLength = value;
+ ctx->rowlength = value;
+ break;
+ case OSMESA_Y_UP:
+ ctx->yup = value ? GL_TRUE : GL_FALSE;
+ break;
+ default:
+ gl_error( &ctx->gl_ctx, GL_INVALID_ENUM, "OSMesaPixelStore(pname)" );
+ return;
+ }
+
+ compute_row_addresses( ctx );
+}
+
+
+void GLAPIENTRY OSMesaGetIntegerv( GLint pname, GLint *value )
+{
+ OSMesaContext ctx = OSMesaGetCurrentContext();
+
+ switch (pname) {
+ case OSMESA_WIDTH:
+ *value = ctx->width;
+ return;
+ case OSMESA_HEIGHT:
+ *value = ctx->height;
+ return;
+ case OSMESA_FORMAT:
+ *value = ctx->format;
+ return;
+ case OSMESA_TYPE:
+ *value = GL_UNSIGNED_BYTE;
+ return;
+ case OSMESA_ROW_LENGTH:
+ *value = ctx->rowlength;
+ return;
+ case OSMESA_Y_UP:
+ *value = ctx->yup;
+ return;
+ default:
+ gl_error(&ctx->gl_ctx, GL_INVALID_ENUM, "OSMesaGetIntergerv(pname)");
+ return;
+ }
+}
+
+/*
+ * Return the depth buffer associated with an OSMesa context.
+ * Input: c - the OSMesa context
+ * Output: width, height - size of buffer in pixels
+ * bytesPerValue - bytes per depth value (2 or 4)
+ * buffer - pointer to depth buffer values
+ * Return: GL_TRUE or GL_FALSE to indicate success or failure.
+ */
+GLboolean GLAPIENTRY
+OSMesaGetDepthBuffer( OSMesaContext c, GLint *width, GLint *height,
+ GLint *bytesPerValue, void **buffer )
+{
+ if ((!c->gl_buffer) || (!c->gl_buffer->DepthBuffer)) {
+ *width = 0;
+ *height = 0;
+ *bytesPerValue = 0;
+ *buffer = 0;
+ return GL_FALSE;
+ }
+ else {
+ *width = c->gl_buffer->Width;
+ *height = c->gl_buffer->Height;
+ *bytesPerValue = sizeof(GLdepth);
+ *buffer = c->gl_buffer->DepthBuffer;
+ return GL_TRUE;
+ }
+}
+
+/*
+ * Return the color buffer associated with an OSMesa context.
+ * Input: c - the OSMesa context
+ * Output: width, height - size of buffer in pixels
+ * format - the pixel format (OSMESA_FORMAT)
+ * buffer - pointer to color buffer values
+ * Return: GL_TRUE or GL_FALSE to indicate success or failure.
+ */
+GLboolean GLAPIENTRY
+OSMesaGetColorBuffer( OSMesaContext c, GLint *width,
+ GLint *height, GLint *format, void **buffer )
+{
+ if (!c->buffer) {
+ *width = 0;
+ *height = 0;
+ *format = 0;
+ *buffer = 0;
+ return GL_FALSE;
+ }
+ else {
+ *width = c->width;
+ *height = c->height;
+ *format = c->format;
+ *buffer = c->buffer;
+ return GL_TRUE;
+ }
+}
+
+/**********************************************************************/
+/*** Device Driver Functions ***/
+/**********************************************************************/
+
+
+/*
+ * Useful macros:
+ */
+#define PACK_RGBA(R,G,B,A) ( ((R) << osmesa->rshift) \
+ | ((G) << osmesa->gshift) \
+ | ((B) << osmesa->bshift) \
+ | ((A) << osmesa->ashift) )
+
+#define PACK_RGBA2(R,G,B,A) ( ((R) << rshift) \
+ | ((G) << gshift) \
+ | ((B) << bshift) \
+ | ((A) << ashift) )
+
+#define UNPACK_RED(P) (((P) >> osmesa->rshift) & 0xff)
+#define UNPACK_GREEN(P) (((P) >> osmesa->gshift) & 0xff)
+#define UNPACK_BLUE(P) (((P) >> osmesa->bshift) & 0xff)
+#define UNPACK_ALPHA(P) (((P) >> osmesa->ashift) & 0xff)
+
+#define PIXELADDR1(X,Y) ((GLubyte *) osmesa->rowaddr[Y] + (X))
+#define PIXELADDR3(X,Y) ((GLubyte *) osmesa->rowaddr[Y] + ((X)*3))
+#define PIXELADDR4(X,Y) ((GLuint *) osmesa->rowaddr[Y] + (X))
+
+
+
+
+static GLboolean set_draw_buffer( GLcontext *ctx, GLenum mode )
+{
+ (void) ctx;
+ if (mode==GL_FRONT_LEFT) {
+ return GL_TRUE;
+ }
+ else {
+ return GL_FALSE;
+ }
+}
+
+
+static void set_read_buffer( GLcontext *ctx, GLframebuffer *buffer, GLenum mode )
+{
+ /* separate read buffer not supported */
+ ASSERT(buffer == ctx->DrawBuffer);
+ ASSERT(mode == GL_FRONT_LEFT);
+}
+
+
+static void clear_index( GLcontext *ctx, GLuint index )
+{
+ OSMesaContext osmesa = (OSMesaContext) ctx;
+ osmesa->clearpixel = index;
+}
+
+
+
+static void clear_color( GLcontext *ctx,
+ GLubyte r, GLubyte g, GLubyte b, GLubyte a )
+{
+ OSMesaContext osmesa = (OSMesaContext) ctx;
+ osmesa->clearpixel = PACK_RGBA( r, g, b, a );
+}
+
+
+
+static GLbitfield clear( GLcontext *ctx, GLbitfield mask, GLboolean all,
+ GLint x, GLint y, GLint width, GLint height )
+{
+ OSMesaContext osmesa = (OSMesaContext) ctx;
+ const GLuint *colorMask = (GLuint *) &ctx->Color.ColorMask;
+
+ /* we can't handle color or index masking */
+ if (*colorMask != 0xffffffff || ctx->Color.IndexMask != 0xffffffff)
+ return mask;
+
+ /* sanity check - we only have a front-left buffer */
+ ASSERT((mask & (DD_FRONT_RIGHT_BIT | DD_BACK_LEFT_BIT | DD_BACK_RIGHT_BIT)) == 0);
+
+ if (mask & DD_FRONT_LEFT_BIT) {
+ if (osmesa->format==OSMESA_COLOR_INDEX) {
+ if (all) {
+ /* Clear whole CI buffer */
+ MEMSET(osmesa->buffer, osmesa->clearpixel,
+ osmesa->rowlength * osmesa->height);
+ }
+ else {
+ /* Clear part of CI buffer */
+ GLint i, j;
+ for (i=0;i<height;i++) {
+ GLubyte *ptr1 = PIXELADDR1( x, (y+i) );
+ for (j=0;j<width;j++) {
+ *ptr1++ = osmesa->clearpixel;
+ }
+ }
+ }
+ }
+ else if ((osmesa->format==OSMESA_RGB)||(osmesa->format==OSMESA_BGR)) {
+ GLubyte rval = UNPACK_RED(osmesa->clearpixel);
+ GLubyte gval = UNPACK_GREEN(osmesa->clearpixel);
+ GLubyte bval = UNPACK_BLUE(osmesa->clearpixel);
+ GLint rind = osmesa->rind;
+ GLint gind = osmesa->gind;
+ GLint bind = osmesa->bind;
+ if (all) {
+ GLuint i, n;
+ GLubyte *ptr3 = (GLubyte *) osmesa->buffer;
+ /* Clear whole RGB buffer */
+ n = osmesa->rowlength * osmesa->height;
+ for (i=0;i<n;i++) {
+ ptr3[rind] = rval;
+ ptr3[gind] = gval;
+ ptr3[bind] = bval;
+ ptr3 += 3;
+ }
+ }
+ else {
+ /* Clear part of RGB buffer */
+ GLint i, j;
+ for (i=0;i<height;i++) {
+ GLubyte *ptr3 = PIXELADDR3( x, (y+i) );
+ for (j=0;j<width;j++) {
+ ptr3[rind] = rval;
+ ptr3[gind] = gval;
+ ptr3[bind] = bval;
+ ptr3 += 3;
+ }
+ }
+ }
+ }
+ else {
+ if (all) {
+ /* Clear whole RGBA buffer */
+ GLuint i, n, *ptr4;
+ n = osmesa->rowlength * osmesa->height;
+ ptr4 = (GLuint *) osmesa->buffer;
+ if (osmesa->clearpixel) {
+ for (i=0;i<n;i++) {
+ *ptr4++ = osmesa->clearpixel;
+ }
+ }
+ else {
+ BZERO(ptr4, n * sizeof(GLuint));
+ }
+ }
+ else {
+ /* Clear part of RGBA buffer */
+ GLint i, j;
+ for (i=0;i<height;i++) {
+ GLuint *ptr4 = PIXELADDR4( x, (y+i) );
+ for (j=0;j<width;j++) {
+ *ptr4++ = osmesa->clearpixel;
+ }
+ }
+ }
+ }
+ }
+ /* have Mesa clear all other buffers */
+ return mask & (~DD_FRONT_LEFT_BIT);
+}
+
+
+
+static void set_index( GLcontext *ctx, GLuint index )
+{
+ OSMesaContext osmesa = (OSMesaContext) ctx;
+ osmesa->pixel = index;
+}
+
+
+
+static void set_color( GLcontext *ctx,
+ GLubyte r, GLubyte g, GLubyte b, GLubyte a )
+{
+ OSMesaContext osmesa = (OSMesaContext) ctx;
+ osmesa->pixel = PACK_RGBA( r, g, b, a );
+}
+
+
+
+static void buffer_size( GLcontext *ctx, GLuint *width, GLuint *height )
+{
+ OSMesaContext osmesa = (OSMesaContext) ctx;
+ *width = osmesa->width;
+ *height = osmesa->height;
+}
+
+
+/**********************************************************************/
+/***** Read/write spans/arrays of RGBA pixels *****/
+/**********************************************************************/
+
+/* Write RGBA pixels to an RGBA (or permuted) buffer. */
+static void write_rgba_span( const GLcontext *ctx,
+ GLuint n, GLint x, GLint y,
+ CONST GLubyte rgba[][4], const GLubyte mask[] )
+{
+ OSMesaContext osmesa = (OSMesaContext) ctx;
+ GLuint *ptr4 = PIXELADDR4( x, y );
+ GLuint i;
+ GLint rshift = osmesa->rshift;
+ GLint gshift = osmesa->gshift;
+ GLint bshift = osmesa->bshift;
+ GLint ashift = osmesa->ashift;
+ if (mask) {
+ for (i=0;i<n;i++,ptr4++) {
+ if (mask[i]) {
+ *ptr4 = PACK_RGBA2( rgba[i][RCOMP], rgba[i][GCOMP], rgba[i][BCOMP], rgba[i][ACOMP] );
+ }
+ }
+ }
+ else {
+ for (i=0;i<n;i++,ptr4++) {
+ *ptr4 = PACK_RGBA2( rgba[i][RCOMP], rgba[i][GCOMP], rgba[i][BCOMP], rgba[i][ACOMP] );
+ }
+ }
+}
+
+
+/* Write RGBA pixels to an RGBA buffer. This is the fastest span-writer. */
+static void write_rgba_span_rgba( const GLcontext *ctx,
+ GLuint n, GLint x, GLint y,
+ CONST GLubyte rgba[][4],
+ const GLubyte mask[] )
+{
+ OSMesaContext osmesa = (OSMesaContext) ctx;
+ GLuint *ptr4 = PIXELADDR4( x, y );
+ const GLuint *rgba4 = (const GLuint *) rgba;
+ GLuint i;
+ if (mask) {
+ for (i=0;i<n;i++) {
+ if (mask[i]) {
+ ptr4[i] = rgba4[i];
+ }
+ }
+ }
+ else {
+ MEMCPY( ptr4, rgba4, n * 4 );
+ }
+}
+
+
+/* Write RGB pixels to an RGBA (or permuted) buffer. */
+static void write_rgb_span( const GLcontext *ctx,
+ GLuint n, GLint x, GLint y,
+ CONST GLubyte rgb[][3], const GLubyte mask[] )
+{
+ OSMesaContext osmesa = (OSMesaContext) ctx;
+ GLuint *ptr4 = PIXELADDR4( x, y );
+ GLuint i;
+ GLint rshift = osmesa->rshift;
+ GLint gshift = osmesa->gshift;
+ GLint bshift = osmesa->bshift;
+ GLint ashift = osmesa->ashift;
+ if (mask) {
+ for (i=0;i<n;i++,ptr4++) {
+ if (mask[i]) {
+ *ptr4 = PACK_RGBA2( rgb[i][RCOMP], rgb[i][GCOMP], rgb[i][BCOMP], 255 );
+ }
+ }
+ }
+ else {
+ for (i=0;i<n;i++,ptr4++) {
+ *ptr4 = PACK_RGBA2( rgb[i][RCOMP], rgb[i][GCOMP], rgb[i][BCOMP], 255);
+ }
+ }
+}
+
+
+
+static void write_monocolor_span( const GLcontext *ctx,
+ GLuint n, GLint x, GLint y,
+ const GLubyte mask[] )
+{
+ OSMesaContext osmesa = (OSMesaContext) ctx;
+ GLuint *ptr4 = PIXELADDR4(x,y);
+ GLuint i;
+ for (i=0;i<n;i++,ptr4++) {
+ if (mask[i]) {
+ *ptr4 = osmesa->pixel;
+ }
+ }
+}
+
+
+
+static void write_rgba_pixels( const GLcontext *ctx,
+ GLuint n, const GLint x[], const GLint y[],
+ CONST GLubyte rgba[][4], const GLubyte mask[] )
+{
+ OSMesaContext osmesa = (OSMesaContext) ctx;
+ GLuint i;
+ GLint rshift = osmesa->rshift;
+ GLint gshift = osmesa->gshift;
+ GLint bshift = osmesa->bshift;
+ GLint ashift = osmesa->ashift;
+ for (i=0;i<n;i++) {
+ if (mask[i]) {
+ GLuint *ptr4 = PIXELADDR4(x[i],y[i]);
+ *ptr4 = PACK_RGBA2( rgba[i][RCOMP], rgba[i][GCOMP], rgba[i][BCOMP], rgba[i][ACOMP] );
+ }
+ }
+}
+
+
+
+static void write_monocolor_pixels( const GLcontext *ctx,
+ GLuint n, const GLint x[], const GLint y[],
+ const GLubyte mask[] )
+{
+ OSMesaContext osmesa = (OSMesaContext) ctx;
+ GLuint i;
+ for (i=0;i<n;i++) {
+ if (mask[i]) {
+ GLuint *ptr4 = PIXELADDR4(x[i],y[i]);
+ *ptr4 = osmesa->pixel;
+ }
+ }
+}
+
+
+static void read_rgba_span( const GLcontext *ctx, GLuint n, GLint x, GLint y,
+ GLubyte rgba[][4] )
+{
+ OSMesaContext osmesa = (OSMesaContext) ctx;
+ GLuint i;
+ GLuint *ptr4 = PIXELADDR4(x,y);
+ for (i=0;i<n;i++) {
+ GLuint pixel = *ptr4++;
+ rgba[i][RCOMP] = UNPACK_RED(pixel);
+ rgba[i][GCOMP] = UNPACK_GREEN(pixel);
+ rgba[i][BCOMP] = UNPACK_BLUE(pixel);
+ rgba[i][ACOMP] = UNPACK_ALPHA(pixel);
+ }
+}
+
+
+/* Read RGBA pixels from an RGBA buffer */
+static void read_rgba_span_rgba( const GLcontext *ctx,
+ GLuint n, GLint x, GLint y,
+ GLubyte rgba[][4] )
+{
+ OSMesaContext osmesa = (OSMesaContext) ctx;
+ GLuint *ptr4 = PIXELADDR4(x,y);
+ MEMCPY( rgba, ptr4, n * 4 * sizeof(GLubyte) );
+}
+
+
+static void read_rgba_pixels( const GLcontext *ctx,
+ GLuint n, const GLint x[], const GLint y[],
+ GLubyte rgba[][4], const GLubyte mask[] )
+{
+ OSMesaContext osmesa = (OSMesaContext) ctx;
+ GLuint i;
+ for (i=0;i<n;i++) {
+ if (mask[i]) {
+ GLuint *ptr4 = PIXELADDR4(x[i],y[i]);
+ GLuint pixel = *ptr4;
+ rgba[i][RCOMP] = UNPACK_RED(pixel);
+ rgba[i][GCOMP] = UNPACK_GREEN(pixel);
+ rgba[i][BCOMP] = UNPACK_BLUE(pixel);
+ rgba[i][ACOMP] = UNPACK_ALPHA(pixel);
+ }
+ }
+}
+
+/**********************************************************************/
+/***** 3 byte RGB pixel support funcs *****/
+/**********************************************************************/
+
+/* Write RGBA pixels to an RGB or BGR buffer. */
+static void write_rgba_span3( const GLcontext *ctx,
+ GLuint n, GLint x, GLint y,
+ CONST GLubyte rgba[][4], const GLubyte mask[] )
+{
+ OSMesaContext osmesa = (OSMesaContext) ctx;
+ GLubyte *ptr3 = PIXELADDR3( x, y);
+ GLuint i;
+ GLint rind = osmesa->rind;
+ GLint gind = osmesa->gind;
+ GLint bind = osmesa->bind;
+ if (mask) {
+ for (i=0;i<n;i++,ptr3+=3) {
+ if (mask[i]) {
+ ptr3[rind] = rgba[i][RCOMP];
+ ptr3[gind] = rgba[i][GCOMP];
+ ptr3[bind] = rgba[i][BCOMP];
+ }
+ }
+ }
+ else {
+ for (i=0;i<n;i++,ptr3+=3) {
+ ptr3[rind] = rgba[i][RCOMP];
+ ptr3[gind] = rgba[i][GCOMP];
+ ptr3[bind] = rgba[i][BCOMP];
+ }
+ }
+}
+
+/* Write RGB pixels to an RGB or BGR buffer. */
+static void write_rgb_span3( const GLcontext *ctx,
+ GLuint n, GLint x, GLint y,
+ CONST GLubyte rgb[][3], const GLubyte mask[] )
+{
+ OSMesaContext osmesa = (OSMesaContext) ctx;
+ GLubyte *ptr3 = PIXELADDR3( x, y);
+ GLuint i;
+ GLint rind = osmesa->rind;
+ GLint gind = osmesa->gind;
+ GLint bind = osmesa->bind;
+ if (mask) {
+ for (i=0;i<n;i++,ptr3+=3) {
+ if (mask[i]) {
+ ptr3[rind] = rgb[i][RCOMP];
+ ptr3[gind] = rgb[i][GCOMP];
+ ptr3[bind] = rgb[i][BCOMP];
+ }
+ }
+ }
+ else {
+ for (i=0;i<n;i++,ptr3+=3) {
+ ptr3[rind] = rgb[i][RCOMP];
+ ptr3[gind] = rgb[i][GCOMP];
+ ptr3[bind] = rgb[i][BCOMP];
+ }
+ }
+}
+
+
+static void write_monocolor_span3( const GLcontext *ctx,
+ GLuint n, GLint x, GLint y,
+ const GLubyte mask[] )
+{
+ OSMesaContext osmesa = (OSMesaContext) ctx;
+
+ GLubyte rval = UNPACK_RED(osmesa->pixel);
+ GLubyte gval = UNPACK_GREEN(osmesa->pixel);
+ GLubyte bval = UNPACK_BLUE(osmesa->pixel);
+ GLint rind = osmesa->rind;
+ GLint gind = osmesa->gind;
+ GLint bind = osmesa->bind;
+ GLubyte *ptr3 = PIXELADDR3( x, y);
+ GLuint i;
+ for (i=0;i<n;i++,ptr3+=3) {
+ if (mask[i]) {
+ ptr3[rind] = rval;
+ ptr3[gind] = gval;
+ ptr3[bind] = bval;
+ }
+ }
+}
+
+static void write_rgba_pixels3( const GLcontext *ctx,
+ GLuint n, const GLint x[], const GLint y[],
+ CONST GLubyte rgba[][4], const GLubyte mask[] )
+{
+ OSMesaContext osmesa = (OSMesaContext) ctx;
+ GLuint i;
+ GLint rind = osmesa->rind;
+ GLint gind = osmesa->gind;
+ GLint bind = osmesa->bind;
+ for (i=0;i<n;i++) {
+ if (mask[i]) {
+ GLubyte *ptr3 = PIXELADDR3(x[i],y[i]);
+ ptr3[rind] = rgba[i][RCOMP];
+ ptr3[gind] = rgba[i][GCOMP];
+ ptr3[bind] = rgba[i][BCOMP];
+ }
+ }
+}
+
+static void write_monocolor_pixels3( const GLcontext *ctx,
+ GLuint n, const GLint x[], const GLint y[],
+ const GLubyte mask[] )
+{
+ OSMesaContext osmesa = (OSMesaContext) ctx;
+ GLuint i;
+ GLint rind = osmesa->rind;
+ GLint gind = osmesa->gind;
+ GLint bind = osmesa->bind;
+ GLubyte rval = UNPACK_RED(osmesa->pixel);
+ GLubyte gval = UNPACK_GREEN(osmesa->pixel);
+ GLubyte bval = UNPACK_BLUE(osmesa->pixel);
+ for (i=0;i<n;i++) {
+ if (mask[i]) {
+ GLubyte *ptr3 = PIXELADDR3(x[i],y[i]);
+ ptr3[rind] = rval;
+ ptr3[gind] = gval;
+ ptr3[bind] = bval;
+ }
+ }
+}
+
+static void read_rgba_span3( const GLcontext *ctx,
+ GLuint n, GLint x, GLint y,
+ GLubyte rgba[][4] )
+{
+ OSMesaContext osmesa = (OSMesaContext) ctx;
+ GLuint i;
+ GLint rind = osmesa->rind;
+ GLint gind = osmesa->gind;
+ GLint bind = osmesa->bind;
+ const GLubyte *ptr3 = PIXELADDR3( x, y);
+ for (i=0;i<n;i++,ptr3+=3) {
+ rgba[i][RCOMP] = ptr3[rind];
+ rgba[i][GCOMP] = ptr3[gind];
+ rgba[i][BCOMP] = ptr3[bind];
+ rgba[i][ACOMP] = 0;
+ }
+}
+
+static void read_rgba_pixels3( const GLcontext *ctx,
+ GLuint n, const GLint x[], const GLint y[],
+ GLubyte rgba[][4], const GLubyte mask[] )
+{
+ OSMesaContext osmesa = (OSMesaContext) ctx;
+ GLuint i;
+ GLint rind = osmesa->rind;
+ GLint gind = osmesa->gind;
+ GLint bind = osmesa->bind;
+ for (i=0;i<n;i++) {
+ if (mask[i]) {
+ const GLubyte *ptr3 = PIXELADDR3(x[i],y[i]);
+ rgba[i][RCOMP] = ptr3[rind];
+ rgba[i][GCOMP] = ptr3[gind];
+ rgba[i][BCOMP] = ptr3[bind];
+ rgba[i][ACOMP] = 0;
+ }
+ }
+}
+
+
+/**********************************************************************/
+/***** Read/write spans/arrays of CI pixels *****/
+/**********************************************************************/
+
+/* Write 32-bit color index to buffer */
+static void write_index32_span( const GLcontext *ctx,
+ GLuint n, GLint x, GLint y,
+ const GLuint index[], const GLubyte mask[] )
+{
+ OSMesaContext osmesa = (OSMesaContext) ctx;
+ GLubyte *ptr1 = PIXELADDR1(x,y);
+ GLuint i;
+ if (mask) {
+ for (i=0;i<n;i++,ptr1++) {
+ if (mask[i]) {
+ *ptr1 = (GLubyte) index[i];
+ }
+ }
+ }
+ else {
+ for (i=0;i<n;i++,ptr1++) {
+ *ptr1 = (GLubyte) index[i];
+ }
+ }
+}
+
+
+/* Write 8-bit color index to buffer */
+static void write_index8_span( const GLcontext *ctx,
+ GLuint n, GLint x, GLint y,
+ const GLubyte index[], const GLubyte mask[] )
+{
+ OSMesaContext osmesa = (OSMesaContext) ctx;
+ GLubyte *ptr1 = PIXELADDR1(x,y);
+ GLuint i;
+ if (mask) {
+ for (i=0;i<n;i++,ptr1++) {
+ if (mask[i]) {
+ *ptr1 = (GLubyte) index[i];
+ }
+ }
+ }
+ else {
+ MEMCPY( ptr1, index, n );
+ }
+}
+
+
+static void write_monoindex_span( const GLcontext *ctx,
+ GLuint n, GLint x, GLint y,
+ const GLubyte mask[] )
+{
+ OSMesaContext osmesa = (OSMesaContext) ctx;
+ GLubyte *ptr1 = PIXELADDR1(x,y);
+ GLuint i;
+ for (i=0;i<n;i++,ptr1++) {
+ if (mask[i]) {
+ *ptr1 = (GLubyte) osmesa->pixel;
+ }
+ }
+}
+
+
+static void write_index_pixels( const GLcontext *ctx,
+ GLuint n, const GLint x[], const GLint y[],
+ const GLuint index[], const GLubyte mask[] )
+{
+ OSMesaContext osmesa = (OSMesaContext) ctx;
+ GLuint i;
+ for (i=0;i<n;i++) {
+ if (mask[i]) {
+ GLubyte *ptr1 = PIXELADDR1(x[i],y[i]);
+ *ptr1 = (GLubyte) index[i];
+ }
+ }
+}
+
+
+static void write_monoindex_pixels( const GLcontext *ctx,
+ GLuint n, const GLint x[], const GLint y[],
+ const GLubyte mask[] )
+{
+ OSMesaContext osmesa = (OSMesaContext) ctx;
+ GLuint i;
+ for (i=0;i<n;i++) {
+ if (mask[i]) {
+ GLubyte *ptr1 = PIXELADDR1(x[i],y[i]);
+ *ptr1 = (GLubyte) osmesa->pixel;
+ }
+ }
+}
+
+
+static void read_index_span( const GLcontext *ctx,
+ GLuint n, GLint x, GLint y, GLuint index[] )
+{
+ OSMesaContext osmesa = (OSMesaContext) ctx;
+ GLuint i;
+ const GLubyte *ptr1 = PIXELADDR1(x,y);
+ for (i=0;i<n;i++,ptr1++) {
+ index[i] = (GLuint) *ptr1;
+ }
+}
+
+
+static void read_index_pixels( const GLcontext *ctx,
+ GLuint n, const GLint x[], const GLint y[],
+ GLuint index[], const GLubyte mask[] )
+{
+ OSMesaContext osmesa = (OSMesaContext) ctx;
+ GLuint i;
+ for (i=0;i<n;i++) {
+ if (mask[i] ) {
+ const GLubyte *ptr1 = PIXELADDR1(x[i],y[i]);
+ index[i] = (GLuint) *ptr1;
+ }
+ }
+}
+
+
+
+/**********************************************************************/
+/***** Optimized line rendering *****/
+/**********************************************************************/
+
+
+/*
+ * Draw a flat-shaded, RGB line into an osmesa buffer.
+ */
+static void flat_rgba_line( GLcontext *ctx,
+ GLuint vert0, GLuint vert1, GLuint pvert )
+{
+ OSMesaContext osmesa = (OSMesaContext) ctx;
+ GLubyte *color = ctx->VB->ColorPtr->data[pvert];
+ unsigned long pixel = PACK_RGBA( color[0], color[1], color[2], color[3] );
+
+#define INTERP_XY 1
+#define CLIP_HACK 1
+#define PLOT(X,Y) { GLuint *ptr4 = PIXELADDR4(X,Y); *ptr4 = pixel; }
+
+#ifdef WIN32
+#include "..\linetemp.h"
+#else
+#include "linetemp.h"
+#endif
+}
+
+
+/*
+ * Draw a flat-shaded, Z-less, RGB line into an osmesa buffer.
+ */
+static void flat_rgba_z_line( GLcontext *ctx,
+ GLuint vert0, GLuint vert1, GLuint pvert )
+{
+ OSMesaContext osmesa = (OSMesaContext) ctx;
+ GLubyte *color = ctx->VB->ColorPtr->data[pvert];
+ unsigned long pixel = PACK_RGBA( color[0], color[1], color[2], color[3] );
+
+#define INTERP_XY 1
+#define INTERP_Z 1
+#define DEPTH_TYPE DEFAULT_SOFTWARE_DEPTH_TYPE
+#define CLIP_HACK 1
+#define PLOT(X,Y) \
+ if (Z < *zPtr) { \
+ GLuint *ptr4 = PIXELADDR4(X,Y); \
+ *ptr4 = pixel; \
+ *zPtr = Z; \
+ }
+
+#ifdef WIN32
+#include "..\linetemp.h"
+#else
+#include "linetemp.h"
+#endif
+}
+
+
+/*
+ * Draw a flat-shaded, alpha-blended, RGB line into an osmesa buffer.
+ */
+static void flat_blend_rgba_line( GLcontext *ctx,
+ GLuint vert0, GLuint vert1, GLuint pvert )
+{
+ OSMesaContext osmesa = (OSMesaContext) ctx;
+ struct vertex_buffer *VB = ctx->VB;
+ GLint rshift = osmesa->rshift;
+ GLint gshift = osmesa->gshift;
+ GLint bshift = osmesa->bshift;
+ GLint avalue = VB->ColorPtr->data[pvert][3];
+ GLint msavalue = 255 - avalue;
+ GLint rvalue = VB->ColorPtr->data[pvert][0]*avalue;
+ GLint gvalue = VB->ColorPtr->data[pvert][1]*avalue;
+ GLint bvalue = VB->ColorPtr->data[pvert][2]*avalue;
+
+#define INTERP_XY 1
+#define CLIP_HACK 1
+#define PLOT(X,Y) \
+ { GLuint *ptr4 = PIXELADDR4(X,Y); \
+ GLuint pixel = 0; \
+ pixel |=((((((*ptr4) >> rshift) & 0xff)*msavalue+rvalue)>>8) << rshift);\
+ pixel |=((((((*ptr4) >> gshift) & 0xff)*msavalue+gvalue)>>8) << gshift);\
+ pixel |=((((((*ptr4) >> bshift) & 0xff)*msavalue+bvalue)>>8) << bshift);\
+ *ptr4 = pixel; \
+ }
+
+#ifdef WIN32
+#include "..\linetemp.h"
+#else
+#include "linetemp.h"
+#endif
+}
+
+
+/*
+ * Draw a flat-shaded, Z-less, alpha-blended, RGB line into an osmesa buffer.
+ */
+static void flat_blend_rgba_z_line( GLcontext *ctx,
+ GLuint vert0, GLuint vert1, GLuint pvert )
+{
+ OSMesaContext osmesa = (OSMesaContext) ctx;
+ struct vertex_buffer *VB = ctx->VB;
+ GLint rshift = osmesa->rshift;
+ GLint gshift = osmesa->gshift;
+ GLint bshift = osmesa->bshift;
+ GLint avalue = VB->ColorPtr->data[pvert][3];
+ GLint msavalue = 256 - avalue;
+ GLint rvalue = VB->ColorPtr->data[pvert][0]*avalue;
+ GLint gvalue = VB->ColorPtr->data[pvert][1]*avalue;
+ GLint bvalue = VB->ColorPtr->data[pvert][2]*avalue;
+
+#define INTERP_XY 1
+#define INTERP_Z 1
+#define DEPTH_TYPE DEFAULT_SOFTWARE_DEPTH_TYPE
+#define CLIP_HACK 1
+#define PLOT(X,Y) \
+ if (Z < *zPtr) { \
+ GLuint *ptr4 = PIXELADDR4(X,Y); \
+ GLuint pixel = 0; \
+ pixel |=((((((*ptr4) >> rshift) & 0xff)*msavalue+rvalue)>>8) << rshift); \
+ pixel |=((((((*ptr4) >> gshift) & 0xff)*msavalue+gvalue)>>8) << gshift); \
+ pixel |=((((((*ptr4) >> bshift) & 0xff)*msavalue+bvalue)>>8) << bshift); \
+ *ptr4 = pixel; \
+ }
+
+#ifdef WIN32
+#include "..\linetemp.h"
+#else
+#include "linetemp.h"
+#endif
+}
+
+
+/*
+ * Draw a flat-shaded, Z-less, alpha-blended, RGB line into an osmesa buffer.
+ */
+static void flat_blend_rgba_z_line_write( GLcontext *ctx,
+ GLuint vert0, GLuint vert1, GLuint pvert )
+{
+ OSMesaContext osmesa = (OSMesaContext) ctx;
+ struct vertex_buffer *VB = ctx->VB;
+ GLint rshift = osmesa->rshift;
+ GLint gshift = osmesa->gshift;
+ GLint bshift = osmesa->bshift;
+ GLint avalue = VB->ColorPtr->data[pvert][3];
+ GLint msavalue = 256 - avalue;
+ GLint rvalue = VB->ColorPtr->data[pvert][0]*avalue;
+ GLint gvalue = VB->ColorPtr->data[pvert][1]*avalue;
+ GLint bvalue = VB->ColorPtr->data[pvert][2]*avalue;
+
+#define INTERP_XY 1
+#define INTERP_Z 1
+#define DEPTH_TYPE DEFAULT_SOFTWARE_DEPTH_TYPE
+#define CLIP_HACK 1
+#define PLOT(X,Y) \
+ if (Z < *zPtr) { \
+ GLuint *ptr4 = PIXELADDR4(X,Y); \
+ GLuint pixel = 0; \
+ pixel |=((((((*ptr4) >> rshift) & 0xff)*msavalue+rvalue)>>8) << rshift); \
+ pixel |=((((((*ptr4) >> gshift) & 0xff)*msavalue+gvalue)>>8) << gshift); \
+ pixel |=((((((*ptr4) >> bshift) & 0xff)*msavalue+bvalue)>>8) << bshift); \
+ *ptr4 = pixel; \
+ *zPtr = Z; \
+ }
+
+#ifdef WIN32
+#include "..\linetemp.h"
+#else
+#include "linetemp.h"
+#endif
+}
+
+
+/*
+ * Analyze context state to see if we can provide a fast line drawing
+ * function, like those in lines.c. Otherwise, return NULL.
+ */
+static line_func choose_line_function( GLcontext *ctx )
+{
+ OSMesaContext osmesa = (OSMesaContext) ctx;
+
+ if (ctx->Line.SmoothFlag) return NULL;
+ if (ctx->Texture.Enabled) return NULL;
+ if (ctx->Light.ShadeModel!=GL_FLAT) return NULL;
+
+ if (ctx->Line.Width==1.0F
+ && ctx->Line.StippleFlag==GL_FALSE) {
+
+ if (ctx->RasterMask==DEPTH_BIT
+ && ctx->Depth.Func==GL_LESS
+ && ctx->Depth.Mask==GL_TRUE
+ && ctx->Visual->DepthBits == DEFAULT_SOFTWARE_DEPTH_BITS) {
+ switch(osmesa->format) {
+ case OSMESA_RGBA:
+ case OSMESA_BGRA:
+ case OSMESA_ARGB:
+ return flat_rgba_z_line;
+ default:
+ return NULL;
+ }
+ }
+
+ if (ctx->RasterMask==0) {
+ switch(osmesa->format) {
+ case OSMESA_RGBA:
+ case OSMESA_BGRA:
+ case OSMESA_ARGB:
+ return flat_rgba_line;
+ default:
+ return NULL;
+ }
+ }
+
+ if (ctx->RasterMask==(DEPTH_BIT|BLEND_BIT)
+ && ctx->Depth.Func==GL_LESS
+ && ctx->Depth.Mask==GL_TRUE
+ && ctx->Visual->DepthBits == DEFAULT_SOFTWARE_DEPTH_BITS
+ && ctx->Color.BlendSrcRGB==GL_SRC_ALPHA
+ && ctx->Color.BlendDstRGB==GL_ONE_MINUS_SRC_ALPHA
+ && ctx->Color.BlendSrcA==GL_SRC_ALPHA
+ && ctx->Color.BlendDstA==GL_ONE_MINUS_SRC_ALPHA
+ && ctx->Color.BlendEquation==GL_FUNC_ADD_EXT) {
+ switch(osmesa->format) {
+ case OSMESA_RGBA:
+ case OSMESA_BGRA:
+ case OSMESA_ARGB:
+ return flat_blend_rgba_z_line_write;
+ default:
+ return NULL;
+ }
+ }
+
+ if (ctx->RasterMask==(DEPTH_BIT|BLEND_BIT)
+ && ctx->Depth.Func==GL_LESS
+ && ctx->Depth.Mask==GL_FALSE
+ && ctx->Visual->DepthBits == DEFAULT_SOFTWARE_DEPTH_BITS
+ && ctx->Color.BlendSrcRGB==GL_SRC_ALPHA
+ && ctx->Color.BlendDstRGB==GL_ONE_MINUS_SRC_ALPHA
+ && ctx->Color.BlendSrcA==GL_SRC_ALPHA
+ && ctx->Color.BlendDstA==GL_ONE_MINUS_SRC_ALPHA
+ && ctx->Color.BlendEquation==GL_FUNC_ADD_EXT) {
+ switch(osmesa->format) {
+ case OSMESA_RGBA:
+ case OSMESA_BGRA:
+ case OSMESA_ARGB:
+ return flat_blend_rgba_z_line;
+ default:
+ return NULL;
+ }
+ }
+
+ if (ctx->RasterMask==BLEND_BIT
+ && ctx->Color.BlendSrcRGB==GL_SRC_ALPHA
+ && ctx->Color.BlendDstRGB==GL_ONE_MINUS_SRC_ALPHA
+ && ctx->Color.BlendSrcA==GL_SRC_ALPHA
+ && ctx->Color.BlendDstA==GL_ONE_MINUS_SRC_ALPHA
+ && ctx->Color.BlendEquation==GL_FUNC_ADD_EXT) {
+ switch(osmesa->format) {
+ case OSMESA_RGBA:
+ case OSMESA_BGRA:
+ case OSMESA_ARGB:
+ return flat_blend_rgba_line;
+ default:
+ return NULL;
+ }
+ }
+
+ }
+ return NULL;
+}
+
+
+/**********************************************************************/
+/***** Optimized triangle rendering *****/
+/**********************************************************************/
+
+
+/*
+ * Smooth-shaded, z-less triangle, RGBA color.
+ */
+static void smooth_rgba_z_triangle( GLcontext *ctx, GLuint v0, GLuint v1,
+ GLuint v2, GLuint pv )
+{
+ OSMesaContext osmesa = (OSMesaContext) ctx;
+ GLint rshift = osmesa->rshift;
+ GLint gshift = osmesa->gshift;
+ GLint bshift = osmesa->bshift;
+ GLint ashift = osmesa->ashift;
+ (void) pv;
+
+#define INTERP_Z 1
+#define DEPTH_TYPE DEFAULT_SOFTWARE_DEPTH_TYPE
+#define INTERP_RGB 1
+#define INTERP_ALPHA 1
+#define INNER_LOOP( LEFT, RIGHT, Y ) \
+{ \
+ GLint i, len = RIGHT-LEFT; \
+ GLuint *img = PIXELADDR4(LEFT,Y); \
+ for (i=0;i<len;i++,img++) { \
+ GLdepth z = FixedToDepth(ffz); \
+ if (z < zRow[i]) { \
+ *img = PACK_RGBA2( FixedToInt(ffr), FixedToInt(ffg), \
+ FixedToInt(ffb), FixedToInt(ffa) ); \
+ zRow[i] = z; \
+ } \
+ ffr += fdrdx; ffg += fdgdx; ffb += fdbdx; ffa += fdadx;\
+ ffz += fdzdx; \
+ } \
+}
+#ifdef WIN32
+#include "..\tritemp.h"
+#else
+#include "tritemp.h"
+#endif
+}
+
+
+
+
+/*
+ * Flat-shaded, z-less triangle, RGBA color.
+ */
+static void flat_rgba_z_triangle( GLcontext *ctx, GLuint v0, GLuint v1,
+ GLuint v2, GLuint pv )
+{
+ OSMesaContext osmesa = (OSMesaContext) ctx;
+#define INTERP_Z 1
+#define DEPTH_TYPE DEFAULT_SOFTWARE_DEPTH_TYPE
+#define SETUP_CODE \
+ GLubyte r = VB->ColorPtr->data[pv][0]; \
+ GLubyte g = VB->ColorPtr->data[pv][1]; \
+ GLubyte b = VB->ColorPtr->data[pv][2]; \
+ GLubyte a = VB->ColorPtr->data[pv][3]; \
+ GLuint pixel = PACK_RGBA(r,g,b,a);
+
+#define INNER_LOOP( LEFT, RIGHT, Y ) \
+{ \
+ GLint i, len = RIGHT-LEFT; \
+ GLuint *img = PIXELADDR4(LEFT,Y); \
+ for (i=0;i<len;i++,img++) { \
+ GLdepth z = FixedToDepth(ffz); \
+ if (z < zRow[i]) { \
+ *img = pixel; \
+ zRow[i] = z; \
+ } \
+ ffz += fdzdx; \
+ } \
+}
+#ifdef WIN32
+#include "..\tritemp.h"
+#else
+#include "tritemp.h"
+#endif
+}
+
+
+
+/*
+ * Return pointer to an accelerated triangle function if possible.
+ */
+static triangle_func choose_triangle_function( GLcontext *ctx )
+{
+ OSMesaContext osmesa = (OSMesaContext) ctx;
+
+ if ((osmesa->format==OSMESA_RGB)||(osmesa->format==OSMESA_BGR)) return NULL;
+
+ if (ctx->Polygon.SmoothFlag) return NULL;
+ if (ctx->Polygon.StippleFlag) return NULL;
+ if (ctx->Texture.Enabled) return NULL;
+
+ if (ctx->RasterMask==DEPTH_BIT
+ && ctx->Depth.Func==GL_LESS
+ && ctx->Depth.Mask==GL_TRUE
+ && ctx->Visual->DepthBits == DEFAULT_SOFTWARE_DEPTH_BITS
+ && osmesa->format!=OSMESA_COLOR_INDEX) {
+ if (ctx->Light.ShadeModel==GL_SMOOTH) {
+ return smooth_rgba_z_triangle;
+ }
+ else {
+ return flat_rgba_z_triangle;
+ }
+ }
+ return NULL;
+}
+
+
+
+static const GLubyte *get_string( GLcontext *ctx, GLenum name )
+{
+ (void) ctx;
+ switch (name) {
+ case GL_RENDERER:
+ return (const GLubyte *) "Mesa OffScreen";
+ default:
+ return NULL;
+ }
+}
+
+
+static void osmesa_update_state( GLcontext *ctx )
+{
+ OSMesaContext osmesa = (OSMesaContext) ctx;
+
+ ASSERT((void *) osmesa == (void *) ctx->DriverCtx);
+
+ ctx->Driver.GetString = get_string;
+ ctx->Driver.UpdateState = osmesa_update_state;
+
+ ctx->Driver.SetDrawBuffer = set_draw_buffer;
+ ctx->Driver.SetReadBuffer = set_read_buffer;
+ ctx->Driver.Color = set_color;
+ ctx->Driver.Index = set_index;
+ ctx->Driver.ClearIndex = clear_index;
+ ctx->Driver.ClearColor = clear_color;
+ ctx->Driver.Clear = clear;
+
+ ctx->Driver.GetBufferSize = buffer_size;
+
+ ctx->Driver.PointsFunc = NULL;
+ ctx->Driver.LineFunc = choose_line_function( ctx );
+ ctx->Driver.TriangleFunc = choose_triangle_function( ctx );
+
+
+ /* RGB(A) span/pixel functions */
+ if ((osmesa->format==OSMESA_RGB) || (osmesa->format==OSMESA_BGR)) {
+ /* 3 bytes / pixel in frame buffer */
+ ctx->Driver.WriteRGBASpan = write_rgba_span3;
+ ctx->Driver.WriteRGBSpan = write_rgb_span3;
+ ctx->Driver.WriteRGBAPixels = write_rgba_pixels3;
+ ctx->Driver.WriteMonoRGBASpan = write_monocolor_span3;
+ ctx->Driver.WriteMonoRGBAPixels = write_monocolor_pixels3;
+ ctx->Driver.ReadRGBASpan = read_rgba_span3;
+ ctx->Driver.ReadRGBAPixels = read_rgba_pixels3;
+ }
+ else {
+ /* 4 bytes / pixel in frame buffer */
+ if (osmesa->format==OSMESA_RGBA
+ && RCOMP==0 && GCOMP==1 && BCOMP==2 && ACOMP==3)
+ ctx->Driver.WriteRGBASpan = write_rgba_span_rgba;
+ else
+ ctx->Driver.WriteRGBASpan = write_rgba_span;
+ ctx->Driver.WriteRGBSpan = write_rgb_span;
+ ctx->Driver.WriteRGBAPixels = write_rgba_pixels;
+ ctx->Driver.WriteMonoRGBASpan = write_monocolor_span;
+ ctx->Driver.WriteMonoRGBAPixels = write_monocolor_pixels;
+ if (osmesa->format==OSMESA_RGBA
+ && RCOMP==0 && GCOMP==1 && BCOMP==2 && ACOMP==3)
+ ctx->Driver.ReadRGBASpan = read_rgba_span_rgba;
+ else
+ ctx->Driver.ReadRGBASpan = read_rgba_span;
+ ctx->Driver.ReadRGBAPixels = read_rgba_pixels;
+ }
+
+ /* CI span/pixel functions */
+ ctx->Driver.WriteCI32Span = write_index32_span;
+ ctx->Driver.WriteCI8Span = write_index8_span;
+ ctx->Driver.WriteMonoCISpan = write_monoindex_span;
+ ctx->Driver.WriteCI32Pixels = write_index_pixels;
+ ctx->Driver.WriteMonoCIPixels = write_monoindex_pixels;
+ ctx->Driver.ReadCI32Span = read_index_span;
+ ctx->Driver.ReadCI32Pixels = read_index_pixels;
+}
diff --git a/xc/extras/Mesa/src/X/fakeglx.c b/xc/extras/Mesa/src/X/fakeglx.c
index deba5af3d..d613c0a83 100644
--- a/xc/extras/Mesa/src/X/fakeglx.c
+++ b/xc/extras/Mesa/src/X/fakeglx.c
@@ -47,7 +47,9 @@
#include "context.h"
#include "config.h"
#include "macros.h"
+#include "mmath.h"
#include "types.h"
+#include "xfonts.h"
#include "xmesaP.h"
@@ -453,21 +455,6 @@ static int transparent_pixel( XMesaVisual glxvis )
/*
- * Return number of bits set in n.
- */
-static int bitcount( unsigned long n )
-{
- int bits;
- for (bits=0; n>0; n=n>>1) {
- if (n&1) {
- bits++;
- }
- }
- return bits;
-}
-
-
-/*
* Try to get an X visual which matches the given arguments.
*/
static XVisualInfo *get_visual( Display *dpy, int scr,
@@ -500,9 +487,9 @@ static XVisualInfo *get_visual( Display *dpy, int scr,
* 10 bits per color channel. Mesa's limited to a max of 8 bits/channel.
*/
if (vis && depth > 24 && (xclass==TrueColor || xclass==DirectColor)) {
- if (bitcount(vis->red_mask) <= 8
- && bitcount(vis->green_mask) <= 8
- && bitcount(vis->blue_mask) <= 8) {
+ if (_mesa_bitcount((GLuint) vis->red_mask ) <= 8 &&
+ _mesa_bitcount((GLuint) vis->green_mask) <= 8 &&
+ _mesa_bitcount((GLuint) vis->blue_mask ) <= 8) {
return vis;
}
else {
@@ -1836,9 +1823,6 @@ Fake_glXWaitVideoSyncSGI(int divisor, int remainder, unsigned int *count)
-extern void Fake_glXUseXFont( Font font, int first, int count, int listbase );
-
-
extern struct _glxapi_table *_mesa_GetGLXDispatchTable(void);
struct _glxapi_table *_mesa_GetGLXDispatchTable(void)
{
@@ -1894,6 +1878,7 @@ struct _glxapi_table *_mesa_GetGLXDispatchTable(void)
glx.DestroyWindow = Fake_glXDestroyWindow;
/*glx.GetCurrentReadDrawable = Fake_glXGetCurrentReadDrawable;*/
glx.GetFBConfigAttrib = Fake_glXGetFBConfigAttrib;
+ glx.GetFBConfigs = Fake_glXGetFBConfigs;
glx.GetSelectedEvent = Fake_glXGetSelectedEvent;
glx.GetVisualFromFBConfig = Fake_glXGetVisualFromFBConfig;
glx.MakeContextCurrent = Fake_glXMakeContextCurrent;
diff --git a/xc/extras/Mesa/src/X/xfonts.c b/xc/extras/Mesa/src/X/xfonts.c
index c71e65324..2a1aca33c 100644
--- a/xc/extras/Mesa/src/X/xfonts.c
+++ b/xc/extras/Mesa/src/X/xfonts.c
@@ -3,7 +3,7 @@
* Mesa 3-D graphics library
* Version: 3.3
*
- * Copyright (C) 1999 Brian Paul All Rights Reserved.
+ * Copyright (C) 1999-2000 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"),
@@ -43,8 +43,10 @@
#include "GL/xmesa.h"
#include "context.h"
#include "mem.h"
+#include "xfonts.h"
#include "xmesaP.h"
+
/* Some debugging info. */
#ifdef DEBUG
@@ -372,7 +374,7 @@ bm_height);
glEndList ();
}
- free (bm);
+ FREE(bm);
XFreeFontInfo( NULL, fs, 0 );
XFreeGC (dpy, gc);
@@ -385,6 +387,8 @@ bm_height);
glPixelStorei(GL_UNPACK_ALIGNMENT, alignment);
}
+
+extern void xmesa_xfonts_dummy( void );
void xmesa_xfonts_dummy( void )
{
/* silence unused var warnings */
diff --git a/xc/extras/Mesa/src/X/xmesa1.c b/xc/extras/Mesa/src/X/xmesa1.c
index b132f3bb3..92aad010c 100644
--- a/xc/extras/Mesa/src/X/xmesa1.c
+++ b/xc/extras/Mesa/src/X/xmesa1.c
@@ -64,6 +64,7 @@
#include "GL/xmesa.h"
#include "xmesaP.h"
#include "context.h"
+#include "extensions.h"
#include "matrix.h"
#include "mem.h"
#include "types.h"
@@ -1354,10 +1355,11 @@ static GLboolean initialize_visual_and_buffer( int client,
/*
* Convert an RGBA color to a pixel value.
*/
-unsigned long xmesa_color_to_pixel( XMesaContext xmesa,
- GLubyte r, GLubyte g, GLubyte b, GLubyte a)
+unsigned long
+xmesa_color_to_pixel( XMesaContext xmesa, GLubyte r, GLubyte g, GLubyte b, GLubyte a,
+ GLuint pixelFormat)
{
- switch (xmesa->pixelformat) {
+ switch (pixelFormat) {
case PF_INDEX:
return 0;
case PF_TRUECOLOR:
@@ -1618,6 +1620,7 @@ XMesaContext XMesaCreateContext( XMesaVisual v, XMesaContext share_list
}
gl_extensions_enable(c->gl_ctx, "GL_HP_occlusion_test");
+ gl_extensions_enable(c->gl_ctx, "GL_ARB_texture_cube_map");
if (CHECK_BYTE_ORDER(v)) {
c->swapbytes = GL_FALSE;
@@ -2068,13 +2071,14 @@ GLboolean XMesaMakeCurrent2( XMesaContext c, XMesaBuffer drawBuffer,
* can be different for different windows.
*/
c->pixel = xmesa_color_to_pixel( c, c->red, c->green,
- c->blue, c->alpha );
+ c->blue, c->alpha, c->pixelformat );
XMesaSetForeground( c->display, c->xm_buffer->gc1, c->pixel );
c->clearpixel = xmesa_color_to_pixel( c,
c->clearcolor[0],
c->clearcolor[1],
c->clearcolor[2],
- c->clearcolor[3] );
+ c->clearcolor[3],
+ c->xm_visual->undithered_pf);
XMesaSetForeground(c->display, c->xm_buffer->cleargc, c->clearpixel);
}
@@ -2174,13 +2178,13 @@ GLboolean XMesaSetFXmode( GLint mode )
if (XMesa) {
if (mode == XMESA_FX_WINDOW) {
if (XMesa->xm_buffer->FXisHackUsable) {
- grSstControl(GR_CONTROL_DEACTIVATE);
+ FX_grSstControl(GR_CONTROL_DEACTIVATE);
XMesa->xm_buffer->FXwindowHack = GL_TRUE;
return GL_TRUE;
}
}
else if (mode == XMESA_FX_FULLSCREEN) {
- grSstControl(GR_CONTROL_ACTIVATE);
+ FX_grSstControl(GR_CONTROL_ACTIVATE);
XMesa->xm_buffer->FXwindowHack = GL_FALSE;
return GL_TRUE;
}
@@ -2280,7 +2284,7 @@ static void FXgetImage( XMesaBuffer b )
(pixbuf[x] & 0xf800) >> 8,
(pixbuf[x] & 0x07e0) >> 3,
(pixbuf[x] & 0x001f) << 3,
- 0xff));
+ 0xff, XMesa->pixelformat));
}
}
}
diff --git a/xc/extras/Mesa/src/X/xmesa2.c b/xc/extras/Mesa/src/X/xmesa2.c
index b02dc66d6..77b8d4b05 100644
--- a/xc/extras/Mesa/src/X/xmesa2.c
+++ b/xc/extras/Mesa/src/X/xmesa2.c
@@ -351,7 +351,8 @@ static void clear_color( GLcontext *ctx,
xmesa->clearcolor[1] = g;
xmesa->clearcolor[2] = b;
xmesa->clearcolor[3] = a;
- xmesa->clearpixel = xmesa_color_to_pixel( xmesa, r, g, b, a );
+ xmesa->clearpixel = xmesa_color_to_pixel( xmesa, r, g, b, a,
+ xmesa->xm_visual->undithered_pf );
XMesaSetForeground( xmesa->display, xmesa->xm_buffer->cleargc,
xmesa->clearpixel );
}
@@ -434,7 +435,7 @@ static void set_color( GLcontext *ctx,
xmesa->green = g;
xmesa->blue = b;
xmesa->alpha = a;
- xmesa->pixel = xmesa_color_to_pixel( xmesa, r, g, b, a );;
+ xmesa->pixel = xmesa_color_to_pixel( xmesa, r, g, b, a, xmesa->pixelformat );;
XMesaSetForeground( xmesa->display, xmesa->xm_buffer->gc1, xmesa->pixel );
}
diff --git a/xc/extras/Mesa/src/X/xmesa3.c b/xc/extras/Mesa/src/X/xmesa3.c
index 7fb3c5ebd..c7e4c21c8 100644
--- a/xc/extras/Mesa/src/X/xmesa3.c
+++ b/xc/extras/Mesa/src/X/xmesa3.c
@@ -66,7 +66,7 @@ static void draw_points_ANY_pixmap( GLcontext *ctx, GLuint first, GLuint last )
register int x, y;
const GLubyte *color = VB->ColorPtr->data[i];
unsigned long pixel = xmesa_color_to_pixel( xmesa,
- color[0], color[1], color[2], color[3] );
+ color[0], color[1], color[2], color[3], xmesa->pixelformat);
XMesaSetForeground( dpy, gc, pixel );
x = (GLint) VB->Win.data[i][0];
y = FLIP( xmesa->xm_buffer, (GLint) VB->Win.data[i][1] );
@@ -131,7 +131,8 @@ static void flat_pixmap_line( GLcontext *ctx,
unsigned long pixel;
if (xmesa->xm_visual->gl_visual->RGBAflag) {
const GLubyte *color = VB->ColorPtr->data[pv];
- pixel = xmesa_color_to_pixel( xmesa, color[0], color[1], color[2], color[3] );
+ pixel = xmesa_color_to_pixel( xmesa, color[0], color[1], color[2], color[3],
+ xmesa->pixelformat );
}
else {
pixel = VB->IndexPtr->data[pv];
diff --git a/xc/extras/Mesa/src/X/xmesa4.c b/xc/extras/Mesa/src/X/xmesa4.c
index a0ffafae0..195a531f0 100644
--- a/xc/extras/Mesa/src/X/xmesa4.c
+++ b/xc/extras/Mesa/src/X/xmesa4.c
@@ -66,8 +66,9 @@ static void flat_pixmap_triangle( GLcontext *ctx,
unsigned long pixel;
if (xmesa->xm_visual->gl_visual->RGBAflag) {
pixel = xmesa_color_to_pixel( xmesa,
- VB->ColorPtr->data[pv][0], VB->ColorPtr->data[pv][1],
- VB->ColorPtr->data[pv][2], VB->ColorPtr->data[pv][3] );
+ VB->ColorPtr->data[pv][0], VB->ColorPtr->data[pv][1],
+ VB->ColorPtr->data[pv][2], VB->ColorPtr->data[pv][3],
+ xmesa->pixelformat );
}
else {
pixel = VB->IndexPtr->data[pv];
diff --git a/xc/extras/Mesa/src/X/xmesaP.h b/xc/extras/Mesa/src/X/xmesaP.h
index bba11808e..987877509 100644
--- a/xc/extras/Mesa/src/X/xmesaP.h
+++ b/xc/extras/Mesa/src/X/xmesaP.h
@@ -511,8 +511,9 @@ static int const kernel1[16] = {
* External functions:
*/
-extern unsigned long xmesa_color_to_pixel( XMesaContext xmesa,
- GLubyte r, GLubyte g, GLubyte b, GLubyte a );
+extern unsigned long
+xmesa_color_to_pixel( XMesaContext xmesa, GLubyte r, GLubyte g, GLubyte b, GLubyte a,
+ GLuint pixelFormat );
extern void xmesa_alloc_back_buffer( XMesaBuffer b );
diff --git a/xc/extras/Mesa/src/X86/glapi_x86.S b/xc/extras/Mesa/src/X86/glapi_x86.S
index a9566ea46..3afd50e0a 100644
--- a/xc/extras/Mesa/src/X86/glapi_x86.S
+++ b/xc/extras/Mesa/src/X86/glapi_x86.S
@@ -1,37 +1,4 @@
-
-/*
- * Mesa 3-D graphics library
- * Version: 3.3
- *
- * Copyright (C) 1999-2000 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.
- */
-
-
-/*
- * X86-optimized dispatch code contibuted by Josh Vanderhoof
- *
- * This file will be machine-generated from the gl.spec file at some point
- * in the future.
- */
-
-
+/* DO NOT EDIT - This file generated automatically with glx86asm.py script */
#include "assyntax.h"
#include "glapioffsets.h"
@@ -51,45 +18,22 @@
#define GLOBL_FN(x) GLOBL x
#endif
-ALIGNTEXT16
-GLOBL_FN(GL_PREFIX(Accum))
-GL_PREFIX(Accum):
- MOV_L(GLNAME(_glapi_Dispatch), EAX)
- TEST_L(EAX, EAX)
- JZ(GLNAME(_glapi_fallback_Accum))
- JMP(GL_OFFSET(_gloffset_Accum))
ALIGNTEXT16
-GLOBL_FN(GL_PREFIX(AlphaFunc))
-GL_PREFIX(AlphaFunc):
- MOV_L(GLNAME(_glapi_Dispatch), EAX)
- TEST_L(EAX, EAX)
- JZ(GLNAME(_glapi_fallback_AlphaFunc))
- JMP(GL_OFFSET(_gloffset_AlphaFunc))
-
-ALIGNTEXT16
-GLOBL_FN(GL_PREFIX(Begin))
-GL_PREFIX(Begin):
- MOV_L(GLNAME(_glapi_Dispatch), EAX)
- TEST_L(EAX, EAX)
- JZ(GLNAME(_glapi_fallback_Begin))
- JMP(GL_OFFSET(_gloffset_Begin))
-
-ALIGNTEXT16
-GLOBL_FN(GL_PREFIX(Bitmap))
-GL_PREFIX(Bitmap):
+GLOBL_FN(GL_PREFIX(NewList))
+GL_PREFIX(NewList):
MOV_L(GLNAME(_glapi_Dispatch), EAX)
TEST_L(EAX, EAX)
- JZ(GLNAME(_glapi_fallback_Bitmap))
- JMP(GL_OFFSET(_gloffset_Bitmap))
+ JZ(GLNAME(_glapi_fallback_NewList))
+ JMP(GL_OFFSET(_gloffset_NewList))
ALIGNTEXT16
-GLOBL_FN(GL_PREFIX(BlendFunc))
-GL_PREFIX(BlendFunc):
+GLOBL_FN(GL_PREFIX(EndList))
+GL_PREFIX(EndList):
MOV_L(GLNAME(_glapi_Dispatch), EAX)
TEST_L(EAX, EAX)
- JZ(GLNAME(_glapi_fallback_BlendFunc))
- JMP(GL_OFFSET(_gloffset_BlendFunc))
+ JZ(GLNAME(_glapi_fallback_EndList))
+ JMP(GL_OFFSET(_gloffset_EndList))
ALIGNTEXT16
GLOBL_FN(GL_PREFIX(CallList))
@@ -108,60 +52,44 @@ GL_PREFIX(CallLists):
JMP(GL_OFFSET(_gloffset_CallLists))
ALIGNTEXT16
-GLOBL_FN(GL_PREFIX(Clear))
-GL_PREFIX(Clear):
- MOV_L(GLNAME(_glapi_Dispatch), EAX)
- TEST_L(EAX, EAX)
- JZ(GLNAME(_glapi_fallback_Clear))
- JMP(GL_OFFSET(_gloffset_Clear))
-
-ALIGNTEXT16
-GLOBL_FN(GL_PREFIX(ClearAccum))
-GL_PREFIX(ClearAccum):
- MOV_L(GLNAME(_glapi_Dispatch), EAX)
- TEST_L(EAX, EAX)
- JZ(GLNAME(_glapi_fallback_ClearAccum))
- JMP(GL_OFFSET(_gloffset_ClearAccum))
-
-ALIGNTEXT16
-GLOBL_FN(GL_PREFIX(ClearColor))
-GL_PREFIX(ClearColor):
+GLOBL_FN(GL_PREFIX(DeleteLists))
+GL_PREFIX(DeleteLists):
MOV_L(GLNAME(_glapi_Dispatch), EAX)
TEST_L(EAX, EAX)
- JZ(GLNAME(_glapi_fallback_ClearColor))
- JMP(GL_OFFSET(_gloffset_ClearColor))
+ JZ(GLNAME(_glapi_fallback_DeleteLists))
+ JMP(GL_OFFSET(_gloffset_DeleteLists))
ALIGNTEXT16
-GLOBL_FN(GL_PREFIX(ClearDepth))
-GL_PREFIX(ClearDepth):
+GLOBL_FN(GL_PREFIX(GenLists))
+GL_PREFIX(GenLists):
MOV_L(GLNAME(_glapi_Dispatch), EAX)
TEST_L(EAX, EAX)
- JZ(GLNAME(_glapi_fallback_ClearDepth))
- JMP(GL_OFFSET(_gloffset_ClearDepth))
+ JZ(GLNAME(_glapi_fallback_GenLists))
+ JMP(GL_OFFSET(_gloffset_GenLists))
ALIGNTEXT16
-GLOBL_FN(GL_PREFIX(ClearIndex))
-GL_PREFIX(ClearIndex):
+GLOBL_FN(GL_PREFIX(ListBase))
+GL_PREFIX(ListBase):
MOV_L(GLNAME(_glapi_Dispatch), EAX)
TEST_L(EAX, EAX)
- JZ(GLNAME(_glapi_fallback_ClearIndex))
- JMP(GL_OFFSET(_gloffset_ClearIndex))
+ JZ(GLNAME(_glapi_fallback_ListBase))
+ JMP(GL_OFFSET(_gloffset_ListBase))
ALIGNTEXT16
-GLOBL_FN(GL_PREFIX(ClearStencil))
-GL_PREFIX(ClearStencil):
+GLOBL_FN(GL_PREFIX(Begin))
+GL_PREFIX(Begin):
MOV_L(GLNAME(_glapi_Dispatch), EAX)
TEST_L(EAX, EAX)
- JZ(GLNAME(_glapi_fallback_ClearStencil))
- JMP(GL_OFFSET(_gloffset_ClearStencil))
+ JZ(GLNAME(_glapi_fallback_Begin))
+ JMP(GL_OFFSET(_gloffset_Begin))
ALIGNTEXT16
-GLOBL_FN(GL_PREFIX(ClipPlane))
-GL_PREFIX(ClipPlane):
+GLOBL_FN(GL_PREFIX(Bitmap))
+GL_PREFIX(Bitmap):
MOV_L(GLNAME(_glapi_Dispatch), EAX)
TEST_L(EAX, EAX)
- JZ(GLNAME(_glapi_fallback_ClipPlane))
- JMP(GL_OFFSET(_gloffset_ClipPlane))
+ JZ(GLNAME(_glapi_fallback_Bitmap))
+ JMP(GL_OFFSET(_gloffset_Bitmap))
ALIGNTEXT16
GLOBL_FN(GL_PREFIX(Color3b))
@@ -172,6 +100,14 @@ GL_PREFIX(Color3b):
JMP(GL_OFFSET(_gloffset_Color3b))
ALIGNTEXT16
+GLOBL_FN(GL_PREFIX(Color3bv))
+GL_PREFIX(Color3bv):
+ MOV_L(GLNAME(_glapi_Dispatch), EAX)
+ TEST_L(EAX, EAX)
+ JZ(GLNAME(_glapi_fallback_Color3bv))
+ JMP(GL_OFFSET(_gloffset_Color3bv))
+
+ALIGNTEXT16
GLOBL_FN(GL_PREFIX(Color3d))
GL_PREFIX(Color3d):
MOV_L(GLNAME(_glapi_Dispatch), EAX)
@@ -180,6 +116,14 @@ GL_PREFIX(Color3d):
JMP(GL_OFFSET(_gloffset_Color3d))
ALIGNTEXT16
+GLOBL_FN(GL_PREFIX(Color3dv))
+GL_PREFIX(Color3dv):
+ MOV_L(GLNAME(_glapi_Dispatch), EAX)
+ TEST_L(EAX, EAX)
+ JZ(GLNAME(_glapi_fallback_Color3dv))
+ JMP(GL_OFFSET(_gloffset_Color3dv))
+
+ALIGNTEXT16
GLOBL_FN(GL_PREFIX(Color3f))
GL_PREFIX(Color3f):
MOV_L(GLNAME(_glapi_Dispatch), EAX)
@@ -188,6 +132,14 @@ GL_PREFIX(Color3f):
JMP(GL_OFFSET(_gloffset_Color3f))
ALIGNTEXT16
+GLOBL_FN(GL_PREFIX(Color3fv))
+GL_PREFIX(Color3fv):
+ MOV_L(GLNAME(_glapi_Dispatch), EAX)
+ TEST_L(EAX, EAX)
+ JZ(GLNAME(_glapi_fallback_Color3fv))
+ JMP(GL_OFFSET(_gloffset_Color3fv))
+
+ALIGNTEXT16
GLOBL_FN(GL_PREFIX(Color3i))
GL_PREFIX(Color3i):
MOV_L(GLNAME(_glapi_Dispatch), EAX)
@@ -196,6 +148,14 @@ GL_PREFIX(Color3i):
JMP(GL_OFFSET(_gloffset_Color3i))
ALIGNTEXT16
+GLOBL_FN(GL_PREFIX(Color3iv))
+GL_PREFIX(Color3iv):
+ MOV_L(GLNAME(_glapi_Dispatch), EAX)
+ TEST_L(EAX, EAX)
+ JZ(GLNAME(_glapi_fallback_Color3iv))
+ JMP(GL_OFFSET(_gloffset_Color3iv))
+
+ALIGNTEXT16
GLOBL_FN(GL_PREFIX(Color3s))
GL_PREFIX(Color3s):
MOV_L(GLNAME(_glapi_Dispatch), EAX)
@@ -204,6 +164,14 @@ GL_PREFIX(Color3s):
JMP(GL_OFFSET(_gloffset_Color3s))
ALIGNTEXT16
+GLOBL_FN(GL_PREFIX(Color3sv))
+GL_PREFIX(Color3sv):
+ MOV_L(GLNAME(_glapi_Dispatch), EAX)
+ TEST_L(EAX, EAX)
+ JZ(GLNAME(_glapi_fallback_Color3sv))
+ JMP(GL_OFFSET(_gloffset_Color3sv))
+
+ALIGNTEXT16
GLOBL_FN(GL_PREFIX(Color3ub))
GL_PREFIX(Color3ub):
MOV_L(GLNAME(_glapi_Dispatch), EAX)
@@ -212,6 +180,14 @@ GL_PREFIX(Color3ub):
JMP(GL_OFFSET(_gloffset_Color3ub))
ALIGNTEXT16
+GLOBL_FN(GL_PREFIX(Color3ubv))
+GL_PREFIX(Color3ubv):
+ MOV_L(GLNAME(_glapi_Dispatch), EAX)
+ TEST_L(EAX, EAX)
+ JZ(GLNAME(_glapi_fallback_Color3ubv))
+ JMP(GL_OFFSET(_gloffset_Color3ubv))
+
+ALIGNTEXT16
GLOBL_FN(GL_PREFIX(Color3ui))
GL_PREFIX(Color3ui):
MOV_L(GLNAME(_glapi_Dispatch), EAX)
@@ -220,6 +196,14 @@ GL_PREFIX(Color3ui):
JMP(GL_OFFSET(_gloffset_Color3ui))
ALIGNTEXT16
+GLOBL_FN(GL_PREFIX(Color3uiv))
+GL_PREFIX(Color3uiv):
+ MOV_L(GLNAME(_glapi_Dispatch), EAX)
+ TEST_L(EAX, EAX)
+ JZ(GLNAME(_glapi_fallback_Color3uiv))
+ JMP(GL_OFFSET(_gloffset_Color3uiv))
+
+ALIGNTEXT16
GLOBL_FN(GL_PREFIX(Color3us))
GL_PREFIX(Color3us):
MOV_L(GLNAME(_glapi_Dispatch), EAX)
@@ -228,6 +212,14 @@ GL_PREFIX(Color3us):
JMP(GL_OFFSET(_gloffset_Color3us))
ALIGNTEXT16
+GLOBL_FN(GL_PREFIX(Color3usv))
+GL_PREFIX(Color3usv):
+ MOV_L(GLNAME(_glapi_Dispatch), EAX)
+ TEST_L(EAX, EAX)
+ JZ(GLNAME(_glapi_fallback_Color3usv))
+ JMP(GL_OFFSET(_gloffset_Color3usv))
+
+ALIGNTEXT16
GLOBL_FN(GL_PREFIX(Color4b))
GL_PREFIX(Color4b):
MOV_L(GLNAME(_glapi_Dispatch), EAX)
@@ -236,6 +228,14 @@ GL_PREFIX(Color4b):
JMP(GL_OFFSET(_gloffset_Color4b))
ALIGNTEXT16
+GLOBL_FN(GL_PREFIX(Color4bv))
+GL_PREFIX(Color4bv):
+ MOV_L(GLNAME(_glapi_Dispatch), EAX)
+ TEST_L(EAX, EAX)
+ JZ(GLNAME(_glapi_fallback_Color4bv))
+ JMP(GL_OFFSET(_gloffset_Color4bv))
+
+ALIGNTEXT16
GLOBL_FN(GL_PREFIX(Color4d))
GL_PREFIX(Color4d):
MOV_L(GLNAME(_glapi_Dispatch), EAX)
@@ -244,6 +244,14 @@ GL_PREFIX(Color4d):
JMP(GL_OFFSET(_gloffset_Color4d))
ALIGNTEXT16
+GLOBL_FN(GL_PREFIX(Color4dv))
+GL_PREFIX(Color4dv):
+ MOV_L(GLNAME(_glapi_Dispatch), EAX)
+ TEST_L(EAX, EAX)
+ JZ(GLNAME(_glapi_fallback_Color4dv))
+ JMP(GL_OFFSET(_gloffset_Color4dv))
+
+ALIGNTEXT16
GLOBL_FN(GL_PREFIX(Color4f))
GL_PREFIX(Color4f):
MOV_L(GLNAME(_glapi_Dispatch), EAX)
@@ -252,6 +260,14 @@ GL_PREFIX(Color4f):
JMP(GL_OFFSET(_gloffset_Color4f))
ALIGNTEXT16
+GLOBL_FN(GL_PREFIX(Color4fv))
+GL_PREFIX(Color4fv):
+ MOV_L(GLNAME(_glapi_Dispatch), EAX)
+ TEST_L(EAX, EAX)
+ JZ(GLNAME(_glapi_fallback_Color4fv))
+ JMP(GL_OFFSET(_gloffset_Color4fv))
+
+ALIGNTEXT16
GLOBL_FN(GL_PREFIX(Color4i))
GL_PREFIX(Color4i):
MOV_L(GLNAME(_glapi_Dispatch), EAX)
@@ -260,6 +276,14 @@ GL_PREFIX(Color4i):
JMP(GL_OFFSET(_gloffset_Color4i))
ALIGNTEXT16
+GLOBL_FN(GL_PREFIX(Color4iv))
+GL_PREFIX(Color4iv):
+ MOV_L(GLNAME(_glapi_Dispatch), EAX)
+ TEST_L(EAX, EAX)
+ JZ(GLNAME(_glapi_fallback_Color4iv))
+ JMP(GL_OFFSET(_gloffset_Color4iv))
+
+ALIGNTEXT16
GLOBL_FN(GL_PREFIX(Color4s))
GL_PREFIX(Color4s):
MOV_L(GLNAME(_glapi_Dispatch), EAX)
@@ -268,6 +292,14 @@ GL_PREFIX(Color4s):
JMP(GL_OFFSET(_gloffset_Color4s))
ALIGNTEXT16
+GLOBL_FN(GL_PREFIX(Color4sv))
+GL_PREFIX(Color4sv):
+ MOV_L(GLNAME(_glapi_Dispatch), EAX)
+ TEST_L(EAX, EAX)
+ JZ(GLNAME(_glapi_fallback_Color4sv))
+ JMP(GL_OFFSET(_gloffset_Color4sv))
+
+ALIGNTEXT16
GLOBL_FN(GL_PREFIX(Color4ub))
GL_PREFIX(Color4ub):
MOV_L(GLNAME(_glapi_Dispatch), EAX)
@@ -276,6 +308,14 @@ GL_PREFIX(Color4ub):
JMP(GL_OFFSET(_gloffset_Color4ub))
ALIGNTEXT16
+GLOBL_FN(GL_PREFIX(Color4ubv))
+GL_PREFIX(Color4ubv):
+ MOV_L(GLNAME(_glapi_Dispatch), EAX)
+ TEST_L(EAX, EAX)
+ JZ(GLNAME(_glapi_fallback_Color4ubv))
+ JMP(GL_OFFSET(_gloffset_Color4ubv))
+
+ALIGNTEXT16
GLOBL_FN(GL_PREFIX(Color4ui))
GL_PREFIX(Color4ui):
MOV_L(GLNAME(_glapi_Dispatch), EAX)
@@ -284,2260 +324,2260 @@ GL_PREFIX(Color4ui):
JMP(GL_OFFSET(_gloffset_Color4ui))
ALIGNTEXT16
-GLOBL_FN(GL_PREFIX(Color4us))
-GL_PREFIX(Color4us):
+GLOBL_FN(GL_PREFIX(Color4uiv))
+GL_PREFIX(Color4uiv):
MOV_L(GLNAME(_glapi_Dispatch), EAX)
TEST_L(EAX, EAX)
- JZ(GLNAME(_glapi_fallback_Color4us))
- JMP(GL_OFFSET(_gloffset_Color4us))
+ JZ(GLNAME(_glapi_fallback_Color4uiv))
+ JMP(GL_OFFSET(_gloffset_Color4uiv))
ALIGNTEXT16
-GLOBL_FN(GL_PREFIX(Color3bv))
-GL_PREFIX(Color3bv):
+GLOBL_FN(GL_PREFIX(Color4us))
+GL_PREFIX(Color4us):
MOV_L(GLNAME(_glapi_Dispatch), EAX)
TEST_L(EAX, EAX)
- JZ(GLNAME(_glapi_fallback_Color3bv))
- JMP(GL_OFFSET(_gloffset_Color3bv))
+ JZ(GLNAME(_glapi_fallback_Color4us))
+ JMP(GL_OFFSET(_gloffset_Color4us))
ALIGNTEXT16
-GLOBL_FN(GL_PREFIX(Color3dv))
-GL_PREFIX(Color3dv):
+GLOBL_FN(GL_PREFIX(Color4usv))
+GL_PREFIX(Color4usv):
MOV_L(GLNAME(_glapi_Dispatch), EAX)
TEST_L(EAX, EAX)
- JZ(GLNAME(_glapi_fallback_Color3dv))
- JMP(GL_OFFSET(_gloffset_Color3dv))
+ JZ(GLNAME(_glapi_fallback_Color4usv))
+ JMP(GL_OFFSET(_gloffset_Color4usv))
ALIGNTEXT16
-GLOBL_FN(GL_PREFIX(Color3fv))
-GL_PREFIX(Color3fv):
+GLOBL_FN(GL_PREFIX(EdgeFlag))
+GL_PREFIX(EdgeFlag):
MOV_L(GLNAME(_glapi_Dispatch), EAX)
TEST_L(EAX, EAX)
- JZ(GLNAME(_glapi_fallback_Color3fv))
- JMP(GL_OFFSET(_gloffset_Color3fv))
+ JZ(GLNAME(_glapi_fallback_EdgeFlag))
+ JMP(GL_OFFSET(_gloffset_EdgeFlag))
ALIGNTEXT16
-GLOBL_FN(GL_PREFIX(Color3iv))
-GL_PREFIX(Color3iv):
+GLOBL_FN(GL_PREFIX(EdgeFlagv))
+GL_PREFIX(EdgeFlagv):
MOV_L(GLNAME(_glapi_Dispatch), EAX)
TEST_L(EAX, EAX)
- JZ(GLNAME(_glapi_fallback_Color3iv))
- JMP(GL_OFFSET(_gloffset_Color3iv))
+ JZ(GLNAME(_glapi_fallback_EdgeFlagv))
+ JMP(GL_OFFSET(_gloffset_EdgeFlagv))
ALIGNTEXT16
-GLOBL_FN(GL_PREFIX(Color3sv))
-GL_PREFIX(Color3sv):
+GLOBL_FN(GL_PREFIX(End))
+GL_PREFIX(End):
MOV_L(GLNAME(_glapi_Dispatch), EAX)
TEST_L(EAX, EAX)
- JZ(GLNAME(_glapi_fallback_Color3sv))
- JMP(GL_OFFSET(_gloffset_Color3sv))
+ JZ(GLNAME(_glapi_fallback_End))
+ JMP(GL_OFFSET(_gloffset_End))
ALIGNTEXT16
-GLOBL_FN(GL_PREFIX(Color3ubv))
-GL_PREFIX(Color3ubv):
+GLOBL_FN(GL_PREFIX(Indexd))
+GL_PREFIX(Indexd):
MOV_L(GLNAME(_glapi_Dispatch), EAX)
TEST_L(EAX, EAX)
- JZ(GLNAME(_glapi_fallback_Color3ubv))
- JMP(GL_OFFSET(_gloffset_Color3ubv))
+ JZ(GLNAME(_glapi_fallback_Indexd))
+ JMP(GL_OFFSET(_gloffset_Indexd))
ALIGNTEXT16
-GLOBL_FN(GL_PREFIX(Color3uiv))
-GL_PREFIX(Color3uiv):
+GLOBL_FN(GL_PREFIX(Indexdv))
+GL_PREFIX(Indexdv):
MOV_L(GLNAME(_glapi_Dispatch), EAX)
TEST_L(EAX, EAX)
- JZ(GLNAME(_glapi_fallback_Color3uiv))
- JMP(GL_OFFSET(_gloffset_Color3uiv))
+ JZ(GLNAME(_glapi_fallback_Indexdv))
+ JMP(GL_OFFSET(_gloffset_Indexdv))
ALIGNTEXT16
-GLOBL_FN(GL_PREFIX(Color3usv))
-GL_PREFIX(Color3usv):
+GLOBL_FN(GL_PREFIX(Indexf))
+GL_PREFIX(Indexf):
MOV_L(GLNAME(_glapi_Dispatch), EAX)
TEST_L(EAX, EAX)
- JZ(GLNAME(_glapi_fallback_Color3usv))
- JMP(GL_OFFSET(_gloffset_Color3usv))
+ JZ(GLNAME(_glapi_fallback_Indexf))
+ JMP(GL_OFFSET(_gloffset_Indexf))
ALIGNTEXT16
-GLOBL_FN(GL_PREFIX(Color4bv))
-GL_PREFIX(Color4bv):
+GLOBL_FN(GL_PREFIX(Indexfv))
+GL_PREFIX(Indexfv):
MOV_L(GLNAME(_glapi_Dispatch), EAX)
TEST_L(EAX, EAX)
- JZ(GLNAME(_glapi_fallback_Color4bv))
- JMP(GL_OFFSET(_gloffset_Color4bv))
+ JZ(GLNAME(_glapi_fallback_Indexfv))
+ JMP(GL_OFFSET(_gloffset_Indexfv))
ALIGNTEXT16
-GLOBL_FN(GL_PREFIX(Color4dv))
-GL_PREFIX(Color4dv):
+GLOBL_FN(GL_PREFIX(Indexi))
+GL_PREFIX(Indexi):
MOV_L(GLNAME(_glapi_Dispatch), EAX)
TEST_L(EAX, EAX)
- JZ(GLNAME(_glapi_fallback_Color4dv))
- JMP(GL_OFFSET(_gloffset_Color4dv))
+ JZ(GLNAME(_glapi_fallback_Indexi))
+ JMP(GL_OFFSET(_gloffset_Indexi))
ALIGNTEXT16
-GLOBL_FN(GL_PREFIX(Color4fv))
-GL_PREFIX(Color4fv):
+GLOBL_FN(GL_PREFIX(Indexiv))
+GL_PREFIX(Indexiv):
MOV_L(GLNAME(_glapi_Dispatch), EAX)
TEST_L(EAX, EAX)
- JZ(GLNAME(_glapi_fallback_Color4fv))
- JMP(GL_OFFSET(_gloffset_Color4fv))
+ JZ(GLNAME(_glapi_fallback_Indexiv))
+ JMP(GL_OFFSET(_gloffset_Indexiv))
ALIGNTEXT16
-GLOBL_FN(GL_PREFIX(Color4iv))
-GL_PREFIX(Color4iv):
+GLOBL_FN(GL_PREFIX(Indexs))
+GL_PREFIX(Indexs):
MOV_L(GLNAME(_glapi_Dispatch), EAX)
TEST_L(EAX, EAX)
- JZ(GLNAME(_glapi_fallback_Color4iv))
- JMP(GL_OFFSET(_gloffset_Color4iv))
+ JZ(GLNAME(_glapi_fallback_Indexs))
+ JMP(GL_OFFSET(_gloffset_Indexs))
ALIGNTEXT16
-GLOBL_FN(GL_PREFIX(Color4sv))
-GL_PREFIX(Color4sv):
+GLOBL_FN(GL_PREFIX(Indexsv))
+GL_PREFIX(Indexsv):
MOV_L(GLNAME(_glapi_Dispatch), EAX)
TEST_L(EAX, EAX)
- JZ(GLNAME(_glapi_fallback_Color4sv))
- JMP(GL_OFFSET(_gloffset_Color4sv))
+ JZ(GLNAME(_glapi_fallback_Indexsv))
+ JMP(GL_OFFSET(_gloffset_Indexsv))
ALIGNTEXT16
-GLOBL_FN(GL_PREFIX(Color4ubv))
-GL_PREFIX(Color4ubv):
+GLOBL_FN(GL_PREFIX(Normal3b))
+GL_PREFIX(Normal3b):
MOV_L(GLNAME(_glapi_Dispatch), EAX)
TEST_L(EAX, EAX)
- JZ(GLNAME(_glapi_fallback_Color4ubv))
- JMP(GL_OFFSET(_gloffset_Color4ubv))
+ JZ(GLNAME(_glapi_fallback_Normal3b))
+ JMP(GL_OFFSET(_gloffset_Normal3b))
ALIGNTEXT16
-GLOBL_FN(GL_PREFIX(Color4uiv))
-GL_PREFIX(Color4uiv):
+GLOBL_FN(GL_PREFIX(Normal3bv))
+GL_PREFIX(Normal3bv):
MOV_L(GLNAME(_glapi_Dispatch), EAX)
TEST_L(EAX, EAX)
- JZ(GLNAME(_glapi_fallback_Color4uiv))
- JMP(GL_OFFSET(_gloffset_Color4uiv))
+ JZ(GLNAME(_glapi_fallback_Normal3bv))
+ JMP(GL_OFFSET(_gloffset_Normal3bv))
ALIGNTEXT16
-GLOBL_FN(GL_PREFIX(Color4usv))
-GL_PREFIX(Color4usv):
+GLOBL_FN(GL_PREFIX(Normal3d))
+GL_PREFIX(Normal3d):
MOV_L(GLNAME(_glapi_Dispatch), EAX)
TEST_L(EAX, EAX)
- JZ(GLNAME(_glapi_fallback_Color4usv))
- JMP(GL_OFFSET(_gloffset_Color4usv))
+ JZ(GLNAME(_glapi_fallback_Normal3d))
+ JMP(GL_OFFSET(_gloffset_Normal3d))
ALIGNTEXT16
-GLOBL_FN(GL_PREFIX(ColorMask))
-GL_PREFIX(ColorMask):
+GLOBL_FN(GL_PREFIX(Normal3dv))
+GL_PREFIX(Normal3dv):
MOV_L(GLNAME(_glapi_Dispatch), EAX)
TEST_L(EAX, EAX)
- JZ(GLNAME(_glapi_fallback_ColorMask))
- JMP(GL_OFFSET(_gloffset_ColorMask))
+ JZ(GLNAME(_glapi_fallback_Normal3dv))
+ JMP(GL_OFFSET(_gloffset_Normal3dv))
ALIGNTEXT16
-GLOBL_FN(GL_PREFIX(ColorMaterial))
-GL_PREFIX(ColorMaterial):
+GLOBL_FN(GL_PREFIX(Normal3f))
+GL_PREFIX(Normal3f):
MOV_L(GLNAME(_glapi_Dispatch), EAX)
TEST_L(EAX, EAX)
- JZ(GLNAME(_glapi_fallback_ColorMaterial))
- JMP(GL_OFFSET(_gloffset_ColorMaterial))
+ JZ(GLNAME(_glapi_fallback_Normal3f))
+ JMP(GL_OFFSET(_gloffset_Normal3f))
ALIGNTEXT16
-GLOBL_FN(GL_PREFIX(CopyPixels))
-GL_PREFIX(CopyPixels):
+GLOBL_FN(GL_PREFIX(Normal3fv))
+GL_PREFIX(Normal3fv):
MOV_L(GLNAME(_glapi_Dispatch), EAX)
TEST_L(EAX, EAX)
- JZ(GLNAME(_glapi_fallback_CopyPixels))
- JMP(GL_OFFSET(_gloffset_CopyPixels))
+ JZ(GLNAME(_glapi_fallback_Normal3fv))
+ JMP(GL_OFFSET(_gloffset_Normal3fv))
ALIGNTEXT16
-GLOBL_FN(GL_PREFIX(CullFace))
-GL_PREFIX(CullFace):
+GLOBL_FN(GL_PREFIX(Normal3i))
+GL_PREFIX(Normal3i):
MOV_L(GLNAME(_glapi_Dispatch), EAX)
TEST_L(EAX, EAX)
- JZ(GLNAME(_glapi_fallback_CullFace))
- JMP(GL_OFFSET(_gloffset_CullFace))
+ JZ(GLNAME(_glapi_fallback_Normal3i))
+ JMP(GL_OFFSET(_gloffset_Normal3i))
ALIGNTEXT16
-GLOBL_FN(GL_PREFIX(DepthFunc))
-GL_PREFIX(DepthFunc):
+GLOBL_FN(GL_PREFIX(Normal3iv))
+GL_PREFIX(Normal3iv):
MOV_L(GLNAME(_glapi_Dispatch), EAX)
TEST_L(EAX, EAX)
- JZ(GLNAME(_glapi_fallback_DepthFunc))
- JMP(GL_OFFSET(_gloffset_DepthFunc))
+ JZ(GLNAME(_glapi_fallback_Normal3iv))
+ JMP(GL_OFFSET(_gloffset_Normal3iv))
ALIGNTEXT16
-GLOBL_FN(GL_PREFIX(DepthMask))
-GL_PREFIX(DepthMask):
+GLOBL_FN(GL_PREFIX(Normal3s))
+GL_PREFIX(Normal3s):
MOV_L(GLNAME(_glapi_Dispatch), EAX)
TEST_L(EAX, EAX)
- JZ(GLNAME(_glapi_fallback_DepthMask))
- JMP(GL_OFFSET(_gloffset_DepthMask))
+ JZ(GLNAME(_glapi_fallback_Normal3s))
+ JMP(GL_OFFSET(_gloffset_Normal3s))
ALIGNTEXT16
-GLOBL_FN(GL_PREFIX(DepthRange))
-GL_PREFIX(DepthRange):
+GLOBL_FN(GL_PREFIX(Normal3sv))
+GL_PREFIX(Normal3sv):
MOV_L(GLNAME(_glapi_Dispatch), EAX)
TEST_L(EAX, EAX)
- JZ(GLNAME(_glapi_fallback_DepthRange))
- JMP(GL_OFFSET(_gloffset_DepthRange))
+ JZ(GLNAME(_glapi_fallback_Normal3sv))
+ JMP(GL_OFFSET(_gloffset_Normal3sv))
ALIGNTEXT16
-GLOBL_FN(GL_PREFIX(DeleteLists))
-GL_PREFIX(DeleteLists):
+GLOBL_FN(GL_PREFIX(RasterPos2d))
+GL_PREFIX(RasterPos2d):
MOV_L(GLNAME(_glapi_Dispatch), EAX)
TEST_L(EAX, EAX)
- JZ(GLNAME(_glapi_fallback_DeleteLists))
- JMP(GL_OFFSET(_gloffset_DeleteLists))
+ JZ(GLNAME(_glapi_fallback_RasterPos2d))
+ JMP(GL_OFFSET(_gloffset_RasterPos2d))
ALIGNTEXT16
-GLOBL_FN(GL_PREFIX(Disable))
-GL_PREFIX(Disable):
+GLOBL_FN(GL_PREFIX(RasterPos2dv))
+GL_PREFIX(RasterPos2dv):
MOV_L(GLNAME(_glapi_Dispatch), EAX)
TEST_L(EAX, EAX)
- JZ(GLNAME(_glapi_fallback_Disable))
- JMP(GL_OFFSET(_gloffset_Disable))
+ JZ(GLNAME(_glapi_fallback_RasterPos2dv))
+ JMP(GL_OFFSET(_gloffset_RasterPos2dv))
ALIGNTEXT16
-GLOBL_FN(GL_PREFIX(DrawBuffer))
-GL_PREFIX(DrawBuffer):
+GLOBL_FN(GL_PREFIX(RasterPos2f))
+GL_PREFIX(RasterPos2f):
MOV_L(GLNAME(_glapi_Dispatch), EAX)
TEST_L(EAX, EAX)
- JZ(GLNAME(_glapi_fallback_DrawBuffer))
- JMP(GL_OFFSET(_gloffset_DrawBuffer))
+ JZ(GLNAME(_glapi_fallback_RasterPos2f))
+ JMP(GL_OFFSET(_gloffset_RasterPos2f))
ALIGNTEXT16
-GLOBL_FN(GL_PREFIX(DrawElements))
-GL_PREFIX(DrawElements):
+GLOBL_FN(GL_PREFIX(RasterPos2fv))
+GL_PREFIX(RasterPos2fv):
MOV_L(GLNAME(_glapi_Dispatch), EAX)
TEST_L(EAX, EAX)
- JZ(GLNAME(_glapi_fallback_DrawElements))
- JMP(GL_OFFSET(_gloffset_DrawElements))
+ JZ(GLNAME(_glapi_fallback_RasterPos2fv))
+ JMP(GL_OFFSET(_gloffset_RasterPos2fv))
ALIGNTEXT16
-GLOBL_FN(GL_PREFIX(DrawPixels))
-GL_PREFIX(DrawPixels):
+GLOBL_FN(GL_PREFIX(RasterPos2i))
+GL_PREFIX(RasterPos2i):
MOV_L(GLNAME(_glapi_Dispatch), EAX)
TEST_L(EAX, EAX)
- JZ(GLNAME(_glapi_fallback_DrawPixels))
- JMP(GL_OFFSET(_gloffset_DrawPixels))
+ JZ(GLNAME(_glapi_fallback_RasterPos2i))
+ JMP(GL_OFFSET(_gloffset_RasterPos2i))
ALIGNTEXT16
-GLOBL_FN(GL_PREFIX(Enable))
-GL_PREFIX(Enable):
+GLOBL_FN(GL_PREFIX(RasterPos2iv))
+GL_PREFIX(RasterPos2iv):
MOV_L(GLNAME(_glapi_Dispatch), EAX)
TEST_L(EAX, EAX)
- JZ(GLNAME(_glapi_fallback_Enable))
- JMP(GL_OFFSET(_gloffset_Enable))
+ JZ(GLNAME(_glapi_fallback_RasterPos2iv))
+ JMP(GL_OFFSET(_gloffset_RasterPos2iv))
ALIGNTEXT16
-GLOBL_FN(GL_PREFIX(End))
-GL_PREFIX(End):
+GLOBL_FN(GL_PREFIX(RasterPos2s))
+GL_PREFIX(RasterPos2s):
MOV_L(GLNAME(_glapi_Dispatch), EAX)
TEST_L(EAX, EAX)
- JZ(GLNAME(_glapi_fallback_End))
- JMP(GL_OFFSET(_gloffset_End))
+ JZ(GLNAME(_glapi_fallback_RasterPos2s))
+ JMP(GL_OFFSET(_gloffset_RasterPos2s))
ALIGNTEXT16
-GLOBL_FN(GL_PREFIX(EndList))
-GL_PREFIX(EndList):
+GLOBL_FN(GL_PREFIX(RasterPos2sv))
+GL_PREFIX(RasterPos2sv):
MOV_L(GLNAME(_glapi_Dispatch), EAX)
TEST_L(EAX, EAX)
- JZ(GLNAME(_glapi_fallback_EndList))
- JMP(GL_OFFSET(_gloffset_EndList))
+ JZ(GLNAME(_glapi_fallback_RasterPos2sv))
+ JMP(GL_OFFSET(_gloffset_RasterPos2sv))
ALIGNTEXT16
-GLOBL_FN(GL_PREFIX(EvalCoord1d))
-GL_PREFIX(EvalCoord1d):
+GLOBL_FN(GL_PREFIX(RasterPos3d))
+GL_PREFIX(RasterPos3d):
MOV_L(GLNAME(_glapi_Dispatch), EAX)
TEST_L(EAX, EAX)
- JZ(GLNAME(_glapi_fallback_EvalCoord1d))
- JMP(GL_OFFSET(_gloffset_EvalCoord1d))
+ JZ(GLNAME(_glapi_fallback_RasterPos3d))
+ JMP(GL_OFFSET(_gloffset_RasterPos3d))
ALIGNTEXT16
-GLOBL_FN(GL_PREFIX(EvalCoord1f))
-GL_PREFIX(EvalCoord1f):
+GLOBL_FN(GL_PREFIX(RasterPos3dv))
+GL_PREFIX(RasterPos3dv):
MOV_L(GLNAME(_glapi_Dispatch), EAX)
TEST_L(EAX, EAX)
- JZ(GLNAME(_glapi_fallback_EvalCoord1f))
- JMP(GL_OFFSET(_gloffset_EvalCoord1f))
+ JZ(GLNAME(_glapi_fallback_RasterPos3dv))
+ JMP(GL_OFFSET(_gloffset_RasterPos3dv))
ALIGNTEXT16
-GLOBL_FN(GL_PREFIX(EvalCoord1dv))
-GL_PREFIX(EvalCoord1dv):
+GLOBL_FN(GL_PREFIX(RasterPos3f))
+GL_PREFIX(RasterPos3f):
MOV_L(GLNAME(_glapi_Dispatch), EAX)
TEST_L(EAX, EAX)
- JZ(GLNAME(_glapi_fallback_EvalCoord1dv))
- JMP(GL_OFFSET(_gloffset_EvalCoord1dv))
+ JZ(GLNAME(_glapi_fallback_RasterPos3f))
+ JMP(GL_OFFSET(_gloffset_RasterPos3f))
ALIGNTEXT16
-GLOBL_FN(GL_PREFIX(EvalCoord1fv))
-GL_PREFIX(EvalCoord1fv):
+GLOBL_FN(GL_PREFIX(RasterPos3fv))
+GL_PREFIX(RasterPos3fv):
MOV_L(GLNAME(_glapi_Dispatch), EAX)
TEST_L(EAX, EAX)
- JZ(GLNAME(_glapi_fallback_EvalCoord1fv))
- JMP(GL_OFFSET(_gloffset_EvalCoord1fv))
+ JZ(GLNAME(_glapi_fallback_RasterPos3fv))
+ JMP(GL_OFFSET(_gloffset_RasterPos3fv))
ALIGNTEXT16
-GLOBL_FN(GL_PREFIX(EvalCoord2d))
-GL_PREFIX(EvalCoord2d):
+GLOBL_FN(GL_PREFIX(RasterPos3i))
+GL_PREFIX(RasterPos3i):
MOV_L(GLNAME(_glapi_Dispatch), EAX)
TEST_L(EAX, EAX)
- JZ(GLNAME(_glapi_fallback_EvalCoord2d))
- JMP(GL_OFFSET(_gloffset_EvalCoord2d))
+ JZ(GLNAME(_glapi_fallback_RasterPos3i))
+ JMP(GL_OFFSET(_gloffset_RasterPos3i))
ALIGNTEXT16
-GLOBL_FN(GL_PREFIX(EvalCoord2f))
-GL_PREFIX(EvalCoord2f):
+GLOBL_FN(GL_PREFIX(RasterPos3iv))
+GL_PREFIX(RasterPos3iv):
MOV_L(GLNAME(_glapi_Dispatch), EAX)
TEST_L(EAX, EAX)
- JZ(GLNAME(_glapi_fallback_EvalCoord2f))
- JMP(GL_OFFSET(_gloffset_EvalCoord2f))
+ JZ(GLNAME(_glapi_fallback_RasterPos3iv))
+ JMP(GL_OFFSET(_gloffset_RasterPos3iv))
ALIGNTEXT16
-GLOBL_FN(GL_PREFIX(EvalCoord2dv))
-GL_PREFIX(EvalCoord2dv):
+GLOBL_FN(GL_PREFIX(RasterPos3s))
+GL_PREFIX(RasterPos3s):
MOV_L(GLNAME(_glapi_Dispatch), EAX)
TEST_L(EAX, EAX)
- JZ(GLNAME(_glapi_fallback_EvalCoord2dv))
- JMP(GL_OFFSET(_gloffset_EvalCoord2dv))
+ JZ(GLNAME(_glapi_fallback_RasterPos3s))
+ JMP(GL_OFFSET(_gloffset_RasterPos3s))
ALIGNTEXT16
-GLOBL_FN(GL_PREFIX(EvalCoord2fv))
-GL_PREFIX(EvalCoord2fv):
+GLOBL_FN(GL_PREFIX(RasterPos3sv))
+GL_PREFIX(RasterPos3sv):
MOV_L(GLNAME(_glapi_Dispatch), EAX)
TEST_L(EAX, EAX)
- JZ(GLNAME(_glapi_fallback_EvalCoord2fv))
- JMP(GL_OFFSET(_gloffset_EvalCoord2fv))
+ JZ(GLNAME(_glapi_fallback_RasterPos3sv))
+ JMP(GL_OFFSET(_gloffset_RasterPos3sv))
ALIGNTEXT16
-GLOBL_FN(GL_PREFIX(EvalPoint1))
-GL_PREFIX(EvalPoint1):
+GLOBL_FN(GL_PREFIX(RasterPos4d))
+GL_PREFIX(RasterPos4d):
MOV_L(GLNAME(_glapi_Dispatch), EAX)
TEST_L(EAX, EAX)
- JZ(GLNAME(_glapi_fallback_EvalPoint1))
- JMP(GL_OFFSET(_gloffset_EvalPoint1))
+ JZ(GLNAME(_glapi_fallback_RasterPos4d))
+ JMP(GL_OFFSET(_gloffset_RasterPos4d))
ALIGNTEXT16
-GLOBL_FN(GL_PREFIX(EvalPoint2))
-GL_PREFIX(EvalPoint2):
+GLOBL_FN(GL_PREFIX(RasterPos4dv))
+GL_PREFIX(RasterPos4dv):
MOV_L(GLNAME(_glapi_Dispatch), EAX)
TEST_L(EAX, EAX)
- JZ(GLNAME(_glapi_fallback_EvalPoint2))
- JMP(GL_OFFSET(_gloffset_EvalPoint2))
+ JZ(GLNAME(_glapi_fallback_RasterPos4dv))
+ JMP(GL_OFFSET(_gloffset_RasterPos4dv))
ALIGNTEXT16
-GLOBL_FN(GL_PREFIX(EvalMesh1))
-GL_PREFIX(EvalMesh1):
+GLOBL_FN(GL_PREFIX(RasterPos4f))
+GL_PREFIX(RasterPos4f):
MOV_L(GLNAME(_glapi_Dispatch), EAX)
TEST_L(EAX, EAX)
- JZ(GLNAME(_glapi_fallback_EvalMesh1))
- JMP(GL_OFFSET(_gloffset_EvalMesh1))
+ JZ(GLNAME(_glapi_fallback_RasterPos4f))
+ JMP(GL_OFFSET(_gloffset_RasterPos4f))
ALIGNTEXT16
-GLOBL_FN(GL_PREFIX(EdgeFlag))
-GL_PREFIX(EdgeFlag):
+GLOBL_FN(GL_PREFIX(RasterPos4fv))
+GL_PREFIX(RasterPos4fv):
MOV_L(GLNAME(_glapi_Dispatch), EAX)
TEST_L(EAX, EAX)
- JZ(GLNAME(_glapi_fallback_EdgeFlag))
- JMP(GL_OFFSET(_gloffset_EdgeFlag))
+ JZ(GLNAME(_glapi_fallback_RasterPos4fv))
+ JMP(GL_OFFSET(_gloffset_RasterPos4fv))
ALIGNTEXT16
-GLOBL_FN(GL_PREFIX(EdgeFlagv))
-GL_PREFIX(EdgeFlagv):
+GLOBL_FN(GL_PREFIX(RasterPos4i))
+GL_PREFIX(RasterPos4i):
MOV_L(GLNAME(_glapi_Dispatch), EAX)
TEST_L(EAX, EAX)
- JZ(GLNAME(_glapi_fallback_EdgeFlagv))
- JMP(GL_OFFSET(_gloffset_EdgeFlagv))
+ JZ(GLNAME(_glapi_fallback_RasterPos4i))
+ JMP(GL_OFFSET(_gloffset_RasterPos4i))
ALIGNTEXT16
-GLOBL_FN(GL_PREFIX(EvalMesh2))
-GL_PREFIX(EvalMesh2):
+GLOBL_FN(GL_PREFIX(RasterPos4iv))
+GL_PREFIX(RasterPos4iv):
MOV_L(GLNAME(_glapi_Dispatch), EAX)
TEST_L(EAX, EAX)
- JZ(GLNAME(_glapi_fallback_EvalMesh2))
- JMP(GL_OFFSET(_gloffset_EvalMesh2))
+ JZ(GLNAME(_glapi_fallback_RasterPos4iv))
+ JMP(GL_OFFSET(_gloffset_RasterPos4iv))
ALIGNTEXT16
-GLOBL_FN(GL_PREFIX(FeedbackBuffer))
-GL_PREFIX(FeedbackBuffer):
+GLOBL_FN(GL_PREFIX(RasterPos4s))
+GL_PREFIX(RasterPos4s):
MOV_L(GLNAME(_glapi_Dispatch), EAX)
TEST_L(EAX, EAX)
- JZ(GLNAME(_glapi_fallback_FeedbackBuffer))
- JMP(GL_OFFSET(_gloffset_FeedbackBuffer))
+ JZ(GLNAME(_glapi_fallback_RasterPos4s))
+ JMP(GL_OFFSET(_gloffset_RasterPos4s))
ALIGNTEXT16
-GLOBL_FN(GL_PREFIX(Finish))
-GL_PREFIX(Finish):
+GLOBL_FN(GL_PREFIX(RasterPos4sv))
+GL_PREFIX(RasterPos4sv):
MOV_L(GLNAME(_glapi_Dispatch), EAX)
TEST_L(EAX, EAX)
- JZ(GLNAME(_glapi_fallback_Finish))
- JMP(GL_OFFSET(_gloffset_Finish))
+ JZ(GLNAME(_glapi_fallback_RasterPos4sv))
+ JMP(GL_OFFSET(_gloffset_RasterPos4sv))
ALIGNTEXT16
-GLOBL_FN(GL_PREFIX(Flush))
-GL_PREFIX(Flush):
+GLOBL_FN(GL_PREFIX(Rectd))
+GL_PREFIX(Rectd):
MOV_L(GLNAME(_glapi_Dispatch), EAX)
TEST_L(EAX, EAX)
- JZ(GLNAME(_glapi_fallback_Flush))
- JMP(GL_OFFSET(_gloffset_Flush))
+ JZ(GLNAME(_glapi_fallback_Rectd))
+ JMP(GL_OFFSET(_gloffset_Rectd))
ALIGNTEXT16
-GLOBL_FN(GL_PREFIX(Fogf))
-GL_PREFIX(Fogf):
+GLOBL_FN(GL_PREFIX(Rectdv))
+GL_PREFIX(Rectdv):
MOV_L(GLNAME(_glapi_Dispatch), EAX)
TEST_L(EAX, EAX)
- JZ(GLNAME(_glapi_fallback_Fogf))
- JMP(GL_OFFSET(_gloffset_Fogf))
+ JZ(GLNAME(_glapi_fallback_Rectdv))
+ JMP(GL_OFFSET(_gloffset_Rectdv))
ALIGNTEXT16
-GLOBL_FN(GL_PREFIX(Fogi))
-GL_PREFIX(Fogi):
+GLOBL_FN(GL_PREFIX(Rectf))
+GL_PREFIX(Rectf):
MOV_L(GLNAME(_glapi_Dispatch), EAX)
TEST_L(EAX, EAX)
- JZ(GLNAME(_glapi_fallback_Fogi))
- JMP(GL_OFFSET(_gloffset_Fogi))
+ JZ(GLNAME(_glapi_fallback_Rectf))
+ JMP(GL_OFFSET(_gloffset_Rectf))
ALIGNTEXT16
-GLOBL_FN(GL_PREFIX(Fogfv))
-GL_PREFIX(Fogfv):
+GLOBL_FN(GL_PREFIX(Rectfv))
+GL_PREFIX(Rectfv):
MOV_L(GLNAME(_glapi_Dispatch), EAX)
TEST_L(EAX, EAX)
- JZ(GLNAME(_glapi_fallback_Fogfv))
- JMP(GL_OFFSET(_gloffset_Fogfv))
+ JZ(GLNAME(_glapi_fallback_Rectfv))
+ JMP(GL_OFFSET(_gloffset_Rectfv))
ALIGNTEXT16
-GLOBL_FN(GL_PREFIX(Fogiv))
-GL_PREFIX(Fogiv):
+GLOBL_FN(GL_PREFIX(Recti))
+GL_PREFIX(Recti):
MOV_L(GLNAME(_glapi_Dispatch), EAX)
TEST_L(EAX, EAX)
- JZ(GLNAME(_glapi_fallback_Fogiv))
- JMP(GL_OFFSET(_gloffset_Fogiv))
+ JZ(GLNAME(_glapi_fallback_Recti))
+ JMP(GL_OFFSET(_gloffset_Recti))
ALIGNTEXT16
-GLOBL_FN(GL_PREFIX(FrontFace))
-GL_PREFIX(FrontFace):
+GLOBL_FN(GL_PREFIX(Rectiv))
+GL_PREFIX(Rectiv):
MOV_L(GLNAME(_glapi_Dispatch), EAX)
TEST_L(EAX, EAX)
- JZ(GLNAME(_glapi_fallback_FrontFace))
- JMP(GL_OFFSET(_gloffset_FrontFace))
+ JZ(GLNAME(_glapi_fallback_Rectiv))
+ JMP(GL_OFFSET(_gloffset_Rectiv))
ALIGNTEXT16
-GLOBL_FN(GL_PREFIX(Frustum))
-GL_PREFIX(Frustum):
+GLOBL_FN(GL_PREFIX(Rects))
+GL_PREFIX(Rects):
MOV_L(GLNAME(_glapi_Dispatch), EAX)
TEST_L(EAX, EAX)
- JZ(GLNAME(_glapi_fallback_Frustum))
- JMP(GL_OFFSET(_gloffset_Frustum))
+ JZ(GLNAME(_glapi_fallback_Rects))
+ JMP(GL_OFFSET(_gloffset_Rects))
ALIGNTEXT16
-GLOBL_FN(GL_PREFIX(GenLists))
-GL_PREFIX(GenLists):
+GLOBL_FN(GL_PREFIX(Rectsv))
+GL_PREFIX(Rectsv):
MOV_L(GLNAME(_glapi_Dispatch), EAX)
TEST_L(EAX, EAX)
- JZ(GLNAME(_glapi_fallback_GenLists))
- JMP(GL_OFFSET(_gloffset_GenLists))
+ JZ(GLNAME(_glapi_fallback_Rectsv))
+ JMP(GL_OFFSET(_gloffset_Rectsv))
ALIGNTEXT16
-GLOBL_FN(GL_PREFIX(GetBooleanv))
-GL_PREFIX(GetBooleanv):
+GLOBL_FN(GL_PREFIX(TexCoord1d))
+GL_PREFIX(TexCoord1d):
MOV_L(GLNAME(_glapi_Dispatch), EAX)
TEST_L(EAX, EAX)
- JZ(GLNAME(_glapi_fallback_GetBooleanv))
- JMP(GL_OFFSET(_gloffset_GetBooleanv))
+ JZ(GLNAME(_glapi_fallback_TexCoord1d))
+ JMP(GL_OFFSET(_gloffset_TexCoord1d))
ALIGNTEXT16
-GLOBL_FN(GL_PREFIX(GetClipPlane))
-GL_PREFIX(GetClipPlane):
+GLOBL_FN(GL_PREFIX(TexCoord1dv))
+GL_PREFIX(TexCoord1dv):
MOV_L(GLNAME(_glapi_Dispatch), EAX)
TEST_L(EAX, EAX)
- JZ(GLNAME(_glapi_fallback_GetClipPlane))
- JMP(GL_OFFSET(_gloffset_GetClipPlane))
+ JZ(GLNAME(_glapi_fallback_TexCoord1dv))
+ JMP(GL_OFFSET(_gloffset_TexCoord1dv))
ALIGNTEXT16
-GLOBL_FN(GL_PREFIX(GetDoublev))
-GL_PREFIX(GetDoublev):
+GLOBL_FN(GL_PREFIX(TexCoord1f))
+GL_PREFIX(TexCoord1f):
MOV_L(GLNAME(_glapi_Dispatch), EAX)
TEST_L(EAX, EAX)
- JZ(GLNAME(_glapi_fallback_GetDoublev))
- JMP(GL_OFFSET(_gloffset_GetDoublev))
+ JZ(GLNAME(_glapi_fallback_TexCoord1f))
+ JMP(GL_OFFSET(_gloffset_TexCoord1f))
ALIGNTEXT16
-GLOBL_FN(GL_PREFIX(GetError))
-GL_PREFIX(GetError):
+GLOBL_FN(GL_PREFIX(TexCoord1fv))
+GL_PREFIX(TexCoord1fv):
MOV_L(GLNAME(_glapi_Dispatch), EAX)
TEST_L(EAX, EAX)
- JZ(GLNAME(_glapi_fallback_GetError))
- JMP(GL_OFFSET(_gloffset_GetError))
+ JZ(GLNAME(_glapi_fallback_TexCoord1fv))
+ JMP(GL_OFFSET(_gloffset_TexCoord1fv))
ALIGNTEXT16
-GLOBL_FN(GL_PREFIX(GetFloatv))
-GL_PREFIX(GetFloatv):
+GLOBL_FN(GL_PREFIX(TexCoord1i))
+GL_PREFIX(TexCoord1i):
MOV_L(GLNAME(_glapi_Dispatch), EAX)
TEST_L(EAX, EAX)
- JZ(GLNAME(_glapi_fallback_GetFloatv))
- JMP(GL_OFFSET(_gloffset_GetFloatv))
+ JZ(GLNAME(_glapi_fallback_TexCoord1i))
+ JMP(GL_OFFSET(_gloffset_TexCoord1i))
ALIGNTEXT16
-GLOBL_FN(GL_PREFIX(GetIntegerv))
-GL_PREFIX(GetIntegerv):
+GLOBL_FN(GL_PREFIX(TexCoord1iv))
+GL_PREFIX(TexCoord1iv):
MOV_L(GLNAME(_glapi_Dispatch), EAX)
TEST_L(EAX, EAX)
- JZ(GLNAME(_glapi_fallback_GetIntegerv))
- JMP(GL_OFFSET(_gloffset_GetIntegerv))
+ JZ(GLNAME(_glapi_fallback_TexCoord1iv))
+ JMP(GL_OFFSET(_gloffset_TexCoord1iv))
ALIGNTEXT16
-GLOBL_FN(GL_PREFIX(GetLightfv))
-GL_PREFIX(GetLightfv):
+GLOBL_FN(GL_PREFIX(TexCoord1s))
+GL_PREFIX(TexCoord1s):
MOV_L(GLNAME(_glapi_Dispatch), EAX)
TEST_L(EAX, EAX)
- JZ(GLNAME(_glapi_fallback_GetLightfv))
- JMP(GL_OFFSET(_gloffset_GetLightfv))
+ JZ(GLNAME(_glapi_fallback_TexCoord1s))
+ JMP(GL_OFFSET(_gloffset_TexCoord1s))
ALIGNTEXT16
-GLOBL_FN(GL_PREFIX(GetLightiv))
-GL_PREFIX(GetLightiv):
+GLOBL_FN(GL_PREFIX(TexCoord1sv))
+GL_PREFIX(TexCoord1sv):
MOV_L(GLNAME(_glapi_Dispatch), EAX)
TEST_L(EAX, EAX)
- JZ(GLNAME(_glapi_fallback_GetLightiv))
- JMP(GL_OFFSET(_gloffset_GetLightiv))
+ JZ(GLNAME(_glapi_fallback_TexCoord1sv))
+ JMP(GL_OFFSET(_gloffset_TexCoord1sv))
ALIGNTEXT16
-GLOBL_FN(GL_PREFIX(GetMapdv))
-GL_PREFIX(GetMapdv):
+GLOBL_FN(GL_PREFIX(TexCoord2d))
+GL_PREFIX(TexCoord2d):
MOV_L(GLNAME(_glapi_Dispatch), EAX)
TEST_L(EAX, EAX)
- JZ(GLNAME(_glapi_fallback_GetMapdv))
- JMP(GL_OFFSET(_gloffset_GetMapdv))
+ JZ(GLNAME(_glapi_fallback_TexCoord2d))
+ JMP(GL_OFFSET(_gloffset_TexCoord2d))
ALIGNTEXT16
-GLOBL_FN(GL_PREFIX(GetMapfv))
-GL_PREFIX(GetMapfv):
+GLOBL_FN(GL_PREFIX(TexCoord2dv))
+GL_PREFIX(TexCoord2dv):
MOV_L(GLNAME(_glapi_Dispatch), EAX)
TEST_L(EAX, EAX)
- JZ(GLNAME(_glapi_fallback_GetMapfv))
- JMP(GL_OFFSET(_gloffset_GetMapfv))
+ JZ(GLNAME(_glapi_fallback_TexCoord2dv))
+ JMP(GL_OFFSET(_gloffset_TexCoord2dv))
ALIGNTEXT16
-GLOBL_FN(GL_PREFIX(GetMapiv))
-GL_PREFIX(GetMapiv):
+GLOBL_FN(GL_PREFIX(TexCoord2f))
+GL_PREFIX(TexCoord2f):
MOV_L(GLNAME(_glapi_Dispatch), EAX)
TEST_L(EAX, EAX)
- JZ(GLNAME(_glapi_fallback_GetMapiv))
- JMP(GL_OFFSET(_gloffset_GetMapiv))
+ JZ(GLNAME(_glapi_fallback_TexCoord2f))
+ JMP(GL_OFFSET(_gloffset_TexCoord2f))
ALIGNTEXT16
-GLOBL_FN(GL_PREFIX(GetMaterialfv))
-GL_PREFIX(GetMaterialfv):
+GLOBL_FN(GL_PREFIX(TexCoord2fv))
+GL_PREFIX(TexCoord2fv):
MOV_L(GLNAME(_glapi_Dispatch), EAX)
TEST_L(EAX, EAX)
- JZ(GLNAME(_glapi_fallback_GetMaterialfv))
- JMP(GL_OFFSET(_gloffset_GetMaterialfv))
+ JZ(GLNAME(_glapi_fallback_TexCoord2fv))
+ JMP(GL_OFFSET(_gloffset_TexCoord2fv))
ALIGNTEXT16
-GLOBL_FN(GL_PREFIX(GetMaterialiv))
-GL_PREFIX(GetMaterialiv):
+GLOBL_FN(GL_PREFIX(TexCoord2i))
+GL_PREFIX(TexCoord2i):
MOV_L(GLNAME(_glapi_Dispatch), EAX)
TEST_L(EAX, EAX)
- JZ(GLNAME(_glapi_fallback_GetMaterialiv))
- JMP(GL_OFFSET(_gloffset_GetMaterialiv))
+ JZ(GLNAME(_glapi_fallback_TexCoord2i))
+ JMP(GL_OFFSET(_gloffset_TexCoord2i))
ALIGNTEXT16
-GLOBL_FN(GL_PREFIX(GetPixelMapfv))
-GL_PREFIX(GetPixelMapfv):
+GLOBL_FN(GL_PREFIX(TexCoord2iv))
+GL_PREFIX(TexCoord2iv):
MOV_L(GLNAME(_glapi_Dispatch), EAX)
TEST_L(EAX, EAX)
- JZ(GLNAME(_glapi_fallback_GetPixelMapfv))
- JMP(GL_OFFSET(_gloffset_GetPixelMapfv))
+ JZ(GLNAME(_glapi_fallback_TexCoord2iv))
+ JMP(GL_OFFSET(_gloffset_TexCoord2iv))
ALIGNTEXT16
-GLOBL_FN(GL_PREFIX(GetPixelMapuiv))
-GL_PREFIX(GetPixelMapuiv):
+GLOBL_FN(GL_PREFIX(TexCoord2s))
+GL_PREFIX(TexCoord2s):
MOV_L(GLNAME(_glapi_Dispatch), EAX)
TEST_L(EAX, EAX)
- JZ(GLNAME(_glapi_fallback_GetPixelMapuiv))
- JMP(GL_OFFSET(_gloffset_GetPixelMapuiv))
+ JZ(GLNAME(_glapi_fallback_TexCoord2s))
+ JMP(GL_OFFSET(_gloffset_TexCoord2s))
ALIGNTEXT16
-GLOBL_FN(GL_PREFIX(GetPixelMapusv))
-GL_PREFIX(GetPixelMapusv):
+GLOBL_FN(GL_PREFIX(TexCoord2sv))
+GL_PREFIX(TexCoord2sv):
MOV_L(GLNAME(_glapi_Dispatch), EAX)
TEST_L(EAX, EAX)
- JZ(GLNAME(_glapi_fallback_GetPixelMapusv))
- JMP(GL_OFFSET(_gloffset_GetPixelMapusv))
+ JZ(GLNAME(_glapi_fallback_TexCoord2sv))
+ JMP(GL_OFFSET(_gloffset_TexCoord2sv))
ALIGNTEXT16
-GLOBL_FN(GL_PREFIX(GetPolygonStipple))
-GL_PREFIX(GetPolygonStipple):
+GLOBL_FN(GL_PREFIX(TexCoord3d))
+GL_PREFIX(TexCoord3d):
MOV_L(GLNAME(_glapi_Dispatch), EAX)
TEST_L(EAX, EAX)
- JZ(GLNAME(_glapi_fallback_GetPolygonStipple))
- JMP(GL_OFFSET(_gloffset_GetPolygonStipple))
+ JZ(GLNAME(_glapi_fallback_TexCoord3d))
+ JMP(GL_OFFSET(_gloffset_TexCoord3d))
ALIGNTEXT16
-GLOBL_FN(GL_PREFIX(GetString))
-GL_PREFIX(GetString):
+GLOBL_FN(GL_PREFIX(TexCoord3dv))
+GL_PREFIX(TexCoord3dv):
MOV_L(GLNAME(_glapi_Dispatch), EAX)
TEST_L(EAX, EAX)
- JZ(GLNAME(_glapi_fallback_GetString))
- JMP(GL_OFFSET(_gloffset_GetString))
+ JZ(GLNAME(_glapi_fallback_TexCoord3dv))
+ JMP(GL_OFFSET(_gloffset_TexCoord3dv))
ALIGNTEXT16
-GLOBL_FN(GL_PREFIX(GetTexEnvfv))
-GL_PREFIX(GetTexEnvfv):
+GLOBL_FN(GL_PREFIX(TexCoord3f))
+GL_PREFIX(TexCoord3f):
MOV_L(GLNAME(_glapi_Dispatch), EAX)
TEST_L(EAX, EAX)
- JZ(GLNAME(_glapi_fallback_GetTexEnvfv))
- JMP(GL_OFFSET(_gloffset_GetTexEnvfv))
+ JZ(GLNAME(_glapi_fallback_TexCoord3f))
+ JMP(GL_OFFSET(_gloffset_TexCoord3f))
ALIGNTEXT16
-GLOBL_FN(GL_PREFIX(GetTexEnviv))
-GL_PREFIX(GetTexEnviv):
+GLOBL_FN(GL_PREFIX(TexCoord3fv))
+GL_PREFIX(TexCoord3fv):
MOV_L(GLNAME(_glapi_Dispatch), EAX)
TEST_L(EAX, EAX)
- JZ(GLNAME(_glapi_fallback_GetTexEnviv))
- JMP(GL_OFFSET(_gloffset_GetTexEnviv))
+ JZ(GLNAME(_glapi_fallback_TexCoord3fv))
+ JMP(GL_OFFSET(_gloffset_TexCoord3fv))
ALIGNTEXT16
-GLOBL_FN(GL_PREFIX(GetTexGeniv))
-GL_PREFIX(GetTexGeniv):
+GLOBL_FN(GL_PREFIX(TexCoord3i))
+GL_PREFIX(TexCoord3i):
MOV_L(GLNAME(_glapi_Dispatch), EAX)
TEST_L(EAX, EAX)
- JZ(GLNAME(_glapi_fallback_GetTexGeniv))
- JMP(GL_OFFSET(_gloffset_GetTexGeniv))
+ JZ(GLNAME(_glapi_fallback_TexCoord3i))
+ JMP(GL_OFFSET(_gloffset_TexCoord3i))
ALIGNTEXT16
-GLOBL_FN(GL_PREFIX(GetTexGendv))
-GL_PREFIX(GetTexGendv):
+GLOBL_FN(GL_PREFIX(TexCoord3iv))
+GL_PREFIX(TexCoord3iv):
MOV_L(GLNAME(_glapi_Dispatch), EAX)
TEST_L(EAX, EAX)
- JZ(GLNAME(_glapi_fallback_GetTexGendv))
- JMP(GL_OFFSET(_gloffset_GetTexGendv))
+ JZ(GLNAME(_glapi_fallback_TexCoord3iv))
+ JMP(GL_OFFSET(_gloffset_TexCoord3iv))
ALIGNTEXT16
-GLOBL_FN(GL_PREFIX(GetTexGenfv))
-GL_PREFIX(GetTexGenfv):
+GLOBL_FN(GL_PREFIX(TexCoord3s))
+GL_PREFIX(TexCoord3s):
MOV_L(GLNAME(_glapi_Dispatch), EAX)
TEST_L(EAX, EAX)
- JZ(GLNAME(_glapi_fallback_GetTexGenfv))
- JMP(GL_OFFSET(_gloffset_GetTexGenfv))
+ JZ(GLNAME(_glapi_fallback_TexCoord3s))
+ JMP(GL_OFFSET(_gloffset_TexCoord3s))
ALIGNTEXT16
-GLOBL_FN(GL_PREFIX(GetTexImage))
-GL_PREFIX(GetTexImage):
+GLOBL_FN(GL_PREFIX(TexCoord3sv))
+GL_PREFIX(TexCoord3sv):
MOV_L(GLNAME(_glapi_Dispatch), EAX)
TEST_L(EAX, EAX)
- JZ(GLNAME(_glapi_fallback_GetTexImage))
- JMP(GL_OFFSET(_gloffset_GetTexImage))
+ JZ(GLNAME(_glapi_fallback_TexCoord3sv))
+ JMP(GL_OFFSET(_gloffset_TexCoord3sv))
ALIGNTEXT16
-GLOBL_FN(GL_PREFIX(GetTexLevelParameterfv))
-GL_PREFIX(GetTexLevelParameterfv):
+GLOBL_FN(GL_PREFIX(TexCoord4d))
+GL_PREFIX(TexCoord4d):
MOV_L(GLNAME(_glapi_Dispatch), EAX)
TEST_L(EAX, EAX)
- JZ(GLNAME(_glapi_fallback_GetTexLevelParameterfv))
- JMP(GL_OFFSET(_gloffset_GetTexLevelParameterfv))
+ JZ(GLNAME(_glapi_fallback_TexCoord4d))
+ JMP(GL_OFFSET(_gloffset_TexCoord4d))
ALIGNTEXT16
-GLOBL_FN(GL_PREFIX(GetTexLevelParameteriv))
-GL_PREFIX(GetTexLevelParameteriv):
+GLOBL_FN(GL_PREFIX(TexCoord4dv))
+GL_PREFIX(TexCoord4dv):
MOV_L(GLNAME(_glapi_Dispatch), EAX)
TEST_L(EAX, EAX)
- JZ(GLNAME(_glapi_fallback_GetTexLevelParameteriv))
- JMP(GL_OFFSET(_gloffset_GetTexLevelParameteriv))
+ JZ(GLNAME(_glapi_fallback_TexCoord4dv))
+ JMP(GL_OFFSET(_gloffset_TexCoord4dv))
ALIGNTEXT16
-GLOBL_FN(GL_PREFIX(GetTexParameterfv))
-GL_PREFIX(GetTexParameterfv):
+GLOBL_FN(GL_PREFIX(TexCoord4f))
+GL_PREFIX(TexCoord4f):
MOV_L(GLNAME(_glapi_Dispatch), EAX)
TEST_L(EAX, EAX)
- JZ(GLNAME(_glapi_fallback_GetTexParameterfv))
- JMP(GL_OFFSET(_gloffset_GetTexParameterfv))
+ JZ(GLNAME(_glapi_fallback_TexCoord4f))
+ JMP(GL_OFFSET(_gloffset_TexCoord4f))
ALIGNTEXT16
-GLOBL_FN(GL_PREFIX(GetTexParameteriv))
-GL_PREFIX(GetTexParameteriv):
+GLOBL_FN(GL_PREFIX(TexCoord4fv))
+GL_PREFIX(TexCoord4fv):
MOV_L(GLNAME(_glapi_Dispatch), EAX)
TEST_L(EAX, EAX)
- JZ(GLNAME(_glapi_fallback_GetTexParameteriv))
- JMP(GL_OFFSET(_gloffset_GetTexParameteriv))
+ JZ(GLNAME(_glapi_fallback_TexCoord4fv))
+ JMP(GL_OFFSET(_gloffset_TexCoord4fv))
ALIGNTEXT16
-GLOBL_FN(GL_PREFIX(Hint))
-GL_PREFIX(Hint):
+GLOBL_FN(GL_PREFIX(TexCoord4i))
+GL_PREFIX(TexCoord4i):
MOV_L(GLNAME(_glapi_Dispatch), EAX)
TEST_L(EAX, EAX)
- JZ(GLNAME(_glapi_fallback_Hint))
- JMP(GL_OFFSET(_gloffset_Hint))
+ JZ(GLNAME(_glapi_fallback_TexCoord4i))
+ JMP(GL_OFFSET(_gloffset_TexCoord4i))
ALIGNTEXT16
-GLOBL_FN(GL_PREFIX(Indexd))
-GL_PREFIX(Indexd):
+GLOBL_FN(GL_PREFIX(TexCoord4iv))
+GL_PREFIX(TexCoord4iv):
MOV_L(GLNAME(_glapi_Dispatch), EAX)
TEST_L(EAX, EAX)
- JZ(GLNAME(_glapi_fallback_Indexd))
- JMP(GL_OFFSET(_gloffset_Indexd))
+ JZ(GLNAME(_glapi_fallback_TexCoord4iv))
+ JMP(GL_OFFSET(_gloffset_TexCoord4iv))
ALIGNTEXT16
-GLOBL_FN(GL_PREFIX(Indexdv))
-GL_PREFIX(Indexdv):
+GLOBL_FN(GL_PREFIX(TexCoord4s))
+GL_PREFIX(TexCoord4s):
MOV_L(GLNAME(_glapi_Dispatch), EAX)
TEST_L(EAX, EAX)
- JZ(GLNAME(_glapi_fallback_Indexdv))
- JMP(GL_OFFSET(_gloffset_Indexdv))
+ JZ(GLNAME(_glapi_fallback_TexCoord4s))
+ JMP(GL_OFFSET(_gloffset_TexCoord4s))
ALIGNTEXT16
-GLOBL_FN(GL_PREFIX(Indexf))
-GL_PREFIX(Indexf):
+GLOBL_FN(GL_PREFIX(TexCoord4sv))
+GL_PREFIX(TexCoord4sv):
MOV_L(GLNAME(_glapi_Dispatch), EAX)
TEST_L(EAX, EAX)
- JZ(GLNAME(_glapi_fallback_Indexf))
- JMP(GL_OFFSET(_gloffset_Indexf))
+ JZ(GLNAME(_glapi_fallback_TexCoord4sv))
+ JMP(GL_OFFSET(_gloffset_TexCoord4sv))
ALIGNTEXT16
-GLOBL_FN(GL_PREFIX(Indexfv))
-GL_PREFIX(Indexfv):
+GLOBL_FN(GL_PREFIX(Vertex2d))
+GL_PREFIX(Vertex2d):
MOV_L(GLNAME(_glapi_Dispatch), EAX)
TEST_L(EAX, EAX)
- JZ(GLNAME(_glapi_fallback_Indexfv))
- JMP(GL_OFFSET(_gloffset_Indexfv))
+ JZ(GLNAME(_glapi_fallback_Vertex2d))
+ JMP(GL_OFFSET(_gloffset_Vertex2d))
ALIGNTEXT16
-GLOBL_FN(GL_PREFIX(Indexi))
-GL_PREFIX(Indexi):
+GLOBL_FN(GL_PREFIX(Vertex2dv))
+GL_PREFIX(Vertex2dv):
MOV_L(GLNAME(_glapi_Dispatch), EAX)
TEST_L(EAX, EAX)
- JZ(GLNAME(_glapi_fallback_Indexi))
- JMP(GL_OFFSET(_gloffset_Indexi))
+ JZ(GLNAME(_glapi_fallback_Vertex2dv))
+ JMP(GL_OFFSET(_gloffset_Vertex2dv))
ALIGNTEXT16
-GLOBL_FN(GL_PREFIX(Indexiv))
-GL_PREFIX(Indexiv):
+GLOBL_FN(GL_PREFIX(Vertex2f))
+GL_PREFIX(Vertex2f):
MOV_L(GLNAME(_glapi_Dispatch), EAX)
TEST_L(EAX, EAX)
- JZ(GLNAME(_glapi_fallback_Indexiv))
- JMP(GL_OFFSET(_gloffset_Indexiv))
+ JZ(GLNAME(_glapi_fallback_Vertex2f))
+ JMP(GL_OFFSET(_gloffset_Vertex2f))
ALIGNTEXT16
-GLOBL_FN(GL_PREFIX(Indexs))
-GL_PREFIX(Indexs):
+GLOBL_FN(GL_PREFIX(Vertex2fv))
+GL_PREFIX(Vertex2fv):
MOV_L(GLNAME(_glapi_Dispatch), EAX)
TEST_L(EAX, EAX)
- JZ(GLNAME(_glapi_fallback_Indexs))
- JMP(GL_OFFSET(_gloffset_Indexs))
+ JZ(GLNAME(_glapi_fallback_Vertex2fv))
+ JMP(GL_OFFSET(_gloffset_Vertex2fv))
ALIGNTEXT16
-GLOBL_FN(GL_PREFIX(Indexsv))
-GL_PREFIX(Indexsv):
+GLOBL_FN(GL_PREFIX(Vertex2i))
+GL_PREFIX(Vertex2i):
MOV_L(GLNAME(_glapi_Dispatch), EAX)
TEST_L(EAX, EAX)
- JZ(GLNAME(_glapi_fallback_Indexsv))
- JMP(GL_OFFSET(_gloffset_Indexsv))
+ JZ(GLNAME(_glapi_fallback_Vertex2i))
+ JMP(GL_OFFSET(_gloffset_Vertex2i))
ALIGNTEXT16
-GLOBL_FN(GL_PREFIX(IndexMask))
-GL_PREFIX(IndexMask):
+GLOBL_FN(GL_PREFIX(Vertex2iv))
+GL_PREFIX(Vertex2iv):
MOV_L(GLNAME(_glapi_Dispatch), EAX)
TEST_L(EAX, EAX)
- JZ(GLNAME(_glapi_fallback_IndexMask))
- JMP(GL_OFFSET(_gloffset_IndexMask))
+ JZ(GLNAME(_glapi_fallback_Vertex2iv))
+ JMP(GL_OFFSET(_gloffset_Vertex2iv))
ALIGNTEXT16
-GLOBL_FN(GL_PREFIX(InitNames))
-GL_PREFIX(InitNames):
+GLOBL_FN(GL_PREFIX(Vertex2s))
+GL_PREFIX(Vertex2s):
MOV_L(GLNAME(_glapi_Dispatch), EAX)
TEST_L(EAX, EAX)
- JZ(GLNAME(_glapi_fallback_InitNames))
- JMP(GL_OFFSET(_gloffset_InitNames))
+ JZ(GLNAME(_glapi_fallback_Vertex2s))
+ JMP(GL_OFFSET(_gloffset_Vertex2s))
ALIGNTEXT16
-GLOBL_FN(GL_PREFIX(IsEnabled))
-GL_PREFIX(IsEnabled):
+GLOBL_FN(GL_PREFIX(Vertex2sv))
+GL_PREFIX(Vertex2sv):
MOV_L(GLNAME(_glapi_Dispatch), EAX)
TEST_L(EAX, EAX)
- JZ(GLNAME(_glapi_fallback_IsEnabled))
- JMP(GL_OFFSET(_gloffset_IsEnabled))
+ JZ(GLNAME(_glapi_fallback_Vertex2sv))
+ JMP(GL_OFFSET(_gloffset_Vertex2sv))
ALIGNTEXT16
-GLOBL_FN(GL_PREFIX(IsList))
-GL_PREFIX(IsList):
+GLOBL_FN(GL_PREFIX(Vertex3d))
+GL_PREFIX(Vertex3d):
MOV_L(GLNAME(_glapi_Dispatch), EAX)
TEST_L(EAX, EAX)
- JZ(GLNAME(_glapi_fallback_IsList))
- JMP(GL_OFFSET(_gloffset_IsList))
+ JZ(GLNAME(_glapi_fallback_Vertex3d))
+ JMP(GL_OFFSET(_gloffset_Vertex3d))
ALIGNTEXT16
-GLOBL_FN(GL_PREFIX(Lightf))
-GL_PREFIX(Lightf):
+GLOBL_FN(GL_PREFIX(Vertex3dv))
+GL_PREFIX(Vertex3dv):
MOV_L(GLNAME(_glapi_Dispatch), EAX)
TEST_L(EAX, EAX)
- JZ(GLNAME(_glapi_fallback_Lightf))
- JMP(GL_OFFSET(_gloffset_Lightf))
+ JZ(GLNAME(_glapi_fallback_Vertex3dv))
+ JMP(GL_OFFSET(_gloffset_Vertex3dv))
ALIGNTEXT16
-GLOBL_FN(GL_PREFIX(Lighti))
-GL_PREFIX(Lighti):
+GLOBL_FN(GL_PREFIX(Vertex3f))
+GL_PREFIX(Vertex3f):
MOV_L(GLNAME(_glapi_Dispatch), EAX)
TEST_L(EAX, EAX)
- JZ(GLNAME(_glapi_fallback_Lighti))
- JMP(GL_OFFSET(_gloffset_Lighti))
+ JZ(GLNAME(_glapi_fallback_Vertex3f))
+ JMP(GL_OFFSET(_gloffset_Vertex3f))
ALIGNTEXT16
-GLOBL_FN(GL_PREFIX(Lightfv))
-GL_PREFIX(Lightfv):
+GLOBL_FN(GL_PREFIX(Vertex3fv))
+GL_PREFIX(Vertex3fv):
MOV_L(GLNAME(_glapi_Dispatch), EAX)
TEST_L(EAX, EAX)
- JZ(GLNAME(_glapi_fallback_Lightfv))
- JMP(GL_OFFSET(_gloffset_Lightfv))
+ JZ(GLNAME(_glapi_fallback_Vertex3fv))
+ JMP(GL_OFFSET(_gloffset_Vertex3fv))
ALIGNTEXT16
-GLOBL_FN(GL_PREFIX(Lightiv))
-GL_PREFIX(Lightiv):
+GLOBL_FN(GL_PREFIX(Vertex3i))
+GL_PREFIX(Vertex3i):
MOV_L(GLNAME(_glapi_Dispatch), EAX)
TEST_L(EAX, EAX)
- JZ(GLNAME(_glapi_fallback_Lightiv))
- JMP(GL_OFFSET(_gloffset_Lightiv))
+ JZ(GLNAME(_glapi_fallback_Vertex3i))
+ JMP(GL_OFFSET(_gloffset_Vertex3i))
ALIGNTEXT16
-GLOBL_FN(GL_PREFIX(LightModelf))
-GL_PREFIX(LightModelf):
+GLOBL_FN(GL_PREFIX(Vertex3iv))
+GL_PREFIX(Vertex3iv):
MOV_L(GLNAME(_glapi_Dispatch), EAX)
TEST_L(EAX, EAX)
- JZ(GLNAME(_glapi_fallback_LightModelf))
- JMP(GL_OFFSET(_gloffset_LightModelf))
+ JZ(GLNAME(_glapi_fallback_Vertex3iv))
+ JMP(GL_OFFSET(_gloffset_Vertex3iv))
ALIGNTEXT16
-GLOBL_FN(GL_PREFIX(LightModeli))
-GL_PREFIX(LightModeli):
+GLOBL_FN(GL_PREFIX(Vertex3s))
+GL_PREFIX(Vertex3s):
MOV_L(GLNAME(_glapi_Dispatch), EAX)
TEST_L(EAX, EAX)
- JZ(GLNAME(_glapi_fallback_LightModeli))
- JMP(GL_OFFSET(_gloffset_LightModeli))
+ JZ(GLNAME(_glapi_fallback_Vertex3s))
+ JMP(GL_OFFSET(_gloffset_Vertex3s))
ALIGNTEXT16
-GLOBL_FN(GL_PREFIX(LightModelfv))
-GL_PREFIX(LightModelfv):
+GLOBL_FN(GL_PREFIX(Vertex3sv))
+GL_PREFIX(Vertex3sv):
MOV_L(GLNAME(_glapi_Dispatch), EAX)
TEST_L(EAX, EAX)
- JZ(GLNAME(_glapi_fallback_LightModelfv))
- JMP(GL_OFFSET(_gloffset_LightModelfv))
+ JZ(GLNAME(_glapi_fallback_Vertex3sv))
+ JMP(GL_OFFSET(_gloffset_Vertex3sv))
ALIGNTEXT16
-GLOBL_FN(GL_PREFIX(LightModeliv))
-GL_PREFIX(LightModeliv):
+GLOBL_FN(GL_PREFIX(Vertex4d))
+GL_PREFIX(Vertex4d):
MOV_L(GLNAME(_glapi_Dispatch), EAX)
TEST_L(EAX, EAX)
- JZ(GLNAME(_glapi_fallback_LightModeliv))
- JMP(GL_OFFSET(_gloffset_LightModeliv))
+ JZ(GLNAME(_glapi_fallback_Vertex4d))
+ JMP(GL_OFFSET(_gloffset_Vertex4d))
ALIGNTEXT16
-GLOBL_FN(GL_PREFIX(LineWidth))
-GL_PREFIX(LineWidth):
+GLOBL_FN(GL_PREFIX(Vertex4dv))
+GL_PREFIX(Vertex4dv):
MOV_L(GLNAME(_glapi_Dispatch), EAX)
TEST_L(EAX, EAX)
- JZ(GLNAME(_glapi_fallback_LineWidth))
- JMP(GL_OFFSET(_gloffset_LineWidth))
+ JZ(GLNAME(_glapi_fallback_Vertex4dv))
+ JMP(GL_OFFSET(_gloffset_Vertex4dv))
ALIGNTEXT16
-GLOBL_FN(GL_PREFIX(LineStipple))
-GL_PREFIX(LineStipple):
+GLOBL_FN(GL_PREFIX(Vertex4f))
+GL_PREFIX(Vertex4f):
MOV_L(GLNAME(_glapi_Dispatch), EAX)
TEST_L(EAX, EAX)
- JZ(GLNAME(_glapi_fallback_LineStipple))
- JMP(GL_OFFSET(_gloffset_LineStipple))
+ JZ(GLNAME(_glapi_fallback_Vertex4f))
+ JMP(GL_OFFSET(_gloffset_Vertex4f))
ALIGNTEXT16
-GLOBL_FN(GL_PREFIX(ListBase))
-GL_PREFIX(ListBase):
+GLOBL_FN(GL_PREFIX(Vertex4fv))
+GL_PREFIX(Vertex4fv):
MOV_L(GLNAME(_glapi_Dispatch), EAX)
TEST_L(EAX, EAX)
- JZ(GLNAME(_glapi_fallback_ListBase))
- JMP(GL_OFFSET(_gloffset_ListBase))
+ JZ(GLNAME(_glapi_fallback_Vertex4fv))
+ JMP(GL_OFFSET(_gloffset_Vertex4fv))
ALIGNTEXT16
-GLOBL_FN(GL_PREFIX(LoadIdentity))
-GL_PREFIX(LoadIdentity):
+GLOBL_FN(GL_PREFIX(Vertex4i))
+GL_PREFIX(Vertex4i):
MOV_L(GLNAME(_glapi_Dispatch), EAX)
TEST_L(EAX, EAX)
- JZ(GLNAME(_glapi_fallback_LoadIdentity))
- JMP(GL_OFFSET(_gloffset_LoadIdentity))
+ JZ(GLNAME(_glapi_fallback_Vertex4i))
+ JMP(GL_OFFSET(_gloffset_Vertex4i))
ALIGNTEXT16
-GLOBL_FN(GL_PREFIX(LoadMatrixd))
-GL_PREFIX(LoadMatrixd):
+GLOBL_FN(GL_PREFIX(Vertex4iv))
+GL_PREFIX(Vertex4iv):
MOV_L(GLNAME(_glapi_Dispatch), EAX)
TEST_L(EAX, EAX)
- JZ(GLNAME(_glapi_fallback_LoadMatrixd))
- JMP(GL_OFFSET(_gloffset_LoadMatrixd))
+ JZ(GLNAME(_glapi_fallback_Vertex4iv))
+ JMP(GL_OFFSET(_gloffset_Vertex4iv))
ALIGNTEXT16
-GLOBL_FN(GL_PREFIX(LoadMatrixf))
-GL_PREFIX(LoadMatrixf):
+GLOBL_FN(GL_PREFIX(Vertex4s))
+GL_PREFIX(Vertex4s):
MOV_L(GLNAME(_glapi_Dispatch), EAX)
TEST_L(EAX, EAX)
- JZ(GLNAME(_glapi_fallback_LoadMatrixf))
- JMP(GL_OFFSET(_gloffset_LoadMatrixf))
+ JZ(GLNAME(_glapi_fallback_Vertex4s))
+ JMP(GL_OFFSET(_gloffset_Vertex4s))
ALIGNTEXT16
-GLOBL_FN(GL_PREFIX(LoadName))
-GL_PREFIX(LoadName):
+GLOBL_FN(GL_PREFIX(Vertex4sv))
+GL_PREFIX(Vertex4sv):
MOV_L(GLNAME(_glapi_Dispatch), EAX)
TEST_L(EAX, EAX)
- JZ(GLNAME(_glapi_fallback_LoadName))
- JMP(GL_OFFSET(_gloffset_LoadName))
+ JZ(GLNAME(_glapi_fallback_Vertex4sv))
+ JMP(GL_OFFSET(_gloffset_Vertex4sv))
ALIGNTEXT16
-GLOBL_FN(GL_PREFIX(LogicOp))
-GL_PREFIX(LogicOp):
+GLOBL_FN(GL_PREFIX(ClipPlane))
+GL_PREFIX(ClipPlane):
MOV_L(GLNAME(_glapi_Dispatch), EAX)
TEST_L(EAX, EAX)
- JZ(GLNAME(_glapi_fallback_LogicOp))
- JMP(GL_OFFSET(_gloffset_LogicOp))
+ JZ(GLNAME(_glapi_fallback_ClipPlane))
+ JMP(GL_OFFSET(_gloffset_ClipPlane))
ALIGNTEXT16
-GLOBL_FN(GL_PREFIX(Map1d))
-GL_PREFIX(Map1d):
+GLOBL_FN(GL_PREFIX(ColorMaterial))
+GL_PREFIX(ColorMaterial):
MOV_L(GLNAME(_glapi_Dispatch), EAX)
TEST_L(EAX, EAX)
- JZ(GLNAME(_glapi_fallback_Map1d))
- JMP(GL_OFFSET(_gloffset_Map1d))
+ JZ(GLNAME(_glapi_fallback_ColorMaterial))
+ JMP(GL_OFFSET(_gloffset_ColorMaterial))
ALIGNTEXT16
-GLOBL_FN(GL_PREFIX(Map1f))
-GL_PREFIX(Map1f):
+GLOBL_FN(GL_PREFIX(CullFace))
+GL_PREFIX(CullFace):
MOV_L(GLNAME(_glapi_Dispatch), EAX)
TEST_L(EAX, EAX)
- JZ(GLNAME(_glapi_fallback_Map1f))
- JMP(GL_OFFSET(_gloffset_Map1f))
+ JZ(GLNAME(_glapi_fallback_CullFace))
+ JMP(GL_OFFSET(_gloffset_CullFace))
ALIGNTEXT16
-GLOBL_FN(GL_PREFIX(Map2d))
-GL_PREFIX(Map2d):
+GLOBL_FN(GL_PREFIX(Fogf))
+GL_PREFIX(Fogf):
MOV_L(GLNAME(_glapi_Dispatch), EAX)
TEST_L(EAX, EAX)
- JZ(GLNAME(_glapi_fallback_Map2d))
- JMP(GL_OFFSET(_gloffset_Map2d))
+ JZ(GLNAME(_glapi_fallback_Fogf))
+ JMP(GL_OFFSET(_gloffset_Fogf))
ALIGNTEXT16
-GLOBL_FN(GL_PREFIX(Map2f))
-GL_PREFIX(Map2f):
+GLOBL_FN(GL_PREFIX(Fogfv))
+GL_PREFIX(Fogfv):
MOV_L(GLNAME(_glapi_Dispatch), EAX)
TEST_L(EAX, EAX)
- JZ(GLNAME(_glapi_fallback_Map2f))
- JMP(GL_OFFSET(_gloffset_Map2f))
+ JZ(GLNAME(_glapi_fallback_Fogfv))
+ JMP(GL_OFFSET(_gloffset_Fogfv))
ALIGNTEXT16
-GLOBL_FN(GL_PREFIX(MapGrid1d))
-GL_PREFIX(MapGrid1d):
+GLOBL_FN(GL_PREFIX(Fogi))
+GL_PREFIX(Fogi):
MOV_L(GLNAME(_glapi_Dispatch), EAX)
TEST_L(EAX, EAX)
- JZ(GLNAME(_glapi_fallback_MapGrid1d))
- JMP(GL_OFFSET(_gloffset_MapGrid1d))
+ JZ(GLNAME(_glapi_fallback_Fogi))
+ JMP(GL_OFFSET(_gloffset_Fogi))
ALIGNTEXT16
-GLOBL_FN(GL_PREFIX(MapGrid1f))
-GL_PREFIX(MapGrid1f):
+GLOBL_FN(GL_PREFIX(Fogiv))
+GL_PREFIX(Fogiv):
MOV_L(GLNAME(_glapi_Dispatch), EAX)
TEST_L(EAX, EAX)
- JZ(GLNAME(_glapi_fallback_MapGrid1f))
- JMP(GL_OFFSET(_gloffset_MapGrid1f))
+ JZ(GLNAME(_glapi_fallback_Fogiv))
+ JMP(GL_OFFSET(_gloffset_Fogiv))
ALIGNTEXT16
-GLOBL_FN(GL_PREFIX(MapGrid2d))
-GL_PREFIX(MapGrid2d):
+GLOBL_FN(GL_PREFIX(FrontFace))
+GL_PREFIX(FrontFace):
MOV_L(GLNAME(_glapi_Dispatch), EAX)
TEST_L(EAX, EAX)
- JZ(GLNAME(_glapi_fallback_MapGrid2d))
- JMP(GL_OFFSET(_gloffset_MapGrid2d))
+ JZ(GLNAME(_glapi_fallback_FrontFace))
+ JMP(GL_OFFSET(_gloffset_FrontFace))
ALIGNTEXT16
-GLOBL_FN(GL_PREFIX(MapGrid2f))
-GL_PREFIX(MapGrid2f):
+GLOBL_FN(GL_PREFIX(Hint))
+GL_PREFIX(Hint):
MOV_L(GLNAME(_glapi_Dispatch), EAX)
TEST_L(EAX, EAX)
- JZ(GLNAME(_glapi_fallback_MapGrid2f))
- JMP(GL_OFFSET(_gloffset_MapGrid2f))
+ JZ(GLNAME(_glapi_fallback_Hint))
+ JMP(GL_OFFSET(_gloffset_Hint))
ALIGNTEXT16
-GLOBL_FN(GL_PREFIX(Materialf))
-GL_PREFIX(Materialf):
+GLOBL_FN(GL_PREFIX(Lightf))
+GL_PREFIX(Lightf):
MOV_L(GLNAME(_glapi_Dispatch), EAX)
TEST_L(EAX, EAX)
- JZ(GLNAME(_glapi_fallback_Materialf))
- JMP(GL_OFFSET(_gloffset_Materialf))
+ JZ(GLNAME(_glapi_fallback_Lightf))
+ JMP(GL_OFFSET(_gloffset_Lightf))
ALIGNTEXT16
-GLOBL_FN(GL_PREFIX(Materiali))
-GL_PREFIX(Materiali):
+GLOBL_FN(GL_PREFIX(Lightfv))
+GL_PREFIX(Lightfv):
MOV_L(GLNAME(_glapi_Dispatch), EAX)
TEST_L(EAX, EAX)
- JZ(GLNAME(_glapi_fallback_Materiali))
- JMP(GL_OFFSET(_gloffset_Materiali))
+ JZ(GLNAME(_glapi_fallback_Lightfv))
+ JMP(GL_OFFSET(_gloffset_Lightfv))
ALIGNTEXT16
-GLOBL_FN(GL_PREFIX(Materialfv))
-GL_PREFIX(Materialfv):
+GLOBL_FN(GL_PREFIX(Lighti))
+GL_PREFIX(Lighti):
MOV_L(GLNAME(_glapi_Dispatch), EAX)
TEST_L(EAX, EAX)
- JZ(GLNAME(_glapi_fallback_Materialfv))
- JMP(GL_OFFSET(_gloffset_Materialfv))
+ JZ(GLNAME(_glapi_fallback_Lighti))
+ JMP(GL_OFFSET(_gloffset_Lighti))
ALIGNTEXT16
-GLOBL_FN(GL_PREFIX(Materialiv))
-GL_PREFIX(Materialiv):
+GLOBL_FN(GL_PREFIX(Lightiv))
+GL_PREFIX(Lightiv):
MOV_L(GLNAME(_glapi_Dispatch), EAX)
TEST_L(EAX, EAX)
- JZ(GLNAME(_glapi_fallback_Materialiv))
- JMP(GL_OFFSET(_gloffset_Materialiv))
+ JZ(GLNAME(_glapi_fallback_Lightiv))
+ JMP(GL_OFFSET(_gloffset_Lightiv))
ALIGNTEXT16
-GLOBL_FN(GL_PREFIX(MatrixMode))
-GL_PREFIX(MatrixMode):
+GLOBL_FN(GL_PREFIX(LightModelf))
+GL_PREFIX(LightModelf):
MOV_L(GLNAME(_glapi_Dispatch), EAX)
TEST_L(EAX, EAX)
- JZ(GLNAME(_glapi_fallback_MatrixMode))
- JMP(GL_OFFSET(_gloffset_MatrixMode))
+ JZ(GLNAME(_glapi_fallback_LightModelf))
+ JMP(GL_OFFSET(_gloffset_LightModelf))
ALIGNTEXT16
-GLOBL_FN(GL_PREFIX(MultMatrixd))
-GL_PREFIX(MultMatrixd):
+GLOBL_FN(GL_PREFIX(LightModelfv))
+GL_PREFIX(LightModelfv):
MOV_L(GLNAME(_glapi_Dispatch), EAX)
TEST_L(EAX, EAX)
- JZ(GLNAME(_glapi_fallback_MultMatrixd))
- JMP(GL_OFFSET(_gloffset_MultMatrixd))
+ JZ(GLNAME(_glapi_fallback_LightModelfv))
+ JMP(GL_OFFSET(_gloffset_LightModelfv))
ALIGNTEXT16
-GLOBL_FN(GL_PREFIX(MultMatrixf))
-GL_PREFIX(MultMatrixf):
+GLOBL_FN(GL_PREFIX(LightModeli))
+GL_PREFIX(LightModeli):
MOV_L(GLNAME(_glapi_Dispatch), EAX)
TEST_L(EAX, EAX)
- JZ(GLNAME(_glapi_fallback_MultMatrixf))
- JMP(GL_OFFSET(_gloffset_MultMatrixf))
+ JZ(GLNAME(_glapi_fallback_LightModeli))
+ JMP(GL_OFFSET(_gloffset_LightModeli))
ALIGNTEXT16
-GLOBL_FN(GL_PREFIX(NewList))
-GL_PREFIX(NewList):
+GLOBL_FN(GL_PREFIX(LightModeliv))
+GL_PREFIX(LightModeliv):
MOV_L(GLNAME(_glapi_Dispatch), EAX)
TEST_L(EAX, EAX)
- JZ(GLNAME(_glapi_fallback_NewList))
- JMP(GL_OFFSET(_gloffset_NewList))
+ JZ(GLNAME(_glapi_fallback_LightModeliv))
+ JMP(GL_OFFSET(_gloffset_LightModeliv))
ALIGNTEXT16
-GLOBL_FN(GL_PREFIX(Normal3b))
-GL_PREFIX(Normal3b):
+GLOBL_FN(GL_PREFIX(LineStipple))
+GL_PREFIX(LineStipple):
MOV_L(GLNAME(_glapi_Dispatch), EAX)
TEST_L(EAX, EAX)
- JZ(GLNAME(_glapi_fallback_Normal3b))
- JMP(GL_OFFSET(_gloffset_Normal3b))
+ JZ(GLNAME(_glapi_fallback_LineStipple))
+ JMP(GL_OFFSET(_gloffset_LineStipple))
ALIGNTEXT16
-GLOBL_FN(GL_PREFIX(Normal3bv))
-GL_PREFIX(Normal3bv):
+GLOBL_FN(GL_PREFIX(LineWidth))
+GL_PREFIX(LineWidth):
MOV_L(GLNAME(_glapi_Dispatch), EAX)
TEST_L(EAX, EAX)
- JZ(GLNAME(_glapi_fallback_Normal3bv))
- JMP(GL_OFFSET(_gloffset_Normal3bv))
+ JZ(GLNAME(_glapi_fallback_LineWidth))
+ JMP(GL_OFFSET(_gloffset_LineWidth))
ALIGNTEXT16
-GLOBL_FN(GL_PREFIX(Normal3d))
-GL_PREFIX(Normal3d):
+GLOBL_FN(GL_PREFIX(Materialf))
+GL_PREFIX(Materialf):
MOV_L(GLNAME(_glapi_Dispatch), EAX)
TEST_L(EAX, EAX)
- JZ(GLNAME(_glapi_fallback_Normal3d))
- JMP(GL_OFFSET(_gloffset_Normal3d))
+ JZ(GLNAME(_glapi_fallback_Materialf))
+ JMP(GL_OFFSET(_gloffset_Materialf))
ALIGNTEXT16
-GLOBL_FN(GL_PREFIX(Normal3dv))
-GL_PREFIX(Normal3dv):
+GLOBL_FN(GL_PREFIX(Materialfv))
+GL_PREFIX(Materialfv):
MOV_L(GLNAME(_glapi_Dispatch), EAX)
TEST_L(EAX, EAX)
- JZ(GLNAME(_glapi_fallback_Normal3dv))
- JMP(GL_OFFSET(_gloffset_Normal3dv))
+ JZ(GLNAME(_glapi_fallback_Materialfv))
+ JMP(GL_OFFSET(_gloffset_Materialfv))
ALIGNTEXT16
-GLOBL_FN(GL_PREFIX(Normal3f))
-GL_PREFIX(Normal3f):
+GLOBL_FN(GL_PREFIX(Materiali))
+GL_PREFIX(Materiali):
MOV_L(GLNAME(_glapi_Dispatch), EAX)
TEST_L(EAX, EAX)
- JZ(GLNAME(_glapi_fallback_Normal3f))
- JMP(GL_OFFSET(_gloffset_Normal3f))
+ JZ(GLNAME(_glapi_fallback_Materiali))
+ JMP(GL_OFFSET(_gloffset_Materiali))
ALIGNTEXT16
-GLOBL_FN(GL_PREFIX(Normal3fv))
-GL_PREFIX(Normal3fv):
+GLOBL_FN(GL_PREFIX(Materialiv))
+GL_PREFIX(Materialiv):
MOV_L(GLNAME(_glapi_Dispatch), EAX)
TEST_L(EAX, EAX)
- JZ(GLNAME(_glapi_fallback_Normal3fv))
- JMP(GL_OFFSET(_gloffset_Normal3fv))
+ JZ(GLNAME(_glapi_fallback_Materialiv))
+ JMP(GL_OFFSET(_gloffset_Materialiv))
ALIGNTEXT16
-GLOBL_FN(GL_PREFIX(Normal3i))
-GL_PREFIX(Normal3i):
+GLOBL_FN(GL_PREFIX(PointSize))
+GL_PREFIX(PointSize):
MOV_L(GLNAME(_glapi_Dispatch), EAX)
TEST_L(EAX, EAX)
- JZ(GLNAME(_glapi_fallback_Normal3i))
- JMP(GL_OFFSET(_gloffset_Normal3i))
+ JZ(GLNAME(_glapi_fallback_PointSize))
+ JMP(GL_OFFSET(_gloffset_PointSize))
ALIGNTEXT16
-GLOBL_FN(GL_PREFIX(Normal3iv))
-GL_PREFIX(Normal3iv):
+GLOBL_FN(GL_PREFIX(PolygonMode))
+GL_PREFIX(PolygonMode):
MOV_L(GLNAME(_glapi_Dispatch), EAX)
TEST_L(EAX, EAX)
- JZ(GLNAME(_glapi_fallback_Normal3iv))
- JMP(GL_OFFSET(_gloffset_Normal3iv))
+ JZ(GLNAME(_glapi_fallback_PolygonMode))
+ JMP(GL_OFFSET(_gloffset_PolygonMode))
ALIGNTEXT16
-GLOBL_FN(GL_PREFIX(Normal3s))
-GL_PREFIX(Normal3s):
+GLOBL_FN(GL_PREFIX(PolygonStipple))
+GL_PREFIX(PolygonStipple):
MOV_L(GLNAME(_glapi_Dispatch), EAX)
TEST_L(EAX, EAX)
- JZ(GLNAME(_glapi_fallback_Normal3s))
- JMP(GL_OFFSET(_gloffset_Normal3s))
+ JZ(GLNAME(_glapi_fallback_PolygonStipple))
+ JMP(GL_OFFSET(_gloffset_PolygonStipple))
ALIGNTEXT16
-GLOBL_FN(GL_PREFIX(Normal3sv))
-GL_PREFIX(Normal3sv):
+GLOBL_FN(GL_PREFIX(Scissor))
+GL_PREFIX(Scissor):
MOV_L(GLNAME(_glapi_Dispatch), EAX)
TEST_L(EAX, EAX)
- JZ(GLNAME(_glapi_fallback_Normal3sv))
- JMP(GL_OFFSET(_gloffset_Normal3sv))
+ JZ(GLNAME(_glapi_fallback_Scissor))
+ JMP(GL_OFFSET(_gloffset_Scissor))
ALIGNTEXT16
-GLOBL_FN(GL_PREFIX(Ortho))
-GL_PREFIX(Ortho):
+GLOBL_FN(GL_PREFIX(ShadeModel))
+GL_PREFIX(ShadeModel):
MOV_L(GLNAME(_glapi_Dispatch), EAX)
TEST_L(EAX, EAX)
- JZ(GLNAME(_glapi_fallback_Ortho))
- JMP(GL_OFFSET(_gloffset_Ortho))
+ JZ(GLNAME(_glapi_fallback_ShadeModel))
+ JMP(GL_OFFSET(_gloffset_ShadeModel))
ALIGNTEXT16
-GLOBL_FN(GL_PREFIX(PassThrough))
-GL_PREFIX(PassThrough):
+GLOBL_FN(GL_PREFIX(TexParameterf))
+GL_PREFIX(TexParameterf):
MOV_L(GLNAME(_glapi_Dispatch), EAX)
TEST_L(EAX, EAX)
- JZ(GLNAME(_glapi_fallback_PassThrough))
- JMP(GL_OFFSET(_gloffset_PassThrough))
+ JZ(GLNAME(_glapi_fallback_TexParameterf))
+ JMP(GL_OFFSET(_gloffset_TexParameterf))
ALIGNTEXT16
-GLOBL_FN(GL_PREFIX(PixelMapfv))
-GL_PREFIX(PixelMapfv):
+GLOBL_FN(GL_PREFIX(TexParameterfv))
+GL_PREFIX(TexParameterfv):
MOV_L(GLNAME(_glapi_Dispatch), EAX)
TEST_L(EAX, EAX)
- JZ(GLNAME(_glapi_fallback_PixelMapfv))
- JMP(GL_OFFSET(_gloffset_PixelMapfv))
+ JZ(GLNAME(_glapi_fallback_TexParameterfv))
+ JMP(GL_OFFSET(_gloffset_TexParameterfv))
ALIGNTEXT16
-GLOBL_FN(GL_PREFIX(PixelMapuiv))
-GL_PREFIX(PixelMapuiv):
+GLOBL_FN(GL_PREFIX(TexParameteri))
+GL_PREFIX(TexParameteri):
MOV_L(GLNAME(_glapi_Dispatch), EAX)
TEST_L(EAX, EAX)
- JZ(GLNAME(_glapi_fallback_PixelMapuiv))
- JMP(GL_OFFSET(_gloffset_PixelMapuiv))
+ JZ(GLNAME(_glapi_fallback_TexParameteri))
+ JMP(GL_OFFSET(_gloffset_TexParameteri))
ALIGNTEXT16
-GLOBL_FN(GL_PREFIX(PixelMapusv))
-GL_PREFIX(PixelMapusv):
+GLOBL_FN(GL_PREFIX(TexParameteriv))
+GL_PREFIX(TexParameteriv):
MOV_L(GLNAME(_glapi_Dispatch), EAX)
TEST_L(EAX, EAX)
- JZ(GLNAME(_glapi_fallback_PixelMapusv))
- JMP(GL_OFFSET(_gloffset_PixelMapusv))
+ JZ(GLNAME(_glapi_fallback_TexParameteriv))
+ JMP(GL_OFFSET(_gloffset_TexParameteriv))
ALIGNTEXT16
-GLOBL_FN(GL_PREFIX(PixelStoref))
-GL_PREFIX(PixelStoref):
+GLOBL_FN(GL_PREFIX(TexImage1D))
+GL_PREFIX(TexImage1D):
MOV_L(GLNAME(_glapi_Dispatch), EAX)
TEST_L(EAX, EAX)
- JZ(GLNAME(_glapi_fallback_PixelStoref))
- JMP(GL_OFFSET(_gloffset_PixelStoref))
+ JZ(GLNAME(_glapi_fallback_TexImage1D))
+ JMP(GL_OFFSET(_gloffset_TexImage1D))
ALIGNTEXT16
-GLOBL_FN(GL_PREFIX(PixelStorei))
-GL_PREFIX(PixelStorei):
+GLOBL_FN(GL_PREFIX(TexImage2D))
+GL_PREFIX(TexImage2D):
MOV_L(GLNAME(_glapi_Dispatch), EAX)
TEST_L(EAX, EAX)
- JZ(GLNAME(_glapi_fallback_PixelStorei))
- JMP(GL_OFFSET(_gloffset_PixelStorei))
+ JZ(GLNAME(_glapi_fallback_TexImage2D))
+ JMP(GL_OFFSET(_gloffset_TexImage2D))
ALIGNTEXT16
-GLOBL_FN(GL_PREFIX(PixelTransferf))
-GL_PREFIX(PixelTransferf):
+GLOBL_FN(GL_PREFIX(TexEnvf))
+GL_PREFIX(TexEnvf):
MOV_L(GLNAME(_glapi_Dispatch), EAX)
TEST_L(EAX, EAX)
- JZ(GLNAME(_glapi_fallback_PixelTransferf))
- JMP(GL_OFFSET(_gloffset_PixelTransferf))
+ JZ(GLNAME(_glapi_fallback_TexEnvf))
+ JMP(GL_OFFSET(_gloffset_TexEnvf))
ALIGNTEXT16
-GLOBL_FN(GL_PREFIX(PixelTransferi))
-GL_PREFIX(PixelTransferi):
+GLOBL_FN(GL_PREFIX(TexEnvfv))
+GL_PREFIX(TexEnvfv):
MOV_L(GLNAME(_glapi_Dispatch), EAX)
TEST_L(EAX, EAX)
- JZ(GLNAME(_glapi_fallback_PixelTransferi))
- JMP(GL_OFFSET(_gloffset_PixelTransferi))
+ JZ(GLNAME(_glapi_fallback_TexEnvfv))
+ JMP(GL_OFFSET(_gloffset_TexEnvfv))
ALIGNTEXT16
-GLOBL_FN(GL_PREFIX(PixelZoom))
-GL_PREFIX(PixelZoom):
+GLOBL_FN(GL_PREFIX(TexEnvi))
+GL_PREFIX(TexEnvi):
MOV_L(GLNAME(_glapi_Dispatch), EAX)
TEST_L(EAX, EAX)
- JZ(GLNAME(_glapi_fallback_PixelZoom))
- JMP(GL_OFFSET(_gloffset_PixelZoom))
+ JZ(GLNAME(_glapi_fallback_TexEnvi))
+ JMP(GL_OFFSET(_gloffset_TexEnvi))
ALIGNTEXT16
-GLOBL_FN(GL_PREFIX(PointSize))
-GL_PREFIX(PointSize):
+GLOBL_FN(GL_PREFIX(TexEnviv))
+GL_PREFIX(TexEnviv):
MOV_L(GLNAME(_glapi_Dispatch), EAX)
TEST_L(EAX, EAX)
- JZ(GLNAME(_glapi_fallback_PointSize))
- JMP(GL_OFFSET(_gloffset_PointSize))
+ JZ(GLNAME(_glapi_fallback_TexEnviv))
+ JMP(GL_OFFSET(_gloffset_TexEnviv))
ALIGNTEXT16
-GLOBL_FN(GL_PREFIX(PolygonMode))
-GL_PREFIX(PolygonMode):
+GLOBL_FN(GL_PREFIX(TexGend))
+GL_PREFIX(TexGend):
MOV_L(GLNAME(_glapi_Dispatch), EAX)
TEST_L(EAX, EAX)
- JZ(GLNAME(_glapi_fallback_PolygonMode))
- JMP(GL_OFFSET(_gloffset_PolygonMode))
+ JZ(GLNAME(_glapi_fallback_TexGend))
+ JMP(GL_OFFSET(_gloffset_TexGend))
ALIGNTEXT16
-GLOBL_FN(GL_PREFIX(PolygonStipple))
-GL_PREFIX(PolygonStipple):
+GLOBL_FN(GL_PREFIX(TexGendv))
+GL_PREFIX(TexGendv):
MOV_L(GLNAME(_glapi_Dispatch), EAX)
TEST_L(EAX, EAX)
- JZ(GLNAME(_glapi_fallback_PolygonStipple))
- JMP(GL_OFFSET(_gloffset_PolygonStipple))
+ JZ(GLNAME(_glapi_fallback_TexGendv))
+ JMP(GL_OFFSET(_gloffset_TexGendv))
ALIGNTEXT16
-GLOBL_FN(GL_PREFIX(PopAttrib))
-GL_PREFIX(PopAttrib):
+GLOBL_FN(GL_PREFIX(TexGenf))
+GL_PREFIX(TexGenf):
MOV_L(GLNAME(_glapi_Dispatch), EAX)
TEST_L(EAX, EAX)
- JZ(GLNAME(_glapi_fallback_PopAttrib))
- JMP(GL_OFFSET(_gloffset_PopAttrib))
+ JZ(GLNAME(_glapi_fallback_TexGenf))
+ JMP(GL_OFFSET(_gloffset_TexGenf))
ALIGNTEXT16
-GLOBL_FN(GL_PREFIX(PopMatrix))
-GL_PREFIX(PopMatrix):
+GLOBL_FN(GL_PREFIX(TexGenfv))
+GL_PREFIX(TexGenfv):
MOV_L(GLNAME(_glapi_Dispatch), EAX)
TEST_L(EAX, EAX)
- JZ(GLNAME(_glapi_fallback_PopMatrix))
- JMP(GL_OFFSET(_gloffset_PopMatrix))
+ JZ(GLNAME(_glapi_fallback_TexGenfv))
+ JMP(GL_OFFSET(_gloffset_TexGenfv))
ALIGNTEXT16
-GLOBL_FN(GL_PREFIX(PopName))
-GL_PREFIX(PopName):
+GLOBL_FN(GL_PREFIX(TexGeni))
+GL_PREFIX(TexGeni):
MOV_L(GLNAME(_glapi_Dispatch), EAX)
TEST_L(EAX, EAX)
- JZ(GLNAME(_glapi_fallback_PopName))
- JMP(GL_OFFSET(_gloffset_PopName))
+ JZ(GLNAME(_glapi_fallback_TexGeni))
+ JMP(GL_OFFSET(_gloffset_TexGeni))
ALIGNTEXT16
-GLOBL_FN(GL_PREFIX(PushAttrib))
-GL_PREFIX(PushAttrib):
+GLOBL_FN(GL_PREFIX(TexGeniv))
+GL_PREFIX(TexGeniv):
MOV_L(GLNAME(_glapi_Dispatch), EAX)
TEST_L(EAX, EAX)
- JZ(GLNAME(_glapi_fallback_PushAttrib))
- JMP(GL_OFFSET(_gloffset_PushAttrib))
+ JZ(GLNAME(_glapi_fallback_TexGeniv))
+ JMP(GL_OFFSET(_gloffset_TexGeniv))
ALIGNTEXT16
-GLOBL_FN(GL_PREFIX(PushMatrix))
-GL_PREFIX(PushMatrix):
+GLOBL_FN(GL_PREFIX(FeedbackBuffer))
+GL_PREFIX(FeedbackBuffer):
MOV_L(GLNAME(_glapi_Dispatch), EAX)
TEST_L(EAX, EAX)
- JZ(GLNAME(_glapi_fallback_PushMatrix))
- JMP(GL_OFFSET(_gloffset_PushMatrix))
+ JZ(GLNAME(_glapi_fallback_FeedbackBuffer))
+ JMP(GL_OFFSET(_gloffset_FeedbackBuffer))
ALIGNTEXT16
-GLOBL_FN(GL_PREFIX(PushName))
-GL_PREFIX(PushName):
+GLOBL_FN(GL_PREFIX(SelectBuffer))
+GL_PREFIX(SelectBuffer):
MOV_L(GLNAME(_glapi_Dispatch), EAX)
TEST_L(EAX, EAX)
- JZ(GLNAME(_glapi_fallback_PushName))
- JMP(GL_OFFSET(_gloffset_PushName))
+ JZ(GLNAME(_glapi_fallback_SelectBuffer))
+ JMP(GL_OFFSET(_gloffset_SelectBuffer))
ALIGNTEXT16
-GLOBL_FN(GL_PREFIX(RasterPos2d))
-GL_PREFIX(RasterPos2d):
+GLOBL_FN(GL_PREFIX(RenderMode))
+GL_PREFIX(RenderMode):
MOV_L(GLNAME(_glapi_Dispatch), EAX)
TEST_L(EAX, EAX)
- JZ(GLNAME(_glapi_fallback_RasterPos2d))
- JMP(GL_OFFSET(_gloffset_RasterPos2d))
+ JZ(GLNAME(_glapi_fallback_RenderMode))
+ JMP(GL_OFFSET(_gloffset_RenderMode))
ALIGNTEXT16
-GLOBL_FN(GL_PREFIX(RasterPos2f))
-GL_PREFIX(RasterPos2f):
+GLOBL_FN(GL_PREFIX(InitNames))
+GL_PREFIX(InitNames):
MOV_L(GLNAME(_glapi_Dispatch), EAX)
TEST_L(EAX, EAX)
- JZ(GLNAME(_glapi_fallback_RasterPos2f))
- JMP(GL_OFFSET(_gloffset_RasterPos2f))
+ JZ(GLNAME(_glapi_fallback_InitNames))
+ JMP(GL_OFFSET(_gloffset_InitNames))
ALIGNTEXT16
-GLOBL_FN(GL_PREFIX(RasterPos2i))
-GL_PREFIX(RasterPos2i):
+GLOBL_FN(GL_PREFIX(LoadName))
+GL_PREFIX(LoadName):
MOV_L(GLNAME(_glapi_Dispatch), EAX)
TEST_L(EAX, EAX)
- JZ(GLNAME(_glapi_fallback_RasterPos2i))
- JMP(GL_OFFSET(_gloffset_RasterPos2i))
+ JZ(GLNAME(_glapi_fallback_LoadName))
+ JMP(GL_OFFSET(_gloffset_LoadName))
ALIGNTEXT16
-GLOBL_FN(GL_PREFIX(RasterPos2s))
-GL_PREFIX(RasterPos2s):
+GLOBL_FN(GL_PREFIX(PassThrough))
+GL_PREFIX(PassThrough):
MOV_L(GLNAME(_glapi_Dispatch), EAX)
TEST_L(EAX, EAX)
- JZ(GLNAME(_glapi_fallback_RasterPos2s))
- JMP(GL_OFFSET(_gloffset_RasterPos2s))
+ JZ(GLNAME(_glapi_fallback_PassThrough))
+ JMP(GL_OFFSET(_gloffset_PassThrough))
ALIGNTEXT16
-GLOBL_FN(GL_PREFIX(RasterPos3d))
-GL_PREFIX(RasterPos3d):
+GLOBL_FN(GL_PREFIX(PopName))
+GL_PREFIX(PopName):
MOV_L(GLNAME(_glapi_Dispatch), EAX)
TEST_L(EAX, EAX)
- JZ(GLNAME(_glapi_fallback_RasterPos3d))
- JMP(GL_OFFSET(_gloffset_RasterPos3d))
+ JZ(GLNAME(_glapi_fallback_PopName))
+ JMP(GL_OFFSET(_gloffset_PopName))
ALIGNTEXT16
-GLOBL_FN(GL_PREFIX(RasterPos3f))
-GL_PREFIX(RasterPos3f):
+GLOBL_FN(GL_PREFIX(PushName))
+GL_PREFIX(PushName):
MOV_L(GLNAME(_glapi_Dispatch), EAX)
TEST_L(EAX, EAX)
- JZ(GLNAME(_glapi_fallback_RasterPos3f))
- JMP(GL_OFFSET(_gloffset_RasterPos3f))
+ JZ(GLNAME(_glapi_fallback_PushName))
+ JMP(GL_OFFSET(_gloffset_PushName))
ALIGNTEXT16
-GLOBL_FN(GL_PREFIX(RasterPos3i))
-GL_PREFIX(RasterPos3i):
+GLOBL_FN(GL_PREFIX(DrawBuffer))
+GL_PREFIX(DrawBuffer):
MOV_L(GLNAME(_glapi_Dispatch), EAX)
TEST_L(EAX, EAX)
- JZ(GLNAME(_glapi_fallback_RasterPos3i))
- JMP(GL_OFFSET(_gloffset_RasterPos3i))
+ JZ(GLNAME(_glapi_fallback_DrawBuffer))
+ JMP(GL_OFFSET(_gloffset_DrawBuffer))
ALIGNTEXT16
-GLOBL_FN(GL_PREFIX(RasterPos3s))
-GL_PREFIX(RasterPos3s):
+GLOBL_FN(GL_PREFIX(Clear))
+GL_PREFIX(Clear):
MOV_L(GLNAME(_glapi_Dispatch), EAX)
TEST_L(EAX, EAX)
- JZ(GLNAME(_glapi_fallback_RasterPos3s))
- JMP(GL_OFFSET(_gloffset_RasterPos3s))
+ JZ(GLNAME(_glapi_fallback_Clear))
+ JMP(GL_OFFSET(_gloffset_Clear))
ALIGNTEXT16
-GLOBL_FN(GL_PREFIX(RasterPos4d))
-GL_PREFIX(RasterPos4d):
+GLOBL_FN(GL_PREFIX(ClearAccum))
+GL_PREFIX(ClearAccum):
MOV_L(GLNAME(_glapi_Dispatch), EAX)
TEST_L(EAX, EAX)
- JZ(GLNAME(_glapi_fallback_RasterPos4d))
- JMP(GL_OFFSET(_gloffset_RasterPos4d))
+ JZ(GLNAME(_glapi_fallback_ClearAccum))
+ JMP(GL_OFFSET(_gloffset_ClearAccum))
ALIGNTEXT16
-GLOBL_FN(GL_PREFIX(RasterPos4f))
-GL_PREFIX(RasterPos4f):
+GLOBL_FN(GL_PREFIX(ClearIndex))
+GL_PREFIX(ClearIndex):
MOV_L(GLNAME(_glapi_Dispatch), EAX)
TEST_L(EAX, EAX)
- JZ(GLNAME(_glapi_fallback_RasterPos4f))
- JMP(GL_OFFSET(_gloffset_RasterPos4f))
+ JZ(GLNAME(_glapi_fallback_ClearIndex))
+ JMP(GL_OFFSET(_gloffset_ClearIndex))
ALIGNTEXT16
-GLOBL_FN(GL_PREFIX(RasterPos4i))
-GL_PREFIX(RasterPos4i):
+GLOBL_FN(GL_PREFIX(ClearColor))
+GL_PREFIX(ClearColor):
MOV_L(GLNAME(_glapi_Dispatch), EAX)
TEST_L(EAX, EAX)
- JZ(GLNAME(_glapi_fallback_RasterPos4i))
- JMP(GL_OFFSET(_gloffset_RasterPos4i))
+ JZ(GLNAME(_glapi_fallback_ClearColor))
+ JMP(GL_OFFSET(_gloffset_ClearColor))
ALIGNTEXT16
-GLOBL_FN(GL_PREFIX(RasterPos4s))
-GL_PREFIX(RasterPos4s):
+GLOBL_FN(GL_PREFIX(ClearStencil))
+GL_PREFIX(ClearStencil):
MOV_L(GLNAME(_glapi_Dispatch), EAX)
TEST_L(EAX, EAX)
- JZ(GLNAME(_glapi_fallback_RasterPos4s))
- JMP(GL_OFFSET(_gloffset_RasterPos4s))
+ JZ(GLNAME(_glapi_fallback_ClearStencil))
+ JMP(GL_OFFSET(_gloffset_ClearStencil))
ALIGNTEXT16
-GLOBL_FN(GL_PREFIX(RasterPos2dv))
-GL_PREFIX(RasterPos2dv):
+GLOBL_FN(GL_PREFIX(ClearDepth))
+GL_PREFIX(ClearDepth):
MOV_L(GLNAME(_glapi_Dispatch), EAX)
TEST_L(EAX, EAX)
- JZ(GLNAME(_glapi_fallback_RasterPos2dv))
- JMP(GL_OFFSET(_gloffset_RasterPos2dv))
+ JZ(GLNAME(_glapi_fallback_ClearDepth))
+ JMP(GL_OFFSET(_gloffset_ClearDepth))
ALIGNTEXT16
-GLOBL_FN(GL_PREFIX(RasterPos2fv))
-GL_PREFIX(RasterPos2fv):
+GLOBL_FN(GL_PREFIX(StencilMask))
+GL_PREFIX(StencilMask):
MOV_L(GLNAME(_glapi_Dispatch), EAX)
TEST_L(EAX, EAX)
- JZ(GLNAME(_glapi_fallback_RasterPos2fv))
- JMP(GL_OFFSET(_gloffset_RasterPos2fv))
+ JZ(GLNAME(_glapi_fallback_StencilMask))
+ JMP(GL_OFFSET(_gloffset_StencilMask))
ALIGNTEXT16
-GLOBL_FN(GL_PREFIX(RasterPos2iv))
-GL_PREFIX(RasterPos2iv):
+GLOBL_FN(GL_PREFIX(ColorMask))
+GL_PREFIX(ColorMask):
MOV_L(GLNAME(_glapi_Dispatch), EAX)
TEST_L(EAX, EAX)
- JZ(GLNAME(_glapi_fallback_RasterPos2iv))
- JMP(GL_OFFSET(_gloffset_RasterPos2iv))
+ JZ(GLNAME(_glapi_fallback_ColorMask))
+ JMP(GL_OFFSET(_gloffset_ColorMask))
ALIGNTEXT16
-GLOBL_FN(GL_PREFIX(RasterPos2sv))
-GL_PREFIX(RasterPos2sv):
+GLOBL_FN(GL_PREFIX(DepthMask))
+GL_PREFIX(DepthMask):
MOV_L(GLNAME(_glapi_Dispatch), EAX)
TEST_L(EAX, EAX)
- JZ(GLNAME(_glapi_fallback_RasterPos2sv))
- JMP(GL_OFFSET(_gloffset_RasterPos2sv))
+ JZ(GLNAME(_glapi_fallback_DepthMask))
+ JMP(GL_OFFSET(_gloffset_DepthMask))
ALIGNTEXT16
-GLOBL_FN(GL_PREFIX(RasterPos3dv))
-GL_PREFIX(RasterPos3dv):
+GLOBL_FN(GL_PREFIX(IndexMask))
+GL_PREFIX(IndexMask):
MOV_L(GLNAME(_glapi_Dispatch), EAX)
TEST_L(EAX, EAX)
- JZ(GLNAME(_glapi_fallback_RasterPos3dv))
- JMP(GL_OFFSET(_gloffset_RasterPos3dv))
+ JZ(GLNAME(_glapi_fallback_IndexMask))
+ JMP(GL_OFFSET(_gloffset_IndexMask))
ALIGNTEXT16
-GLOBL_FN(GL_PREFIX(RasterPos3fv))
-GL_PREFIX(RasterPos3fv):
+GLOBL_FN(GL_PREFIX(Accum))
+GL_PREFIX(Accum):
MOV_L(GLNAME(_glapi_Dispatch), EAX)
TEST_L(EAX, EAX)
- JZ(GLNAME(_glapi_fallback_RasterPos3fv))
- JMP(GL_OFFSET(_gloffset_RasterPos3fv))
+ JZ(GLNAME(_glapi_fallback_Accum))
+ JMP(GL_OFFSET(_gloffset_Accum))
ALIGNTEXT16
-GLOBL_FN(GL_PREFIX(RasterPos3iv))
-GL_PREFIX(RasterPos3iv):
+GLOBL_FN(GL_PREFIX(Disable))
+GL_PREFIX(Disable):
MOV_L(GLNAME(_glapi_Dispatch), EAX)
TEST_L(EAX, EAX)
- JZ(GLNAME(_glapi_fallback_RasterPos3iv))
- JMP(GL_OFFSET(_gloffset_RasterPos3iv))
+ JZ(GLNAME(_glapi_fallback_Disable))
+ JMP(GL_OFFSET(_gloffset_Disable))
ALIGNTEXT16
-GLOBL_FN(GL_PREFIX(RasterPos3sv))
-GL_PREFIX(RasterPos3sv):
+GLOBL_FN(GL_PREFIX(Enable))
+GL_PREFIX(Enable):
MOV_L(GLNAME(_glapi_Dispatch), EAX)
TEST_L(EAX, EAX)
- JZ(GLNAME(_glapi_fallback_RasterPos3sv))
- JMP(GL_OFFSET(_gloffset_RasterPos3sv))
+ JZ(GLNAME(_glapi_fallback_Enable))
+ JMP(GL_OFFSET(_gloffset_Enable))
ALIGNTEXT16
-GLOBL_FN(GL_PREFIX(RasterPos4dv))
-GL_PREFIX(RasterPos4dv):
+GLOBL_FN(GL_PREFIX(Finish))
+GL_PREFIX(Finish):
MOV_L(GLNAME(_glapi_Dispatch), EAX)
TEST_L(EAX, EAX)
- JZ(GLNAME(_glapi_fallback_RasterPos4dv))
- JMP(GL_OFFSET(_gloffset_RasterPos4dv))
+ JZ(GLNAME(_glapi_fallback_Finish))
+ JMP(GL_OFFSET(_gloffset_Finish))
ALIGNTEXT16
-GLOBL_FN(GL_PREFIX(RasterPos4fv))
-GL_PREFIX(RasterPos4fv):
+GLOBL_FN(GL_PREFIX(Flush))
+GL_PREFIX(Flush):
MOV_L(GLNAME(_glapi_Dispatch), EAX)
TEST_L(EAX, EAX)
- JZ(GLNAME(_glapi_fallback_RasterPos4fv))
- JMP(GL_OFFSET(_gloffset_RasterPos4fv))
+ JZ(GLNAME(_glapi_fallback_Flush))
+ JMP(GL_OFFSET(_gloffset_Flush))
ALIGNTEXT16
-GLOBL_FN(GL_PREFIX(RasterPos4iv))
-GL_PREFIX(RasterPos4iv):
+GLOBL_FN(GL_PREFIX(PopAttrib))
+GL_PREFIX(PopAttrib):
MOV_L(GLNAME(_glapi_Dispatch), EAX)
TEST_L(EAX, EAX)
- JZ(GLNAME(_glapi_fallback_RasterPos4iv))
- JMP(GL_OFFSET(_gloffset_RasterPos4iv))
+ JZ(GLNAME(_glapi_fallback_PopAttrib))
+ JMP(GL_OFFSET(_gloffset_PopAttrib))
ALIGNTEXT16
-GLOBL_FN(GL_PREFIX(RasterPos4sv))
-GL_PREFIX(RasterPos4sv):
+GLOBL_FN(GL_PREFIX(PushAttrib))
+GL_PREFIX(PushAttrib):
MOV_L(GLNAME(_glapi_Dispatch), EAX)
TEST_L(EAX, EAX)
- JZ(GLNAME(_glapi_fallback_RasterPos4sv))
- JMP(GL_OFFSET(_gloffset_RasterPos4sv))
+ JZ(GLNAME(_glapi_fallback_PushAttrib))
+ JMP(GL_OFFSET(_gloffset_PushAttrib))
ALIGNTEXT16
-GLOBL_FN(GL_PREFIX(ReadBuffer))
-GL_PREFIX(ReadBuffer):
+GLOBL_FN(GL_PREFIX(Map1d))
+GL_PREFIX(Map1d):
MOV_L(GLNAME(_glapi_Dispatch), EAX)
TEST_L(EAX, EAX)
- JZ(GLNAME(_glapi_fallback_ReadBuffer))
- JMP(GL_OFFSET(_gloffset_ReadBuffer))
+ JZ(GLNAME(_glapi_fallback_Map1d))
+ JMP(GL_OFFSET(_gloffset_Map1d))
ALIGNTEXT16
-GLOBL_FN(GL_PREFIX(ReadPixels))
-GL_PREFIX(ReadPixels):
+GLOBL_FN(GL_PREFIX(Map1f))
+GL_PREFIX(Map1f):
MOV_L(GLNAME(_glapi_Dispatch), EAX)
TEST_L(EAX, EAX)
- JZ(GLNAME(_glapi_fallback_ReadPixels))
- JMP(GL_OFFSET(_gloffset_ReadPixels))
+ JZ(GLNAME(_glapi_fallback_Map1f))
+ JMP(GL_OFFSET(_gloffset_Map1f))
ALIGNTEXT16
-GLOBL_FN(GL_PREFIX(Rectd))
-GL_PREFIX(Rectd):
+GLOBL_FN(GL_PREFIX(Map2d))
+GL_PREFIX(Map2d):
MOV_L(GLNAME(_glapi_Dispatch), EAX)
TEST_L(EAX, EAX)
- JZ(GLNAME(_glapi_fallback_Rectd))
- JMP(GL_OFFSET(_gloffset_Rectd))
+ JZ(GLNAME(_glapi_fallback_Map2d))
+ JMP(GL_OFFSET(_gloffset_Map2d))
ALIGNTEXT16
-GLOBL_FN(GL_PREFIX(Rectdv))
-GL_PREFIX(Rectdv):
+GLOBL_FN(GL_PREFIX(Map2f))
+GL_PREFIX(Map2f):
MOV_L(GLNAME(_glapi_Dispatch), EAX)
TEST_L(EAX, EAX)
- JZ(GLNAME(_glapi_fallback_Rectdv))
- JMP(GL_OFFSET(_gloffset_Rectdv))
+ JZ(GLNAME(_glapi_fallback_Map2f))
+ JMP(GL_OFFSET(_gloffset_Map2f))
ALIGNTEXT16
-GLOBL_FN(GL_PREFIX(Rectf))
-GL_PREFIX(Rectf):
+GLOBL_FN(GL_PREFIX(MapGrid1d))
+GL_PREFIX(MapGrid1d):
MOV_L(GLNAME(_glapi_Dispatch), EAX)
TEST_L(EAX, EAX)
- JZ(GLNAME(_glapi_fallback_Rectf))
- JMP(GL_OFFSET(_gloffset_Rectf))
+ JZ(GLNAME(_glapi_fallback_MapGrid1d))
+ JMP(GL_OFFSET(_gloffset_MapGrid1d))
ALIGNTEXT16
-GLOBL_FN(GL_PREFIX(Rectfv))
-GL_PREFIX(Rectfv):
+GLOBL_FN(GL_PREFIX(MapGrid1f))
+GL_PREFIX(MapGrid1f):
MOV_L(GLNAME(_glapi_Dispatch), EAX)
TEST_L(EAX, EAX)
- JZ(GLNAME(_glapi_fallback_Rectfv))
- JMP(GL_OFFSET(_gloffset_Rectfv))
+ JZ(GLNAME(_glapi_fallback_MapGrid1f))
+ JMP(GL_OFFSET(_gloffset_MapGrid1f))
ALIGNTEXT16
-GLOBL_FN(GL_PREFIX(Recti))
-GL_PREFIX(Recti):
+GLOBL_FN(GL_PREFIX(MapGrid2d))
+GL_PREFIX(MapGrid2d):
MOV_L(GLNAME(_glapi_Dispatch), EAX)
TEST_L(EAX, EAX)
- JZ(GLNAME(_glapi_fallback_Recti))
- JMP(GL_OFFSET(_gloffset_Recti))
+ JZ(GLNAME(_glapi_fallback_MapGrid2d))
+ JMP(GL_OFFSET(_gloffset_MapGrid2d))
ALIGNTEXT16
-GLOBL_FN(GL_PREFIX(Rectiv))
-GL_PREFIX(Rectiv):
+GLOBL_FN(GL_PREFIX(MapGrid2f))
+GL_PREFIX(MapGrid2f):
MOV_L(GLNAME(_glapi_Dispatch), EAX)
TEST_L(EAX, EAX)
- JZ(GLNAME(_glapi_fallback_Rectiv))
- JMP(GL_OFFSET(_gloffset_Rectiv))
+ JZ(GLNAME(_glapi_fallback_MapGrid2f))
+ JMP(GL_OFFSET(_gloffset_MapGrid2f))
ALIGNTEXT16
-GLOBL_FN(GL_PREFIX(Rects))
-GL_PREFIX(Rects):
+GLOBL_FN(GL_PREFIX(EvalCoord1d))
+GL_PREFIX(EvalCoord1d):
MOV_L(GLNAME(_glapi_Dispatch), EAX)
TEST_L(EAX, EAX)
- JZ(GLNAME(_glapi_fallback_Rects))
- JMP(GL_OFFSET(_gloffset_Rects))
+ JZ(GLNAME(_glapi_fallback_EvalCoord1d))
+ JMP(GL_OFFSET(_gloffset_EvalCoord1d))
ALIGNTEXT16
-GLOBL_FN(GL_PREFIX(Rectsv))
-GL_PREFIX(Rectsv):
+GLOBL_FN(GL_PREFIX(EvalCoord1dv))
+GL_PREFIX(EvalCoord1dv):
MOV_L(GLNAME(_glapi_Dispatch), EAX)
TEST_L(EAX, EAX)
- JZ(GLNAME(_glapi_fallback_Rectsv))
- JMP(GL_OFFSET(_gloffset_Rectsv))
+ JZ(GLNAME(_glapi_fallback_EvalCoord1dv))
+ JMP(GL_OFFSET(_gloffset_EvalCoord1dv))
ALIGNTEXT16
-GLOBL_FN(GL_PREFIX(RenderMode))
-GL_PREFIX(RenderMode):
+GLOBL_FN(GL_PREFIX(EvalCoord1f))
+GL_PREFIX(EvalCoord1f):
MOV_L(GLNAME(_glapi_Dispatch), EAX)
TEST_L(EAX, EAX)
- JZ(GLNAME(_glapi_fallback_RenderMode))
- JMP(GL_OFFSET(_gloffset_RenderMode))
+ JZ(GLNAME(_glapi_fallback_EvalCoord1f))
+ JMP(GL_OFFSET(_gloffset_EvalCoord1f))
ALIGNTEXT16
-GLOBL_FN(GL_PREFIX(Rotated))
-GL_PREFIX(Rotated):
+GLOBL_FN(GL_PREFIX(EvalCoord1fv))
+GL_PREFIX(EvalCoord1fv):
MOV_L(GLNAME(_glapi_Dispatch), EAX)
TEST_L(EAX, EAX)
- JZ(GLNAME(_glapi_fallback_Rotated))
- JMP(GL_OFFSET(_gloffset_Rotated))
+ JZ(GLNAME(_glapi_fallback_EvalCoord1fv))
+ JMP(GL_OFFSET(_gloffset_EvalCoord1fv))
ALIGNTEXT16
-GLOBL_FN(GL_PREFIX(Rotatef))
-GL_PREFIX(Rotatef):
+GLOBL_FN(GL_PREFIX(EvalCoord2d))
+GL_PREFIX(EvalCoord2d):
MOV_L(GLNAME(_glapi_Dispatch), EAX)
TEST_L(EAX, EAX)
- JZ(GLNAME(_glapi_fallback_Rotatef))
- JMP(GL_OFFSET(_gloffset_Rotatef))
+ JZ(GLNAME(_glapi_fallback_EvalCoord2d))
+ JMP(GL_OFFSET(_gloffset_EvalCoord2d))
ALIGNTEXT16
-GLOBL_FN(GL_PREFIX(SelectBuffer))
-GL_PREFIX(SelectBuffer):
+GLOBL_FN(GL_PREFIX(EvalCoord2dv))
+GL_PREFIX(EvalCoord2dv):
MOV_L(GLNAME(_glapi_Dispatch), EAX)
TEST_L(EAX, EAX)
- JZ(GLNAME(_glapi_fallback_SelectBuffer))
- JMP(GL_OFFSET(_gloffset_SelectBuffer))
+ JZ(GLNAME(_glapi_fallback_EvalCoord2dv))
+ JMP(GL_OFFSET(_gloffset_EvalCoord2dv))
ALIGNTEXT16
-GLOBL_FN(GL_PREFIX(Scaled))
-GL_PREFIX(Scaled):
+GLOBL_FN(GL_PREFIX(EvalCoord2f))
+GL_PREFIX(EvalCoord2f):
MOV_L(GLNAME(_glapi_Dispatch), EAX)
TEST_L(EAX, EAX)
- JZ(GLNAME(_glapi_fallback_Scaled))
- JMP(GL_OFFSET(_gloffset_Scaled))
+ JZ(GLNAME(_glapi_fallback_EvalCoord2f))
+ JMP(GL_OFFSET(_gloffset_EvalCoord2f))
ALIGNTEXT16
-GLOBL_FN(GL_PREFIX(Scalef))
-GL_PREFIX(Scalef):
+GLOBL_FN(GL_PREFIX(EvalCoord2fv))
+GL_PREFIX(EvalCoord2fv):
MOV_L(GLNAME(_glapi_Dispatch), EAX)
TEST_L(EAX, EAX)
- JZ(GLNAME(_glapi_fallback_Scalef))
- JMP(GL_OFFSET(_gloffset_Scalef))
+ JZ(GLNAME(_glapi_fallback_EvalCoord2fv))
+ JMP(GL_OFFSET(_gloffset_EvalCoord2fv))
ALIGNTEXT16
-GLOBL_FN(GL_PREFIX(Scissor))
-GL_PREFIX(Scissor):
+GLOBL_FN(GL_PREFIX(EvalMesh1))
+GL_PREFIX(EvalMesh1):
MOV_L(GLNAME(_glapi_Dispatch), EAX)
TEST_L(EAX, EAX)
- JZ(GLNAME(_glapi_fallback_Scissor))
- JMP(GL_OFFSET(_gloffset_Scissor))
+ JZ(GLNAME(_glapi_fallback_EvalMesh1))
+ JMP(GL_OFFSET(_gloffset_EvalMesh1))
ALIGNTEXT16
-GLOBL_FN(GL_PREFIX(ShadeModel))
-GL_PREFIX(ShadeModel):
+GLOBL_FN(GL_PREFIX(EvalPoint1))
+GL_PREFIX(EvalPoint1):
MOV_L(GLNAME(_glapi_Dispatch), EAX)
TEST_L(EAX, EAX)
- JZ(GLNAME(_glapi_fallback_ShadeModel))
- JMP(GL_OFFSET(_gloffset_ShadeModel))
+ JZ(GLNAME(_glapi_fallback_EvalPoint1))
+ JMP(GL_OFFSET(_gloffset_EvalPoint1))
ALIGNTEXT16
-GLOBL_FN(GL_PREFIX(StencilFunc))
-GL_PREFIX(StencilFunc):
+GLOBL_FN(GL_PREFIX(EvalMesh2))
+GL_PREFIX(EvalMesh2):
MOV_L(GLNAME(_glapi_Dispatch), EAX)
TEST_L(EAX, EAX)
- JZ(GLNAME(_glapi_fallback_StencilFunc))
- JMP(GL_OFFSET(_gloffset_StencilFunc))
+ JZ(GLNAME(_glapi_fallback_EvalMesh2))
+ JMP(GL_OFFSET(_gloffset_EvalMesh2))
ALIGNTEXT16
-GLOBL_FN(GL_PREFIX(StencilMask))
-GL_PREFIX(StencilMask):
+GLOBL_FN(GL_PREFIX(EvalPoint2))
+GL_PREFIX(EvalPoint2):
MOV_L(GLNAME(_glapi_Dispatch), EAX)
TEST_L(EAX, EAX)
- JZ(GLNAME(_glapi_fallback_StencilMask))
- JMP(GL_OFFSET(_gloffset_StencilMask))
+ JZ(GLNAME(_glapi_fallback_EvalPoint2))
+ JMP(GL_OFFSET(_gloffset_EvalPoint2))
ALIGNTEXT16
-GLOBL_FN(GL_PREFIX(StencilOp))
-GL_PREFIX(StencilOp):
+GLOBL_FN(GL_PREFIX(AlphaFunc))
+GL_PREFIX(AlphaFunc):
MOV_L(GLNAME(_glapi_Dispatch), EAX)
TEST_L(EAX, EAX)
- JZ(GLNAME(_glapi_fallback_StencilOp))
- JMP(GL_OFFSET(_gloffset_StencilOp))
+ JZ(GLNAME(_glapi_fallback_AlphaFunc))
+ JMP(GL_OFFSET(_gloffset_AlphaFunc))
ALIGNTEXT16
-GLOBL_FN(GL_PREFIX(TexCoord1d))
-GL_PREFIX(TexCoord1d):
+GLOBL_FN(GL_PREFIX(BlendFunc))
+GL_PREFIX(BlendFunc):
MOV_L(GLNAME(_glapi_Dispatch), EAX)
TEST_L(EAX, EAX)
- JZ(GLNAME(_glapi_fallback_TexCoord1d))
- JMP(GL_OFFSET(_gloffset_TexCoord1d))
+ JZ(GLNAME(_glapi_fallback_BlendFunc))
+ JMP(GL_OFFSET(_gloffset_BlendFunc))
ALIGNTEXT16
-GLOBL_FN(GL_PREFIX(TexCoord1f))
-GL_PREFIX(TexCoord1f):
+GLOBL_FN(GL_PREFIX(LogicOp))
+GL_PREFIX(LogicOp):
MOV_L(GLNAME(_glapi_Dispatch), EAX)
TEST_L(EAX, EAX)
- JZ(GLNAME(_glapi_fallback_TexCoord1f))
- JMP(GL_OFFSET(_gloffset_TexCoord1f))
+ JZ(GLNAME(_glapi_fallback_LogicOp))
+ JMP(GL_OFFSET(_gloffset_LogicOp))
ALIGNTEXT16
-GLOBL_FN(GL_PREFIX(TexCoord1i))
-GL_PREFIX(TexCoord1i):
+GLOBL_FN(GL_PREFIX(StencilFunc))
+GL_PREFIX(StencilFunc):
MOV_L(GLNAME(_glapi_Dispatch), EAX)
TEST_L(EAX, EAX)
- JZ(GLNAME(_glapi_fallback_TexCoord1i))
- JMP(GL_OFFSET(_gloffset_TexCoord1i))
+ JZ(GLNAME(_glapi_fallback_StencilFunc))
+ JMP(GL_OFFSET(_gloffset_StencilFunc))
ALIGNTEXT16
-GLOBL_FN(GL_PREFIX(TexCoord1s))
-GL_PREFIX(TexCoord1s):
+GLOBL_FN(GL_PREFIX(StencilOp))
+GL_PREFIX(StencilOp):
MOV_L(GLNAME(_glapi_Dispatch), EAX)
TEST_L(EAX, EAX)
- JZ(GLNAME(_glapi_fallback_TexCoord1s))
- JMP(GL_OFFSET(_gloffset_TexCoord1s))
+ JZ(GLNAME(_glapi_fallback_StencilOp))
+ JMP(GL_OFFSET(_gloffset_StencilOp))
ALIGNTEXT16
-GLOBL_FN(GL_PREFIX(TexCoord2d))
-GL_PREFIX(TexCoord2d):
+GLOBL_FN(GL_PREFIX(DepthFunc))
+GL_PREFIX(DepthFunc):
MOV_L(GLNAME(_glapi_Dispatch), EAX)
TEST_L(EAX, EAX)
- JZ(GLNAME(_glapi_fallback_TexCoord2d))
- JMP(GL_OFFSET(_gloffset_TexCoord2d))
+ JZ(GLNAME(_glapi_fallback_DepthFunc))
+ JMP(GL_OFFSET(_gloffset_DepthFunc))
ALIGNTEXT16
-GLOBL_FN(GL_PREFIX(TexCoord2f))
-GL_PREFIX(TexCoord2f):
+GLOBL_FN(GL_PREFIX(PixelZoom))
+GL_PREFIX(PixelZoom):
MOV_L(GLNAME(_glapi_Dispatch), EAX)
TEST_L(EAX, EAX)
- JZ(GLNAME(_glapi_fallback_TexCoord2f))
- JMP(GL_OFFSET(_gloffset_TexCoord2f))
+ JZ(GLNAME(_glapi_fallback_PixelZoom))
+ JMP(GL_OFFSET(_gloffset_PixelZoom))
ALIGNTEXT16
-GLOBL_FN(GL_PREFIX(TexCoord2s))
-GL_PREFIX(TexCoord2s):
+GLOBL_FN(GL_PREFIX(PixelTransferf))
+GL_PREFIX(PixelTransferf):
MOV_L(GLNAME(_glapi_Dispatch), EAX)
TEST_L(EAX, EAX)
- JZ(GLNAME(_glapi_fallback_TexCoord2s))
- JMP(GL_OFFSET(_gloffset_TexCoord2s))
+ JZ(GLNAME(_glapi_fallback_PixelTransferf))
+ JMP(GL_OFFSET(_gloffset_PixelTransferf))
ALIGNTEXT16
-GLOBL_FN(GL_PREFIX(TexCoord2i))
-GL_PREFIX(TexCoord2i):
+GLOBL_FN(GL_PREFIX(PixelTransferi))
+GL_PREFIX(PixelTransferi):
MOV_L(GLNAME(_glapi_Dispatch), EAX)
TEST_L(EAX, EAX)
- JZ(GLNAME(_glapi_fallback_TexCoord2i))
- JMP(GL_OFFSET(_gloffset_TexCoord2i))
+ JZ(GLNAME(_glapi_fallback_PixelTransferi))
+ JMP(GL_OFFSET(_gloffset_PixelTransferi))
ALIGNTEXT16
-GLOBL_FN(GL_PREFIX(TexCoord3d))
-GL_PREFIX(TexCoord3d):
+GLOBL_FN(GL_PREFIX(PixelStoref))
+GL_PREFIX(PixelStoref):
MOV_L(GLNAME(_glapi_Dispatch), EAX)
TEST_L(EAX, EAX)
- JZ(GLNAME(_glapi_fallback_TexCoord3d))
- JMP(GL_OFFSET(_gloffset_TexCoord3d))
+ JZ(GLNAME(_glapi_fallback_PixelStoref))
+ JMP(GL_OFFSET(_gloffset_PixelStoref))
ALIGNTEXT16
-GLOBL_FN(GL_PREFIX(TexCoord3f))
-GL_PREFIX(TexCoord3f):
+GLOBL_FN(GL_PREFIX(PixelStorei))
+GL_PREFIX(PixelStorei):
MOV_L(GLNAME(_glapi_Dispatch), EAX)
TEST_L(EAX, EAX)
- JZ(GLNAME(_glapi_fallback_TexCoord3f))
- JMP(GL_OFFSET(_gloffset_TexCoord3f))
+ JZ(GLNAME(_glapi_fallback_PixelStorei))
+ JMP(GL_OFFSET(_gloffset_PixelStorei))
ALIGNTEXT16
-GLOBL_FN(GL_PREFIX(TexCoord3i))
-GL_PREFIX(TexCoord3i):
+GLOBL_FN(GL_PREFIX(PixelMapfv))
+GL_PREFIX(PixelMapfv):
MOV_L(GLNAME(_glapi_Dispatch), EAX)
TEST_L(EAX, EAX)
- JZ(GLNAME(_glapi_fallback_TexCoord3i))
- JMP(GL_OFFSET(_gloffset_TexCoord3i))
+ JZ(GLNAME(_glapi_fallback_PixelMapfv))
+ JMP(GL_OFFSET(_gloffset_PixelMapfv))
ALIGNTEXT16
-GLOBL_FN(GL_PREFIX(TexCoord3s))
-GL_PREFIX(TexCoord3s):
+GLOBL_FN(GL_PREFIX(PixelMapuiv))
+GL_PREFIX(PixelMapuiv):
MOV_L(GLNAME(_glapi_Dispatch), EAX)
TEST_L(EAX, EAX)
- JZ(GLNAME(_glapi_fallback_TexCoord3s))
- JMP(GL_OFFSET(_gloffset_TexCoord3s))
+ JZ(GLNAME(_glapi_fallback_PixelMapuiv))
+ JMP(GL_OFFSET(_gloffset_PixelMapuiv))
ALIGNTEXT16
-GLOBL_FN(GL_PREFIX(TexCoord4d))
-GL_PREFIX(TexCoord4d):
+GLOBL_FN(GL_PREFIX(PixelMapusv))
+GL_PREFIX(PixelMapusv):
MOV_L(GLNAME(_glapi_Dispatch), EAX)
TEST_L(EAX, EAX)
- JZ(GLNAME(_glapi_fallback_TexCoord4d))
- JMP(GL_OFFSET(_gloffset_TexCoord4d))
+ JZ(GLNAME(_glapi_fallback_PixelMapusv))
+ JMP(GL_OFFSET(_gloffset_PixelMapusv))
ALIGNTEXT16
-GLOBL_FN(GL_PREFIX(TexCoord4f))
-GL_PREFIX(TexCoord4f):
+GLOBL_FN(GL_PREFIX(ReadBuffer))
+GL_PREFIX(ReadBuffer):
MOV_L(GLNAME(_glapi_Dispatch), EAX)
TEST_L(EAX, EAX)
- JZ(GLNAME(_glapi_fallback_TexCoord4f))
- JMP(GL_OFFSET(_gloffset_TexCoord4f))
+ JZ(GLNAME(_glapi_fallback_ReadBuffer))
+ JMP(GL_OFFSET(_gloffset_ReadBuffer))
ALIGNTEXT16
-GLOBL_FN(GL_PREFIX(TexCoord4i))
-GL_PREFIX(TexCoord4i):
+GLOBL_FN(GL_PREFIX(CopyPixels))
+GL_PREFIX(CopyPixels):
MOV_L(GLNAME(_glapi_Dispatch), EAX)
TEST_L(EAX, EAX)
- JZ(GLNAME(_glapi_fallback_TexCoord4i))
- JMP(GL_OFFSET(_gloffset_TexCoord4i))
+ JZ(GLNAME(_glapi_fallback_CopyPixels))
+ JMP(GL_OFFSET(_gloffset_CopyPixels))
ALIGNTEXT16
-GLOBL_FN(GL_PREFIX(TexCoord4s))
-GL_PREFIX(TexCoord4s):
+GLOBL_FN(GL_PREFIX(ReadPixels))
+GL_PREFIX(ReadPixels):
MOV_L(GLNAME(_glapi_Dispatch), EAX)
TEST_L(EAX, EAX)
- JZ(GLNAME(_glapi_fallback_TexCoord4s))
- JMP(GL_OFFSET(_gloffset_TexCoord4s))
+ JZ(GLNAME(_glapi_fallback_ReadPixels))
+ JMP(GL_OFFSET(_gloffset_ReadPixels))
ALIGNTEXT16
-GLOBL_FN(GL_PREFIX(TexCoord1dv))
-GL_PREFIX(TexCoord1dv):
+GLOBL_FN(GL_PREFIX(DrawPixels))
+GL_PREFIX(DrawPixels):
MOV_L(GLNAME(_glapi_Dispatch), EAX)
TEST_L(EAX, EAX)
- JZ(GLNAME(_glapi_fallback_TexCoord1dv))
- JMP(GL_OFFSET(_gloffset_TexCoord1dv))
+ JZ(GLNAME(_glapi_fallback_DrawPixels))
+ JMP(GL_OFFSET(_gloffset_DrawPixels))
ALIGNTEXT16
-GLOBL_FN(GL_PREFIX(TexCoord1fv))
-GL_PREFIX(TexCoord1fv):
+GLOBL_FN(GL_PREFIX(GetBooleanv))
+GL_PREFIX(GetBooleanv):
MOV_L(GLNAME(_glapi_Dispatch), EAX)
TEST_L(EAX, EAX)
- JZ(GLNAME(_glapi_fallback_TexCoord1fv))
- JMP(GL_OFFSET(_gloffset_TexCoord1fv))
+ JZ(GLNAME(_glapi_fallback_GetBooleanv))
+ JMP(GL_OFFSET(_gloffset_GetBooleanv))
ALIGNTEXT16
-GLOBL_FN(GL_PREFIX(TexCoord1iv))
-GL_PREFIX(TexCoord1iv):
+GLOBL_FN(GL_PREFIX(GetClipPlane))
+GL_PREFIX(GetClipPlane):
MOV_L(GLNAME(_glapi_Dispatch), EAX)
TEST_L(EAX, EAX)
- JZ(GLNAME(_glapi_fallback_TexCoord1iv))
- JMP(GL_OFFSET(_gloffset_TexCoord1iv))
+ JZ(GLNAME(_glapi_fallback_GetClipPlane))
+ JMP(GL_OFFSET(_gloffset_GetClipPlane))
ALIGNTEXT16
-GLOBL_FN(GL_PREFIX(TexCoord1sv))
-GL_PREFIX(TexCoord1sv):
+GLOBL_FN(GL_PREFIX(GetDoublev))
+GL_PREFIX(GetDoublev):
MOV_L(GLNAME(_glapi_Dispatch), EAX)
TEST_L(EAX, EAX)
- JZ(GLNAME(_glapi_fallback_TexCoord1sv))
- JMP(GL_OFFSET(_gloffset_TexCoord1sv))
+ JZ(GLNAME(_glapi_fallback_GetDoublev))
+ JMP(GL_OFFSET(_gloffset_GetDoublev))
ALIGNTEXT16
-GLOBL_FN(GL_PREFIX(TexCoord2dv))
-GL_PREFIX(TexCoord2dv):
+GLOBL_FN(GL_PREFIX(GetError))
+GL_PREFIX(GetError):
MOV_L(GLNAME(_glapi_Dispatch), EAX)
TEST_L(EAX, EAX)
- JZ(GLNAME(_glapi_fallback_TexCoord2dv))
- JMP(GL_OFFSET(_gloffset_TexCoord2dv))
+ JZ(GLNAME(_glapi_fallback_GetError))
+ JMP(GL_OFFSET(_gloffset_GetError))
ALIGNTEXT16
-GLOBL_FN(GL_PREFIX(TexCoord2fv))
-GL_PREFIX(TexCoord2fv):
+GLOBL_FN(GL_PREFIX(GetFloatv))
+GL_PREFIX(GetFloatv):
MOV_L(GLNAME(_glapi_Dispatch), EAX)
TEST_L(EAX, EAX)
- JZ(GLNAME(_glapi_fallback_TexCoord2fv))
- JMP(GL_OFFSET(_gloffset_TexCoord2fv))
+ JZ(GLNAME(_glapi_fallback_GetFloatv))
+ JMP(GL_OFFSET(_gloffset_GetFloatv))
ALIGNTEXT16
-GLOBL_FN(GL_PREFIX(TexCoord2iv))
-GL_PREFIX(TexCoord2iv):
+GLOBL_FN(GL_PREFIX(GetIntegerv))
+GL_PREFIX(GetIntegerv):
MOV_L(GLNAME(_glapi_Dispatch), EAX)
TEST_L(EAX, EAX)
- JZ(GLNAME(_glapi_fallback_TexCoord2iv))
- JMP(GL_OFFSET(_gloffset_TexCoord2iv))
+ JZ(GLNAME(_glapi_fallback_GetIntegerv))
+ JMP(GL_OFFSET(_gloffset_GetIntegerv))
ALIGNTEXT16
-GLOBL_FN(GL_PREFIX(TexCoord2sv))
-GL_PREFIX(TexCoord2sv):
+GLOBL_FN(GL_PREFIX(GetLightfv))
+GL_PREFIX(GetLightfv):
MOV_L(GLNAME(_glapi_Dispatch), EAX)
TEST_L(EAX, EAX)
- JZ(GLNAME(_glapi_fallback_TexCoord2sv))
- JMP(GL_OFFSET(_gloffset_TexCoord2sv))
+ JZ(GLNAME(_glapi_fallback_GetLightfv))
+ JMP(GL_OFFSET(_gloffset_GetLightfv))
ALIGNTEXT16
-GLOBL_FN(GL_PREFIX(TexCoord3dv))
-GL_PREFIX(TexCoord3dv):
+GLOBL_FN(GL_PREFIX(GetLightiv))
+GL_PREFIX(GetLightiv):
MOV_L(GLNAME(_glapi_Dispatch), EAX)
TEST_L(EAX, EAX)
- JZ(GLNAME(_glapi_fallback_TexCoord3dv))
- JMP(GL_OFFSET(_gloffset_TexCoord3dv))
+ JZ(GLNAME(_glapi_fallback_GetLightiv))
+ JMP(GL_OFFSET(_gloffset_GetLightiv))
ALIGNTEXT16
-GLOBL_FN(GL_PREFIX(TexCoord3fv))
-GL_PREFIX(TexCoord3fv):
+GLOBL_FN(GL_PREFIX(GetMapdv))
+GL_PREFIX(GetMapdv):
MOV_L(GLNAME(_glapi_Dispatch), EAX)
TEST_L(EAX, EAX)
- JZ(GLNAME(_glapi_fallback_TexCoord3fv))
- JMP(GL_OFFSET(_gloffset_TexCoord3fv))
+ JZ(GLNAME(_glapi_fallback_GetMapdv))
+ JMP(GL_OFFSET(_gloffset_GetMapdv))
ALIGNTEXT16
-GLOBL_FN(GL_PREFIX(TexCoord3iv))
-GL_PREFIX(TexCoord3iv):
+GLOBL_FN(GL_PREFIX(GetMapfv))
+GL_PREFIX(GetMapfv):
MOV_L(GLNAME(_glapi_Dispatch), EAX)
TEST_L(EAX, EAX)
- JZ(GLNAME(_glapi_fallback_TexCoord3iv))
- JMP(GL_OFFSET(_gloffset_TexCoord3iv))
+ JZ(GLNAME(_glapi_fallback_GetMapfv))
+ JMP(GL_OFFSET(_gloffset_GetMapfv))
ALIGNTEXT16
-GLOBL_FN(GL_PREFIX(TexCoord3sv))
-GL_PREFIX(TexCoord3sv):
+GLOBL_FN(GL_PREFIX(GetMapiv))
+GL_PREFIX(GetMapiv):
MOV_L(GLNAME(_glapi_Dispatch), EAX)
TEST_L(EAX, EAX)
- JZ(GLNAME(_glapi_fallback_TexCoord3sv))
- JMP(GL_OFFSET(_gloffset_TexCoord3sv))
+ JZ(GLNAME(_glapi_fallback_GetMapiv))
+ JMP(GL_OFFSET(_gloffset_GetMapiv))
ALIGNTEXT16
-GLOBL_FN(GL_PREFIX(TexCoord4dv))
-GL_PREFIX(TexCoord4dv):
+GLOBL_FN(GL_PREFIX(GetMaterialfv))
+GL_PREFIX(GetMaterialfv):
MOV_L(GLNAME(_glapi_Dispatch), EAX)
TEST_L(EAX, EAX)
- JZ(GLNAME(_glapi_fallback_TexCoord4dv))
- JMP(GL_OFFSET(_gloffset_TexCoord4dv))
+ JZ(GLNAME(_glapi_fallback_GetMaterialfv))
+ JMP(GL_OFFSET(_gloffset_GetMaterialfv))
ALIGNTEXT16
-GLOBL_FN(GL_PREFIX(TexCoord4fv))
-GL_PREFIX(TexCoord4fv):
+GLOBL_FN(GL_PREFIX(GetMaterialiv))
+GL_PREFIX(GetMaterialiv):
MOV_L(GLNAME(_glapi_Dispatch), EAX)
TEST_L(EAX, EAX)
- JZ(GLNAME(_glapi_fallback_TexCoord4fv))
- JMP(GL_OFFSET(_gloffset_TexCoord4fv))
+ JZ(GLNAME(_glapi_fallback_GetMaterialiv))
+ JMP(GL_OFFSET(_gloffset_GetMaterialiv))
ALIGNTEXT16
-GLOBL_FN(GL_PREFIX(TexCoord4iv))
-GL_PREFIX(TexCoord4iv):
+GLOBL_FN(GL_PREFIX(GetPixelMapfv))
+GL_PREFIX(GetPixelMapfv):
MOV_L(GLNAME(_glapi_Dispatch), EAX)
TEST_L(EAX, EAX)
- JZ(GLNAME(_glapi_fallback_TexCoord4iv))
- JMP(GL_OFFSET(_gloffset_TexCoord4iv))
+ JZ(GLNAME(_glapi_fallback_GetPixelMapfv))
+ JMP(GL_OFFSET(_gloffset_GetPixelMapfv))
ALIGNTEXT16
-GLOBL_FN(GL_PREFIX(TexCoord4sv))
-GL_PREFIX(TexCoord4sv):
+GLOBL_FN(GL_PREFIX(GetPixelMapuiv))
+GL_PREFIX(GetPixelMapuiv):
MOV_L(GLNAME(_glapi_Dispatch), EAX)
TEST_L(EAX, EAX)
- JZ(GLNAME(_glapi_fallback_TexCoord4sv))
- JMP(GL_OFFSET(_gloffset_TexCoord4sv))
+ JZ(GLNAME(_glapi_fallback_GetPixelMapuiv))
+ JMP(GL_OFFSET(_gloffset_GetPixelMapuiv))
ALIGNTEXT16
-GLOBL_FN(GL_PREFIX(TexGend))
-GL_PREFIX(TexGend):
+GLOBL_FN(GL_PREFIX(GetPixelMapusv))
+GL_PREFIX(GetPixelMapusv):
MOV_L(GLNAME(_glapi_Dispatch), EAX)
TEST_L(EAX, EAX)
- JZ(GLNAME(_glapi_fallback_TexGend))
- JMP(GL_OFFSET(_gloffset_TexGend))
+ JZ(GLNAME(_glapi_fallback_GetPixelMapusv))
+ JMP(GL_OFFSET(_gloffset_GetPixelMapusv))
ALIGNTEXT16
-GLOBL_FN(GL_PREFIX(TexGendv))
-GL_PREFIX(TexGendv):
+GLOBL_FN(GL_PREFIX(GetPolygonStipple))
+GL_PREFIX(GetPolygonStipple):
MOV_L(GLNAME(_glapi_Dispatch), EAX)
TEST_L(EAX, EAX)
- JZ(GLNAME(_glapi_fallback_TexGendv))
- JMP(GL_OFFSET(_gloffset_TexGendv))
+ JZ(GLNAME(_glapi_fallback_GetPolygonStipple))
+ JMP(GL_OFFSET(_gloffset_GetPolygonStipple))
ALIGNTEXT16
-GLOBL_FN(GL_PREFIX(TexGenf))
-GL_PREFIX(TexGenf):
+GLOBL_FN(GL_PREFIX(GetString))
+GL_PREFIX(GetString):
MOV_L(GLNAME(_glapi_Dispatch), EAX)
TEST_L(EAX, EAX)
- JZ(GLNAME(_glapi_fallback_TexGenf))
- JMP(GL_OFFSET(_gloffset_TexGenf))
+ JZ(GLNAME(_glapi_fallback_GetString))
+ JMP(GL_OFFSET(_gloffset_GetString))
ALIGNTEXT16
-GLOBL_FN(GL_PREFIX(TexGenfv))
-GL_PREFIX(TexGenfv):
+GLOBL_FN(GL_PREFIX(GetTexEnvfv))
+GL_PREFIX(GetTexEnvfv):
MOV_L(GLNAME(_glapi_Dispatch), EAX)
TEST_L(EAX, EAX)
- JZ(GLNAME(_glapi_fallback_TexGenfv))
- JMP(GL_OFFSET(_gloffset_TexGenfv))
+ JZ(GLNAME(_glapi_fallback_GetTexEnvfv))
+ JMP(GL_OFFSET(_gloffset_GetTexEnvfv))
ALIGNTEXT16
-GLOBL_FN(GL_PREFIX(TexGeni))
-GL_PREFIX(TexGeni):
+GLOBL_FN(GL_PREFIX(GetTexEnviv))
+GL_PREFIX(GetTexEnviv):
MOV_L(GLNAME(_glapi_Dispatch), EAX)
TEST_L(EAX, EAX)
- JZ(GLNAME(_glapi_fallback_TexGeni))
- JMP(GL_OFFSET(_gloffset_TexGeni))
+ JZ(GLNAME(_glapi_fallback_GetTexEnviv))
+ JMP(GL_OFFSET(_gloffset_GetTexEnviv))
ALIGNTEXT16
-GLOBL_FN(GL_PREFIX(TexGeniv))
-GL_PREFIX(TexGeniv):
+GLOBL_FN(GL_PREFIX(GetTexGendv))
+GL_PREFIX(GetTexGendv):
MOV_L(GLNAME(_glapi_Dispatch), EAX)
TEST_L(EAX, EAX)
- JZ(GLNAME(_glapi_fallback_TexGeniv))
- JMP(GL_OFFSET(_gloffset_TexGeniv))
+ JZ(GLNAME(_glapi_fallback_GetTexGendv))
+ JMP(GL_OFFSET(_gloffset_GetTexGendv))
ALIGNTEXT16
-GLOBL_FN(GL_PREFIX(TexEnvf))
-GL_PREFIX(TexEnvf):
+GLOBL_FN(GL_PREFIX(GetTexGenfv))
+GL_PREFIX(GetTexGenfv):
MOV_L(GLNAME(_glapi_Dispatch), EAX)
TEST_L(EAX, EAX)
- JZ(GLNAME(_glapi_fallback_TexEnvf))
- JMP(GL_OFFSET(_gloffset_TexEnvf))
+ JZ(GLNAME(_glapi_fallback_GetTexGenfv))
+ JMP(GL_OFFSET(_gloffset_GetTexGenfv))
ALIGNTEXT16
-GLOBL_FN(GL_PREFIX(TexEnvfv))
-GL_PREFIX(TexEnvfv):
+GLOBL_FN(GL_PREFIX(GetTexGeniv))
+GL_PREFIX(GetTexGeniv):
MOV_L(GLNAME(_glapi_Dispatch), EAX)
TEST_L(EAX, EAX)
- JZ(GLNAME(_glapi_fallback_TexEnvfv))
- JMP(GL_OFFSET(_gloffset_TexEnvfv))
+ JZ(GLNAME(_glapi_fallback_GetTexGeniv))
+ JMP(GL_OFFSET(_gloffset_GetTexGeniv))
ALIGNTEXT16
-GLOBL_FN(GL_PREFIX(TexEnvi))
-GL_PREFIX(TexEnvi):
+GLOBL_FN(GL_PREFIX(GetTexImage))
+GL_PREFIX(GetTexImage):
MOV_L(GLNAME(_glapi_Dispatch), EAX)
TEST_L(EAX, EAX)
- JZ(GLNAME(_glapi_fallback_TexEnvi))
- JMP(GL_OFFSET(_gloffset_TexEnvi))
+ JZ(GLNAME(_glapi_fallback_GetTexImage))
+ JMP(GL_OFFSET(_gloffset_GetTexImage))
ALIGNTEXT16
-GLOBL_FN(GL_PREFIX(TexEnviv))
-GL_PREFIX(TexEnviv):
+GLOBL_FN(GL_PREFIX(GetTexParameterfv))
+GL_PREFIX(GetTexParameterfv):
MOV_L(GLNAME(_glapi_Dispatch), EAX)
TEST_L(EAX, EAX)
- JZ(GLNAME(_glapi_fallback_TexEnviv))
- JMP(GL_OFFSET(_gloffset_TexEnviv))
+ JZ(GLNAME(_glapi_fallback_GetTexParameterfv))
+ JMP(GL_OFFSET(_gloffset_GetTexParameterfv))
ALIGNTEXT16
-GLOBL_FN(GL_PREFIX(TexImage1D))
-GL_PREFIX(TexImage1D):
+GLOBL_FN(GL_PREFIX(GetTexParameteriv))
+GL_PREFIX(GetTexParameteriv):
MOV_L(GLNAME(_glapi_Dispatch), EAX)
TEST_L(EAX, EAX)
- JZ(GLNAME(_glapi_fallback_TexImage1D))
- JMP(GL_OFFSET(_gloffset_TexImage1D))
+ JZ(GLNAME(_glapi_fallback_GetTexParameteriv))
+ JMP(GL_OFFSET(_gloffset_GetTexParameteriv))
ALIGNTEXT16
-GLOBL_FN(GL_PREFIX(TexImage2D))
-GL_PREFIX(TexImage2D):
+GLOBL_FN(GL_PREFIX(GetTexLevelParameterfv))
+GL_PREFIX(GetTexLevelParameterfv):
MOV_L(GLNAME(_glapi_Dispatch), EAX)
TEST_L(EAX, EAX)
- JZ(GLNAME(_glapi_fallback_TexImage2D))
- JMP(GL_OFFSET(_gloffset_TexImage2D))
+ JZ(GLNAME(_glapi_fallback_GetTexLevelParameterfv))
+ JMP(GL_OFFSET(_gloffset_GetTexLevelParameterfv))
ALIGNTEXT16
-GLOBL_FN(GL_PREFIX(TexParameterf))
-GL_PREFIX(TexParameterf):
+GLOBL_FN(GL_PREFIX(GetTexLevelParameteriv))
+GL_PREFIX(GetTexLevelParameteriv):
MOV_L(GLNAME(_glapi_Dispatch), EAX)
TEST_L(EAX, EAX)
- JZ(GLNAME(_glapi_fallback_TexParameterf))
- JMP(GL_OFFSET(_gloffset_TexParameterf))
+ JZ(GLNAME(_glapi_fallback_GetTexLevelParameteriv))
+ JMP(GL_OFFSET(_gloffset_GetTexLevelParameteriv))
ALIGNTEXT16
-GLOBL_FN(GL_PREFIX(TexParameterfv))
-GL_PREFIX(TexParameterfv):
+GLOBL_FN(GL_PREFIX(IsEnabled))
+GL_PREFIX(IsEnabled):
MOV_L(GLNAME(_glapi_Dispatch), EAX)
TEST_L(EAX, EAX)
- JZ(GLNAME(_glapi_fallback_TexParameterfv))
- JMP(GL_OFFSET(_gloffset_TexParameterfv))
+ JZ(GLNAME(_glapi_fallback_IsEnabled))
+ JMP(GL_OFFSET(_gloffset_IsEnabled))
ALIGNTEXT16
-GLOBL_FN(GL_PREFIX(TexParameteri))
-GL_PREFIX(TexParameteri):
+GLOBL_FN(GL_PREFIX(IsList))
+GL_PREFIX(IsList):
MOV_L(GLNAME(_glapi_Dispatch), EAX)
TEST_L(EAX, EAX)
- JZ(GLNAME(_glapi_fallback_TexParameteri))
- JMP(GL_OFFSET(_gloffset_TexParameteri))
+ JZ(GLNAME(_glapi_fallback_IsList))
+ JMP(GL_OFFSET(_gloffset_IsList))
ALIGNTEXT16
-GLOBL_FN(GL_PREFIX(TexParameteriv))
-GL_PREFIX(TexParameteriv):
+GLOBL_FN(GL_PREFIX(DepthRange))
+GL_PREFIX(DepthRange):
MOV_L(GLNAME(_glapi_Dispatch), EAX)
TEST_L(EAX, EAX)
- JZ(GLNAME(_glapi_fallback_TexParameteriv))
- JMP(GL_OFFSET(_gloffset_TexParameteriv))
+ JZ(GLNAME(_glapi_fallback_DepthRange))
+ JMP(GL_OFFSET(_gloffset_DepthRange))
ALIGNTEXT16
-GLOBL_FN(GL_PREFIX(Translated))
-GL_PREFIX(Translated):
+GLOBL_FN(GL_PREFIX(Frustum))
+GL_PREFIX(Frustum):
MOV_L(GLNAME(_glapi_Dispatch), EAX)
TEST_L(EAX, EAX)
- JZ(GLNAME(_glapi_fallback_Translated))
- JMP(GL_OFFSET(_gloffset_Translated))
+ JZ(GLNAME(_glapi_fallback_Frustum))
+ JMP(GL_OFFSET(_gloffset_Frustum))
ALIGNTEXT16
-GLOBL_FN(GL_PREFIX(Translatef))
-GL_PREFIX(Translatef):
+GLOBL_FN(GL_PREFIX(LoadIdentity))
+GL_PREFIX(LoadIdentity):
MOV_L(GLNAME(_glapi_Dispatch), EAX)
TEST_L(EAX, EAX)
- JZ(GLNAME(_glapi_fallback_Translatef))
- JMP(GL_OFFSET(_gloffset_Translatef))
+ JZ(GLNAME(_glapi_fallback_LoadIdentity))
+ JMP(GL_OFFSET(_gloffset_LoadIdentity))
ALIGNTEXT16
-GLOBL_FN(GL_PREFIX(Vertex2d))
-GL_PREFIX(Vertex2d):
+GLOBL_FN(GL_PREFIX(LoadMatrixf))
+GL_PREFIX(LoadMatrixf):
MOV_L(GLNAME(_glapi_Dispatch), EAX)
TEST_L(EAX, EAX)
- JZ(GLNAME(_glapi_fallback_Vertex2d))
- JMP(GL_OFFSET(_gloffset_Vertex2d))
+ JZ(GLNAME(_glapi_fallback_LoadMatrixf))
+ JMP(GL_OFFSET(_gloffset_LoadMatrixf))
ALIGNTEXT16
-GLOBL_FN(GL_PREFIX(Vertex2dv))
-GL_PREFIX(Vertex2dv):
+GLOBL_FN(GL_PREFIX(LoadMatrixd))
+GL_PREFIX(LoadMatrixd):
MOV_L(GLNAME(_glapi_Dispatch), EAX)
TEST_L(EAX, EAX)
- JZ(GLNAME(_glapi_fallback_Vertex2dv))
- JMP(GL_OFFSET(_gloffset_Vertex2dv))
+ JZ(GLNAME(_glapi_fallback_LoadMatrixd))
+ JMP(GL_OFFSET(_gloffset_LoadMatrixd))
ALIGNTEXT16
-GLOBL_FN(GL_PREFIX(Vertex2f))
-GL_PREFIX(Vertex2f):
+GLOBL_FN(GL_PREFIX(MatrixMode))
+GL_PREFIX(MatrixMode):
MOV_L(GLNAME(_glapi_Dispatch), EAX)
TEST_L(EAX, EAX)
- JZ(GLNAME(_glapi_fallback_Vertex2f))
- JMP(GL_OFFSET(_gloffset_Vertex2f))
+ JZ(GLNAME(_glapi_fallback_MatrixMode))
+ JMP(GL_OFFSET(_gloffset_MatrixMode))
ALIGNTEXT16
-GLOBL_FN(GL_PREFIX(Vertex2fv))
-GL_PREFIX(Vertex2fv):
+GLOBL_FN(GL_PREFIX(MultMatrixf))
+GL_PREFIX(MultMatrixf):
MOV_L(GLNAME(_glapi_Dispatch), EAX)
TEST_L(EAX, EAX)
- JZ(GLNAME(_glapi_fallback_Vertex2fv))
- JMP(GL_OFFSET(_gloffset_Vertex2fv))
+ JZ(GLNAME(_glapi_fallback_MultMatrixf))
+ JMP(GL_OFFSET(_gloffset_MultMatrixf))
ALIGNTEXT16
-GLOBL_FN(GL_PREFIX(Vertex2i))
-GL_PREFIX(Vertex2i):
+GLOBL_FN(GL_PREFIX(MultMatrixd))
+GL_PREFIX(MultMatrixd):
MOV_L(GLNAME(_glapi_Dispatch), EAX)
TEST_L(EAX, EAX)
- JZ(GLNAME(_glapi_fallback_Vertex2i))
- JMP(GL_OFFSET(_gloffset_Vertex2i))
+ JZ(GLNAME(_glapi_fallback_MultMatrixd))
+ JMP(GL_OFFSET(_gloffset_MultMatrixd))
ALIGNTEXT16
-GLOBL_FN(GL_PREFIX(Vertex2iv))
-GL_PREFIX(Vertex2iv):
+GLOBL_FN(GL_PREFIX(Ortho))
+GL_PREFIX(Ortho):
MOV_L(GLNAME(_glapi_Dispatch), EAX)
TEST_L(EAX, EAX)
- JZ(GLNAME(_glapi_fallback_Vertex2iv))
- JMP(GL_OFFSET(_gloffset_Vertex2iv))
+ JZ(GLNAME(_glapi_fallback_Ortho))
+ JMP(GL_OFFSET(_gloffset_Ortho))
ALIGNTEXT16
-GLOBL_FN(GL_PREFIX(Vertex2s))
-GL_PREFIX(Vertex2s):
+GLOBL_FN(GL_PREFIX(PopMatrix))
+GL_PREFIX(PopMatrix):
MOV_L(GLNAME(_glapi_Dispatch), EAX)
TEST_L(EAX, EAX)
- JZ(GLNAME(_glapi_fallback_Vertex2s))
- JMP(GL_OFFSET(_gloffset_Vertex2s))
+ JZ(GLNAME(_glapi_fallback_PopMatrix))
+ JMP(GL_OFFSET(_gloffset_PopMatrix))
ALIGNTEXT16
-GLOBL_FN(GL_PREFIX(Vertex2sv))
-GL_PREFIX(Vertex2sv):
+GLOBL_FN(GL_PREFIX(PushMatrix))
+GL_PREFIX(PushMatrix):
MOV_L(GLNAME(_glapi_Dispatch), EAX)
TEST_L(EAX, EAX)
- JZ(GLNAME(_glapi_fallback_Vertex2sv))
- JMP(GL_OFFSET(_gloffset_Vertex2sv))
+ JZ(GLNAME(_glapi_fallback_PushMatrix))
+ JMP(GL_OFFSET(_gloffset_PushMatrix))
ALIGNTEXT16
-GLOBL_FN(GL_PREFIX(Vertex3d))
-GL_PREFIX(Vertex3d):
+GLOBL_FN(GL_PREFIX(Rotated))
+GL_PREFIX(Rotated):
MOV_L(GLNAME(_glapi_Dispatch), EAX)
TEST_L(EAX, EAX)
- JZ(GLNAME(_glapi_fallback_Vertex3d))
- JMP(GL_OFFSET(_gloffset_Vertex3d))
+ JZ(GLNAME(_glapi_fallback_Rotated))
+ JMP(GL_OFFSET(_gloffset_Rotated))
ALIGNTEXT16
-GLOBL_FN(GL_PREFIX(Vertex3dv))
-GL_PREFIX(Vertex3dv):
+GLOBL_FN(GL_PREFIX(Rotatef))
+GL_PREFIX(Rotatef):
MOV_L(GLNAME(_glapi_Dispatch), EAX)
TEST_L(EAX, EAX)
- JZ(GLNAME(_glapi_fallback_Vertex3dv))
- JMP(GL_OFFSET(_gloffset_Vertex3dv))
+ JZ(GLNAME(_glapi_fallback_Rotatef))
+ JMP(GL_OFFSET(_gloffset_Rotatef))
ALIGNTEXT16
-GLOBL_FN(GL_PREFIX(Vertex3f))
-GL_PREFIX(Vertex3f):
+GLOBL_FN(GL_PREFIX(Scaled))
+GL_PREFIX(Scaled):
MOV_L(GLNAME(_glapi_Dispatch), EAX)
TEST_L(EAX, EAX)
- JZ(GLNAME(_glapi_fallback_Vertex3f))
- JMP(GL_OFFSET(_gloffset_Vertex3f))
+ JZ(GLNAME(_glapi_fallback_Scaled))
+ JMP(GL_OFFSET(_gloffset_Scaled))
ALIGNTEXT16
-GLOBL_FN(GL_PREFIX(Vertex3fv))
-GL_PREFIX(Vertex3fv):
+GLOBL_FN(GL_PREFIX(Scalef))
+GL_PREFIX(Scalef):
MOV_L(GLNAME(_glapi_Dispatch), EAX)
TEST_L(EAX, EAX)
- JZ(GLNAME(_glapi_fallback_Vertex3fv))
- JMP(GL_OFFSET(_gloffset_Vertex3fv))
+ JZ(GLNAME(_glapi_fallback_Scalef))
+ JMP(GL_OFFSET(_gloffset_Scalef))
ALIGNTEXT16
-GLOBL_FN(GL_PREFIX(Vertex3i))
-GL_PREFIX(Vertex3i):
+GLOBL_FN(GL_PREFIX(Translated))
+GL_PREFIX(Translated):
MOV_L(GLNAME(_glapi_Dispatch), EAX)
TEST_L(EAX, EAX)
- JZ(GLNAME(_glapi_fallback_Vertex3i))
- JMP(GL_OFFSET(_gloffset_Vertex3i))
+ JZ(GLNAME(_glapi_fallback_Translated))
+ JMP(GL_OFFSET(_gloffset_Translated))
ALIGNTEXT16
-GLOBL_FN(GL_PREFIX(Vertex3iv))
-GL_PREFIX(Vertex3iv):
+GLOBL_FN(GL_PREFIX(Translatef))
+GL_PREFIX(Translatef):
MOV_L(GLNAME(_glapi_Dispatch), EAX)
TEST_L(EAX, EAX)
- JZ(GLNAME(_glapi_fallback_Vertex3iv))
- JMP(GL_OFFSET(_gloffset_Vertex3iv))
+ JZ(GLNAME(_glapi_fallback_Translatef))
+ JMP(GL_OFFSET(_gloffset_Translatef))
ALIGNTEXT16
-GLOBL_FN(GL_PREFIX(Vertex3s))
-GL_PREFIX(Vertex3s):
+GLOBL_FN(GL_PREFIX(Viewport))
+GL_PREFIX(Viewport):
MOV_L(GLNAME(_glapi_Dispatch), EAX)
TEST_L(EAX, EAX)
- JZ(GLNAME(_glapi_fallback_Vertex3s))
- JMP(GL_OFFSET(_gloffset_Vertex3s))
+ JZ(GLNAME(_glapi_fallback_Viewport))
+ JMP(GL_OFFSET(_gloffset_Viewport))
ALIGNTEXT16
-GLOBL_FN(GL_PREFIX(Vertex3sv))
-GL_PREFIX(Vertex3sv):
+GLOBL_FN(GL_PREFIX(ArrayElement))
+GL_PREFIX(ArrayElement):
MOV_L(GLNAME(_glapi_Dispatch), EAX)
TEST_L(EAX, EAX)
- JZ(GLNAME(_glapi_fallback_Vertex3sv))
- JMP(GL_OFFSET(_gloffset_Vertex3sv))
+ JZ(GLNAME(_glapi_fallback_ArrayElement))
+ JMP(GL_OFFSET(_gloffset_ArrayElement))
ALIGNTEXT16
-GLOBL_FN(GL_PREFIX(Vertex4d))
-GL_PREFIX(Vertex4d):
+GLOBL_FN(GL_PREFIX(ColorPointer))
+GL_PREFIX(ColorPointer):
MOV_L(GLNAME(_glapi_Dispatch), EAX)
TEST_L(EAX, EAX)
- JZ(GLNAME(_glapi_fallback_Vertex4d))
- JMP(GL_OFFSET(_gloffset_Vertex4d))
+ JZ(GLNAME(_glapi_fallback_ColorPointer))
+ JMP(GL_OFFSET(_gloffset_ColorPointer))
ALIGNTEXT16
-GLOBL_FN(GL_PREFIX(Vertex4dv))
-GL_PREFIX(Vertex4dv):
+GLOBL_FN(GL_PREFIX(DisableClientState))
+GL_PREFIX(DisableClientState):
MOV_L(GLNAME(_glapi_Dispatch), EAX)
TEST_L(EAX, EAX)
- JZ(GLNAME(_glapi_fallback_Vertex4dv))
- JMP(GL_OFFSET(_gloffset_Vertex4dv))
+ JZ(GLNAME(_glapi_fallback_DisableClientState))
+ JMP(GL_OFFSET(_gloffset_DisableClientState))
ALIGNTEXT16
-GLOBL_FN(GL_PREFIX(Vertex4f))
-GL_PREFIX(Vertex4f):
+GLOBL_FN(GL_PREFIX(DrawArrays))
+GL_PREFIX(DrawArrays):
MOV_L(GLNAME(_glapi_Dispatch), EAX)
TEST_L(EAX, EAX)
- JZ(GLNAME(_glapi_fallback_Vertex4f))
- JMP(GL_OFFSET(_gloffset_Vertex4f))
+ JZ(GLNAME(_glapi_fallback_DrawArrays))
+ JMP(GL_OFFSET(_gloffset_DrawArrays))
ALIGNTEXT16
-GLOBL_FN(GL_PREFIX(Vertex4fv))
-GL_PREFIX(Vertex4fv):
+GLOBL_FN(GL_PREFIX(DrawElements))
+GL_PREFIX(DrawElements):
MOV_L(GLNAME(_glapi_Dispatch), EAX)
TEST_L(EAX, EAX)
- JZ(GLNAME(_glapi_fallback_Vertex4fv))
- JMP(GL_OFFSET(_gloffset_Vertex4fv))
+ JZ(GLNAME(_glapi_fallback_DrawElements))
+ JMP(GL_OFFSET(_gloffset_DrawElements))
ALIGNTEXT16
-GLOBL_FN(GL_PREFIX(Vertex4i))
-GL_PREFIX(Vertex4i):
+GLOBL_FN(GL_PREFIX(EdgeFlagPointer))
+GL_PREFIX(EdgeFlagPointer):
MOV_L(GLNAME(_glapi_Dispatch), EAX)
TEST_L(EAX, EAX)
- JZ(GLNAME(_glapi_fallback_Vertex4i))
- JMP(GL_OFFSET(_gloffset_Vertex4i))
+ JZ(GLNAME(_glapi_fallback_EdgeFlagPointer))
+ JMP(GL_OFFSET(_gloffset_EdgeFlagPointer))
ALIGNTEXT16
-GLOBL_FN(GL_PREFIX(Vertex4iv))
-GL_PREFIX(Vertex4iv):
+GLOBL_FN(GL_PREFIX(EnableClientState))
+GL_PREFIX(EnableClientState):
MOV_L(GLNAME(_glapi_Dispatch), EAX)
TEST_L(EAX, EAX)
- JZ(GLNAME(_glapi_fallback_Vertex4iv))
- JMP(GL_OFFSET(_gloffset_Vertex4iv))
+ JZ(GLNAME(_glapi_fallback_EnableClientState))
+ JMP(GL_OFFSET(_gloffset_EnableClientState))
ALIGNTEXT16
-GLOBL_FN(GL_PREFIX(Vertex4s))
-GL_PREFIX(Vertex4s):
+GLOBL_FN(GL_PREFIX(GetPointerv))
+GL_PREFIX(GetPointerv):
MOV_L(GLNAME(_glapi_Dispatch), EAX)
TEST_L(EAX, EAX)
- JZ(GLNAME(_glapi_fallback_Vertex4s))
- JMP(GL_OFFSET(_gloffset_Vertex4s))
+ JZ(GLNAME(_glapi_fallback_GetPointerv))
+ JMP(GL_OFFSET(_gloffset_GetPointerv))
ALIGNTEXT16
-GLOBL_FN(GL_PREFIX(Vertex4sv))
-GL_PREFIX(Vertex4sv):
+GLOBL_FN(GL_PREFIX(IndexPointer))
+GL_PREFIX(IndexPointer):
MOV_L(GLNAME(_glapi_Dispatch), EAX)
TEST_L(EAX, EAX)
- JZ(GLNAME(_glapi_fallback_Vertex4sv))
- JMP(GL_OFFSET(_gloffset_Vertex4sv))
+ JZ(GLNAME(_glapi_fallback_IndexPointer))
+ JMP(GL_OFFSET(_gloffset_IndexPointer))
ALIGNTEXT16
-GLOBL_FN(GL_PREFIX(Viewport))
-GL_PREFIX(Viewport):
+GLOBL_FN(GL_PREFIX(InterleavedArrays))
+GL_PREFIX(InterleavedArrays):
MOV_L(GLNAME(_glapi_Dispatch), EAX)
TEST_L(EAX, EAX)
- JZ(GLNAME(_glapi_fallback_Viewport))
- JMP(GL_OFFSET(_gloffset_Viewport))
+ JZ(GLNAME(_glapi_fallback_InterleavedArrays))
+ JMP(GL_OFFSET(_gloffset_InterleavedArrays))
ALIGNTEXT16
-GLOBL_FN(GL_PREFIX(AreTexturesResident))
-GL_PREFIX(AreTexturesResident):
+GLOBL_FN(GL_PREFIX(NormalPointer))
+GL_PREFIX(NormalPointer):
MOV_L(GLNAME(_glapi_Dispatch), EAX)
TEST_L(EAX, EAX)
- JZ(GLNAME(_glapi_fallback_AreTexturesResident))
- JMP(GL_OFFSET(_gloffset_AreTexturesResident))
+ JZ(GLNAME(_glapi_fallback_NormalPointer))
+ JMP(GL_OFFSET(_gloffset_NormalPointer))
ALIGNTEXT16
-GLOBL_FN(GL_PREFIX(ArrayElement))
-GL_PREFIX(ArrayElement):
+GLOBL_FN(GL_PREFIX(TexCoordPointer))
+GL_PREFIX(TexCoordPointer):
MOV_L(GLNAME(_glapi_Dispatch), EAX)
TEST_L(EAX, EAX)
- JZ(GLNAME(_glapi_fallback_ArrayElement))
- JMP(GL_OFFSET(_gloffset_ArrayElement))
+ JZ(GLNAME(_glapi_fallback_TexCoordPointer))
+ JMP(GL_OFFSET(_gloffset_TexCoordPointer))
ALIGNTEXT16
-GLOBL_FN(GL_PREFIX(BindTexture))
-GL_PREFIX(BindTexture):
+GLOBL_FN(GL_PREFIX(VertexPointer))
+GL_PREFIX(VertexPointer):
MOV_L(GLNAME(_glapi_Dispatch), EAX)
TEST_L(EAX, EAX)
- JZ(GLNAME(_glapi_fallback_BindTexture))
- JMP(GL_OFFSET(_gloffset_BindTexture))
+ JZ(GLNAME(_glapi_fallback_VertexPointer))
+ JMP(GL_OFFSET(_gloffset_VertexPointer))
ALIGNTEXT16
-GLOBL_FN(GL_PREFIX(ColorPointer))
-GL_PREFIX(ColorPointer):
+GLOBL_FN(GL_PREFIX(PolygonOffset))
+GL_PREFIX(PolygonOffset):
MOV_L(GLNAME(_glapi_Dispatch), EAX)
TEST_L(EAX, EAX)
- JZ(GLNAME(_glapi_fallback_ColorPointer))
- JMP(GL_OFFSET(_gloffset_ColorPointer))
+ JZ(GLNAME(_glapi_fallback_PolygonOffset))
+ JMP(GL_OFFSET(_gloffset_PolygonOffset))
ALIGNTEXT16
GLOBL_FN(GL_PREFIX(CopyTexImage1D))
@@ -2572,44 +2612,44 @@ GL_PREFIX(CopyTexSubImage2D):
JMP(GL_OFFSET(_gloffset_CopyTexSubImage2D))
ALIGNTEXT16
-GLOBL_FN(GL_PREFIX(DeleteTextures))
-GL_PREFIX(DeleteTextures):
+GLOBL_FN(GL_PREFIX(TexSubImage1D))
+GL_PREFIX(TexSubImage1D):
MOV_L(GLNAME(_glapi_Dispatch), EAX)
TEST_L(EAX, EAX)
- JZ(GLNAME(_glapi_fallback_DeleteTextures))
- JMP(GL_OFFSET(_gloffset_DeleteTextures))
+ JZ(GLNAME(_glapi_fallback_TexSubImage1D))
+ JMP(GL_OFFSET(_gloffset_TexSubImage1D))
ALIGNTEXT16
-GLOBL_FN(GL_PREFIX(DisableClientState))
-GL_PREFIX(DisableClientState):
+GLOBL_FN(GL_PREFIX(TexSubImage2D))
+GL_PREFIX(TexSubImage2D):
MOV_L(GLNAME(_glapi_Dispatch), EAX)
TEST_L(EAX, EAX)
- JZ(GLNAME(_glapi_fallback_DisableClientState))
- JMP(GL_OFFSET(_gloffset_DisableClientState))
+ JZ(GLNAME(_glapi_fallback_TexSubImage2D))
+ JMP(GL_OFFSET(_gloffset_TexSubImage2D))
ALIGNTEXT16
-GLOBL_FN(GL_PREFIX(DrawArrays))
-GL_PREFIX(DrawArrays):
+GLOBL_FN(GL_PREFIX(AreTexturesResident))
+GL_PREFIX(AreTexturesResident):
MOV_L(GLNAME(_glapi_Dispatch), EAX)
TEST_L(EAX, EAX)
- JZ(GLNAME(_glapi_fallback_DrawArrays))
- JMP(GL_OFFSET(_gloffset_DrawArrays))
+ JZ(GLNAME(_glapi_fallback_AreTexturesResident))
+ JMP(GL_OFFSET(_gloffset_AreTexturesResident))
ALIGNTEXT16
-GLOBL_FN(GL_PREFIX(EdgeFlagPointer))
-GL_PREFIX(EdgeFlagPointer):
+GLOBL_FN(GL_PREFIX(BindTexture))
+GL_PREFIX(BindTexture):
MOV_L(GLNAME(_glapi_Dispatch), EAX)
TEST_L(EAX, EAX)
- JZ(GLNAME(_glapi_fallback_EdgeFlagPointer))
- JMP(GL_OFFSET(_gloffset_EdgeFlagPointer))
+ JZ(GLNAME(_glapi_fallback_BindTexture))
+ JMP(GL_OFFSET(_gloffset_BindTexture))
ALIGNTEXT16
-GLOBL_FN(GL_PREFIX(EnableClientState))
-GL_PREFIX(EnableClientState):
+GLOBL_FN(GL_PREFIX(DeleteTextures))
+GL_PREFIX(DeleteTextures):
MOV_L(GLNAME(_glapi_Dispatch), EAX)
TEST_L(EAX, EAX)
- JZ(GLNAME(_glapi_fallback_EnableClientState))
- JMP(GL_OFFSET(_gloffset_EnableClientState))
+ JZ(GLNAME(_glapi_fallback_DeleteTextures))
+ JMP(GL_OFFSET(_gloffset_DeleteTextures))
ALIGNTEXT16
GLOBL_FN(GL_PREFIX(GenTextures))
@@ -2620,20 +2660,20 @@ GL_PREFIX(GenTextures):
JMP(GL_OFFSET(_gloffset_GenTextures))
ALIGNTEXT16
-GLOBL_FN(GL_PREFIX(GetPointerv))
-GL_PREFIX(GetPointerv):
+GLOBL_FN(GL_PREFIX(IsTexture))
+GL_PREFIX(IsTexture):
MOV_L(GLNAME(_glapi_Dispatch), EAX)
TEST_L(EAX, EAX)
- JZ(GLNAME(_glapi_fallback_GetPointerv))
- JMP(GL_OFFSET(_gloffset_GetPointerv))
+ JZ(GLNAME(_glapi_fallback_IsTexture))
+ JMP(GL_OFFSET(_gloffset_IsTexture))
ALIGNTEXT16
-GLOBL_FN(GL_PREFIX(IndexPointer))
-GL_PREFIX(IndexPointer):
+GLOBL_FN(GL_PREFIX(PrioritizeTextures))
+GL_PREFIX(PrioritizeTextures):
MOV_L(GLNAME(_glapi_Dispatch), EAX)
TEST_L(EAX, EAX)
- JZ(GLNAME(_glapi_fallback_IndexPointer))
- JMP(GL_OFFSET(_gloffset_IndexPointer))
+ JZ(GLNAME(_glapi_fallback_PrioritizeTextures))
+ JMP(GL_OFFSET(_gloffset_PrioritizeTextures))
ALIGNTEXT16
GLOBL_FN(GL_PREFIX(Indexub))
@@ -2652,38 +2692,6 @@ GL_PREFIX(Indexubv):
JMP(GL_OFFSET(_gloffset_Indexubv))
ALIGNTEXT16
-GLOBL_FN(GL_PREFIX(InterleavedArrays))
-GL_PREFIX(InterleavedArrays):
- MOV_L(GLNAME(_glapi_Dispatch), EAX)
- TEST_L(EAX, EAX)
- JZ(GLNAME(_glapi_fallback_InterleavedArrays))
- JMP(GL_OFFSET(_gloffset_InterleavedArrays))
-
-ALIGNTEXT16
-GLOBL_FN(GL_PREFIX(IsTexture))
-GL_PREFIX(IsTexture):
- MOV_L(GLNAME(_glapi_Dispatch), EAX)
- TEST_L(EAX, EAX)
- JZ(GLNAME(_glapi_fallback_IsTexture))
- JMP(GL_OFFSET(_gloffset_IsTexture))
-
-ALIGNTEXT16
-GLOBL_FN(GL_PREFIX(NormalPointer))
-GL_PREFIX(NormalPointer):
- MOV_L(GLNAME(_glapi_Dispatch), EAX)
- TEST_L(EAX, EAX)
- JZ(GLNAME(_glapi_fallback_NormalPointer))
- JMP(GL_OFFSET(_gloffset_NormalPointer))
-
-ALIGNTEXT16
-GLOBL_FN(GL_PREFIX(PolygonOffset))
-GL_PREFIX(PolygonOffset):
- MOV_L(GLNAME(_glapi_Dispatch), EAX)
- TEST_L(EAX, EAX)
- JZ(GLNAME(_glapi_fallback_PolygonOffset))
- JMP(GL_OFFSET(_gloffset_PolygonOffset))
-
-ALIGNTEXT16
GLOBL_FN(GL_PREFIX(PopClientAttrib))
GL_PREFIX(PopClientAttrib):
MOV_L(GLNAME(_glapi_Dispatch), EAX)
@@ -2692,14 +2700,6 @@ GL_PREFIX(PopClientAttrib):
JMP(GL_OFFSET(_gloffset_PopClientAttrib))
ALIGNTEXT16
-GLOBL_FN(GL_PREFIX(PrioritizeTextures))
-GL_PREFIX(PrioritizeTextures):
- MOV_L(GLNAME(_glapi_Dispatch), EAX)
- TEST_L(EAX, EAX)
- JZ(GLNAME(_glapi_fallback_PrioritizeTextures))
- JMP(GL_OFFSET(_gloffset_PrioritizeTextures))
-
-ALIGNTEXT16
GLOBL_FN(GL_PREFIX(PushClientAttrib))
GL_PREFIX(PushClientAttrib):
MOV_L(GLNAME(_glapi_Dispatch), EAX)
@@ -2708,84 +2708,84 @@ GL_PREFIX(PushClientAttrib):
JMP(GL_OFFSET(_gloffset_PushClientAttrib))
ALIGNTEXT16
-GLOBL_FN(GL_PREFIX(TexCoordPointer))
-GL_PREFIX(TexCoordPointer):
+GLOBL_FN(GL_PREFIX(BlendColor))
+GL_PREFIX(BlendColor):
MOV_L(GLNAME(_glapi_Dispatch), EAX)
TEST_L(EAX, EAX)
- JZ(GLNAME(_glapi_fallback_TexCoordPointer))
- JMP(GL_OFFSET(_gloffset_TexCoordPointer))
+ JZ(GLNAME(_glapi_fallback_BlendColor))
+ JMP(GL_OFFSET(_gloffset_BlendColor))
ALIGNTEXT16
-GLOBL_FN(GL_PREFIX(TexSubImage1D))
-GL_PREFIX(TexSubImage1D):
+GLOBL_FN(GL_PREFIX(BlendEquation))
+GL_PREFIX(BlendEquation):
MOV_L(GLNAME(_glapi_Dispatch), EAX)
TEST_L(EAX, EAX)
- JZ(GLNAME(_glapi_fallback_TexSubImage1D))
- JMP(GL_OFFSET(_gloffset_TexSubImage1D))
+ JZ(GLNAME(_glapi_fallback_BlendEquation))
+ JMP(GL_OFFSET(_gloffset_BlendEquation))
ALIGNTEXT16
-GLOBL_FN(GL_PREFIX(TexSubImage2D))
-GL_PREFIX(TexSubImage2D):
+GLOBL_FN(GL_PREFIX(DrawRangeElements))
+GL_PREFIX(DrawRangeElements):
MOV_L(GLNAME(_glapi_Dispatch), EAX)
TEST_L(EAX, EAX)
- JZ(GLNAME(_glapi_fallback_TexSubImage2D))
- JMP(GL_OFFSET(_gloffset_TexSubImage2D))
+ JZ(GLNAME(_glapi_fallback_DrawRangeElements))
+ JMP(GL_OFFSET(_gloffset_DrawRangeElements))
ALIGNTEXT16
-GLOBL_FN(GL_PREFIX(VertexPointer))
-GL_PREFIX(VertexPointer):
+GLOBL_FN(GL_PREFIX(ColorTable))
+GL_PREFIX(ColorTable):
MOV_L(GLNAME(_glapi_Dispatch), EAX)
TEST_L(EAX, EAX)
- JZ(GLNAME(_glapi_fallback_VertexPointer))
- JMP(GL_OFFSET(_gloffset_VertexPointer))
+ JZ(GLNAME(_glapi_fallback_ColorTable))
+ JMP(GL_OFFSET(_gloffset_ColorTable))
ALIGNTEXT16
-GLOBL_FN(GL_PREFIX(CopyTexSubImage3D))
-GL_PREFIX(CopyTexSubImage3D):
+GLOBL_FN(GL_PREFIX(ColorTableParameterfv))
+GL_PREFIX(ColorTableParameterfv):
MOV_L(GLNAME(_glapi_Dispatch), EAX)
TEST_L(EAX, EAX)
- JZ(GLNAME(_glapi_fallback_CopyTexSubImage3D))
- JMP(GL_OFFSET(_gloffset_CopyTexSubImage3D))
+ JZ(GLNAME(_glapi_fallback_ColorTableParameterfv))
+ JMP(GL_OFFSET(_gloffset_ColorTableParameterfv))
ALIGNTEXT16
-GLOBL_FN(GL_PREFIX(DrawRangeElements))
-GL_PREFIX(DrawRangeElements):
+GLOBL_FN(GL_PREFIX(ColorTableParameteriv))
+GL_PREFIX(ColorTableParameteriv):
MOV_L(GLNAME(_glapi_Dispatch), EAX)
TEST_L(EAX, EAX)
- JZ(GLNAME(_glapi_fallback_DrawRangeElements))
- JMP(GL_OFFSET(_gloffset_DrawRangeElements))
+ JZ(GLNAME(_glapi_fallback_ColorTableParameteriv))
+ JMP(GL_OFFSET(_gloffset_ColorTableParameteriv))
ALIGNTEXT16
-GLOBL_FN(GL_PREFIX(TexImage3D))
-GL_PREFIX(TexImage3D):
+GLOBL_FN(GL_PREFIX(CopyColorTable))
+GL_PREFIX(CopyColorTable):
MOV_L(GLNAME(_glapi_Dispatch), EAX)
TEST_L(EAX, EAX)
- JZ(GLNAME(_glapi_fallback_TexImage3D))
- JMP(GL_OFFSET(_gloffset_TexImage3D))
+ JZ(GLNAME(_glapi_fallback_CopyColorTable))
+ JMP(GL_OFFSET(_gloffset_CopyColorTable))
ALIGNTEXT16
-GLOBL_FN(GL_PREFIX(TexSubImage3D))
-GL_PREFIX(TexSubImage3D):
+GLOBL_FN(GL_PREFIX(GetColorTable))
+GL_PREFIX(GetColorTable):
MOV_L(GLNAME(_glapi_Dispatch), EAX)
TEST_L(EAX, EAX)
- JZ(GLNAME(_glapi_fallback_TexSubImage3D))
- JMP(GL_OFFSET(_gloffset_TexSubImage3D))
+ JZ(GLNAME(_glapi_fallback_GetColorTable))
+ JMP(GL_OFFSET(_gloffset_GetColorTable))
ALIGNTEXT16
-GLOBL_FN(GL_PREFIX(BlendColor))
-GL_PREFIX(BlendColor):
+GLOBL_FN(GL_PREFIX(GetColorTableParameterfv))
+GL_PREFIX(GetColorTableParameterfv):
MOV_L(GLNAME(_glapi_Dispatch), EAX)
TEST_L(EAX, EAX)
- JZ(GLNAME(_glapi_fallback_BlendColor))
- JMP(GL_OFFSET(_gloffset_BlendColor))
+ JZ(GLNAME(_glapi_fallback_GetColorTableParameterfv))
+ JMP(GL_OFFSET(_gloffset_GetColorTableParameterfv))
ALIGNTEXT16
-GLOBL_FN(GL_PREFIX(BlendEquation))
-GL_PREFIX(BlendEquation):
+GLOBL_FN(GL_PREFIX(GetColorTableParameteriv))
+GL_PREFIX(GetColorTableParameteriv):
MOV_L(GLNAME(_glapi_Dispatch), EAX)
TEST_L(EAX, EAX)
- JZ(GLNAME(_glapi_fallback_BlendEquation))
- JMP(GL_OFFSET(_gloffset_BlendEquation))
+ JZ(GLNAME(_glapi_fallback_GetColorTableParameteriv))
+ JMP(GL_OFFSET(_gloffset_GetColorTableParameteriv))
ALIGNTEXT16
GLOBL_FN(GL_PREFIX(ColorSubTable))
@@ -2796,28 +2796,12 @@ GL_PREFIX(ColorSubTable):
JMP(GL_OFFSET(_gloffset_ColorSubTable))
ALIGNTEXT16
-GLOBL_FN(GL_PREFIX(ColorTable))
-GL_PREFIX(ColorTable):
- MOV_L(GLNAME(_glapi_Dispatch), EAX)
- TEST_L(EAX, EAX)
- JZ(GLNAME(_glapi_fallback_ColorTable))
- JMP(GL_OFFSET(_gloffset_ColorTable))
-
-ALIGNTEXT16
-GLOBL_FN(GL_PREFIX(ColorTableParameterfv))
-GL_PREFIX(ColorTableParameterfv):
- MOV_L(GLNAME(_glapi_Dispatch), EAX)
- TEST_L(EAX, EAX)
- JZ(GLNAME(_glapi_fallback_ColorTableParameterfv))
- JMP(GL_OFFSET(_gloffset_ColorTableParameterfv))
-
-ALIGNTEXT16
-GLOBL_FN(GL_PREFIX(ColorTableParameteriv))
-GL_PREFIX(ColorTableParameteriv):
+GLOBL_FN(GL_PREFIX(CopyColorSubTable))
+GL_PREFIX(CopyColorSubTable):
MOV_L(GLNAME(_glapi_Dispatch), EAX)
TEST_L(EAX, EAX)
- JZ(GLNAME(_glapi_fallback_ColorTableParameteriv))
- JMP(GL_OFFSET(_gloffset_ColorTableParameteriv))
+ JZ(GLNAME(_glapi_fallback_CopyColorSubTable))
+ JMP(GL_OFFSET(_gloffset_CopyColorSubTable))
ALIGNTEXT16
GLOBL_FN(GL_PREFIX(ConvolutionFilter1D))
@@ -2868,22 +2852,6 @@ GL_PREFIX(ConvolutionParameteriv):
JMP(GL_OFFSET(_gloffset_ConvolutionParameteriv))
ALIGNTEXT16
-GLOBL_FN(GL_PREFIX(CopyColorSubTable))
-GL_PREFIX(CopyColorSubTable):
- MOV_L(GLNAME(_glapi_Dispatch), EAX)
- TEST_L(EAX, EAX)
- JZ(GLNAME(_glapi_fallback_CopyColorSubTable))
- JMP(GL_OFFSET(_gloffset_CopyColorSubTable))
-
-ALIGNTEXT16
-GLOBL_FN(GL_PREFIX(CopyColorTable))
-GL_PREFIX(CopyColorTable):
- MOV_L(GLNAME(_glapi_Dispatch), EAX)
- TEST_L(EAX, EAX)
- JZ(GLNAME(_glapi_fallback_CopyColorTable))
- JMP(GL_OFFSET(_gloffset_CopyColorTable))
-
-ALIGNTEXT16
GLOBL_FN(GL_PREFIX(CopyConvolutionFilter1D))
GL_PREFIX(CopyConvolutionFilter1D):
MOV_L(GLNAME(_glapi_Dispatch), EAX)
@@ -2900,30 +2868,6 @@ GL_PREFIX(CopyConvolutionFilter2D):
JMP(GL_OFFSET(_gloffset_CopyConvolutionFilter2D))
ALIGNTEXT16
-GLOBL_FN(GL_PREFIX(GetColorTable))
-GL_PREFIX(GetColorTable):
- MOV_L(GLNAME(_glapi_Dispatch), EAX)
- TEST_L(EAX, EAX)
- JZ(GLNAME(_glapi_fallback_GetColorTable))
- JMP(GL_OFFSET(_gloffset_GetColorTable))
-
-ALIGNTEXT16
-GLOBL_FN(GL_PREFIX(GetColorTableParameterfv))
-GL_PREFIX(GetColorTableParameterfv):
- MOV_L(GLNAME(_glapi_Dispatch), EAX)
- TEST_L(EAX, EAX)
- JZ(GLNAME(_glapi_fallback_GetColorTableParameterfv))
- JMP(GL_OFFSET(_gloffset_GetColorTableParameterfv))
-
-ALIGNTEXT16
-GLOBL_FN(GL_PREFIX(GetColorTableParameteriv))
-GL_PREFIX(GetColorTableParameteriv):
- MOV_L(GLNAME(_glapi_Dispatch), EAX)
- TEST_L(EAX, EAX)
- JZ(GLNAME(_glapi_fallback_GetColorTableParameteriv))
- JMP(GL_OFFSET(_gloffset_GetColorTableParameteriv))
-
-ALIGNTEXT16
GLOBL_FN(GL_PREFIX(GetConvolutionFilter))
GL_PREFIX(GetConvolutionFilter):
MOV_L(GLNAME(_glapi_Dispatch), EAX)
@@ -2948,6 +2892,22 @@ GL_PREFIX(GetConvolutionParameteriv):
JMP(GL_OFFSET(_gloffset_GetConvolutionParameteriv))
ALIGNTEXT16
+GLOBL_FN(GL_PREFIX(GetSeparableFilter))
+GL_PREFIX(GetSeparableFilter):
+ MOV_L(GLNAME(_glapi_Dispatch), EAX)
+ TEST_L(EAX, EAX)
+ JZ(GLNAME(_glapi_fallback_GetSeparableFilter))
+ JMP(GL_OFFSET(_gloffset_GetSeparableFilter))
+
+ALIGNTEXT16
+GLOBL_FN(GL_PREFIX(SeparableFilter2D))
+GL_PREFIX(SeparableFilter2D):
+ MOV_L(GLNAME(_glapi_Dispatch), EAX)
+ TEST_L(EAX, EAX)
+ JZ(GLNAME(_glapi_fallback_SeparableFilter2D))
+ JMP(GL_OFFSET(_gloffset_SeparableFilter2D))
+
+ALIGNTEXT16
GLOBL_FN(GL_PREFIX(GetHistogram))
GL_PREFIX(GetHistogram):
MOV_L(GLNAME(_glapi_Dispatch), EAX)
@@ -2996,14 +2956,6 @@ GL_PREFIX(GetMinmaxParameteriv):
JMP(GL_OFFSET(_gloffset_GetMinmaxParameteriv))
ALIGNTEXT16
-GLOBL_FN(GL_PREFIX(GetSeparableFilter))
-GL_PREFIX(GetSeparableFilter):
- MOV_L(GLNAME(_glapi_Dispatch), EAX)
- TEST_L(EAX, EAX)
- JZ(GLNAME(_glapi_fallback_GetSeparableFilter))
- JMP(GL_OFFSET(_gloffset_GetSeparableFilter))
-
-ALIGNTEXT16
GLOBL_FN(GL_PREFIX(Histogram))
GL_PREFIX(Histogram):
MOV_L(GLNAME(_glapi_Dispatch), EAX)
@@ -3020,6 +2972,14 @@ GL_PREFIX(Minmax):
JMP(GL_OFFSET(_gloffset_Minmax))
ALIGNTEXT16
+GLOBL_FN(GL_PREFIX(ResetHistogram))
+GL_PREFIX(ResetHistogram):
+ MOV_L(GLNAME(_glapi_Dispatch), EAX)
+ TEST_L(EAX, EAX)
+ JZ(GLNAME(_glapi_fallback_ResetHistogram))
+ JMP(GL_OFFSET(_gloffset_ResetHistogram))
+
+ALIGNTEXT16
GLOBL_FN(GL_PREFIX(ResetMinmax))
GL_PREFIX(ResetMinmax):
MOV_L(GLNAME(_glapi_Dispatch), EAX)
@@ -3028,20 +2988,28 @@ GL_PREFIX(ResetMinmax):
JMP(GL_OFFSET(_gloffset_ResetMinmax))
ALIGNTEXT16
-GLOBL_FN(GL_PREFIX(ResetHistogram))
-GL_PREFIX(ResetHistogram):
+GLOBL_FN(GL_PREFIX(TexImage3D))
+GL_PREFIX(TexImage3D):
MOV_L(GLNAME(_glapi_Dispatch), EAX)
TEST_L(EAX, EAX)
- JZ(GLNAME(_glapi_fallback_ResetHistogram))
- JMP(GL_OFFSET(_gloffset_ResetHistogram))
+ JZ(GLNAME(_glapi_fallback_TexImage3D))
+ JMP(GL_OFFSET(_gloffset_TexImage3D))
ALIGNTEXT16
-GLOBL_FN(GL_PREFIX(SeparableFilter2D))
-GL_PREFIX(SeparableFilter2D):
+GLOBL_FN(GL_PREFIX(TexSubImage3D))
+GL_PREFIX(TexSubImage3D):
MOV_L(GLNAME(_glapi_Dispatch), EAX)
TEST_L(EAX, EAX)
- JZ(GLNAME(_glapi_fallback_SeparableFilter2D))
- JMP(GL_OFFSET(_gloffset_SeparableFilter2D))
+ JZ(GLNAME(_glapi_fallback_TexSubImage3D))
+ JMP(GL_OFFSET(_gloffset_TexSubImage3D))
+
+ALIGNTEXT16
+GLOBL_FN(GL_PREFIX(CopyTexSubImage3D))
+GL_PREFIX(CopyTexSubImage3D):
+ MOV_L(GLNAME(_glapi_Dispatch), EAX)
+ TEST_L(EAX, EAX)
+ JZ(GLNAME(_glapi_fallback_CopyTexSubImage3D))
+ JMP(GL_OFFSET(_gloffset_CopyTexSubImage3D))
ALIGNTEXT16
GLOBL_FN(GL_PREFIX(ActiveTextureARB))
@@ -3316,11 +3284,115 @@ GL_PREFIX(MultiTexCoord4svARB):
JMP(GL_OFFSET(_gloffset_MultiTexCoord4svARB))
ALIGNTEXT16
+GLOBL_FN(GL_PREFIX(LoadTransposeMatrixfARB))
+GL_PREFIX(LoadTransposeMatrixfARB):
+ MOV_L(GLNAME(_glapi_Dispatch), EAX)
+ TEST_L(EAX, EAX)
+ JZ(GLNAME(_glapi_fallback_LoadTransposeMatrixfARB))
+ JMP(GL_OFFSET(_gloffset_LoadTransposeMatrixfARB))
+
+ALIGNTEXT16
+GLOBL_FN(GL_PREFIX(LoadTransposeMatrixdARB))
+GL_PREFIX(LoadTransposeMatrixdARB):
+ MOV_L(GLNAME(_glapi_Dispatch), EAX)
+ TEST_L(EAX, EAX)
+ JZ(GLNAME(_glapi_fallback_LoadTransposeMatrixdARB))
+ JMP(GL_OFFSET(_gloffset_LoadTransposeMatrixdARB))
+
+ALIGNTEXT16
+GLOBL_FN(GL_PREFIX(MultTransposeMatrixfARB))
+GL_PREFIX(MultTransposeMatrixfARB):
+ MOV_L(GLNAME(_glapi_Dispatch), EAX)
+ TEST_L(EAX, EAX)
+ JZ(GLNAME(_glapi_fallback_MultTransposeMatrixfARB))
+ JMP(GL_OFFSET(_gloffset_MultTransposeMatrixfARB))
+
+ALIGNTEXT16
+GLOBL_FN(GL_PREFIX(MultTransposeMatrixdARB))
+GL_PREFIX(MultTransposeMatrixdARB):
+ MOV_L(GLNAME(_glapi_Dispatch), EAX)
+ TEST_L(EAX, EAX)
+ JZ(GLNAME(_glapi_fallback_MultTransposeMatrixdARB))
+ JMP(GL_OFFSET(_gloffset_MultTransposeMatrixdARB))
+
+ALIGNTEXT16
+GLOBL_FN(GL_PREFIX(SampleCoverageARB))
+GL_PREFIX(SampleCoverageARB):
+ MOV_L(GLNAME(_glapi_Dispatch), EAX)
+ TEST_L(EAX, EAX)
+ JZ(GLNAME(_glapi_fallback_SampleCoverageARB))
+ JMP(GL_OFFSET(_gloffset_SampleCoverageARB))
+
+ALIGNTEXT16
+GLOBL_FN(GL_PREFIX(SamplePassARB))
+GL_PREFIX(SamplePassARB):
+ MOV_L(GLNAME(_glapi_Dispatch), EAX)
+ TEST_L(EAX, EAX)
+ JZ(GLNAME(_glapi_fallback_SamplePassARB))
+ JMP(GL_OFFSET(_gloffset_SamplePassARB))
+
+ALIGNTEXT16
+GLOBL_FN(GL_PREFIX(CompressedTexImage3DARB))
+GL_PREFIX(CompressedTexImage3DARB):
+ MOV_L(GLNAME(_glapi_Dispatch), EAX)
+ TEST_L(EAX, EAX)
+ JZ(GLNAME(_glapi_fallback_CompressedTexImage3DARB))
+ JMP(GL_OFFSET(_gloffset_CompressedTexImage3DARB))
+
+ALIGNTEXT16
+GLOBL_FN(GL_PREFIX(CompressedTexImage2DARB))
+GL_PREFIX(CompressedTexImage2DARB):
+ MOV_L(GLNAME(_glapi_Dispatch), EAX)
+ TEST_L(EAX, EAX)
+ JZ(GLNAME(_glapi_fallback_CompressedTexImage2DARB))
+ JMP(GL_OFFSET(_gloffset_CompressedTexImage2DARB))
+
+ALIGNTEXT16
+GLOBL_FN(GL_PREFIX(CompressedTexImage1DARB))
+GL_PREFIX(CompressedTexImage1DARB):
+ MOV_L(GLNAME(_glapi_Dispatch), EAX)
+ TEST_L(EAX, EAX)
+ JZ(GLNAME(_glapi_fallback_CompressedTexImage1DARB))
+ JMP(GL_OFFSET(_gloffset_CompressedTexImage1DARB))
+
+ALIGNTEXT16
+GLOBL_FN(GL_PREFIX(CompressedTexSubImage3DARB))
+GL_PREFIX(CompressedTexSubImage3DARB):
+ MOV_L(GLNAME(_glapi_Dispatch), EAX)
+ TEST_L(EAX, EAX)
+ JZ(GLNAME(_glapi_fallback_CompressedTexSubImage3DARB))
+ JMP(GL_OFFSET(_gloffset_CompressedTexSubImage3DARB))
+
+ALIGNTEXT16
+GLOBL_FN(GL_PREFIX(CompressedTexSubImage2DARB))
+GL_PREFIX(CompressedTexSubImage2DARB):
+ MOV_L(GLNAME(_glapi_Dispatch), EAX)
+ TEST_L(EAX, EAX)
+ JZ(GLNAME(_glapi_fallback_CompressedTexSubImage2DARB))
+ JMP(GL_OFFSET(_gloffset_CompressedTexSubImage2DARB))
+
+ALIGNTEXT16
+GLOBL_FN(GL_PREFIX(CompressedTexSubImage1DARB))
+GL_PREFIX(CompressedTexSubImage1DARB):
+ MOV_L(GLNAME(_glapi_Dispatch), EAX)
+ TEST_L(EAX, EAX)
+ JZ(GLNAME(_glapi_fallback_CompressedTexSubImage1DARB))
+ JMP(GL_OFFSET(_gloffset_CompressedTexSubImage1DARB))
+
+ALIGNTEXT16
+GLOBL_FN(GL_PREFIX(GetCompressedTexImageARB))
+GL_PREFIX(GetCompressedTexImageARB):
+ MOV_L(GLNAME(_glapi_Dispatch), EAX)
+ TEST_L(EAX, EAX)
+ JZ(GLNAME(_glapi_fallback_GetCompressedTexImageARB))
+ JMP(GL_OFFSET(_gloffset_GetCompressedTexImageARB))
+
+ALIGNTEXT16
GLOBL_FN(GL_PREFIX(BlendColorEXT))
GL_PREFIX(BlendColorEXT):
MOV_L(GLNAME(_glapi_Dispatch), EAX)
TEST_L(EAX, EAX)
- JZ(GLNAME(_glapi_fallback_BlendColor))
+ JZ(GLNAME(_glapi_fallback_BlendColorEXT))
JMP(GL_OFFSET(_gloffset_BlendColor))
ALIGNTEXT16
@@ -3336,7 +3408,7 @@ GLOBL_FN(GL_PREFIX(TexImage3DEXT))
GL_PREFIX(TexImage3DEXT):
MOV_L(GLNAME(_glapi_Dispatch), EAX)
TEST_L(EAX, EAX)
- JZ(GLNAME(_glapi_fallback_TexImage3D))
+ JZ(GLNAME(_glapi_fallback_TexImage3DEXT))
JMP(GL_OFFSET(_gloffset_TexImage3D))
ALIGNTEXT16
@@ -3344,18 +3416,10 @@ GLOBL_FN(GL_PREFIX(TexSubImage3DEXT))
GL_PREFIX(TexSubImage3DEXT):
MOV_L(GLNAME(_glapi_Dispatch), EAX)
TEST_L(EAX, EAX)
- JZ(GLNAME(_glapi_fallback_TexSubImage3D))
+ JZ(GLNAME(_glapi_fallback_TexSubImage3DEXT))
JMP(GL_OFFSET(_gloffset_TexSubImage3D))
ALIGNTEXT16
-GLOBL_FN(GL_PREFIX(CopyTexSubImage3DEXT))
-GL_PREFIX(CopyTexSubImage3DEXT):
- MOV_L(GLNAME(_glapi_Dispatch), EAX)
- TEST_L(EAX, EAX)
- JZ(GLNAME(_glapi_fallback_CopyTexSubImage3D))
- JMP(GL_OFFSET(_gloffset_CopyTexSubImage3D))
-
-ALIGNTEXT16
GLOBL_FN(GL_PREFIX(GetTexFilterFuncSGIS))
GL_PREFIX(GetTexFilterFuncSGIS):
MOV_L(GLNAME(_glapi_Dispatch), EAX)
@@ -3372,19 +3436,11 @@ GL_PREFIX(TexFilterFuncSGIS):
JMP(GL_OFFSET(_gloffset_TexFilterFuncSGIS))
ALIGNTEXT16
-GLOBL_FN(GL_PREFIX(CopyTexSubImage1DEXT))
-GL_PREFIX(CopyTexSubImage1DEXT):
- MOV_L(GLNAME(_glapi_Dispatch), EAX)
- TEST_L(EAX, EAX)
- JZ(GLNAME(_glapi_fallback_CopyTexSubImage1D))
- JMP(GL_OFFSET(_gloffset_CopyTexSubImage1D))
-
-ALIGNTEXT16
GLOBL_FN(GL_PREFIX(TexSubImage1DEXT))
GL_PREFIX(TexSubImage1DEXT):
MOV_L(GLNAME(_glapi_Dispatch), EAX)
TEST_L(EAX, EAX)
- JZ(GLNAME(_glapi_fallback_TexSubImage1D))
+ JZ(GLNAME(_glapi_fallback_TexSubImage1DEXT))
JMP(GL_OFFSET(_gloffset_TexSubImage1D))
ALIGNTEXT16
@@ -3392,7 +3448,7 @@ GLOBL_FN(GL_PREFIX(TexSubImage2DEXT))
GL_PREFIX(TexSubImage2DEXT):
MOV_L(GLNAME(_glapi_Dispatch), EAX)
TEST_L(EAX, EAX)
- JZ(GLNAME(_glapi_fallback_TexSubImage2D))
+ JZ(GLNAME(_glapi_fallback_TexSubImage2DEXT))
JMP(GL_OFFSET(_gloffset_TexSubImage2D))
ALIGNTEXT16
@@ -3400,7 +3456,7 @@ GLOBL_FN(GL_PREFIX(CopyTexImage1DEXT))
GL_PREFIX(CopyTexImage1DEXT):
MOV_L(GLNAME(_glapi_Dispatch), EAX)
TEST_L(EAX, EAX)
- JZ(GLNAME(_glapi_fallback_CopyTexImage1D))
+ JZ(GLNAME(_glapi_fallback_CopyTexImage1DEXT))
JMP(GL_OFFSET(_gloffset_CopyTexImage1D))
ALIGNTEXT16
@@ -3408,18 +3464,34 @@ GLOBL_FN(GL_PREFIX(CopyTexImage2DEXT))
GL_PREFIX(CopyTexImage2DEXT):
MOV_L(GLNAME(_glapi_Dispatch), EAX)
TEST_L(EAX, EAX)
- JZ(GLNAME(_glapi_fallback_CopyTexImage2D))
+ JZ(GLNAME(_glapi_fallback_CopyTexImage2DEXT))
JMP(GL_OFFSET(_gloffset_CopyTexImage2D))
ALIGNTEXT16
+GLOBL_FN(GL_PREFIX(CopyTexSubImage1DEXT))
+GL_PREFIX(CopyTexSubImage1DEXT):
+ MOV_L(GLNAME(_glapi_Dispatch), EAX)
+ TEST_L(EAX, EAX)
+ JZ(GLNAME(_glapi_fallback_CopyTexSubImage1DEXT))
+ JMP(GL_OFFSET(_gloffset_CopyTexSubImage1D))
+
+ALIGNTEXT16
GLOBL_FN(GL_PREFIX(CopyTexSubImage2DEXT))
GL_PREFIX(CopyTexSubImage2DEXT):
MOV_L(GLNAME(_glapi_Dispatch), EAX)
TEST_L(EAX, EAX)
- JZ(GLNAME(_glapi_fallback_CopyTexSubImage2D))
+ JZ(GLNAME(_glapi_fallback_CopyTexSubImage2DEXT))
JMP(GL_OFFSET(_gloffset_CopyTexSubImage2D))
ALIGNTEXT16
+GLOBL_FN(GL_PREFIX(CopyTexSubImage3DEXT))
+GL_PREFIX(CopyTexSubImage3DEXT):
+ MOV_L(GLNAME(_glapi_Dispatch), EAX)
+ TEST_L(EAX, EAX)
+ JZ(GLNAME(_glapi_fallback_CopyTexSubImage3DEXT))
+ JMP(GL_OFFSET(_gloffset_CopyTexSubImage3D))
+
+ALIGNTEXT16
GLOBL_FN(GL_PREFIX(GetHistogramEXT))
GL_PREFIX(GetHistogramEXT):
MOV_L(GLNAME(_glapi_Dispatch), EAX)
@@ -3472,7 +3544,7 @@ GLOBL_FN(GL_PREFIX(HistogramEXT))
GL_PREFIX(HistogramEXT):
MOV_L(GLNAME(_glapi_Dispatch), EAX)
TEST_L(EAX, EAX)
- JZ(GLNAME(_glapi_fallback_Histogram))
+ JZ(GLNAME(_glapi_fallback_HistogramEXT))
JMP(GL_OFFSET(_gloffset_Histogram))
ALIGNTEXT16
@@ -3480,7 +3552,7 @@ GLOBL_FN(GL_PREFIX(MinmaxEXT))
GL_PREFIX(MinmaxEXT):
MOV_L(GLNAME(_glapi_Dispatch), EAX)
TEST_L(EAX, EAX)
- JZ(GLNAME(_glapi_fallback_Minmax))
+ JZ(GLNAME(_glapi_fallback_MinmaxEXT))
JMP(GL_OFFSET(_gloffset_Minmax))
ALIGNTEXT16
@@ -3488,7 +3560,7 @@ GLOBL_FN(GL_PREFIX(ResetHistogramEXT))
GL_PREFIX(ResetHistogramEXT):
MOV_L(GLNAME(_glapi_Dispatch), EAX)
TEST_L(EAX, EAX)
- JZ(GLNAME(_glapi_fallback_ResetHistogram))
+ JZ(GLNAME(_glapi_fallback_ResetHistogramEXT))
JMP(GL_OFFSET(_gloffset_ResetHistogram))
ALIGNTEXT16
@@ -3496,7 +3568,7 @@ GLOBL_FN(GL_PREFIX(ResetMinmaxEXT))
GL_PREFIX(ResetMinmaxEXT):
MOV_L(GLNAME(_glapi_Dispatch), EAX)
TEST_L(EAX, EAX)
- JZ(GLNAME(_glapi_fallback_ResetMinmax))
+ JZ(GLNAME(_glapi_fallback_ResetMinmaxEXT))
JMP(GL_OFFSET(_gloffset_ResetMinmax))
ALIGNTEXT16
@@ -3504,7 +3576,7 @@ GLOBL_FN(GL_PREFIX(ConvolutionFilter1DEXT))
GL_PREFIX(ConvolutionFilter1DEXT):
MOV_L(GLNAME(_glapi_Dispatch), EAX)
TEST_L(EAX, EAX)
- JZ(GLNAME(_glapi_fallback_ConvolutionFilter1D))
+ JZ(GLNAME(_glapi_fallback_ConvolutionFilter1DEXT))
JMP(GL_OFFSET(_gloffset_ConvolutionFilter1D))
ALIGNTEXT16
@@ -3512,7 +3584,7 @@ GLOBL_FN(GL_PREFIX(ConvolutionFilter2DEXT))
GL_PREFIX(ConvolutionFilter2DEXT):
MOV_L(GLNAME(_glapi_Dispatch), EAX)
TEST_L(EAX, EAX)
- JZ(GLNAME(_glapi_fallback_ConvolutionFilter2D))
+ JZ(GLNAME(_glapi_fallback_ConvolutionFilter2DEXT))
JMP(GL_OFFSET(_gloffset_ConvolutionFilter2D))
ALIGNTEXT16
@@ -3520,7 +3592,7 @@ GLOBL_FN(GL_PREFIX(ConvolutionParameterfEXT))
GL_PREFIX(ConvolutionParameterfEXT):
MOV_L(GLNAME(_glapi_Dispatch), EAX)
TEST_L(EAX, EAX)
- JZ(GLNAME(_glapi_fallback_ConvolutionParameterf))
+ JZ(GLNAME(_glapi_fallback_ConvolutionParameterfEXT))
JMP(GL_OFFSET(_gloffset_ConvolutionParameterf))
ALIGNTEXT16
@@ -3528,7 +3600,7 @@ GLOBL_FN(GL_PREFIX(ConvolutionParameterfvEXT))
GL_PREFIX(ConvolutionParameterfvEXT):
MOV_L(GLNAME(_glapi_Dispatch), EAX)
TEST_L(EAX, EAX)
- JZ(GLNAME(_glapi_fallback_ConvolutionParameterfv))
+ JZ(GLNAME(_glapi_fallback_ConvolutionParameterfvEXT))
JMP(GL_OFFSET(_gloffset_ConvolutionParameterfv))
ALIGNTEXT16
@@ -3536,7 +3608,7 @@ GLOBL_FN(GL_PREFIX(ConvolutionParameteriEXT))
GL_PREFIX(ConvolutionParameteriEXT):
MOV_L(GLNAME(_glapi_Dispatch), EAX)
TEST_L(EAX, EAX)
- JZ(GLNAME(_glapi_fallback_ConvolutionParameteri))
+ JZ(GLNAME(_glapi_fallback_ConvolutionParameteriEXT))
JMP(GL_OFFSET(_gloffset_ConvolutionParameteri))
ALIGNTEXT16
@@ -3544,7 +3616,7 @@ GLOBL_FN(GL_PREFIX(ConvolutionParameterivEXT))
GL_PREFIX(ConvolutionParameterivEXT):
MOV_L(GLNAME(_glapi_Dispatch), EAX)
TEST_L(EAX, EAX)
- JZ(GLNAME(_glapi_fallback_ConvolutionParameteriv))
+ JZ(GLNAME(_glapi_fallback_ConvolutionParameterivEXT))
JMP(GL_OFFSET(_gloffset_ConvolutionParameteriv))
ALIGNTEXT16
@@ -3552,7 +3624,7 @@ GLOBL_FN(GL_PREFIX(CopyConvolutionFilter1DEXT))
GL_PREFIX(CopyConvolutionFilter1DEXT):
MOV_L(GLNAME(_glapi_Dispatch), EAX)
TEST_L(EAX, EAX)
- JZ(GLNAME(_glapi_fallback_CopyConvolutionFilter1D))
+ JZ(GLNAME(_glapi_fallback_CopyConvolutionFilter1DEXT))
JMP(GL_OFFSET(_gloffset_CopyConvolutionFilter1D))
ALIGNTEXT16
@@ -3560,7 +3632,7 @@ GLOBL_FN(GL_PREFIX(CopyConvolutionFilter2DEXT))
GL_PREFIX(CopyConvolutionFilter2DEXT):
MOV_L(GLNAME(_glapi_Dispatch), EAX)
TEST_L(EAX, EAX)
- JZ(GLNAME(_glapi_fallback_CopyConvolutionFilter2D))
+ JZ(GLNAME(_glapi_fallback_CopyConvolutionFilter2DEXT))
JMP(GL_OFFSET(_gloffset_CopyConvolutionFilter2D))
ALIGNTEXT16
@@ -3600,15 +3672,23 @@ GLOBL_FN(GL_PREFIX(SeparableFilter2DEXT))
GL_PREFIX(SeparableFilter2DEXT):
MOV_L(GLNAME(_glapi_Dispatch), EAX)
TEST_L(EAX, EAX)
- JZ(GLNAME(_glapi_fallback_SeparableFilter2D))
+ JZ(GLNAME(_glapi_fallback_SeparableFilter2DEXT))
JMP(GL_OFFSET(_gloffset_SeparableFilter2D))
ALIGNTEXT16
+GLOBL_FN(GL_PREFIX(ColorTableSGI))
+GL_PREFIX(ColorTableSGI):
+ MOV_L(GLNAME(_glapi_Dispatch), EAX)
+ TEST_L(EAX, EAX)
+ JZ(GLNAME(_glapi_fallback_ColorTableSGI))
+ JMP(GL_OFFSET(_gloffset_ColorTable))
+
+ALIGNTEXT16
GLOBL_FN(GL_PREFIX(ColorTableParameterfvSGI))
GL_PREFIX(ColorTableParameterfvSGI):
MOV_L(GLNAME(_glapi_Dispatch), EAX)
TEST_L(EAX, EAX)
- JZ(GLNAME(_glapi_fallback_ColorTableParameterfv))
+ JZ(GLNAME(_glapi_fallback_ColorTableParameterfvSGI))
JMP(GL_OFFSET(_gloffset_ColorTableParameterfv))
ALIGNTEXT16
@@ -3616,23 +3696,15 @@ GLOBL_FN(GL_PREFIX(ColorTableParameterivSGI))
GL_PREFIX(ColorTableParameterivSGI):
MOV_L(GLNAME(_glapi_Dispatch), EAX)
TEST_L(EAX, EAX)
- JZ(GLNAME(_glapi_fallback_ColorTableParameteriv))
+ JZ(GLNAME(_glapi_fallback_ColorTableParameterivSGI))
JMP(GL_OFFSET(_gloffset_ColorTableParameteriv))
ALIGNTEXT16
-GLOBL_FN(GL_PREFIX(ColorTableSGI))
-GL_PREFIX(ColorTableSGI):
- MOV_L(GLNAME(_glapi_Dispatch), EAX)
- TEST_L(EAX, EAX)
- JZ(GLNAME(_glapi_fallback_ColorTable))
- JMP(GL_OFFSET(_gloffset_ColorTable))
-
-ALIGNTEXT16
GLOBL_FN(GL_PREFIX(CopyColorTableSGI))
GL_PREFIX(CopyColorTableSGI):
MOV_L(GLNAME(_glapi_Dispatch), EAX)
TEST_L(EAX, EAX)
- JZ(GLNAME(_glapi_fallback_CopyColorTable))
+ JZ(GLNAME(_glapi_fallback_CopyColorTableSGI))
JMP(GL_OFFSET(_gloffset_CopyColorTable))
ALIGNTEXT16
@@ -3660,493 +3732,324 @@ GL_PREFIX(GetColorTableParameterivSGI):
JMP(GL_OFFSET(_gloffset_GetColorTableParameterivSGI))
ALIGNTEXT16
-GLOBL_FN(GL_PREFIX(GenTexturesEXT))
-GL_PREFIX(GenTexturesEXT):
+GLOBL_FN(GL_PREFIX(PixelTexGenSGIX))
+GL_PREFIX(PixelTexGenSGIX):
MOV_L(GLNAME(_glapi_Dispatch), EAX)
TEST_L(EAX, EAX)
- JZ(GLNAME(_glapi_fallback_GenTexturesEXT))
- JMP(GL_OFFSET(_gloffset_GenTexturesEXT))
+ JZ(GLNAME(_glapi_fallback_PixelTexGenSGIX))
+ JMP(GL_OFFSET(_gloffset_PixelTexGenSGIX))
ALIGNTEXT16
-GLOBL_FN(GL_PREFIX(DeleteTexturesEXT))
-GL_PREFIX(DeleteTexturesEXT):
- MOV_L(GLNAME(_glapi_Dispatch), EAX)
- TEST_L(EAX, EAX)
- JZ(GLNAME(_glapi_fallback_DeleteTextures))
- JMP(GL_OFFSET(_gloffset_DeleteTextures))
-
-ALIGNTEXT16
-GLOBL_FN(GL_PREFIX(BindTextureEXT))
-GL_PREFIX(BindTextureEXT):
- MOV_L(GLNAME(_glapi_Dispatch), EAX)
- TEST_L(EAX, EAX)
- JZ(GLNAME(_glapi_fallback_BindTexture))
- JMP(GL_OFFSET(_gloffset_BindTexture))
-
-ALIGNTEXT16
-GLOBL_FN(GL_PREFIX(PrioritizeTexturesEXT))
-GL_PREFIX(PrioritizeTexturesEXT):
- MOV_L(GLNAME(_glapi_Dispatch), EAX)
- TEST_L(EAX, EAX)
- JZ(GLNAME(_glapi_fallback_PrioritizeTextures))
- JMP(GL_OFFSET(_gloffset_PrioritizeTextures))
-
-ALIGNTEXT16
-GLOBL_FN(GL_PREFIX(AreTexturesResidentEXT))
-GL_PREFIX(AreTexturesResidentEXT):
+GLOBL_FN(GL_PREFIX(PixelTexGenParameteriSGIS))
+GL_PREFIX(PixelTexGenParameteriSGIS):
MOV_L(GLNAME(_glapi_Dispatch), EAX)
TEST_L(EAX, EAX)
- JZ(GLNAME(_glapi_fallback_AreTexturesResidentEXT))
- JMP(GL_OFFSET(_gloffset_AreTexturesResidentEXT))
+ JZ(GLNAME(_glapi_fallback_PixelTexGenParameteriSGIS))
+ JMP(GL_OFFSET(_gloffset_PixelTexGenParameteriSGIS))
ALIGNTEXT16
-GLOBL_FN(GL_PREFIX(IsTextureEXT))
-GL_PREFIX(IsTextureEXT):
+GLOBL_FN(GL_PREFIX(PixelTexGenParameterivSGIS))
+GL_PREFIX(PixelTexGenParameterivSGIS):
MOV_L(GLNAME(_glapi_Dispatch), EAX)
TEST_L(EAX, EAX)
- JZ(GLNAME(_glapi_fallback_IsTextureEXT))
- JMP(GL_OFFSET(_gloffset_IsTextureEXT))
+ JZ(GLNAME(_glapi_fallback_PixelTexGenParameterivSGIS))
+ JMP(GL_OFFSET(_gloffset_PixelTexGenParameterivSGIS))
ALIGNTEXT16
-GLOBL_FN(GL_PREFIX(BlendEquationEXT))
-GL_PREFIX(BlendEquationEXT):
+GLOBL_FN(GL_PREFIX(PixelTexGenParameterfSGIS))
+GL_PREFIX(PixelTexGenParameterfSGIS):
MOV_L(GLNAME(_glapi_Dispatch), EAX)
TEST_L(EAX, EAX)
- JZ(GLNAME(_glapi_fallback_BlendEquation))
- JMP(GL_OFFSET(_gloffset_BlendEquation))
-
-ALIGNTEXT16
-GLOBL_FN(GL_PREFIX(VertexPointerEXT))
-GL_PREFIX(VertexPointerEXT):
- JMP(GLNAME(_glapi_fallback_VertexPointerEXT))
-
-ALIGNTEXT16
-GLOBL_FN(GL_PREFIX(NormalPointerEXT))
-GL_PREFIX(NormalPointerEXT):
- JMP(GLNAME(_glapi_fallback_NormalPointerEXT))
-
-ALIGNTEXT16
-GLOBL_FN(GL_PREFIX(ColorPointerEXT))
-GL_PREFIX(ColorPointerEXT):
- JMP(GLNAME(_glapi_fallback_ColorPointerEXT))
-
-ALIGNTEXT16
-GLOBL_FN(GL_PREFIX(IndexPointerEXT))
-GL_PREFIX(IndexPointerEXT):
- JMP(GLNAME(_glapi_fallback_IndexPointerEXT))
-
-ALIGNTEXT16
-GLOBL_FN(GL_PREFIX(TexCoordPointerEXT))
-GL_PREFIX(TexCoordPointerEXT):
- JMP(GLNAME(_glapi_fallback_TexCoordPointerEXT))
-
-ALIGNTEXT16
-GLOBL_FN(GL_PREFIX(EdgeFlagPointerEXT))
-GL_PREFIX(EdgeFlagPointerEXT):
- JMP(GLNAME(_glapi_fallback_EdgeFlagPointerEXT))
+ JZ(GLNAME(_glapi_fallback_PixelTexGenParameterfSGIS))
+ JMP(GL_OFFSET(_gloffset_PixelTexGenParameterfSGIS))
ALIGNTEXT16
-GLOBL_FN(GL_PREFIX(GetPointervEXT))
-GL_PREFIX(GetPointervEXT):
+GLOBL_FN(GL_PREFIX(PixelTexGenParameterfvSGIS))
+GL_PREFIX(PixelTexGenParameterfvSGIS):
MOV_L(GLNAME(_glapi_Dispatch), EAX)
TEST_L(EAX, EAX)
- JZ(GLNAME(_glapi_fallback_GetPointerv))
- JMP(GL_OFFSET(_gloffset_GetPointerv))
+ JZ(GLNAME(_glapi_fallback_PixelTexGenParameterfvSGIS))
+ JMP(GL_OFFSET(_gloffset_PixelTexGenParameterfvSGIS))
ALIGNTEXT16
-GLOBL_FN(GL_PREFIX(ArrayElementEXT))
-GL_PREFIX(ArrayElementEXT):
+GLOBL_FN(GL_PREFIX(GetPixelTexGenParameterivSGIS))
+GL_PREFIX(GetPixelTexGenParameterivSGIS):
MOV_L(GLNAME(_glapi_Dispatch), EAX)
TEST_L(EAX, EAX)
- JZ(GLNAME(_glapi_fallback_ArrayElement))
- JMP(GL_OFFSET(_gloffset_ArrayElement))
+ JZ(GLNAME(_glapi_fallback_GetPixelTexGenParameterivSGIS))
+ JMP(GL_OFFSET(_gloffset_GetPixelTexGenParameterivSGIS))
ALIGNTEXT16
-GLOBL_FN(GL_PREFIX(DrawArraysEXT))
-GL_PREFIX(DrawArraysEXT):
+GLOBL_FN(GL_PREFIX(GetPixelTexGenParameterfvSGIS))
+GL_PREFIX(GetPixelTexGenParameterfvSGIS):
MOV_L(GLNAME(_glapi_Dispatch), EAX)
TEST_L(EAX, EAX)
- JZ(GLNAME(_glapi_fallback_DrawArrays))
- JMP(GL_OFFSET(_gloffset_DrawArrays))
+ JZ(GLNAME(_glapi_fallback_GetPixelTexGenParameterfvSGIS))
+ JMP(GL_OFFSET(_gloffset_GetPixelTexGenParameterfvSGIS))
ALIGNTEXT16
-GLOBL_FN(GL_PREFIX(PointParameterfEXT))
-GL_PREFIX(PointParameterfEXT):
+GLOBL_FN(GL_PREFIX(TexImage4DSGIS))
+GL_PREFIX(TexImage4DSGIS):
MOV_L(GLNAME(_glapi_Dispatch), EAX)
TEST_L(EAX, EAX)
- JZ(GLNAME(_glapi_fallback_PointParameterfEXT))
- JMP(GL_OFFSET(_gloffset_PointParameterfEXT))
+ JZ(GLNAME(_glapi_fallback_TexImage4DSGIS))
+ JMP(GL_OFFSET(_gloffset_TexImage4DSGIS))
ALIGNTEXT16
-GLOBL_FN(GL_PREFIX(PointParameterfvEXT))
-GL_PREFIX(PointParameterfvEXT):
+GLOBL_FN(GL_PREFIX(TexSubImage4DSGIS))
+GL_PREFIX(TexSubImage4DSGIS):
MOV_L(GLNAME(_glapi_Dispatch), EAX)
TEST_L(EAX, EAX)
- JZ(GLNAME(_glapi_fallback_PointParameterfvEXT))
- JMP(GL_OFFSET(_gloffset_PointParameterfvEXT))
+ JZ(GLNAME(_glapi_fallback_TexSubImage4DSGIS))
+ JMP(GL_OFFSET(_gloffset_TexSubImage4DSGIS))
ALIGNTEXT16
-GLOBL_FN(GL_PREFIX(HintPGI))
-GL_PREFIX(HintPGI):
+GLOBL_FN(GL_PREFIX(AreTexturesResidentEXT))
+GL_PREFIX(AreTexturesResidentEXT):
MOV_L(GLNAME(_glapi_Dispatch), EAX)
TEST_L(EAX, EAX)
- JZ(GLNAME(_glapi_fallback_HintPGI))
- JMP(GL_OFFSET(_gloffset_HintPGI))
+ JZ(GLNAME(_glapi_fallback_AreTexturesResidentEXT))
+ JMP(GL_OFFSET(_gloffset_AreTexturesResidentEXT))
ALIGNTEXT16
-GLOBL_FN(GL_PREFIX(ColorTableEXT))
-GL_PREFIX(ColorTableEXT):
+GLOBL_FN(GL_PREFIX(BindTextureEXT))
+GL_PREFIX(BindTextureEXT):
MOV_L(GLNAME(_glapi_Dispatch), EAX)
TEST_L(EAX, EAX)
- JZ(GLNAME(_glapi_fallback_ColorTable))
- JMP(GL_OFFSET(_gloffset_ColorTable))
+ JZ(GLNAME(_glapi_fallback_BindTextureEXT))
+ JMP(GL_OFFSET(_gloffset_BindTexture))
ALIGNTEXT16
-GLOBL_FN(GL_PREFIX(ColorSubTableEXT))
-GL_PREFIX(ColorSubTableEXT):
+GLOBL_FN(GL_PREFIX(DeleteTexturesEXT))
+GL_PREFIX(DeleteTexturesEXT):
MOV_L(GLNAME(_glapi_Dispatch), EAX)
TEST_L(EAX, EAX)
- JZ(GLNAME(_glapi_fallback_ColorSubTable))
- JMP(GL_OFFSET(_gloffset_ColorSubTable))
+ JZ(GLNAME(_glapi_fallback_DeleteTexturesEXT))
+ JMP(GL_OFFSET(_gloffset_DeleteTextures))
ALIGNTEXT16
-GLOBL_FN(GL_PREFIX(GetColorTableEXT))
-GL_PREFIX(GetColorTableEXT):
+GLOBL_FN(GL_PREFIX(GenTexturesEXT))
+GL_PREFIX(GenTexturesEXT):
MOV_L(GLNAME(_glapi_Dispatch), EAX)
TEST_L(EAX, EAX)
- JZ(GLNAME(_glapi_fallback_GetColorTableEXT))
- JMP(GL_OFFSET(_gloffset_GetColorTableEXT))
+ JZ(GLNAME(_glapi_fallback_GenTexturesEXT))
+ JMP(GL_OFFSET(_gloffset_GenTexturesEXT))
ALIGNTEXT16
-GLOBL_FN(GL_PREFIX(GetColorTableParameterfvEXT))
-GL_PREFIX(GetColorTableParameterfvEXT):
+GLOBL_FN(GL_PREFIX(IsTextureEXT))
+GL_PREFIX(IsTextureEXT):
MOV_L(GLNAME(_glapi_Dispatch), EAX)
TEST_L(EAX, EAX)
- JZ(GLNAME(_glapi_fallback_GetColorTableParameterfvEXT))
- JMP(GL_OFFSET(_gloffset_GetColorTableParameterfvEXT))
+ JZ(GLNAME(_glapi_fallback_IsTextureEXT))
+ JMP(GL_OFFSET(_gloffset_IsTextureEXT))
ALIGNTEXT16
-GLOBL_FN(GL_PREFIX(GetColorTableParameterivEXT))
-GL_PREFIX(GetColorTableParameterivEXT):
+GLOBL_FN(GL_PREFIX(PrioritizeTexturesEXT))
+GL_PREFIX(PrioritizeTexturesEXT):
MOV_L(GLNAME(_glapi_Dispatch), EAX)
TEST_L(EAX, EAX)
- JZ(GLNAME(_glapi_fallback_GetColorTableParameterivEXT))
- JMP(GL_OFFSET(_gloffset_GetColorTableParameterivEXT))
+ JZ(GLNAME(_glapi_fallback_PrioritizeTexturesEXT))
+ JMP(GL_OFFSET(_gloffset_PrioritizeTextures))
ALIGNTEXT16
-GLOBL_FN(GL_PREFIX(LockArraysEXT))
-GL_PREFIX(LockArraysEXT):
+GLOBL_FN(GL_PREFIX(DetailTexFuncSGIS))
+GL_PREFIX(DetailTexFuncSGIS):
MOV_L(GLNAME(_glapi_Dispatch), EAX)
TEST_L(EAX, EAX)
- JZ(GLNAME(_glapi_fallback_LockArraysEXT))
- JMP(GL_OFFSET(_gloffset_LockArraysEXT))
+ JZ(GLNAME(_glapi_fallback_DetailTexFuncSGIS))
+ JMP(GL_OFFSET(_gloffset_DetailTexFuncSGIS))
ALIGNTEXT16
-GLOBL_FN(GL_PREFIX(UnlockArraysEXT))
-GL_PREFIX(UnlockArraysEXT):
+GLOBL_FN(GL_PREFIX(GetDetailTexFuncSGIS))
+GL_PREFIX(GetDetailTexFuncSGIS):
MOV_L(GLNAME(_glapi_Dispatch), EAX)
TEST_L(EAX, EAX)
- JZ(GLNAME(_glapi_fallback_UnlockArraysEXT))
- JMP(GL_OFFSET(_gloffset_UnlockArraysEXT))
+ JZ(GLNAME(_glapi_fallback_GetDetailTexFuncSGIS))
+ JMP(GL_OFFSET(_gloffset_GetDetailTexFuncSGIS))
ALIGNTEXT16
-GLOBL_FN(GL_PREFIX(BlendFuncSeparateINGR))
-GL_PREFIX(BlendFuncSeparateINGR):
+GLOBL_FN(GL_PREFIX(SharpenTexFuncSGIS))
+GL_PREFIX(SharpenTexFuncSGIS):
MOV_L(GLNAME(_glapi_Dispatch), EAX)
TEST_L(EAX, EAX)
- JZ(GLNAME(_glapi_fallback_BlendFuncSeparateEXT))
- JMP(GL_OFFSET(_gloffset_BlendFuncSeparateEXT))
-
-ALIGNTEXT16
-GLOBL_FN(GL_PREFIX(WindowPos2iMESA))
-GL_PREFIX(WindowPos2iMESA):
- JMP(GLNAME(_glapi_fallback_WindowPos2iMESA))
-
-ALIGNTEXT16
-GLOBL_FN(GL_PREFIX(WindowPos2sMESA))
-GL_PREFIX(WindowPos2sMESA):
- JMP(GLNAME(_glapi_fallback_WindowPos2sMESA))
-
-ALIGNTEXT16
-GLOBL_FN(GL_PREFIX(WindowPos2fMESA))
-GL_PREFIX(WindowPos2fMESA):
- JMP(GLNAME(_glapi_fallback_WindowPos2fMESA))
-
-ALIGNTEXT16
-GLOBL_FN(GL_PREFIX(WindowPos2dMESA))
-GL_PREFIX(WindowPos2dMESA):
- JMP(GLNAME(_glapi_fallback_WindowPos2dMESA))
-
-ALIGNTEXT16
-GLOBL_FN(GL_PREFIX(WindowPos2ivMESA))
-GL_PREFIX(WindowPos2ivMESA):
- JMP(GLNAME(_glapi_fallback_WindowPos2ivMESA))
-
-ALIGNTEXT16
-GLOBL_FN(GL_PREFIX(WindowPos2svMESA))
-GL_PREFIX(WindowPos2svMESA):
- JMP(GLNAME(_glapi_fallback_WindowPos2svMESA))
-
-ALIGNTEXT16
-GLOBL_FN(GL_PREFIX(WindowPos2fvMESA))
-GL_PREFIX(WindowPos2fvMESA):
- JMP(GLNAME(_glapi_fallback_WindowPos2fvMESA))
-
-ALIGNTEXT16
-GLOBL_FN(GL_PREFIX(WindowPos2dvMESA))
-GL_PREFIX(WindowPos2dvMESA):
- JMP(GLNAME(_glapi_fallback_WindowPos2dvMESA))
-
-ALIGNTEXT16
-GLOBL_FN(GL_PREFIX(WindowPos3iMESA))
-GL_PREFIX(WindowPos3iMESA):
- JMP(GLNAME(_glapi_fallback_WindowPos3iMESA))
-
-ALIGNTEXT16
-GLOBL_FN(GL_PREFIX(WindowPos3sMESA))
-GL_PREFIX(WindowPos3sMESA):
- JMP(GLNAME(_glapi_fallback_WindowPos3sMESA))
-
-ALIGNTEXT16
-GLOBL_FN(GL_PREFIX(WindowPos3fMESA))
-GL_PREFIX(WindowPos3fMESA):
- JMP(GLNAME(_glapi_fallback_WindowPos3fMESA))
-
-ALIGNTEXT16
-GLOBL_FN(GL_PREFIX(WindowPos3dMESA))
-GL_PREFIX(WindowPos3dMESA):
- JMP(GLNAME(_glapi_fallback_WindowPos3dMESA))
-
-ALIGNTEXT16
-GLOBL_FN(GL_PREFIX(WindowPos3ivMESA))
-GL_PREFIX(WindowPos3ivMESA):
- JMP(GLNAME(_glapi_fallback_WindowPos3ivMESA))
-
-ALIGNTEXT16
-GLOBL_FN(GL_PREFIX(WindowPos3svMESA))
-GL_PREFIX(WindowPos3svMESA):
- JMP(GLNAME(_glapi_fallback_WindowPos3svMESA))
-
-ALIGNTEXT16
-GLOBL_FN(GL_PREFIX(WindowPos3fvMESA))
-GL_PREFIX(WindowPos3fvMESA):
- JMP(GLNAME(_glapi_fallback_WindowPos3fvMESA))
-
-ALIGNTEXT16
-GLOBL_FN(GL_PREFIX(WindowPos3dvMESA))
-GL_PREFIX(WindowPos3dvMESA):
- JMP(GLNAME(_glapi_fallback_WindowPos3dvMESA))
-
-ALIGNTEXT16
-GLOBL_FN(GL_PREFIX(WindowPos4iMESA))
-GL_PREFIX(WindowPos4iMESA):
- JMP(GLNAME(_glapi_fallback_WindowPos4iMESA))
-
-ALIGNTEXT16
-GLOBL_FN(GL_PREFIX(WindowPos4sMESA))
-GL_PREFIX(WindowPos4sMESA):
- JMP(GLNAME(_glapi_fallback_WindowPos4sMESA))
+ JZ(GLNAME(_glapi_fallback_SharpenTexFuncSGIS))
+ JMP(GL_OFFSET(_gloffset_SharpenTexFuncSGIS))
ALIGNTEXT16
-GLOBL_FN(GL_PREFIX(WindowPos4fMESA))
-GL_PREFIX(WindowPos4fMESA):
+GLOBL_FN(GL_PREFIX(GetSharpenTexFuncSGIS))
+GL_PREFIX(GetSharpenTexFuncSGIS):
MOV_L(GLNAME(_glapi_Dispatch), EAX)
TEST_L(EAX, EAX)
- JZ(GLNAME(_glapi_fallback_WindowPos4fMESA))
- JMP(GL_OFFSET(_gloffset_WindowPos4fMESA))
-
-ALIGNTEXT16
-GLOBL_FN(GL_PREFIX(WindowPos4dMESA))
-GL_PREFIX(WindowPos4dMESA):
- JMP(GLNAME(_glapi_fallback_WindowPos4dMESA))
-
-ALIGNTEXT16
-GLOBL_FN(GL_PREFIX(WindowPos4ivMESA))
-GL_PREFIX(WindowPos4ivMESA):
- JMP(GLNAME(_glapi_fallback_WindowPos4ivMESA))
-
-ALIGNTEXT16
-GLOBL_FN(GL_PREFIX(WindowPos4svMESA))
-GL_PREFIX(WindowPos4svMESA):
- JMP(GLNAME(_glapi_fallback_WindowPos4svMESA))
-
-ALIGNTEXT16
-GLOBL_FN(GL_PREFIX(WindowPos4fvMESA))
-GL_PREFIX(WindowPos4fvMESA):
- JMP(GLNAME(_glapi_fallback_WindowPos4fvMESA))
-
-ALIGNTEXT16
-GLOBL_FN(GL_PREFIX(WindowPos4dvMESA))
-GL_PREFIX(WindowPos4dvMESA):
- JMP(GLNAME(_glapi_fallback_WindowPos4dvMESA))
+ JZ(GLNAME(_glapi_fallback_GetSharpenTexFuncSGIS))
+ JMP(GL_OFFSET(_gloffset_GetSharpenTexFuncSGIS))
ALIGNTEXT16
-GLOBL_FN(GL_PREFIX(ResizeBuffersMESA))
-GL_PREFIX(ResizeBuffersMESA):
+GLOBL_FN(GL_PREFIX(SampleMaskSGIS))
+GL_PREFIX(SampleMaskSGIS):
MOV_L(GLNAME(_glapi_Dispatch), EAX)
TEST_L(EAX, EAX)
- JZ(GLNAME(_glapi_fallback_ResizeBuffersMESA))
- JMP(GL_OFFSET(_gloffset_ResizeBuffersMESA))
+ JZ(GLNAME(_glapi_fallback_SampleMaskSGIS))
+ JMP(GL_OFFSET(_gloffset_SampleMaskSGIS))
ALIGNTEXT16
-GLOBL_FN(GL_PREFIX(LoadTransposeMatrixdARB))
-GL_PREFIX(LoadTransposeMatrixdARB):
+GLOBL_FN(GL_PREFIX(SamplePatternSGIS))
+GL_PREFIX(SamplePatternSGIS):
MOV_L(GLNAME(_glapi_Dispatch), EAX)
TEST_L(EAX, EAX)
- JZ(GLNAME(_glapi_fallback_LoadTransposeMatrixdARB))
- JMP(GL_OFFSET(_gloffset_LoadTransposeMatrixdARB))
+ JZ(GLNAME(_glapi_fallback_SamplePatternSGIS))
+ JMP(GL_OFFSET(_gloffset_SamplePatternSGIS))
ALIGNTEXT16
-GLOBL_FN(GL_PREFIX(LoadTransposeMatrixfARB))
-GL_PREFIX(LoadTransposeMatrixfARB):
+GLOBL_FN(GL_PREFIX(ArrayElementEXT))
+GL_PREFIX(ArrayElementEXT):
MOV_L(GLNAME(_glapi_Dispatch), EAX)
TEST_L(EAX, EAX)
- JZ(GLNAME(_glapi_fallback_LoadTransposeMatrixfARB))
- JMP(GL_OFFSET(_gloffset_LoadTransposeMatrixfARB))
+ JZ(GLNAME(_glapi_fallback_ArrayElementEXT))
+ JMP(GL_OFFSET(_gloffset_ArrayElement))
ALIGNTEXT16
-GLOBL_FN(GL_PREFIX(MultTransposeMatrixdARB))
-GL_PREFIX(MultTransposeMatrixdARB):
+GLOBL_FN(GL_PREFIX(ColorPointerEXT))
+GL_PREFIX(ColorPointerEXT):
MOV_L(GLNAME(_glapi_Dispatch), EAX)
TEST_L(EAX, EAX)
- JZ(GLNAME(_glapi_fallback_MultTransposeMatrixdARB))
- JMP(GL_OFFSET(_gloffset_MultTransposeMatrixdARB))
+ JZ(GLNAME(_glapi_fallback_ColorPointerEXT))
+ JMP(GL_OFFSET(_gloffset_ColorPointerEXT))
ALIGNTEXT16
-GLOBL_FN(GL_PREFIX(MultTransposeMatrixfARB))
-GL_PREFIX(MultTransposeMatrixfARB):
+GLOBL_FN(GL_PREFIX(DrawArraysEXT))
+GL_PREFIX(DrawArraysEXT):
MOV_L(GLNAME(_glapi_Dispatch), EAX)
TEST_L(EAX, EAX)
- JZ(GLNAME(_glapi_fallback_MultTransposeMatrixfARB))
- JMP(GL_OFFSET(_gloffset_MultTransposeMatrixfARB))
+ JZ(GLNAME(_glapi_fallback_DrawArraysEXT))
+ JMP(GL_OFFSET(_gloffset_DrawArrays))
ALIGNTEXT16
-GLOBL_FN(GL_PREFIX(PixelTexGenParameterfSGIS))
-GL_PREFIX(PixelTexGenParameterfSGIS):
+GLOBL_FN(GL_PREFIX(EdgeFlagPointerEXT))
+GL_PREFIX(EdgeFlagPointerEXT):
MOV_L(GLNAME(_glapi_Dispatch), EAX)
TEST_L(EAX, EAX)
- JZ(GLNAME(_glapi_fallback_PixelTexGenParameterfSGIS))
- JMP(GL_OFFSET(_gloffset_PixelTexGenParameterfSGIS))
+ JZ(GLNAME(_glapi_fallback_EdgeFlagPointerEXT))
+ JMP(GL_OFFSET(_gloffset_EdgeFlagPointerEXT))
ALIGNTEXT16
-GLOBL_FN(GL_PREFIX(PixelTexGenParameteriSGIS))
-GL_PREFIX(PixelTexGenParameteriSGIS):
+GLOBL_FN(GL_PREFIX(GetPointervEXT))
+GL_PREFIX(GetPointervEXT):
MOV_L(GLNAME(_glapi_Dispatch), EAX)
TEST_L(EAX, EAX)
- JZ(GLNAME(_glapi_fallback_PixelTexGenParameteriSGIS))
- JMP(GL_OFFSET(_gloffset_PixelTexGenParameteriSGIS))
+ JZ(GLNAME(_glapi_fallback_GetPointervEXT))
+ JMP(GL_OFFSET(_gloffset_GetPointerv))
ALIGNTEXT16
-GLOBL_FN(GL_PREFIX(GetPixelTexGenParameterfvSGIS))
-GL_PREFIX(GetPixelTexGenParameterfvSGIS):
+GLOBL_FN(GL_PREFIX(IndexPointerEXT))
+GL_PREFIX(IndexPointerEXT):
MOV_L(GLNAME(_glapi_Dispatch), EAX)
TEST_L(EAX, EAX)
- JZ(GLNAME(_glapi_fallback_GetPixelTexGenParameterfvSGIS))
- JMP(GL_OFFSET(_gloffset_GetPixelTexGenParameterfvSGIS))
+ JZ(GLNAME(_glapi_fallback_IndexPointerEXT))
+ JMP(GL_OFFSET(_gloffset_IndexPointerEXT))
ALIGNTEXT16
-GLOBL_FN(GL_PREFIX(GetPixelTexGenParameterivSGIS))
-GL_PREFIX(GetPixelTexGenParameterivSGIS):
+GLOBL_FN(GL_PREFIX(NormalPointerEXT))
+GL_PREFIX(NormalPointerEXT):
MOV_L(GLNAME(_glapi_Dispatch), EAX)
TEST_L(EAX, EAX)
- JZ(GLNAME(_glapi_fallback_GetPixelTexGenParameterivSGIS))
- JMP(GL_OFFSET(_gloffset_GetPixelTexGenParameterivSGIS))
+ JZ(GLNAME(_glapi_fallback_NormalPointerEXT))
+ JMP(GL_OFFSET(_gloffset_NormalPointerEXT))
ALIGNTEXT16
-GLOBL_FN(GL_PREFIX(TexImage4DSGIS))
-GL_PREFIX(TexImage4DSGIS):
+GLOBL_FN(GL_PREFIX(TexCoordPointerEXT))
+GL_PREFIX(TexCoordPointerEXT):
MOV_L(GLNAME(_glapi_Dispatch), EAX)
TEST_L(EAX, EAX)
- JZ(GLNAME(_glapi_fallback_TexImage4DSGIS))
- JMP(GL_OFFSET(_gloffset_TexImage4DSGIS))
+ JZ(GLNAME(_glapi_fallback_TexCoordPointerEXT))
+ JMP(GL_OFFSET(_gloffset_TexCoordPointerEXT))
ALIGNTEXT16
-GLOBL_FN(GL_PREFIX(TexSubImage4DSGIS))
-GL_PREFIX(TexSubImage4DSGIS):
+GLOBL_FN(GL_PREFIX(VertexPointerEXT))
+GL_PREFIX(VertexPointerEXT):
MOV_L(GLNAME(_glapi_Dispatch), EAX)
TEST_L(EAX, EAX)
- JZ(GLNAME(_glapi_fallback_TexSubImage4DSGIS))
- JMP(GL_OFFSET(_gloffset_TexSubImage4DSGIS))
+ JZ(GLNAME(_glapi_fallback_VertexPointerEXT))
+ JMP(GL_OFFSET(_gloffset_VertexPointerEXT))
ALIGNTEXT16
-GLOBL_FN(GL_PREFIX(DetailTexFuncSGIS))
-GL_PREFIX(DetailTexFuncSGIS):
+GLOBL_FN(GL_PREFIX(BlendEquationEXT))
+GL_PREFIX(BlendEquationEXT):
MOV_L(GLNAME(_glapi_Dispatch), EAX)
TEST_L(EAX, EAX)
- JZ(GLNAME(_glapi_fallback_DetailTexFuncSGIS))
- JMP(GL_OFFSET(_gloffset_DetailTexFuncSGIS))
+ JZ(GLNAME(_glapi_fallback_BlendEquationEXT))
+ JMP(GL_OFFSET(_gloffset_BlendEquation))
ALIGNTEXT16
-GLOBL_FN(GL_PREFIX(GetDetailTexFuncSGIS))
-GL_PREFIX(GetDetailTexFuncSGIS):
+GLOBL_FN(GL_PREFIX(SpriteParameterfSGIX))
+GL_PREFIX(SpriteParameterfSGIX):
MOV_L(GLNAME(_glapi_Dispatch), EAX)
TEST_L(EAX, EAX)
- JZ(GLNAME(_glapi_fallback_GetDetailTexFuncSGIS))
- JMP(GL_OFFSET(_gloffset_GetDetailTexFuncSGIS))
+ JZ(GLNAME(_glapi_fallback_SpriteParameterfSGIX))
+ JMP(GL_OFFSET(_gloffset_SpriteParameterfSGIX))
ALIGNTEXT16
-GLOBL_FN(GL_PREFIX(GetSharpenTexFuncSGIS))
-GL_PREFIX(GetSharpenTexFuncSGIS):
+GLOBL_FN(GL_PREFIX(SpriteParameterfvSGIX))
+GL_PREFIX(SpriteParameterfvSGIX):
MOV_L(GLNAME(_glapi_Dispatch), EAX)
TEST_L(EAX, EAX)
- JZ(GLNAME(_glapi_fallback_GetSharpenTexFuncSGIS))
- JMP(GL_OFFSET(_gloffset_GetSharpenTexFuncSGIS))
+ JZ(GLNAME(_glapi_fallback_SpriteParameterfvSGIX))
+ JMP(GL_OFFSET(_gloffset_SpriteParameterfvSGIX))
ALIGNTEXT16
-GLOBL_FN(GL_PREFIX(SharpenTexFuncSGIS))
-GL_PREFIX(SharpenTexFuncSGIS):
+GLOBL_FN(GL_PREFIX(SpriteParameteriSGIX))
+GL_PREFIX(SpriteParameteriSGIX):
MOV_L(GLNAME(_glapi_Dispatch), EAX)
TEST_L(EAX, EAX)
- JZ(GLNAME(_glapi_fallback_SharpenTexFuncSGIS))
- JMP(GL_OFFSET(_gloffset_SharpenTexFuncSGIS))
+ JZ(GLNAME(_glapi_fallback_SpriteParameteriSGIX))
+ JMP(GL_OFFSET(_gloffset_SpriteParameteriSGIX))
ALIGNTEXT16
-GLOBL_FN(GL_PREFIX(SampleMaskSGIS))
-GL_PREFIX(SampleMaskSGIS):
+GLOBL_FN(GL_PREFIX(SpriteParameterivSGIX))
+GL_PREFIX(SpriteParameterivSGIX):
MOV_L(GLNAME(_glapi_Dispatch), EAX)
TEST_L(EAX, EAX)
- JZ(GLNAME(_glapi_fallback_SampleMaskSGIS))
- JMP(GL_OFFSET(_gloffset_SampleMaskSGIS))
+ JZ(GLNAME(_glapi_fallback_SpriteParameterivSGIX))
+ JMP(GL_OFFSET(_gloffset_SpriteParameterivSGIX))
ALIGNTEXT16
-GLOBL_FN(GL_PREFIX(SamplePatternSGIS))
-GL_PREFIX(SamplePatternSGIS):
+GLOBL_FN(GL_PREFIX(PointParameterfEXT))
+GL_PREFIX(PointParameterfEXT):
MOV_L(GLNAME(_glapi_Dispatch), EAX)
TEST_L(EAX, EAX)
- JZ(GLNAME(_glapi_fallback_SamplePatternSGIS))
- JMP(GL_OFFSET(_gloffset_SamplePatternSGIS))
+ JZ(GLNAME(_glapi_fallback_PointParameterfEXT))
+ JMP(GL_OFFSET(_gloffset_PointParameterfEXT))
ALIGNTEXT16
-GLOBL_FN(GL_PREFIX(SpriteParameterfSGIX))
-GL_PREFIX(SpriteParameterfSGIX):
+GLOBL_FN(GL_PREFIX(PointParameterfvEXT))
+GL_PREFIX(PointParameterfvEXT):
MOV_L(GLNAME(_glapi_Dispatch), EAX)
TEST_L(EAX, EAX)
- JZ(GLNAME(_glapi_fallback_SpriteParameterfSGIX))
- JMP(GL_OFFSET(_gloffset_SpriteParameterfSGIX))
+ JZ(GLNAME(_glapi_fallback_PointParameterfvEXT))
+ JMP(GL_OFFSET(_gloffset_PointParameterfvEXT))
ALIGNTEXT16
-GLOBL_FN(GL_PREFIX(SpriteParameteriSGIX))
-GL_PREFIX(SpriteParameteriSGIX):
+GLOBL_FN(GL_PREFIX(PointParameterfSGIS))
+GL_PREFIX(PointParameterfSGIS):
MOV_L(GLNAME(_glapi_Dispatch), EAX)
TEST_L(EAX, EAX)
- JZ(GLNAME(_glapi_fallback_SpriteParameteriSGIX))
- JMP(GL_OFFSET(_gloffset_SpriteParameteriSGIX))
+ JZ(GLNAME(_glapi_fallback_PointParameterfSGIS))
+ JMP(GL_OFFSET(_gloffset_PointParameterfEXT))
ALIGNTEXT16
-GLOBL_FN(GL_PREFIX(SpriteParameterfvSGIX))
-GL_PREFIX(SpriteParameterfvSGIX):
+GLOBL_FN(GL_PREFIX(PointParameterfvSGIS))
+GL_PREFIX(PointParameterfvSGIS):
MOV_L(GLNAME(_glapi_Dispatch), EAX)
TEST_L(EAX, EAX)
- JZ(GLNAME(_glapi_fallback_SpriteParameterfvSGIX))
- JMP(GL_OFFSET(_gloffset_SpriteParameterfvSGIX))
+ JZ(GLNAME(_glapi_fallback_PointParameterfvSGIS))
+ JMP(GL_OFFSET(_gloffset_PointParameterfvEXT))
ALIGNTEXT16
-GLOBL_FN(GL_PREFIX(SpriteParameterivSGIX))
-GL_PREFIX(SpriteParameterivSGIX):
+GLOBL_FN(GL_PREFIX(GetInstrumentsSGIX))
+GL_PREFIX(GetInstrumentsSGIX):
MOV_L(GLNAME(_glapi_Dispatch), EAX)
TEST_L(EAX, EAX)
- JZ(GLNAME(_glapi_fallback_SpriteParameterivSGIX))
- JMP(GL_OFFSET(_gloffset_SpriteParameterivSGIX))
+ JZ(GLNAME(_glapi_fallback_GetInstrumentsSGIX))
+ JMP(GL_OFFSET(_gloffset_GetInstrumentsSGIX))
ALIGNTEXT16
GLOBL_FN(GL_PREFIX(InstrumentsBufferSGIX))
@@ -4157,20 +4060,12 @@ GL_PREFIX(InstrumentsBufferSGIX):
JMP(GL_OFFSET(_gloffset_InstrumentsBufferSGIX))
ALIGNTEXT16
-GLOBL_FN(GL_PREFIX(StartInstrumentsSGIX))
-GL_PREFIX(StartInstrumentsSGIX):
- MOV_L(GLNAME(_glapi_Dispatch), EAX)
- TEST_L(EAX, EAX)
- JZ(GLNAME(_glapi_fallback_StartInstrumentsSGIX))
- JMP(GL_OFFSET(_gloffset_StartInstrumentsSGIX))
-
-ALIGNTEXT16
-GLOBL_FN(GL_PREFIX(StopInstrumentsSGIX))
-GL_PREFIX(StopInstrumentsSGIX):
+GLOBL_FN(GL_PREFIX(PollInstrumentsSGIX))
+GL_PREFIX(PollInstrumentsSGIX):
MOV_L(GLNAME(_glapi_Dispatch), EAX)
TEST_L(EAX, EAX)
- JZ(GLNAME(_glapi_fallback_StopInstrumentsSGIX))
- JMP(GL_OFFSET(_gloffset_StopInstrumentsSGIX))
+ JZ(GLNAME(_glapi_fallback_PollInstrumentsSGIX))
+ JMP(GL_OFFSET(_gloffset_PollInstrumentsSGIX))
ALIGNTEXT16
GLOBL_FN(GL_PREFIX(ReadInstrumentsSGIX))
@@ -4181,20 +4076,20 @@ GL_PREFIX(ReadInstrumentsSGIX):
JMP(GL_OFFSET(_gloffset_ReadInstrumentsSGIX))
ALIGNTEXT16
-GLOBL_FN(GL_PREFIX(PollInstrumentsSGIX))
-GL_PREFIX(PollInstrumentsSGIX):
+GLOBL_FN(GL_PREFIX(StartInstrumentsSGIX))
+GL_PREFIX(StartInstrumentsSGIX):
MOV_L(GLNAME(_glapi_Dispatch), EAX)
TEST_L(EAX, EAX)
- JZ(GLNAME(_glapi_fallback_PollInstrumentsSGIX))
- JMP(GL_OFFSET(_gloffset_PollInstrumentsSGIX))
+ JZ(GLNAME(_glapi_fallback_StartInstrumentsSGIX))
+ JMP(GL_OFFSET(_gloffset_StartInstrumentsSGIX))
ALIGNTEXT16
-GLOBL_FN(GL_PREFIX(GetInstrumentsSGIX))
-GL_PREFIX(GetInstrumentsSGIX):
+GLOBL_FN(GL_PREFIX(StopInstrumentsSGIX))
+GL_PREFIX(StopInstrumentsSGIX):
MOV_L(GLNAME(_glapi_Dispatch), EAX)
TEST_L(EAX, EAX)
- JZ(GLNAME(_glapi_fallback_GetInstrumentsSGIX))
- JMP(GL_OFFSET(_gloffset_GetInstrumentsSGIX))
+ JZ(GLNAME(_glapi_fallback_StopInstrumentsSGIX))
+ JMP(GL_OFFSET(_gloffset_StopInstrumentsSGIX))
ALIGNTEXT16
GLOBL_FN(GL_PREFIX(FrameZoomSGIX))
@@ -4205,6 +4100,14 @@ GL_PREFIX(FrameZoomSGIX):
JMP(GL_OFFSET(_gloffset_FrameZoomSGIX))
ALIGNTEXT16
+GLOBL_FN(GL_PREFIX(TagSampleBufferSGIX))
+GL_PREFIX(TagSampleBufferSGIX):
+ MOV_L(GLNAME(_glapi_Dispatch), EAX)
+ TEST_L(EAX, EAX)
+ JZ(GLNAME(_glapi_fallback_TagSampleBufferSGIX))
+ JMP(GL_OFFSET(_gloffset_TagSampleBufferSGIX))
+
+ALIGNTEXT16
GLOBL_FN(GL_PREFIX(ReferencePlaneSGIX))
GL_PREFIX(ReferencePlaneSGIX):
MOV_L(GLNAME(_glapi_Dispatch), EAX)
@@ -4221,14 +4124,62 @@ GL_PREFIX(FlushRasterSGIX):
JMP(GL_OFFSET(_gloffset_FlushRasterSGIX))
ALIGNTEXT16
+GLOBL_FN(GL_PREFIX(ColorSubTableEXT))
+GL_PREFIX(ColorSubTableEXT):
+ MOV_L(GLNAME(_glapi_Dispatch), EAX)
+ TEST_L(EAX, EAX)
+ JZ(GLNAME(_glapi_fallback_ColorSubTableEXT))
+ JMP(GL_OFFSET(_gloffset_ColorSubTable))
+
+ALIGNTEXT16
GLOBL_FN(GL_PREFIX(CopyColorSubTableEXT))
GL_PREFIX(CopyColorSubTableEXT):
MOV_L(GLNAME(_glapi_Dispatch), EAX)
TEST_L(EAX, EAX)
- JZ(GLNAME(_glapi_fallback_CopyColorSubTable))
+ JZ(GLNAME(_glapi_fallback_CopyColorSubTableEXT))
JMP(GL_OFFSET(_gloffset_CopyColorSubTable))
ALIGNTEXT16
+GLOBL_FN(GL_PREFIX(HintPGI))
+GL_PREFIX(HintPGI):
+ MOV_L(GLNAME(_glapi_Dispatch), EAX)
+ TEST_L(EAX, EAX)
+ JZ(GLNAME(_glapi_fallback_HintPGI))
+ JMP(GL_OFFSET(_gloffset_HintPGI))
+
+ALIGNTEXT16
+GLOBL_FN(GL_PREFIX(ColorTableEXT))
+GL_PREFIX(ColorTableEXT):
+ MOV_L(GLNAME(_glapi_Dispatch), EAX)
+ TEST_L(EAX, EAX)
+ JZ(GLNAME(_glapi_fallback_ColorTableEXT))
+ JMP(GL_OFFSET(_gloffset_ColorTable))
+
+ALIGNTEXT16
+GLOBL_FN(GL_PREFIX(GetColorTableEXT))
+GL_PREFIX(GetColorTableEXT):
+ MOV_L(GLNAME(_glapi_Dispatch), EAX)
+ TEST_L(EAX, EAX)
+ JZ(GLNAME(_glapi_fallback_GetColorTableEXT))
+ JMP(GL_OFFSET(_gloffset_GetColorTableEXT))
+
+ALIGNTEXT16
+GLOBL_FN(GL_PREFIX(GetColorTableParameterivEXT))
+GL_PREFIX(GetColorTableParameterivEXT):
+ MOV_L(GLNAME(_glapi_Dispatch), EAX)
+ TEST_L(EAX, EAX)
+ JZ(GLNAME(_glapi_fallback_GetColorTableParameterivEXT))
+ JMP(GL_OFFSET(_gloffset_GetColorTableParameterivEXT))
+
+ALIGNTEXT16
+GLOBL_FN(GL_PREFIX(GetColorTableParameterfvEXT))
+GL_PREFIX(GetColorTableParameterfvEXT):
+ MOV_L(GLNAME(_glapi_Dispatch), EAX)
+ TEST_L(EAX, EAX)
+ JZ(GLNAME(_glapi_fallback_GetColorTableParameterfvEXT))
+ JMP(GL_OFFSET(_gloffset_GetColorTableParameterfvEXT))
+
+ALIGNTEXT16
GLOBL_FN(GL_PREFIX(GetListParameterfvSGIX))
GL_PREFIX(GetListParameterfvSGIX):
MOV_L(GLNAME(_glapi_Dispatch), EAX)
@@ -4293,44 +4244,36 @@ GL_PREFIX(IndexFuncEXT):
JMP(GL_OFFSET(_gloffset_IndexFuncEXT))
ALIGNTEXT16
-GLOBL_FN(GL_PREFIX(CullParameterdvEXT))
-GL_PREFIX(CullParameterdvEXT):
- MOV_L(GLNAME(_glapi_Dispatch), EAX)
- TEST_L(EAX, EAX)
- JZ(GLNAME(_glapi_fallback_CullParameterdvEXT))
- JMP(GL_OFFSET(_gloffset_CullParameterdvEXT))
-
-ALIGNTEXT16
-GLOBL_FN(GL_PREFIX(CullParameterfvEXT))
-GL_PREFIX(CullParameterfvEXT):
+GLOBL_FN(GL_PREFIX(LockArraysEXT))
+GL_PREFIX(LockArraysEXT):
MOV_L(GLNAME(_glapi_Dispatch), EAX)
TEST_L(EAX, EAX)
- JZ(GLNAME(_glapi_fallback_CullParameterfvEXT))
- JMP(GL_OFFSET(_gloffset_CullParameterfvEXT))
+ JZ(GLNAME(_glapi_fallback_LockArraysEXT))
+ JMP(GL_OFFSET(_gloffset_LockArraysEXT))
ALIGNTEXT16
-GLOBL_FN(GL_PREFIX(SampleCoverageARB))
-GL_PREFIX(SampleCoverageARB):
+GLOBL_FN(GL_PREFIX(UnlockArraysEXT))
+GL_PREFIX(UnlockArraysEXT):
MOV_L(GLNAME(_glapi_Dispatch), EAX)
TEST_L(EAX, EAX)
- JZ(GLNAME(_glapi_fallback_SampleCoverageARB))
- JMP(GL_OFFSET(_gloffset_SampleCoverageARB))
+ JZ(GLNAME(_glapi_fallback_UnlockArraysEXT))
+ JMP(GL_OFFSET(_gloffset_UnlockArraysEXT))
ALIGNTEXT16
-GLOBL_FN(GL_PREFIX(SamplePassARB))
-GL_PREFIX(SamplePassARB):
+GLOBL_FN(GL_PREFIX(CullParameterdvEXT))
+GL_PREFIX(CullParameterdvEXT):
MOV_L(GLNAME(_glapi_Dispatch), EAX)
TEST_L(EAX, EAX)
- JZ(GLNAME(_glapi_fallback_SamplePassARB))
- JMP(GL_OFFSET(_gloffset_SamplePassARB))
+ JZ(GLNAME(_glapi_fallback_CullParameterdvEXT))
+ JMP(GL_OFFSET(_gloffset_CullParameterdvEXT))
ALIGNTEXT16
-GLOBL_FN(GL_PREFIX(TagSampleBufferSGIX))
-GL_PREFIX(TagSampleBufferSGIX):
+GLOBL_FN(GL_PREFIX(CullParameterfvEXT))
+GL_PREFIX(CullParameterfvEXT):
MOV_L(GLNAME(_glapi_Dispatch), EAX)
TEST_L(EAX, EAX)
- JZ(GLNAME(_glapi_fallback_TagSampleBufferSGIX))
- JMP(GL_OFFSET(_gloffset_TagSampleBufferSGIX))
+ JZ(GLNAME(_glapi_fallback_CullParameterfvEXT))
+ JMP(GL_OFFSET(_gloffset_CullParameterfvEXT))
ALIGNTEXT16
GLOBL_FN(GL_PREFIX(FragmentColorMaterialSGIX))
@@ -4477,6 +4420,14 @@ GL_PREFIX(LightEnviSGIX):
JMP(GL_OFFSET(_gloffset_LightEnviSGIX))
ALIGNTEXT16
+GLOBL_FN(GL_PREFIX(DrawRangeElementsEXT))
+GL_PREFIX(DrawRangeElementsEXT):
+ MOV_L(GLNAME(_glapi_Dispatch), EAX)
+ TEST_L(EAX, EAX)
+ JZ(GLNAME(_glapi_fallback_DrawRangeElementsEXT))
+ JMP(GL_OFFSET(_gloffset_DrawRangeElements))
+
+ALIGNTEXT16
GLOBL_FN(GL_PREFIX(FogCoordfEXT))
GL_PREFIX(FogCoordfEXT):
MOV_L(GLNAME(_glapi_Dispatch), EAX)
@@ -4549,14 +4500,6 @@ GL_PREFIX(VertexWeightPointerEXT):
JMP(GL_OFFSET(_gloffset_VertexWeightPointerEXT))
ALIGNTEXT16
-GLOBL_FN(GL_PREFIX(VertexArrayRangeNV))
-GL_PREFIX(VertexArrayRangeNV):
- MOV_L(GLNAME(_glapi_Dispatch), EAX)
- TEST_L(EAX, EAX)
- JZ(GLNAME(_glapi_fallback_VertexArrayRangeNV))
- JMP(GL_OFFSET(_gloffset_VertexArrayRangeNV))
-
-ALIGNTEXT16
GLOBL_FN(GL_PREFIX(FlushVertexArrayRangeNV))
GL_PREFIX(FlushVertexArrayRangeNV):
MOV_L(GLNAME(_glapi_Dispatch), EAX)
@@ -4565,6 +4508,14 @@ GL_PREFIX(FlushVertexArrayRangeNV):
JMP(GL_OFFSET(_gloffset_FlushVertexArrayRangeNV))
ALIGNTEXT16
+GLOBL_FN(GL_PREFIX(VertexArrayRangeNV))
+GL_PREFIX(VertexArrayRangeNV):
+ MOV_L(GLNAME(_glapi_Dispatch), EAX)
+ TEST_L(EAX, EAX)
+ JZ(GLNAME(_glapi_fallback_VertexArrayRangeNV))
+ JMP(GL_OFFSET(_gloffset_VertexArrayRangeNV))
+
+ALIGNTEXT16
GLOBL_FN(GL_PREFIX(CombinerParameterfvNV))
GL_PREFIX(CombinerParameterfvNV):
MOV_L(GLNAME(_glapi_Dispatch), EAX)
@@ -4668,4 +4619,229 @@ GL_PREFIX(GetFinalCombinerInputParameterivNV):
JZ(GLNAME(_glapi_fallback_GetFinalCombinerInputParameterivNV))
JMP(GL_OFFSET(_gloffset_GetFinalCombinerInputParameterivNV))
+ALIGNTEXT16
+GLOBL_FN(GL_PREFIX(ResizeBuffersMESA))
+GL_PREFIX(ResizeBuffersMESA):
+ MOV_L(GLNAME(_glapi_Dispatch), EAX)
+ TEST_L(EAX, EAX)
+ JZ(GLNAME(_glapi_fallback_ResizeBuffersMESA))
+ JMP(GL_OFFSET(_gloffset_ResizeBuffersMESA))
+
+ALIGNTEXT16
+GLOBL_FN(GL_PREFIX(WindowPos2dMESA))
+GL_PREFIX(WindowPos2dMESA):
+ MOV_L(GLNAME(_glapi_Dispatch), EAX)
+ TEST_L(EAX, EAX)
+ JZ(GLNAME(_glapi_fallback_WindowPos2dMESA))
+ JMP(GL_OFFSET(_gloffset_WindowPos2dMESA))
+
+ALIGNTEXT16
+GLOBL_FN(GL_PREFIX(WindowPos2dvMESA))
+GL_PREFIX(WindowPos2dvMESA):
+ MOV_L(GLNAME(_glapi_Dispatch), EAX)
+ TEST_L(EAX, EAX)
+ JZ(GLNAME(_glapi_fallback_WindowPos2dvMESA))
+ JMP(GL_OFFSET(_gloffset_WindowPos2dvMESA))
+
+ALIGNTEXT16
+GLOBL_FN(GL_PREFIX(WindowPos2fMESA))
+GL_PREFIX(WindowPos2fMESA):
+ MOV_L(GLNAME(_glapi_Dispatch), EAX)
+ TEST_L(EAX, EAX)
+ JZ(GLNAME(_glapi_fallback_WindowPos2fMESA))
+ JMP(GL_OFFSET(_gloffset_WindowPos2fMESA))
+
+ALIGNTEXT16
+GLOBL_FN(GL_PREFIX(WindowPos2fvMESA))
+GL_PREFIX(WindowPos2fvMESA):
+ MOV_L(GLNAME(_glapi_Dispatch), EAX)
+ TEST_L(EAX, EAX)
+ JZ(GLNAME(_glapi_fallback_WindowPos2fvMESA))
+ JMP(GL_OFFSET(_gloffset_WindowPos2fvMESA))
+
+ALIGNTEXT16
+GLOBL_FN(GL_PREFIX(WindowPos2iMESA))
+GL_PREFIX(WindowPos2iMESA):
+ MOV_L(GLNAME(_glapi_Dispatch), EAX)
+ TEST_L(EAX, EAX)
+ JZ(GLNAME(_glapi_fallback_WindowPos2iMESA))
+ JMP(GL_OFFSET(_gloffset_WindowPos2iMESA))
+
+ALIGNTEXT16
+GLOBL_FN(GL_PREFIX(WindowPos2ivMESA))
+GL_PREFIX(WindowPos2ivMESA):
+ MOV_L(GLNAME(_glapi_Dispatch), EAX)
+ TEST_L(EAX, EAX)
+ JZ(GLNAME(_glapi_fallback_WindowPos2ivMESA))
+ JMP(GL_OFFSET(_gloffset_WindowPos2ivMESA))
+
+ALIGNTEXT16
+GLOBL_FN(GL_PREFIX(WindowPos2sMESA))
+GL_PREFIX(WindowPos2sMESA):
+ MOV_L(GLNAME(_glapi_Dispatch), EAX)
+ TEST_L(EAX, EAX)
+ JZ(GLNAME(_glapi_fallback_WindowPos2sMESA))
+ JMP(GL_OFFSET(_gloffset_WindowPos2sMESA))
+
+ALIGNTEXT16
+GLOBL_FN(GL_PREFIX(WindowPos2svMESA))
+GL_PREFIX(WindowPos2svMESA):
+ MOV_L(GLNAME(_glapi_Dispatch), EAX)
+ TEST_L(EAX, EAX)
+ JZ(GLNAME(_glapi_fallback_WindowPos2svMESA))
+ JMP(GL_OFFSET(_gloffset_WindowPos2svMESA))
+
+ALIGNTEXT16
+GLOBL_FN(GL_PREFIX(WindowPos3dMESA))
+GL_PREFIX(WindowPos3dMESA):
+ MOV_L(GLNAME(_glapi_Dispatch), EAX)
+ TEST_L(EAX, EAX)
+ JZ(GLNAME(_glapi_fallback_WindowPos3dMESA))
+ JMP(GL_OFFSET(_gloffset_WindowPos3dMESA))
+
+ALIGNTEXT16
+GLOBL_FN(GL_PREFIX(WindowPos3dvMESA))
+GL_PREFIX(WindowPos3dvMESA):
+ MOV_L(GLNAME(_glapi_Dispatch), EAX)
+ TEST_L(EAX, EAX)
+ JZ(GLNAME(_glapi_fallback_WindowPos3dvMESA))
+ JMP(GL_OFFSET(_gloffset_WindowPos3dvMESA))
+
+ALIGNTEXT16
+GLOBL_FN(GL_PREFIX(WindowPos3fMESA))
+GL_PREFIX(WindowPos3fMESA):
+ MOV_L(GLNAME(_glapi_Dispatch), EAX)
+ TEST_L(EAX, EAX)
+ JZ(GLNAME(_glapi_fallback_WindowPos3fMESA))
+ JMP(GL_OFFSET(_gloffset_WindowPos3fMESA))
+
+ALIGNTEXT16
+GLOBL_FN(GL_PREFIX(WindowPos3fvMESA))
+GL_PREFIX(WindowPos3fvMESA):
+ MOV_L(GLNAME(_glapi_Dispatch), EAX)
+ TEST_L(EAX, EAX)
+ JZ(GLNAME(_glapi_fallback_WindowPos3fvMESA))
+ JMP(GL_OFFSET(_gloffset_WindowPos3fvMESA))
+
+ALIGNTEXT16
+GLOBL_FN(GL_PREFIX(WindowPos3iMESA))
+GL_PREFIX(WindowPos3iMESA):
+ MOV_L(GLNAME(_glapi_Dispatch), EAX)
+ TEST_L(EAX, EAX)
+ JZ(GLNAME(_glapi_fallback_WindowPos3iMESA))
+ JMP(GL_OFFSET(_gloffset_WindowPos3iMESA))
+
+ALIGNTEXT16
+GLOBL_FN(GL_PREFIX(WindowPos3ivMESA))
+GL_PREFIX(WindowPos3ivMESA):
+ MOV_L(GLNAME(_glapi_Dispatch), EAX)
+ TEST_L(EAX, EAX)
+ JZ(GLNAME(_glapi_fallback_WindowPos3ivMESA))
+ JMP(GL_OFFSET(_gloffset_WindowPos3ivMESA))
+
+ALIGNTEXT16
+GLOBL_FN(GL_PREFIX(WindowPos3sMESA))
+GL_PREFIX(WindowPos3sMESA):
+ MOV_L(GLNAME(_glapi_Dispatch), EAX)
+ TEST_L(EAX, EAX)
+ JZ(GLNAME(_glapi_fallback_WindowPos3sMESA))
+ JMP(GL_OFFSET(_gloffset_WindowPos3sMESA))
+
+ALIGNTEXT16
+GLOBL_FN(GL_PREFIX(WindowPos3svMESA))
+GL_PREFIX(WindowPos3svMESA):
+ MOV_L(GLNAME(_glapi_Dispatch), EAX)
+ TEST_L(EAX, EAX)
+ JZ(GLNAME(_glapi_fallback_WindowPos3svMESA))
+ JMP(GL_OFFSET(_gloffset_WindowPos3svMESA))
+
+ALIGNTEXT16
+GLOBL_FN(GL_PREFIX(WindowPos4dMESA))
+GL_PREFIX(WindowPos4dMESA):
+ MOV_L(GLNAME(_glapi_Dispatch), EAX)
+ TEST_L(EAX, EAX)
+ JZ(GLNAME(_glapi_fallback_WindowPos4dMESA))
+ JMP(GL_OFFSET(_gloffset_WindowPos4dMESA))
+
+ALIGNTEXT16
+GLOBL_FN(GL_PREFIX(WindowPos4dvMESA))
+GL_PREFIX(WindowPos4dvMESA):
+ MOV_L(GLNAME(_glapi_Dispatch), EAX)
+ TEST_L(EAX, EAX)
+ JZ(GLNAME(_glapi_fallback_WindowPos4dvMESA))
+ JMP(GL_OFFSET(_gloffset_WindowPos4dvMESA))
+
+ALIGNTEXT16
+GLOBL_FN(GL_PREFIX(WindowPos4fMESA))
+GL_PREFIX(WindowPos4fMESA):
+ MOV_L(GLNAME(_glapi_Dispatch), EAX)
+ TEST_L(EAX, EAX)
+ JZ(GLNAME(_glapi_fallback_WindowPos4fMESA))
+ JMP(GL_OFFSET(_gloffset_WindowPos4fMESA))
+
+ALIGNTEXT16
+GLOBL_FN(GL_PREFIX(WindowPos4fvMESA))
+GL_PREFIX(WindowPos4fvMESA):
+ MOV_L(GLNAME(_glapi_Dispatch), EAX)
+ TEST_L(EAX, EAX)
+ JZ(GLNAME(_glapi_fallback_WindowPos4fvMESA))
+ JMP(GL_OFFSET(_gloffset_WindowPos4fvMESA))
+
+ALIGNTEXT16
+GLOBL_FN(GL_PREFIX(WindowPos4iMESA))
+GL_PREFIX(WindowPos4iMESA):
+ MOV_L(GLNAME(_glapi_Dispatch), EAX)
+ TEST_L(EAX, EAX)
+ JZ(GLNAME(_glapi_fallback_WindowPos4iMESA))
+ JMP(GL_OFFSET(_gloffset_WindowPos4iMESA))
+
+ALIGNTEXT16
+GLOBL_FN(GL_PREFIX(WindowPos4ivMESA))
+GL_PREFIX(WindowPos4ivMESA):
+ MOV_L(GLNAME(_glapi_Dispatch), EAX)
+ TEST_L(EAX, EAX)
+ JZ(GLNAME(_glapi_fallback_WindowPos4ivMESA))
+ JMP(GL_OFFSET(_gloffset_WindowPos4ivMESA))
+
+ALIGNTEXT16
+GLOBL_FN(GL_PREFIX(WindowPos4sMESA))
+GL_PREFIX(WindowPos4sMESA):
+ MOV_L(GLNAME(_glapi_Dispatch), EAX)
+ TEST_L(EAX, EAX)
+ JZ(GLNAME(_glapi_fallback_WindowPos4sMESA))
+ JMP(GL_OFFSET(_gloffset_WindowPos4sMESA))
+
+ALIGNTEXT16
+GLOBL_FN(GL_PREFIX(WindowPos4svMESA))
+GL_PREFIX(WindowPos4svMESA):
+ MOV_L(GLNAME(_glapi_Dispatch), EAX)
+ TEST_L(EAX, EAX)
+ JZ(GLNAME(_glapi_fallback_WindowPos4svMESA))
+ JMP(GL_OFFSET(_gloffset_WindowPos4svMESA))
+
+ALIGNTEXT16
+GLOBL_FN(GL_PREFIX(TbufferMask3DFX))
+GL_PREFIX(TbufferMask3DFX):
+ MOV_L(GLNAME(_glapi_Dispatch), EAX)
+ TEST_L(EAX, EAX)
+ JZ(GLNAME(_glapi_fallback_TbufferMask3DFX))
+ JMP(GL_OFFSET(_gloffset_TbufferMask3DFX))
+
+ALIGNTEXT16
+GLOBL_FN(GL_PREFIX(SampleMaskEXT))
+GL_PREFIX(SampleMaskEXT):
+ MOV_L(GLNAME(_glapi_Dispatch), EAX)
+ TEST_L(EAX, EAX)
+ JZ(GLNAME(_glapi_fallback_SampleMaskEXT))
+ JMP(GL_OFFSET(_gloffset_SampleMaskSGIS))
+
+ALIGNTEXT16
+GLOBL_FN(GL_PREFIX(SamplePatternEXT))
+GL_PREFIX(SamplePatternEXT):
+ MOV_L(GLNAME(_glapi_Dispatch), EAX)
+ TEST_L(EAX, EAX)
+ JZ(GLNAME(_glapi_fallback_SamplePatternEXT))
+ JMP(GL_OFFSET(_gloffset_SamplePatternSGIS))
+
+
#endif /* __WIN32__ */
diff --git a/xc/extras/Mesa/src/X86/vertex_3dnow.S b/xc/extras/Mesa/src/X86/vertex_3dnow.S
index e58583195..2c0060362 100644
--- a/xc/extras/Mesa/src/X86/vertex_3dnow.S
+++ b/xc/extras/Mesa/src/X86/vertex_3dnow.S
@@ -11,7 +11,7 @@
-/*#define MAT_SX 0 accessed by REGIND !! */
+/*#define MAT_SX 0 accessed by REGIND !! */
#define MAT_SY 20
#define MAT_SZ 40
#define MAT_TX 48
diff --git a/xc/extras/Mesa/src/X86/x86.c b/xc/extras/Mesa/src/X86/x86.c
index d145810c2..1b24811d4 100644
--- a/xc/extras/Mesa/src/X86/x86.c
+++ b/xc/extras/Mesa/src/X86/x86.c
@@ -28,11 +28,7 @@
*/
-#include <limits.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <math.h>
-
+#include "glheader.h"
#include "context.h"
#include "types.h"
#include "vertices.h"
@@ -86,8 +82,7 @@ extern void _ASMAPI gl_v16_x86_general_xform(GLfloat *dest,
gl_transform_tab[cma][vsize][MATRIX_3D] \
= gl_##pfx##_transform_points##vsize##_3d_##masked;
-void gl_init_x86_asm_transforms( void )
-{
+
#ifdef USE_X86_ASM
DECLARE_XFORM_GROUP( x86, 2, raw )
DECLARE_XFORM_GROUP( x86, 3, raw )
@@ -101,8 +96,12 @@ void gl_init_x86_asm_transforms( void )
GLubyte clipMask[],
GLubyte *orMask,
GLubyte *andMask );
+#endif
-
+
+void gl_init_x86_asm_transforms( void )
+{
+#ifdef USE_X86_ASM
ASSIGN_XFORM_GROUP( x86, 0, 2, raw )
ASSIGN_XFORM_GROUP( x86, 0, 3, raw )
ASSIGN_XFORM_GROUP( x86, 0, 4, raw )
diff --git a/xc/extras/Mesa/src/alphabuf.c b/xc/extras/Mesa/src/alphabuf.c
index 7bba72b47..6f2332407 100644
--- a/xc/extras/Mesa/src/alphabuf.c
+++ b/xc/extras/Mesa/src/alphabuf.c
@@ -60,7 +60,7 @@ alloc_alpha_buffers( GLcontext *ctx, GLframebuffer *buf )
{
GLint bytes = buf->Width * buf->Height * sizeof(GLubyte);
- ASSERT(ctx->DrawBuffer->UseSoftwareAlphaBuffer);
+ ASSERT(ctx->DrawBuffer->UseSoftwareAlphaBuffers);
if (buf->FrontLeftAlpha) {
FREE( buf->FrontLeftAlpha );
@@ -141,7 +141,7 @@ _mesa_clear_alpha_buffers( GLcontext *ctx )
const GLubyte aclear = (GLint) (ctx->Color.ClearColor[3] * 255.0F);
GLuint bufferBit;
- ASSERT(ctx->DrawBuffer->UseSoftwareAlphaBuffer);
+ ASSERT(ctx->DrawBuffer->UseSoftwareAlphaBuffers);
ASSERT(ctx->Color.ColorMask[ACOMP]);
/* loop over four possible alpha buffers */
diff --git a/xc/extras/Mesa/src/attrib.c b/xc/extras/Mesa/src/attrib.c
index d4f765c3f..2e750ffdb 100644
--- a/xc/extras/Mesa/src/attrib.c
+++ b/xc/extras/Mesa/src/attrib.c
@@ -166,6 +166,9 @@ _mesa_PushAttrib(GLbitfield mask)
attr->ClipPlane[i] = ctx->Transform.ClipEnabled[i];
}
attr->ColorMaterial = ctx->Light.ColorMaterialEnabled;
+ attr->Convolution1D = ctx->Pixel.Convolution1DEnabled;
+ attr->Convolution2D = ctx->Pixel.Convolution2DEnabled;
+ attr->Separable2D = ctx->Pixel.Separable2DEnabled;
attr->CullFace = ctx->Polygon.CullFlag;
attr->DepthTest = ctx->Depth.Test;
attr->Dither = ctx->Color.DitherFlag;
@@ -507,6 +510,9 @@ _mesa_PopAttrib(void)
TEST_AND_UPDATE(ctx->Polygon.CullFlag, enable->CullFace, GL_CULL_FACE);
TEST_AND_UPDATE(ctx->Depth.Test, enable->DepthTest, GL_DEPTH_TEST);
TEST_AND_UPDATE(ctx->Color.DitherFlag, enable->Dither, GL_DITHER);
+ TEST_AND_UPDATE(ctx->Pixel.Convolution1DEnabled, enable->Convolution1D, GL_CONVOLUTION_1D);
+ TEST_AND_UPDATE(ctx->Pixel.Convolution2DEnabled, enable->Convolution2D, GL_CONVOLUTION_2D);
+ TEST_AND_UPDATE(ctx->Pixel.Separable2DEnabled, enable->Separable2D, GL_SEPARABLE_2D);
TEST_AND_UPDATE(ctx->Fog.Enabled, enable->Fog, GL_FOG);
TEST_AND_UPDATE(ctx->Light.Enabled, enable->Lighting, GL_LIGHTING);
TEST_AND_UPDATE(ctx->Line.SmoothFlag, enable->LineSmooth, GL_LINE_SMOOTH);
diff --git a/xc/extras/Mesa/src/bitmap.c b/xc/extras/Mesa/src/bitmap.c
index 642bc7d33..eefee932f 100644
--- a/xc/extras/Mesa/src/bitmap.c
+++ b/xc/extras/Mesa/src/bitmap.c
@@ -68,10 +68,10 @@ render_bitmap( GLcontext *ctx, GLint px, GLint py,
g = (GLint) (ctx->Current.RasterColor[1] * 255.0F);
b = (GLint) (ctx->Current.RasterColor[2] * 255.0F);
a = (GLint) (ctx->Current.RasterColor[3] * 255.0F);
- PB_SET_COLOR( ctx, PB, r, g, b, a );
+ PB_SET_COLOR( PB, r, g, b, a );
}
else {
- PB_SET_INDEX( ctx, PB, ctx->Current.RasterIndex );
+ PB_SET_INDEX( PB, ctx->Current.RasterIndex );
}
fragZ = (GLdepth) ( ctx->Current.RasterPos[2] * ctx->Visual->DepthMaxF);
diff --git a/xc/extras/Mesa/src/colortab.c b/xc/extras/Mesa/src/colortab.c
index 341ceaa25..e15014dfe 100644
--- a/xc/extras/Mesa/src/colortab.c
+++ b/xc/extras/Mesa/src/colortab.c
@@ -35,11 +35,69 @@
#include "mem.h"
#include "mmath.h"
#include "span.h"
-#include "teximage.h"
#endif
+/*
+ * Given an internalFormat token passed to glColorTable,
+ * return the corresponding base format.
+ * Return -1 if invalid token.
+ */
+static GLint
+base_colortab_format( GLenum format )
+{
+ switch (format) {
+ case GL_ALPHA:
+ case GL_ALPHA4:
+ case GL_ALPHA8:
+ case GL_ALPHA12:
+ case GL_ALPHA16:
+ return GL_ALPHA;
+ case GL_LUMINANCE:
+ case GL_LUMINANCE4:
+ case GL_LUMINANCE8:
+ case GL_LUMINANCE12:
+ case GL_LUMINANCE16:
+ return GL_LUMINANCE;
+ case GL_LUMINANCE_ALPHA:
+ case GL_LUMINANCE4_ALPHA4:
+ case GL_LUMINANCE6_ALPHA2:
+ case GL_LUMINANCE8_ALPHA8:
+ case GL_LUMINANCE12_ALPHA4:
+ case GL_LUMINANCE12_ALPHA12:
+ case GL_LUMINANCE16_ALPHA16:
+ return GL_LUMINANCE_ALPHA;
+ case GL_INTENSITY:
+ case GL_INTENSITY4:
+ case GL_INTENSITY8:
+ case GL_INTENSITY12:
+ case GL_INTENSITY16:
+ return GL_INTENSITY;
+ case GL_RGB:
+ case GL_R3_G3_B2:
+ case GL_RGB4:
+ case GL_RGB5:
+ case GL_RGB8:
+ case GL_RGB10:
+ case GL_RGB12:
+ case GL_RGB16:
+ return GL_RGB;
+ case GL_RGBA:
+ case GL_RGBA2:
+ case GL_RGBA4:
+ case GL_RGB5_A1:
+ case GL_RGBA8:
+ case GL_RGB10_A2:
+ case GL_RGBA12:
+ case GL_RGBA16:
+ return GL_RGBA;
+ default:
+ return -1; /* error */
+ }
+}
+
+
void
_mesa_init_colortable( struct gl_color_table *p )
{
@@ -247,7 +305,7 @@ _mesa_ColorTable( GLenum target, GLenum internalFormat,
return;
}
- baseFormat = _mesa_base_tex_format(internalFormat);
+ baseFormat = base_colortab_format(internalFormat);
if (baseFormat < 0 || baseFormat == GL_COLOR_INDEX) {
gl_error(ctx, GL_INVALID_ENUM, "glColorTable(internalFormat)");
return;
@@ -450,7 +508,8 @@ _mesa_ColorSubTable( GLenum target, GLsizei start,
GLfloat *dest = (GLfloat *) table->Table + start * comps * sizeof(GLfloat);
ASSERT(table->TableType == GL_FLOAT);
_mesa_unpack_float_color_span(ctx, count, table->Format, dest,
- format, type, data, &ctx->Unpack, GL_TRUE);
+ format, type, data, &ctx->Unpack,
+ GL_FALSE, GL_TRUE);
}
if (texObj || target == GL_SHARED_TEXTURE_PALETTE_EXT) {
diff --git a/xc/extras/Mesa/src/config.h b/xc/extras/Mesa/src/config.h
index 76b6a9d18..3ff5e5f78 100644
--- a/xc/extras/Mesa/src/config.h
+++ b/xc/extras/Mesa/src/config.h
@@ -117,6 +117,13 @@
/* Size of histogram tables */
#define HISTOGRAM_TABLE_SIZE 256
+/* Max convolution filter sizes */
+#define MAX_CONVOLUTION_WIDTH 5
+#define MAX_CONVOLUTION_HEIGHT 5
+
+/* GL_ARB_texture_compression */
+#define MAX_COMPRESSED_TEXTURE_FORMATS 25
+
/*
diff --git a/xc/extras/Mesa/src/context.c b/xc/extras/Mesa/src/context.c
index 04c3e1c05..0138ae6b3 100644
--- a/xc/extras/Mesa/src/context.c
+++ b/xc/extras/Mesa/src/context.c
@@ -86,164 +86,6 @@ struct immediate *_mesa_CurrentInput = NULL;
#endif
-
-
-/**********************************************************************/
-/***** Profiling functions *****/
-/**********************************************************************/
-
-#ifdef PROFILE
-
-#include <sys/times.h>
-#include <sys/param.h>
-
-
-/*
- * Return system time in seconds.
- * NOTE: this implementation may not be very portable!
- */
-GLdouble gl_time( void )
-{
- static GLdouble prev_time = 0.0;
- static GLdouble time;
- struct tms tm;
- clock_t clk;
-
- clk = times(&tm);
-
-#ifdef CLK_TCK
- time = (double)clk / (double)CLK_TCK;
-#else
- time = (double)clk / (double)HZ;
-#endif
-
- if (time>prev_time) {
- prev_time = time;
- return time;
- }
- else {
- return prev_time;
- }
-}
-
-/*
- * Reset the timing/profiling counters
- */
-static void init_timings( GLcontext *ctx )
-{
- ctx->BeginEndCount = 0;
- ctx->BeginEndTime = 0.0;
- ctx->VertexCount = 0;
- ctx->VertexTime = 0.0;
- ctx->PointCount = 0;
- ctx->PointTime = 0.0;
- ctx->LineCount = 0;
- ctx->LineTime = 0.0;
- ctx->PolygonCount = 0;
- ctx->PolygonTime = 0.0;
- ctx->ClearCount = 0;
- ctx->ClearTime = 0.0;
- ctx->SwapCount = 0;
- ctx->SwapTime = 0.0;
-}
-
-
-/*
- * Print the accumulated timing/profiling data.
- */
-static void print_timings( GLcontext *ctx )
-{
- GLdouble beginendrate;
- GLdouble vertexrate;
- GLdouble pointrate;
- GLdouble linerate;
- GLdouble polygonrate;
- GLdouble overhead;
- GLdouble clearrate;
- GLdouble swaprate;
- GLdouble avgvertices;
-
- if (ctx->BeginEndTime>0.0) {
- beginendrate = ctx->BeginEndCount / ctx->BeginEndTime;
- }
- else {
- beginendrate = 0.0;
- }
- if (ctx->VertexTime>0.0) {
- vertexrate = ctx->VertexCount / ctx->VertexTime;
- }
- else {
- vertexrate = 0.0;
- }
- if (ctx->PointTime>0.0) {
- pointrate = ctx->PointCount / ctx->PointTime;
- }
- else {
- pointrate = 0.0;
- }
- if (ctx->LineTime>0.0) {
- linerate = ctx->LineCount / ctx->LineTime;
- }
- else {
- linerate = 0.0;
- }
- if (ctx->PolygonTime>0.0) {
- polygonrate = ctx->PolygonCount / ctx->PolygonTime;
- }
- else {
- polygonrate = 0.0;
- }
- if (ctx->ClearTime>0.0) {
- clearrate = ctx->ClearCount / ctx->ClearTime;
- }
- else {
- clearrate = 0.0;
- }
- if (ctx->SwapTime>0.0) {
- swaprate = ctx->SwapCount / ctx->SwapTime;
- }
- else {
- swaprate = 0.0;
- }
-
- if (ctx->BeginEndCount>0) {
- avgvertices = (GLdouble) ctx->VertexCount / (GLdouble) ctx->BeginEndCount;
- }
- else {
- avgvertices = 0.0;
- }
-
- overhead = ctx->BeginEndTime - ctx->VertexTime - ctx->PointTime
- - ctx->LineTime - ctx->PolygonTime;
-
-
- printf(" Count Time (s) Rate (/s) \n");
- printf("--------------------------------------------------------\n");
- printf("glBegin/glEnd %7d %8.3f %10.3f\n",
- ctx->BeginEndCount, ctx->BeginEndTime, beginendrate);
- printf(" vertexes transformed %7d %8.3f %10.3f\n",
- ctx->VertexCount, ctx->VertexTime, vertexrate );
- printf(" points rasterized %7d %8.3f %10.3f\n",
- ctx->PointCount, ctx->PointTime, pointrate );
- printf(" lines rasterized %7d %8.3f %10.3f\n",
- ctx->LineCount, ctx->LineTime, linerate );
- printf(" polygons rasterized %7d %8.3f %10.3f\n",
- ctx->PolygonCount, ctx->PolygonTime, polygonrate );
- printf(" overhead %8.3f\n", overhead );
- printf("glClear %7d %8.3f %10.3f\n",
- ctx->ClearCount, ctx->ClearTime, clearrate );
- printf("SwapBuffers %7d %8.3f %10.3f\n",
- ctx->SwapCount, ctx->SwapTime, swaprate );
- printf("\n");
-
- printf("Average number of vertices per begin/end: %8.3f\n", avgvertices );
-}
-#endif
-
-
-
-
-
/**********************************************************************/
/***** GL Visual allocation/destruction *****/
/**********************************************************************/
@@ -283,7 +125,47 @@ _mesa_create_visual( GLboolean rgbFlag,
GLint accumAlphaBits,
GLint numSamples )
{
- GLvisual *vis;
+ GLvisual *vis = (GLvisual *) CALLOC( sizeof(GLvisual) );
+ if (vis) {
+ if (!_mesa_initialize_visual(vis, rgbFlag, dbFlag, stereoFlag,
+ redBits, greenBits, blueBits, alphaBits,
+ indexBits, depthBits, stencilBits,
+ accumRedBits, accumGreenBits,
+ accumBlueBits, accumAlphaBits,
+ numSamples )) {
+ FREE(vis);
+ return NULL;
+ }
+ }
+ return vis;
+}
+
+
+/*
+ * Initialize the fields of the given GLvisual.
+ * Input: see _mesa_create_visual() above.
+ * Return: GL_TRUE = success
+ * GL_FALSE = failure.
+ */
+GLboolean
+_mesa_initialize_visual( GLvisual *vis,
+ GLboolean rgbFlag,
+ GLboolean dbFlag,
+ GLboolean stereoFlag,
+ GLint redBits,
+ GLint greenBits,
+ GLint blueBits,
+ GLint alphaBits,
+ GLint indexBits,
+ GLint depthBits,
+ GLint stencilBits,
+ GLint accumRedBits,
+ GLint accumGreenBits,
+ GLint accumBlueBits,
+ GLint accumAlphaBits,
+ GLint numSamples )
+{
+ assert(vis);
/* This is to catch bad values from device drivers not updated for
* Mesa 3.3. Some device drivers just passed 1. That's a REALLY
@@ -292,27 +174,22 @@ _mesa_create_visual( GLboolean rgbFlag,
assert(depthBits == 0 || depthBits > 1);
if (depthBits < 0 || depthBits > 32) {
- return NULL;
+ return GL_FALSE;
}
if (stencilBits < 0 || stencilBits > (GLint) (8 * sizeof(GLstencil))) {
- return NULL;
+ return GL_FALSE;
}
if (accumRedBits < 0 || accumRedBits > (GLint) (8 * sizeof(GLaccum))) {
- return NULL;
+ return GL_FALSE;
}
if (accumGreenBits < 0 || accumGreenBits > (GLint) (8 * sizeof(GLaccum))) {
- return NULL;
+ return GL_FALSE;
}
if (accumBlueBits < 0 || accumBlueBits > (GLint) (8 * sizeof(GLaccum))) {
- return NULL;
+ return GL_FALSE;
}
if (accumAlphaBits < 0 || accumAlphaBits > (GLint) (8 * sizeof(GLaccum))) {
- return NULL;
- }
-
- vis = (GLvisual *) CALLOC( sizeof(GLvisual) );
- if (!vis) {
- return NULL;
+ return GL_FALSE;
}
vis->RGBAflag = rgbFlag;
@@ -343,32 +220,34 @@ _mesa_create_visual( GLboolean rgbFlag,
vis->DepthMaxF = (GLfloat) vis->DepthMax;
}
else {
- /* Special case since shift values greater than or equal to the
- * number of bits in the left hand expression's type are
- * undefined.
- */
+ /* Special case since shift values greater than or equal to the
+ * number of bits in the left hand expression's type are
+ * undefined.
+ */
vis->DepthMax = 0xffffffff;
vis->DepthMaxF = (GLfloat) vis->DepthMax;
}
- return vis;
+ return GL_TRUE;
}
/* This function should no longer be used. Use _mesa_create_visual() instead */
-GLvisual *gl_create_visual( GLboolean rgbFlag,
- GLboolean alphaFlag,
- GLboolean dbFlag,
- GLboolean stereoFlag,
- GLint depthBits,
- GLint stencilBits,
- GLint accumBits,
- GLint indexBits,
- GLint redBits,
- GLint greenBits,
- GLint blueBits,
- GLint alphaBits )
+GLvisual *
+gl_create_visual( GLboolean rgbFlag,
+ GLboolean alphaFlag,
+ GLboolean dbFlag,
+ GLboolean stereoFlag,
+ GLint depthBits,
+ GLint stencilBits,
+ GLint accumBits,
+ GLint indexBits,
+ GLint redBits,
+ GLint greenBits,
+ GLint blueBits,
+ GLint alphaBits )
{
+ (void) alphaFlag;
return _mesa_create_visual(rgbFlag, dbFlag, stereoFlag,
redBits, greenBits, blueBits, alphaBits,
indexBits, depthBits, stencilBits,
@@ -384,7 +263,8 @@ _mesa_destroy_visual( GLvisual *vis )
/* obsolete */
-void gl_destroy_visual( GLvisual *vis )
+void
+gl_destroy_visual( GLvisual *vis )
{
_mesa_destroy_visual(vis);
}
@@ -408,18 +288,38 @@ void gl_destroy_visual( GLvisual *vis )
* Return: pointer to new GLframebuffer struct or NULL if error.
*/
-GLframebuffer *gl_create_framebuffer( GLvisual *visual,
- GLboolean softwareDepth,
- GLboolean softwareStencil,
- GLboolean softwareAccum,
- GLboolean softwareAlpha )
+GLframebuffer *
+gl_create_framebuffer( GLvisual *visual,
+ GLboolean softwareDepth,
+ GLboolean softwareStencil,
+ GLboolean softwareAccum,
+ GLboolean softwareAlpha )
{
- GLframebuffer *buffer;
-
- buffer = CALLOC_STRUCT(gl_frame_buffer);
- if (!buffer) {
- return NULL;
+ GLframebuffer *buffer = CALLOC_STRUCT(gl_frame_buffer);
+ assert(visual);
+ if (buffer) {
+ _mesa_initialize_framebuffer(buffer, visual,
+ softwareDepth, softwareStencil,
+ softwareAccum, softwareAlpha );
}
+ return buffer;
+}
+
+
+/*
+ * Initialize a GLframebuffer object.
+ * Input: See gl_create_framebuffer() above.
+ */
+void
+_mesa_initialize_framebuffer( GLframebuffer *buffer,
+ GLvisual *visual,
+ GLboolean softwareDepth,
+ GLboolean softwareStencil,
+ GLboolean softwareAccum,
+ GLboolean softwareAlpha )
+{
+ assert(buffer);
+ assert(visual);
/* sanity checks */
if (softwareDepth ) {
@@ -444,16 +344,14 @@ GLframebuffer *gl_create_framebuffer( GLvisual *visual,
buffer->UseSoftwareStencilBuffer = softwareStencil;
buffer->UseSoftwareAccumBuffer = softwareAccum;
buffer->UseSoftwareAlphaBuffers = softwareAlpha;
-
- return buffer;
}
-
/*
* Free a framebuffer struct and its buffers.
*/
-void gl_destroy_framebuffer( GLframebuffer *buffer )
+void
+gl_destroy_framebuffer( GLframebuffer *buffer )
{
if (buffer) {
if (buffer->DepthBuffer) {
@@ -494,7 +392,8 @@ _glthread_DECLARE_STATIC_MUTEX(OneTimeLock);
/*
* This function just calls all the various one-time-init functions in Mesa.
*/
-static void one_time_init( void )
+static void
+one_time_init( void )
{
static GLboolean alreadyCalled = GL_FALSE;
_glthread_LOCK_MUTEX(OneTimeLock);
@@ -541,7 +440,8 @@ static void one_time_init( void )
/*
* Allocate and initialize a shared context state structure.
*/
-static struct gl_shared_state *alloc_shared_state( void )
+static struct gl_shared_state *
+alloc_shared_state( void )
{
GLuint d;
struct gl_shared_state *ss;
@@ -566,6 +466,14 @@ static struct gl_shared_state *alloc_shared_state( void )
ss->DefaultD[d]->RefCount++; /* don't free if not in use */
}
+ ss->DefaultCubeMap = gl_alloc_texture_object(ss, 0, 6);
+ if (!ss->DefaultCubeMap) {
+ outOfMemory = GL_TRUE;
+ }
+ else {
+ ss->DefaultCubeMap->RefCount++;
+ }
+
if (!ss->DisplayList || !ss->TexObjects || outOfMemory) {
/* Ran out of memory at some point. Free everything and return NULL */
if (ss->DisplayList)
@@ -578,6 +486,8 @@ static struct gl_shared_state *alloc_shared_state( void )
gl_free_texture_object(ss, ss->DefaultD[2]);
if (ss->DefaultD[3])
gl_free_texture_object(ss, ss->DefaultD[3]);
+ if (ss->DefaultCubeMap)
+ gl_free_texture_object(ss, ss->DefaultCubeMap);
FREE(ss);
return NULL;
}
@@ -590,7 +500,8 @@ static struct gl_shared_state *alloc_shared_state( void )
/*
* Deallocate a shared state context and all children structures.
*/
-static void free_shared_state( GLcontext *ctx, struct gl_shared_state *ss )
+static void
+free_shared_state( GLcontext *ctx, struct gl_shared_state *ss )
{
/* Free display lists */
while (1) {
@@ -623,7 +534,8 @@ static void free_shared_state( GLcontext *ctx, struct gl_shared_state *ss )
* Initialize the nth light. Note that the defaults for light 0 are
* different than the other lights.
*/
-static void init_light( struct gl_light *l, GLuint n )
+static void
+init_light( struct gl_light *l, GLuint n )
{
make_empty_list( l );
@@ -650,7 +562,8 @@ static void init_light( struct gl_light *l, GLuint n )
-static void init_lightmodel( struct gl_lightmodel *lm )
+static void
+init_lightmodel( struct gl_lightmodel *lm )
{
ASSIGN_4V( lm->Ambient, 0.2, 0.2, 0.2, 1.0 );
lm->LocalViewer = GL_FALSE;
@@ -659,7 +572,8 @@ static void init_lightmodel( struct gl_lightmodel *lm )
}
-static void init_material( struct gl_material *m )
+static void
+init_material( struct gl_material *m )
{
ASSIGN_4V( m->Ambient, 0.2, 0.2, 0.2, 1.0 );
ASSIGN_4V( m->Diffuse, 0.8, 0.8, 0.8, 1.0 );
@@ -673,7 +587,8 @@ static void init_material( struct gl_material *m )
-static void init_texture_unit( GLcontext *ctx, GLuint unit )
+static void
+init_texture_unit( GLcontext *ctx, GLuint unit )
{
struct gl_texture_unit *texUnit = &ctx->Texture.Unit[unit];
@@ -697,10 +612,12 @@ static void init_texture_unit( GLcontext *ctx, GLuint unit )
texUnit->CurrentD[1] = ctx->Shared->DefaultD[1];
texUnit->CurrentD[2] = ctx->Shared->DefaultD[2];
texUnit->CurrentD[3] = ctx->Shared->DefaultD[3];
+ texUnit->CurrentCubeMap = ctx->Shared->DefaultCubeMap;
}
-static void init_fallback_arrays( GLcontext *ctx )
+static void
+init_fallback_arrays( GLcontext *ctx )
{
struct gl_client_array *cl;
GLuint i;
@@ -750,7 +667,8 @@ static void init_fallback_arrays( GLcontext *ctx )
/* Initialize a 1-D evaluator map */
-static void init_1d_map( struct gl_1d_map *map, int n, const float *initial )
+static void
+init_1d_map( struct gl_1d_map *map, int n, const float *initial )
{
map->Order = 1;
map->u1 = 0.0;
@@ -765,7 +683,8 @@ static void init_1d_map( struct gl_1d_map *map, int n, const float *initial )
/* Initialize a 2-D evaluator map */
-static void init_2d_map( struct gl_2d_map *map, int n, const float *initial )
+static void
+init_2d_map( struct gl_2d_map *map, int n, const float *initial )
{
map->Uorder = 1;
map->Vorder = 1;
@@ -785,7 +704,8 @@ static void init_2d_map( struct gl_2d_map *map, int n, const float *initial )
/*
* Initialize the attribute groups in a GLcontext.
*/
-static void init_attrib_groups( GLcontext *ctx )
+static void
+init_attrib_groups( GLcontext *ctx )
{
GLuint i, j;
@@ -794,6 +714,7 @@ static void init_attrib_groups( GLcontext *ctx )
/* Constants, may be overriden by device drivers */
ctx->Const.MaxTextureLevels = MAX_TEXTURE_LEVELS;
ctx->Const.MaxTextureSize = 1 << (MAX_TEXTURE_LEVELS - 1);
+ ctx->Const.MaxCubeTextureSize = ctx->Const.MaxTextureSize;
ctx->Const.MaxTextureUnits = MAX_TEXTURE_UNITS;
ctx->Const.MaxArrayLockSize = MAX_ARRAY_LOCK_SIZE;
ctx->Const.SubPixelBits = SUB_PIXEL_BITS;
@@ -809,6 +730,9 @@ static void init_attrib_groups( GLcontext *ctx )
ctx->Const.LineWidthGranularity = LINE_WIDTH_GRANULARITY;
ctx->Const.NumAuxBuffers = NUM_AUX_BUFFERS;
ctx->Const.MaxColorTableSize = MAX_COLOR_TABLE_SIZE;
+ ctx->Const.MaxConvolutionWidth = MAX_CONVOLUTION_WIDTH;
+ ctx->Const.MaxConvolutionHeight = MAX_CONVOLUTION_HEIGHT;
+ ctx->Const.NumCompressedTextureFormats = 0;
/* Modelview matrix */
gl_matrix_ctr( &ctx->ModelView );
@@ -987,11 +911,12 @@ static void init_attrib_groups( GLcontext *ctx )
ctx->Hint.LineSmooth = GL_DONT_CARE;
ctx->Hint.PolygonSmooth = GL_DONT_CARE;
ctx->Hint.Fog = GL_DONT_CARE;
-
ctx->Hint.AllowDrawWin = GL_TRUE;
ctx->Hint.AllowDrawFrg = GL_TRUE;
ctx->Hint.AllowDrawMem = GL_TRUE;
ctx->Hint.StrictLighting = GL_TRUE;
+ ctx->Hint.ClipVolumeClipping = GL_DONT_CARE;
+ ctx->Hint.TextureCompression = GL_DONT_CARE;
/* Histogram group */
ctx->Histogram.Width = 0;
@@ -1120,25 +1045,24 @@ static void init_attrib_groups( GLcontext *ctx )
ctx->Pixel.PixelTextureEnabled = GL_FALSE;
ctx->Pixel.FragmentRgbSource = GL_PIXEL_GROUP_COLOR_SGIS;
ctx->Pixel.FragmentAlphaSource = GL_PIXEL_GROUP_COLOR_SGIS;
- ctx->Pixel.PostColorMatrixRedBias = 0.0;
- ctx->Pixel.PostColorMatrixRedScale = 1.0;
- ctx->Pixel.PostColorMatrixGreenBias = 0.0;
- ctx->Pixel.PostColorMatrixGreenScale = 1.0;
- ctx->Pixel.PostColorMatrixBlueBias = 0.0;
- ctx->Pixel.PostColorMatrixBlueScale = 1.0;
- ctx->Pixel.PostColorMatrixAlphaBias = 0.0;
- ctx->Pixel.PostColorMatrixAlphaScale = 1.0;
- ctx->Pixel.ColorTableScale[0] = 1.0F;
- ctx->Pixel.ColorTableScale[1] = 1.0F;
- ctx->Pixel.ColorTableScale[2] = 1.0F;
- ctx->Pixel.ColorTableScale[3] = 1.0F;
- ctx->Pixel.ColorTableBias[0] = 0.0F;
- ctx->Pixel.ColorTableBias[1] = 0.0F;
- ctx->Pixel.ColorTableBias[2] = 0.0F;
- ctx->Pixel.ColorTableBias[3] = 0.0F;
+ ASSIGN_4V(ctx->Pixel.PostColorMatrixScale, 1.0, 1.0, 1.0, 1.0);
+ ASSIGN_4V(ctx->Pixel.PostColorMatrixBias, 0.0, 0.0, 0.0, 0.0);
+ ASSIGN_4V(ctx->Pixel.ColorTableScale, 1.0, 1.0, 1.0, 1.0);
+ ASSIGN_4V(ctx->Pixel.ColorTableBias, 0.0, 0.0, 0.0, 0.0);
ctx->Pixel.ColorTableEnabled = GL_FALSE;
ctx->Pixel.PostConvolutionColorTableEnabled = GL_FALSE;
ctx->Pixel.PostColorMatrixColorTableEnabled = GL_FALSE;
+ ctx->Pixel.Convolution1DEnabled = GL_FALSE;
+ ctx->Pixel.Convolution2DEnabled = GL_FALSE;
+ ctx->Pixel.Separable2DEnabled = GL_FALSE;
+ for (i = 0; i < 3; i++) {
+ ASSIGN_4V(ctx->Pixel.ConvolutionBorderColor[i], 0.0, 0.0, 0.0, 0.0);
+ ctx->Pixel.ConvolutionBorderMode[i] = GL_REDUCE;
+ ASSIGN_4V(ctx->Pixel.ConvolutionFilterScale[i], 1.0, 1.0, 1.0, 1.0);
+ ASSIGN_4V(ctx->Pixel.ConvolutionFilterBias[i], 0.0, 0.0, 0.0, 0.0);
+ }
+ ASSIGN_4V(ctx->Pixel.PostConvolutionScale, 1.0, 1.0, 1.0, 1.0);
+ ASSIGN_4V(ctx->Pixel.PostConvolutionBias, 0.0, 0.0, 0.0, 0.0);
/* Point group */
ctx->Point.SmoothFlag = GL_FALSE;
@@ -1358,7 +1282,8 @@ static void init_attrib_groups( GLcontext *ctx )
* the allocations clean up and return GL_FALSE.
* Return: GL_TRUE=success, GL_FALSE=failure
*/
-static GLboolean alloc_proxy_textures( GLcontext *ctx )
+static GLboolean
+alloc_proxy_textures( GLcontext *ctx )
{
GLboolean out_of_memory;
GLint i;
@@ -1419,12 +1344,15 @@ static GLboolean alloc_proxy_textures( GLcontext *ctx )
/*
* Initialize a GLcontext struct.
*/
-GLboolean gl_initialize_context_data( GLcontext *ctx,
- GLvisual *visual,
- GLcontext *share_list,
- void *driver_ctx,
- GLboolean direct )
+GLboolean
+_mesa_initialize_context( GLcontext *ctx,
+ GLvisual *visual,
+ GLcontext *share_list,
+ void *driver_ctx,
+ GLboolean direct )
{
+ GLuint dispatchSize;
+
(void) direct; /* not used */
/* misc one-time initializations */
@@ -1487,10 +1415,6 @@ GLboolean gl_initialize_context_data( GLcontext *ctx,
ctx->Pixel.DriverReadBuffer = GL_FRONT_LEFT;
}
-#ifdef PROFILE
- init_timings( ctx );
-#endif
-
if (!alloc_proxy_textures(ctx)) {
free_shared_state(ctx, ctx->Shared);
FREE(ctx->VB);
@@ -1499,9 +1423,27 @@ GLboolean gl_initialize_context_data( GLcontext *ctx,
return GL_FALSE;
}
+ /* register the most recent extension functions with libGL */
+ _glapi_add_entrypoint("glTbufferMask3DFX", 553);
+ _glapi_add_entrypoint("glCompressedTexImage3DARB", 554);
+ _glapi_add_entrypoint("glCompressedTexImage2DARB", 555);
+ _glapi_add_entrypoint("glCompressedTexImage1DARB", 556);
+ _glapi_add_entrypoint("glCompressedTexSubImage3DARB", 557);
+ _glapi_add_entrypoint("glCompressedTexSubImage2DARB", 558);
+ _glapi_add_entrypoint("glCompressedTexSubImage1DARB", 559);
+ _glapi_add_entrypoint("glGetCompressedTexImageARB", 560);
+
+ /* Find the larger of Mesa's dispatch table and libGL's dispatch table.
+ * In practice, this'll be the same for stand-alone Mesa. But for DRI
+ * Mesa we do this to accomodate different versions of libGL and various
+ * DRI drivers.
+ */
+ dispatchSize = MAX2(_glapi_get_dispatch_table_size(),
+ sizeof(struct _glapi_table) / sizeof(void *));
+
/* setup API dispatch tables */
- ctx->Exec = (struct _glapi_table *) CALLOC(_glapi_get_dispatch_table_size() * sizeof(void *));
- ctx->Save = (struct _glapi_table *) CALLOC(_glapi_get_dispatch_table_size() * sizeof(void *));
+ ctx->Exec = (struct _glapi_table *) CALLOC(dispatchSize * sizeof(void*));
+ ctx->Save = (struct _glapi_table *) CALLOC(dispatchSize * sizeof(void*));
if (!ctx->Exec || !ctx->Save) {
free_shared_state(ctx, ctx->Shared);
FREE(ctx->VB);
@@ -1510,8 +1452,8 @@ GLboolean gl_initialize_context_data( GLcontext *ctx,
FREE(ctx->Exec);
FREE(ctx);
}
- _mesa_init_exec_table( ctx->Exec );
- _mesa_init_dlist_table( ctx->Save );
+ _mesa_init_exec_table(ctx->Exec, dispatchSize);
+ _mesa_init_dlist_table(ctx->Save, dispatchSize);
ctx->CurrentDispatch = ctx->Exec;
return GL_TRUE;
@@ -1526,18 +1468,18 @@ GLboolean gl_initialize_context_data( GLcontext *ctx,
* driver_ctx - pointer to device driver's context state struct
* Return: pointer to a new gl_context struct or NULL if error.
*/
-GLcontext *gl_create_context( GLvisual *visual,
- GLcontext *share_list,
- void *driver_ctx,
- GLboolean direct )
+GLcontext *
+gl_create_context( GLvisual *visual,
+ GLcontext *share_list,
+ void *driver_ctx,
+ GLboolean direct )
{
GLcontext *ctx = (GLcontext *) CALLOC( sizeof(GLcontext) );
if (!ctx) {
return NULL;
}
- if (gl_initialize_context_data(ctx, visual, share_list,
- driver_ctx, direct)) {
+ if (_mesa_initialize_context(ctx, visual, share_list, driver_ctx, direct)) {
return ctx;
}
else {
@@ -1552,7 +1494,8 @@ GLcontext *gl_create_context( GLvisual *visual,
* Free the data associated with the given context.
* But don't free() the GLcontext struct itself!
*/
-void gl_free_context_data( GLcontext *ctx )
+void
+gl_free_context_data( GLcontext *ctx )
{
struct gl_shine_tab *s, *tmps;
GLuint i, j;
@@ -1562,12 +1505,6 @@ void gl_free_context_data( GLcontext *ctx )
gl_make_current(NULL, NULL);
}
-#ifdef PROFILE
- if (getenv("MESA_PROFILE")) {
- print_timings( ctx );
- }
-#endif
-
gl_matrix_dtr( &ctx->ModelView );
for (i = 0; i < MAX_MODELVIEW_STACK_DEPTH - 1; i++) {
gl_matrix_dtr( &ctx->ModelViewStack[i] );
@@ -1670,7 +1607,8 @@ void gl_free_context_data( GLcontext *ctx )
/*
* Destroy a GLcontext structure.
*/
-void gl_destroy_context( GLcontext *ctx )
+void
+gl_destroy_context( GLcontext *ctx )
{
if (ctx) {
gl_free_context_data(ctx);
@@ -1684,7 +1622,8 @@ void gl_destroy_context( GLcontext *ctx )
* Called by the driver after both the context and driver are fully
* initialized. Currently just reads the config file.
*/
-void gl_context_initialize( GLcontext *ctx )
+void
+gl_context_initialize( GLcontext *ctx )
{
gl_read_config_file( ctx );
}
@@ -1697,7 +1636,8 @@ void gl_context_initialize( GLcontext *ctx )
* dst - destination context
* mask - bitwise OR of GL_*_BIT flags
*/
-void gl_copy_context( const GLcontext *src, GLcontext *dst, GLuint mask )
+void
+gl_copy_context( const GLcontext *src, GLcontext *dst, GLuint mask )
{
if (mask & GL_ACCUM_BUFFER_BIT) {
MEMCPY( &dst->Accum, &src->Accum, sizeof(struct gl_accum_attrib) );
@@ -1905,7 +1845,7 @@ _mesa_get_dispatch(GLcontext *ctx)
void gl_problem( const GLcontext *ctx, const char *s )
{
fprintf( stderr, "Mesa implementation error: %s\n", s );
- fprintf( stderr, "Report to mesa-bugs@mesa3d.org\n" );
+ fprintf( stderr, "Report to Mesa bug database at www.mesa3d.org\n" );
(void) ctx;
}
diff --git a/xc/extras/Mesa/src/context.h b/xc/extras/Mesa/src/context.h
index b280fdae9..51c4aaba3 100644
--- a/xc/extras/Mesa/src/context.h
+++ b/xc/extras/Mesa/src/context.h
@@ -73,19 +73,38 @@ _mesa_create_visual( GLboolean rgbFlag,
GLint accumAlphaBits,
GLint numSamples );
+extern GLboolean
+_mesa_initialize_visual( GLvisual *v,
+ GLboolean rgbFlag,
+ GLboolean dbFlag,
+ GLboolean stereoFlag,
+ GLint redBits,
+ GLint greenBits,
+ GLint blueBits,
+ GLint alphaBits,
+ GLint indexBits,
+ GLint depthBits,
+ GLint stencilBits,
+ GLint accumRedBits,
+ GLint accumGreenBits,
+ GLint accumBlueBits,
+ GLint accumAlphaBits,
+ GLint numSamples );
+
/* this function is obsolete */
-extern GLvisual *gl_create_visual( GLboolean rgbFlag,
- GLboolean alphaFlag,
- GLboolean dbFlag,
- GLboolean stereoFlag,
- GLint depthBits,
- GLint stencilBits,
- GLint accumBits,
- GLint indexBits,
- GLint redBits,
- GLint greenBits,
- GLint blueBits,
- GLint alphaBits );
+extern GLvisual *
+gl_create_visual( GLboolean rgbFlag,
+ GLboolean alphaFlag,
+ GLboolean dbFlag,
+ GLboolean stereoFlag,
+ GLint depthBits,
+ GLint stencilBits,
+ GLint accumBits,
+ GLint indexBits,
+ GLint redBits,
+ GLint greenBits,
+ GLint blueBits,
+ GLint alphaBits );
extern void
@@ -94,18 +113,29 @@ _mesa_destroy_visual( GLvisual *vis );
/*obsolete */ extern void gl_destroy_visual( GLvisual *vis );
+
/*
* Create/destroy a GLframebuffer. A GLframebuffer is like a GLX drawable.
* It bundles up the depth buffer, stencil buffer and accum buffers into a
* single entity.
*/
-extern GLframebuffer *gl_create_framebuffer( GLvisual *visual,
- GLboolean softwareDepth,
- GLboolean softwareStencil,
- GLboolean softwareAccum,
- GLboolean softwareAlpha );
+extern GLframebuffer *
+gl_create_framebuffer( GLvisual *visual,
+ GLboolean softwareDepth,
+ GLboolean softwareStencil,
+ GLboolean softwareAccum,
+ GLboolean softwareAlpha );
-extern void gl_destroy_framebuffer( GLframebuffer *buffer );
+extern void
+_mesa_initialize_framebuffer( GLframebuffer *fb,
+ GLvisual *visual,
+ GLboolean softwareDepth,
+ GLboolean softwareStencil,
+ GLboolean softwareAccum,
+ GLboolean softwareAlpha );
+
+extern void
+gl_destroy_framebuffer( GLframebuffer *buffer );
@@ -113,36 +143,46 @@ extern void gl_destroy_framebuffer( GLframebuffer *buffer );
* Create/destroy a GLcontext. A GLcontext is like a GLX context. It
* contains the rendering state.
*/
-extern GLcontext *gl_create_context( GLvisual *visual,
- GLcontext *share_list,
- void *driver_ctx,
- GLboolean direct);
+extern GLcontext *
+gl_create_context( GLvisual *visual,
+ GLcontext *share_list,
+ void *driver_ctx,
+ GLboolean direct);
+
+extern GLboolean
+_mesa_initialize_context( GLcontext *ctx,
+ GLvisual *visual,
+ GLcontext *share_list,
+ void *driver_ctx,
+ GLboolean direct );
-extern GLboolean gl_initialize_context_data( GLcontext *ctx,
- GLvisual *visual,
- GLcontext *share_list,
- void *driver_ctx,
- GLboolean direct );
+extern void
+gl_free_context_data( GLcontext *ctx );
-extern void gl_free_context_data( GLcontext *ctx );
+extern void
+gl_destroy_context( GLcontext *ctx );
-extern void gl_destroy_context( GLcontext *ctx );
+extern void
+gl_context_initialize( GLcontext *ctx );
-extern void gl_context_initialize( GLcontext *ctx );
+extern void
+gl_copy_context(const GLcontext *src, GLcontext *dst, GLuint mask);
-extern void gl_copy_context(const GLcontext *src, GLcontext *dst, GLuint mask);
+extern void
+gl_make_current( GLcontext *ctx, GLframebuffer *buffer );
-extern void gl_make_current( GLcontext *ctx, GLframebuffer *buffer );
+extern void
+gl_make_current2( GLcontext *ctx, GLframebuffer *drawBuffer,
+ GLframebuffer *readBuffer );
-extern void gl_make_current2( GLcontext *ctx, GLframebuffer *drawBuffer,
- GLframebuffer *readBuffer );
+extern GLcontext *
+gl_get_current_context(void);
-extern GLcontext *gl_get_current_context(void);
/*
@@ -190,35 +230,26 @@ _mesa_get_dispatch(GLcontext *ctx);
* Miscellaneous
*/
-extern void gl_problem( const GLcontext *ctx, const char *s );
-
-extern void gl_warning( const GLcontext *ctx, const char *s );
-
-extern void gl_error( GLcontext *ctx, GLenum error, const char *s );
-
-extern void gl_compile_error( GLcontext *ctx, GLenum error, const char *s );
-
+extern void
+gl_problem( const GLcontext *ctx, const char *s );
+extern void
+gl_warning( const GLcontext *ctx, const char *s );
extern void
-_mesa_Finish( void );
+gl_error( GLcontext *ctx, GLenum error, const char *s );
extern void
-_mesa_Flush( void );
+gl_compile_error( GLcontext *ctx, GLenum error, const char *s );
extern void
-_mesa_init_no_op_table(struct _glapi_table *exec);
+_mesa_Finish( void );
extern void
-_mesa_init_exec_table(struct _glapi_table *exec);
-
-
+_mesa_Flush( void );
-#ifdef PROFILE
-extern GLdouble gl_time( void );
-#endif
#endif
diff --git a/xc/extras/Mesa/src/copypix.c b/xc/extras/Mesa/src/copypix.c
index 17175644b..e76c170f6 100644
--- a/xc/extras/Mesa/src/copypix.c
+++ b/xc/extras/Mesa/src/copypix.c
@@ -32,6 +32,7 @@
#include "copypix.h"
#include "depth.h"
#include "feedback.h"
+#include "imaging.h"
#include "macros.h"
#include "mem.h"
#include "mmath.h"
@@ -165,7 +166,8 @@ static void copy_rgba_pixels( GLcontext *ctx,
ctx->Pixel.ScaleOrBiasRGBApcm ||
ctx->Pixel.ColorTableEnabled ||
ctx->Pixel.PostColorMatrixColorTableEnabled ||
- ctx->Pixel.MinMaxEnabled;
+ ctx->Pixel.MinMaxEnabled ||
+ ctx->Pixel.HistogramEnabled;
for (j = 0; j < height; j++, sy += stepy, dy += stepy) {
if (overlapping) {
@@ -231,6 +233,14 @@ static void copy_rgba_pixels( GLcontext *ctx,
if (ctx->Pixel.PostColorMatrixColorTableEnabled) {
_mesa_lookup_rgba(&ctx->PostColorMatrixColorTable, width, rgbaFloat);
}
+ /* update histogram count */
+ if (ctx->Pixel.HistogramEnabled) {
+ _mesa_update_histogram(ctx, width, (CONST GLfloat (*)[4]) rgbaFloat);
+ }
+ /* update min/max */
+ if (ctx->Pixel.MinMaxEnabled) {
+ _mesa_update_minmax(ctx, width, (CONST GLfloat (*)[4]) rgbaFloat);
+ }
/* clamp to [0,1] and convert float back to ubyte */
for (k = 0; k < width; k++) {
GLint r = (GLint) (rgbaFloat[k][RCOMP] * 255.0F);
diff --git a/xc/extras/Mesa/src/dd.h b/xc/extras/Mesa/src/dd.h
index ac6ce7647..ad389df4a 100644
--- a/xc/extras/Mesa/src/dd.h
+++ b/xc/extras/Mesa/src/dd.h
@@ -640,6 +640,75 @@ struct dd_function_table {
* Core Mesa will perform any image format/type conversions that are needed.
*/
+ GLboolean (*CompressedTexImage1D)( GLcontext *ctx, GLenum target,
+ GLint level, const GLvoid *data,
+ struct gl_texture_object *texObj,
+ struct gl_texture_image *texImage,
+ GLboolean *retainInternalCopy);
+ GLboolean (*CompressedTexImage2D)( GLcontext *ctx, GLenum target,
+ GLint level, const GLvoid *data,
+ struct gl_texture_object *texObj,
+ struct gl_texture_image *texImage,
+ GLboolean *retainInternalCopy);
+ GLboolean (*CompressedTexImage3D)( GLcontext *ctx, GLenum target,
+ GLint level, const GLvoid *data,
+ struct gl_texture_object *texObj,
+ struct gl_texture_image *texImage,
+ GLboolean *retainInternalCopy);
+ /* Called by glCompressedTexImage1/2/3D.
+ * Arguments:
+ * <target>, <level>, <internalFormat>, <data> are user specified.
+ * <texObj> is the target texture object.
+ * <texImage> is the target texture image. It will have the texture
+ * width, height, depth, border and internalFormat information.
+ * <retainInternalCopy> is returned by this function and indicates whether
+ * core Mesa should keep an internal copy of the texture image.
+ * Return GL_TRUE if operation completed, return GL_FALSE if core Mesa
+ * should do the job.
+ */
+
+ GLboolean (*CompressedTexSubImage1D)( GLcontext *ctx, GLenum target,
+ GLint level, GLint xoffset,
+ GLsizei width, GLenum format,
+ GLsizei imageSize, const GLvoid *data,
+ struct gl_texture_object *texObj,
+ struct gl_texture_image *texImage );
+ GLboolean (*CompressedTexSubImage2D)( GLcontext *ctx, GLenum target,
+ GLint level, GLint xoffset,
+ GLint yoffset, GLsizei width,
+ GLint height, GLenum format,
+ GLsizei imageSize, const GLvoid *data,
+ struct gl_texture_object *texObj,
+ struct gl_texture_image *texImage );
+ GLboolean (*CompressedTexSubImage3D)( GLcontext *ctx, GLenum target,
+ GLint level, GLint xoffset,
+ GLint yoffset, GLint zoffset,
+ GLsizei width, GLint height,
+ GLint depth, GLenum format,
+ GLsizei imageSize, const GLvoid *data,
+ struct gl_texture_object *texObj,
+ struct gl_texture_image *texImage );
+ /* Called by glCompressedTexSubImage1/2/3D.
+ * Arguments:
+ * <target>, <level>, <x/z/zoffset>, <width>, <height>, <depth>,
+ * <imageSize>, and <data> are user specified.
+ * <texObj> is the target texture object.
+ * <texImage> is the target texture image. It will have the texture
+ * width, height, depth, border and internalFormat information.
+ * Return GL_TRUE if operation completed, return GL_FALSE if core Mesa
+ * should do the job.
+ */
+
+ void (*GetCompressedTexImage)( GLcontext *ctx, GLenum target,
+ GLint lod, void *image,
+ const struct gl_texture_object *texObj,
+ struct gl_texture_image *texImage );
+ /* Called by glGetCompressedTexImageARB.
+ * <target>, <lod>, <image> are specified by user.
+ * <texObj> is the source texture object.
+ * <texImage> is the source texture image.
+ */
+
void (*TexEnv)( GLcontext *ctx, GLenum target, GLenum pname,
const GLfloat *param );
/* Called by glTexEnv*().
diff --git a/xc/extras/Mesa/src/ddsample.c b/xc/extras/Mesa/src/ddsample.c
index 16894d403..31e4811b1 100644
--- a/xc/extras/Mesa/src/ddsample.c
+++ b/xc/extras/Mesa/src/ddsample.c
@@ -51,6 +51,13 @@
* the core Mesa library.
*/
+/*
+ * XXX XXX
+ * THIS FILE IS VERY OUT OF DATE! LOOK AT OSmesa/osmesa.c FOR A BETTER
+ * EXAMPLE DRIVER!
+ */
+
+
#ifdef PC_HEADER
#include "all.h"
@@ -784,7 +791,7 @@ FooMesaContext FooMesaCreateContext( FooMesaVisual visual,
/* and then, finally let the context examine your initializations */
- gl_context_initialize( c->gl_ctx );
+ _mesa_initialize_context( c->gl_ctx );
return c;
diff --git a/xc/extras/Mesa/src/dlist.c b/xc/extras/Mesa/src/dlist.c
index 929a050db..8ce10d157 100644
--- a/xc/extras/Mesa/src/dlist.c
+++ b/xc/extras/Mesa/src/dlist.c
@@ -1,3 +1,4 @@
+/* $Id: dlist.c,v 1.11 2000/06/08 14:38:14 brianp Exp $ */
/*
* Mesa 3-D graphics library
@@ -141,7 +142,17 @@ typedef enum {
OPCODE_COLOR_MASK,
OPCODE_COLOR_MATERIAL,
OPCODE_COLOR_TABLE,
+ OPCODE_COLOR_TABLE_PARAMETER_FV,
+ OPCODE_COLOR_TABLE_PARAMETER_IV,
OPCODE_COLOR_SUB_TABLE,
+ OPCODE_CONVOLUTION_FILTER_1D,
+ OPCODE_CONVOLUTION_FILTER_2D,
+ OPCODE_CONVOLUTION_PARAMETER_I,
+ OPCODE_CONVOLUTION_PARAMETER_IV,
+ OPCODE_CONVOLUTION_PARAMETER_F,
+ OPCODE_CONVOLUTION_PARAMETER_FV,
+ OPCODE_COPY_COLOR_SUB_TABLE,
+ OPCODE_COPY_COLOR_TABLE,
OPCODE_COPY_PIXELS,
OPCODE_COPY_TEX_IMAGE1D,
OPCODE_COPY_TEX_IMAGE2D,
@@ -167,6 +178,7 @@ typedef enum {
OPCODE_FRUSTUM,
OPCODE_HINT,
OPCODE_HINT_PGI,
+ OPCODE_HISTOGRAM,
OPCODE_INDEX_MASK,
OPCODE_INIT_NAMES,
OPCODE_LIGHT,
@@ -183,6 +195,7 @@ typedef enum {
OPCODE_MAPGRID1,
OPCODE_MAPGRID2,
OPCODE_MATRIX_MODE,
+ OPCODE_MIN_MAX,
OPCODE_MULT_MATRIX,
OPCODE_ORTHO,
OPCODE_PASSTHROUGH,
@@ -204,6 +217,8 @@ typedef enum {
OPCODE_RASTER_POS,
OPCODE_RECTF,
OPCODE_READ_BUFFER,
+ OPCODE_RESET_HISTOGRAM,
+ OPCODE_RESET_MIN_MAX,
OPCODE_SCALE,
OPCODE_SCISSOR,
OPCODE_SELECT_TEXTURE_SGIS,
@@ -230,6 +245,13 @@ typedef enum {
/* GL_SGIX/SGIS_pixel_texture */
OPCODE_PIXEL_TEXGEN_SGIX,
OPCODE_PIXEL_TEXGEN_PARAMETER_SGIS,
+ /* GL_ARB_texture_compression */
+ OPCODE_COMPRESSED_TEX_IMAGE_1D,
+ OPCODE_COMPRESSED_TEX_IMAGE_2D,
+ OPCODE_COMPRESSED_TEX_IMAGE_3D,
+ OPCODE_COMPRESSED_TEX_SUB_IMAGE_1D,
+ OPCODE_COMPRESSED_TEX_SUB_IMAGE_2D,
+ OPCODE_COMPRESSED_TEX_SUB_IMAGE_3D,
/* The following three are meta instructions */
OPCODE_ERROR, /* raise compiled-in error */
OPCODE_VERTEX_CASSETTE, /* render prebuilt vertex buffer */
@@ -369,6 +391,14 @@ void gl_destroy_list( GLcontext *ctx, GLuint list )
FREE( n[6].data );
n += InstSize[n[0].opcode];
break;
+ case OPCODE_CONVOLUTION_FILTER_1D:
+ FREE( n[6].data );
+ n += InstSize[n[0].opcode];
+ break;
+ case OPCODE_CONVOLUTION_FILTER_2D:
+ FREE( n[7].data );
+ n += InstSize[n[0].opcode];
+ break;
case OPCODE_POLYGON_STIPPLE:
FREE( n[1].data );
n += InstSize[n[0].opcode];
@@ -397,6 +427,30 @@ void gl_destroy_list( GLcontext *ctx, GLuint list )
FREE(n[11].data);
n += InstSize[n[0].opcode];
break;
+ case OPCODE_COMPRESSED_TEX_IMAGE_1D:
+ FREE(n[7].data);
+ n += InstSize[n[0].opcode];
+ break;
+ case OPCODE_COMPRESSED_TEX_IMAGE_2D:
+ FREE(n[8].data);
+ n += InstSize[n[0].opcode];
+ break;
+ case OPCODE_COMPRESSED_TEX_IMAGE_3D:
+ FREE(n[9].data);
+ n += InstSize[n[0].opcode];
+ break;
+ case OPCODE_COMPRESSED_TEX_SUB_IMAGE_1D:
+ FREE(n[7].data);
+ n += InstSize[n[0].opcode];
+ break;
+ case OPCODE_COMPRESSED_TEX_SUB_IMAGE_2D:
+ FREE(n[9].data);
+ n += InstSize[n[0].opcode];
+ break;
+ case OPCODE_COMPRESSED_TEX_SUB_IMAGE_3D:
+ FREE(n[11].data);
+ n += InstSize[n[0].opcode];
+ break;
case OPCODE_CONTINUE:
n = (Node *) n[1].next;
FREE( block );
@@ -504,8 +558,18 @@ void gl_init_lists( void )
InstSize[OPCODE_COLOR_MASK] = 5;
InstSize[OPCODE_COLOR_MATERIAL] = 3;
InstSize[OPCODE_COLOR_TABLE] = 7;
+ InstSize[OPCODE_COLOR_TABLE_PARAMETER_FV] = 7;
+ InstSize[OPCODE_COLOR_TABLE_PARAMETER_IV] = 7;
InstSize[OPCODE_COLOR_SUB_TABLE] = 7;
+ InstSize[OPCODE_CONVOLUTION_FILTER_1D] = 7;
+ InstSize[OPCODE_CONVOLUTION_FILTER_2D] = 8;
+ InstSize[OPCODE_CONVOLUTION_PARAMETER_I] = 4;
+ InstSize[OPCODE_CONVOLUTION_PARAMETER_IV] = 7;
+ InstSize[OPCODE_CONVOLUTION_PARAMETER_F] = 4;
+ InstSize[OPCODE_CONVOLUTION_PARAMETER_FV] = 7;
InstSize[OPCODE_COPY_PIXELS] = 6;
+ InstSize[OPCODE_COPY_COLOR_SUB_TABLE] = 6;
+ InstSize[OPCODE_COPY_COLOR_TABLE] = 6;
InstSize[OPCODE_COPY_TEX_IMAGE1D] = 8;
InstSize[OPCODE_COPY_TEX_IMAGE2D] = 9;
InstSize[OPCODE_COPY_TEX_SUB_IMAGE1D] = 7;
@@ -530,6 +594,7 @@ void gl_init_lists( void )
InstSize[OPCODE_FRUSTUM] = 7;
InstSize[OPCODE_HINT] = 3;
InstSize[OPCODE_HINT_PGI] = 3;
+ InstSize[OPCODE_HISTOGRAM] = 5;
InstSize[OPCODE_INDEX_MASK] = 2;
InstSize[OPCODE_INIT_NAMES] = 1;
InstSize[OPCODE_LIGHT] = 7;
@@ -546,6 +611,7 @@ void gl_init_lists( void )
InstSize[OPCODE_MAPGRID1] = 4;
InstSize[OPCODE_MAPGRID2] = 7;
InstSize[OPCODE_MATRIX_MODE] = 2;
+ InstSize[OPCODE_MIN_MAX] = 4;
InstSize[OPCODE_MULT_MATRIX] = 17;
InstSize[OPCODE_ORTHO] = 7;
InstSize[OPCODE_PASSTHROUGH] = 2;
@@ -567,6 +633,8 @@ void gl_init_lists( void )
InstSize[OPCODE_RASTER_POS] = 5;
InstSize[OPCODE_RECTF] = 5;
InstSize[OPCODE_READ_BUFFER] = 2;
+ InstSize[OPCODE_RESET_HISTOGRAM] = 2;
+ InstSize[OPCODE_RESET_MIN_MAX] = 2;
InstSize[OPCODE_SCALE] = 4;
InstSize[OPCODE_SCISSOR] = 5;
InstSize[OPCODE_STENCIL_FUNC] = 4;
@@ -591,7 +659,14 @@ void gl_init_lists( void )
InstSize[OPCODE_END_OF_LIST] = 1;
/* GL_SGIX/SGIS_pixel_texture */
InstSize[OPCODE_PIXEL_TEXGEN_SGIX] = 2;
- InstSize[OPCODE_PIXEL_TEXGEN_PARAMETER_SGIS] = 3,
+ InstSize[OPCODE_PIXEL_TEXGEN_PARAMETER_SGIS] = 3;
+ /* GL_ARB_texture_compression */
+ InstSize[OPCODE_COMPRESSED_TEX_IMAGE_1D] = 8;
+ InstSize[OPCODE_COMPRESSED_TEX_IMAGE_2D] = 9;
+ InstSize[OPCODE_COMPRESSED_TEX_IMAGE_3D] = 10;
+ InstSize[OPCODE_COMPRESSED_TEX_SUB_IMAGE_1D] = 8;
+ InstSize[OPCODE_COMPRESSED_TEX_SUB_IMAGE_2D] = 10;
+ InstSize[OPCODE_COMPRESSED_TEX_SUB_IMAGE_3D] = 12;
/* GL_ARB_multitexture */
InstSize[OPCODE_ACTIVE_TEXTURE] = 2;
InstSize[OPCODE_CLIENT_ACTIVE_TEXTURE] = 2;
@@ -983,6 +1058,66 @@ static void save_ColorTable( GLenum target, GLenum internalFormat,
}
+
+static void
+save_ColorTableParameterfv(GLenum target, GLenum pname, const GLfloat *params)
+{
+ GET_CURRENT_CONTEXT(ctx);
+ Node *n;
+
+ ASSERT_OUTSIDE_BEGIN_END(ctx, "glColorTableParameterfv");
+ FLUSH_VB(ctx, "dlist");
+
+ n = alloc_instruction( ctx, OPCODE_COLOR_TABLE_PARAMETER_FV, 6 );
+ if (n) {
+ n[1].e = target;
+ n[2].e = pname;
+ n[3].f = params[0];
+ if (pname == GL_COLOR_TABLE_SGI ||
+ pname == GL_POST_CONVOLUTION_COLOR_TABLE_SGI ||
+ pname == GL_POST_COLOR_MATRIX_COLOR_TABLE_SGI) {
+ n[4].f = params[1];
+ n[5].f = params[2];
+ n[6].f = params[3];
+ }
+ }
+
+ if (ctx->ExecuteFlag) {
+ (*ctx->Exec->ColorTableParameterfv)( target, pname, params );
+ }
+}
+
+
+static void
+save_ColorTableParameteriv(GLenum target, GLenum pname, const GLint *params)
+{
+ GET_CURRENT_CONTEXT(ctx);
+ Node *n;
+
+ ASSERT_OUTSIDE_BEGIN_END(ctx, "glColorTableParameterfv");
+ FLUSH_VB(ctx, "dlist");
+
+ n = alloc_instruction( ctx, OPCODE_COLOR_TABLE_PARAMETER_IV, 6 );
+ if (n) {
+ n[1].e = target;
+ n[2].e = pname;
+ n[3].i = params[0];
+ if (pname == GL_COLOR_TABLE_SGI ||
+ pname == GL_POST_CONVOLUTION_COLOR_TABLE_SGI ||
+ pname == GL_POST_COLOR_MATRIX_COLOR_TABLE_SGI) {
+ n[4].i = params[1];
+ n[5].i = params[2];
+ n[6].i = params[3];
+ }
+ }
+
+ if (ctx->ExecuteFlag) {
+ (*ctx->Exec->ColorTableParameteriv)( target, pname, params );
+ }
+}
+
+
+
static void save_ColorSubTable( GLenum target, GLsizei start, GLsizei count,
GLenum format, GLenum type,
const GLvoid *table)
@@ -1010,6 +1145,199 @@ static void save_ColorSubTable( GLenum target, GLsizei start, GLsizei count,
}
+static void
+save_CopyColorSubTable(GLenum target, GLsizei start,
+ GLint x, GLint y, GLsizei width)
+{
+ GET_CURRENT_CONTEXT(ctx);
+ Node *n;
+
+ FLUSH_VB(ctx, "dlist");
+ n = alloc_instruction( ctx, OPCODE_COPY_COLOR_SUB_TABLE, 6 );
+ if (n) {
+ n[1].e = target;
+ n[2].i = start;
+ n[3].i = x;
+ n[4].i = y;
+ n[5].i = width;
+ }
+ if (ctx->ExecuteFlag) {
+ (*ctx->Exec->CopyColorSubTable)(target, start, x, y, width);
+ }
+}
+
+
+static void
+save_CopyColorTable(GLenum target, GLenum internalformat,
+ GLint x, GLint y, GLsizei width)
+{
+ GET_CURRENT_CONTEXT(ctx);
+ Node *n;
+
+ FLUSH_VB(ctx, "dlist");
+ n = alloc_instruction( ctx, OPCODE_COPY_COLOR_TABLE, 6 );
+ if (n) {
+ n[1].e = target;
+ n[2].e = internalformat;
+ n[3].i = x;
+ n[4].i = y;
+ n[5].i = width;
+ }
+ if (ctx->ExecuteFlag) {
+ (*ctx->Exec->CopyColorTable)(target, internalformat, x, y, width);
+ }
+}
+
+
+static void
+save_ConvolutionFilter1D(GLenum target, GLenum internalFormat, GLsizei width,
+ GLenum format, GLenum type, const GLvoid *filter)
+{
+ GET_CURRENT_CONTEXT(ctx);
+ GLvoid *image = _mesa_unpack_image(width, 1, 1, format, type, filter,
+ &ctx->Unpack);
+ Node *n;
+ FLUSH_VB(ctx, "dlist");
+ n = alloc_instruction( ctx, OPCODE_CONVOLUTION_FILTER_1D, 6 );
+ if (n) {
+ n[1].e = target;
+ n[2].e = internalFormat;
+ n[3].i = width;
+ n[4].e = format;
+ n[5].e = type;
+ n[6].data = image;
+ }
+ else if (image) {
+ FREE(image);
+ }
+ if (ctx->ExecuteFlag) {
+ (*ctx->Exec->ConvolutionFilter1D)( target, internalFormat, width,
+ format, type, filter );
+ }
+}
+
+
+static void
+save_ConvolutionFilter2D(GLenum target, GLenum internalFormat,
+ GLsizei width, GLsizei height, GLenum format,
+ GLenum type, const GLvoid *filter)
+{
+ GET_CURRENT_CONTEXT(ctx);
+ GLvoid *image = _mesa_unpack_image(width, height, 1, format, type, filter,
+ &ctx->Unpack);
+ Node *n;
+ FLUSH_VB(ctx, "dlist");
+ n = alloc_instruction( ctx, OPCODE_CONVOLUTION_FILTER_2D, 7 );
+ if (n) {
+ n[1].e = target;
+ n[2].e = internalFormat;
+ n[3].i = width;
+ n[4].i = height;
+ n[5].e = format;
+ n[6].e = type;
+ n[7].data = image;
+ }
+ else if (image) {
+ FREE(image);
+ }
+ if (ctx->ExecuteFlag) {
+ (*ctx->Exec->ConvolutionFilter2D)( target, internalFormat, width, height,
+ format, type, filter );
+ }
+}
+
+
+static void
+save_ConvolutionParameteri(GLenum target, GLenum pname, GLint param)
+{
+ GET_CURRENT_CONTEXT(ctx);
+ Node *n;
+ FLUSH_VB(ctx, "dlist");
+ n = alloc_instruction( ctx, OPCODE_CONVOLUTION_PARAMETER_I, 3 );
+ if (n) {
+ n[1].e = target;
+ n[2].e = pname;
+ n[3].i = param;
+ }
+ if (ctx->ExecuteFlag) {
+ (*ctx->Exec->ConvolutionParameteri)( target, pname, param );
+ }
+}
+
+
+static void
+save_ConvolutionParameteriv(GLenum target, GLenum pname, const GLint *params)
+{
+ GET_CURRENT_CONTEXT(ctx);
+ Node *n;
+ FLUSH_VB(ctx, "dlist");
+ n = alloc_instruction( ctx, OPCODE_CONVOLUTION_PARAMETER_IV, 6 );
+ if (n) {
+ n[1].e = target;
+ n[2].e = pname;
+ n[3].i = params[0];
+ if (pname == GL_CONVOLUTION_BORDER_COLOR ||
+ pname == GL_CONVOLUTION_FILTER_SCALE ||
+ pname == GL_CONVOLUTION_FILTER_BIAS) {
+ n[4].i = params[1];
+ n[5].i = params[2];
+ n[6].i = params[3];
+ }
+ else {
+ n[4].i = n[5].i = n[6].i = 0;
+ }
+ }
+ if (ctx->ExecuteFlag) {
+ (*ctx->Exec->ConvolutionParameteriv)( target, pname, params );
+ }
+}
+
+
+static void
+save_ConvolutionParameterf(GLenum target, GLenum pname, GLfloat param)
+{
+ GET_CURRENT_CONTEXT(ctx);
+ Node *n;
+ FLUSH_VB(ctx, "dlist");
+ n = alloc_instruction( ctx, OPCODE_CONVOLUTION_PARAMETER_F, 3 );
+ if (n) {
+ n[1].e = target;
+ n[2].e = pname;
+ n[3].f = param;
+ }
+ if (ctx->ExecuteFlag) {
+ (*ctx->Exec->ConvolutionParameterf)( target, pname, param );
+ }
+}
+
+
+static void
+save_ConvolutionParameterfv(GLenum target, GLenum pname, const GLfloat *params)
+{
+ GET_CURRENT_CONTEXT(ctx);
+ Node *n;
+ FLUSH_VB(ctx, "dlist");
+ n = alloc_instruction( ctx, OPCODE_CONVOLUTION_PARAMETER_IV, 6 );
+ if (n) {
+ n[1].e = target;
+ n[2].e = pname;
+ n[3].f = params[0];
+ if (pname == GL_CONVOLUTION_BORDER_COLOR ||
+ pname == GL_CONVOLUTION_FILTER_SCALE ||
+ pname == GL_CONVOLUTION_FILTER_BIAS) {
+ n[4].f = params[1];
+ n[5].f = params[2];
+ n[6].f = params[3];
+ }
+ else {
+ n[4].f = n[5].f = n[6].f = 0.0F;
+ }
+ }
+ if (ctx->ExecuteFlag) {
+ (*ctx->Exec->ConvolutionParameterfv)( target, pname, params );
+ }
+}
+
static void save_CopyPixels( GLint x, GLint y,
GLsizei width, GLsizei height, GLenum type )
@@ -1462,6 +1790,26 @@ static void save_HintPGI( GLenum target, GLint mode )
}
+static void
+save_Histogram(GLenum target, GLsizei width, GLenum internalFormat, GLboolean sink)
+{
+ GET_CURRENT_CONTEXT(ctx);
+ Node *n;
+
+ FLUSH_VB(ctx, "dlist");
+ n = alloc_instruction( ctx, OPCODE_HISTOGRAM, 4 );
+ if (n) {
+ n[1].e = target;
+ n[2].i = width;
+ n[3].e = internalFormat;
+ n[4].b = sink;
+ }
+ if (ctx->ExecuteFlag) {
+ (*ctx->Exec->Histogram)( target, width, internalFormat, sink );
+ }
+}
+
+
static void save_IndexMask( GLuint mask )
{
GET_CURRENT_CONTEXT(ctx);
@@ -1935,6 +2283,25 @@ static void save_MatrixMode( GLenum mode )
}
+static void
+save_Minmax(GLenum target, GLenum internalFormat, GLboolean sink)
+{
+ GET_CURRENT_CONTEXT(ctx);
+ Node *n;
+
+ FLUSH_VB(ctx, "dlist");
+ n = alloc_instruction( ctx, OPCODE_MIN_MAX, 3 );
+ if (n) {
+ n[1].e = target;
+ n[2].e = internalFormat;
+ n[3].b = sink;
+ }
+ if (ctx->ExecuteFlag) {
+ (*ctx->Exec->Minmax)( target, internalFormat, sink );
+ }
+}
+
+
static void save_MultMatrixf( const GLfloat *m )
{
GET_CURRENT_CONTEXT(ctx);
@@ -2499,6 +2866,38 @@ static void save_Rectsv(const GLshort *v1, const GLshort *v2)
}
+static void
+save_ResetHistogram(GLenum target)
+{
+ GET_CURRENT_CONTEXT(ctx);
+ Node *n;
+ FLUSH_VB(ctx, "dlist");
+ n = alloc_instruction( ctx, OPCODE_RESET_HISTOGRAM, 1 );
+ if (n) {
+ n[1].e = target;
+ }
+ if (ctx->ExecuteFlag) {
+ (*ctx->Exec->ResetHistogram)( target );
+ }
+}
+
+
+static void
+save_ResetMinmax(GLenum target)
+{
+ GET_CURRENT_CONTEXT(ctx);
+ Node *n;
+ FLUSH_VB(ctx, "dlist");
+ n = alloc_instruction( ctx, OPCODE_RESET_MIN_MAX, 1 );
+ if (n) {
+ n[1].e = target;
+ }
+ if (ctx->ExecuteFlag) {
+ (*ctx->Exec->ResetMinmax)( target );
+ }
+}
+
+
static void save_Rotatef( GLfloat angle, GLfloat x, GLfloat y, GLfloat z )
{
GLfloat m[16];
@@ -2850,7 +3249,7 @@ static void save_TexImage2D( GLenum target,
static void save_TexImage3D( GLenum target,
- GLint level, GLint components,
+ GLint level, GLint internalFormat,
GLsizei width, GLsizei height, GLsizei depth,
GLint border,
GLenum format, GLenum type,
@@ -2859,7 +3258,7 @@ static void save_TexImage3D( GLenum target,
GET_CURRENT_CONTEXT(ctx);
if (target == GL_PROXY_TEXTURE_3D) {
/* don't compile, execute immediately */
- (*ctx->Exec->TexImage3D)( target, level, components, width,
+ (*ctx->Exec->TexImage3D)( target, level, internalFormat, width,
height, depth, border, format, type, pixels );
}
else {
@@ -2871,7 +3270,7 @@ static void save_TexImage3D( GLenum target,
if (n) {
n[1].e = target;
n[2].i = level;
- n[3].i = components;
+ n[3].i = internalFormat;
n[4].i = (GLint) width;
n[5].i = (GLint) height;
n[6].i = (GLint) depth;
@@ -2884,7 +3283,7 @@ static void save_TexImage3D( GLenum target,
FREE(image);
}
if (ctx->ExecuteFlag) {
- (*ctx->Exec->TexImage3D)( target, level, components, width,
+ (*ctx->Exec->TexImage3D)( target, level, internalFormat, width,
height, depth, border, format, type, pixels );
}
}
@@ -3198,6 +3597,8 @@ static void save_ClientActiveTextureARB( GLenum target )
+/* GL_ARB_transpose_matrix */
+
static void save_LoadTransposeMatrixdARB( const GLdouble m[16] )
{
GLdouble tm[16];
@@ -3245,6 +3646,266 @@ static void save_PixelTexGenSGIX(GLenum mode)
}
+/* GL_ARB_texture_compression */
+static void
+save_CompressedTexImage1DARB(GLenum target, GLint level,
+ GLenum internalFormat, GLsizei width,
+ GLint border, GLsizei imageSize,
+ const GLvoid *data)
+{
+ GET_CURRENT_CONTEXT(ctx);
+ if (target == GL_PROXY_TEXTURE_1D) {
+ /* don't compile, execute immediately */
+ (*ctx->Exec->CompressedTexImage1DARB)(target, level, internalFormat,
+ width, border, imageSize, data);
+ }
+ else {
+ Node *n;
+ GLvoid *image;
+ FLUSH_VB(ctx, "dlist");
+ /* make copy of image */
+ image = MALLOC(imageSize);
+ if (!image) {
+ gl_error(ctx, GL_OUT_OF_MEMORY, "glCompressedTexImage1DARB");
+ return;
+ }
+ MEMCPY(image, data, imageSize);
+ n = alloc_instruction( ctx, OPCODE_COMPRESSED_TEX_IMAGE_1D, 8 );
+ if (n) {
+ n[1].e = target;
+ n[2].i = level;
+ n[3].e = internalFormat;
+ n[4].i = (GLint) width;
+ n[5].i = border;
+ n[6].i = imageSize;
+ n[7].data = image;
+ }
+ else if (image) {
+ FREE(image);
+ }
+ if (ctx->ExecuteFlag) {
+ (*ctx->Exec->CompressedTexImage1DARB)(target, level, internalFormat,
+ width, border, imageSize, data);
+ }
+ }
+}
+
+
+static void
+save_CompressedTexImage2DARB(GLenum target, GLint level,
+ GLenum internalFormat, GLsizei width,
+ GLsizei height, GLint border, GLsizei imageSize,
+ const GLvoid *data)
+{
+ GET_CURRENT_CONTEXT(ctx);
+ if (target == GL_PROXY_TEXTURE_2D) {
+ /* don't compile, execute immediately */
+ (*ctx->Exec->CompressedTexImage2DARB)(target, level, internalFormat,
+ width, height, border, imageSize, data);
+ }
+ else {
+ Node *n;
+ GLvoid *image;
+ FLUSH_VB(ctx, "dlist");
+ /* make copy of image */
+ image = MALLOC(imageSize);
+ if (!image) {
+ gl_error(ctx, GL_OUT_OF_MEMORY, "glCompressedTexImage2DARB");
+ return;
+ }
+ MEMCPY(image, data, imageSize);
+ n = alloc_instruction( ctx, OPCODE_COMPRESSED_TEX_IMAGE_2D, 9 );
+ if (n) {
+ n[1].e = target;
+ n[2].i = level;
+ n[3].e = internalFormat;
+ n[4].i = (GLint) width;
+ n[5].i = (GLint) height;
+ n[6].i = border;
+ n[7].i = imageSize;
+ n[8].data = image;
+ }
+ else if (image) {
+ FREE(image);
+ }
+ if (ctx->ExecuteFlag) {
+ (*ctx->Exec->CompressedTexImage2DARB)(target, level, internalFormat,
+ width, height, border, imageSize, data);
+ }
+ }
+}
+
+
+static void
+save_CompressedTexImage3DARB(GLenum target, GLint level,
+ GLenum internalFormat, GLsizei width,
+ GLsizei height, GLsizei depth, GLint border,
+ GLsizei imageSize, const GLvoid *data)
+{
+ GET_CURRENT_CONTEXT(ctx);
+ if (target == GL_PROXY_TEXTURE_3D) {
+ /* don't compile, execute immediately */
+ (*ctx->Exec->CompressedTexImage3DARB)(target, level, internalFormat,
+ width, height, depth, border, imageSize, data);
+ }
+ else {
+ Node *n;
+ GLvoid *image;
+ FLUSH_VB(ctx, "dlist");
+ /* make copy of image */
+ image = MALLOC(imageSize);
+ if (!image) {
+ gl_error(ctx, GL_OUT_OF_MEMORY, "glCompressedTexImage3DARB");
+ return;
+ }
+ MEMCPY(image, data, imageSize);
+ n = alloc_instruction( ctx, OPCODE_COMPRESSED_TEX_IMAGE_3D, 10 );
+ if (n) {
+ n[1].e = target;
+ n[2].i = level;
+ n[3].e = internalFormat;
+ n[4].i = (GLint) width;
+ n[5].i = (GLint) height;
+ n[6].i = (GLint) depth;
+ n[7].i = border;
+ n[8].i = imageSize;
+ n[9].data = image;
+ }
+ else if (image) {
+ FREE(image);
+ }
+ if (ctx->ExecuteFlag) {
+ (*ctx->Exec->CompressedTexImage3DARB)(target, level, internalFormat,
+ width, height, depth, border, imageSize, data);
+ }
+ }
+}
+
+
+static void
+save_CompressedTexSubImage1DARB(GLenum target, GLint level, GLint xoffset,
+ GLsizei width, GLenum format,
+ GLsizei imageSize, const GLvoid *data)
+{
+ Node *n;
+ GLvoid *image;
+
+ GET_CURRENT_CONTEXT(ctx);
+ FLUSH_VB(ctx, "dlist");
+
+ /* make copy of image */
+ image = MALLOC(imageSize);
+ if (!image) {
+ gl_error(ctx, GL_OUT_OF_MEMORY, "glCompressedTexSubImage1DARB");
+ return;
+ }
+ MEMCPY(image, data, imageSize);
+ n = alloc_instruction( ctx, OPCODE_COMPRESSED_TEX_SUB_IMAGE_1D, 8 );
+ if (n) {
+ n[1].e = target;
+ n[2].i = level;
+ n[3].i = xoffset;
+ n[4].i = (GLint) width;
+ n[5].e = format;
+ n[6].i = imageSize;
+ n[7].data = image;
+ }
+ else if (image) {
+ FREE(image);
+ }
+ if (ctx->ExecuteFlag) {
+ (*ctx->Exec->CompressedTexSubImage1DARB)(target, level, xoffset,
+ width, format, imageSize, data);
+ }
+}
+
+
+static void
+save_CompressedTexSubImage2DARB(GLenum target, GLint level, GLint xoffset,
+ GLint yoffset, GLsizei width, GLsizei height,
+ GLenum format, GLsizei imageSize,
+ const GLvoid *data)
+{
+ Node *n;
+ GLvoid *image;
+
+ GET_CURRENT_CONTEXT(ctx);
+ FLUSH_VB(ctx, "dlist");
+
+ /* make copy of image */
+ image = MALLOC(imageSize);
+ if (!image) {
+ gl_error(ctx, GL_OUT_OF_MEMORY, "glCompressedTexSubImage2DARB");
+ return;
+ }
+ MEMCPY(image, data, imageSize);
+ n = alloc_instruction( ctx, OPCODE_COMPRESSED_TEX_SUB_IMAGE_2D, 10 );
+ if (n) {
+ n[1].e = target;
+ n[2].i = level;
+ n[3].i = xoffset;
+ n[4].i = yoffset;
+ n[5].i = (GLint) width;
+ n[6].i = (GLint) height;
+ n[7].e = format;
+ n[8].i = imageSize;
+ n[9].data = image;
+ }
+ else if (image) {
+ FREE(image);
+ }
+ if (ctx->ExecuteFlag) {
+ (*ctx->Exec->CompressedTexSubImage2DARB)(target, level, xoffset, yoffset,
+ width, height, format, imageSize, data);
+ }
+}
+
+
+static void
+save_CompressedTexSubImage3DARB(GLenum target, GLint level, GLint xoffset,
+ GLint yoffset, GLint zoffset, GLsizei width,
+ GLsizei height, GLsizei depth, GLenum format,
+ GLsizei imageSize, const GLvoid *data)
+{
+ Node *n;
+ GLvoid *image;
+
+ GET_CURRENT_CONTEXT(ctx);
+ FLUSH_VB(ctx, "dlist");
+
+ /* make copy of image */
+ image = MALLOC(imageSize);
+ if (!image) {
+ gl_error(ctx, GL_OUT_OF_MEMORY, "glCompressedTexSubImage3DARB");
+ return;
+ }
+ MEMCPY(image, data, imageSize);
+ n = alloc_instruction( ctx, OPCODE_COMPRESSED_TEX_SUB_IMAGE_3D, 12 );
+ if (n) {
+ n[1].e = target;
+ n[2].i = level;
+ n[3].i = xoffset;
+ n[4].i = yoffset;
+ n[5].i = zoffset;
+ n[6].i = (GLint) width;
+ n[7].i = (GLint) height;
+ n[8].i = (GLint) depth;
+ n[9].e = format;
+ n[10].i = imageSize;
+ n[11].data = image;
+ }
+ else if (image) {
+ FREE(image);
+ }
+ if (ctx->ExecuteFlag) {
+ (*ctx->Exec->CompressedTexSubImage3DARB)(target, level, xoffset, yoffset,
+ zoffset, width, height, depth, format, imageSize, data);
+ }
+}
+
+
+/* GL_SGIS_pixel_texture */
+
static void save_PixelTexGenParameteriSGIS(GLenum target, GLint value)
{
GET_CURRENT_CONTEXT(ctx);
@@ -3515,6 +4176,26 @@ static void execute_list( GLcontext *ctx, GLuint list )
ctx->Unpack = save; /* restore */
}
break;
+ case OPCODE_COLOR_TABLE_PARAMETER_FV:
+ {
+ GLfloat params[4];
+ params[0] = n[3].f;
+ params[1] = n[4].f;
+ params[2] = n[5].f;
+ params[3] = n[6].f;
+ (*ctx->Exec->ColorTableParameterfv)( n[1].e, n[2].e, params );
+ }
+ break;
+ case OPCODE_COLOR_TABLE_PARAMETER_IV:
+ {
+ GLint params[4];
+ params[0] = n[3].i;
+ params[1] = n[4].i;
+ params[2] = n[5].i;
+ params[3] = n[6].i;
+ (*ctx->Exec->ColorTableParameteriv)( n[1].e, n[2].e, params );
+ }
+ break;
case OPCODE_COLOR_SUB_TABLE:
{
struct gl_pixelstore_attrib save = ctx->Unpack;
@@ -3524,6 +4205,58 @@ static void execute_list( GLcontext *ctx, GLuint list )
ctx->Unpack = save; /* restore */
}
break;
+ case OPCODE_CONVOLUTION_FILTER_1D:
+ {
+ struct gl_pixelstore_attrib save = ctx->Unpack;
+ ctx->Unpack = _mesa_native_packing;
+ (*ctx->Exec->ConvolutionFilter1D)( n[1].e, n[2].i, n[3].i,
+ n[4].e, n[5].e, n[6].data );
+ ctx->Unpack = save; /* restore */
+ }
+ break;
+ case OPCODE_CONVOLUTION_FILTER_2D:
+ {
+ struct gl_pixelstore_attrib save = ctx->Unpack;
+ ctx->Unpack = _mesa_native_packing;
+ (*ctx->Exec->ConvolutionFilter2D)( n[1].e, n[2].i, n[3].i,
+ n[4].i, n[5].e, n[6].e, n[7].data );
+ ctx->Unpack = save; /* restore */
+ }
+ break;
+ case OPCODE_CONVOLUTION_PARAMETER_I:
+ (*ctx->Exec->ConvolutionParameteri)( n[1].e, n[2].e, n[3].i );
+ break;
+ case OPCODE_CONVOLUTION_PARAMETER_IV:
+ {
+ GLint params[4];
+ params[0] = n[3].i;
+ params[1] = n[4].i;
+ params[2] = n[5].i;
+ params[3] = n[6].i;
+ (*ctx->Exec->ConvolutionParameteriv)( n[1].e, n[2].e, params );
+ }
+ break;
+ case OPCODE_CONVOLUTION_PARAMETER_F:
+ (*ctx->Exec->ConvolutionParameterf)( n[1].e, n[2].e, n[3].f );
+ break;
+ case OPCODE_CONVOLUTION_PARAMETER_FV:
+ {
+ GLfloat params[4];
+ params[0] = n[3].f;
+ params[1] = n[4].f;
+ params[2] = n[5].f;
+ params[3] = n[6].f;
+ (*ctx->Exec->ConvolutionParameterfv)( n[1].e, n[2].e, params );
+ }
+ break;
+ case OPCODE_COPY_COLOR_SUB_TABLE:
+ (*ctx->Exec->CopyColorSubTable)( n[1].e, n[2].i,
+ n[3].i, n[4].i, n[5].i );
+ break;
+ case OPCODE_COPY_COLOR_TABLE:
+ (*ctx->Exec->CopyColorSubTable)( n[1].e, n[2].i,
+ n[3].i, n[4].i, n[5].i );
+ break;
case OPCODE_COPY_PIXELS:
(*ctx->Exec->CopyPixels)( n[1].i, n[2].i,
(GLsizei) n[3].i, (GLsizei) n[4].i, n[5].e );
@@ -3606,6 +4339,9 @@ static void execute_list( GLcontext *ctx, GLuint list )
case OPCODE_HINT_PGI:
(*ctx->Exec->HintPGI)( n[1].e, n[2].i );
break;
+ case OPCODE_HISTOGRAM:
+ (*ctx->Exec->Histogram)( n[1].e, n[2].i, n[3].e, n[4].b );
+ break;
case OPCODE_INDEX_MASK:
(*ctx->Exec->IndexMask)( n[1].ui );
break;
@@ -3699,6 +4435,9 @@ static void execute_list( GLcontext *ctx, GLuint list )
case OPCODE_MATRIX_MODE:
(*ctx->Exec->MatrixMode)( n[1].e );
break;
+ case OPCODE_MIN_MAX:
+ (*ctx->Exec->Minmax)(n[1].e, n[2].e, n[3].b);
+ break;
case OPCODE_MULT_MATRIX:
if (sizeof(Node)==sizeof(GLfloat)) {
(*ctx->Exec->MultMatrixf)( &n[1].f );
@@ -3778,6 +4517,12 @@ static void execute_list( GLcontext *ctx, GLuint list )
case OPCODE_RECTF:
(*ctx->Exec->Rectf)( n[1].f, n[2].f, n[3].f, n[4].f );
break;
+ case OPCODE_RESET_HISTOGRAM:
+ (*ctx->Exec->ResetHistogram)( n[1].e );
+ break;
+ case OPCODE_RESET_MIN_MAX:
+ (*ctx->Exec->ResetMinmax)( n[1].e );
+ break;
case OPCODE_SCALE:
(*ctx->Exec->Scalef)( n[1].f, n[2].f, n[3].f );
break;
@@ -3930,6 +4675,31 @@ static void execute_list( GLcontext *ctx, GLuint list )
case OPCODE_PIXEL_TEXGEN_PARAMETER_SGIS: /* GL_SGIS_pixel_texture */
(*ctx->Exec->PixelTexGenParameteriSGIS)( n[1].e, n[2].i );
break;
+ case OPCODE_COMPRESSED_TEX_IMAGE_1D: /* GL_ARB_texture_compression */
+ (*ctx->Exec->CompressedTexImage1DARB)(n[1].e, n[2].i, n[3].e,
+ n[4].i, n[5].i, n[6].i, n[7].data);
+ break;
+ case OPCODE_COMPRESSED_TEX_IMAGE_2D: /* GL_ARB_texture_compression */
+ (*ctx->Exec->CompressedTexImage2DARB)(n[1].e, n[2].i, n[3].e,
+ n[4].i, n[5].i, n[6].i, n[7].i, n[8].data);
+ break;
+ case OPCODE_COMPRESSED_TEX_IMAGE_3D: /* GL_ARB_texture_compression */
+ (*ctx->Exec->CompressedTexImage3DARB)(n[1].e, n[2].i, n[3].e,
+ n[4].i, n[5].i, n[6].i, n[7].i, n[8].i, n[9].data);
+ break;
+ case OPCODE_COMPRESSED_TEX_SUB_IMAGE_1D: /* GL_ARB_texture_compress */
+ (*ctx->Exec->CompressedTexSubImage1DARB)(n[1].e, n[2].i, n[3].i,
+ n[4].i, n[5].e, n[6].i, n[7].data);
+ break;
+ case OPCODE_COMPRESSED_TEX_SUB_IMAGE_2D: /* GL_ARB_texture_compress */
+ (*ctx->Exec->CompressedTexSubImage2DARB)(n[1].e, n[2].i, n[3].i,
+ n[4].i, n[5].i, n[6].i, n[7].e, n[8].i, n[9].data);
+ break;
+ case OPCODE_COMPRESSED_TEX_SUB_IMAGE_3D: /* GL_ARB_texture_compress */
+ (*ctx->Exec->CompressedTexSubImage3DARB)(n[1].e, n[2].i, n[3].i,
+ n[4].i, n[5].i, n[6].i, n[7].i, n[8].i,
+ n[9].e, n[10].i, n[11].data);
+ break;
case OPCODE_CONTINUE:
n = (Node *) n[1].next;
break;
@@ -4220,13 +4990,13 @@ _mesa_ListBase( GLuint base )
/*
- * Assign all the pointers in 'table' to point to Mesa's display list
+ * Assign all the pointers in <table> to point to Mesa's display list
* building functions.
*/
void
-_mesa_init_dlist_table( struct _glapi_table *table )
+_mesa_init_dlist_table( struct _glapi_table *table, GLuint tableSize )
{
- _mesa_init_no_op_table(table);
+ _mesa_init_no_op_table(table, tableSize);
/* GL 1.0 */
table->Accum = save_Accum;
@@ -4580,16 +5350,16 @@ _mesa_init_dlist_table( struct _glapi_table *table )
table->BlendEquation = save_BlendEquation;
table->ColorSubTable = save_ColorSubTable;
table->ColorTable = save_ColorTable;
- table->ColorTableParameterfv = _mesa_ColorTableParameterfv;
- table->ColorTableParameteriv = _mesa_ColorTableParameteriv;
- table->ConvolutionFilter1D = _mesa_ConvolutionFilter1D;
- table->ConvolutionFilter2D = _mesa_ConvolutionFilter2D;
- table->ConvolutionParameterf = _mesa_ConvolutionParameterf;
- table->ConvolutionParameterfv = _mesa_ConvolutionParameterfv;
- table->ConvolutionParameteri = _mesa_ConvolutionParameteri;
- table->ConvolutionParameteriv = _mesa_ConvolutionParameteriv;
- table->CopyColorSubTable = _mesa_CopyColorSubTable;
- table->CopyColorTable = _mesa_CopyColorTable;
+ table->ColorTableParameterfv = save_ColorTableParameterfv;
+ table->ColorTableParameteriv = save_ColorTableParameteriv;
+ table->ConvolutionFilter1D = save_ConvolutionFilter1D;
+ table->ConvolutionFilter2D = save_ConvolutionFilter2D;
+ table->ConvolutionParameterf = save_ConvolutionParameterf;
+ table->ConvolutionParameterfv = save_ConvolutionParameterfv;
+ table->ConvolutionParameteri = save_ConvolutionParameteri;
+ table->ConvolutionParameteriv = save_ConvolutionParameteriv;
+ table->CopyColorSubTable = save_CopyColorSubTable;
+ table->CopyColorTable = save_CopyColorTable;
table->CopyConvolutionFilter1D = _mesa_CopyConvolutionFilter1D;
table->CopyConvolutionFilter2D = _mesa_CopyConvolutionFilter2D;
table->GetColorTable = _mesa_GetColorTable;
@@ -4605,10 +5375,10 @@ _mesa_init_dlist_table( struct _glapi_table *table )
table->GetMinmaxParameterfv = _mesa_GetMinmaxParameterfv;
table->GetMinmaxParameteriv = _mesa_GetMinmaxParameteriv;
table->GetSeparableFilter = _mesa_GetSeparableFilter;
- table->Histogram = _mesa_Histogram;
- table->Minmax = _mesa_Minmax;
- table->ResetHistogram = _mesa_ResetHistogram;
- table->ResetMinmax = _mesa_ResetMinmax;
+ table->Histogram = save_Histogram;
+ table->Minmax = save_Minmax;
+ table->ResetHistogram = save_ResetHistogram;
+ table->ResetMinmax = save_ResetMinmax;
table->SeparableFilter2D = _mesa_SeparableFilter2D;
/* GL_EXT_texture3d */
@@ -4736,6 +5506,14 @@ _mesa_init_dlist_table( struct _glapi_table *table )
table->MultTransposeMatrixdARB = save_MultTransposeMatrixdARB;
table->MultTransposeMatrixfARB = save_MultTransposeMatrixfARB;
+ /* ARB 12. GL_ARB_texture_compression */
+ table->CompressedTexImage3DARB = save_CompressedTexImage3DARB;
+ table->CompressedTexImage2DARB = save_CompressedTexImage2DARB;
+ table->CompressedTexImage1DARB = save_CompressedTexImage1DARB;
+ table->CompressedTexSubImage3DARB = save_CompressedTexSubImage3DARB;
+ table->CompressedTexSubImage2DARB = save_CompressedTexSubImage2DARB;
+ table->CompressedTexSubImage1DARB = save_CompressedTexSubImage1DARB;
+ table->GetCompressedTexImageARB = _mesa_GetCompressedTexImageARB;
}
@@ -4787,6 +5565,16 @@ static void print_list( GLcontext *ctx, FILE *f, GLuint list )
fprintf(f,"CallList %d + offset %u = %u\n", (int) n[1].ui,
ctx->List.ListBase, ctx->List.ListBase + n[1].ui );
break;
+ case OPCODE_COLOR_TABLE_PARAMETER_FV:
+ fprintf(f,"ColorTableParameterfv %s %s %f %f %f %f\n",
+ enum_string(n[1].e), enum_string(n[2].e),
+ n[3].f, n[4].f, n[5].f, n[6].f);
+ break;
+ case OPCODE_COLOR_TABLE_PARAMETER_IV:
+ fprintf(f,"ColorTableParameteriv %s %s %d %d %d %d\n",
+ enum_string(n[1].e), enum_string(n[2].e),
+ n[3].i, n[4].i, n[5].i, n[6].i);
+ break;
case OPCODE_DISABLE:
fprintf(f,"Disable %s\n", enum_string(n[1].e));
break;
diff --git a/xc/extras/Mesa/src/dlist.h b/xc/extras/Mesa/src/dlist.h
index 3305392d9..b2aaa64c7 100644
--- a/xc/extras/Mesa/src/dlist.h
+++ b/xc/extras/Mesa/src/dlist.h
@@ -64,7 +64,7 @@ extern void _mesa_ListBase( GLuint base );
extern void _mesa_NewList( GLuint list, GLenum mode );
-extern void _mesa_init_dlist_table( struct _glapi_table *table );
+extern void _mesa_init_dlist_table( struct _glapi_table *table, GLuint tableSize );
extern void gl_compile_cassette( GLcontext *ctx );
diff --git a/xc/extras/Mesa/src/drawpix.c b/xc/extras/Mesa/src/drawpix.c
index 362e30b9c..7fb93abcc 100644
--- a/xc/extras/Mesa/src/drawpix.c
+++ b/xc/extras/Mesa/src/drawpix.c
@@ -122,6 +122,7 @@ simple_DrawPixels( GLcontext *ctx, GLint x, GLint y,
&& !ctx->Pixel.ColorTableEnabled
&& !ctx->Pixel.PostColorMatrixColorTableEnabled
&& !ctx->Pixel.MinMaxEnabled
+ && !ctx->Pixel.HistogramEnabled
&& ctx->Pixel.IndexShift==0 && ctx->Pixel.IndexOffset==0
&& ctx->Pixel.MapColorFlag==0
&& ctx->Texture.ReallyEnabled == 0
diff --git a/xc/extras/Mesa/src/enable.c b/xc/extras/Mesa/src/enable.c
index 6c2220044..97554430e 100644
--- a/xc/extras/Mesa/src/enable.c
+++ b/xc/extras/Mesa/src/enable.c
@@ -494,6 +494,44 @@ void _mesa_set_enable( GLcontext *ctx, GLenum cap, GLboolean state )
ctx->Pixel.PostColorMatrixColorTableEnabled = state;
break;
+ /* GL_EXT_convolution */
+ case GL_CONVOLUTION_1D:
+ ctx->Pixel.Convolution1DEnabled = state;
+ break;
+ case GL_CONVOLUTION_2D:
+ ctx->Pixel.Convolution2DEnabled = state;
+ break;
+ case GL_SEPARABLE_2D:
+ ctx->Pixel.Separable2DEnabled = state;
+ break;
+
+ /* GL_ARB_texture_cube_map */
+ case GL_TEXTURE_CUBE_MAP_ARB:
+ if (ctx->Extensions.HaveTextureCubeMap) {
+ if (ctx->Visual->RGBAflag) {
+ const GLuint curr = ctx->Texture.CurrentUnit;
+ const GLuint flag = TEXTURE0_CUBE << (curr * 4);
+ struct gl_texture_unit *texUnit = &ctx->Texture.Unit[curr];
+ ctx->NewState |= NEW_TEXTURE_ENABLE;
+ if (state) {
+ texUnit->Enabled |= TEXTURE0_CUBE;
+ ctx->Enabled |= flag;
+ }
+ else {
+ texUnit->Enabled &= ~TEXTURE0_CUBE;
+ ctx->Enabled &= ~flag;
+ }
+ }
+ }
+ else {
+ if (state)
+ gl_error(ctx, GL_INVALID_ENUM, "glEnable");
+ else
+ gl_error(ctx, GL_INVALID_ENUM, "glDisable");
+ return;
+ }
+ break;
+
default:
if (state) {
gl_error( ctx, GL_INVALID_ENUM, "glEnable" );
@@ -718,6 +756,25 @@ _mesa_IsEnabled( GLenum cap )
case GL_POST_COLOR_MATRIX_COLOR_TABLE_SGI:
return ctx->Pixel.PostColorMatrixColorTableEnabled;
+ /* GL_EXT_convolution */
+ case GL_CONVOLUTION_1D:
+ return ctx->Pixel.Convolution1DEnabled;
+ case GL_CONVOLUTION_2D:
+ return ctx->Pixel.Convolution2DEnabled;
+ case GL_SEPARABLE_2D:
+ return ctx->Pixel.Separable2DEnabled;
+
+ /* GL_ARB_texture_cube_map */
+ case GL_TEXTURE_CUBE_MAP_ARB:
+ if (ctx->Extensions.HaveTextureCubeMap) {
+ const struct gl_texture_unit *texUnit = &ctx->Texture.Unit[ctx->Texture.CurrentUnit];
+ return (texUnit->Enabled & TEXTURE0_CUBE) ? GL_TRUE : GL_FALSE;
+ }
+ else {
+ gl_error(ctx, GL_INVALID_ENUM, "glIsEnabled");
+ return GL_FALSE;
+ }
+
default:
gl_error( ctx, GL_INVALID_ENUM, "glIsEnabled" );
return GL_FALSE;
diff --git a/xc/extras/Mesa/src/extensions.c b/xc/extras/Mesa/src/extensions.c
index 89e3ab420..18ff0c0cf 100644
--- a/xc/extras/Mesa/src/extensions.c
+++ b/xc/extras/Mesa/src/extensions.c
@@ -48,16 +48,21 @@ struct extension {
static struct { int enabled; const char *name; } default_extensions[] = {
- { DEFAULT_OFF, "GL_ARB_imaging" },
+ { DEFAULT_OFF, "GL_ARB_imaging" }, /* in progress */
{ DEFAULT_ON, "GL_ARB_multitexture" },
+ { DEFAULT_OFF, "GL_ARB_texture_compression" }, /* in progress */
+ { DEFAULT_OFF, "GL_ARB_texture_cube_map" }, /* in progress */
{ ALWAYS_ENABLED, "GL_ARB_tranpose_matrix" },
{ ALWAYS_ENABLED, "GL_EXT_abgr" },
{ DEFAULT_ON, "GL_EXT_blend_color" },
+ { DEFAULT_ON, "GL_EXT_blend_func_separate" },
{ DEFAULT_ON, "GL_EXT_blend_logic_op" },
{ DEFAULT_ON, "GL_EXT_blend_minmax" },
{ DEFAULT_ON, "GL_EXT_blend_subtract" },
{ DEFAULT_ON, "GL_EXT_clip_volume_hint" },
+ { DEFAULT_OFF, "GL_EXT_convolution" }, /* in progress */
{ DEFAULT_ON, "GL_EXT_compiled_vertex_array" },
+ { DEFAULT_ON, "GL_EXT_histogram" },
{ DEFAULT_ON, "GL_EXT_paletted_texture" },
{ DEFAULT_ON, "GL_EXT_point_parameters" },
{ ALWAYS_ENABLED, "GL_EXT_polygon_offset" },
@@ -65,6 +70,7 @@ static struct { int enabled; const char *name; } default_extensions[] = {
{ DEFAULT_ON, "GL_EXT_shared_texture_palette" },
{ ALWAYS_ENABLED, "GL_EXT_stencil_wrap" },
{ DEFAULT_ON, "GL_EXT_texture3D" },
+ { DEFAULT_OFF, "GL_EXT_texture_compression_s3tc" },
{ DEFAULT_OFF, "GL_EXT_texture_env" },
{ DEFAULT_ON, "GL_EXT_texture_env_add" },
{ ALWAYS_ENABLED, "GL_EXT_texture_object" },
@@ -81,7 +87,8 @@ static struct { int enabled; const char *name; } default_extensions[] = {
{ DEFAULT_ON, "GL_SGI_color_table" },
{ DEFAULT_ON, "GL_SGIS_pixel_texture" },
{ DEFAULT_ON, "GL_SGIS_texture_edge_clamp" },
- { DEFAULT_ON, "GL_SGIX_pixel_texture" }
+ { DEFAULT_ON, "GL_SGIX_pixel_texture" },
+ { DEFAULT_OFF, "GL_3DFX_texture_compression_FXT1" }
};
@@ -95,6 +102,10 @@ update_extension_flags( GLcontext *ctx )
ctx->Extensions.HaveTextureEnvAdd = gl_extension_is_enabled(ctx, "GL_EXT_texture_env_add");
ctx->Extensions.HaveTextureLodBias = gl_extension_is_enabled(ctx, "GL_EXT_texture_lod_bias");
ctx->Extensions.HaveHpOcclusionTest = gl_extension_is_enabled(ctx, "GL_HP_occlusion_test");
+ ctx->Extensions.HaveTextureCubeMap = gl_extension_is_enabled(ctx, "GL_ARB_texture_cube_map");
+ ctx->Extensions.HaveTextureCompression = gl_extension_is_enabled(ctx, "GL_ARB_texture_compression");
+ ctx->Extensions.HaveTextureCompressionS3TC = gl_extension_is_enabled(ctx, "GL_EXT_texture_compression_s3tc");
+ ctx->Extensions.HaveTextureCompressionFXT1 = gl_extension_is_enabled(ctx, "GL_3DFX_texture_compression_FXT1");
}
diff --git a/xc/extras/Mesa/src/feedback.c b/xc/extras/Mesa/src/feedback.c
index ed018576a..5d14e892e 100644
--- a/xc/extras/Mesa/src/feedback.c
+++ b/xc/extras/Mesa/src/feedback.c
@@ -132,7 +132,6 @@ void gl_feedback_vertex( GLcontext *ctx,
FEEDBACK_TOKEN( ctx, win[0] );
FEEDBACK_TOKEN( ctx, win[1] );
if (ctx->Feedback.Mask & FB_3D) {
- printf("FB %g\n", win[2]);
FEEDBACK_TOKEN( ctx, win[2] );
}
if (ctx->Feedback.Mask & FB_4D) {
diff --git a/xc/extras/Mesa/src/fog.c b/xc/extras/Mesa/src/fog.c
index bac41cb1d..d21711805 100644
--- a/xc/extras/Mesa/src/fog.c
+++ b/xc/extras/Mesa/src/fog.c
@@ -85,6 +85,8 @@ _mesa_Fogfv( GLenum pname, const GLfloat *params )
GET_CURRENT_CONTEXT(ctx);
GLenum m;
+ ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx, "glFog");
+
switch (pname) {
case GL_FOG_MODE:
m = (GLenum) (GLint) *params;
diff --git a/xc/extras/Mesa/src/get.c b/xc/extras/Mesa/src/get.c
index 005f88e91..21b5b639a 100644
--- a/xc/extras/Mesa/src/get.c
+++ b/xc/extras/Mesa/src/get.c
@@ -346,6 +346,9 @@ _mesa_GetBooleanv( GLenum pname, GLboolean *params )
case GL_GREEN_SCALE:
*params = FLOAT_TO_BOOL(ctx->Pixel.GreenScale);
break;
+ case GL_HISTOGRAM:
+ *params = ctx->Pixel.HistogramEnabled;
+ break;
case GL_INDEX_BITS:
*params = INT_TO_BOOL( ctx->Visual->IndexBits );
break;
@@ -567,6 +570,9 @@ _mesa_GetBooleanv( GLenum pname, GLboolean *params )
params[0] = INT_TO_BOOL(MAX_WIDTH);
params[1] = INT_TO_BOOL(MAX_HEIGHT);
break;
+ case GL_MINMAX:
+ *params = ctx->Pixel.MinMaxEnabled;
+ break;
case GL_MODELVIEW_MATRIX:
for (i=0;i<16;i++) {
params[i] = FLOAT_TO_BOOL(ctx->ModelView.m[i]);
@@ -639,7 +645,7 @@ _mesa_GetBooleanv( GLenum pname, GLboolean *params )
*params = INT_TO_BOOL(ctx->Pixel.MapStoSsize);
break;
case GL_POINT_SIZE:
- *params = FLOAT_TO_BOOL(ctx->Point.Size );
+ *params = FLOAT_TO_BOOL(ctx->Point.UserSize);
break;
case GL_POINT_SIZE_GRANULARITY:
*params = FLOAT_TO_BOOL(ctx->Const.PointSizeGranularity );
@@ -775,13 +781,13 @@ _mesa_GetBooleanv( GLenum pname, GLboolean *params )
*params = INT_TO_BOOL(ctx->Const.SubPixelBits);
break;
case GL_TEXTURE_1D:
- *params = _mesa_IsEnabled(GL_TEXTURE_1D );
+ *params = _mesa_IsEnabled(GL_TEXTURE_1D);
break;
case GL_TEXTURE_2D:
- *params = _mesa_IsEnabled(GL_TEXTURE_2D );
+ *params = _mesa_IsEnabled(GL_TEXTURE_2D);
break;
case GL_TEXTURE_3D:
- *params = _mesa_IsEnabled(GL_TEXTURE_3D );
+ *params = _mesa_IsEnabled(GL_TEXTURE_3D);
break;
case GL_TEXTURE_BINDING_1D:
*params = INT_TO_BOOL(textureUnit->CurrentD[1]->Name);
@@ -791,7 +797,7 @@ _mesa_GetBooleanv( GLenum pname, GLboolean *params )
break;
case GL_TEXTURE_BINDING_3D:
*params = INT_TO_BOOL(textureUnit->CurrentD[3]->Name);
- break;
+ break;
case GL_TEXTURE_ENV_COLOR:
{
params[0] = FLOAT_TO_BOOL(textureUnit->EnvColor[0]);
@@ -936,6 +942,7 @@ _mesa_GetBooleanv( GLenum pname, GLboolean *params )
*params = INT_TO_BOOL(ctx->Array.EdgeFlag.Stride);
break;
+ /* GL_ARB_multitexture */
case GL_MAX_TEXTURE_UNITS_ARB:
*params = ctx->Const.MaxTextureUnits;
break;
@@ -946,6 +953,51 @@ _mesa_GetBooleanv( GLenum pname, GLboolean *params )
*params = INT_TO_BOOL(GL_TEXTURE0_ARB + ctx->Array.ActiveTexture);
break;
+ /* GL_ARB_texture_cube_map */
+ case GL_TEXTURE_CUBE_MAP_ARB:
+ if (ctx->Extensions.HaveTextureCubeMap)
+ *params = _mesa_IsEnabled(GL_TEXTURE_CUBE_MAP_ARB);
+ else
+ gl_error(ctx, GL_INVALID_ENUM, "glGetBooleanv");
+ return;
+ case GL_TEXTURE_BINDING_CUBE_MAP_ARB:
+ if (ctx->Extensions.HaveTextureCubeMap)
+ *params = INT_TO_BOOL(textureUnit->CurrentCubeMap->Name);
+ else
+ gl_error(ctx, GL_INVALID_ENUM, "glGetBooleanv");
+ return;
+ case GL_MAX_CUBE_MAP_TEXTURE_SIZE_ARB:
+ if (ctx->Extensions.HaveTextureCubeMap)
+ *params = INT_TO_BOOL(ctx->Const.MaxCubeTextureSize);
+ else
+ gl_error(ctx, GL_INVALID_ENUM, "glGetBooleanv");
+ break;
+
+ /* GL_ARB_texture_compression */
+ case GL_TEXTURE_COMPRESSION_HINT_ARB:
+ if (ctx->Extensions.HaveTextureCompression) {
+ *params = INT_TO_BOOL(ctx->Hint.TextureCompression);
+ }
+ else
+ gl_error(ctx, GL_INVALID_ENUM, "glGetBooleanv");
+ break;
+ case GL_NUM_COMPRESSED_TEXTURE_FORMATS_ARB:
+ if (ctx->Extensions.HaveTextureCompression) {
+ *params = INT_TO_BOOL(ctx->Const.NumCompressedTextureFormats);
+ }
+ else
+ gl_error(ctx, GL_INVALID_ENUM, "glGetBooleanv");
+ break;
+ case GL_COMPRESSED_TEXTURE_FORMATS_ARB:
+ if (ctx->Extensions.HaveTextureCompression) {
+ GLuint i;
+ for (i = 0; i < ctx->Const.NumCompressedTextureFormats; i++)
+ params[i] = INT_TO_BOOL(ctx->Const.CompressedTextureFormats[i]);
+ }
+ else
+ gl_error(ctx, GL_INVALID_ENUM, "glGetBooleanv");
+ break;
+
/* GL_PGI_misc_hints */
case GL_STRICT_DEPTHFUNC_HINT_PGI:
*params = ENUM_TO_BOOL(GL_NICEST);
@@ -1006,7 +1058,14 @@ _mesa_GetBooleanv( GLenum pname, GLboolean *params )
/* GL_ARB_transpose_matrix */
case GL_TRANSPOSE_COLOR_MATRIX_ARB:
- /* don't have a color matrix */
+ {
+ GLfloat tm[16];
+ GLuint i;
+ gl_matrix_transposef(tm, ctx->ColorMatrix.m);
+ for (i=0;i<16;i++) {
+ params[i] = FLOAT_TO_BOOL(tm[i]);
+ }
+ }
break;
case GL_TRANSPOSE_MODELVIEW_MATRIX_ARB:
{
@@ -1089,28 +1148,60 @@ _mesa_GetBooleanv( GLenum pname, GLboolean *params )
*params = FLOAT_TO_BOOL(MAX_COLOR_STACK_DEPTH);
break;
case GL_POST_COLOR_MATRIX_RED_SCALE_SGI:
- *params = FLOAT_TO_BOOL(ctx->Pixel.PostColorMatrixRedScale);
+ *params = FLOAT_TO_BOOL(ctx->Pixel.PostColorMatrixScale[0]);
break;
case GL_POST_COLOR_MATRIX_GREEN_SCALE_SGI:
- *params = FLOAT_TO_BOOL(ctx->Pixel.PostColorMatrixGreenScale);
+ *params = FLOAT_TO_BOOL(ctx->Pixel.PostColorMatrixScale[1]);
break;
case GL_POST_COLOR_MATRIX_BLUE_SCALE_SGI:
- *params = FLOAT_TO_BOOL(ctx->Pixel.PostColorMatrixBlueScale);
+ *params = FLOAT_TO_BOOL(ctx->Pixel.PostColorMatrixScale[2]);
break;
case GL_POST_COLOR_MATRIX_ALPHA_SCALE_SGI:
- *params = FLOAT_TO_BOOL(ctx->Pixel.PostColorMatrixAlphaScale);
+ *params = FLOAT_TO_BOOL(ctx->Pixel.PostColorMatrixScale[3]);
break;
case GL_POST_COLOR_MATRIX_RED_BIAS_SGI:
- *params = FLOAT_TO_BOOL(ctx->Pixel.PostColorMatrixRedBias);
+ *params = FLOAT_TO_BOOL(ctx->Pixel.PostColorMatrixBias[0]);
break;
case GL_POST_COLOR_MATRIX_GREEN_BIAS_SGI:
- *params = FLOAT_TO_BOOL(ctx->Pixel.PostColorMatrixGreenBias);
+ *params = FLOAT_TO_BOOL(ctx->Pixel.PostColorMatrixBias[1]);
break;
case GL_POST_COLOR_MATRIX_BLUE_BIAS_SGI:
- *params = FLOAT_TO_BOOL(ctx->Pixel.PostColorMatrixBlueBias);
+ *params = FLOAT_TO_BOOL(ctx->Pixel.PostColorMatrixBias[2]);
break;
case GL_POST_COLOR_MATRIX_ALPHA_BIAS_SGI:
- *params = FLOAT_TO_BOOL(ctx->Pixel.PostColorMatrixAlphaBias);
+ *params = FLOAT_TO_BOOL(ctx->Pixel.PostColorMatrixBias[3]);
+ break;
+
+ /* GL_EXT_convolution (also in 1.2 imaging) */
+ case GL_MAX_CONVOLUTION_WIDTH:
+ *params = INT_TO_BOOL(ctx->Const.MaxConvolutionWidth);
+ break;
+ case GL_MAX_CONVOLUTION_HEIGHT:
+ *params = INT_TO_BOOL(ctx->Const.MaxConvolutionHeight);
+ break;
+ case GL_POST_CONVOLUTION_RED_SCALE_EXT:
+ *params = FLOAT_TO_BOOL(ctx->Pixel.PostConvolutionScale[0]);
+ break;
+ case GL_POST_CONVOLUTION_GREEN_SCALE_EXT:
+ *params = FLOAT_TO_BOOL(ctx->Pixel.PostConvolutionScale[1]);
+ break;
+ case GL_POST_CONVOLUTION_BLUE_SCALE_EXT:
+ *params = FLOAT_TO_BOOL(ctx->Pixel.PostConvolutionScale[2]);
+ break;
+ case GL_POST_CONVOLUTION_ALPHA_SCALE_EXT:
+ *params = FLOAT_TO_BOOL(ctx->Pixel.PostConvolutionScale[3]);
+ break;
+ case GL_POST_CONVOLUTION_RED_BIAS_EXT:
+ *params = FLOAT_TO_BOOL(ctx->Pixel.PostConvolutionBias[0]);
+ break;
+ case GL_POST_CONVOLUTION_GREEN_BIAS_EXT:
+ *params = FLOAT_TO_BOOL(ctx->Pixel.PostConvolutionBias[1]);
+ break;
+ case GL_POST_CONVOLUTION_BLUE_BIAS_EXT:
+ *params = FLOAT_TO_BOOL(ctx->Pixel.PostConvolutionBias[2]);
+ break;
+ case GL_POST_CONVOLUTION_ALPHA_BIAS_EXT:
+ *params = FLOAT_TO_BOOL(ctx->Pixel.PostConvolutionBias[2]);
break;
/* GL_SGI_color_table (also in 1.2 imaging */
@@ -1398,6 +1489,9 @@ _mesa_GetDoublev( GLenum pname, GLdouble *params )
case GL_GREEN_SCALE:
*params = (GLdouble) ctx->Pixel.GreenScale;
break;
+ case GL_HISTOGRAM:
+ *params = (GLdouble) ctx->Pixel.HistogramEnabled;
+ break;
case GL_INDEX_BITS:
*params = (GLdouble) ctx->Visual->IndexBits;
break;
@@ -1619,6 +1713,9 @@ _mesa_GetDoublev( GLenum pname, GLdouble *params )
params[0] = (GLdouble) MAX_WIDTH;
params[1] = (GLdouble) MAX_HEIGHT;
break;
+ case GL_MINMAX:
+ *params = (GLdouble) ctx->Pixel.MinMaxEnabled;
+ break;
case GL_MODELVIEW_MATRIX:
for (i=0;i<16;i++) {
params[i] = (GLdouble) ctx->ModelView.m[i];
@@ -1691,7 +1788,7 @@ _mesa_GetDoublev( GLenum pname, GLdouble *params )
*params = (GLdouble) ctx->Pixel.MapStoSsize;
break;
case GL_POINT_SIZE:
- *params = (GLdouble) ctx->Point.Size;
+ *params = (GLdouble) ctx->Point.UserSize;
break;
case GL_POINT_SIZE_GRANULARITY:
*params = (GLdouble) ctx->Const.PointSizeGranularity;
@@ -1988,6 +2085,7 @@ _mesa_GetDoublev( GLenum pname, GLdouble *params )
*params = 0.0;
break;
+ /* GL_ARB_multitexture */
case GL_MAX_TEXTURE_UNITS_ARB:
*params = (GLdouble) ctx->Const.MaxTextureUnits;
break;
@@ -1998,6 +2096,50 @@ _mesa_GetDoublev( GLenum pname, GLdouble *params )
*params = (GLdouble) (GL_TEXTURE0_ARB + ctx->Array.ActiveTexture);
break;
+ /* GL_ARB_texture_cube_map */
+ case GL_TEXTURE_CUBE_MAP_ARB:
+ if (ctx->Extensions.HaveTextureCubeMap)
+ *params = (GLdouble) _mesa_IsEnabled(GL_TEXTURE_CUBE_MAP_ARB);
+ else
+ gl_error(ctx, GL_INVALID_ENUM, "glGetDoublev");
+ return;
+ case GL_TEXTURE_BINDING_CUBE_MAP_ARB:
+ if (ctx->Extensions.HaveTextureCubeMap)
+ *params = (GLdouble) textureUnit->CurrentCubeMap->Name;
+ else
+ gl_error(ctx, GL_INVALID_ENUM, "glGetDoublev");
+ return;
+ case GL_MAX_CUBE_MAP_TEXTURE_SIZE_ARB:
+ if (ctx->Extensions.HaveTextureCubeMap)
+ *params = (GLdouble) ctx->Const.MaxCubeTextureSize;
+ else
+ gl_error(ctx, GL_INVALID_ENUM, "glGetDoublev");
+ return;
+
+ /* GL_ARB_texture_compression */
+ case GL_TEXTURE_COMPRESSION_HINT_ARB:
+ if (ctx->Extensions.HaveTextureCompression) {
+ *params = (GLdouble) ctx->Hint.TextureCompression;
+ }
+ else
+ gl_error(ctx, GL_INVALID_ENUM, "glGetDoublev");
+ break;
+ case GL_NUM_COMPRESSED_TEXTURE_FORMATS_ARB:
+ if (ctx->Extensions.HaveTextureCompression) {
+ *params = (GLdouble) ctx->Const.NumCompressedTextureFormats;
+ }
+ else
+ gl_error(ctx, GL_INVALID_ENUM, "glGetDoublev");
+ break;
+ case GL_COMPRESSED_TEXTURE_FORMATS_ARB:
+ if (ctx->Extensions.HaveTextureCompression) {
+ GLuint i;
+ for (i = 0; i < ctx->Const.NumCompressedTextureFormats; i++)
+ params[i] = (GLdouble) ctx->Const.CompressedTextureFormats[i];
+ }
+ else
+ gl_error(ctx, GL_INVALID_ENUM, "glGetDoublev");
+ break;
/* GL_PGI_misc_hints */
case GL_STRICT_DEPTHFUNC_HINT_PGI:
@@ -2059,7 +2201,14 @@ _mesa_GetDoublev( GLenum pname, GLdouble *params )
/* GL_ARB_transpose_matrix */
case GL_TRANSPOSE_COLOR_MATRIX_ARB:
- /* don't have a color matrix */
+ {
+ GLfloat tm[16];
+ GLuint i;
+ gl_matrix_transposef(tm, ctx->ColorMatrix.m);
+ for (i=0;i<16;i++) {
+ params[i] = (GLdouble) tm[i];
+ }
+ }
break;
case GL_TRANSPOSE_MODELVIEW_MATRIX_ARB:
{
@@ -2142,28 +2291,60 @@ _mesa_GetDoublev( GLenum pname, GLdouble *params )
*params = (GLdouble) MAX_COLOR_STACK_DEPTH;
break;
case GL_POST_COLOR_MATRIX_RED_SCALE_SGI:
- *params = (GLdouble) ctx->Pixel.PostColorMatrixRedScale;
+ *params = (GLdouble) ctx->Pixel.PostColorMatrixScale[0];
break;
case GL_POST_COLOR_MATRIX_GREEN_SCALE_SGI:
- *params = (GLdouble) ctx->Pixel.PostColorMatrixGreenScale;
+ *params = (GLdouble) ctx->Pixel.PostColorMatrixScale[1];
break;
case GL_POST_COLOR_MATRIX_BLUE_SCALE_SGI:
- *params = (GLdouble) ctx->Pixel.PostColorMatrixBlueScale;
+ *params = (GLdouble) ctx->Pixel.PostColorMatrixScale[2];
break;
case GL_POST_COLOR_MATRIX_ALPHA_SCALE_SGI:
- *params = (GLdouble) ctx->Pixel.PostColorMatrixAlphaScale;
+ *params = (GLdouble) ctx->Pixel.PostColorMatrixScale[3];
break;
case GL_POST_COLOR_MATRIX_RED_BIAS_SGI:
- *params = (GLdouble) ctx->Pixel.PostColorMatrixRedBias;
+ *params = (GLdouble) ctx->Pixel.PostColorMatrixBias[0];
break;
case GL_POST_COLOR_MATRIX_GREEN_BIAS_SGI:
- *params = (GLdouble) ctx->Pixel.PostColorMatrixGreenBias;
+ *params = (GLdouble) ctx->Pixel.PostColorMatrixBias[1];
break;
case GL_POST_COLOR_MATRIX_BLUE_BIAS_SGI:
- *params = (GLdouble) ctx->Pixel.PostColorMatrixBlueBias;
+ *params = (GLdouble) ctx->Pixel.PostColorMatrixBias[2];
break;
case GL_POST_COLOR_MATRIX_ALPHA_BIAS_SGI:
- *params = (GLdouble) ctx->Pixel.PostColorMatrixAlphaBias;
+ *params = (GLdouble) ctx->Pixel.PostColorMatrixBias[3];
+ break;
+
+ /* GL_EXT_convolution (also in 1.2 imaging) */
+ case GL_MAX_CONVOLUTION_WIDTH:
+ *params = (GLdouble) ctx->Const.MaxConvolutionWidth;
+ break;
+ case GL_MAX_CONVOLUTION_HEIGHT:
+ *params = (GLdouble) ctx->Const.MaxConvolutionHeight;
+ break;
+ case GL_POST_CONVOLUTION_RED_SCALE_EXT:
+ *params = (GLdouble) ctx->Pixel.PostConvolutionScale[0];
+ break;
+ case GL_POST_CONVOLUTION_GREEN_SCALE_EXT:
+ *params = (GLdouble) ctx->Pixel.PostConvolutionScale[1];
+ break;
+ case GL_POST_CONVOLUTION_BLUE_SCALE_EXT:
+ *params = (GLdouble) ctx->Pixel.PostConvolutionScale[2];
+ break;
+ case GL_POST_CONVOLUTION_ALPHA_SCALE_EXT:
+ *params = (GLdouble) ctx->Pixel.PostConvolutionScale[3];
+ break;
+ case GL_POST_CONVOLUTION_RED_BIAS_EXT:
+ *params = (GLdouble) ctx->Pixel.PostConvolutionBias[0];
+ break;
+ case GL_POST_CONVOLUTION_GREEN_BIAS_EXT:
+ *params = (GLdouble) ctx->Pixel.PostConvolutionBias[1];
+ break;
+ case GL_POST_CONVOLUTION_BLUE_BIAS_EXT:
+ *params = (GLdouble) ctx->Pixel.PostConvolutionBias[2];
+ break;
+ case GL_POST_CONVOLUTION_ALPHA_BIAS_EXT:
+ *params = (GLdouble) ctx->Pixel.PostConvolutionBias[2];
break;
/* GL_SGI_color_table (also in 1.2 imaging */
@@ -2448,6 +2629,9 @@ _mesa_GetFloatv( GLenum pname, GLfloat *params )
case GL_GREEN_SCALE:
*params = (GLfloat) ctx->Pixel.GreenScale;
break;
+ case GL_HISTOGRAM:
+ *params = (GLfloat) ctx->Pixel.HistogramEnabled;
+ break;
case GL_INDEX_BITS:
*params = (GLfloat) ctx->Visual->IndexBits;
break;
@@ -2669,6 +2853,9 @@ _mesa_GetFloatv( GLenum pname, GLfloat *params )
params[0] = (GLfloat) MAX_WIDTH;
params[1] = (GLfloat) MAX_HEIGHT;
break;
+ case GL_MINMAX:
+ *params = (GLfloat) ctx->Pixel.MinMaxEnabled;
+ break;
case GL_MODELVIEW_MATRIX:
for (i=0;i<16;i++) {
params[i] = ctx->ModelView.m[i];
@@ -2741,7 +2928,7 @@ _mesa_GetFloatv( GLenum pname, GLfloat *params )
*params = (GLfloat) ctx->Pixel.MapStoSsize;
break;
case GL_POINT_SIZE:
- *params = (GLfloat) ctx->Point.Size;
+ *params = (GLfloat) ctx->Point.UserSize;
break;
case GL_POINT_SIZE_GRANULARITY:
*params = (GLfloat) ctx->Const.PointSizeGranularity;
@@ -3040,6 +3227,7 @@ _mesa_GetFloatv( GLenum pname, GLfloat *params )
*params = 0.0;
break;
+ /* GL_ARB_multitexture */
case GL_MAX_TEXTURE_UNITS_ARB:
*params = (GLfloat) ctx->Const.MaxTextureUnits;
break;
@@ -3050,6 +3238,51 @@ _mesa_GetFloatv( GLenum pname, GLfloat *params )
*params = (GLfloat) (GL_TEXTURE0_ARB + ctx->Array.ActiveTexture);
break;
+ /* GL_ARB_texture_cube_map */
+ case GL_TEXTURE_CUBE_MAP_ARB:
+ if (ctx->Extensions.HaveTextureCubeMap)
+ *params = (GLfloat) _mesa_IsEnabled(GL_TEXTURE_CUBE_MAP_ARB);
+ else
+ gl_error(ctx, GL_INVALID_ENUM, "glGetFloatv");
+ return;
+ case GL_TEXTURE_BINDING_CUBE_MAP_ARB:
+ if (ctx->Extensions.HaveTextureCubeMap)
+ *params = (GLfloat) textureUnit->CurrentCubeMap->Name;
+ else
+ gl_error(ctx, GL_INVALID_ENUM, "glGetFloatv");
+ return;
+ case GL_MAX_CUBE_MAP_TEXTURE_SIZE_ARB:
+ if (ctx->Extensions.HaveTextureCubeMap)
+ *params = (GLfloat) ctx->Const.MaxCubeTextureSize;
+ else
+ gl_error(ctx, GL_INVALID_ENUM, "glGetFloatv");
+ return;
+
+ /* GL_ARB_texture_compression */
+ case GL_TEXTURE_COMPRESSION_HINT_ARB:
+ if (ctx->Extensions.HaveTextureCompression) {
+ *params = (GLfloat) ctx->Hint.TextureCompression;
+ }
+ else
+ gl_error(ctx, GL_INVALID_ENUM, "glGetFloatv");
+ break;
+ case GL_NUM_COMPRESSED_TEXTURE_FORMATS_ARB:
+ if (ctx->Extensions.HaveTextureCompression) {
+ *params = (GLfloat) ctx->Const.NumCompressedTextureFormats;
+ }
+ else
+ gl_error(ctx, GL_INVALID_ENUM, "glGetFloatv");
+ break;
+ case GL_COMPRESSED_TEXTURE_FORMATS_ARB:
+ if (ctx->Extensions.HaveTextureCompression) {
+ GLuint i;
+ for (i = 0; i < ctx->Const.NumCompressedTextureFormats; i++)
+ params[i] = (GLfloat) ctx->Const.CompressedTextureFormats[i];
+ }
+ else
+ gl_error(ctx, GL_INVALID_ENUM, "glGetFloatv");
+ break;
+
/* GL_PGI_misc_hints */
case GL_STRICT_DEPTHFUNC_HINT_PGI:
*params = ENUM_TO_FLOAT(GL_NICEST);
@@ -3110,7 +3343,7 @@ _mesa_GetFloatv( GLenum pname, GLfloat *params )
/* GL_ARB_transpose_matrix */
case GL_TRANSPOSE_COLOR_MATRIX_ARB:
- /* don't have a color matrix */
+ gl_matrix_transposef(params, ctx->ColorMatrix.m);
break;
case GL_TRANSPOSE_MODELVIEW_MATRIX_ARB:
gl_matrix_transposef(params, ctx->ModelView.m);
@@ -3172,28 +3405,60 @@ _mesa_GetFloatv( GLenum pname, GLfloat *params )
*params = (GLfloat) MAX_COLOR_STACK_DEPTH;
break;
case GL_POST_COLOR_MATRIX_RED_SCALE_SGI:
- *params = ctx->Pixel.PostColorMatrixRedScale;
+ *params = ctx->Pixel.PostColorMatrixScale[0];
break;
case GL_POST_COLOR_MATRIX_GREEN_SCALE_SGI:
- *params = ctx->Pixel.PostColorMatrixGreenScale;
+ *params = ctx->Pixel.PostColorMatrixScale[1];
break;
case GL_POST_COLOR_MATRIX_BLUE_SCALE_SGI:
- *params = ctx->Pixel.PostColorMatrixBlueScale;
+ *params = ctx->Pixel.PostColorMatrixScale[2];
break;
case GL_POST_COLOR_MATRIX_ALPHA_SCALE_SGI:
- *params = ctx->Pixel.PostColorMatrixAlphaScale;
+ *params = ctx->Pixel.PostColorMatrixScale[3];
break;
case GL_POST_COLOR_MATRIX_RED_BIAS_SGI:
- *params = ctx->Pixel.PostColorMatrixRedBias;
+ *params = ctx->Pixel.PostColorMatrixBias[0];
break;
case GL_POST_COLOR_MATRIX_GREEN_BIAS_SGI:
- *params = ctx->Pixel.PostColorMatrixGreenBias;
+ *params = ctx->Pixel.PostColorMatrixBias[1];
break;
case GL_POST_COLOR_MATRIX_BLUE_BIAS_SGI:
- *params = ctx->Pixel.PostColorMatrixBlueBias;
+ *params = ctx->Pixel.PostColorMatrixBias[2];
break;
case GL_POST_COLOR_MATRIX_ALPHA_BIAS_SGI:
- *params = ctx->Pixel.PostColorMatrixAlphaBias;
+ *params = ctx->Pixel.PostColorMatrixBias[3];
+ break;
+
+ /* GL_EXT_convolution (also in 1.2 imaging) */
+ case GL_MAX_CONVOLUTION_WIDTH:
+ *params = (GLfloat) ctx->Const.MaxConvolutionWidth;
+ break;
+ case GL_MAX_CONVOLUTION_HEIGHT:
+ *params = (GLfloat) ctx->Const.MaxConvolutionHeight;
+ break;
+ case GL_POST_CONVOLUTION_RED_SCALE_EXT:
+ *params = ctx->Pixel.PostConvolutionScale[0];
+ break;
+ case GL_POST_CONVOLUTION_GREEN_SCALE_EXT:
+ *params = ctx->Pixel.PostConvolutionScale[1];
+ break;
+ case GL_POST_CONVOLUTION_BLUE_SCALE_EXT:
+ *params = ctx->Pixel.PostConvolutionScale[2];
+ break;
+ case GL_POST_CONVOLUTION_ALPHA_SCALE_EXT:
+ *params = ctx->Pixel.PostConvolutionScale[3];
+ break;
+ case GL_POST_CONVOLUTION_RED_BIAS_EXT:
+ *params = ctx->Pixel.PostConvolutionBias[0];
+ break;
+ case GL_POST_CONVOLUTION_GREEN_BIAS_EXT:
+ *params = ctx->Pixel.PostConvolutionBias[1];
+ break;
+ case GL_POST_CONVOLUTION_BLUE_BIAS_EXT:
+ *params = ctx->Pixel.PostConvolutionBias[2];
+ break;
+ case GL_POST_CONVOLUTION_ALPHA_BIAS_EXT:
+ *params = ctx->Pixel.PostConvolutionBias[2];
break;
/* GL_SGI_color_table (also in 1.2 imaging */
@@ -3482,6 +3747,9 @@ _mesa_GetIntegerv( GLenum pname, GLint *params )
case GL_GREEN_SCALE:
*params = (GLint) ctx->Pixel.GreenScale;
break;
+ case GL_HISTOGRAM:
+ *params = (GLint) ctx->Pixel.HistogramEnabled;
+ break;
case GL_INDEX_BITS:
*params = (GLint) ctx->Visual->IndexBits;
break;
@@ -3703,6 +3971,9 @@ _mesa_GetIntegerv( GLenum pname, GLint *params )
params[0] = (GLint) MAX_WIDTH;
params[1] = (GLint) MAX_HEIGHT;
break;
+ case GL_MINMAX:
+ *params = (GLint) ctx->Pixel.MinMaxEnabled;
+ break;
case GL_MODELVIEW_MATRIX:
for (i=0;i<16;i++) {
params[i] = (GLint) ctx->ModelView.m[i];
@@ -3775,7 +4046,7 @@ _mesa_GetIntegerv( GLenum pname, GLint *params )
*params = ctx->Pixel.MapStoSsize;
break;
case GL_POINT_SIZE:
- *params = (GLint) ctx->Point.Size;
+ *params = (GLint) ctx->Point.UserSize;
break;
case GL_POINT_SIZE_GRANULARITY:
*params = (GLint) ctx->Const.PointSizeGranularity;
@@ -4072,6 +4343,7 @@ _mesa_GetIntegerv( GLenum pname, GLint *params )
*params = 0;
break;
+ /* GL_ARB_multitexture */
case GL_MAX_TEXTURE_UNITS_ARB:
*params = ctx->Const.MaxTextureUnits;
break;
@@ -4082,6 +4354,51 @@ _mesa_GetIntegerv( GLenum pname, GLint *params )
*params = GL_TEXTURE0_ARB + ctx->Array.ActiveTexture;
break;
+ /* GL_ARB_texture_cube_map */
+ case GL_TEXTURE_CUBE_MAP_ARB:
+ if (ctx->Extensions.HaveTextureCubeMap)
+ *params = (GLint) _mesa_IsEnabled(GL_TEXTURE_CUBE_MAP_ARB);
+ else
+ gl_error(ctx, GL_INVALID_ENUM, "glGetIntegerv");
+ return;
+ case GL_TEXTURE_BINDING_CUBE_MAP_ARB:
+ if (ctx->Extensions.HaveTextureCubeMap)
+ *params = textureUnit->CurrentCubeMap->Name;
+ else
+ gl_error(ctx, GL_INVALID_ENUM, "glGetIntegerv");
+ return;
+ case GL_MAX_CUBE_MAP_TEXTURE_SIZE_ARB:
+ if (ctx->Extensions.HaveTextureCubeMap)
+ *params = ctx->Const.MaxCubeTextureSize;
+ else
+ gl_error(ctx, GL_INVALID_ENUM, "glGetIntegerv");
+ return;
+
+ /* GL_ARB_texture_compression */
+ case GL_TEXTURE_COMPRESSION_HINT_ARB:
+ if (ctx->Extensions.HaveTextureCompression) {
+ *params = (GLint) ctx->Hint.TextureCompression;
+ }
+ else
+ gl_error(ctx, GL_INVALID_ENUM, "glGetIntegerv");
+ break;
+ case GL_NUM_COMPRESSED_TEXTURE_FORMATS_ARB:
+ if (ctx->Extensions.HaveTextureCompression) {
+ *params = (GLint) ctx->Const.NumCompressedTextureFormats;
+ }
+ else
+ gl_error(ctx, GL_INVALID_ENUM, "glGetIntegerv");
+ break;
+ case GL_COMPRESSED_TEXTURE_FORMATS_ARB:
+ if (ctx->Extensions.HaveTextureCompression) {
+ GLuint i;
+ for (i = 0; i < ctx->Const.NumCompressedTextureFormats; i++)
+ params[i] = (GLint) ctx->Const.CompressedTextureFormats[i];
+ }
+ else
+ gl_error(ctx, GL_INVALID_ENUM, "glGetIntegerv");
+ break;
+
/* GL_PGI_misc_hints */
case GL_STRICT_DEPTHFUNC_HINT_PGI:
*params = (GL_NICEST);
@@ -4091,10 +4408,10 @@ _mesa_GetIntegerv( GLenum pname, GLint *params )
break;
case GL_STRICT_SCISSOR_HINT_PGI:
case GL_FULL_STIPPLE_HINT_PGI:
- *params = (GL_TRUE);
+ *params = GL_TRUE;
break;
case GL_CONSERVE_MEMORY_HINT_PGI:
- *params = (GL_FALSE);
+ *params = GL_FALSE;
break;
case GL_ALWAYS_FAST_HINT_PGI:
*params = (ctx->Hint.AllowDrawWin == GL_TRUE &&
@@ -4126,7 +4443,7 @@ _mesa_GetIntegerv( GLenum pname, GLint *params )
*params = GL_DONT_CARE;
break;
case GL_BACK_NORMALS_HINT_PGI:
- *params = (GL_TRUE);
+ *params = GL_TRUE;
break;
case GL_NATIVE_GRAPHICS_HANDLE_PGI:
*params = 0;
@@ -4142,7 +4459,14 @@ _mesa_GetIntegerv( GLenum pname, GLint *params )
/* GL_ARB_transpose_matrix */
case GL_TRANSPOSE_COLOR_MATRIX_ARB:
- /* don't have a color matrix */
+ {
+ GLfloat tm[16];
+ GLuint i;
+ gl_matrix_transposef(tm, ctx->ColorMatrix.m);
+ for (i=0;i<16;i++) {
+ params[i] = (GLint) tm[i];
+ }
+ }
break;
case GL_TRANSPOSE_MODELVIEW_MATRIX_ARB:
{
@@ -4225,28 +4549,60 @@ _mesa_GetIntegerv( GLenum pname, GLint *params )
*params = MAX_COLOR_STACK_DEPTH;
break;
case GL_POST_COLOR_MATRIX_RED_SCALE_SGI:
- *params = (GLint) ctx->Pixel.PostColorMatrixRedScale;
+ *params = (GLint) ctx->Pixel.PostColorMatrixScale[0];
break;
case GL_POST_COLOR_MATRIX_GREEN_SCALE_SGI:
- *params = (GLint) ctx->Pixel.PostColorMatrixGreenScale;
+ *params = (GLint) ctx->Pixel.PostColorMatrixScale[1];
break;
case GL_POST_COLOR_MATRIX_BLUE_SCALE_SGI:
- *params = (GLint) ctx->Pixel.PostColorMatrixBlueScale;
+ *params = (GLint) ctx->Pixel.PostColorMatrixScale[2];
break;
case GL_POST_COLOR_MATRIX_ALPHA_SCALE_SGI:
- *params = (GLint) ctx->Pixel.PostColorMatrixAlphaScale;
+ *params = (GLint) ctx->Pixel.PostColorMatrixScale[3];
break;
case GL_POST_COLOR_MATRIX_RED_BIAS_SGI:
- *params = (GLint) ctx->Pixel.PostColorMatrixRedBias;
+ *params = (GLint) ctx->Pixel.PostColorMatrixBias[0];
break;
case GL_POST_COLOR_MATRIX_GREEN_BIAS_SGI:
- *params = (GLint) ctx->Pixel.PostColorMatrixGreenBias;
+ *params = (GLint) ctx->Pixel.PostColorMatrixBias[1];
break;
case GL_POST_COLOR_MATRIX_BLUE_BIAS_SGI:
- *params = (GLint) ctx->Pixel.PostColorMatrixBlueBias;
+ *params = (GLint) ctx->Pixel.PostColorMatrixBias[2];
break;
case GL_POST_COLOR_MATRIX_ALPHA_BIAS_SGI:
- *params = (GLint) ctx->Pixel.PostColorMatrixAlphaBias;
+ *params = (GLint) ctx->Pixel.PostColorMatrixBias[3];
+ break;
+
+ /* GL_EXT_convolution (also in 1.2 imaging) */
+ case GL_MAX_CONVOLUTION_WIDTH:
+ *params = ctx->Const.MaxConvolutionWidth;
+ break;
+ case GL_MAX_CONVOLUTION_HEIGHT:
+ *params = ctx->Const.MaxConvolutionHeight;
+ break;
+ case GL_POST_CONVOLUTION_RED_SCALE_EXT:
+ *params = (GLint) ctx->Pixel.PostConvolutionScale[0];
+ break;
+ case GL_POST_CONVOLUTION_GREEN_SCALE_EXT:
+ *params = (GLint) ctx->Pixel.PostConvolutionScale[1];
+ break;
+ case GL_POST_CONVOLUTION_BLUE_SCALE_EXT:
+ *params = (GLint) ctx->Pixel.PostConvolutionScale[2];
+ break;
+ case GL_POST_CONVOLUTION_ALPHA_SCALE_EXT:
+ *params = (GLint) ctx->Pixel.PostConvolutionScale[3];
+ break;
+ case GL_POST_CONVOLUTION_RED_BIAS_EXT:
+ *params = (GLint) ctx->Pixel.PostConvolutionBias[0];
+ break;
+ case GL_POST_CONVOLUTION_GREEN_BIAS_EXT:
+ *params = (GLint) ctx->Pixel.PostConvolutionBias[1];
+ break;
+ case GL_POST_CONVOLUTION_BLUE_BIAS_EXT:
+ *params = (GLint) ctx->Pixel.PostConvolutionBias[2];
+ break;
+ case GL_POST_CONVOLUTION_ALPHA_BIAS_EXT:
+ *params = (GLint) ctx->Pixel.PostConvolutionBias[2];
break;
/* GL_SGI_color_table (also in 1.2 imaging */
diff --git a/xc/extras/Mesa/src/glapi.c b/xc/extras/Mesa/src/glapi.c
index 75e778f10..c3ac458cb 100644
--- a/xc/extras/Mesa/src/glapi.c
+++ b/xc/extras/Mesa/src/glapi.c
@@ -593,7 +593,7 @@ static struct name_address_offset static_functions[] = {
{ "glPushClientAttrib", (GLvoid *) glPushClientAttrib, _gloffset_PushClientAttrib },
/* 1.2 */
#ifdef GL_VERSION_1_2
-#define NAME(X) X
+#define NAME(X) (GLvoid *) X
#else
#define NAME(X) NotImplemented
#endif
@@ -637,9 +637,9 @@ static struct name_address_offset static_functions[] = {
{ "glCopyTexSubImage3D", (GLvoid *) NAME(glCopyTexSubImage3D), _gloffset_CopyTexSubImage3D },
#undef NAME
- /* GL_ARB_multitexture */
+ /* ARB 1. GL_ARB_multitexture */
#ifdef GL_ARB_multitexture
-#define NAME(X) X
+#define NAME(X) (GLvoid *) X
#else
#define NAME(X) NotImplemented
#endif
@@ -679,9 +679,9 @@ static struct name_address_offset static_functions[] = {
{ "glMultiTexCoord4svARB", (GLvoid *) NAME(glMultiTexCoord4svARB), _gloffset_MultiTexCoord4svARB },
#undef NAME
- /* GL_ARB_transpose_matrix */
+ /* ARB 3. GL_ARB_transpose_matrix */
#ifdef GL_ARB_transpose_matrix
-#define NAME(X) X
+#define NAME(X) (GLvoid *) X
#else
#define NAME(X) NotImplemented
#endif
@@ -691,503 +691,763 @@ static struct name_address_offset static_functions[] = {
{ "glMultTransposeMatrixfARB", (GLvoid *) NAME(glMultTransposeMatrixfARB), _gloffset_MultTransposeMatrixfARB },
#undef NAME
- /* GL_ARB_multisample */
+ /* ARB 5. GL_ARB_multisample */
#ifdef GL_ARB_multisample
-#define NAME(X) X
+#define NAME(X) (GLvoid *) X
#else
-#define NAME(X) NotImplemented
+#define NAME(X) (GLvoid *) NotImplemented
#endif
- { "glSampleCoverageARB", (GLvoid *) NAME(glSampleCoverageARB), _gloffset_SampleCoverageARB },
- { "glSamplePassARB", (GLvoid *) NAME(glSamplePassARB), _gloffset_SamplePassARB },
+ { "glSamplePassARB", NAME(glSamplePassARB), _gloffset_SamplePassARB },
+ { "glSampleCoverageARB", NAME(glSampleCoverageARB), _gloffset_SampleCoverageARB },
#undef NAME
+ /* ARB 12. GL_ARB_texture_compression */
+#if 000
+#if defined(GL_ARB_texture_compression) && defined(_gloffset_CompressedTexImage3DARB)
+#define NAME(X) (GLvoid *) X
+#else
+#define NAME(X) (GLvoid *) NotImplemented
+#endif
+ { "glCompressedTexImage3DARB", NAME(glCompressedTexImage3DARB), _gloffset_CompressedTexImage3DARB },
+ { "glCompressedTexImage2DARB", NAME(glCompressedTexImage2DARB), _gloffset_CompressedTexImage2DARB },
+ { "glCompressedTexImage1DARB", NAME(glCompressedTexImage1DARB), _gloffset_CompressedTexImage1DARB },
+ { "glCompressedTexSubImage3DARB", NAME(glCompressedTexSubImage3DARB), _gloffset_CompressedTexSubImage3DARB },
+ { "glCompressedTexSubImage2DARB", NAME(glCompressedTexSubImage2DARB), _gloffset_CompressedTexSubImage2DARB },
+ { "glCompressedTexSubImage1DARB", NAME(glCompressedTexSubImage1DARB), _gloffset_CompressedTexSubImage1DARB },
+ { "glGetCompressedTexImageARB", NAME(glGetCompressedTexImageARB), _gloffset_GetCompressedTexImageARB },
+#undef NAME
+#endif
+
/* 2. GL_EXT_blend_color */
#ifdef GL_EXT_blend_color
-#define NAME(X) X
+#define NAME(X) (GLvoid *) X
#else
-#define NAME(X) NotImplemented
+#define NAME(X) (GLvoid *) NotImplemented
#endif
- { "glBlendColorEXT", (GLvoid *) NAME(glBlendColorEXT), _gloffset_BlendColor },
+ { "glBlendColorEXT", NAME(glBlendColorEXT), _gloffset_BlendColor },
#undef NAME
/* 3. GL_EXT_polygon_offset */
#ifdef GL_EXT_polygon_offset
-#define NAME(X) X
+#define NAME(X) (GLvoid *) X
#else
-#define NAME(X) NotImplemented
+#define NAME(X) (GLvoid *) NotImplemented
#endif
- { "glPolygonOffsetEXT", (GLvoid *) NAME(glPolygonOffsetEXT), _gloffset_PolygonOffsetEXT },
+ { "glPolygonOffsetEXT", NAME(glPolygonOffsetEXT), _gloffset_PolygonOffsetEXT },
#undef NAME
/* 6. GL_EXT_texture3D */
#ifdef GL_EXT_texture3D
-#define NAME(X) X
+#define NAME(X) (GLvoid *) X
#else
-#define NAME(X) NotImplemented
+#define NAME(X) (GLvoid *) NotImplemented
#endif
- { "glCopyTexSubImage3DEXT", (GLvoid *) NAME(glCopyTexSubImage3DEXT), _gloffset_CopyTexSubImage3D },
- { "glTexImage3DEXT", (GLvoid *) NAME(glTexImage3DEXT), _gloffset_TexImage3D },
- { "glTexSubImage3DEXT", (GLvoid *) NAME(glTexSubImage3DEXT), _gloffset_TexSubImage3D },
+ { "glCopyTexSubImage3DEXT", NAME(glCopyTexSubImage3DEXT), _gloffset_CopyTexSubImage3D },
+ { "glTexImage3DEXT", NAME(glTexImage3DEXT), _gloffset_TexImage3D },
+ { "glTexSubImage3DEXT", NAME(glTexSubImage3DEXT), _gloffset_TexSubImage3D },
#undef NAME
/* 7. GL_SGI_texture_filter4 */
#ifdef GL_SGI_texture_filter4
-#define NAME(X) X
+#define NAME(X) (GLvoid *) X
#else
-#define NAME(X) NotImplemented
+#define NAME(X) (GLvoid *) NotImplemented
#endif
- { "glGetTexFilterFuncSGIS", (GLvoid *) NAME(glGetTexFilterFuncSGIS), _gloffset_GetTexFilterFuncSGIS },
- { "glTexFilterFuncSGIS", (GLvoid *) NAME(glTexFilterFuncSGIS), _gloffset_TexFilterFuncSGIS },
+ { "glGetTexFilterFuncSGIS", NAME(glGetTexFilterFuncSGIS), _gloffset_GetTexFilterFuncSGIS },
+ { "glTexFilterFuncSGIS", NAME(glTexFilterFuncSGIS), _gloffset_TexFilterFuncSGIS },
#undef NAME
/* 9. GL_EXT_subtexture */
#ifdef GL_EXT_subtexture
-#define NAME(X) X
+#define NAME(X) (GLvoid *) X
#else
-#define NAME(X) NotImplemented
+#define NAME(X) (GLvoid *) NotImplemented
#endif
- { "glTexSubImage1DEXT", (GLvoid *) NAME(glTexSubImage1DEXT), _gloffset_TexSubImage1D },
- { "glTexSubImage2DEXT", (GLvoid *) NAME(glTexSubImage2DEXT), _gloffset_TexSubImage2D },
+ { "glTexSubImage1DEXT", NAME(glTexSubImage1DEXT), _gloffset_TexSubImage1D },
+ { "glTexSubImage2DEXT", NAME(glTexSubImage2DEXT), _gloffset_TexSubImage2D },
#undef NAME
/* 10. GL_EXT_copy_texture */
#ifdef GL_EXT_copy_texture
-#define NAME(X) X
+#define NAME(X) (GLvoid *) X
#else
-#define NAME(X) NotImplemented
+#define NAME(X) (GLvoid *) NotImplemented
#endif
- { "glCopyTexImage1DEXT", (GLvoid *) NAME(glCopyTexImage1DEXT), _gloffset_CopyTexImage1D },
- { "glCopyTexImage2DEXT", (GLvoid *) NAME(glCopyTexImage2DEXT), _gloffset_CopyTexImage2D },
- { "glCopyTexSubImage1DEXT", (GLvoid *) NAME(glCopyTexSubImage1DEXT), _gloffset_CopyTexSubImage1D },
- { "glCopyTexSubImage2DEXT", (GLvoid *) NAME(glCopyTexSubImage2DEXT), _gloffset_CopyTexSubImage2D },
+ { "glCopyTexImage1DEXT", NAME(glCopyTexImage1DEXT), _gloffset_CopyTexImage1D },
+ { "glCopyTexImage2DEXT", NAME(glCopyTexImage2DEXT), _gloffset_CopyTexImage2D },
+ { "glCopyTexSubImage1DEXT", NAME(glCopyTexSubImage1DEXT), _gloffset_CopyTexSubImage1D },
+ { "glCopyTexSubImage2DEXT", NAME(glCopyTexSubImage2DEXT), _gloffset_CopyTexSubImage2D },
#undef NAME
/* 11. GL_EXT_histogram */
#ifdef GL_EXT_histogram
-#define NAME(X) X
+#define NAME(X) (GLvoid *) X
#else
-#define NAME(X) NotImplemented
+#define NAME(X) (GLvoid *) NotImplemented
#endif
- { "glGetHistogramEXT", (GLvoid *) NAME(glGetHistogramEXT), _gloffset_GetHistogramEXT },
- { "glGetHistogramParameterfvEXT", (GLvoid *) NAME(glGetHistogramParameterfvEXT), _gloffset_GetHistogramParameterfvEXT },
- { "glGetHistogramParameterivEXT", (GLvoid *) NAME(glGetHistogramParameterivEXT), _gloffset_GetHistogramParameterivEXT },
- { "glGetMinmaxEXT", (GLvoid *) NAME(glGetMinmaxEXT), _gloffset_GetMinmaxEXT },
- { "glGetMinmaxParameterfvEXT", (GLvoid *) NAME(glGetMinmaxParameterfvEXT), _gloffset_GetMinmaxParameterfvEXT },
- { "glGetMinmaxParameterivEXT", (GLvoid *) NAME(glGetMinmaxParameterivEXT), _gloffset_GetMinmaxParameterivEXT },
- { "glHistogramEXT", (GLvoid *) NAME(glHistogramEXT), _gloffset_Histogram },
- { "glMinmaxEXT", (GLvoid *) NAME(glMinmaxEXT), _gloffset_Minmax },
- { "glResetHistogramEXT", (GLvoid *) NAME(glResetHistogramEXT), _gloffset_ResetHistogram },
- { "glResetMinmaxEXT", (GLvoid *) NAME(glResetMinmaxEXT), _gloffset_ResetMinmax },
+ { "glGetHistogramEXT", NAME(glGetHistogramEXT), _gloffset_GetHistogramEXT },
+ { "glGetHistogramParameterfvEXT", NAME(glGetHistogramParameterfvEXT), _gloffset_GetHistogramParameterfvEXT },
+ { "glGetHistogramParameterivEXT", NAME(glGetHistogramParameterivEXT), _gloffset_GetHistogramParameterivEXT },
+ { "glGetMinmaxEXT", NAME(glGetMinmaxEXT), _gloffset_GetMinmaxEXT },
+ { "glGetMinmaxParameterfvEXT", NAME(glGetMinmaxParameterfvEXT), _gloffset_GetMinmaxParameterfvEXT },
+ { "glGetMinmaxParameterivEXT", NAME(glGetMinmaxParameterivEXT), _gloffset_GetMinmaxParameterivEXT },
+ { "glHistogramEXT", NAME(glHistogramEXT), _gloffset_Histogram },
+ { "glMinmaxEXT", NAME(glMinmaxEXT), _gloffset_Minmax },
+ { "glResetHistogramEXT", NAME(glResetHistogramEXT), _gloffset_ResetHistogram },
+ { "glResetMinmaxEXT", NAME(glResetMinmaxEXT), _gloffset_ResetMinmax },
#undef NAME
/* 12. GL_EXT_convolution */
#ifdef GL_EXT_convolution
-#define NAME(X) X
+#define NAME(X) (GLvoid *) X
#else
-#define NAME(X) NotImplemented
+#define NAME(X) (GLvoid *) NotImplemented
#endif
- { "glConvolutionFilter1DEXT", (GLvoid *) NAME(glConvolutionFilter1DEXT), _gloffset_ConvolutionFilter1D },
- { "glConvolutionFilter2DEXT", (GLvoid *) NAME(glConvolutionFilter2DEXT), _gloffset_ConvolutionFilter2D },
- { "glConvolutionParameterfEXT", (GLvoid *) NAME(glConvolutionParameterfEXT), _gloffset_ConvolutionParameterf },
- { "glConvolutionParameterfvEXT", (GLvoid *) NAME(glConvolutionParameterfvEXT), _gloffset_ConvolutionParameterfv },
- { "glConvolutionParameteriEXT", (GLvoid *) NAME(glConvolutionParameteriEXT), _gloffset_ConvolutionParameteri },
- { "glConvolutionParameterivEXT", (GLvoid *) NAME(glConvolutionParameterivEXT), _gloffset_ConvolutionParameteriv },
- { "glCopyConvolutionFilter1DEXT", (GLvoid *) NAME(glCopyConvolutionFilter1DEXT), _gloffset_CopyConvolutionFilter1D },
- { "glCopyConvolutionFilter2DEXT", (GLvoid *) NAME(glCopyConvolutionFilter2DEXT), _gloffset_CopyConvolutionFilter2D },
- { "glGetConvolutionFilterEXT", (GLvoid *) NAME(glGetConvolutionFilterEXT), _gloffset_GetConvolutionFilterEXT },
- { "glGetConvolutionParameterivEXT", (GLvoid *) NAME(glGetConvolutionParameterivEXT), _gloffset_GetConvolutionParameterivEXT },
- { "glGetConvolutionParameterfvEXT", (GLvoid *) NAME(glGetConvolutionParameterfvEXT), _gloffset_GetConvolutionParameterfvEXT },
- { "glGetSeparableFilterEXT", (GLvoid *) NAME(glGetSeparableFilterEXT), _gloffset_GetSeparableFilterEXT },
- { "glSeparableFilter2DEXT", (GLvoid *) NAME(glSeparableFilter2DEXT), _gloffset_SeparableFilter2D },
+ { "glConvolutionFilter1DEXT", NAME(glConvolutionFilter1DEXT), _gloffset_ConvolutionFilter1D },
+ { "glConvolutionFilter2DEXT", NAME(glConvolutionFilter2DEXT), _gloffset_ConvolutionFilter2D },
+ { "glConvolutionParameterfEXT", NAME(glConvolutionParameterfEXT), _gloffset_ConvolutionParameterf },
+ { "glConvolutionParameterfvEXT", NAME(glConvolutionParameterfvEXT), _gloffset_ConvolutionParameterfv },
+ { "glConvolutionParameteriEXT", NAME(glConvolutionParameteriEXT), _gloffset_ConvolutionParameteri },
+ { "glConvolutionParameterivEXT", NAME(glConvolutionParameterivEXT), _gloffset_ConvolutionParameteriv },
+ { "glCopyConvolutionFilter1DEXT", NAME(glCopyConvolutionFilter1DEXT), _gloffset_CopyConvolutionFilter1D },
+ { "glCopyConvolutionFilter2DEXT", NAME(glCopyConvolutionFilter2DEXT), _gloffset_CopyConvolutionFilter2D },
+ { "glGetConvolutionFilterEXT", NAME(glGetConvolutionFilterEXT), _gloffset_GetConvolutionFilterEXT },
+ { "glGetConvolutionParameterivEXT", NAME(glGetConvolutionParameterivEXT), _gloffset_GetConvolutionParameterivEXT },
+ { "glGetConvolutionParameterfvEXT", NAME(glGetConvolutionParameterfvEXT), _gloffset_GetConvolutionParameterfvEXT },
+ { "glGetSeparableFilterEXT", NAME(glGetSeparableFilterEXT), _gloffset_GetSeparableFilterEXT },
+ { "glSeparableFilter2DEXT", NAME(glSeparableFilter2DEXT), _gloffset_SeparableFilter2D },
#undef NAME
/* 14. GL_SGI_color_table */
#ifdef GL_SGI_color_table
-#define NAME(X) X
+#define NAME(X) (GLvoid *) X
#else
-#define NAME(X) NotImplemented
+#define NAME(X) (GLvoid *) NotImplemented
#endif
- { "glColorTableSGI", (GLvoid *) NAME(glColorTableSGI), _gloffset_ColorTable },
- { "glColorTableParameterfvSGI", (GLvoid *) NAME(glColorTableParameterfvSGI), _gloffset_ColorTableParameterfv },
- { "glColorTableParameterivSGI", (GLvoid *) NAME(glColorTableParameterivSGI), _gloffset_ColorTableParameteriv },
- { "glCopyColorTableSGI", (GLvoid *) NAME(glCopyColorTableSGI), _gloffset_CopyColorTable },
- { "glGetColorTableSGI", (GLvoid *) NAME(glGetColorTableSGI), _gloffset_GetColorTableSGI },
- { "glGetColorTableParameterfvSGI", (GLvoid *) NAME(glGetColorTableParameterfvSGI), _gloffset_GetColorTableParameterfvSGI },
- { "glGetColorTableParameterivSGI", (GLvoid *) NAME(glGetColorTableParameterivSGI), _gloffset_GetColorTableParameterivSGI },
+ { "glColorTableSGI", NAME(glColorTableSGI), _gloffset_ColorTable },
+ { "glColorTableParameterfvSGI", NAME(glColorTableParameterfvSGI), _gloffset_ColorTableParameterfv },
+ { "glColorTableParameterivSGI", NAME(glColorTableParameterivSGI), _gloffset_ColorTableParameteriv },
+ { "glCopyColorTableSGI", NAME(glCopyColorTableSGI), _gloffset_CopyColorTable },
+ { "glGetColorTableSGI", NAME(glGetColorTableSGI), _gloffset_GetColorTableSGI },
+ { "glGetColorTableParameterfvSGI", NAME(glGetColorTableParameterfvSGI), _gloffset_GetColorTableParameterfvSGI },
+ { "glGetColorTableParameterivSGI", NAME(glGetColorTableParameterivSGI), _gloffset_GetColorTableParameterivSGI },
#undef NAME
/* 15. GL_SGIS_pixel_texture */
#ifdef GL_SGIS_pixel_texture
-#define NAME(X) X
+#define NAME(X) (GLvoid *) X
#else
-#define NAME(X) NotImplemented
+#define NAME(X) (GLvoid *) NotImplemented
#endif
- { "glPixelTexGenParameterfSGIS", (GLvoid *) NAME(glPixelTexGenParameterfSGIS), _gloffset_PixelTexGenParameterfSGIS },
- { "glPixelTexGenParameteriSGIS", (GLvoid *) NAME(glPixelTexGenParameteriSGIS), _gloffset_PixelTexGenParameteriSGIS },
- { "glGetPixelTexGenParameterfvSGIS", (GLvoid *) NAME(glGetPixelTexGenParameterfvSGIS), _gloffset_GetPixelTexGenParameterfvSGIS },
- { "glGetPixelTexGenParameterivSGIS", (GLvoid *) NAME(glGetPixelTexGenParameterivSGIS), _gloffset_GetPixelTexGenParameterivSGIS },
+ { "glPixelTexGenParameterfSGIS", NAME(glPixelTexGenParameterfSGIS), _gloffset_PixelTexGenParameterfSGIS },
+ { "glPixelTexGenParameteriSGIS", NAME(glPixelTexGenParameteriSGIS), _gloffset_PixelTexGenParameteriSGIS },
+ { "glGetPixelTexGenParameterfvSGIS", NAME(glGetPixelTexGenParameterfvSGIS), _gloffset_GetPixelTexGenParameterfvSGIS },
+ { "glGetPixelTexGenParameterivSGIS", NAME(glGetPixelTexGenParameterivSGIS), _gloffset_GetPixelTexGenParameterivSGIS },
#undef NAME
/* 16. GL_SGIS_texture4D */
#ifdef GL_SGIS_texture4D
-#define NAME(X) X
+#define NAME(X) (GLvoid *) X
#else
-#define NAME(X) NotImplemented
+#define NAME(X) (GLvoid *) NotImplemented
#endif
- { "glTexImage4DSGIS", (GLvoid *) NAME(glTexImage4DSGIS), _gloffset_TexImage4DSGIS },
- { "glTexSubImage4DSGIS", (GLvoid *) NAME(glTexSubImage4DSGIS), _gloffset_TexSubImage4DSGIS },
+ { "glTexImage4DSGIS", NAME(glTexImage4DSGIS), _gloffset_TexImage4DSGIS },
+ { "glTexSubImage4DSGIS", NAME(glTexSubImage4DSGIS), _gloffset_TexSubImage4DSGIS },
#undef NAME
/* 20. GL_EXT_texture_object */
#ifdef GL_EXT_texture_object
-#define NAME(X) X
+#define NAME(X) (GLvoid *) X
#else
-#define NAME(X) NotImplemented
+#define NAME(X) (GLvoid *) NotImplemented
#endif
- { "glAreTexturesResidentEXT", (GLvoid *) NAME(glAreTexturesResidentEXT), _gloffset_AreTexturesResidentEXT },
- { "glBindTextureEXT", (GLvoid *) NAME(glBindTextureEXT), _gloffset_BindTexture },
- { "glDeleteTexturesEXT", (GLvoid *) NAME(glDeleteTexturesEXT), _gloffset_DeleteTextures },
- { "glGenTexturesEXT", (GLvoid *) NAME(glGenTexturesEXT), _gloffset_GenTexturesEXT },
- { "glIsTextureEXT", (GLvoid *) NAME(glIsTextureEXT), _gloffset_IsTextureEXT },
- { "glPrioritizeTexturesEXT", (GLvoid *) NAME(glPrioritizeTexturesEXT), _gloffset_PrioritizeTextures },
+ { "glAreTexturesResidentEXT", NAME(glAreTexturesResidentEXT), _gloffset_AreTexturesResidentEXT },
+ { "glBindTextureEXT", NAME(glBindTextureEXT), _gloffset_BindTexture },
+ { "glDeleteTexturesEXT", NAME(glDeleteTexturesEXT), _gloffset_DeleteTextures },
+ { "glGenTexturesEXT", NAME(glGenTexturesEXT), _gloffset_GenTexturesEXT },
+ { "glIsTextureEXT", NAME(glIsTextureEXT), _gloffset_IsTextureEXT },
+ { "glPrioritizeTexturesEXT", NAME(glPrioritizeTexturesEXT), _gloffset_PrioritizeTextures },
#undef NAME
/* 21. GL_SGIS_detail_texture */
#ifdef GL_SGIS_detail_texture
-#define NAME(X) X
+#define NAME(X) (GLvoid *) X
#else
-#define NAME(X) NotImplemented
+#define NAME(X) (GLvoid *) NotImplemented
#endif
- { "glDetailTexFuncSGIS", (GLvoid *) NAME(glDetailTexFuncSGIS), _gloffset_DetailTexFuncSGIS },
- { "glGetDetailTexFuncSGIS", (GLvoid *) NAME(glGetDetailTexFuncSGIS), _gloffset_GetDetailTexFuncSGIS },
+ { "glDetailTexFuncSGIS", NAME(glDetailTexFuncSGIS), _gloffset_DetailTexFuncSGIS },
+ { "glGetDetailTexFuncSGIS", NAME(glGetDetailTexFuncSGIS), _gloffset_GetDetailTexFuncSGIS },
#undef NAME
/* 22. GL_SGIS_sharpen_texture */
#ifdef GL_SGIS_sharpen_texture
-#define NAME(X) X
+#define NAME(X) (GLvoid *) X
#else
-#define NAME(X) NotImplemented
+#define NAME(X) (GLvoid *) NotImplemented
#endif
- { "glGetSharpenTexFuncSGIS", (GLvoid *) NAME(glGetSharpenTexFuncSGIS), _gloffset_GetSharpenTexFuncSGIS },
- { "glSharpenTexFuncSGIS", (GLvoid *) NAME(glSharpenTexFuncSGIS), _gloffset_SharpenTexFuncSGIS },
+ { "glGetSharpenTexFuncSGIS", NAME(glGetSharpenTexFuncSGIS), _gloffset_GetSharpenTexFuncSGIS },
+ { "glSharpenTexFuncSGIS", NAME(glSharpenTexFuncSGIS), _gloffset_SharpenTexFuncSGIS },
#undef NAME
/* 25. GL_SGIS_multisample */
#ifdef GL_SGIS_multisample
-#define NAME(X) X
+#define NAME(X) (GLvoid *) X
#else
-#define NAME(X) NotImplemented
+#define NAME(X) (GLvoid *) NotImplemented
#endif
- { "glSampleMaskSGIS", (GLvoid *) NAME(glSampleMaskSGIS), _gloffset_SampleMaskSGIS },
- { "glSamplePatternSGIS", (GLvoid *) NAME(glSamplePatternSGIS), _gloffset_SamplePatternSGIS },
+ { "glSampleMaskSGIS", NAME(glSampleMaskSGIS), _gloffset_SampleMaskSGIS },
+ { "glSamplePatternSGIS", NAME(glSamplePatternSGIS), _gloffset_SamplePatternSGIS },
#undef NAME
/* 30. GL_EXT_vertex_array */
#ifdef GL_EXT_vertex_array
-#define NAME(X) X
+#define NAME(X) (GLvoid *) X
#else
-#define NAME(X) NotImplemented
+#define NAME(X) (GLvoid *) NotImplemented
#endif
- { "glArrayElementEXT", (GLvoid *) NAME(glArrayElementEXT), _gloffset_ArrayElement },
- { "glColorPointerEXT", (GLvoid *) NAME(glColorPointerEXT), _gloffset_ColorPointerEXT },
- { "glDrawArraysEXT", (GLvoid *) NAME(glDrawArraysEXT), _gloffset_DrawArrays },
- { "glEdgeFlagPointerEXT", (GLvoid *) NAME(glEdgeFlagPointerEXT), _gloffset_EdgeFlagPointerEXT },
- { "glGetPointervEXT", (GLvoid *) NAME(glGetPointervEXT), _gloffset_GetPointerv },
- { "glIndexPointerEXT", (GLvoid *) NAME(glIndexPointerEXT), _gloffset_IndexPointerEXT },
- { "glNormalPointerEXT", (GLvoid *) NAME(glNormalPointerEXT), _gloffset_NormalPointerEXT },
- { "glTexCoordPointerEXT", (GLvoid *) NAME(glTexCoordPointerEXT), _gloffset_TexCoordPointerEXT },
- { "glVertexPointerEXT", (GLvoid *) NAME(glVertexPointerEXT), _gloffset_VertexPointerEXT },
+ { "glArrayElementEXT", NAME(glArrayElementEXT), _gloffset_ArrayElement },
+ { "glColorPointerEXT", NAME(glColorPointerEXT), _gloffset_ColorPointerEXT },
+ { "glDrawArraysEXT", NAME(glDrawArraysEXT), _gloffset_DrawArrays },
+ { "glEdgeFlagPointerEXT", NAME(glEdgeFlagPointerEXT), _gloffset_EdgeFlagPointerEXT },
+ { "glGetPointervEXT", NAME(glGetPointervEXT), _gloffset_GetPointerv },
+ { "glIndexPointerEXT", NAME(glIndexPointerEXT), _gloffset_IndexPointerEXT },
+ { "glNormalPointerEXT", NAME(glNormalPointerEXT), _gloffset_NormalPointerEXT },
+ { "glTexCoordPointerEXT", NAME(glTexCoordPointerEXT), _gloffset_TexCoordPointerEXT },
+ { "glVertexPointerEXT", NAME(glVertexPointerEXT), _gloffset_VertexPointerEXT },
#undef NAME
/* 37. GL_EXT_blend_minmax */
#ifdef GL_EXT_blend_minmax
-#define NAME(X) X
+#define NAME(X) (GLvoid *) X
#else
-#define NAME(X) NotImplemented
+#define NAME(X) (GLvoid *) NotImplemented
#endif
- { "glBlendEquationEXT", (GLvoid *) NAME(glBlendEquationEXT), _gloffset_BlendEquation },
+ { "glBlendEquationEXT", NAME(glBlendEquationEXT), _gloffset_BlendEquation },
#undef NAME
/* 52. GL_SGIX_sprite */
#ifdef GL_SGIX_sprite
-#define NAME(X) X
+#define NAME(X) (GLvoid *) X
#else
-#define NAME(X) NotImplemented
+#define NAME(X) (GLvoid *) NotImplemented
#endif
- { "glSpriteParameterfSGIX", (GLvoid *) NAME(glSpriteParameterfSGIX), _gloffset_SpriteParameterfSGIX },
- { "glSpriteParameterfvSGIX", (GLvoid *) NAME(glSpriteParameterfvSGIX), _gloffset_SpriteParameterfvSGIX },
- { "glSpriteParameteriSGIX", (GLvoid *) NAME(glSpriteParameteriSGIX), _gloffset_SpriteParameteriSGIX },
- { "glSpriteParameterivSGIX", (GLvoid *) NAME(glSpriteParameterivSGIX), _gloffset_SpriteParameterivSGIX },
+ { "glSpriteParameterfSGIX", NAME(glSpriteParameterfSGIX), _gloffset_SpriteParameterfSGIX },
+ { "glSpriteParameterfvSGIX", NAME(glSpriteParameterfvSGIX), _gloffset_SpriteParameterfvSGIX },
+ { "glSpriteParameteriSGIX", NAME(glSpriteParameteriSGIX), _gloffset_SpriteParameteriSGIX },
+ { "glSpriteParameterivSGIX", NAME(glSpriteParameterivSGIX), _gloffset_SpriteParameterivSGIX },
#undef NAME
/* 54. GL_EXT_point_parameters */
#ifdef GL_EXT_point_parameters
-#define NAME(X) X
+#define NAME(X) (GLvoid *) X
#else
-#define NAME(X) NotImplemented
+#define NAME(X) (GLvoid *) NotImplemented
#endif
- { "glPointParameterfEXT", (GLvoid *) NAME(glPointParameterfEXT), _gloffset_PointParameterfEXT },
- { "glPointParameterfvEXT", (GLvoid *) NAME(glPointParameterfvEXT), _gloffset_PointParameterfvEXT },
+ { "glPointParameterfEXT", NAME(glPointParameterfEXT), _gloffset_PointParameterfEXT },
+ { "glPointParameterfvEXT", NAME(glPointParameterfvEXT), _gloffset_PointParameterfvEXT },
+ { "glPointParameterfSGIS", NAME(glPointParameterfSGIS), _gloffset_PointParameterfEXT },
+ { "glPointParameterfvSGIS", NAME(glPointParameterfvSGIS), _gloffset_PointParameterfvEXT },
#undef NAME
/* 55. GL_SGIX_instruments */
#ifdef GL_SGIX_instruments
-#define NAME(X) X
+#define NAME(X) (GLvoid *) X
#else
-#define NAME(X) NotImplemented
+#define NAME(X) (GLvoid *) NotImplemented
#endif
- { "glInstrumentsBufferSGIX", (GLvoid *) NAME(glInstrumentsBufferSGIX), _gloffset_InstrumentsBufferSGIX },
- { "glStartInstrumentsSGIX", (GLvoid *) NAME(glStartInstrumentsSGIX), _gloffset_StartInstrumentsSGIX },
- { "glStopInstrumentsSGIX", (GLvoid *) NAME(glStopInstrumentsSGIX), _gloffset_StopInstrumentsSGIX },
- { "glReadInstrumentsSGIX", (GLvoid *) NAME(glReadInstrumentsSGIX), _gloffset_ReadInstrumentsSGIX },
- { "glPollInstrumentsSGIX", (GLvoid *) NAME(glPollInstrumentsSGIX), _gloffset_PollInstrumentsSGIX },
- { "glGetInstrumentsSGIX", (GLvoid *) NAME(glGetInstrumentsSGIX), _gloffset_GetInstrumentsSGIX },
+ { "glInstrumentsBufferSGIX", NAME(glInstrumentsBufferSGIX), _gloffset_InstrumentsBufferSGIX },
+ { "glStartInstrumentsSGIX", NAME(glStartInstrumentsSGIX), _gloffset_StartInstrumentsSGIX },
+ { "glStopInstrumentsSGIX", NAME(glStopInstrumentsSGIX), _gloffset_StopInstrumentsSGIX },
+ { "glReadInstrumentsSGIX", NAME(glReadInstrumentsSGIX), _gloffset_ReadInstrumentsSGIX },
+ { "glPollInstrumentsSGIX", NAME(glPollInstrumentsSGIX), _gloffset_PollInstrumentsSGIX },
+ { "glGetInstrumentsSGIX", NAME(glGetInstrumentsSGIX), _gloffset_GetInstrumentsSGIX },
#undef NAME
/* 57. GL_SGIX_framezoom */
#ifdef GL_SGIX_framezoom
-#define NAME(X) X
+#define NAME(X) (GLvoid *) X
#else
-#define NAME(X) NotImplemented
+#define NAME(X) (GLvoid *) NotImplemented
#endif
- { "glFrameZoomSGIX", (GLvoid *) NAME(glFrameZoomSGIX), _gloffset_FrameZoomSGIX },
+ { "glFrameZoomSGIX", NAME(glFrameZoomSGIX), _gloffset_FrameZoomSGIX },
#undef NAME
/* 58. GL_SGIX_tag_sample_buffer */
#ifdef GL_SGIX_tag_sample_buffer
-#define NAME(X) X
+#define NAME(X) (GLvoid *) X
#else
-#define NAME(X) NotImplemented
+#define NAME(X) (GLvoid *) NotImplemented
#endif
- { "glTagSampleBufferSGIX", (GLvoid *) NAME(glTagSampleBufferSGIX), _gloffset_TagSampleBufferSGIX },
+ { "glTagSampleBufferSGIX", NAME(glTagSampleBufferSGIX), _gloffset_TagSampleBufferSGIX },
#undef NAME
/* 60. GL_SGIX_reference_plane */
#ifdef GL_SGIX_reference_plane
-#define NAME(X) X
+#define NAME(X) (GLvoid *) X
#else
-#define NAME(X) NotImplemented
+#define NAME(X) (GLvoid *) NotImplemented
#endif
- { "glReferencePlaneSGIX", (GLvoid *) NAME(glReferencePlaneSGIX), _gloffset_ReferencePlaneSGIX },
+ { "glReferencePlaneSGIX", NAME(glReferencePlaneSGIX), _gloffset_ReferencePlaneSGIX },
#undef NAME
/* 61. GL_SGIX_flush_raster */
#ifdef GL_SGIX_flush_raster
-#define NAME(X) X
+#define NAME(X) (GLvoid *) X
#else
-#define NAME(X) NotImplemented
+#define NAME(X) (GLvoid *) NotImplemented
#endif
- { "glFlushRasterSGIX", (GLvoid *) NAME(glFlushRasterSGIX), _gloffset_FlushRasterSGIX },
+ { "glFlushRasterSGIX", NAME(glFlushRasterSGIX), _gloffset_FlushRasterSGIX },
#undef NAME
/* 66. GL_HP_image_transform */
#if 0
#ifdef GL_HP_image_transform
-#define NAME(X) X
+#define NAME(X) (GLvoid *) X
#else
-#define NAME(X) NotImplemented
+#define NAME(X) (GLvoid *) NotImplemented
#endif
- { "glGetImageTransformParameterfvHP", (GLvoid *) NAME(glGetImageTransformParameterfvHP), _gloffset_GetImageTransformParameterfvHP },
- { "glGetImageTransformParameterivHP", (GLvoid *) NAME(glGetImageTransformParameterivHP), _gloffset_GetImageTransformParameterivHP },
- { "glImageTransformParameterfHP", (GLvoid *) NAME(glImageTransformParameterfHP), _gloffset_ImageTransformParameterfHP },
- { "glImageTransformParameterfvHP", (GLvoid *) NAME(glImageTransformParameterfvHP), _gloffset_ImageTransformParameterfvHP },
- { "glImageTransformParameteriHP", (GLvoid *) NAME(glImageTransformParameteriHP), _gloffset_ImageTransformParameteriHP },
- { "glImageTransformParameterivHP", (GLvoid *) NAME(glImageTransformParameterivHP), _gloffset_ImageTransformParameterivHP },
+ { "glGetImageTransformParameterfvHP", NAME(glGetImageTransformParameterfvHP), _gloffset_GetImageTransformParameterfvHP },
+ { "glGetImageTransformParameterivHP", NAME(glGetImageTransformParameterivHP), _gloffset_GetImageTransformParameterivHP },
+ { "glImageTransformParameterfHP", NAME(glImageTransformParameterfHP), _gloffset_ImageTransformParameterfHP },
+ { "glImageTransformParameterfvHP", NAME(glImageTransformParameterfvHP), _gloffset_ImageTransformParameterfvHP },
+ { "glImageTransformParameteriHP", NAME(glImageTransformParameteriHP), _gloffset_ImageTransformParameteriHP },
+ { "glImageTransformParameterivHP", NAME(glImageTransformParameterivHP), _gloffset_ImageTransformParameterivHP },
#undef NAME
#endif
/* 74. GL_EXT_color_subtable */
#ifdef GL_EXT_color_subtable
-#define NAME(X) X
+#define NAME(X) (GLvoid *) X
#else
-#define NAME(X) NotImplemented
+#define NAME(X) (GLvoid *) NotImplemented
#endif
- { "glColorSubTableEXT", (GLvoid *) NAME(glColorSubTableEXT), _gloffset_ColorSubTable },
- { "glCopyColorSubTableEXT", (GLvoid *) NAME(glCopyColorSubTableEXT), _gloffset_CopyColorSubTable },
+ { "glColorSubTableEXT", NAME(glColorSubTableEXT), _gloffset_ColorSubTable },
+ { "glCopyColorSubTableEXT", NAME(glCopyColorSubTableEXT), _gloffset_CopyColorSubTable },
#undef NAME
/* 77. GL_PGI_misc_hints */
#ifdef GL_PGI_misc_hints
-#define NAME(X) X
+#define NAME(X) (GLvoid *) X
#else
-#define NAME(X) NotImplemented
+#define NAME(X) (GLvoid *) NotImplemented
#endif
- { "glHintPGI", (GLvoid *) NAME(glHintPGI), _gloffset_HintPGI },
+ { "glHintPGI", NAME(glHintPGI), _gloffset_HintPGI },
#undef NAME
/* 78. GL_EXT_paletted_texture */
#ifdef GL_EXT_paletted_texture
-#define NAME(X) X
+#define NAME(X) (GLvoid *) X
#else
-#define NAME(X) NotImplemented
+#define NAME(X) (GLvoid *) NotImplemented
#endif
- { "glColorTableEXT", (GLvoid *) NAME(glColorTableEXT), _gloffset_ColorTable },
- { "glGetColorTableEXT", (GLvoid *) NAME(glGetColorTableEXT), _gloffset_GetColorTable },
- { "glGetColorTableParameterfvEXT", (GLvoid *) NAME(glGetColorTableParameterfvEXT), _gloffset_GetColorTableParameterfv },
- { "glGetColorTableParameterivEXT", (GLvoid *) NAME(glGetColorTableParameterivEXT), _gloffset_GetColorTableParameteriv },
+ { "glColorTableEXT", NAME(glColorTableEXT), _gloffset_ColorTable },
+ { "glGetColorTableEXT", NAME(glGetColorTableEXT), _gloffset_GetColorTable },
+ { "glGetColorTableParameterfvEXT", NAME(glGetColorTableParameterfvEXT), _gloffset_GetColorTableParameterfv },
+ { "glGetColorTableParameterivEXT", NAME(glGetColorTableParameterivEXT), _gloffset_GetColorTableParameteriv },
#undef NAME
/* 80. GL_SGIX_list_priority */
#ifdef GL_SGIX_list_priority
-#define NAME(X) X
+#define NAME(X) (GLvoid *) X
#else
-#define NAME(X) NotImplemented
+#define NAME(X) (GLvoid *) NotImplemented
#endif
- { "glGetListParameterfvSGIX", (GLvoid *) NAME(glGetListParameterfvSGIX), _gloffset_GetListParameterfvSGIX },
- { "glGetListParameterivSGIX", (GLvoid *) NAME(glGetListParameterivSGIX), _gloffset_GetListParameterivSGIX },
- { "glListParameterfSGIX", (GLvoid *) NAME(glListParameterfSGIX), _gloffset_ListParameterfSGIX },
- { "glListParameterfvSGIX", (GLvoid *) NAME(glListParameterfvSGIX), _gloffset_ListParameterfvSGIX },
- { "glListParameteriSGIX", (GLvoid *) NAME(glListParameteriSGIX), _gloffset_ListParameteriSGIX },
- { "glListParameterivSGIX", (GLvoid *) NAME(glListParameterivSGIX), _gloffset_ListParameterivSGIX },
+ { "glGetListParameterfvSGIX", NAME(glGetListParameterfvSGIX), _gloffset_GetListParameterfvSGIX },
+ { "glGetListParameterivSGIX", NAME(glGetListParameterivSGIX), _gloffset_GetListParameterivSGIX },
+ { "glListParameterfSGIX", NAME(glListParameterfSGIX), _gloffset_ListParameterfSGIX },
+ { "glListParameterfvSGIX", NAME(glListParameterfvSGIX), _gloffset_ListParameterfvSGIX },
+ { "glListParameteriSGIX", NAME(glListParameteriSGIX), _gloffset_ListParameteriSGIX },
+ { "glListParameterivSGIX", NAME(glListParameterivSGIX), _gloffset_ListParameterivSGIX },
#undef NAME
/* 94. GL_EXT_index_material */
#ifdef GL_EXT_index_material
-#define NAME(X) X
+#define NAME(X) (GLvoid *) X
#else
-#define NAME(X) NotImplemented
+#define NAME(X) (GLvoid *) NotImplemented
#endif
- { "glIndexMaterialEXT", (GLvoid *) NAME(glIndexMaterialEXT), _gloffset_IndexMaterialEXT },
+ { "glIndexMaterialEXT", NAME(glIndexMaterialEXT), _gloffset_IndexMaterialEXT },
#undef NAME
/* 95. GL_EXT_index_func */
#ifdef GL_EXT_index_func
-#define NAME(X) X
+#define NAME(X) (GLvoid *) X
#else
-#define NAME(X) NotImplemented
+#define NAME(X) (GLvoid *) NotImplemented
#endif
- { "glIndexFuncEXT", (GLvoid *) NAME(glIndexFuncEXT), _gloffset_IndexFuncEXT },
+ { "glIndexFuncEXT", NAME(glIndexFuncEXT), _gloffset_IndexFuncEXT },
#undef NAME
/* 97. GL_EXT_compiled_vertex_array */
#ifdef GL_EXT_compiled_vertex_array
-#define NAME(X) X
+#define NAME(X) (GLvoid *) X
#else
-#define NAME(X) NotImplemented
+#define NAME(X) (GLvoid *) NotImplemented
#endif
- { "glLockArraysEXT", (GLvoid *) NAME(glLockArraysEXT), _gloffset_LockArraysEXT },
- { "glUnlockArraysEXT", (GLvoid *) NAME(glUnlockArraysEXT), _gloffset_UnlockArraysEXT },
+ { "glLockArraysEXT", NAME(glLockArraysEXT), _gloffset_LockArraysEXT },
+ { "glUnlockArraysEXT", NAME(glUnlockArraysEXT), _gloffset_UnlockArraysEXT },
#undef NAME
/* 98. GL_EXT_cull_vertex */
#ifdef GL_EXT_cull_vertex
-#define NAME(X) X
+#define NAME(X) (GLvoid *) X
#else
-#define NAME(X) NotImplemented
+#define NAME(X) (GLvoid *) NotImplemented
#endif
- { "glCullParameterfvEXT", (GLvoid *) NAME(glCullParameterfvEXT), _gloffset_CullParameterfvEXT },
- { "glCullParameterdvEXT", (GLvoid *) NAME(glCullParameterdvEXT), _gloffset_CullParameterdvEXT },
+ { "glCullParameterfvEXT", NAME(glCullParameterfvEXT), _gloffset_CullParameterfvEXT },
+ { "glCullParameterdvEXT", NAME(glCullParameterdvEXT), _gloffset_CullParameterdvEXT },
#undef NAME
/* 102. GL_SGIX_fragment_lighting */
#ifdef GL_SGIX_fragment_lighting
-#define NAME(X) X
+#define NAME(X) (GLvoid *) X
#else
-#define NAME(X) NotImplemented
+#define NAME(X) (GLvoid *) NotImplemented
+#endif
+ { "glFragmentColorMaterialSGIX", NAME(glFragmentColorMaterialSGIX), _gloffset_FragmentColorMaterialSGIX },
+ { "glFragmentLightfSGIX", NAME(glFragmentLightfSGIX), _gloffset_FragmentLightfSGIX },
+ { "glFragmentLightfvSGIX", NAME(glFragmentLightfvSGIX), _gloffset_FragmentLightfvSGIX },
+ { "glFragmentLightiSGIX", NAME(glFragmentLightiSGIX), _gloffset_FragmentLightiSGIX },
+ { "glFragmentLightivSGIX", NAME(glFragmentLightivSGIX), _gloffset_FragmentLightivSGIX },
+ { "glFragmentLightModelfSGIX", NAME(glFragmentLightModelfSGIX), _gloffset_FragmentLightModelfSGIX },
+ { "glFragmentLightModelfvSGIX", NAME(glFragmentLightModelfvSGIX), _gloffset_FragmentLightModelfvSGIX },
+ { "glFragmentLightModeliSGIX", NAME(glFragmentLightModeliSGIX), _gloffset_FragmentLightModeliSGIX },
+ { "glFragmentLightModelivSGIX", NAME(glFragmentLightModelivSGIX), _gloffset_FragmentLightModelivSGIX },
+ { "glFragmentMaterialfSGIX", NAME(glFragmentMaterialfSGIX), _gloffset_FragmentMaterialfSGIX },
+ { "glFragmentMaterialfvSGIX", NAME(glFragmentMaterialfvSGIX), _gloffset_FragmentMaterialfvSGIX },
+ { "glFragmentMaterialiSGIX", NAME(glFragmentMaterialiSGIX), _gloffset_FragmentMaterialiSGIX },
+ { "glFragmentMaterialivSGIX", NAME(glFragmentMaterialivSGIX), _gloffset_FragmentMaterialivSGIX },
+ { "glGetFragmentLightfvSGIX", NAME(glGetFragmentLightfvSGIX), _gloffset_GetFragmentLightfvSGIX },
+ { "glGetFragmentLightivSGIX", NAME(glGetFragmentLightivSGIX), _gloffset_GetFragmentLightivSGIX },
+ { "glGetFragmentMaterialfvSGIX", NAME(glGetFragmentMaterialfvSGIX), _gloffset_GetFragmentMaterialfvSGIX },
+ { "glGetFragmentMaterialivSGIX", NAME(glGetFragmentMaterialivSGIX), _gloffset_GetFragmentMaterialivSGIX },
+ { "glLightEnviSGIX", NAME(glLightEnviSGIX), _gloffset_LightEnviSGIX },
+#undef NAME
+
+ /* 112. GL_EXT_draw_range_elements */
+#if 000
+#ifdef GL_EXT_draw_range_elements
+#define NAME(X) (GLvoid *) X
+#else
+#define NAME(X) (GLvoid *) NotImplemented
+#endif
+ { "glDrawRangeElementsEXT", NAME(glDrawRangeElementsEXT), _gloffset_DrawRangeElementsEXT },
+#undef NAME
+#endif
+
+ /* 117. GL_EXT_light_texture */
+#if 000
+#ifdef GL_EXT_light_texture
+#define NAME(X) (GLvoid *) X
+#else
+#define NAME(X) (GLvoid *) NotImplemented
+#endif
+ { "glApplyTextureEXT", NAME(glApplyTextureEXT), _gloffset_ApplyTextureEXT },
+ { "glTextureLightEXT", NAME(glTextureLightEXT), _gloffset_TextureLightEXT },
+ { "glTextureMaterialEXT", NAME(glTextureMaterialEXT), _gloffset_TextureMaterialEXT },
+#undef NAME
+
+ /* 135. GL_INTEL_texture_scissor */
+#ifdef GL_INTEL_texture_scissor
+#define NAME(X) (GLvoid *) X
+#else
+#define NAME(X) (GLvoid *) NotImplemented
#endif
- { "glFragmentColorMaterialSGIX", (GLvoid *) NAME(glFragmentColorMaterialSGIX), _gloffset_FragmentColorMaterialSGIX },
- { "glFragmentLightfSGIX", (GLvoid *) NAME(glFragmentLightfSGIX), _gloffset_FragmentLightfSGIX },
- { "glFragmentLightfvSGIX", (GLvoid *) NAME(glFragmentLightfvSGIX), _gloffset_FragmentLightfvSGIX },
- { "glFragmentLightiSGIX", (GLvoid *) NAME(glFragmentLightiSGIX), _gloffset_FragmentLightiSGIX },
- { "glFragmentLightivSGIX", (GLvoid *) NAME(glFragmentLightivSGIX), _gloffset_FragmentLightivSGIX },
- { "glFragmentLightModelfSGIX", (GLvoid *) NAME(glFragmentLightModelfSGIX), _gloffset_FragmentLightModelfSGIX },
- { "glFragmentLightModelfvSGIX", (GLvoid *) NAME(glFragmentLightModelfvSGIX), _gloffset_FragmentLightModelfvSGIX },
- { "glFragmentLightModeliSGIX", (GLvoid *) NAME(glFragmentLightModeliSGIX), _gloffset_FragmentLightModeliSGIX },
- { "glFragmentLightModelivSGIX", (GLvoid *) NAME(glFragmentLightModelivSGIX), _gloffset_FragmentLightModelivSGIX },
- { "glFragmentMaterialfSGIX", (GLvoid *) NAME(glFragmentMaterialfSGIX), _gloffset_FragmentMaterialfSGIX },
- { "glFragmentMaterialfvSGIX", (GLvoid *) NAME(glFragmentMaterialfvSGIX), _gloffset_FragmentMaterialfvSGIX },
- { "glFragmentMaterialiSGIX", (GLvoid *) NAME(glFragmentMaterialiSGIX), _gloffset_FragmentMaterialiSGIX },
- { "glFragmentMaterialivSGIX", (GLvoid *) NAME(glFragmentMaterialivSGIX), _gloffset_FragmentMaterialivSGIX },
- { "glGetFragmentLightfvSGIX", (GLvoid *) NAME(glGetFragmentLightfvSGIX), _gloffset_GetFragmentLightfvSGIX },
- { "glGetFragmentLightivSGIX", (GLvoid *) NAME(glGetFragmentLightivSGIX), _gloffset_GetFragmentLightivSGIX },
- { "glGetFragmentMaterialfvSGIX", (GLvoid *) NAME(glGetFragmentMaterialfvSGIX), _gloffset_GetFragmentMaterialfvSGIX },
- { "glGetFragmentMaterialivSGIX", (GLvoid *) NAME(glGetFragmentMaterialivSGIX), _gloffset_GetFragmentMaterialivSGIX },
- { "glLightEnviSGIX", (GLvoid *) NAME(glLightEnviSGIX), _gloffset_LightEnviSGIX },
+ { "glTexScissorINTEL", NAME(glTexScissorINTEL), _gloffset_TexScissorINTEL },
+ { "glTexScissorFuncINTEL", NAME(glTexScissorFuncINTEL), _gloffset_glTexScissorFuncINTEL },
#undef NAME
+ /* 136. GL_INTEL_parallel_arrays */
+#ifdef GL_INTEL_parallel_arrays
+#define NAME(X) (GLvoid *) X
+#else
+#define NAME(X) (GLvoid *) NotImplemented
+#endif
+ { "glVertexPointervINTEL", NAME(glVertexPointervINTEL), _gloffset_VertexPointervINTEL },
+ { "glNormalPointervINTEL", NAME(glNormalPointervINTEL), _gloffset_NormalPointervINTEL },
+ { "glColorPointervINTEL", NAME(glColorPointervINTEL), _gloffset_ColorPointervINTEL },
+ { "glTexCoordPointervINTEL", NAME(glTexCoordPointervINTEL), _gloffset_glxCoordPointervINTEL },
+#undef NAME
+#endif
+
+ /* 138. GL_EXT_pixel_transform */
+#if 000
+#ifdef GL_EXT_pixel_transform
+#define NAME(X) (GLvoid *) X
+#else
+#define NAME(X) (GLvoid *) NotImplemented
+#endif
+ { "glPixelTransformParameteriEXT", NAME(glPixelTransformParameteriEXT), _gloffset_PixelTransformParameteriEXT },
+ { "glPixelTransformParameterfEXT", NAME(glPixelTransformParameterfEXT), _gloffset_PixelTransformParameterfEXT },
+ { "glPixelTransformParameterivEXT", NAME(glPixelTransformParameterivEXT), _gloffset_PixelTransformParameterivEXT },
+ { "glPixelTransformParameterfvEXT", NAME(glPixelTransformParameterfvEXT), _gloffset_PixelTransformParameterfvEXT },
+ { "glGetPixelTransformParameterivEXT", NAME(glGetPixelTransformParameterivEXT), _gloffset_GetPixelTransformParameterivEXT },
+ { "glGetPixelTransformParameterfvEXT", NAME(glGetPixelTransformParameterfvEXT), _gloffset_GetPixelTransformParameterfvEXT },
+#undef NAME
+
+ /* 145. GL_EXT_secondary_color */
+#ifdef GL_EXT_secondary_color
+#define NAME(X) (GLvoid *) X
+#else
+#define NAME(X) (GLvoid *) NotImplemented
+#endif
+ { "glSecondaryColor3bEXT", NAME(glSecondaryColor3bEXT), _gloffset_SecondaryColor3bEXT },
+ { "glSecondaryColor3dEXT", NAME(glSecondaryColor3dEXT), _gloffset_SecondaryColor3dEXT },
+ { "glSecondaryColor3fEXT", NAME(glSecondaryColor3fEXT), _gloffset_SecondaryColor3fEXT },
+ { "glSecondaryColor3iEXT", NAME(glSecondaryColor3iEXT), _gloffset_SecondaryColor3iEXT },
+ { "glSecondaryColor3sEXT", NAME(glSecondaryColor3sEXT), _gloffset_SecondaryColor3sEXT },
+ { "glSecondaryColor3ubEXT", NAME(glSecondaryColor3ubEXT), _gloffset_SecondaryColor3ubEXT },
+ { "glSecondaryColor3uiEXT", NAME(glSecondaryColor3uiEXT), _gloffset_SecondaryColor3uiEXT },
+ { "glSecondaryColor3usEXT", NAME(glSecondaryColor3usEXT), _gloffset_SecondaryColor3usEXT },
+ { "glSecondaryColor4bEXT", NAME(glSecondaryColor4bEXT), _gloffset_SecondaryColor4bEXT },
+ { "glSecondaryColor4dEXT", NAME(glSecondaryColor4dEXT), _gloffset_SecondaryColor4dEXT },
+ { "glSecondaryColor4fEXT", NAME(glSecondaryColor4fEXT), _gloffset_SecondaryColor4fEXT },
+ { "glSecondaryColor4iEXT", NAME(glSecondaryColor4iEXT), _gloffset_SecondaryColor4iEXT },
+ { "glSecondaryColor4sEXT", NAME(glSecondaryColor4sEXT), _gloffset_SecondaryColor4sEXT },
+ { "glSecondaryColor4ubEXT", NAME(glSecondaryColor4ubEXT), _gloffset_SecondaryColor4ubEXT },
+ { "glSecondaryColor4uiEXT", NAME(glSecondaryColor4uiEXT), _gloffset_SecondaryColor4uiEXT },
+ { "glSecondaryColor4usEXT", NAME(glSecondaryColor4usEXT), _gloffset_SecondaryColor4usEXT },
+ { "glSecondaryColor3bvEXT", NAME(glSecondaryColor3bvEXT), _gloffset_SecondaryColor3bvEXT },
+ { "glSecondaryColor3dvEXT", NAME(glSecondaryColor3dvEXT), _gloffset_SecondaryColor3dvEXT },
+ { "glSecondaryColor3fvEXT", NAME(glSecondaryColor3fvEXT), _gloffset_SecondaryColor3fvEXT },
+ { "glSecondaryColor3ivEXT", NAME(glSecondaryColor3ivEXT), _gloffset_SecondaryColor3ivEXT },
+ { "glSecondaryColor3svEXT", NAME(glSecondaryColor3svEXT), _gloffset_SecondaryColor3svEXT },
+ { "glSecondaryColor3ubvEXT", NAME(glSecondaryColor3ubvEXT), _gloffset_SecondaryColor3ubvEXT },
+ { "glSecondaryColor3uivEXT", NAME(glSecondaryColor3uivEXT), _gloffset_SecondaryColor3uivEXT },
+ { "glSecondaryColor3usvEXT", NAME(glSecondaryColor3usvEXT), _gloffset_SecondaryColor3usvEXT },
+ { "glSecondaryColor4bvEXT", NAME(glSecondaryColor4bvEXT), _gloffset_SecondaryColor4bvEXT },
+ { "glSecondaryColor4dvEXT", NAME(glSecondaryColor4dvEXT), _gloffset_SecondaryColor4dvEXT },
+ { "glSecondaryColor4fvEXT", NAME(glSecondaryColor4fvEXT), _gloffset_SecondaryColor4fvEXT },
+ { "glSecondaryColor4ivEXT", NAME(glSecondaryColor4ivEXT), _gloffset_SecondaryColor4ivEXT },
+ { "glSecondaryColor4svEXT", NAME(glSecondaryColor4svEXT), _gloffset_SecondaryColor4svEXT },
+ { "glSecondaryColor4ubvEXT", NAME(glSecondaryColor4ubvEXT), _gloffset_SecondaryColor4ubvEXT },
+ { "glSecondaryColor4uivEXT", NAME(glSecondaryColor4uivEXT), _gloffset_SecondaryColor4uivEXT },
+ { "glSecondaryColor4usvEXT", NAME(glSecondaryColor4usvEXT), _gloffset_SecondaryColor4usvEXT },
+ { "glSecondaryColorPointerEXT", NAME(glSecondaryColorPointerEXT), _gloffset_SecondaryColorPointerEXT },
+#undef NAME
+
+ /* 147. GL_EXT_texture_perturb_normal */
+#ifdef GL_EXT_texture_perturb_normal
+#define NAME(X) (GLvoid *) X
+#else
+#define NAME(X) (GLvoid *) NotImplemented
+#endif
+ { "glTextureNormalEXT", NAME(glTextureNormalEXT), _gloffset_TextureNormalEXT },
+#undef NAME
+
+ /* 148. GL_EXT_multi_draw_arrays */
+#ifdef GL_EXT_multi_draw_arrays
+#define NAME(X) (GLvoid *) X
+#else
+#define NAME(X) (GLvoid *) NotImplemented
+#endif
+ { "glMultiDrawArraysEXT", NAME(glMultiDrawArraysEXT), _gloffset_MultiDrawArraysEXT },
+#undef NAME
+#endif
+
/* 149. GL_EXT_fog_coord */
#ifdef GL_EXT_fog_coord
-#define NAME(X) X
+#define NAME(X) (GLvoid *) X
#else
-#define NAME(X) NotImplemented
+#define NAME(X) (GLvoid *) NotImplemented
+#endif
+ { "glFogCoordfEXT", NAME(glFogCoordfEXT), _gloffset_FogCoordfEXT },
+ { "glFogCoordfvEXT", NAME(glFogCoordfvEXT), _gloffset_FogCoordfvEXT },
+ { "glFogCoorddEXT", NAME(glFogCoorddEXT), _gloffset_FogCoorddEXT },
+ { "glFogCoorddEXT", NAME(glFogCoorddEXT), _gloffset_FogCoorddEXT },
+ { "glFogCoordPointerEXT", NAME(glFogCoordPointerEXT), _gloffset_FogCoordPointerEXT },
+#undef NAME
+
+#if 000
+ /* 156. GL_EXT_coordinate_frame */
+#ifdef GL_EXT_coordinate_frame
+#define NAME(X) (GLvoid *) X
+#else
+#define NAME(X) (GLvoid *) NotImplemented
#endif
- { "glFogCoordfEXT", (GLvoid *) NAME(glFogCoordfEXT), _gloffset_FogCoordfEXT },
- { "glFogCoordfvEXT", (GLvoid *) NAME(glFogCoordfvEXT), _gloffset_FogCoordfvEXT },
- { "glFogCoorddEXT", (GLvoid *) NAME(glFogCoorddEXT), _gloffset_FogCoorddEXT },
- { "glFogCoorddEXT", (GLvoid *) NAME(glFogCoorddEXT), _gloffset_FogCoorddEXT },
- { "glFogCoordPointerEXT", (GLvoid *) NAME(glFogCoordPointerEXT), _gloffset_FogCoordPointerEXT },
+ { "glTangent3bEXT", NAME(glTangent3bEXT), _gloffset_Tangent3bEXT },
+ { "glTangent3dEXT", NAME(glTangent3dEXT), _gloffset_Tangent3dEXT },
+ { "glTangent3fEXT", NAME(glTangent3fEXT), _gloffset_Tangent3fEXT },
+ { "glTangent3iEXT", NAME(glTangent3iEXT), _gloffset_Tangent3iEXT },
+ { "glTangent3sEXT", NAME(glTangent3sEXT), _gloffset_Tangent3sEXT },
+ { "glTangent3bvEXT", NAME(glTangent3bvEXT), _gloffset_Tangent3bvEXT },
+ { "glTangent3dvEXT", NAME(glTangent3dvEXT), _gloffset_Tangent3dvEXT },
+ { "glTangent3fvEXT", NAME(glTangent3fvEXT), _gloffset_Tangent3fvEXT },
+ { "glTangent3ivEXT", NAME(glTangent3ivEXT), _gloffset_Tangent3ivEXT },
+ { "glTangent3svEXT", NAME(glTangent3svEXT), _gloffset_Tangent3svEXT },
+ { "glBinormal3bEXT", NAME(glBinormal3bEXT), _gloffset_Binormal3bEXT },
+ { "glBinormal3dEXT", NAME(glBinormal3dEXT), _gloffset_Binormal3dEXT },
+ { "glBinormal3fEXT", NAME(glBinormal3fEXT), _gloffset_Binormal3fEXT },
+ { "glBinormal3iEXT", NAME(glBinormal3iEXT), _gloffset_Binormal3iEXT },
+ { "glBinormal3sEXT", NAME(glBinormal3sEXT), _gloffset_Binormal3sEXT },
+ { "glBinormal3bvEXT", NAME(glBinormal3bvEXT), _gloffset_Binormal3bvEXT },
+ { "glBinormal3dvEXT", NAME(glBinormal3dvEXT), _gloffset_Binormal3dvEXT },
+ { "glBinormal3fvEXT", NAME(glBinormal3fvEXT), _gloffset_Binormal3fvEXT },
+ { "glBinormal3ivEXT", NAME(glBinormal3ivEXT), _gloffset_Binormal3ivEXT },
+ { "glBinormal3svEXT", NAME(glBinormal3svEXT), _gloffset_Binormal3svEXT },
+ { "glTangentPointerEXT", NAME(glTangentPointerEXT), _gloffset_TangentPointerEXT },
+ { "glBinormalPointerEXT", NAME(glBinormalPointerEXT), _gloffset_BinormalPointerEXT },
#undef NAME
+ /* 164. GL_SUN_global_alpha */
+#ifdef GL_SUN_global_alpha
+#define NAME(X) (GLvoid *) X
+#else
+#define NAME(X) (GLvoid *) NotImplemented
+#endif
+ { "glGlobalAlphaFactorbSUN", NAME(glGlobalAlphaFactorbSUN), _gloffset_GlobalAlphaFactorbSUN },
+ { "glGlobalAlphaFactorsSUN", NAME(glGlobalAlphaFactorsSUN), _gloffset_GlobalAlphaFactorsSUN },
+ { "glGlobalAlphaFactoriSUN", NAME(glGlobalAlphaFactoriSUN), _gloffset_GlobalAlphaFactoriSUN },
+ { "glGlobalAlphaFactorfSUN", NAME(glGlobalAlphaFactorfSUN), _gloffset_GlobalAlphaFactorfSUN },
+ { "glGlobalAlphaFactordSUN", NAME(glGlobalAlphaFactordSUN), _gloffset_GlobalAlphaFactordSUN },
+ { "glGlobalAlphaFactorubSUN", NAME(glGlobalAlphaFactorubSUN), _gloffset_GlobalAlphaFactorubSUN },
+ { "glGlobalAlphaFactorusSUN", NAME(glGlobalAlphaFactorusSUN), _gloffset_GlobalAlphaFactorusSUN },
+ { "glGlobalAlphaFactoruiSUN", NAME(glGlobalAlphaFactoruiSUN), _gloffset_GlobalAlphaFactoruiSUN },
+#undef NAME
+
+ /* 165. GL_SUN_triangle_list */
+#ifdef GL_SUN_triangle_list
+#define NAME(X) (GLvoid *) X
+#else
+#define NAME(X) (GLvoid *) NotImplemented
+#endif
+ { "glReplacementCodeuiSUN", NAME(glReplacementCodeuiSUN), _gloffset_ReplacementCodeuiSUN },
+ { "glReplacementCodeusSUN", NAME(glReplacementCodeusSUN), _gloffset_ReplacementCodeusSUN },
+ { "glReplacementCodeubSUN", NAME(glReplacementCodeubSUN), _gloffset_ReplacementCodeubSUN },
+ { "glReplacementCodeuivSUN", NAME(glReplacementCodeuivSUN), _gloffset_ReplacementCodeuivSUN },
+ { "glReplacementCodeusvSUN", NAME(glReplacementCodeusvSUN), _gloffset_ReplacementCodeusvSUN },
+ { "glReplacementCodeubvSUN", NAME(glReplacementCodeubvSUN), _gloffset_ReplacementCodeubvSUN },
+ { "glReplacementCodePointerSUN", NAME(glReplacementCodePointerSUN), _gloffset_ReplacementCodePointerSUN },
+#undef NAME
+
+ /* 166. GL_SUN_vertex */
+#ifdef GL_SUN_vertex
+#define NAME(X) (GLvoid *) X
+#else
+#define NAME(X) (GLvoid *) NotImplemented
+#endif
+ { "glColor4ubVertex2fSUN", NAME(glColor4ubVertex2fSUN), _gloffset_Color4ubVertex2fSUN },
+ { "glColor4ubVertex2fvSUN", NAME(glColor4ubVertex2fvSUN), _gloffset_Color4ubVertex2fvSUN },
+ { "glColor4ubVertex3fSUN", NAME(glColor4ubVertex3fSUN), _gloffset_Color4ubVertex3fSUN },
+ { "glColor4ubVertex3fvSUN", NAME(glColor4ubVertex3fvSUN), _gloffset_Color4ubVertex3fvSUN },
+ { "glColor3fVertex3fSUN", NAME(glColor3fVertex3fSUN), _gloffset_Color3fVertex3fSUN },
+ { "glColor3fVertex3fvSUN", NAME(glColor3fVertex3fvSUN), _gloffset_Color3fVertex3fvSUN },
+ { "glNormal3fVertex3fSUN", NAME(glNormal3fVertex3fSUN), _gloffset_Normal3fVertex3fSUN },
+ { "glNormal3fVertex3fvSUN", NAME(glNormal3fVertex3fvSUN), _gloffset_Normal3fVertex3fvSUN },
+ { "glColor4fNormal3fVertex3fSUN", NAME(glColor4fNormal3fVertex3fSUN), _gloffset_Color4fNormal3fVertex3fSUN },
+ { "glColor4fNormal3fVertex3fvSUN", NAME(glColor4fNormal3fVertex3fvSUN), _gloffset_Color4fNormal3fVertex3fvSUN },
+ { "glTexCoord2fVertex3fSUN", NAME(glTexCoord2fVertex3fSUN), _gloffset_TexCoord2fVertex3fSUN },
+ { "glTexCoord2fVertex3fvSUN", NAME(glTexCoord2fVertex3fvSUN), _gloffset_TexCoord2fVertex3fvSUN },
+ { "glTexCoord4fVertex4fSUN", NAME(glTexCoord4fVertex4fSUN), _gloffset_TexCoord4fVertex4fSUN },
+ { "glTexCoord4fVertex4fvSUN", NAME(glTexCoord4fVertex4fvSUN), _gloffset_TexCoord4fVertex4fvSUN },
+ { "glTexCoord2fColor4ubVertex3fSUN", NAME(glTexCoord2fColor4ubVertex3fSUN), _gloffset_TexCoord2fColor4ubVertex3fSUN },
+ { "glTexCoord2fColor4ubVertex3fvSUN", NAME(glTexCoord2fColor4ubVertex3fvSUN), _gloffset_TexCoord2fColor4ubVertex3fvSUN },
+ { "glTexCoord2fColor3fVertex3fSUN", NAME(glTexCoord2fColor3fVertex3fSUN), _gloffset_TexCoord2fColor3fVertex3fSUN },
+ { "glTexCoord2fColor3fVertex3fvSUN", NAME(glTexCoord2fColor3fVertex3fvSUN), _gloffset_TexCoord2fColor3fVertex3fvSUN },
+ { "glTexCoord2fNormal3fVertex3fSUN", NAME(glTexCoord2fNormal3fVertex3fSUN), _gloffset_TexCoord2fNormal3fVertex3fSUN },
+ { "glTexCoord2fNormal3fVertex3fvSUN", NAME(glTexCoord2fNormal3fVertex3fvSUN), _gloffset_TexCoord2fNormal3fVertex3fvSUN },
+ { "glTexCoord2fColor4fNormal3fVertex3fSUN", NAME(glTexCoord2fColor4fNormal3fVertex3fSUN), _gloffset_TexCoord2fColor4fNormal3fVertex3fSUN },
+ { "glTexCoord2fColor4fNormal3fVertex3fvSUN", NAME(glTexCoord2fColor4fNormal3fVertex3fvSUN), _gloffset_TexCoord2fColor4fNormal3fVertex3fvSUN },
+ { "glTexCoord4fColor4fNormal3fVertex4fSUN", NAME(glTexCoord4fColor4fNormal3fVertex4fSUN), _gloffset_TexCoord4fColor4fNormal3fVertex4fSUN },
+ { "glTexCoord4fColor4fNormal3fVertex4fvSUN", NAME(glTexCoord4fColor4fNormal3fVertex4fvSUN), _gloffset_TexCoord4fColor4fNormal3fVertex4fvSUN },
+ { "glReplacementCodeuiVertex3fSUN", NAME(glReplacementCodeuiVertex3fSUN), _gloffset_ReplacementCodeuiVertex3fSUN },
+ { "glReplacementCodeuiVertex3fvSUN", NAME(glReplacementCodeuiVertex3fvSUN), _gloffset_ReplacementCodeuiVertex3fvSUN },
+ { "glReplacementCodeuiColor4ubVertex3fSUN", NAME(glReplacementCodeuiColor4ubVertex3fSUN), _gloffset_ReplacementCodeuiColor4ubVertex3fSUN },
+ { "glReplacementCodeuiColor4ubVertex3fvSUN", NAME(glReplacementCodeuiColor4ubVertex3fvSUN), _gloffset_ReplacementCodeuiColor4ubVertex3fvSUN },
+ { "glReplacementCodeuiColor3fVertex3fSUN", NAME(glReplacementCodeuiColor3fVertex3fSUN), _gloffset_ReplacementCodeuiColor3fVertex3fSUN },
+ { "glReplacementCodeuiColor3fVertex3fvSUN", NAME(glReplacementCodeuiColor3fVertex3fvSUN), _gloffset_ReplacementCodeuiColor3fVertex3fvSUN },
+ { "glReplacementCodeuiNormal3fVertex3fSUN", NAME(glReplacementCodeuiNormal3fVertex3fSUN), _gloffset_ReplacementCodeuiNormal3fVertex3fSUN },
+ { "glReplacementCodeuiNormal3fVertex3fvSUN", NAME(glReplacementCodeuiNormal3fVertex3fvSUN), _gloffset_ReplacementCodeuiNormal3fVertex3fvSUN },
+ { "glReplacementCodeuiColor4fNormal3fVertex3fSUN", NAME(glReplacementCodeuiColor4fNormal3fVertex3fSUN), _gloffset_ReplacementCodeuiColor4fNormal3fVertex3fSUN },
+ { "glReplacementCodeuiColor4fNormal3fVertex3fvSUN", NAME(glReplacementCodeuiColor4fNormal3fVertex3fvSUN), _gloffset_ReplacementCodeuiColor4fNormal3fVertex3fvSUN },
+ { "glReplacementCodeuiTexCoord2fVertex3fSUN", NAME(glReplacementCodeuiTexCoord2fVertex3fSUN), _gloffset_ReplacementCodeuiTexCoord2fVertex3fSUN },
+ { "glReplacementCodeuiTexCoord2fVertex3fvSUN", NAME(glReplacementCodeuiTexCoord2fVertex3fvSUN), _gloffset_ReplacementCodeuiTexCoord2fVertex3fvSUN },
+ { "glReplacementCodeuiTexCoord2fNormal3fVertex3fSUN", NAME(glReplacementCodeuiTexCoord2fNormal3fVertex3fSUN), _gloffset_ReplacementCodeuiTexCoord2fNormal3fVertex3fSUN },
+ { "glReplacementCodeuiTexCoord2fNormal3fVertex3fvSUN", NAME(glReplacementCodeuiTexCoord2fNormal3fVertex3fvSUN), _gloffset_ReplacementCodeuiTexCoord2fNormal3fVertex3fvSUN },
+ { "glReplacementCodeuiTexCoord2fColor4fNormal3fVertex3fSUN", NAME(glReplacementCodeuiTexCoord2fColor4fNormal3fVertex3fSUN), _gloffset_ReplacementCodeuiTexCoord2fColor4fNormal3fVertex3fSUN },
+ { "glReplacementCodeuiTexCoord2fColor4fNormal3fVertex3fvSUN", NAME(glReplacementCodeuiTexCoord2fColor4fNormal3fVertex3fvSUN), _gloffset_ReplacementCodeuiTexCoord2fColor4fNormal3fVertex3fvSUN },
+#undef NAME
+#endif
+
/* 173. GL_EXT/INGR_blend_func_separate */
#ifdef GL_EXT_blend_func_separate
-#define NAME(X) X
+#define NAME(X) (GLvoid *) X
#else
-#define NAME(X) NotImplemented
+#define NAME(X) (GLvoid *) NotImplemented
#endif
- { "glBlendFuncSeparateEXT", (GLvoid *) NAME(glBlendFuncSeparateEXT), _gloffset_BlendFuncSeparateEXT },
- { "glBlendFuncSeparateINGR", (GLvoid *) NAME(glBlendFuncSeparateEXT), _gloffset_BlendFuncSeparateEXT },
+ { "glBlendFuncSeparateEXT", NAME(glBlendFuncSeparateEXT), _gloffset_BlendFuncSeparateEXT },
+ { "glBlendFuncSeparateINGR", NAME(glBlendFuncSeparateEXT), _gloffset_BlendFuncSeparateEXT },
#undef NAME
/* 188. GL_EXT_vertex_weighting */
#ifdef GL_EXT_vertex_weighting
-#define NAME(X) X
+#define NAME(X) (GLvoid *) X
#else
-#define NAME(X) NotImplemented
+#define NAME(X) (GLvoid *) NotImplemented
#endif
- { "glVertexWeightfEXT", (GLvoid *) NAME(glVertexWeightfEXT), _gloffset_VertexWeightfEXT },
- { "glVertexWeightfvEXT", (GLvoid *) NAME(glVertexWeightfvEXT), _gloffset_VertexWeightfvEXT },
- { "glVertexWeightPointerEXT", (GLvoid *) NAME(glVertexWeightPointerEXT), _gloffset_VertexWeightPointerEXT },
+ { "glVertexWeightfEXT", NAME(glVertexWeightfEXT), _gloffset_VertexWeightfEXT },
+ { "glVertexWeightfvEXT", NAME(glVertexWeightfvEXT), _gloffset_VertexWeightfvEXT },
+ { "glVertexWeightPointerEXT", NAME(glVertexWeightPointerEXT), _gloffset_VertexWeightPointerEXT },
#undef NAME
/* 190. GL_NV_vertex_array_range */
#ifdef GL_NV_vertex_array_range
-#define NAME(X) X
+#define NAME(X) (GLvoid *) X
#else
-#define NAME(X) NotImplemented
+#define NAME(X) (GLvoid *) NotImplemented
#endif
- { "glFlushVertexArrayRangeNV", (GLvoid *) NAME(glFlushVertexArrayRangeNV), _gloffset_FlushVertexArrayRangeNV },
- { "glVertexArrayRangeNV", (GLvoid *) NAME(glVertexArrayRangeNV), _gloffset_VertexArrayRangeNV },
+ { "glFlushVertexArrayRangeNV", NAME(glFlushVertexArrayRangeNV), _gloffset_FlushVertexArrayRangeNV },
+ { "glVertexArrayRangeNV", NAME(glVertexArrayRangeNV), _gloffset_VertexArrayRangeNV },
#undef NAME
/* 191. GL_NV_register_combiners */
#ifdef GL_NV_register_combiners
-#define NAME(X) X
+#define NAME(X) (GLvoid *) X
#else
-#define NAME(X) NotImplemented
+#define NAME(X) (GLvoid *) NotImplemented
#endif
- { "glCombinerParameterfvNV", (GLvoid *) NAME(glCombinerParameterfvNV), _gloffset_CombinerParameterfvNV },
- { "glCombinerParameterfNV", (GLvoid *) NAME(glCombinerParameterfNV), _gloffset_CombinerParameterfNV },
- { "glCombinerParameterivNV", (GLvoid *) NAME(glCombinerParameterivNV), _gloffset_CombinerParameterivNV },
- { "glCombinerParameteriNV", (GLvoid *) NAME(glCombinerParameteriNV), _gloffset_CombinerParameteriNV },
- { "glCombinerInputNV", (GLvoid *) NAME(glCombinerInputNV), _gloffset_CombinerInputNV },
- { "glCombinerOutputNV", (GLvoid *) NAME(glCombinerOutputNV), _gloffset_CombinerOutputNV },
- { "glFinalCombinerInputNV", (GLvoid *) NAME(glFinalCombinerInputNV), _gloffset_FinalCombinerInputNV },
- { "glGetCombinerInputParameterfvNV", (GLvoid *) NAME(glGetCombinerInputParameterfvNV), _gloffset_GetCombinerInputParameterfvNV },
- { "glGetCombinerInputParameterivNV", (GLvoid *) NAME(glGetCombinerInputParameterivNV), _gloffset_GetCombinerInputParameterivNV },
- { "glGetCombinerOutputParameterfvNV", (GLvoid *) NAME(glGetCombinerOutputParameterfvNV), _gloffset_GetCombinerOutputParameterfvNV },
- { "glGetCombinerOutputParameterivNV", (GLvoid *) NAME(glGetCombinerOutputParameterivNV), _gloffset_GetCombinerOutputParameterivNV },
- { "glGetFinalCombinerInputParameterfvNV", (GLvoid *) NAME(glGetFinalCombinerInputParameterfvNV), _gloffset_GetFinalCombinerInputParameterfvNV },
- { "glGetFinalCombinerInputParameterivNV", (GLvoid *) NAME(glGetFinalCombinerInputParameterivNV), _gloffset_GetFinalCombinerInputParameterivNV },
+ { "glCombinerParameterfvNV", NAME(glCombinerParameterfvNV), _gloffset_CombinerParameterfvNV },
+ { "glCombinerParameterfNV", NAME(glCombinerParameterfNV), _gloffset_CombinerParameterfNV },
+ { "glCombinerParameterivNV", NAME(glCombinerParameterivNV), _gloffset_CombinerParameterivNV },
+ { "glCombinerParameteriNV", NAME(glCombinerParameteriNV), _gloffset_CombinerParameteriNV },
+ { "glCombinerInputNV", NAME(glCombinerInputNV), _gloffset_CombinerInputNV },
+ { "glCombinerOutputNV", NAME(glCombinerOutputNV), _gloffset_CombinerOutputNV },
+ { "glFinalCombinerInputNV", NAME(glFinalCombinerInputNV), _gloffset_FinalCombinerInputNV },
+ { "glGetCombinerInputParameterfvNV", NAME(glGetCombinerInputParameterfvNV), _gloffset_GetCombinerInputParameterfvNV },
+ { "glGetCombinerInputParameterivNV", NAME(glGetCombinerInputParameterivNV), _gloffset_GetCombinerInputParameterivNV },
+ { "glGetCombinerOutputParameterfvNV", NAME(glGetCombinerOutputParameterfvNV), _gloffset_GetCombinerOutputParameterfvNV },
+ { "glGetCombinerOutputParameterivNV", NAME(glGetCombinerOutputParameterivNV), _gloffset_GetCombinerOutputParameterivNV },
+ { "glGetFinalCombinerInputParameterfvNV", NAME(glGetFinalCombinerInputParameterfvNV), _gloffset_GetFinalCombinerInputParameterfvNV },
+ { "glGetFinalCombinerInputParameterivNV", NAME(glGetFinalCombinerInputParameterivNV), _gloffset_GetFinalCombinerInputParameterivNV },
#undef NAME
/* 196. GL_MESA_resize_buffers */
#ifdef MESA_resize_buffers
-#define NAME(X) X
+#define NAME(X) (GLvoid *) X
#else
-#define NAME(X) NotImplemented
+#define NAME(X) (GLvoid *) NotImplemented
#endif
- { "glResizeBuffersMESA", (GLvoid *) NAME(glResizeBuffersMESA), _gloffset_ResizeBuffersMESA },
+ { "glResizeBuffersMESA", NAME(glResizeBuffersMESA), _gloffset_ResizeBuffersMESA },
#undef NAME
/* 197. GL_MESA_window_pos */
#ifdef MESA_window_pos
-#define NAME(X) X
+#define NAME(X) (GLvoid *) X
#else
-#define NAME(X) NotImplemented
+#define NAME(X) (GLvoid *) NotImplemented
#endif
- { "glWindowPos4fMESA", (GLvoid *) NAME(glWindowPos4fMESA), _gloffset_WindowPos4fMESA },
+ { "glWindowPos4fMESA", NAME(glWindowPos4fMESA), _gloffset_WindowPos4fMESA },
#undef NAME
+ /* 209. WGL_EXT_multisample */
+#ifdef WGL_EXT_multisample
+#define NAME(X) (GLvoid *) X
+#else
+#define NAME(X) (GLvoid *) NotImplemented
+#endif
+ { "glSampleMaskEXT", NAME(glSampleMaskEXT), _gloffset_SampleMaskSGIS },
+ { "glSamplePatternEXT", NAME(glSamplePatternEXT), _gloffset_SamplePatternSGIS },
+#undef NAME
{ NULL, NULL } /* end of list marker */
};
@@ -1298,12 +1558,6 @@ generate_entrypoint(GLuint functionOffset)
GLboolean
_glapi_add_entrypoint(const char *funcName, GLuint offset)
{
- /* Make sure we don't try to add a new entrypoint after someone
- * has already called _glapi_get_dispatch_table_size()! If that's
- * happened the caller's information will now be out of date.
- */
- assert(!GetSizeCalled);
-
/* first check if the named function is already statically present */
{
GLint index = get_static_proc_offset(funcName);
@@ -1334,6 +1588,13 @@ _glapi_add_entrypoint(const char *funcName, GLuint offset)
}
}
+ /* Make sure we don't try to add a new entrypoint after someone
+ * has already called _glapi_get_dispatch_table_size()! If that's
+ * happened the caller's information would become out of date.
+ */
+ if (GetSizeCalled)
+ return GL_FALSE;
+
/* make sure we have space */
if (NumExtEntryPoints >= MAX_EXTENSION_FUNCS) {
return GL_FALSE;
diff --git a/xc/extras/Mesa/src/glapioffsets.h b/xc/extras/Mesa/src/glapioffsets.h
index 67481c8e0..b05d49e6f 100644
--- a/xc/extras/Mesa/src/glapioffsets.h
+++ b/xc/extras/Mesa/src/glapioffsets.h
@@ -1,4 +1,4 @@
-/* DO NOT EDIT - This file generated automatically */
+/* DO NOT EDIT - This file generated automatically by gloffsets.py script */
#ifndef _GLAPI_OFFSETS_H_
#define _GLAPI_OFFSETS_H_
@@ -555,5 +555,13 @@
#define _gloffset_GetColorTableEXT 550
#define _gloffset_GetColorTableParameterivEXT 551
#define _gloffset_GetColorTableParameterfvEXT 552
+#define _gloffset_TbufferMask3DFX 553
+#define _gloffset_CompressedTexImage3DARB 554
+#define _gloffset_CompressedTexImage2DARB 555
+#define _gloffset_CompressedTexImage1DARB 556
+#define _gloffset_CompressedTexSubImage3DARB 557
+#define _gloffset_CompressedTexSubImage2DARB 558
+#define _gloffset_CompressedTexSubImage1DARB 559
+#define _gloffset_GetCompressedTexImageARB 560
#endif
diff --git a/xc/extras/Mesa/src/glapitable.h b/xc/extras/Mesa/src/glapitable.h
index 9e5d121dd..94690afb2 100644
--- a/xc/extras/Mesa/src/glapitable.h
+++ b/xc/extras/Mesa/src/glapitable.h
@@ -1,4 +1,4 @@
-/* DO NOT EDIT - This file generated automatically */
+/* DO NOT EDIT - This file generated automatically with gltable.py script */
#ifndef _GLAPI_TABLE_H_
#define _GLAPI_TABLE_H_
@@ -443,7 +443,7 @@ struct _glapi_table
void (*PixelTexGenParameterfvSGIS)(GLenum pname, const GLfloat * params); /* 434 */
void (*GetPixelTexGenParameterivSGIS)(GLenum pname, GLint * params); /* 435 */
void (*GetPixelTexGenParameterfvSGIS)(GLenum pname, GLfloat * params); /* 436 */
- void (*TexImage4DSGIS)(GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLsizei depth, GLsizei size4d, GLint border, GLenum format, GLenum type, const GLvoid * pixels); /* 437 */
+ void (*TexImage4DSGIS)(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLsizei size4d, GLint border, GLenum format, GLenum type, const GLvoid * pixels); /* 437 */
void (*TexSubImage4DSGIS)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint woffset, GLsizei width, GLsizei height, GLsizei depth, GLsizei size4d, GLenum format, GLenum type, const GLvoid * pixels); /* 438 */
GLboolean (*AreTexturesResidentEXT)(GLsizei n, const GLenum * textures, GLboolean * residences); /* 439 */
void (*GenTexturesEXT)(GLsizei n, GLenum * textures); /* 440 */
@@ -559,6 +559,14 @@ struct _glapi_table
void (*GetColorTableEXT)(GLenum target, GLenum format, GLenum type, GLvoid * data); /* 550 */
void (*GetColorTableParameterivEXT)(GLenum target, GLenum pname, GLint * params); /* 551 */
void (*GetColorTableParameterfvEXT)(GLenum target, GLenum pname, GLfloat * params); /* 552 */
+ void (*TbufferMask3DFX)(GLuint mask); /* 553 */
+ void (*CompressedTexImage3DARB)(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const GLvoid * data); /* 554 */
+ void (*CompressedTexImage2DARB)(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const GLvoid * data); /* 555 */
+ void (*CompressedTexImage1DARB)(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLsizei imageSize, const GLvoid * data); /* 556 */
+ void (*CompressedTexSubImage3DARB)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const GLvoid * data); /* 557 */
+ void (*CompressedTexSubImage2DARB)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const GLvoid * data); /* 558 */
+ void (*CompressedTexSubImage1DARB)(GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, const GLvoid * data); /* 559 */
+ void (*GetCompressedTexImageARB)(GLenum target, GLint level, void * img); /* 560 */
};
#endif
diff --git a/xc/extras/Mesa/src/glapitemp.h b/xc/extras/Mesa/src/glapitemp.h
index a04c2a327..b1b443e44 100644
--- a/xc/extras/Mesa/src/glapitemp.h
+++ b/xc/extras/Mesa/src/glapitemp.h
@@ -1978,180 +1978,6 @@ KEYWORD1 void KEYWORD2 NAME(SeparableFilter2D)(GLenum target, GLenum internalfor
-/* ARB 0. GL_ARB_multitexture */
-
-KEYWORD1 void KEYWORD2 NAME(ActiveTextureARB)(GLenum texture)
-{
- DISPATCH(ActiveTextureARB, (texture), (F, ";"));
-}
-
-KEYWORD1 void KEYWORD2 NAME(ClientActiveTextureARB)(GLenum texture)
-{
- DISPATCH(ClientActiveTextureARB, (texture), (F, ";"));
-}
-
-KEYWORD1 void KEYWORD2 NAME(MultiTexCoord1dARB)(GLenum target, GLdouble s)
-{
- DISPATCH(MultiTexCoord1dARB, (target, s), (F, ";"));
-}
-
-KEYWORD1 void KEYWORD2 NAME(MultiTexCoord1dvARB)(GLenum target, const GLdouble *v)
-{
- DISPATCH(MultiTexCoord1dvARB, (target, v), (F, ";"));
-}
-
-KEYWORD1 void KEYWORD2 NAME(MultiTexCoord1fARB)(GLenum target, GLfloat s)
-{
- DISPATCH(MultiTexCoord1fARB, (target, s), (F, ";"));
-}
-
-KEYWORD1 void KEYWORD2 NAME(MultiTexCoord1fvARB)(GLenum target, const GLfloat *v)
-{
- DISPATCH(MultiTexCoord1fvARB, (target, v), (F, ";"));
-}
-
-KEYWORD1 void KEYWORD2 NAME(MultiTexCoord1iARB)(GLenum target, GLint s)
-{
- DISPATCH(MultiTexCoord1iARB, (target, s), (F, ";"));
-}
-
-KEYWORD1 void KEYWORD2 NAME(MultiTexCoord1ivARB)(GLenum target, const GLint *v)
-{
- DISPATCH(MultiTexCoord1ivARB, (target, v), (F, ";"));
-}
-
-KEYWORD1 void KEYWORD2 NAME(MultiTexCoord1sARB)(GLenum target, GLshort s)
-{
- DISPATCH(MultiTexCoord1sARB, (target, s), (F, ";"));
-}
-
-KEYWORD1 void KEYWORD2 NAME(MultiTexCoord1svARB)(GLenum target, const GLshort *v)
-{
- DISPATCH(MultiTexCoord1svARB, (target, v), (F, ";"));
-}
-
-KEYWORD1 void KEYWORD2 NAME(MultiTexCoord2dARB)(GLenum target, GLdouble s, GLdouble t)
-{
- DISPATCH(MultiTexCoord2dARB, (target, s, t), (F, ";"));
-}
-
-KEYWORD1 void KEYWORD2 NAME(MultiTexCoord2dvARB)(GLenum target, const GLdouble *v)
-{
- DISPATCH(MultiTexCoord2dvARB, (target, v), (F, ";"));
-}
-
-KEYWORD1 void KEYWORD2 NAME(MultiTexCoord2fARB)(GLenum target, GLfloat s, GLfloat t)
-{
- DISPATCH(MultiTexCoord2fARB, (target, s, t), (F, ";"));
-}
-
-KEYWORD1 void KEYWORD2 NAME(MultiTexCoord2fvARB)(GLenum target, const GLfloat *v)
-{
- DISPATCH(MultiTexCoord2fvARB, (target, v), (F, ";"));
-}
-
-KEYWORD1 void KEYWORD2 NAME(MultiTexCoord2iARB)(GLenum target, GLint s, GLint t)
-{
- DISPATCH(MultiTexCoord2iARB, (target, s, t), (F, ";"));
-}
-
-KEYWORD1 void KEYWORD2 NAME(MultiTexCoord2ivARB)(GLenum target, const GLint *v)
-{
- DISPATCH(MultiTexCoord2ivARB, (target, v), (F, ";"));
-}
-
-KEYWORD1 void KEYWORD2 NAME(MultiTexCoord2sARB)(GLenum target, GLshort s, GLshort t)
-{
- DISPATCH(MultiTexCoord2sARB, (target, s, t), (F, ";"));
-}
-
-KEYWORD1 void KEYWORD2 NAME(MultiTexCoord2svARB)(GLenum target, const GLshort *v)
-{
- DISPATCH(MultiTexCoord2svARB, (target, v), (F, ";"));
-}
-
-KEYWORD1 void KEYWORD2 NAME(MultiTexCoord3dARB)(GLenum target, GLdouble s, GLdouble t, GLdouble r)
-{
- DISPATCH(MultiTexCoord3dARB, (target, s, t, r), (F, ";"));
-}
-
-KEYWORD1 void KEYWORD2 NAME(MultiTexCoord3dvARB)(GLenum target, const GLdouble *v)
-{
- DISPATCH(MultiTexCoord3dvARB, (target, v), (F, ";"));
-}
-
-KEYWORD1 void KEYWORD2 NAME(MultiTexCoord3fARB)(GLenum target, GLfloat s, GLfloat t, GLfloat r)
-{
- DISPATCH(MultiTexCoord3fARB, (target, s, t, r), (F, ";"));
-}
-
-KEYWORD1 void KEYWORD2 NAME(MultiTexCoord3fvARB)(GLenum target, const GLfloat *v)
-{
- DISPATCH(MultiTexCoord3fvARB, (target, v), (F, ";"));
-}
-
-KEYWORD1 void KEYWORD2 NAME(MultiTexCoord3iARB)(GLenum target, GLint s, GLint t, GLint r)
-{
- DISPATCH(MultiTexCoord3iARB, (target, s, t, r), (F, ";"));
-}
-
-KEYWORD1 void KEYWORD2 NAME(MultiTexCoord3ivARB)(GLenum target, const GLint *v)
-{
- DISPATCH(MultiTexCoord3ivARB, (target, v), (F, ";"));
-}
-
-KEYWORD1 void KEYWORD2 NAME(MultiTexCoord3sARB)(GLenum target, GLshort s, GLshort t, GLshort r)
-{
- DISPATCH(MultiTexCoord3sARB, (target, s, t, r), (F, ";"));
-}
-
-KEYWORD1 void KEYWORD2 NAME(MultiTexCoord3svARB)(GLenum target, const GLshort *v)
-{
- DISPATCH(MultiTexCoord3svARB, (target, v), (F, ";"));
-}
-
-KEYWORD1 void KEYWORD2 NAME(MultiTexCoord4dARB)(GLenum target, GLdouble s, GLdouble t, GLdouble r, GLdouble q)
-{
- DISPATCH(MultiTexCoord4dARB, (target, s, t, r, q), (F, ";"));
-}
-
-KEYWORD1 void KEYWORD2 NAME(MultiTexCoord4dvARB)(GLenum target, const GLdouble *v)
-{
- DISPATCH(MultiTexCoord4dvARB, (target, v), (F, ";"));
-}
-
-KEYWORD1 void KEYWORD2 NAME(MultiTexCoord4fARB)(GLenum target, GLfloat s, GLfloat t, GLfloat r, GLfloat q)
-{
- DISPATCH(MultiTexCoord4fARB, (target, s, t, r, q), (F, ";"));
-}
-
-KEYWORD1 void KEYWORD2 NAME(MultiTexCoord4fvARB)(GLenum target, const GLfloat *v)
-{
- DISPATCH(MultiTexCoord4fvARB, (target, v), (F, ";"));
-}
-
-KEYWORD1 void KEYWORD2 NAME(MultiTexCoord4iARB)(GLenum target, GLint s, GLint t, GLint r, GLint q)
-{
- DISPATCH(MultiTexCoord4iARB, (target, s, t, r, q), (F, ";"));
-}
-
-KEYWORD1 void KEYWORD2 NAME(MultiTexCoord4ivARB)(GLenum target, const GLint *v)
-{
- DISPATCH(MultiTexCoord4ivARB, (target, v), (F, ";"));
-}
-
-KEYWORD1 void KEYWORD2 NAME(MultiTexCoord4sARB)(GLenum target, GLshort s, GLshort t, GLshort r, GLshort q)
-{
- DISPATCH(MultiTexCoord4sARB, (target, s, t, r, q), (F, ";"));
-}
-
-KEYWORD1 void KEYWORD2 NAME(MultiTexCoord4svARB)(GLenum target, const GLshort *v)
-{
- DISPATCH(MultiTexCoord4svARB, (target, v), (F, ";"));
-}
-
-
-
/***
*** Extension functions
***/
@@ -2448,7 +2274,7 @@ KEYWORD1 void KEYWORD2 NAME(GetPixelTexGenParameterivSGIS)(GLenum target, GLint
/* 16. GL_SGIS_texture4D */
-KEYWORD1 void KEYWORD2 NAME(TexImage4DSGIS)(GLenum target, GLint level, GLint internalFormat, GLsizei width, GLsizei height, GLsizei depth, GLsizei extent, GLint border, GLenum format, GLenum type, const void *pixels)
+KEYWORD1 void KEYWORD2 NAME(TexImage4DSGIS)(GLenum target, GLint level, GLenum internalFormat, GLsizei width, GLsizei height, GLsizei depth, GLsizei extent, GLint border, GLenum format, GLenum type, const void *pixels)
{
DISPATCH(TexImage4DSGIS, (target, level, internalFormat, width, height, depth, extent, border, format, type, pixels), (F, ";"));
}
@@ -2624,6 +2450,16 @@ KEYWORD1 void KEYWORD2 NAME(PointParameterfvEXT)(GLenum target, const GLfloat *p
DISPATCH(PointParameterfvEXT, (target, param), (F, ";"));
}
+KEYWORD1 void KEYWORD2 NAME(PointParameterfSGIS)(GLenum target, GLfloat param)
+{
+ DISPATCH(PointParameterfEXT, (target, param), (F, ";"));
+}
+
+KEYWORD1 void KEYWORD2 NAME(PointParameterfvSGIS)(GLenum target, const GLfloat *param)
+{
+ DISPATCH(PointParameterfvEXT, (target, param), (F, ";"));
+}
+
/* 55. GL_SGIX_instruments */
@@ -2816,7 +2652,6 @@ KEYWORD1 void KEYWORD2 NAME(IndexFuncEXT)(GLenum func, GLfloat ref)
/* 97. GL_EXT_compiled_vertex_array */
-
KEYWORD1 void KEYWORD2 NAME(LockArraysEXT)(GLint first, GLsizei count)
{
DISPATCH(LockArraysEXT, (first, count), (F, ";"));
@@ -2934,24 +2769,19 @@ KEYWORD1 void KEYWORD2 NAME(LightEnviSGIX)(GLenum pname, GLint param)
/* 112. GL_EXT_draw_range_elements */
-
-#if 00
KEYWORD1 void KEYWORD2 NAME(DrawRangeElementsEXT)(GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const GLvoid *indices)
{
- DISPATCH(DrawRangeElementsEXT, (mode, start, end, count, type, indices), (F, "glDrawRangeElementsEXT(0x%x, %u %u %d 0x%x %p);", mode, start, end, count, type, indices));
+ DISPATCH(DrawRangeElements, (mode, start, end, count, type, indices), (F, "glDrawRangeElementsEXT(0x%x, %u %u %d 0x%x %p);", mode, start, end, count, type, indices));
}
-#endif
/* 117. GL_EXT_light_texture */
-
#if 00
KEYWORD1 void KEYWORD2 NAME(ApplyTextureEXT)(GLenum mode)
{
DISPATCH(ApplyTextureEXT, (mode), (F, "glApplyTextureEXT(0x%x);", mode));
}
-
KEYWORD1 void KEYWORD2 NAME(TextureLightEXT)(GLenum pname)
{
DISPATCH(TextureLightEXT, (pname), (F, "glTextureLightEXT(0x%x);", pname));
@@ -3191,7 +3021,6 @@ KEYWORD1 void KEYWORD2 NAME(ResizeBuffersMESA)(void)
/* 197. GL_MESA_window_pos */
-
KEYWORD1 void KEYWORD2 NAME(WindowPos2iMESA)(GLint x, GLint y)
{
DISPATCH(WindowPos2iMESA, (x, y), (F, ";"));
@@ -3313,8 +3142,201 @@ KEYWORD1 void KEYWORD2 NAME(WindowPos4dvMESA)(const GLdouble *p)
}
+/* 208. GL_3DFX_tbuffer */
+KEYWORD1 void KEYWORD2 NAME(TbufferMask3DFX)(GLuint mask)
+{
+ DISPATCH(TbufferMask3DFX, (mask), (F, "glTbufferMask3DFX(0x%x);", mask));
+}
+
+
+/* 209. WGL_EXT_multisample */
+
+KEYWORD1 void KEYWORD2 NAME(SampleMaskEXT)(GLclampf value, GLboolean invert)
+{
+ DISPATCH(SampleMaskSGIS, (value, invert), (F, ";"));
+}
+
+KEYWORD1 void KEYWORD2 NAME(SamplePatternEXT)(GLenum pattern)
+{
+ DISPATCH(SamplePatternSGIS, (pattern), (F, ";"));
+}
-/* ARB 2. GL_ARB_transpose_matrix */
+
+/* ARB 1. GL_ARB_multitexture */
+
+KEYWORD1 void KEYWORD2 NAME(ActiveTextureARB)(GLenum texture)
+{
+ DISPATCH(ActiveTextureARB, (texture), (F, ";"));
+}
+
+KEYWORD1 void KEYWORD2 NAME(ClientActiveTextureARB)(GLenum texture)
+{
+ DISPATCH(ClientActiveTextureARB, (texture), (F, ";"));
+}
+
+KEYWORD1 void KEYWORD2 NAME(MultiTexCoord1dARB)(GLenum target, GLdouble s)
+{
+ DISPATCH(MultiTexCoord1dARB, (target, s), (F, ";"));
+}
+
+KEYWORD1 void KEYWORD2 NAME(MultiTexCoord1dvARB)(GLenum target, const GLdouble *v)
+{
+ DISPATCH(MultiTexCoord1dvARB, (target, v), (F, ";"));
+}
+
+KEYWORD1 void KEYWORD2 NAME(MultiTexCoord1fARB)(GLenum target, GLfloat s)
+{
+ DISPATCH(MultiTexCoord1fARB, (target, s), (F, ";"));
+}
+
+KEYWORD1 void KEYWORD2 NAME(MultiTexCoord1fvARB)(GLenum target, const GLfloat *v)
+{
+ DISPATCH(MultiTexCoord1fvARB, (target, v), (F, ";"));
+}
+
+KEYWORD1 void KEYWORD2 NAME(MultiTexCoord1iARB)(GLenum target, GLint s)
+{
+ DISPATCH(MultiTexCoord1iARB, (target, s), (F, ";"));
+}
+
+KEYWORD1 void KEYWORD2 NAME(MultiTexCoord1ivARB)(GLenum target, const GLint *v)
+{
+ DISPATCH(MultiTexCoord1ivARB, (target, v), (F, ";"));
+}
+
+KEYWORD1 void KEYWORD2 NAME(MultiTexCoord1sARB)(GLenum target, GLshort s)
+{
+ DISPATCH(MultiTexCoord1sARB, (target, s), (F, ";"));
+}
+
+KEYWORD1 void KEYWORD2 NAME(MultiTexCoord1svARB)(GLenum target, const GLshort *v)
+{
+ DISPATCH(MultiTexCoord1svARB, (target, v), (F, ";"));
+}
+
+KEYWORD1 void KEYWORD2 NAME(MultiTexCoord2dARB)(GLenum target, GLdouble s, GLdouble t)
+{
+ DISPATCH(MultiTexCoord2dARB, (target, s, t), (F, ";"));
+}
+
+KEYWORD1 void KEYWORD2 NAME(MultiTexCoord2dvARB)(GLenum target, const GLdouble *v)
+{
+ DISPATCH(MultiTexCoord2dvARB, (target, v), (F, ";"));
+}
+
+KEYWORD1 void KEYWORD2 NAME(MultiTexCoord2fARB)(GLenum target, GLfloat s, GLfloat t)
+{
+ DISPATCH(MultiTexCoord2fARB, (target, s, t), (F, ";"));
+}
+
+KEYWORD1 void KEYWORD2 NAME(MultiTexCoord2fvARB)(GLenum target, const GLfloat *v)
+{
+ DISPATCH(MultiTexCoord2fvARB, (target, v), (F, ";"));
+}
+
+KEYWORD1 void KEYWORD2 NAME(MultiTexCoord2iARB)(GLenum target, GLint s, GLint t)
+{
+ DISPATCH(MultiTexCoord2iARB, (target, s, t), (F, ";"));
+}
+
+KEYWORD1 void KEYWORD2 NAME(MultiTexCoord2ivARB)(GLenum target, const GLint *v)
+{
+ DISPATCH(MultiTexCoord2ivARB, (target, v), (F, ";"));
+}
+
+KEYWORD1 void KEYWORD2 NAME(MultiTexCoord2sARB)(GLenum target, GLshort s, GLshort t)
+{
+ DISPATCH(MultiTexCoord2sARB, (target, s, t), (F, ";"));
+}
+
+KEYWORD1 void KEYWORD2 NAME(MultiTexCoord2svARB)(GLenum target, const GLshort *v)
+{
+ DISPATCH(MultiTexCoord2svARB, (target, v), (F, ";"));
+}
+
+KEYWORD1 void KEYWORD2 NAME(MultiTexCoord3dARB)(GLenum target, GLdouble s, GLdouble t, GLdouble r)
+{
+ DISPATCH(MultiTexCoord3dARB, (target, s, t, r), (F, ";"));
+}
+
+KEYWORD1 void KEYWORD2 NAME(MultiTexCoord3dvARB)(GLenum target, const GLdouble *v)
+{
+ DISPATCH(MultiTexCoord3dvARB, (target, v), (F, ";"));
+}
+
+KEYWORD1 void KEYWORD2 NAME(MultiTexCoord3fARB)(GLenum target, GLfloat s, GLfloat t, GLfloat r)
+{
+ DISPATCH(MultiTexCoord3fARB, (target, s, t, r), (F, ";"));
+}
+
+KEYWORD1 void KEYWORD2 NAME(MultiTexCoord3fvARB)(GLenum target, const GLfloat *v)
+{
+ DISPATCH(MultiTexCoord3fvARB, (target, v), (F, ";"));
+}
+
+KEYWORD1 void KEYWORD2 NAME(MultiTexCoord3iARB)(GLenum target, GLint s, GLint t, GLint r)
+{
+ DISPATCH(MultiTexCoord3iARB, (target, s, t, r), (F, ";"));
+}
+
+KEYWORD1 void KEYWORD2 NAME(MultiTexCoord3ivARB)(GLenum target, const GLint *v)
+{
+ DISPATCH(MultiTexCoord3ivARB, (target, v), (F, ";"));
+}
+
+KEYWORD1 void KEYWORD2 NAME(MultiTexCoord3sARB)(GLenum target, GLshort s, GLshort t, GLshort r)
+{
+ DISPATCH(MultiTexCoord3sARB, (target, s, t, r), (F, ";"));
+}
+
+KEYWORD1 void KEYWORD2 NAME(MultiTexCoord3svARB)(GLenum target, const GLshort *v)
+{
+ DISPATCH(MultiTexCoord3svARB, (target, v), (F, ";"));
+}
+
+KEYWORD1 void KEYWORD2 NAME(MultiTexCoord4dARB)(GLenum target, GLdouble s, GLdouble t, GLdouble r, GLdouble q)
+{
+ DISPATCH(MultiTexCoord4dARB, (target, s, t, r, q), (F, ";"));
+}
+
+KEYWORD1 void KEYWORD2 NAME(MultiTexCoord4dvARB)(GLenum target, const GLdouble *v)
+{
+ DISPATCH(MultiTexCoord4dvARB, (target, v), (F, ";"));
+}
+
+KEYWORD1 void KEYWORD2 NAME(MultiTexCoord4fARB)(GLenum target, GLfloat s, GLfloat t, GLfloat r, GLfloat q)
+{
+ DISPATCH(MultiTexCoord4fARB, (target, s, t, r, q), (F, ";"));
+}
+
+KEYWORD1 void KEYWORD2 NAME(MultiTexCoord4fvARB)(GLenum target, const GLfloat *v)
+{
+ DISPATCH(MultiTexCoord4fvARB, (target, v), (F, ";"));
+}
+
+KEYWORD1 void KEYWORD2 NAME(MultiTexCoord4iARB)(GLenum target, GLint s, GLint t, GLint r, GLint q)
+{
+ DISPATCH(MultiTexCoord4iARB, (target, s, t, r, q), (F, ";"));
+}
+
+KEYWORD1 void KEYWORD2 NAME(MultiTexCoord4ivARB)(GLenum target, const GLint *v)
+{
+ DISPATCH(MultiTexCoord4ivARB, (target, v), (F, ";"));
+}
+
+KEYWORD1 void KEYWORD2 NAME(MultiTexCoord4sARB)(GLenum target, GLshort s, GLshort t, GLshort r, GLshort q)
+{
+ DISPATCH(MultiTexCoord4sARB, (target, s, t, r, q), (F, ";"));
+}
+
+KEYWORD1 void KEYWORD2 NAME(MultiTexCoord4svARB)(GLenum target, const GLshort *v)
+{
+ DISPATCH(MultiTexCoord4svARB, (target, v), (F, ";"));
+}
+
+
+
+/* ARB 3. GL_ARB_transpose_matrix */
KEYWORD1 void KEYWORD2 NAME(LoadTransposeMatrixdARB)(const GLdouble m[16])
{
DISPATCH(LoadTransposeMatrixdARB, (m), (F, "glLoadTransposeMatrixARB(%p);", m));
@@ -3336,13 +3358,13 @@ KEYWORD1 void KEYWORD2 NAME(MultTransposeMatrixfARB)(const GLfloat m[16])
}
-/* ARB 4. GL_ARB_multisample */
+
+/* ARB 5. GL_ARB_multisample */
KEYWORD1 void KEYWORD2 NAME(SampleCoverageARB)(GLclampf value, GLboolean invert)
{
DISPATCH(SampleCoverageARB, (value, invert), (F, "glSampleCoverageARB(%f, %d);", value, invert));
}
-
KEYWORD1 void KEYWORD2 NAME(SamplePassARB)(GLenum pass)
{
DISPATCH(SamplePassARB, (pass), (F, "glSamplePassARB(0x%x);", pass));
@@ -3350,6 +3372,44 @@ KEYWORD1 void KEYWORD2 NAME(SamplePassARB)(GLenum pass)
+/* ARB 12. GL_ARB_texture_compression */
+KEYWORD1 void KEYWORD2 NAME(CompressedTexImage3DARB)(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const GLvoid *data)
+{
+ DISPATCH(CompressedTexImage3DARB, (target, level, internalformat, width, height, depth, border, imageSize, data), (F, "glCompressedTexImage3DARB();"));
+}
+
+KEYWORD1 void KEYWORD2 NAME(CompressedTexImage2DARB)(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const GLvoid *data)
+{
+ DISPATCH(CompressedTexImage2DARB, (target, level, internalformat, width, height, border, imageSize, data), (F, "glCompressedTexImage2DARB();"));
+}
+
+KEYWORD1 void KEYWORD2 NAME(CompressedTexImage1DARB)(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLsizei imageSize, const GLvoid *data)
+{
+ DISPATCH(CompressedTexImage1DARB, (target, level, internalformat, width, border, imageSize, data), (F, "glCompressedTexImage1DARB();"));
+}
+
+KEYWORD1 void KEYWORD2 NAME(CompressedTexSubImage3DARB)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const GLvoid *data)
+{
+ DISPATCH(CompressedTexSubImage3DARB, (target, level, xoffset, yoffset, zoffset, width, height, depth, format, imageSize, data), (F, "glCompressedTexSubImage3DARB();"));
+}
+
+KEYWORD1 void KEYWORD2 NAME(CompressedTexSubImage2DARB)(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const GLvoid *data)
+{
+ DISPATCH(CompressedTexSubImage2DARB, (target, level, xoffset, yoffset, width, height, format, imageSize, data), (F, "glCompressedTexSubImage2DARB();"));
+}
+
+KEYWORD1 void KEYWORD2 NAME(CompressedTexSubImage1DARB)(GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, const GLvoid *data)
+{
+ DISPATCH(CompressedTexSubImage1DARB, (target, level, xoffset, width, format, imageSize, data), (F, "glCompressedTexSubImage1DARB();"));
+}
+
+KEYWORD1 void KEYWORD2 NAME(GetCompressedTexImageARB)(GLenum target, GLint lod, GLvoid *img)
+{
+ DISPATCH(GetCompressedTexImageARB, (target, lod, img), (F, "glGetCompressedTexImageARB();"));
+}
+
+
+
#undef KEYWORD1
#undef KEYWORD2
#undef NAME
diff --git a/xc/extras/Mesa/src/glheader.h b/xc/extras/Mesa/src/glheader.h
index e12a31f20..00748699d 100644
--- a/xc/extras/Mesa/src/glheader.h
+++ b/xc/extras/Mesa/src/glheader.h
@@ -62,16 +62,104 @@
#include "conf.h"
#endif
+/* Make sure we include glext.h */
#include "GL/gl.h"
#include "GL/glext.h"
+
/*
* Put compiler/OS/assembly pragmas and macros here to avoid
* cluttering other source files.
*/
+
+/*
+ * XXX move as many of these pragma's and MS Windows-isms into
+ * the new src/glheader.h file.
+ */
+
+#if defined(_WIN32) && !defined(__WIN32__)
+# define __WIN32__
+#endif
+
+#if !defined(OPENSTEP) && (defined(__WIN32__) || defined(__CYGWIN__))
+# pragma warning( disable : 4068 ) /* unknown pragma */
+# pragma warning( disable : 4710 ) /* function 'foo' not inlined */
+# pragma warning( disable : 4711 ) /* function 'foo' selected for automatic inline expansion */
+# pragma warning( disable : 4127 ) /* conditional expression is constant */
+# if defined(MESA_MINWARN)
+# pragma warning( disable : 4244 ) /* '=' : conversion from 'const double ' to 'float ', possible loss of data */
+# pragma warning( disable : 4018 ) /* '<' : signed/unsigned mismatch */
+# pragma warning( disable : 4305 ) /* '=' : truncation from 'const double ' to 'float ' */
+# pragma warning( disable : 4550 ) /* 'function' undefined; assuming extern returning int */
+# pragma warning( disable : 4761 ) /* integral size mismatch in argument; conversion supplied */
+# endif
+# if defined(_MSC_VER) && defined(BUILD_GL32) /* tag specify we're building mesa as a DLL */
+# define GLAPI __declspec(dllexport)
+# define WGLAPI __declspec(dllexport)
+# elif defined(_MSC_VER) && defined(_DLL) /* tag specifying we're building for DLL runtime support */
+# define GLAPI __declspec(dllimport)
+# define WGLAPI __declspec(dllimport)
+# else /* for use with static link lib build of Win32 edition only */
+# define GLAPI extern
+# define WGLAPI __declspec(dllimport)
+# endif /* _STATIC_MESA support */
+# define GLAPIENTRY __stdcall
+# define GLAPIENTRYP __stdcall *
+# define GLCALLBACK __stdcall
+# define GLCALLBACKP __stdcall *
+# if defined(__CYGWIN__)
+# define GLCALLBACKPCAST *
+# else
+# define GLCALLBACKPCAST __stdcall *
+# endif
+# define GLWINAPI __stdcall
+# define GLWINAPIV __cdecl
+#else
+/* non-Windows compilation */
+# define GLAPI extern
+# define GLAPIENTRY
+# define GLAPIENTRYP *
+# define GLCALLBACK
+# define GLCALLBACKP *
+# define GLCALLBACKPCAST *
+# define GLWINAPI
+# define GLWINAPIV
+#endif /* WIN32 / CYGWIN bracket */
+
+/* compatability guard so we don't need to change client code */
+
+#if defined(_WIN32) && !defined(_WINDEF_) && !defined(_GNU_H_WINDOWS32_BASE) && !defined(OPENSTEP)
+# define CALLBACK GLCALLBACK
+typedef int (GLAPIENTRY *PROC)();
+typedef void *HGLRC;
+typedef void *HDC;
+typedef unsigned long COLORREF;
+#endif
+
+#if defined(_WIN32) && !defined(_WINGDI_) && !defined(_GNU_H_WINDOWS32_DEFINES) && !defined(OPENSTEP)
+# define WGL_FONT_LINES 0
+# define WGL_FONT_POLYGONS 1
+#ifndef _GNU_H_WINDOWS32_FUNCTIONS
+# ifdef UNICODE
+# define wglUseFontBitmaps wglUseFontBitmapsW
+# define wglUseFontOutlines wglUseFontOutlinesW
+# else
+# define wglUseFontBitmaps wglUseFontBitmapsA
+# define wglUseFontOutlines wglUseFontOutlinesA
+# endif /* !UNICODE */
+#endif /* _GNU_H_WINDOWS32_FUNCTIONS */
+typedef struct tagLAYERPLANEDESCRIPTOR LAYERPLANEDESCRIPTOR, *PLAYERPLANEDESCRIPTOR, *LPLAYERPLANEDESCRIPTOR;
+typedef struct _GLYPHMETRICSFLOAT GLYPHMETRICSFLOAT, *PGLYPHMETRICSFLOAT, *LPGLYPHMETRICSFLOAT;
+typedef struct tagPIXELFORMATDESCRIPTOR PIXELFORMATDESCRIPTOR, *PPIXELFORMATDESCRIPTOR, *LPPIXELFORMATDESCRIPTOR;
+#include <gl/mesa_wgl.h>
+#endif
+
+
+
+
/* Disable unreachable code warnings for Watcom C++ */
#ifdef __WATCOMC__
#pragma disable_message(201)
diff --git a/xc/extras/Mesa/src/hint.c b/xc/extras/Mesa/src/hint.c
index 7f8d88b76..6537bd004 100644
--- a/xc/extras/Mesa/src/hint.c
+++ b/xc/extras/Mesa/src/hint.c
@@ -120,13 +120,23 @@ _mesa_try_Hint( GLcontext *ctx, GLenum target, GLenum mode )
case GL_NATIVE_GRAPHICS_HANDLE_PGI:
break;
- /* GL_EXT_clip_volume_hint */
+ /* GL_EXT_clip_volume_hint */
case GL_CLIP_VOLUME_CLIPPING_HINT_EXT:
ctx->Hint.ClipVolumeClipping = mode;
break;
+ /* GL_ARB_texture_compression */
+ case GL_TEXTURE_COMPRESSION_HINT_ARB:
+ if (ctx->Extensions.HaveTextureCompression) {
+ ctx->Hint.TextureCompression = mode;
+ }
+ else {
+ gl_error(ctx, GL_INVALID_ENUM, "glHint(target)");
+ }
+ break;
+
default:
- gl_error( ctx, GL_INVALID_ENUM, "glHint(target)" );
+ gl_error(ctx, GL_INVALID_ENUM, "glHint(target)");
return GL_FALSE;
}
diff --git a/xc/extras/Mesa/src/image.c b/xc/extras/Mesa/src/image.c
index 3f0720ea0..825ce7ed5 100644
--- a/xc/extras/Mesa/src/image.c
+++ b/xc/extras/Mesa/src/image.c
@@ -518,16 +518,19 @@ _mesa_image_row_stride( const struct gl_pixelstore_attrib *packing,
else {
/* Non-BITMAP data */
const GLint bytesPerPixel = _mesa_bytes_per_pixel(format, type);
+ GLint bytesPerRow, remainder;
if (bytesPerPixel <= 0)
return -1; /* error */
if (packing->RowLength == 0) {
- GLint bytes = bytesPerPixel * width;
- return bytes;
+ bytesPerRow = bytesPerPixel * width;
}
else {
- GLint bytes = bytesPerPixel * packing->RowLength;
- return bytes;
+ bytesPerRow = bytesPerPixel * packing->RowLength;
}
+ remainder = bytesPerRow % packing->Alignment;
+ if (remainder > 0)
+ bytesPerRow += (packing->Alignment - remainder);
+ return bytesPerRow;
}
}
@@ -614,7 +617,8 @@ _mesa_pack_rgba_span( GLcontext *ctx,
ctx->Pixel.ScaleOrBiasRGBApcm ||
ctx->Pixel.ColorTableEnabled ||
ctx->Pixel.PostColorMatrixColorTableEnabled ||
- ctx->Pixel.MinMaxEnabled);
+ ctx->Pixel.MinMaxEnabled ||
+ ctx->Pixel.HistogramEnabled);
/* Test for optimized case first */
if (!applyTransferOps && format == GL_RGBA && type == GL_UNSIGNED_BYTE) {
@@ -679,10 +683,13 @@ _mesa_pack_rgba_span( GLcontext *ctx,
if (ctx->Pixel.PostColorMatrixColorTableEnabled) {
_mesa_lookup_rgba(&ctx->PostColorMatrixColorTable, n, rgba);
}
- /* XXX histogram here */
+ /* update histogram count */
+ if (ctx->Pixel.HistogramEnabled) {
+ _mesa_update_histogram(ctx, n, (CONST GLfloat (*)[4]) rgba);
+ }
/* XXX min/max here */
if (ctx->Pixel.MinMaxEnabled) {
- _mesa_update_minmax(ctx, n, (const GLfloat (*)[4]) rgba);
+ _mesa_update_minmax(ctx, n, (CONST GLfloat (*)[4]) rgba);
if (ctx->MinMax.Sink)
return;
}
@@ -2193,7 +2200,8 @@ _mesa_unpack_ubyte_color_span( GLcontext *ctx,
ctx->Pixel.ScaleOrBiasRGBApcm ||
ctx->Pixel.ColorTableEnabled ||
ctx->Pixel.PostColorMatrixColorTableEnabled ||
- ctx->Pixel.MinMaxEnabled);
+ ctx->Pixel.MinMaxEnabled ||
+ ctx->Pixel.HistogramEnabled);
/* Try simple cases first */
if (!applyTransferOps && srcType == GL_UNSIGNED_BYTE) {
@@ -2319,10 +2327,13 @@ _mesa_unpack_ubyte_color_span( GLcontext *ctx,
if (ctx->Pixel.PostColorMatrixColorTableEnabled) {
_mesa_lookup_rgba(&ctx->PostColorMatrixColorTable, n, rgba);
}
- /* XXX histogram here */
+ /* update histogram count */
+ if (ctx->Pixel.HistogramEnabled) {
+ _mesa_update_histogram(ctx, n, (CONST GLfloat (*)[4]) rgba);
+ }
/* XXX min/max here */
if (ctx->Pixel.MinMaxEnabled) {
- _mesa_update_minmax(ctx, n, (const GLfloat (*)[4]) rgba);
+ _mesa_update_minmax(ctx, n, (CONST GLfloat (*)[4]) rgba);
}
}
@@ -2450,7 +2461,7 @@ _mesa_unpack_float_color_span( GLcontext *ctx,
GLenum srcFormat, GLenum srcType,
const GLvoid *source,
const struct gl_pixelstore_attrib *unpacking,
- GLboolean applyTransferOps )
+ GLboolean applyTransferOps, GLboolean clamp )
{
ASSERT(dstFormat == GL_ALPHA ||
dstFormat == GL_LUMINANCE ||
@@ -2504,7 +2515,8 @@ _mesa_unpack_float_color_span( GLcontext *ctx,
ctx->Pixel.ScaleOrBiasRGBApcm ||
ctx->Pixel.ColorTableEnabled ||
ctx->Pixel.PostColorMatrixColorTableEnabled ||
- ctx->Pixel.MinMaxEnabled);
+ ctx->Pixel.MinMaxEnabled ||
+ ctx->Pixel.HistogramEnabled);
/* general solution, no special cases, yet */
{
@@ -2580,15 +2592,18 @@ _mesa_unpack_float_color_span( GLcontext *ctx,
if (ctx->Pixel.PostColorMatrixColorTableEnabled) {
_mesa_lookup_rgba(&ctx->PostColorMatrixColorTable, n, rgba);
}
- /* XXX histogram here */
+ /* update histogram count */
+ if (ctx->Pixel.HistogramEnabled) {
+ _mesa_update_histogram(ctx, n, (CONST GLfloat (*)[4]) rgba);
+ }
/* XXX min/max here */
if (ctx->Pixel.MinMaxEnabled) {
- _mesa_update_minmax(ctx, n, (const GLfloat (*)[4]) rgba);
+ _mesa_update_minmax(ctx, n, (CONST GLfloat (*)[4]) rgba);
}
}
/* clamp to [0,1] */
- {
+ if (clamp) {
GLuint i;
for (i = 0; i < n; i++) {
rgba[i][RCOMP] = CLAMP(rgba[i][RCOMP], 0.0F, 1.0F);
diff --git a/xc/extras/Mesa/src/image.h b/xc/extras/Mesa/src/image.h
index 25b591ec9..65c12c53c 100644
--- a/xc/extras/Mesa/src/image.h
+++ b/xc/extras/Mesa/src/image.h
@@ -101,7 +101,7 @@ _mesa_unpack_float_color_span( GLcontext *ctx,
GLenum srcFormat, GLenum srcType,
const GLvoid *source,
const struct gl_pixelstore_attrib *unpacking,
- GLboolean applyTransferOps );
+ GLboolean applyTransferOps, GLboolean clamp );
extern void
diff --git a/xc/extras/Mesa/src/imaging.c b/xc/extras/Mesa/src/imaging.c
index 6710e2d3e..1dd37112d 100644
--- a/xc/extras/Mesa/src/imaging.c
+++ b/xc/extras/Mesa/src/imaging.c
@@ -25,13 +25,8 @@
/*
- * Stub functions for GL_ARB_imaging subset
+ * Histogram, Min/max and convolution for GL_ARB_imaging subset
*
- * Some of the imaging functions (like blending and color tables) are
- * defined elsewhere in Mesa.
- *
- * There's been some initial work on histogram and minmax support done
- * here but there's a lot more to do. Any volunteers?
*/
@@ -40,135 +35,504 @@
#else
#include "glheader.h"
#include "context.h"
+#include "image.h"
#include "imaging.h"
#include "mmath.h"
-#include "teximage.h"
+#include "span.h"
#endif
-#define WARNING(MSG) fprintf(stderr,"Mesa warning: GL_ARB_imaging functions not implemented\n")
-
+/**********************************************************************/
+/**** Histogram and Min/max *****/
+/**********************************************************************/
-void _mesa_ConvolutionFilter1D(GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const GLvoid *image)
+static void
+pack_histogram( GLcontext *ctx,
+ GLuint n, CONST GLuint rgba[][4],
+ GLenum format, GLenum type, GLvoid *destination,
+ const struct gl_pixelstore_attrib *packing )
{
- (void) target;
- (void) internalformat;
- (void) width;
- (void) format;
- (void) type;
- (void) image;
- WARNING("glConvolutionFilter1D");
-}
+ const GLint comps = _mesa_components_in_format(format);
+ GLuint luminance[MAX_WIDTH];
-void _mesa_ConvolutionFilter2D(GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *image)
-{
- (void) target;
- (void) internalformat;
- (void) width;
- (void) height;
- (void) format;
- (void) type;
- (void) image;
- WARNING("glConvolutionFilter2D");
-}
+ if (format == GL_LUMINANCE || format == GL_LUMINANCE_ALPHA) {
+ GLuint i;
+ for (i = 0; i < n; i++) {
+ luminance[i] = rgba[i][RCOMP] + rgba[i][GCOMP] + rgba[i][BCOMP];
+ }
+ }
-void _mesa_ConvolutionParameterf(GLenum target, GLenum pname, GLfloat params)
-{
- (void) target;
- (void) pname;
- (void) params;
- WARNING("glConvolutionParameterf");
-}
+#define PACK_MACRO(TYPE) \
+ { \
+ GLuint i; \
+ switch (format) { \
+ case GL_RED: \
+ for (i=0;i<n;i++) \
+ dst[i] = (TYPE) rgba[i][RCOMP]; \
+ break; \
+ case GL_GREEN: \
+ for (i=0;i<n;i++) \
+ dst[i] = (TYPE) rgba[i][GCOMP]; \
+ break; \
+ case GL_BLUE: \
+ for (i=0;i<n;i++) \
+ dst[i] = (TYPE) rgba[i][BCOMP]; \
+ break; \
+ case GL_ALPHA: \
+ for (i=0;i<n;i++) \
+ dst[i] = (TYPE) rgba[i][ACOMP]; \
+ break; \
+ case GL_LUMINANCE: \
+ for (i=0;i<n;i++) \
+ dst[i] = (TYPE) luminance[i]; \
+ break; \
+ case GL_LUMINANCE_ALPHA: \
+ for (i=0;i<n;i++) { \
+ dst[i*2+0] = (TYPE) luminance[i]; \
+ dst[i*2+1] = (TYPE) rgba[i][ACOMP]; \
+ } \
+ break; \
+ case GL_RGB: \
+ for (i=0;i<n;i++) { \
+ dst[i*3+0] = (TYPE) rgba[i][RCOMP]; \
+ dst[i*3+1] = (TYPE) rgba[i][GCOMP]; \
+ dst[i*3+2] = (TYPE) rgba[i][BCOMP]; \
+ } \
+ break; \
+ case GL_RGBA: \
+ for (i=0;i<n;i++) { \
+ dst[i*4+0] = (TYPE) rgba[i][RCOMP]; \
+ dst[i*4+1] = (TYPE) rgba[i][GCOMP]; \
+ dst[i*4+2] = (TYPE) rgba[i][BCOMP]; \
+ dst[i*4+3] = (TYPE) rgba[i][ACOMP]; \
+ } \
+ break; \
+ case GL_BGR: \
+ for (i=0;i<n;i++) { \
+ dst[i*3+0] = (TYPE) rgba[i][BCOMP]; \
+ dst[i*3+1] = (TYPE) rgba[i][GCOMP]; \
+ dst[i*3+2] = (TYPE) rgba[i][RCOMP]; \
+ } \
+ break; \
+ case GL_BGRA: \
+ for (i=0;i<n;i++) { \
+ dst[i*4+0] = (TYPE) rgba[i][BCOMP]; \
+ dst[i*4+1] = (TYPE) rgba[i][GCOMP]; \
+ dst[i*4+2] = (TYPE) rgba[i][RCOMP]; \
+ dst[i*4+3] = (TYPE) rgba[i][ACOMP]; \
+ } \
+ break; \
+ case GL_ABGR_EXT: \
+ for (i=0;i<n;i++) { \
+ dst[i*4+0] = (TYPE) rgba[i][ACOMP]; \
+ dst[i*4+1] = (TYPE) rgba[i][BCOMP]; \
+ dst[i*4+2] = (TYPE) rgba[i][GCOMP]; \
+ dst[i*4+3] = (TYPE) rgba[i][RCOMP]; \
+ } \
+ break; \
+ default: \
+ gl_problem(ctx, "bad format in pack_histogram"); \
+ } \
+ }
-void _mesa_ConvolutionParameterfv(GLenum target, GLenum pname, const GLfloat *params)
-{
- (void) target;
- (void) pname;
- (void) params;
- WARNING("glConvolutionParameterfv");
-}
+ switch (type) {
+ case GL_UNSIGNED_BYTE:
+ {
+ GLubyte *dst = (GLubyte *) destination;
+ PACK_MACRO(GLubyte);
+ }
+ break;
+ case GL_BYTE:
+ {
+ GLbyte *dst = (GLbyte *) destination;
+ PACK_MACRO(GLbyte);
+ }
+ break;
+ case GL_UNSIGNED_SHORT:
+ {
+ GLushort *dst = (GLushort *) destination;
+ PACK_MACRO(GLushort);
+ if (packing->SwapBytes) {
+ _mesa_swap2(dst, n * comps);
+ }
+ }
+ break;
+ case GL_SHORT:
+ {
+ GLshort *dst = (GLshort *) destination;
+ PACK_MACRO(GLshort);
+ if (packing->SwapBytes) {
+ _mesa_swap2((GLushort *) dst, n * comps);
+ }
+ }
+ break;
+ case GL_UNSIGNED_INT:
+ {
+ GLuint *dst = (GLuint *) destination;
+ PACK_MACRO(GLuint);
+ if (packing->SwapBytes) {
+ _mesa_swap4(dst, n * comps);
+ }
+ }
+ break;
+ case GL_INT:
+ {
+ GLint *dst = (GLint *) destination;
+ PACK_MACRO(GLint);
+ if (packing->SwapBytes) {
+ _mesa_swap4((GLuint *) dst, n * comps);
+ }
+ }
+ break;
+ case GL_FLOAT:
+ {
+ GLfloat *dst = (GLfloat *) destination;
+ PACK_MACRO(GLfloat);
+ if (packing->SwapBytes) {
+ _mesa_swap4((GLuint *) dst, n * comps);
+ }
+ }
+ break;
+ default:
+ gl_problem(ctx, "Bad type in pack_histogram");
+ }
-void _mesa_ConvolutionParameteri(GLenum target, GLenum pname, GLint params)
-{
- (void) target;
- (void) pname;
- (void) params;
- WARNING("glConvolutionParameteri");
+#undef PACK_MACRO
}
-void _mesa_ConvolutionParameteriv(GLenum target, GLenum pname, const GLint *params)
-{
- (void) target;
- (void) pname;
- (void) params;
- WARNING("glConvolutionParameteriv");
-}
-void _mesa_CopyConvolutionFilter1D(GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width)
-{
- (void) target;
- (void) internalformat;
- (void) x;
- (void) y;
- (void) width;
- WARNING("glCopyConvolutionFilter1D");
-}
-void _mesa_CopyConvolutionFilter2D(GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height)
+static void
+pack_minmax( GLcontext *ctx, CONST GLfloat minmax[2][4],
+ GLenum format, GLenum type, GLvoid *destination,
+ const struct gl_pixelstore_attrib *packing )
{
- (void) target;
- (void) internalformat;
- (void) x;
- (void) y;
- (void) width;
- (void) height;
- WARNING("glCopyConvolutionFilter2D");
-}
+ const GLint comps = _mesa_components_in_format(format);
+ GLuint luminance[2];
-void _mesa_GetConvolutionFilter(GLenum target, GLenum format, GLenum type, GLvoid *image)
-{
- (void) target;
- (void) format;
- (void) type;
- (void) image;
- WARNING("glGetConvolutionFilter");
+ if (format == GL_LUMINANCE || format == GL_LUMINANCE_ALPHA) {
+ luminance[0] = minmax[0][RCOMP] + minmax[0][GCOMP] + minmax[0][BCOMP];
+ luminance[1] = minmax[1][RCOMP] + minmax[1][GCOMP] + minmax[1][BCOMP];
+ }
+
+#define PACK_MACRO(TYPE, CONVERSION) \
+ { \
+ GLuint i; \
+ switch (format) { \
+ case GL_RED: \
+ for (i=0;i<2;i++) \
+ dst[i] = CONVERSION (minmax[i][RCOMP]); \
+ break; \
+ case GL_GREEN: \
+ for (i=0;i<2;i++) \
+ dst[i] = CONVERSION (minmax[i][GCOMP]); \
+ break; \
+ case GL_BLUE: \
+ for (i=0;i<2;i++) \
+ dst[i] = CONVERSION (minmax[i][BCOMP]); \
+ break; \
+ case GL_ALPHA: \
+ for (i=0;i<2;i++) \
+ dst[i] = CONVERSION (minmax[i][ACOMP]); \
+ break; \
+ case GL_LUMINANCE: \
+ for (i=0;i<2;i++) \
+ dst[i] = CONVERSION (luminance[i]); \
+ break; \
+ case GL_LUMINANCE_ALPHA: \
+ for (i=0;i<2;i++) { \
+ dst[i*2+0] = CONVERSION (luminance[i]); \
+ dst[i*2+1] = CONVERSION (minmax[i][ACOMP]); \
+ } \
+ break; \
+ case GL_RGB: \
+ for (i=0;i<2;i++) { \
+ dst[i*3+0] = CONVERSION (minmax[i][RCOMP]); \
+ dst[i*3+1] = CONVERSION (minmax[i][GCOMP]); \
+ dst[i*3+2] = CONVERSION (minmax[i][BCOMP]); \
+ } \
+ break; \
+ case GL_RGBA: \
+ for (i=0;i<2;i++) { \
+ dst[i*4+0] = CONVERSION (minmax[i][RCOMP]); \
+ dst[i*4+1] = CONVERSION (minmax[i][GCOMP]); \
+ dst[i*4+2] = CONVERSION (minmax[i][BCOMP]); \
+ dst[i*4+3] = CONVERSION (minmax[i][ACOMP]); \
+ } \
+ break; \
+ case GL_BGR: \
+ for (i=0;i<2;i++) { \
+ dst[i*3+0] = CONVERSION (minmax[i][BCOMP]); \
+ dst[i*3+1] = CONVERSION (minmax[i][GCOMP]); \
+ dst[i*3+2] = CONVERSION (minmax[i][RCOMP]); \
+ } \
+ break; \
+ case GL_BGRA: \
+ for (i=0;i<2;i++) { \
+ dst[i*4+0] = CONVERSION (minmax[i][BCOMP]); \
+ dst[i*4+1] = CONVERSION (minmax[i][GCOMP]); \
+ dst[i*4+2] = CONVERSION (minmax[i][RCOMP]); \
+ dst[i*4+3] = CONVERSION (minmax[i][ACOMP]); \
+ } \
+ break; \
+ case GL_ABGR_EXT: \
+ for (i=0;i<2;i++) { \
+ dst[i*4+0] = CONVERSION (minmax[i][ACOMP]); \
+ dst[i*4+1] = CONVERSION (minmax[i][BCOMP]); \
+ dst[i*4+2] = CONVERSION (minmax[i][GCOMP]); \
+ dst[i*4+3] = CONVERSION (minmax[i][RCOMP]); \
+ } \
+ break; \
+ default: \
+ gl_problem(ctx, "bad format in pack_minmax"); \
+ } \
+ }
+
+ switch (type) {
+ case GL_UNSIGNED_BYTE:
+ {
+ GLubyte *dst = (GLubyte *) destination;
+ PACK_MACRO(GLubyte, FLOAT_TO_UBYTE);
+ }
+ break;
+ case GL_BYTE:
+ {
+ GLbyte *dst = (GLbyte *) destination;
+ PACK_MACRO(GLbyte, FLOAT_TO_BYTE);
+ }
+ break;
+ case GL_UNSIGNED_SHORT:
+ {
+ GLushort *dst = (GLushort *) destination;
+ PACK_MACRO(GLushort, FLOAT_TO_USHORT);
+ if (packing->SwapBytes) {
+ _mesa_swap2(dst, 2 * comps);
+ }
+ }
+ break;
+ case GL_SHORT:
+ {
+ GLshort *dst = (GLshort *) destination;
+ PACK_MACRO(GLshort, FLOAT_TO_SHORT);
+ if (packing->SwapBytes) {
+ _mesa_swap2((GLushort *) dst, 2 * comps);
+ }
+ }
+ break;
+ case GL_UNSIGNED_INT:
+ {
+ GLuint *dst = (GLuint *) destination;
+ PACK_MACRO(GLuint, FLOAT_TO_UINT);
+ if (packing->SwapBytes) {
+ _mesa_swap4(dst, 2 * comps);
+ }
+ }
+ break;
+ case GL_INT:
+ {
+ GLint *dst = (GLint *) destination;
+ PACK_MACRO(GLint, FLOAT_TO_INT);
+ if (packing->SwapBytes) {
+ _mesa_swap4((GLuint *) dst, 2 * comps);
+ }
+ }
+ break;
+ case GL_FLOAT:
+ {
+ GLfloat *dst = (GLfloat *) destination;
+ PACK_MACRO(GLfloat, (GLfloat));
+ if (packing->SwapBytes) {
+ _mesa_swap4((GLuint *) dst, 2 * comps);
+ }
+ }
+ break;
+ default:
+ gl_problem(ctx, "Bad type in pack_minmax");
+ }
+
+#undef PACK_MACRO
}
-void _mesa_GetConvolutionParameterfv(GLenum target, GLenum pname, GLfloat *params)
+
+/*
+ * Given an internalFormat token passed to glHistogram or glMinMax,
+ * return the corresponding base format.
+ * Return -1 if invalid token.
+ */
+static GLint
+base_histogram_format( GLenum format )
{
- (void) target;
- (void) pname;
- (void) params;
- WARNING("glGetConvolutionParameterfv");
+ switch (format) {
+ case GL_ALPHA:
+ case GL_ALPHA4:
+ case GL_ALPHA8:
+ case GL_ALPHA12:
+ case GL_ALPHA16:
+ return GL_ALPHA;
+ case GL_LUMINANCE:
+ case GL_LUMINANCE4:
+ case GL_LUMINANCE8:
+ case GL_LUMINANCE12:
+ case GL_LUMINANCE16:
+ return GL_LUMINANCE;
+ case GL_LUMINANCE_ALPHA:
+ case GL_LUMINANCE4_ALPHA4:
+ case GL_LUMINANCE6_ALPHA2:
+ case GL_LUMINANCE8_ALPHA8:
+ case GL_LUMINANCE12_ALPHA4:
+ case GL_LUMINANCE12_ALPHA12:
+ case GL_LUMINANCE16_ALPHA16:
+ return GL_LUMINANCE_ALPHA;
+ case GL_RGB:
+ case GL_R3_G3_B2:
+ case GL_RGB4:
+ case GL_RGB5:
+ case GL_RGB8:
+ case GL_RGB10:
+ case GL_RGB12:
+ case GL_RGB16:
+ return GL_RGB;
+ case GL_RGBA:
+ case GL_RGBA2:
+ case GL_RGBA4:
+ case GL_RGB5_A1:
+ case GL_RGBA8:
+ case GL_RGB10_A2:
+ case GL_RGBA12:
+ case GL_RGBA16:
+ return GL_RGBA;
+ default:
+ return -1; /* error */
+ }
}
-void _mesa_GetConvolutionParameteriv(GLenum target, GLenum pname, GLint *params)
+
+/*
+ * Given an internalFormat token passed to glConvolutionFilter
+ * or glSeparableFilter, return the corresponding base format.
+ * Return -1 if invalid token.
+ */
+static GLint
+base_filter_format( GLenum format )
{
- (void) target;
- (void) pname;
- (void) params;
- WARNING("glGetConvolutionParameteriv");
+ switch (format) {
+ case GL_ALPHA:
+ case GL_ALPHA4:
+ case GL_ALPHA8:
+ case GL_ALPHA12:
+ case GL_ALPHA16:
+ return GL_ALPHA;
+ case GL_LUMINANCE:
+ case GL_LUMINANCE4:
+ case GL_LUMINANCE8:
+ case GL_LUMINANCE12:
+ case GL_LUMINANCE16:
+ return GL_LUMINANCE;
+ case GL_LUMINANCE_ALPHA:
+ case GL_LUMINANCE4_ALPHA4:
+ case GL_LUMINANCE6_ALPHA2:
+ case GL_LUMINANCE8_ALPHA8:
+ case GL_LUMINANCE12_ALPHA4:
+ case GL_LUMINANCE12_ALPHA12:
+ case GL_LUMINANCE16_ALPHA16:
+ return GL_LUMINANCE_ALPHA;
+ case GL_INTENSITY:
+ case GL_INTENSITY4:
+ case GL_INTENSITY8:
+ case GL_INTENSITY12:
+ case GL_INTENSITY16:
+ return GL_INTENSITY;
+ case GL_RGB:
+ case GL_R3_G3_B2:
+ case GL_RGB4:
+ case GL_RGB5:
+ case GL_RGB8:
+ case GL_RGB10:
+ case GL_RGB12:
+ case GL_RGB16:
+ return GL_RGB;
+ case 4:
+ case GL_RGBA:
+ case GL_RGBA2:
+ case GL_RGBA4:
+ case GL_RGB5_A1:
+ case GL_RGBA8:
+ case GL_RGB10_A2:
+ case GL_RGBA12:
+ case GL_RGBA16:
+ return GL_RGBA;
+ default:
+ return -1; /* error */
+ }
}
-void _mesa_GetMinmax(GLenum target, GLboolean reset, GLenum format, GLenum types, GLvoid *values)
+
+void
+_mesa_GetMinmax(GLenum target, GLboolean reset, GLenum format, GLenum type, GLvoid *values)
{
- (void) target;
- (void) reset;
- (void) format;
- (void) types;
- (void) values;
- WARNING("glGetMinmax");
+ GET_CURRENT_CONTEXT(ctx);
+ ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx, "glGetHistogram");
+
+ if (target != GL_MINMAX) {
+ gl_error(ctx, GL_INVALID_ENUM, "glGetMinmax(target)");
+ return;
+ }
+
+ if (format != GL_RED &&
+ format != GL_GREEN &&
+ format != GL_BLUE &&
+ format != GL_ALPHA &&
+ format != GL_RGB &&
+ format != GL_RGBA &&
+ format != GL_ABGR_EXT &&
+ format != GL_LUMINANCE &&
+ format != GL_LUMINANCE_ALPHA) {
+ gl_error(ctx, GL_INVALID_ENUM, "glGetMinmax(format)");
+ return;
+ }
+
+ if (type != GL_UNSIGNED_BYTE &&
+ type != GL_BYTE &&
+ type != GL_UNSIGNED_SHORT &&
+ type != GL_SHORT &&
+ type != GL_UNSIGNED_INT &&
+ type != GL_INT &&
+ type != GL_FLOAT) {
+ gl_error(ctx, GL_INVALID_ENUM, "glGetMinmax(type)");
+ return;
+ }
+
+ if (!values)
+ return;
+
+ {
+ GLfloat minmax[2][4];
+ minmax[0][RCOMP] = CLAMP(ctx->MinMax.Min[RCOMP], 0.0F, 1.0F);
+ minmax[0][GCOMP] = CLAMP(ctx->MinMax.Min[GCOMP], 0.0F, 1.0F);
+ minmax[0][BCOMP] = CLAMP(ctx->MinMax.Min[BCOMP], 0.0F, 1.0F);
+ minmax[0][ACOMP] = CLAMP(ctx->MinMax.Min[ACOMP], 0.0F, 1.0F);
+ minmax[1][RCOMP] = CLAMP(ctx->MinMax.Max[RCOMP], 0.0F, 1.0F);
+ minmax[1][GCOMP] = CLAMP(ctx->MinMax.Max[GCOMP], 0.0F, 1.0F);
+ minmax[1][BCOMP] = CLAMP(ctx->MinMax.Max[BCOMP], 0.0F, 1.0F);
+ minmax[1][ACOMP] = CLAMP(ctx->MinMax.Max[ACOMP], 0.0F, 1.0F);
+ pack_minmax(ctx, (CONST GLfloat (*)[4]) minmax,
+ format, type, values, &ctx->Pack);
+ }
+
+ if (reset) {
+ _mesa_ResetMinmax(GL_MINMAX);
+ }
}
-void _mesa_GetHistogram(GLenum target, GLboolean reset, GLenum format, GLenum type, GLvoid *values)
+
+void
+_mesa_GetHistogram(GLenum target, GLboolean reset, GLenum format, GLenum type, GLvoid *values)
{
GET_CURRENT_CONTEXT(ctx);
ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx, "glGetHistogram");
- WARNING("glGetHistogram");
-
if (target != GL_HISTOGRAM) {
gl_error(ctx, GL_INVALID_ENUM, "glGetHistogram(target)");
return;
@@ -198,8 +562,12 @@ void _mesa_GetHistogram(GLenum target, GLboolean reset, GLenum format, GLenum ty
return;
}
- /* XXX return values */
+ if (!values)
+ return;
+ pack_histogram(ctx, ctx->Histogram.Width,
+ (CONST GLuint (*)[4]) ctx->Histogram.Count,
+ format, type, values, &ctx->Pack);
if (reset) {
GLuint i;
@@ -341,18 +709,6 @@ _mesa_GetMinmaxParameteriv(GLenum target, GLenum pname, GLint *params)
}
-void _mesa_GetSeparableFilter(GLenum target, GLenum format, GLenum type, GLvoid *row, GLvoid *column, GLvoid *span)
-{
- (void) target;
- (void) format;
- (void) type;
- (void) row;
- (void) column;
- (void) span;
- WARNING("glGetSeperableFilter");
-}
-
-
void
_mesa_Histogram(GLenum target, GLsizei width, GLenum internalFormat, GLboolean sink)
{
@@ -361,9 +717,6 @@ _mesa_Histogram(GLenum target, GLsizei width, GLenum internalFormat, GLboolean s
GET_CURRENT_CONTEXT(ctx);
ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx, "glHistogram");
- WARNING("glHistogram");
- return;
-
if (target != GL_HISTOGRAM && target != GL_PROXY_HISTOGRAM) {
gl_error(ctx, GL_INVALID_ENUM, "glHistogram(target)");
return;
@@ -392,16 +745,7 @@ _mesa_Histogram(GLenum target, GLsizei width, GLenum internalFormat, GLboolean s
}
}
- if (_mesa_base_tex_format(internalFormat) < 0 ||
- internalFormat == 1 ||
- internalFormat == 2 ||
- internalFormat == 3 ||
- internalFormat == 4 ||
- internalFormat == GL_INTENSITY ||
- internalFormat == GL_INTENSITY4 ||
- internalFormat == GL_INTENSITY8 ||
- internalFormat == GL_INTENSITY12 ||
- internalFormat == GL_INTENSITY16) {
+ if (base_histogram_format(internalFormat) < 0) {
if (target == GL_PROXY_HISTOGRAM) {
error = GL_TRUE;
}
@@ -452,16 +796,7 @@ _mesa_Minmax(GLenum target, GLenum internalFormat, GLboolean sink)
return;
}
- if (_mesa_base_tex_format(internalFormat) < 0 ||
- internalFormat == 1 ||
- internalFormat == 2 ||
- internalFormat == 3 ||
- internalFormat == 4 ||
- internalFormat == GL_INTENSITY ||
- internalFormat == GL_INTENSITY4 ||
- internalFormat == GL_INTENSITY8 ||
- internalFormat == GL_INTENSITY12 ||
- internalFormat == GL_INTENSITY16) {
+ if (base_histogram_format(internalFormat) < 0) {
gl_error(ctx, GL_INVALID_ENUM, "glMinMax(internalFormat)");
return;
}
@@ -477,8 +812,6 @@ _mesa_ResetHistogram(GLenum target)
GET_CURRENT_CONTEXT(ctx);
ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx, "glResetHistogram");
- WARNING("glResetHistogram");
-
if (target != GL_HISTOGRAM) {
gl_error(ctx, GL_INVALID_ENUM, "glResetHistogram(target)");
return;
@@ -499,8 +832,6 @@ _mesa_ResetMinmax(GLenum target)
GET_CURRENT_CONTEXT(ctx);
ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx, "glResetMinmax");
- WARNING("glResetMinmax");
-
if (target != GL_MINMAX) {
gl_error(ctx, GL_INVALID_ENUM, "glResetMinMax(target)");
return;
@@ -513,20 +844,6 @@ _mesa_ResetMinmax(GLenum target)
}
-void
-_mesa_SeparableFilter2D(GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *row, const GLvoid *column)
-{
- (void) target;
- (void) internalformat;
- (void) width;
- (void) height;
- (void) format;
- (void) type;
- (void) row;
- (void) column;
- WARNING("glSeparableFilter2D");
-}
-
/*
* Update the min/max values from an array of fragment colors.
@@ -549,11 +866,11 @@ _mesa_update_minmax(GLcontext *ctx, GLuint n, const GLfloat rgba[][4])
/* update maxs */
if (rgba[i][RCOMP] > ctx->MinMax.Max[RCOMP])
ctx->MinMax.Max[RCOMP] = rgba[i][RCOMP];
- if (rgba[i][GCOMP] < ctx->MinMax.Max[GCOMP])
+ if (rgba[i][GCOMP] > ctx->MinMax.Max[GCOMP])
ctx->MinMax.Max[GCOMP] = rgba[i][GCOMP];
- if (rgba[i][BCOMP] < ctx->MinMax.Max[BCOMP])
+ if (rgba[i][BCOMP] > ctx->MinMax.Max[BCOMP])
ctx->MinMax.Max[BCOMP] = rgba[i][BCOMP];
- if (rgba[i][ACOMP] < ctx->MinMax.Max[ACOMP])
+ if (rgba[i][ACOMP] > ctx->MinMax.Max[ACOMP])
ctx->MinMax.Max[ACOMP] = rgba[i][ACOMP];
}
}
@@ -563,23 +880,738 @@ _mesa_update_minmax(GLcontext *ctx, GLuint n, const GLfloat rgba[][4])
* Update the histogram values from an array of fragment colors.
*/
void
-_mesa_update_histogram(GLcontext *ctx, GLuint n, const GLchan rgba[][4])
+_mesa_update_histogram(GLcontext *ctx, GLuint n, const GLfloat rgba[][4])
{
+ const GLint max = ctx->Histogram.Width - 1;
+ GLfloat w = (GLfloat) max;
GLuint i;
- switch (ctx->Histogram.Format) {
- case GL_RGBA:
- for (i = 0; i < n; i++) {
- GLubyte r = rgba[i][RCOMP];
- GLubyte g = rgba[i][GCOMP];
- GLubyte b = rgba[i][BCOMP];
- GLubyte a = rgba[i][ACOMP];
- ctx->Histogram.Count[r][RCOMP]++;
- ctx->Histogram.Count[g][RCOMP]++;
- ctx->Histogram.Count[b][RCOMP]++;
- ctx->Histogram.Count[a][RCOMP]++;
+
+ if (ctx->Histogram.Width == 0)
+ return;
+
+ for (i = 0; i < n; i++) {
+ GLint ri = (GLint) (rgba[i][RCOMP] * w + 0.5F);
+ GLint gi = (GLint) (rgba[i][GCOMP] * w + 0.5F);
+ GLint bi = (GLint) (rgba[i][BCOMP] * w + 0.5F);
+ GLint ai = (GLint) (rgba[i][ACOMP] * w + 0.5F);
+ ri = CLAMP(ri, 0, max);
+ gi = CLAMP(gi, 0, max);
+ bi = CLAMP(bi, 0, max);
+ ai = CLAMP(ai, 0, max);
+ ctx->Histogram.Count[ri][RCOMP]++;
+ ctx->Histogram.Count[gi][GCOMP]++;
+ ctx->Histogram.Count[bi][BCOMP]++;
+ ctx->Histogram.Count[ai][ACOMP]++;
+ }
+}
+
+
+
+/**********************************************************************/
+/**** Convolution *****/
+/**********************************************************************/
+
+void
+_mesa_ConvolutionFilter1D(GLenum target, GLenum internalFormat, GLsizei width, GLenum format, GLenum type, const GLvoid *image)
+{
+ GLenum baseFormat;
+ GET_CURRENT_CONTEXT(ctx);
+ ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx, "glConvolutionFilter1D");
+
+ if (target != GL_CONVOLUTION_1D) {
+ gl_error(ctx, GL_INVALID_ENUM, "glConvolutionFilter1D(target)");
+ return;
+ }
+
+ baseFormat = base_filter_format(internalFormat);
+ if (baseFormat < 0 || baseFormat == GL_COLOR_INDEX) {
+ gl_error(ctx, GL_INVALID_ENUM, "glConvolutionFilter1D(internalFormat)");
+ return;
+ }
+
+ if (width < 0 || width > MAX_CONVOLUTION_WIDTH) {
+ gl_error(ctx, GL_INVALID_VALUE, "glConvolutionFilter1D(width)");
+ return;
+ }
+
+ if (!_mesa_is_legal_format_and_type(format, type) ||
+ format == GL_COLOR_INDEX ||
+ format == GL_STENCIL_INDEX ||
+ format == GL_DEPTH_COMPONENT ||
+ type == GL_BITMAP) {
+ gl_error(ctx, GL_INVALID_ENUM, "glConvolutionFilter1D(format or type)");
+ return;
+ }
+
+ ctx->Convolution1D.Format = format;
+ ctx->Convolution1D.InternalFormat = internalFormat;
+ ctx->Convolution1D.Width = width;
+ ctx->Convolution1D.Height = 1;
+
+ /* unpack filter image and apply scale and bias */
+ _mesa_unpack_float_color_span(ctx, width, GL_RGBA,
+ ctx->Convolution1D.Filter,
+ format, type, image, &ctx->Unpack,
+ GL_FALSE, GL_FALSE);
+ {
+ const GLfloat *scale = ctx->Pixel.ConvolutionFilterScale[0];
+ const GLfloat *bias = ctx->Pixel.ConvolutionFilterBias[0];
+ GLint i;
+ for (i = 0; i < width; i++) {
+ GLfloat r = ctx->Convolution1D.Filter[i * 4 + 0];
+ GLfloat g = ctx->Convolution1D.Filter[i * 4 + 1];
+ GLfloat b = ctx->Convolution1D.Filter[i * 4 + 2];
+ GLfloat a = ctx->Convolution1D.Filter[i * 4 + 3];
+ r = r * scale[0] + bias[0];
+ g = g * scale[1] + bias[1];
+ b = b * scale[2] + bias[2];
+ a = a * scale[3] + bias[3];
+ ctx->Convolution1D.Filter[i * 4 + 0] = r;
+ ctx->Convolution1D.Filter[i * 4 + 1] = g;
+ ctx->Convolution1D.Filter[i * 4 + 2] = b;
+ ctx->Convolution1D.Filter[i * 4 + 3] = a;
+ }
+ }
+}
+
+
+void
+_mesa_ConvolutionFilter2D(GLenum target, GLenum internalFormat, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *image)
+{
+ GLenum baseFormat;
+ GLint i, components;
+ GET_CURRENT_CONTEXT(ctx);
+ ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx, "glConvolutionFilter2D");
+
+ if (target != GL_CONVOLUTION_2D) {
+ gl_error(ctx, GL_INVALID_ENUM, "glConvolutionFilter2D(target)");
+ return;
+ }
+
+ baseFormat = base_filter_format(internalFormat);
+ if (baseFormat < 0 || baseFormat == GL_COLOR_INDEX) {
+ gl_error(ctx, GL_INVALID_ENUM, "glConvolutionFilter2D(internalFormat)");
+ return;
+ }
+
+ if (width < 0 || width > MAX_CONVOLUTION_WIDTH) {
+ gl_error(ctx, GL_INVALID_VALUE, "glConvolutionFilter2D(width)");
+ return;
+ }
+ if (height < 0 || height > MAX_CONVOLUTION_HEIGHT) {
+ gl_error(ctx, GL_INVALID_VALUE, "glConvolutionFilter2D(height)");
+ return;
+ }
+
+ if (!_mesa_is_legal_format_and_type(format, type) ||
+ format == GL_COLOR_INDEX ||
+ format == GL_STENCIL_INDEX ||
+ format == GL_DEPTH_COMPONENT ||
+ type == GL_BITMAP) {
+ gl_error(ctx, GL_INVALID_ENUM, "glConvolutionFilter2D(format or type)");
+ return;
+ }
+
+ components = _mesa_components_in_format(format);
+ assert(components > 0); /* this should have been caught earlier */
+
+ ctx->Convolution2D.Format = format;
+ ctx->Convolution2D.InternalFormat = internalFormat;
+ ctx->Convolution2D.Width = width;
+ ctx->Convolution2D.Height = height;
+
+ /* unpack filter image and apply scale and bias */
+ for (i = 0; i < height; i++) {
+ const GLvoid *src = _mesa_image_address(&ctx->Unpack, image, width,
+ height, format, type, 0, i, 0);
+ GLfloat *dst = ctx->Convolution2D.Filter + i * width * components;
+ _mesa_unpack_float_color_span(ctx, width, GL_RGBA, dst,
+ format, type, src, &ctx->Unpack,
+ GL_FALSE, GL_FALSE);
+ }
+
+ {
+ const GLfloat *scale = ctx->Pixel.ConvolutionFilterScale[1];
+ const GLfloat *bias = ctx->Pixel.ConvolutionFilterBias[1];
+ for (i = 0; i < width * height * 4; i++) {
+ GLfloat r = ctx->Convolution2D.Filter[i * 4 + 0];
+ GLfloat g = ctx->Convolution2D.Filter[i * 4 + 1];
+ GLfloat b = ctx->Convolution2D.Filter[i * 4 + 2];
+ GLfloat a = ctx->Convolution2D.Filter[i * 4 + 3];
+ r = r * scale[0] + bias[0];
+ g = g * scale[1] + bias[1];
+ b = b * scale[2] + bias[2];
+ a = a * scale[3] + bias[3];
+ ctx->Convolution2D.Filter[i * 4 + 0] = r;
+ ctx->Convolution2D.Filter[i * 4 + 1] = g;
+ ctx->Convolution2D.Filter[i * 4 + 2] = b;
+ ctx->Convolution2D.Filter[i * 4 + 3] = a;
+ }
+ }
+}
+
+
+void
+_mesa_ConvolutionParameterf(GLenum target, GLenum pname, GLfloat param)
+{
+ GET_CURRENT_CONTEXT(ctx);
+ GLuint c;
+
+ ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx, "glConvolutionParameterf");
+
+ switch (target) {
+ case GL_CONVOLUTION_1D:
+ c = 0;
+ break;
+ case GL_CONVOLUTION_2D:
+ c = 1;
+ break;
+ case GL_SEPARABLE_2D:
+ c = 2;
+ break;
+ default:
+ gl_error(ctx, GL_INVALID_ENUM, "glConvolutionParameterf(target)");
+ return;
+ }
+
+ switch (pname) {
+ case GL_CONVOLUTION_BORDER_MODE:
+ if (param == (GLfloat) GL_REDUCE ||
+ param == (GLfloat) GL_CONSTANT_BORDER ||
+ param == (GLfloat) GL_REPLICATE_BORDER) {
+ ctx->Pixel.ConvolutionBorderMode[c] = (GLenum) param;
+ }
+ else {
+ gl_error(ctx, GL_INVALID_ENUM, "glConvolutionParameterf(params)");
+ return;
}
break;
default:
- gl_problem(ctx, "Bad format in _mesa_update_histogram()");
+ gl_error(ctx, GL_INVALID_ENUM, "glConvolutionParameterf(pname)");
+ return;
}
}
+
+
+void
+_mesa_ConvolutionParameterfv(GLenum target, GLenum pname, const GLfloat *params)
+{
+ GET_CURRENT_CONTEXT(ctx);
+ struct gl_convolution_attrib *conv;
+ GLuint c;
+
+ ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx, "glConvolutionParameterfv");
+
+ switch (target) {
+ case GL_CONVOLUTION_1D:
+ c = 0;
+ conv = &ctx->Convolution1D;
+ break;
+ case GL_CONVOLUTION_2D:
+ c = 1;
+ conv = &ctx->Convolution2D;
+ break;
+ case GL_SEPARABLE_2D:
+ c = 2;
+ conv = &ctx->Separable2D;
+ break;
+ default:
+ gl_error(ctx, GL_INVALID_ENUM, "glConvolutionParameterfv(target)");
+ return;
+ }
+
+ switch (pname) {
+ case GL_CONVOLUTION_BORDER_COLOR:
+ COPY_4V(ctx->Pixel.ConvolutionBorderColor[c], params);
+ break;
+ case GL_CONVOLUTION_BORDER_MODE:
+ if (params[0] == (GLfloat) GL_REDUCE ||
+ params[0] == (GLfloat) GL_CONSTANT_BORDER ||
+ params[0] == (GLfloat) GL_REPLICATE_BORDER) {
+ ctx->Pixel.ConvolutionBorderMode[c] = (GLenum) params[0];
+ }
+ else {
+ gl_error(ctx, GL_INVALID_ENUM, "glConvolutionParameterfv(params)");
+ return;
+ }
+ break;
+ case GL_CONVOLUTION_FILTER_SCALE:
+ COPY_4V(ctx->Pixel.ConvolutionFilterScale[c], params);
+ break;
+ case GL_CONVOLUTION_FILTER_BIAS:
+ COPY_4V(ctx->Pixel.ConvolutionFilterBias[c], params);
+ break;
+ default:
+ gl_error(ctx, GL_INVALID_ENUM, "glConvolutionParameterfv(pname)");
+ return;
+ }
+}
+
+
+void
+_mesa_ConvolutionParameteri(GLenum target, GLenum pname, GLint param)
+{
+ GET_CURRENT_CONTEXT(ctx);
+ GLuint c;
+
+ ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx, "glConvolutionParameteri");
+
+ switch (target) {
+ case GL_CONVOLUTION_1D:
+ c = 0;
+ break;
+ case GL_CONVOLUTION_2D:
+ c = 1;
+ break;
+ case GL_SEPARABLE_2D:
+ c = 2;
+ break;
+ default:
+ gl_error(ctx, GL_INVALID_ENUM, "glConvolutionParameteri(target)");
+ return;
+ }
+
+ switch (pname) {
+ case GL_CONVOLUTION_BORDER_MODE:
+ if (param == (GLint) GL_REDUCE ||
+ param == (GLint) GL_CONSTANT_BORDER ||
+ param == (GLint) GL_REPLICATE_BORDER) {
+ ctx->Pixel.ConvolutionBorderMode[c] = (GLenum) param;
+ }
+ else {
+ gl_error(ctx, GL_INVALID_ENUM, "glConvolutionParameteri(params)");
+ return;
+ }
+ break;
+ default:
+ gl_error(ctx, GL_INVALID_ENUM, "glConvolutionParameteri(pname)");
+ return;
+ }
+}
+
+
+void
+_mesa_ConvolutionParameteriv(GLenum target, GLenum pname, const GLint *params)
+{
+ GET_CURRENT_CONTEXT(ctx);
+ struct gl_convolution_attrib *conv;
+ GLuint c;
+
+ ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx, "glConvolutionParameteriv");
+
+ switch (target) {
+ case GL_CONVOLUTION_1D:
+ c = 0;
+ conv = &ctx->Convolution1D;
+ break;
+ case GL_CONVOLUTION_2D:
+ c = 1;
+ conv = &ctx->Convolution2D;
+ break;
+ case GL_SEPARABLE_2D:
+ c = 2;
+ conv = &ctx->Separable2D;
+ break;
+ default:
+ gl_error(ctx, GL_INVALID_ENUM, "glConvolutionParameteriv(target)");
+ return;
+ }
+
+ switch (pname) {
+ case GL_CONVOLUTION_BORDER_COLOR:
+ ctx->Pixel.ConvolutionBorderColor[c][0] = INT_TO_FLOAT(params[0]);
+ ctx->Pixel.ConvolutionBorderColor[c][1] = INT_TO_FLOAT(params[1]);
+ ctx->Pixel.ConvolutionBorderColor[c][2] = INT_TO_FLOAT(params[2]);
+ ctx->Pixel.ConvolutionBorderColor[c][3] = INT_TO_FLOAT(params[3]);
+ break;
+ case GL_CONVOLUTION_BORDER_MODE:
+ if (params[0] == (GLint) GL_REDUCE ||
+ params[0] == (GLint) GL_CONSTANT_BORDER ||
+ params[0] == (GLint) GL_REPLICATE_BORDER) {
+ ctx->Pixel.ConvolutionBorderMode[c] = (GLenum) params[0];
+ }
+ else {
+ gl_error(ctx, GL_INVALID_ENUM, "glConvolutionParameteriv(params)");
+ return;
+ }
+ break;
+ case GL_CONVOLUTION_FILTER_SCALE:
+ COPY_4V(ctx->Pixel.ConvolutionFilterScale[c], params);
+ break;
+ case GL_CONVOLUTION_FILTER_BIAS:
+ COPY_4V(ctx->Pixel.ConvolutionFilterBias[c], params);
+ break;
+ default:
+ gl_error(ctx, GL_INVALID_ENUM, "glConvolutionParameteriv(pname)");
+ return;
+ }
+}
+
+
+void
+_mesa_CopyConvolutionFilter1D(GLenum target, GLenum internalFormat, GLint x, GLint y, GLsizei width)
+{
+ GLenum baseFormat;
+ GLfloat rgba[MAX_CONVOLUTION_WIDTH][4];
+ GET_CURRENT_CONTEXT(ctx);
+ ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx, "glCopyConvolutionFilter1D");
+
+ if (target != GL_CONVOLUTION_1D) {
+ gl_error(ctx, GL_INVALID_ENUM, "glCopyConvolutionFilter1D(target)");
+ return;
+ }
+
+ baseFormat = base_filter_format(internalFormat);
+ if (baseFormat < 0 || baseFormat == GL_COLOR_INDEX) {
+ gl_error(ctx, GL_INVALID_ENUM, "glCopyConvolutionFilter1D(internalFormat)");
+ return;
+ }
+
+ if (width < 0 || width > MAX_CONVOLUTION_WIDTH) {
+ gl_error(ctx, GL_INVALID_VALUE, "glCopyConvolutionFilter1D(width)");
+ return;
+ }
+
+ /* read pixels from framebuffer */
+ gl_read_rgba_span(ctx, ctx->ReadBuffer, width, x, y, (GLubyte (*)[4]) rgba);
+
+ /* store as convolution filter */
+ _mesa_ConvolutionFilter1D(target, internalFormat, width,
+ GL_RGBA, GL_UNSIGNED_BYTE, rgba);
+}
+
+
+void
+_mesa_CopyConvolutionFilter2D(GLenum target, GLenum internalFormat, GLint x, GLint y, GLsizei width, GLsizei height)
+{
+ GLenum baseFormat;
+ GLint i;
+ struct gl_pixelstore_attrib packSave;
+ GLfloat rgba[MAX_CONVOLUTION_HEIGHT][MAX_CONVOLUTION_WIDTH][4];
+ GET_CURRENT_CONTEXT(ctx);
+ ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx, "glCopyConvolutionFilter2D");
+
+ if (target != GL_CONVOLUTION_2D) {
+ gl_error(ctx, GL_INVALID_ENUM, "glCopyConvolutionFilter2D(target)");
+ return;
+ }
+
+ baseFormat = base_filter_format(internalFormat);
+ if (baseFormat < 0 || baseFormat == GL_COLOR_INDEX) {
+ gl_error(ctx, GL_INVALID_ENUM, "glCopyConvolutionFilter2D(internalFormat)");
+ return;
+ }
+
+ if (width < 0 || width > MAX_CONVOLUTION_WIDTH) {
+ gl_error(ctx, GL_INVALID_VALUE, "glCopyConvolutionFilter2D(width)");
+ return;
+ }
+ if (height < 0 || height > MAX_CONVOLUTION_HEIGHT) {
+ gl_error(ctx, GL_INVALID_VALUE, "glCopyConvolutionFilter2D(height)");
+ return;
+ }
+
+ /* read pixels from framebuffer */
+ for (i = 0; i < height; i++) {
+ gl_read_rgba_span(ctx, ctx->ReadBuffer, width, x, y + i,
+ (GLubyte (*)[4]) rgba[i]);
+ }
+
+ /*
+ * store as convolution filter
+ */
+ packSave = ctx->Unpack; /* save pixel packing params */
+
+ ctx->Unpack.Alignment = 1;
+ ctx->Unpack.RowLength = MAX_CONVOLUTION_WIDTH;
+ ctx->Unpack.SkipPixels = 0;
+ ctx->Unpack.SkipRows = 0;
+ ctx->Unpack.ImageHeight = 0;
+ ctx->Unpack.SkipImages = 0;
+ ctx->Unpack.SwapBytes = GL_FALSE;
+ ctx->Unpack.LsbFirst = GL_FALSE;
+
+ _mesa_ConvolutionFilter2D(target, internalFormat, width, height,
+ GL_RGBA, GL_UNSIGNED_BYTE, rgba);
+
+ ctx->Unpack = packSave; /* restore pixel packing params */
+}
+
+
+void
+_mesa_GetConvolutionFilter(GLenum target, GLenum format, GLenum type, GLvoid *image)
+{
+ GET_CURRENT_CONTEXT(ctx);
+ ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx, "glGetConvolutionFilter");
+
+ if (target != GL_CONVOLUTION_1D && target != GL_CONVOLUTION_2D) {
+ gl_error(ctx, GL_INVALID_ENUM, "glGetConvolutionFilter(target)");
+ return;
+ }
+
+ if (!_mesa_is_legal_format_and_type(format, type) ||
+ format == GL_COLOR_INDEX ||
+ format == GL_STENCIL_INDEX ||
+ format == GL_DEPTH_COMPONENT ||
+ type == GL_BITMAP) {
+ gl_error(ctx, GL_INVALID_ENUM, "glGetConvolutionFilter(format or type)");
+ return;
+ }
+
+ (void) image;
+ /* XXX store image */
+}
+
+
+void
+_mesa_GetConvolutionParameterfv(GLenum target, GLenum pname, GLfloat *params)
+{
+ GET_CURRENT_CONTEXT(ctx);
+ const struct gl_convolution_attrib *conv;
+ GLuint c;
+
+ ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx, "glGetConvolutionParameterfv");
+
+ switch (target) {
+ case GL_CONVOLUTION_1D:
+ c = 0;
+ conv = &ctx->Convolution1D;
+ break;
+ case GL_CONVOLUTION_2D:
+ c = 1;
+ conv = &ctx->Convolution2D;
+ break;
+ case GL_SEPARABLE_2D:
+ c = 2;
+ conv = &ctx->Separable2D;
+ break;
+ default:
+ gl_error(ctx, GL_INVALID_ENUM, "glGetConvolutionParameterfv(target)");
+ return;
+ }
+
+ switch (pname) {
+ case GL_CONVOLUTION_BORDER_COLOR:
+ COPY_4V(params, ctx->Pixel.ConvolutionBorderColor[c]);
+ break;
+ case GL_CONVOLUTION_BORDER_MODE:
+ *params = (GLfloat) ctx->Pixel.ConvolutionBorderMode[c];
+ break;
+ case GL_CONVOLUTION_FILTER_SCALE:
+ COPY_4V(params, ctx->Pixel.ConvolutionFilterScale[c]);
+ break;
+ case GL_CONVOLUTION_FILTER_BIAS:
+ COPY_4V(params, ctx->Pixel.ConvolutionFilterBias[c]);
+ break;
+ case GL_CONVOLUTION_FORMAT:
+ *params = (GLfloat) conv->Format;
+ break;
+ case GL_CONVOLUTION_WIDTH:
+ *params = (GLfloat) conv->Width;
+ break;
+ case GL_CONVOLUTION_HEIGHT:
+ *params = (GLfloat) conv->Height;
+ break;
+ case GL_MAX_CONVOLUTION_WIDTH:
+ *params = (GLfloat) ctx->Const.MaxConvolutionWidth;
+ break;
+ case GL_MAX_CONVOLUTION_HEIGHT:
+ *params = (GLfloat) ctx->Const.MaxConvolutionHeight;
+ break;
+ default:
+ gl_error(ctx, GL_INVALID_ENUM, "glGetConvolutionParameterfv(pname)");
+ return;
+ }
+}
+
+
+void
+_mesa_GetConvolutionParameteriv(GLenum target, GLenum pname, GLint *params)
+{
+ GET_CURRENT_CONTEXT(ctx);
+ const struct gl_convolution_attrib *conv;
+ GLuint c;
+
+ ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx, "glGetConvolutionParameteriv");
+
+ switch (target) {
+ case GL_CONVOLUTION_1D:
+ c = 0;
+ conv = &ctx->Convolution1D;
+ break;
+ case GL_CONVOLUTION_2D:
+ c = 1;
+ conv = &ctx->Convolution2D;
+ break;
+ case GL_SEPARABLE_2D:
+ c = 2;
+ conv = &ctx->Separable2D;
+ break;
+ default:
+ gl_error(ctx, GL_INVALID_ENUM, "glGetConvolutionParameteriv(target)");
+ return;
+ }
+
+ switch (pname) {
+ case GL_CONVOLUTION_BORDER_COLOR:
+ params[0] = FLOAT_TO_INT(ctx->Pixel.ConvolutionBorderColor[c][0]);
+ params[1] = FLOAT_TO_INT(ctx->Pixel.ConvolutionBorderColor[c][1]);
+ params[2] = FLOAT_TO_INT(ctx->Pixel.ConvolutionBorderColor[c][2]);
+ params[3] = FLOAT_TO_INT(ctx->Pixel.ConvolutionBorderColor[c][3]);
+ break;
+ case GL_CONVOLUTION_BORDER_MODE:
+ *params = (GLint) ctx->Pixel.ConvolutionBorderMode;
+ break;
+ case GL_CONVOLUTION_FILTER_SCALE:
+ params[0] = (GLint) ctx->Pixel.ConvolutionFilterScale[c][0];
+ params[1] = (GLint) ctx->Pixel.ConvolutionFilterScale[c][1];
+ params[2] = (GLint) ctx->Pixel.ConvolutionFilterScale[c][2];
+ params[3] = (GLint) ctx->Pixel.ConvolutionFilterScale[c][3];
+ break;
+ case GL_CONVOLUTION_FILTER_BIAS:
+ params[0] = (GLint) ctx->Pixel.ConvolutionFilterBias[c][0];
+ params[1] = (GLint) ctx->Pixel.ConvolutionFilterBias[c][1];
+ params[2] = (GLint) ctx->Pixel.ConvolutionFilterBias[c][2];
+ params[3] = (GLint) ctx->Pixel.ConvolutionFilterBias[c][3];
+ break;
+ case GL_CONVOLUTION_FORMAT:
+ *params = (GLint) conv->Format;
+ break;
+ case GL_CONVOLUTION_WIDTH:
+ *params = (GLint) conv->Width;
+ break;
+ case GL_CONVOLUTION_HEIGHT:
+ *params = (GLint) conv->Height;
+ break;
+ case GL_MAX_CONVOLUTION_WIDTH:
+ *params = (GLint) ctx->Const.MaxConvolutionWidth;
+ break;
+ case GL_MAX_CONVOLUTION_HEIGHT:
+ *params = (GLint) ctx->Const.MaxConvolutionHeight;
+ break;
+ default:
+ gl_error(ctx, GL_INVALID_ENUM, "glGetConvolutionParameteriv(pname)");
+ return;
+ }
+}
+
+
+void
+_mesa_GetSeparableFilter(GLenum target, GLenum format, GLenum type, GLvoid *row, GLvoid *column, GLvoid *span)
+{
+ GET_CURRENT_CONTEXT(ctx);
+ ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx, "glGetSeparableFilter");
+
+ if (target != GL_SEPARABLE_2D) {
+ gl_error(ctx, GL_INVALID_ENUM, "glGetSeparableFilter(target)");
+ return;
+ }
+
+ if (!_mesa_is_legal_format_and_type(format, type) ||
+ format == GL_COLOR_INDEX ||
+ format == GL_STENCIL_INDEX ||
+ format == GL_DEPTH_COMPONENT ||
+ type == GL_BITMAP) {
+ gl_error(ctx, GL_INVALID_ENUM, "glGetConvolutionFilter(format or type)");
+ return;
+ }
+
+ (void) row;
+ (void) column;
+ (void) span;
+}
+
+
+void
+_mesa_SeparableFilter2D(GLenum target, GLenum internalFormat, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *row, const GLvoid *column)
+{
+ const GLint colStart = MAX_CONVOLUTION_WIDTH * 4;
+ GLenum baseFormat;
+ GET_CURRENT_CONTEXT(ctx);
+ ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx, "glSeparableFilter2D");
+
+ if (target != GL_SEPARABLE_2D) {
+ gl_error(ctx, GL_INVALID_ENUM, "glSeparableFilter2D(target)");
+ return;
+ }
+
+ baseFormat = base_filter_format(internalFormat);
+ if (baseFormat < 0 || baseFormat == GL_COLOR_INDEX) {
+ gl_error(ctx, GL_INVALID_ENUM, "glSeparableFilter2D(internalFormat)");
+ return;
+ }
+
+ if (width < 0 || width > MAX_CONVOLUTION_WIDTH) {
+ gl_error(ctx, GL_INVALID_VALUE, "glSeparableFilter2D(width)");
+ return;
+ }
+ if (height < 0 || height > MAX_CONVOLUTION_HEIGHT) {
+ gl_error(ctx, GL_INVALID_VALUE, "glSeparableFilter2D(height)");
+ return;
+ }
+
+ if (!_mesa_is_legal_format_and_type(format, type) ||
+ format == GL_COLOR_INDEX ||
+ format == GL_STENCIL_INDEX ||
+ format == GL_DEPTH_COMPONENT ||
+ type == GL_BITMAP) {
+ gl_error(ctx, GL_INVALID_ENUM, "glSeparableFilter2D(format or type)");
+ return;
+ }
+
+ ctx->Separable2D.Format = format;
+ ctx->Separable2D.InternalFormat = internalFormat;
+ ctx->Separable2D.Width = width;
+ ctx->Separable2D.Height = height;
+
+ /* unpack row filter */
+ _mesa_unpack_float_color_span(ctx, width, GL_RGBA,
+ ctx->Separable2D.Filter,
+ format, type, row, &ctx->Unpack,
+ GL_FALSE, GL_FALSE);
+ {
+ const GLfloat *scale = ctx->Pixel.ConvolutionFilterScale[2];
+ const GLfloat *bias = ctx->Pixel.ConvolutionFilterBias[2];
+ GLint i;
+ for (i = 0; i < width; i++) {
+ GLfloat r = ctx->Separable2D.Filter[i * 4 + 0];
+ GLfloat g = ctx->Separable2D.Filter[i * 4 + 1];
+ GLfloat b = ctx->Separable2D.Filter[i * 4 + 2];
+ GLfloat a = ctx->Separable2D.Filter[i * 4 + 3];
+ r = r * scale[0] + bias[0];
+ g = g * scale[1] + bias[1];
+ b = b * scale[2] + bias[2];
+ a = a * scale[3] + bias[3];
+ ctx->Separable2D.Filter[i * 4 + 0] = r;
+ ctx->Separable2D.Filter[i * 4 + 1] = g;
+ ctx->Separable2D.Filter[i * 4 + 2] = b;
+ ctx->Separable2D.Filter[i * 4 + 3] = a;
+ }
+ }
+
+ /* unpack column filter */
+ _mesa_unpack_float_color_span(ctx, width, GL_RGBA,
+ &ctx->Separable2D.Filter[colStart],
+ format, type, column, &ctx->Unpack,
+ GL_FALSE, GL_FALSE);
+ {
+ const GLfloat *scale = ctx->Pixel.ConvolutionFilterScale[2];
+ const GLfloat *bias = ctx->Pixel.ConvolutionFilterBias[2];
+ GLint i;
+ for (i = 0; i < width; i++) {
+ GLfloat r = ctx->Separable2D.Filter[i * 4 + 0 + colStart];
+ GLfloat g = ctx->Separable2D.Filter[i * 4 + 1 + colStart];
+ GLfloat b = ctx->Separable2D.Filter[i * 4 + 2 + colStart];
+ GLfloat a = ctx->Separable2D.Filter[i * 4 + 3 + colStart];
+ r = r * scale[0] + bias[0];
+ g = g * scale[1] + bias[1];
+ b = b * scale[2] + bias[2];
+ a = a * scale[3] + bias[3];
+ ctx->Separable2D.Filter[i * 4 + 0 + colStart] = r;
+ ctx->Separable2D.Filter[i * 4 + 1 + colStart] = g;
+ ctx->Separable2D.Filter[i * 4 + 2 + colStart] = b;
+ ctx->Separable2D.Filter[i * 4 + 3 + colStart] = a;
+ }
+ }
+}
+
diff --git a/xc/extras/Mesa/src/imaging.h b/xc/extras/Mesa/src/imaging.h
index 220a99576..1a4b9ccc6 100644
--- a/xc/extras/Mesa/src/imaging.h
+++ b/xc/extras/Mesa/src/imaging.h
@@ -88,7 +88,7 @@ extern void
_mesa_update_minmax(GLcontext *ctx, GLuint n, const GLfloat rgba[][4]);
extern void
-_mesa_update_histogram(GLcontext *ctx, GLuint n, const GLchan rgba[][4]);
+_mesa_update_histogram(GLcontext *ctx, GLuint n, const GLfloat rgba[][4]);
#endif
diff --git a/xc/extras/Mesa/src/lines.c b/xc/extras/Mesa/src/lines.c
index c97e8ee92..dd0649ba0 100644
--- a/xc/extras/Mesa/src/lines.c
+++ b/xc/extras/Mesa/src/lines.c
@@ -115,22 +115,13 @@ _mesa_LineStipple( GLint factor, GLushort pattern )
static void flat_ci_line( GLcontext *ctx,
GLuint vert0, GLuint vert1, GLuint pvert )
{
- GLint count;
- GLint *pbx = ctx->PB->x;
- GLint *pby = ctx->PB->y;
- PB_SET_INDEX( ctx, ctx->PB, ctx->VB->IndexPtr->data[pvert] );
- count = ctx->PB->count;
+ PB_SET_INDEX( ctx->PB, ctx->VB->IndexPtr->data[pvert] );
#define INTERP_XY 1
-
-#define PLOT(X,Y) \
- pbx[count] = X; \
- pby[count] = Y; \
- count++;
+#define PLOT(X,Y) PB_WRITE_PIXEL(ctx->PB, X, Y, 0);
#include "linetemp.h"
- ctx->PB->count = count;
gl_flush_pb(ctx);
}
@@ -140,25 +131,14 @@ static void flat_ci_line( GLcontext *ctx,
static void flat_ci_z_line( GLcontext *ctx,
GLuint vert0, GLuint vert1, GLuint pvert )
{
- GLint count;
- GLint *pbx = ctx->PB->x;
- GLint *pby = ctx->PB->y;
- GLdepth *pbz = ctx->PB->z;
- PB_SET_INDEX( ctx, ctx->PB, ctx->VB->IndexPtr->data[pvert] );
- count = ctx->PB->count;
+ PB_SET_INDEX( ctx->PB, ctx->VB->IndexPtr->data[pvert] );
#define INTERP_XY 1
#define INTERP_Z 1
-
-#define PLOT(X,Y) \
- pbx[count] = X; \
- pby[count] = Y; \
- pbz[count] = Z; \
- count++;
+#define PLOT(X,Y) PB_WRITE_PIXEL(ctx->PB, X, Y, Z);
#include "linetemp.h"
- ctx->PB->count = count;
gl_flush_pb(ctx);
}
@@ -168,23 +148,14 @@ static void flat_ci_z_line( GLcontext *ctx,
static void flat_rgba_line( GLcontext *ctx,
GLuint vert0, GLuint vert1, GLuint pvert )
{
- GLint count;
- GLint *pbx = ctx->PB->x;
- GLint *pby = ctx->PB->y;
- GLubyte *color = ctx->VB->ColorPtr->data[pvert];
- PB_SET_COLOR( ctx, ctx->PB, color[0], color[1], color[2], color[3] );
- count = ctx->PB->count;
+ const GLubyte *color = ctx->VB->ColorPtr->data[pvert];
+ PB_SET_COLOR( ctx->PB, color[0], color[1], color[2], color[3] );
#define INTERP_XY 1
-
-#define PLOT(X,Y) \
- pbx[count] = X; \
- pby[count] = Y; \
- count++;
+#define PLOT(X,Y) PB_WRITE_PIXEL(ctx->PB, X, Y, 0);
#include "linetemp.h"
- ctx->PB->count = count;
gl_flush_pb(ctx);
}
@@ -194,26 +165,15 @@ static void flat_rgba_line( GLcontext *ctx,
static void flat_rgba_z_line( GLcontext *ctx,
GLuint vert0, GLuint vert1, GLuint pvert )
{
- GLint count;
- GLint *pbx = ctx->PB->x;
- GLint *pby = ctx->PB->y;
- GLdepth *pbz = ctx->PB->z;
- GLubyte *color = ctx->VB->ColorPtr->data[pvert];
- PB_SET_COLOR( ctx, ctx->PB, color[0], color[1], color[2], color[3] );
- count = ctx->PB->count;
+ const GLubyte *color = ctx->VB->ColorPtr->data[pvert];
+ PB_SET_COLOR( ctx->PB, color[0], color[1], color[2], color[3] );
#define INTERP_XY 1
#define INTERP_Z 1
-
-#define PLOT(X,Y) \
- pbx[count] = X; \
- pby[count] = Y; \
- pbz[count] = Z; \
- count++;
+#define PLOT(X,Y) PB_WRITE_PIXEL(ctx->PB, X, Y, Z);
#include "linetemp.h"
- ctx->PB->count = count;
gl_flush_pb(ctx);
}
@@ -226,9 +186,11 @@ static void smooth_ci_line( GLcontext *ctx,
GLint count = ctx->PB->count;
GLint *pbx = ctx->PB->x;
GLint *pby = ctx->PB->y;
- GLuint *pbi = ctx->PB->i;
+ GLuint *pbi = ctx->PB->index;
(void) pvert;
+ ctx->PB->mono = GL_FALSE;
+
#define INTERP_XY 1
#define INTERP_INDEX 1
@@ -254,9 +216,11 @@ static void smooth_ci_z_line( GLcontext *ctx,
GLint *pbx = ctx->PB->x;
GLint *pby = ctx->PB->y;
GLdepth *pbz = ctx->PB->z;
- GLuint *pbi = ctx->PB->i;
+ GLuint *pbi = ctx->PB->index;
(void) pvert;
+ ctx->PB->mono = GL_FALSE;
+
#define INTERP_XY 1
#define INTERP_Z 1
#define INTERP_INDEX 1
@@ -286,6 +250,8 @@ static void smooth_rgba_line( GLcontext *ctx,
GLubyte (*pbrgba)[4] = ctx->PB->rgba;
(void) pvert;
+ ctx->PB->mono = GL_FALSE;
+
#define INTERP_XY 1
#define INTERP_RGB 1
#define INTERP_ALPHA 1
@@ -318,6 +284,8 @@ static void smooth_rgba_z_line( GLcontext *ctx,
GLubyte (*pbrgba)[4] = ctx->PB->rgba;
(void) pvert;
+ ctx->PB->mono = GL_FALSE;
+
#define INTERP_XY 1
#define INTERP_Z 1
#define INTERP_RGB 1
@@ -357,9 +325,11 @@ static void general_smooth_ci_line( GLcontext *ctx,
GLint *pbx = ctx->PB->x;
GLint *pby = ctx->PB->y;
GLdepth *pbz = ctx->PB->z;
- GLuint *pbi = ctx->PB->i;
+ GLuint *pbi = ctx->PB->index;
(void) pvert;
+ ctx->PB->mono = GL_FALSE;
+
if (ctx->Line.StippleFlag) {
/* stippled */
#define INTERP_XY 1
@@ -429,7 +399,7 @@ static void general_flat_ci_line( GLcontext *ctx,
GLint *pbx = ctx->PB->x;
GLint *pby = ctx->PB->y;
GLdepth *pbz = ctx->PB->z;
- PB_SET_INDEX( ctx, ctx->PB, ctx->VB->IndexPtr->data[pvert] );
+ PB_SET_INDEX( ctx->PB, ctx->VB->IndexPtr->data[pvert] );
count = ctx->PB->count;
if (ctx->Line.StippleFlag) {
@@ -497,6 +467,8 @@ static void general_smooth_rgba_line( GLcontext *ctx,
GLubyte (*pbrgba)[4] = ctx->PB->rgba;
(void) pvert;
+ ctx->PB->mono = GL_FALSE;
+
if (ctx->Line.StippleFlag) {
/* stippled */
#define INTERP_XY 1
@@ -589,7 +561,7 @@ static void general_flat_rgba_line( GLcontext *ctx,
GLint *pby = ctx->PB->y;
GLdepth *pbz = ctx->PB->z;
GLubyte *color = ctx->VB->ColorPtr->data[pvert];
- PB_SET_COLOR( ctx, ctx->PB, color[0], color[1], color[2], color[3] );
+ PB_SET_COLOR( ctx->PB, color[0], color[1], color[2], color[3] );
count = ctx->PB->count;
if (ctx->Line.StippleFlag) {
@@ -658,7 +630,7 @@ static void flat_textured_line( GLcontext *ctx,
GLfloat *pbt = ctx->PB->t[0];
GLfloat *pbu = ctx->PB->u[0];
GLubyte *color = ctx->VB->ColorPtr->data[pv];
- PB_SET_COLOR( ctx, ctx->PB, color[0], color[1], color[2], color[3] );
+ PB_SET_COLOR( ctx->PB, color[0], color[1], color[2], color[3] );
count = ctx->PB->count;
if (ctx->Line.StippleFlag) {
@@ -721,6 +693,8 @@ static void smooth_textured_line( GLcontext *ctx,
GLubyte (*pbrgba)[4] = ctx->PB->rgba;
(void) pvert;
+ ctx->PB->mono = GL_FALSE;
+
if (ctx->Line.StippleFlag) {
/* stippled */
#define INTERP_XY 1
@@ -798,6 +772,8 @@ static void smooth_multitextured_line( GLcontext *ctx,
GLubyte (*pbspec)[3] = ctx->PB->spec;
(void) pvert;
+ ctx->PB->mono = GL_FALSE;
+
if (ctx->Line.StippleFlag) {
/* stippled */
#define INTERP_XY 1
diff --git a/xc/extras/Mesa/src/lnaatemp.h b/xc/extras/Mesa/src/lnaatemp.h
index f09c74ef1..926ee49c3 100644
--- a/xc/extras/Mesa/src/lnaatemp.h
+++ b/xc/extras/Mesa/src/lnaatemp.h
@@ -100,6 +100,8 @@
if (dx == 0 && dy == 0)
return;
+ ctx->PB->mono = GL_FALSE;
+
if (depthBits <= 16) {
z0 = FloatToFixed(VB->Win.data[vert0][2]);
z1 = FloatToFixed(VB->Win.data[vert1][2]);
diff --git a/xc/extras/Mesa/src/mem.h b/xc/extras/Mesa/src/mem.h
index 6e9e00d73..794aa13ef 100644
--- a/xc/extras/Mesa/src/mem.h
+++ b/xc/extras/Mesa/src/mem.h
@@ -34,12 +34,14 @@
/*
* Memory allocation
*/
-#ifdef DEBUG
-
-/* call Mesa memory functions */
extern void *_mesa_malloc(size_t bytes);
extern void *_mesa_calloc(size_t bytes);
extern void _mesa_free(void *ptr);
+
+
+#ifdef DEBUG
+
+/* call Mesa memory functions */
#define MALLOC(BYTES) _mesa_malloc(BYTES)
#define CALLOC(BYTES) _mesa_calloc(BYTES)
#define MALLOC_STRUCT(T) (struct T *) _mesa_malloc(sizeof(struct T))
diff --git a/xc/extras/Mesa/src/pb.c b/xc/extras/Mesa/src/pb.c
index 9d5ec6e3d..78ff5d07e 100644
--- a/xc/extras/Mesa/src/pb.c
+++ b/xc/extras/Mesa/src/pb.c
@@ -69,10 +69,11 @@ struct pixel_buffer *gl_alloc_pb(void)
int i, j;
/* set non-zero fields */
pb->primitive = GL_BITMAP;
+ pb->mono = GL_TRUE;
+
/* Set all lambda values to 0.0 since we don't do mipmapping for
* points or lines and want to use the level 0 texture image.
*/
-
for (j=0;j<MAX_TEXTURE_UNITS;j++) {
for (i=0; i<PB_SIZE; i++) {
pb->lambda[j][i] = 0.0;
@@ -221,10 +222,13 @@ static void add_colors( GLuint n, GLubyte rgba[][4], CONST GLubyte spec[][3] )
*/
void gl_flush_pb( GLcontext *ctx )
{
- struct pixel_buffer* PB = ctx->PB;
+ /* Pixel colors may be changed if any of these raster ops enabled */
+ const GLuint modBits = FOG_BIT | TEXTURE_BIT | BLEND_BIT |
+ MASKING_BIT | LOGIC_OP_BIT;
+ struct pixel_buffer *PB = ctx->PB;
GLubyte mask[PB_SIZE];
- if (PB->count==0)
+ if (PB->count == 0)
goto CleanUp;
/* initialize mask array and clip pixels simultaneously */
@@ -245,19 +249,9 @@ void gl_flush_pb( GLcontext *ctx )
/*
* RGBA COLOR PIXELS
*/
- if (PB->mono && ctx->MutablePixels) {
- /* Copy mono color to all pixels */
- GLuint i;
- for (i=0; i<PB->count; i++) {
- PB->rgba[i][RCOMP] = PB->color[RCOMP];
- PB->rgba[i][GCOMP] = PB->color[GCOMP];
- PB->rgba[i][BCOMP] = PB->color[BCOMP];
- PB->rgba[i][ACOMP] = PB->color[ACOMP];
- }
- }
/* If each pixel can be of a different color... */
- if (ctx->MutablePixels || !PB->mono) {
+ if ((ctx->RasterMask & modBits) || !PB->mono) {
if (ctx->Texture.ReallyEnabled) {
int texUnit;
@@ -360,30 +354,21 @@ void gl_flush_pb( GLcontext *ctx )
if (ctx->RasterMask & MULTI_DRAW_BIT) {
/* Copy mono color to all pixels */
- GLuint i;
- for (i=0; i<PB->count; i++) {
- PB->rgba[i][RCOMP] = PB->color[RCOMP];
- PB->rgba[i][GCOMP] = PB->color[GCOMP];
- PB->rgba[i][BCOMP] = PB->color[BCOMP];
- PB->rgba[i][ACOMP] = PB->color[ACOMP];
- }
multi_write_rgba_pixels( ctx, PB->count, PB->x, PB->y,
(const GLubyte (*)[4]) PB->rgba, mask );
}
else {
/* normal case: write to exactly one buffer */
-
- GLubyte red, green, blue, alpha;
- red = PB->color[RCOMP];
- green = PB->color[GCOMP];
- blue = PB->color[BCOMP];
- alpha = PB->color[ACOMP];
+ GLubyte red = PB->currentColor[RCOMP];
+ GLubyte green = PB->currentColor[GCOMP];
+ GLubyte blue = PB->currentColor[BCOMP];
+ GLubyte alpha = PB->currentColor[ACOMP];
(*ctx->Driver.Color)( ctx, red, green, blue, alpha );
(*ctx->Driver.WriteMonoRGBAPixels)( ctx, PB->count, PB->x, PB->y, mask );
if (ctx->RasterMask & ALPHABUF_BIT) {
_mesa_write_mono_alpha_pixels( ctx, PB->count, PB->x, PB->y,
- PB->color[ACOMP], mask );
+ PB->currentColor[ACOMP], mask );
}
}
/*** ALL DONE ***/
@@ -395,21 +380,11 @@ void gl_flush_pb( GLcontext *ctx )
*/
/* If we may be writting pixels with different indexes... */
- if (PB->mono && ctx->MutablePixels) {
- /* copy index to all pixels */
- GLuint n = PB->count, indx = PB->index;
- GLuint *pbindex = PB->i;
- do {
- *pbindex++ = indx;
- n--;
- } while (n);
- }
-
- if (ctx->MutablePixels || !PB->mono) {
+ if ((ctx->RasterMask & modBits) || !PB->mono) {
if (ctx->Fog.Enabled
&& (ctx->Hint.Fog==GL_NICEST || PB->primitive==GL_BITMAP)) {
- _mesa_fog_ci_pixels( ctx, PB->count, PB->z, PB->i );
+ _mesa_fog_ci_pixels( ctx, PB->count, PB->z, PB->index );
}
/* Scissoring already done above */
@@ -427,20 +402,20 @@ void gl_flush_pb( GLcontext *ctx )
}
if (ctx->RasterMask & MULTI_DRAW_BIT) {
- multi_write_index_pixels( ctx, PB->count, PB->x, PB->y, PB->i, mask );
+ multi_write_index_pixels( ctx, PB->count, PB->x, PB->y, PB->index, mask );
}
else {
/* normal case: write to exactly one buffer */
if (ctx->Color.SWLogicOpEnabled) {
- _mesa_logicop_ci_pixels( ctx, PB->count, PB->x, PB->y, PB->i, mask );
+ _mesa_logicop_ci_pixels( ctx, PB->count, PB->x, PB->y, PB->index, mask );
}
if (ctx->Color.SWmasking) {
- _mesa_mask_index_pixels( ctx, PB->count, PB->x, PB->y, PB->i, mask );
+ _mesa_mask_index_pixels( ctx, PB->count, PB->x, PB->y, PB->index, mask );
}
(*ctx->Driver.WriteCI32Pixels)( ctx, PB->count, PB->x, PB->y,
- PB->i, mask );
+ PB->index, mask );
}
/*** ALL DONE ***/
@@ -463,19 +438,12 @@ void gl_flush_pb( GLcontext *ctx )
}
if (ctx->RasterMask & MULTI_DRAW_BIT) {
- GLuint n = PB->count, indx = PB->index;
- GLuint *pbindex = PB->i;
- do {
- *pbindex++ = indx;
- n--;
- } while (n);
-
- multi_write_index_pixels( ctx, PB->count, PB->x, PB->y, PB->i, mask );
+ multi_write_index_pixels( ctx, PB->count, PB->x, PB->y, PB->index, mask );
}
else {
/* normal case: write to exactly one buffer */
- (*ctx->Driver.Index)( ctx, PB->index );
+ (*ctx->Driver.Index)( ctx, PB->currentIndex );
(*ctx->Driver.WriteMonoCIPixels)( ctx, PB->count, PB->x, PB->y, mask );
}
}
@@ -483,6 +451,7 @@ void gl_flush_pb( GLcontext *ctx )
CleanUp:
PB->count = 0;
+ PB->mono = GL_TRUE;
}
diff --git a/xc/extras/Mesa/src/pb.h b/xc/extras/Mesa/src/pb.h
index 474aecb53..cf5fecc4b 100644
--- a/xc/extras/Mesa/src/pb.h
+++ b/xc/extras/Mesa/src/pb.h
@@ -38,21 +38,22 @@
struct pixel_buffer {
- GLint x[PB_SIZE]; /* X window coord in [0,MAX_WIDTH) */
- GLint y[PB_SIZE]; /* Y window coord in [0,MAX_HEIGHT) */
- GLdepth z[PB_SIZE]; /* Z window coord in [0,Visual.MaxDepth] */
- GLubyte rgba[PB_SIZE][4]; /* Colors */
- GLubyte spec[PB_SIZE][3]; /* Separate specular colors */
- GLuint i[PB_SIZE]; /* Index */
- GLfloat s[MAX_TEXTURE_UNITS][PB_SIZE]; /* Texture S coordinates */
- GLfloat t[MAX_TEXTURE_UNITS][PB_SIZE]; /* Texture T coordinates */
- GLfloat u[MAX_TEXTURE_UNITS][PB_SIZE]; /* Texture R coordinates */
- GLfloat lambda[MAX_TEXTURE_UNITS][PB_SIZE];/* Texture lambda values */
- GLint color[4]; /* Mono color, integers! */
- GLuint index; /* Mono index */
- GLuint count; /* Number of pixels in buffer */
- GLboolean mono; /* Same color or index for all pixels? */
- GLenum primitive; /* GL_POINT, GL_LINE, GL_POLYGON or GL_BITMAP*/
+ GLenum primitive; /* GL_POINT, GL_LINE, GL_POLYGON or GL_BITMAP */
+ GLubyte currentColor[4]; /* Current color, for subsequent pixels */
+ GLuint currentIndex; /* Current index, for subsequent pixels */
+ GLuint count; /* Number of pixels in buffer */
+ GLboolean mono; /* Same color or index for all pixels? */
+
+ GLint x[PB_SIZE]; /* X window coord in [0,MAX_WIDTH) */
+ GLint y[PB_SIZE]; /* Y window coord in [0,MAX_HEIGHT) */
+ GLdepth z[PB_SIZE]; /* Z window coord in [0,Visual.MaxDepth] */
+ GLubyte rgba[PB_SIZE][4]; /* Colors */
+ GLubyte spec[PB_SIZE][3]; /* Separate specular colors */
+ GLuint index[PB_SIZE]; /* Color indexes */
+ GLfloat s[MAX_TEXTURE_UNITS][PB_SIZE]; /* Texture S coordinates */
+ GLfloat t[MAX_TEXTURE_UNITS][PB_SIZE]; /* Texture T coordinates */
+ GLfloat u[MAX_TEXTURE_UNITS][PB_SIZE]; /* Texture R coordinates */
+ GLfloat lambda[MAX_TEXTURE_UNITS][PB_SIZE]; /* Texture lambda values */
};
@@ -60,136 +61,174 @@ struct pixel_buffer {
/*
* Set the color used for all subsequent pixels in the buffer.
*/
-#define PB_SET_COLOR( CTX, PB, R, G, B, A ) \
- if ((PB)->color[RCOMP]!=(R) || (PB)->color[GCOMP]!=(G) \
- || (PB)->color[BCOMP]!=(B) || (PB)->color[ACOMP]!=(A) \
- || !(PB)->mono) { \
- gl_flush_pb( ctx ); \
- } \
- (PB)->color[RCOMP] = R; \
- (PB)->color[GCOMP] = G; \
- (PB)->color[BCOMP] = B; \
- (PB)->color[ACOMP] = A; \
- (PB)->mono = GL_TRUE;
+#define PB_SET_COLOR( PB, R, G, B, A ) \
+do { \
+ if ((PB)->count > 0) \
+ (PB)->mono = GL_FALSE; \
+ (PB)->currentColor[RCOMP] = (R); \
+ (PB)->currentColor[GCOMP] = (G); \
+ (PB)->currentColor[BCOMP] = (B); \
+ (PB)->currentColor[ACOMP] = (A); \
+} while (0)
/*
* Set the color index used for all subsequent pixels in the buffer.
*/
-#define PB_SET_INDEX( CTX, PB, I ) \
- if ((PB)->index!=(I) || !(PB)->mono) { \
- gl_flush_pb( CTX ); \
- } \
- (PB)->index = I; \
- (PB)->mono = GL_TRUE;
+#define PB_SET_INDEX( PB, I ) \
+do { \
+ if ((PB)->count > 0) \
+ (PB)->mono = GL_FALSE; \
+ (PB)->currentIndex = (I); \
+} while (0)
/*
* "write" a pixel using current color or index
*/
-#define PB_WRITE_PIXEL( PB, X, Y, Z ) \
- (PB)->x[(PB)->count] = X; \
- (PB)->y[(PB)->count] = Y; \
- (PB)->z[(PB)->count] = Z; \
- (PB)->count++;
+#define PB_WRITE_PIXEL( PB, X, Y, Z ) \
+do { \
+ GLuint count = (PB)->count; \
+ (PB)->x[count] = X; \
+ (PB)->y[count] = Y; \
+ (PB)->z[count] = Z; \
+ COPY_4UBV((PB)->rgba[count], (PB)->currentColor); \
+ (PB)->index[count] = (PB)->currentIndex; \
+ (PB)->count++; \
+} while (0)
+
+
+/*
+ (PB)->rgba[count][0] = (PB)->currentColor[0]; \
+ (PB)->rgba[count][1] = (PB)->currentColor[1]; \
+ (PB)->rgba[count][2] = (PB)->currentColor[2]; \
+ (PB)->rgba[count][3] = (PB)->currentColor[3]; \
+
+*/
/*
* "write" an RGBA pixel
*/
#define PB_WRITE_RGBA_PIXEL( PB, X, Y, Z, R, G, B, A ) \
- (PB)->x[(PB)->count] = X; \
- (PB)->y[(PB)->count] = Y; \
- (PB)->z[(PB)->count] = Z; \
- (PB)->rgba[(PB)->count][RCOMP] = R; \
- (PB)->rgba[(PB)->count][GCOMP] = G; \
- (PB)->rgba[(PB)->count][BCOMP] = B; \
- (PB)->rgba[(PB)->count][ACOMP] = A; \
- (PB)->count++;
+do { \
+ GLuint count = (PB)->count; \
+ (PB)->x[count] = X; \
+ (PB)->y[count] = Y; \
+ (PB)->z[count] = Z; \
+ (PB)->rgba[count][RCOMP] = R; \
+ (PB)->rgba[count][GCOMP] = G; \
+ (PB)->rgba[count][BCOMP] = B; \
+ (PB)->rgba[count][ACOMP] = A; \
+ (PB)->mono = GL_FALSE; \
+ (PB)->count++; \
+} while (0)
+
/*
* "write" a color-index pixel
*/
#define PB_WRITE_CI_PIXEL( PB, X, Y, Z, I ) \
- (PB)->x[(PB)->count] = X; \
- (PB)->y[(PB)->count] = Y; \
- (PB)->z[(PB)->count] = Z; \
- (PB)->i[(PB)->count] = I; \
- (PB)->count++;
+do { \
+ GLuint count = (PB)->count; \
+ (PB)->x[count] = X; \
+ (PB)->y[count] = Y; \
+ (PB)->z[count] = Z; \
+ (PB)->index[count] = I; \
+ (PB)->mono = GL_FALSE; \
+ (PB)->count++; \
+} while (0)
+
/*
* "write" an RGBA pixel with texture coordinates
*/
#define PB_WRITE_TEX_PIXEL( PB, X, Y, Z, R, G, B, A, S, T, U ) \
- (PB)->x[(PB)->count] = X; \
- (PB)->y[(PB)->count] = Y; \
- (PB)->z[(PB)->count] = Z; \
- (PB)->rgba[(PB)->count][RCOMP] = R; \
- (PB)->rgba[(PB)->count][GCOMP] = G; \
- (PB)->rgba[(PB)->count][BCOMP] = B; \
- (PB)->rgba[(PB)->count][ACOMP] = A; \
- (PB)->s[0][(PB)->count] = S; \
- (PB)->t[0][(PB)->count] = T; \
- (PB)->u[0][(PB)->count] = U; \
- (PB)->count++;
+do { \
+ GLuint count = (PB)->count; \
+ (PB)->x[count] = X; \
+ (PB)->y[count] = Y; \
+ (PB)->z[count] = Z; \
+ (PB)->rgba[count][RCOMP] = R; \
+ (PB)->rgba[count][GCOMP] = G; \
+ (PB)->rgba[count][BCOMP] = B; \
+ (PB)->rgba[count][ACOMP] = A; \
+ (PB)->s[0][count] = S; \
+ (PB)->t[0][count] = T; \
+ (PB)->u[0][count] = U; \
+ (PB)->mono = GL_FALSE; \
+ (PB)->count++; \
+} while (0)
+
/*
* "write" an RGBA pixel with multiple texture coordinates
*/
-#define PB_WRITE_MULTITEX_PIXEL( PB, X, Y, Z, R, G, B, A, S, T, U, S1, T1, U1 ) \
- (PB)->x[(PB)->count] = X; \
- (PB)->y[(PB)->count] = Y; \
- (PB)->z[(PB)->count] = Z; \
- (PB)->rgba[(PB)->count][RCOMP] = R; \
- (PB)->rgba[(PB)->count][GCOMP] = G; \
- (PB)->rgba[(PB)->count][BCOMP] = B; \
- (PB)->rgba[(PB)->count][ACOMP] = A; \
- (PB)->s[0][(PB)->count] = S; \
- (PB)->t[0][(PB)->count] = T; \
- (PB)->u[0][(PB)->count] = U; \
- (PB)->s[1][(PB)->count] = S1; \
- (PB)->t[1][(PB)->count] = T1; \
- (PB)->u[1][(PB)->count] = U1; \
- (PB)->count++;
+#define PB_WRITE_MULTITEX_PIXEL( PB, X, Y, Z, R, G, B, A, S0, T0, U0, S1, T1, U1 ) \
+do { \
+ GLuint count = (PB)->count; \
+ (PB)->x[count] = X; \
+ (PB)->y[count] = Y; \
+ (PB)->z[count] = Z; \
+ (PB)->rgba[count][RCOMP] = R; \
+ (PB)->rgba[count][GCOMP] = G; \
+ (PB)->rgba[count][BCOMP] = B; \
+ (PB)->rgba[count][ACOMP] = A; \
+ (PB)->s[0][count] = S0; \
+ (PB)->t[0][count] = T0; \
+ (PB)->u[0][count] = U0; \
+ (PB)->s[1][count] = S1; \
+ (PB)->t[1][count] = T1; \
+ (PB)->u[1][count] = U1; \
+ (PB)->mono = GL_FALSE; \
+ (PB)->count++; \
+} while (0)
+
/*
* "write" an RGBA pixel with multiple texture coordinates and specular color
*/
#define PB_WRITE_MULTITEX_SPEC_PIXEL( PB, X, Y, Z, R, G, B, A, \
- SR, SG, SB, S, T, U, S1, T1, U1 ) \
- (PB)->x[(PB)->count] = X; \
- (PB)->y[(PB)->count] = Y; \
- (PB)->z[(PB)->count] = Z; \
- (PB)->rgba[(PB)->count][RCOMP] = R; \
- (PB)->rgba[(PB)->count][GCOMP] = G; \
- (PB)->rgba[(PB)->count][BCOMP] = B; \
- (PB)->rgba[(PB)->count][ACOMP] = A; \
- (PB)->spec[(PB)->count][RCOMP] = SR; \
- (PB)->spec[(PB)->count][GCOMP] = SG; \
- (PB)->spec[(PB)->count][BCOMP] = SB; \
- (PB)->s[0][(PB)->count] = S; \
- (PB)->t[0][(PB)->count] = T; \
- (PB)->u[0][(PB)->count] = U; \
- (PB)->s[1][(PB)->count] = S1; \
- (PB)->t[1][(PB)->count] = T1; \
- (PB)->u[1][(PB)->count] = U1; \
- (PB)->count++;
+ SR, SG, SB, S0, T0, U0, S1, T1, U1 ) \
+do { \
+ GLuint count = (PB)->count; \
+ (PB)->x[count] = X; \
+ (PB)->y[count] = Y; \
+ (PB)->z[count] = Z; \
+ (PB)->rgba[count][RCOMP] = R; \
+ (PB)->rgba[count][GCOMP] = G; \
+ (PB)->rgba[count][BCOMP] = B; \
+ (PB)->rgba[count][ACOMP] = A; \
+ (PB)->spec[count][RCOMP] = SR; \
+ (PB)->spec[count][GCOMP] = SG; \
+ (PB)->spec[count][BCOMP] = SB; \
+ (PB)->s[0][count] = S0; \
+ (PB)->t[0][count] = T0; \
+ (PB)->u[0][count] = U0; \
+ (PB)->s[1][count] = S1; \
+ (PB)->t[1][count] = T1; \
+ (PB)->u[1][count] = U1; \
+ (PB)->mono = GL_FALSE; \
+ (PB)->count++; \
+} while (0)
/*
* Call this function at least every MAX_WIDTH pixels:
*/
-#define PB_CHECK_FLUSH( CTX, PB ) \
-do { \
- if ((PB)->count>=PB_SIZE-MAX_WIDTH) { \
- gl_flush_pb( CTX ); \
- } \
+#define PB_CHECK_FLUSH( CTX, PB ) \
+do { \
+ if ((PB)->count >= PB_SIZE - MAX_WIDTH) { \
+ gl_flush_pb( CTX ); \
+ } \
} while(0)
+
extern struct pixel_buffer *gl_alloc_pb(void);
extern void gl_flush_pb( GLcontext *ctx );
+
#endif
diff --git a/xc/extras/Mesa/src/pixel.c b/xc/extras/Mesa/src/pixel.c
index e70f98414..17c6eb6bb 100644
--- a/xc/extras/Mesa/src/pixel.c
+++ b/xc/extras/Mesa/src/pixel.c
@@ -557,28 +557,52 @@ _mesa_PixelTransferf( GLenum pname, GLfloat param )
ctx->Pixel.DepthBias = param;
break;
case GL_POST_COLOR_MATRIX_RED_SCALE:
- ctx->Pixel.PostColorMatrixRedScale = param;
+ ctx->Pixel.PostColorMatrixScale[0] = param;
break;
case GL_POST_COLOR_MATRIX_RED_BIAS:
- ctx->Pixel.PostColorMatrixRedBias = param;
+ ctx->Pixel.PostColorMatrixBias[0] = param;
break;
case GL_POST_COLOR_MATRIX_GREEN_SCALE:
- ctx->Pixel.PostColorMatrixGreenScale = param;
+ ctx->Pixel.PostColorMatrixScale[1] = param;
break;
case GL_POST_COLOR_MATRIX_GREEN_BIAS:
- ctx->Pixel.PostColorMatrixGreenBias = param;
+ ctx->Pixel.PostColorMatrixBias[1] = param;
break;
case GL_POST_COLOR_MATRIX_BLUE_SCALE:
- ctx->Pixel.PostColorMatrixBlueScale = param;
+ ctx->Pixel.PostColorMatrixScale[2] = param;
break;
case GL_POST_COLOR_MATRIX_BLUE_BIAS:
- ctx->Pixel.PostColorMatrixBlueBias = param;
+ ctx->Pixel.PostColorMatrixBias[2] = param;
break;
case GL_POST_COLOR_MATRIX_ALPHA_SCALE:
- ctx->Pixel.PostColorMatrixAlphaScale = param;
+ ctx->Pixel.PostColorMatrixScale[3] = param;
break;
case GL_POST_COLOR_MATRIX_ALPHA_BIAS:
- ctx->Pixel.PostColorMatrixAlphaBias = param;
+ ctx->Pixel.PostColorMatrixBias[3] = param;
+ break;
+ case GL_POST_CONVOLUTION_RED_SCALE:
+ ctx->Pixel.PostConvolutionScale[0] = param;
+ break;
+ case GL_POST_CONVOLUTION_RED_BIAS:
+ ctx->Pixel.PostConvolutionBias[0] = param;
+ break;
+ case GL_POST_CONVOLUTION_GREEN_SCALE:
+ ctx->Pixel.PostConvolutionScale[1] = param;
+ break;
+ case GL_POST_CONVOLUTION_GREEN_BIAS:
+ ctx->Pixel.PostConvolutionBias[1] = param;
+ break;
+ case GL_POST_CONVOLUTION_BLUE_SCALE:
+ ctx->Pixel.PostConvolutionScale[2] = param;
+ break;
+ case GL_POST_CONVOLUTION_BLUE_BIAS:
+ ctx->Pixel.PostConvolutionBias[2] = param;
+ break;
+ case GL_POST_CONVOLUTION_ALPHA_SCALE:
+ ctx->Pixel.PostConvolutionScale[2] = param;
+ break;
+ case GL_POST_CONVOLUTION_ALPHA_BIAS:
+ ctx->Pixel.PostConvolutionBias[2] = param;
break;
default:
gl_error( ctx, GL_INVALID_ENUM, "glPixelTransfer(pname)" );
@@ -595,14 +619,14 @@ _mesa_PixelTransferf( GLenum pname, GLfloat param )
ctx->Pixel.ScaleOrBiasRGBA = GL_FALSE;
}
- if (ctx->Pixel.PostColorMatrixRedScale!=1.0F ||
- ctx->Pixel.PostColorMatrixRedBias!=0.0F ||
- ctx->Pixel.PostColorMatrixGreenScale!=1.0F ||
- ctx->Pixel.PostColorMatrixGreenBias!=0.0F ||
- ctx->Pixel.PostColorMatrixBlueScale!=1.0F ||
- ctx->Pixel.PostColorMatrixBlueBias!=0.0F ||
- ctx->Pixel.PostColorMatrixAlphaScale!=1.0F ||
- ctx->Pixel.PostColorMatrixAlphaBias!=0.0F) {
+ if (ctx->Pixel.PostColorMatrixScale[0] != 1.0F ||
+ ctx->Pixel.PostColorMatrixBias[0] != 0.0F ||
+ ctx->Pixel.PostColorMatrixScale[1] != 1.0F ||
+ ctx->Pixel.PostColorMatrixBias[1] != 0.0F ||
+ ctx->Pixel.PostColorMatrixScale[2] != 1.0F ||
+ ctx->Pixel.PostColorMatrixBias[2] != 0.0F ||
+ ctx->Pixel.PostColorMatrixScale[3] != 1.0F ||
+ ctx->Pixel.PostColorMatrixBias[3] != 0.0F) {
ctx->Pixel.ScaleOrBiasRGBApcm = GL_TRUE;
}
else {
@@ -695,14 +719,14 @@ _mesa_map_rgba( const GLcontext *ctx, GLuint n, GLfloat rgba[][4] )
void
_mesa_transform_rgba(const GLcontext *ctx, GLuint n, GLfloat rgba[][4])
{
- const GLfloat rs = ctx->Pixel.PostColorMatrixRedScale;
- const GLfloat rb = ctx->Pixel.PostColorMatrixRedBias;
- const GLfloat gs = ctx->Pixel.PostColorMatrixGreenScale;
- const GLfloat gb = ctx->Pixel.PostColorMatrixGreenBias;
- const GLfloat bs = ctx->Pixel.PostColorMatrixBlueScale;
- const GLfloat bb = ctx->Pixel.PostColorMatrixBlueBias;
- const GLfloat as = ctx->Pixel.PostColorMatrixAlphaScale;
- const GLfloat ab = ctx->Pixel.PostColorMatrixAlphaBias;
+ const GLfloat rs = ctx->Pixel.PostColorMatrixScale[0];
+ const GLfloat rb = ctx->Pixel.PostColorMatrixBias[0];
+ const GLfloat gs = ctx->Pixel.PostColorMatrixScale[1];
+ const GLfloat gb = ctx->Pixel.PostColorMatrixBias[1];
+ const GLfloat bs = ctx->Pixel.PostColorMatrixScale[2];
+ const GLfloat bb = ctx->Pixel.PostColorMatrixBias[2];
+ const GLfloat as = ctx->Pixel.PostColorMatrixScale[3];
+ const GLfloat ab = ctx->Pixel.PostColorMatrixBias[3];
const GLfloat *m = ctx->ColorMatrix.m;
GLuint i;
for (i = 0; i < n; i++) {
diff --git a/xc/extras/Mesa/src/points.c b/xc/extras/Mesa/src/points.c
index 9c77ac3a6..77d1e0de0 100644
--- a/xc/extras/Mesa/src/points.c
+++ b/xc/extras/Mesa/src/points.c
@@ -53,10 +53,12 @@ _mesa_PointSize( GLfloat size )
return;
}
- if (ctx->Point.Size != size) {
- ctx->Point.Size = size;
+ if (ctx->Point.UserSize != size) {
+ ctx->Point.UserSize = size;
+ ctx->Point.Size = CLAMP(size, ctx->Const.MinPointSize, ctx->Const.MaxPointSize);
ctx->TriangleCaps &= ~DD_POINT_SIZE;
- if (size != 1.0) ctx->TriangleCaps |= DD_POINT_SIZE;
+ if (size != 1.0)
+ ctx->TriangleCaps |= DD_POINT_SIZE;
ctx->NewState |= NEW_RASTER_OPS;
}
}
@@ -145,20 +147,21 @@ _mesa_PointParameterfvEXT( GLenum pname, const GLfloat *params)
/*
* CI points with size == 1.0
*/
-static void size1_ci_points( GLcontext *ctx, GLuint first, GLuint last )
+static void
+size1_ci_points( GLcontext *ctx, GLuint first, GLuint last )
{
struct vertex_buffer *VB = ctx->VB;
struct pixel_buffer *PB = ctx->PB;
GLfloat *win;
GLint *pbx = PB->x, *pby = PB->y;
GLdepth *pbz = PB->z;
- GLuint *pbi = PB->i;
+ GLuint *pbi = PB->index;
GLuint pbcount = PB->count;
GLuint i;
win = &VB->Win.data[first][0];
- for (i=first;i<=last;i++) {
- if (VB->ClipMask[i]==0) {
+ for (i = first; i <= last; i++) {
+ if (VB->ClipMask[i] == 0) {
pbx[pbcount] = (GLint) win[0];
pby[pbcount] = (GLint) win[1];
pbz[pbcount] = (GLint) (win[2] + ctx->PointZoffset);
@@ -176,14 +179,15 @@ static void size1_ci_points( GLcontext *ctx, GLuint first, GLuint last )
/*
* RGBA points with size == 1.0
*/
-static void size1_rgba_points( GLcontext *ctx, GLuint first, GLuint last )
+static void
+size1_rgba_points( GLcontext *ctx, GLuint first, GLuint last )
{
struct vertex_buffer *VB = ctx->VB;
struct pixel_buffer *PB = ctx->PB;
GLuint i;
- for (i=first;i<=last;i++) {
- if (VB->ClipMask[i]==0) {
+ for (i = first; i <= last; i++) {
+ if (VB->ClipMask[i] == 0) {
GLint x, y, z;
GLint red, green, blue, alpha;
@@ -199,7 +203,7 @@ static void size1_rgba_points( GLcontext *ctx, GLuint first, GLuint last )
PB_WRITE_RGBA_PIXEL( PB, x, y, z, red, green, blue, alpha );
}
}
- PB_CHECK_FLUSH(ctx,PB);
+ PB_CHECK_FLUSH(ctx, PB);
}
@@ -207,23 +211,23 @@ static void size1_rgba_points( GLcontext *ctx, GLuint first, GLuint last )
/*
* General CI points.
*/
-static void general_ci_points( GLcontext *ctx, GLuint first, GLuint last )
+static void
+general_ci_points( GLcontext *ctx, GLuint first, GLuint last )
{
struct vertex_buffer *VB = ctx->VB;
struct pixel_buffer *PB = ctx->PB;
- GLuint i;
- GLint isize = (GLint) (CLAMP(ctx->Point.Size,MIN_POINT_SIZE,MAX_POINT_SIZE) + 0.5F);
+ const GLint isize = (GLint) (ctx->Point.Size + 0.5F);
GLint radius = isize >> 1;
+ GLuint i;
- for (i=first;i<=last;i++) {
- if (VB->ClipMask[i]==0) {
- GLint x, y, z;
+ for (i = first; i <= last; i++) {
+ if (VB->ClipMask[i] == 0) {
GLint x0, x1, y0, y1;
GLint ix, iy;
- x = (GLint) VB->Win.data[i][0];
- y = (GLint) VB->Win.data[i][1];
- z = (GLint) (VB->Win.data[i][2] + ctx->PointZoffset);
+ GLint x = (GLint) VB->Win.data[i][0];
+ GLint y = (GLint) VB->Win.data[i][1];
+ GLint z = (GLint) (VB->Win.data[i][2] + ctx->PointZoffset);
if (isize & 1) {
/* odd size */
@@ -240,10 +244,10 @@ static void general_ci_points( GLcontext *ctx, GLuint first, GLuint last )
y1 = y0 + isize - 1;
}
- PB_SET_INDEX( ctx, PB, VB->IndexPtr->data[i] );
+ PB_SET_INDEX( PB, VB->IndexPtr->data[i] );
- for (iy=y0;iy<=y1;iy++) {
- for (ix=x0;ix<=x1;ix++) {
+ for (iy = y0; iy <= y1; iy++) {
+ for (ix = x0; ix <= x1; ix++) {
PB_WRITE_PIXEL( PB, ix, iy, z );
}
}
@@ -256,23 +260,23 @@ static void general_ci_points( GLcontext *ctx, GLuint first, GLuint last )
/*
* General RGBA points.
*/
-static void general_rgba_points( GLcontext *ctx, GLuint first, GLuint last )
+static void
+general_rgba_points( GLcontext *ctx, GLuint first, GLuint last )
{
struct vertex_buffer *VB = ctx->VB;
struct pixel_buffer *PB = ctx->PB;
- GLuint i;
- GLint isize = (GLint) (CLAMP(ctx->Point.Size,MIN_POINT_SIZE,MAX_POINT_SIZE) + 0.5F);
+ GLint isize = (GLint) (ctx->Point.Size + 0.5F);
GLint radius = isize >> 1;
+ GLuint i;
- for (i=first;i<=last;i++) {
- if (VB->ClipMask[i]==0) {
- GLint x, y, z;
+ for (i = first; i <= last; i++) {
+ if (VB->ClipMask[i] == 0) {
GLint x0, x1, y0, y1;
GLint ix, iy;
- x = (GLint) VB->Win.data[i][0];
- y = (GLint) VB->Win.data[i][1];
- z = (GLint) (VB->Win.data[i][2] + ctx->PointZoffset);
+ GLint x = (GLint) VB->Win.data[i][0];
+ GLint y = (GLint) VB->Win.data[i][1];
+ GLint z = (GLint) (VB->Win.data[i][2] + ctx->PointZoffset);
if (isize & 1) {
/* odd size */
@@ -289,14 +293,14 @@ static void general_rgba_points( GLcontext *ctx, GLuint first, GLuint last )
y1 = y0 + isize - 1;
}
- PB_SET_COLOR( ctx, PB,
+ PB_SET_COLOR( PB,
VB->ColorPtr->data[i][0],
VB->ColorPtr->data[i][1],
VB->ColorPtr->data[i][2],
VB->ColorPtr->data[i][3] );
- for (iy=y0;iy<=y1;iy++) {
- for (ix=x0;ix<=x1;ix++) {
+ for (iy = y0; iy <= y1; iy++) {
+ for (ix = x0; ix <= x1; ix++) {
PB_WRITE_PIXEL( PB, ix, iy, z );
}
}
@@ -311,28 +315,26 @@ static void general_rgba_points( GLcontext *ctx, GLuint first, GLuint last )
/*
* Textured RGBA points.
*/
-static void textured_rgba_points( GLcontext *ctx, GLuint first, GLuint last )
+static void
+textured_rgba_points( GLcontext *ctx, GLuint first, GLuint last )
{
struct vertex_buffer *VB = ctx->VB;
struct pixel_buffer *PB = ctx->PB;
GLuint i;
- for (i=first;i<=last;i++) {
- if (VB->ClipMask[i]==0) {
- GLint x, y, z;
+ for (i = first; i <= last; i++) {
+ if (VB->ClipMask[i] == 0) {
GLint x0, x1, y0, y1;
- GLint ix, iy;
- GLint isize, radius;
+ GLint ix, iy, radius;
GLint red, green, blue, alpha;
GLfloat s, t, u;
- x = (GLint) VB->Win.data[i][0];
- y = (GLint) VB->Win.data[i][1];
- z = (GLint) (VB->Win.data[i][2] + ctx->PointZoffset);
+ GLint x = (GLint) VB->Win.data[i][0];
+ GLint y = (GLint) VB->Win.data[i][1];
+ GLint z = (GLint) (VB->Win.data[i][2] + ctx->PointZoffset);
+ GLint isize = (GLint) (ctx->Point.Size + 0.5F);
- isize = (GLint)
- (CLAMP(ctx->Point.Size,MIN_POINT_SIZE,MAX_POINT_SIZE) + 0.5F);
- if (isize<1) {
+ if (isize < 1) {
isize = 1;
}
radius = isize >> 1;
@@ -388,12 +390,12 @@ static void textured_rgba_points( GLcontext *ctx, GLuint first, GLuint last )
PB_SET_COLOR( red, green, blue, alpha );
*/
- for (iy=y0;iy<=y1;iy++) {
- for (ix=x0;ix<=x1;ix++) {
+ for (iy = y0; iy <= y1; iy++) {
+ for (ix = x0; ix <= x1; ix++) {
PB_WRITE_TEX_PIXEL( PB, ix, iy, z, red, green, blue, alpha, s, t, u );
}
}
- PB_CHECK_FLUSH(ctx,PB);
+ PB_CHECK_FLUSH(ctx, PB);
}
}
}
@@ -402,29 +404,28 @@ static void textured_rgba_points( GLcontext *ctx, GLuint first, GLuint last )
/*
* Multitextured RGBA points.
*/
-static void multitextured_rgba_points( GLcontext *ctx, GLuint first, GLuint last )
+static void
+multitextured_rgba_points( GLcontext *ctx, GLuint first, GLuint last )
{
struct vertex_buffer *VB = ctx->VB;
struct pixel_buffer *PB = ctx->PB;
GLuint i;
- for (i=first;i<=last;i++) {
- if (VB->ClipMask[i]==0) {
- GLint x, y, z;
+ for (i = first; i <= last; i++) {
+ if (VB->ClipMask[i] == 0) {
GLint x0, x1, y0, y1;
GLint ix, iy;
- GLint isize, radius;
+ GLint radius;
GLint red, green, blue, alpha;
GLfloat s, t, u;
GLfloat s1, t1, u1;
- x = (GLint) VB->Win.data[i][0];
- y = (GLint) VB->Win.data[i][1];
- z = (GLint) (VB->Win.data[i][2] + ctx->PointZoffset);
+ GLint x = (GLint) VB->Win.data[i][0];
+ GLint y = (GLint) VB->Win.data[i][1];
+ GLint z = (GLint) (VB->Win.data[i][2] + ctx->PointZoffset);
+ GLint isize = (GLint) (ctx->Point.Size + 0.5F);
- isize = (GLint)
- (CLAMP(ctx->Point.Size,MIN_POINT_SIZE,MAX_POINT_SIZE) + 0.5F);
- if (isize<1) {
+ if (isize < 1) {
isize = 1;
}
radius = isize >> 1;
@@ -505,10 +506,11 @@ static void multitextured_rgba_points( GLcontext *ctx, GLuint first, GLuint last
for (iy=y0;iy<=y1;iy++) {
for (ix=x0;ix<=x1;ix++) {
- PB_WRITE_MULTITEX_PIXEL( PB, ix, iy, z, red, green, blue, alpha, s, t, u, s1, t1, u1 );
+ PB_WRITE_MULTITEX_PIXEL( PB, ix, iy, z, red, green, blue, alpha,
+ s, t, u, s1, t1, u1 );
}
}
- PB_CHECK_FLUSH(ctx,PB);
+ PB_CHECK_FLUSH(ctx, PB);
}
}
}
@@ -519,35 +521,32 @@ static void multitextured_rgba_points( GLcontext *ctx, GLuint first, GLuint last
/*
* Antialiased points with or without texture mapping.
*/
-static void antialiased_rgba_points( GLcontext *ctx,
- GLuint first, GLuint last )
+static void
+antialiased_rgba_points( GLcontext *ctx, GLuint first, GLuint last )
{
struct vertex_buffer *VB = ctx->VB;
struct pixel_buffer *PB = ctx->PB;
+ const GLfloat radius = ctx->Point.Size * 0.5F;
+ const GLfloat rmin = radius - 0.7071F; /* 0.7071 = sqrt(2)/2 */
+ const GLfloat rmax = radius + 0.7071F;
+ const GLfloat rmin2 = rmin * rmin;
+ const GLfloat rmax2 = rmax * rmax;
+ const GLfloat cscale = 256.0F / (rmax2 - rmin2);
GLuint i;
- GLfloat radius, rmin, rmax, rmin2, rmax2, cscale;
-
- radius = CLAMP( ctx->Point.Size, MIN_POINT_SIZE, MAX_POINT_SIZE ) * 0.5F;
- rmin = radius - 0.7071F; /* 0.7071 = sqrt(2)/2 */
- rmax = radius + 0.7071F;
- rmin2 = rmin*rmin;
- rmax2 = rmax*rmax;
- cscale = 256.0F / (rmax2-rmin2);
if (ctx->Texture.ReallyEnabled) {
- for (i=first;i<=last;i++) {
- if (VB->ClipMask[i]==0) {
- GLint xmin, ymin, xmax, ymax;
- GLint x, y, z;
+ for (i = first; i <= last; i++) {
+ if (VB->ClipMask[i] == 0) {
+ GLint x, y;
GLint red, green, blue, alpha;
GLfloat s, t, u;
GLfloat s1, t1, u1;
- xmin = (GLint) (VB->Win.data[i][0] - radius);
- xmax = (GLint) (VB->Win.data[i][0] + radius);
- ymin = (GLint) (VB->Win.data[i][1] - radius);
- ymax = (GLint) (VB->Win.data[i][1] + radius);
- z = (GLint) (VB->Win.data[i][2] + ctx->PointZoffset);
+ GLint xmin = (GLint) (VB->Win.data[i][0] - radius);
+ GLint xmax = (GLint) (VB->Win.data[i][0] + radius);
+ GLint ymin = (GLint) (VB->Win.data[i][1] - radius);
+ GLint ymax = (GLint) (VB->Win.data[i][1] + radius);
+ GLint z = (GLint) (VB->Win.data[i][2] + ctx->PointZoffset);
red = VB->ColorPtr->data[i][0];
green = VB->ColorPtr->data[i][1];
@@ -690,7 +689,8 @@ static void antialiased_rgba_points( GLcontext *ctx,
/*
* Null rasterizer for measuring transformation speed.
*/
-static void null_points( GLcontext *ctx, GLuint first, GLuint last )
+static void
+null_points( GLcontext *ctx, GLuint first, GLuint last )
{
(void) ctx;
(void) first;
@@ -704,8 +704,9 @@ static void null_points( GLcontext *ctx, GLuint first, GLuint last )
/* Calculates the distance attenuation formula of a vector of points in
* eye space coordinates
*/
-static void dist3(GLfloat *out, GLuint first, GLuint last,
- const GLcontext *ctx, const GLvector4f *v)
+static void
+dist3(GLfloat *out, GLuint first, GLuint last,
+ const GLcontext *ctx, const GLvector4f *v)
{
GLuint stride = v->stride;
const GLfloat *p = VEC_ELT(v, GLfloat, first);
@@ -719,8 +720,10 @@ static void dist3(GLfloat *out, GLuint first, GLuint last,
}
}
-static void dist2(GLfloat *out, GLuint first, GLuint last,
- const GLcontext *ctx, const GLvector4f *v)
+
+static void
+dist2(GLfloat *out, GLuint first, GLuint last,
+ const GLcontext *ctx, const GLvector4f *v)
{
GLuint stride = v->stride;
const GLfloat *p = VEC_ELT(v, GLfloat, first);
@@ -748,8 +751,9 @@ static dist_func eye_dist_tab[5] = {
};
-static void clip_dist(GLfloat *out, GLuint first, GLuint last,
- const GLcontext *ctx, GLvector4f *clip)
+static void
+clip_dist(GLfloat *out, GLuint first, GLuint last,
+ const GLcontext *ctx, GLvector4f *clip)
{
/* this is never called */
gl_problem(NULL, "clip_dist() called - dead code!\n");
@@ -780,15 +784,14 @@ static void clip_dist(GLfloat *out, GLuint first, GLuint last,
/*
* Distance Attenuated General CI points.
*/
-static void dist_atten_general_ci_points( GLcontext *ctx, GLuint first,
- GLuint last )
+static void
+dist_atten_general_ci_points( GLcontext *ctx, GLuint first, GLuint last )
{
struct vertex_buffer *VB = ctx->VB;
struct pixel_buffer *PB = ctx->PB;
- GLuint i;
- GLfloat psize,dsize;
GLfloat dist[VB_SIZE];
- psize=CLAMP(ctx->Point.Size,MIN_POINT_SIZE,MAX_POINT_SIZE);
+ const GLfloat psize = ctx->Point.Size;
+ GLuint i;
if (ctx->NeedEyeCoords)
(eye_dist_tab[VB->EyePtr->size])( dist, first, last, ctx, VB->EyePtr );
@@ -797,20 +800,19 @@ static void dist_atten_general_ci_points( GLcontext *ctx, GLuint first,
for (i=first;i<=last;i++) {
if (VB->ClipMask[i]==0) {
- GLint x, y, z;
GLint x0, x1, y0, y1;
GLint ix, iy;
GLint isize, radius;
+ GLint x = (GLint) VB->Win.data[i][0];
+ GLint y = (GLint) VB->Win.data[i][1];
+ GLint z = (GLint) (VB->Win.data[i][2] + ctx->PointZoffset);
+ GLfloat dsize = psize * dist[i];
- x = (GLint) VB->Win.data[i][0];
- y = (GLint) VB->Win.data[i][1];
- z = (GLint) (VB->Win.data[i][2] + ctx->PointZoffset);
-
- dsize=psize*dist[i];
- if(dsize>=ctx->Point.Threshold) {
- isize=(GLint) (MIN2(dsize,ctx->Point.MaxSize)+0.5F);
- } else {
- isize=(GLint) (MAX2(ctx->Point.Threshold,ctx->Point.MinSize)+0.5F);
+ if (dsize >= ctx->Point.Threshold) {
+ isize = (GLint) (MIN2(dsize, ctx->Point.MaxSize) + 0.5F);
+ }
+ else {
+ isize = (GLint) (MAX2(ctx->Point.Threshold, ctx->Point.MinSize) + 0.5F);
}
radius = isize >> 1;
@@ -829,7 +831,7 @@ static void dist_atten_general_ci_points( GLcontext *ctx, GLuint first,
y1 = y0 + isize - 1;
}
- PB_SET_INDEX( ctx, PB, VB->IndexPtr->data[i] );
+ PB_SET_INDEX( PB, VB->IndexPtr->data[i] );
for (iy=y0;iy<=y1;iy++) {
for (ix=x0;ix<=x1;ix++) {
@@ -844,16 +846,14 @@ static void dist_atten_general_ci_points( GLcontext *ctx, GLuint first,
/*
* Distance Attenuated General RGBA points.
*/
-static void dist_atten_general_rgba_points( GLcontext *ctx, GLuint first,
- GLuint last )
+static void
+dist_atten_general_rgba_points( GLcontext *ctx, GLuint first, GLuint last )
{
struct vertex_buffer *VB = ctx->VB;
struct pixel_buffer *PB = ctx->PB;
- GLuint i;
- GLubyte alpha;
- GLfloat psize,dsize;
GLfloat dist[VB_SIZE];
- psize=CLAMP(ctx->Point.Size,MIN_POINT_SIZE,MAX_POINT_SIZE);
+ const GLfloat psize = ctx->Point.Size;
+ GLuint i;
if (ctx->NeedEyeCoords)
(eye_dist_tab[VB->EyePtr->size])( dist, first, last, ctx, VB->EyePtr );
@@ -862,15 +862,15 @@ static void dist_atten_general_rgba_points( GLcontext *ctx, GLuint first,
for (i=first;i<=last;i++) {
if (VB->ClipMask[i]==0) {
- GLint x, y, z;
GLint x0, x1, y0, y1;
GLint ix, iy;
GLint isize, radius;
+ GLint x = (GLint) VB->Win.data[i][0];
+ GLint y = (GLint) VB->Win.data[i][1];
+ GLint z = (GLint) (VB->Win.data[i][2] + ctx->PointZoffset);
+ GLfloat dsize=psize*dist[i];
+ GLubyte alpha;
- x = (GLint) VB->Win.data[i][0];
- y = (GLint) VB->Win.data[i][1];
- z = (GLint) (VB->Win.data[i][2] + ctx->PointZoffset);
- dsize=psize*dist[i];
if (dsize >= ctx->Point.Threshold) {
isize = (GLint) (MIN2(dsize,ctx->Point.MaxSize)+0.5F);
alpha = VB->ColorPtr->data[i][3];
@@ -897,7 +897,7 @@ static void dist_atten_general_rgba_points( GLcontext *ctx, GLuint first,
y1 = y0 + isize - 1;
}
- PB_SET_COLOR( ctx, PB,
+ PB_SET_COLOR( PB,
VB->ColorPtr->data[i][0],
VB->ColorPtr->data[i][1],
VB->ColorPtr->data[i][2],
@@ -916,15 +916,14 @@ static void dist_atten_general_rgba_points( GLcontext *ctx, GLuint first,
/*
* Distance Attenuated Textured RGBA points.
*/
-static void dist_atten_textured_rgba_points( GLcontext *ctx, GLuint first,
- GLuint last )
+static void
+dist_atten_textured_rgba_points( GLcontext *ctx, GLuint first, GLuint last )
{
struct vertex_buffer *VB = ctx->VB;
struct pixel_buffer *PB = ctx->PB;
- GLuint i;
- GLfloat psize,dsize;
GLfloat dist[VB_SIZE];
- psize=CLAMP(ctx->Point.Size,MIN_POINT_SIZE,MAX_POINT_SIZE);
+ const GLfloat psize = ctx->Point.Size;
+ GLuint i;
if (ctx->NeedEyeCoords)
(eye_dist_tab[VB->EyePtr->size])( dist, first, last, ctx, VB->EyePtr );
@@ -933,7 +932,6 @@ static void dist_atten_textured_rgba_points( GLcontext *ctx, GLuint first,
for (i=first;i<=last;i++) {
if (VB->ClipMask[i]==0) {
- GLint x, y, z;
GLint x0, x1, y0, y1;
GLint ix, iy;
GLint isize, radius;
@@ -941,21 +939,22 @@ static void dist_atten_textured_rgba_points( GLcontext *ctx, GLuint first,
GLfloat s, t, u;
GLfloat s1, t1, u1;
- x = (GLint) VB->Win.data[i][0];
- y = (GLint) VB->Win.data[i][1];
- z = (GLint) (VB->Win.data[i][2] + ctx->PointZoffset);
+ GLint x = (GLint) VB->Win.data[i][0];
+ GLint y = (GLint) VB->Win.data[i][1];
+ GLint z = (GLint) (VB->Win.data[i][2] + ctx->PointZoffset);
- dsize=psize*dist[i];
- if(dsize>=ctx->Point.Threshold) {
- isize=(GLint) (MIN2(dsize,ctx->Point.MaxSize)+0.5F);
- alpha=VB->ColorPtr->data[i][3];
- } else {
- isize=(GLint) (MAX2(ctx->Point.Threshold,ctx->Point.MinSize)+0.5F);
- dsize/=ctx->Point.Threshold;
- alpha = (GLint) (VB->ColorPtr->data[i][3]* (dsize*dsize));
+ GLfloat dsize = psize*dist[i];
+ if(dsize >= ctx->Point.Threshold) {
+ isize = (GLint) (MIN2(dsize, ctx->Point.MaxSize) + 0.5F);
+ alpha = VB->ColorPtr->data[i][3];
+ }
+ else {
+ isize = (GLint) (MAX2(ctx->Point.Threshold, ctx->Point.MinSize) + 0.5F);
+ dsize /= ctx->Point.Threshold;
+ alpha = (GLint) (VB->ColorPtr->data[i][3] * (dsize * dsize));
}
- if (isize<1) {
+ if (isize < 1) {
isize = 1;
}
radius = isize >> 1;
@@ -1064,16 +1063,14 @@ static void dist_atten_textured_rgba_points( GLcontext *ctx, GLuint first,
/*
* Distance Attenuated Antialiased points with or without texture mapping.
*/
-static void dist_atten_antialiased_rgba_points( GLcontext *ctx,
- GLuint first, GLuint last )
+static void
+dist_atten_antialiased_rgba_points( GLcontext *ctx, GLuint first, GLuint last )
{
struct vertex_buffer *VB = ctx->VB;
struct pixel_buffer *PB = ctx->PB;
- GLuint i;
- GLfloat radius, rmin, rmax, rmin2, rmax2, cscale;
- GLfloat psize,dsize,alphaf;
GLfloat dist[VB_SIZE];
- psize=CLAMP(ctx->Point.Size,MIN_POINT_SIZE,MAX_POINT_SIZE);
+ const GLfloat psize = ctx->Point.Size;
+ GLuint i;
if (ctx->NeedEyeCoords)
(eye_dist_tab[VB->EyePtr->size])( dist, first, last, ctx, VB->EyePtr );
@@ -1083,20 +1080,22 @@ static void dist_atten_antialiased_rgba_points( GLcontext *ctx,
if (ctx->Texture.ReallyEnabled) {
for (i=first;i<=last;i++) {
if (VB->ClipMask[i]==0) {
+ GLfloat radius, rmin, rmax, rmin2, rmax2, cscale, alphaf;
GLint xmin, ymin, xmax, ymax;
GLint x, y, z;
GLint red, green, blue, alpha;
GLfloat s, t, u;
GLfloat s1, t1, u1;
+ GLfloat dsize = psize * dist[i];
- dsize=psize*dist[i];
- if(dsize>=ctx->Point.Threshold) {
- radius=(MIN2(dsize,ctx->Point.MaxSize)*0.5F);
- alphaf=1.0;
- } else {
- radius=(MAX2(ctx->Point.Threshold,ctx->Point.MinSize)*0.5F);
- dsize/=ctx->Point.Threshold;
- alphaf=(dsize*dsize);
+ if (dsize >= ctx->Point.Threshold) {
+ radius = MIN2(dsize, ctx->Point.MaxSize) * 0.5F;
+ alphaf = 1.0F;
+ }
+ else {
+ radius = (MAX2(ctx->Point.Threshold, ctx->Point.MinSize) * 0.5F);
+ dsize /= ctx->Point.Threshold;
+ alphaf = (dsize*dsize);
}
rmin = radius - 0.7071F; /* 0.7071 = sqrt(2)/2 */
rmax = radius + 0.7071F;
@@ -1178,23 +1177,25 @@ static void dist_atten_antialiased_rgba_points( GLcontext *ctx,
}
}
- for (y=ymin;y<=ymax;y++) {
- for (x=xmin;x<=xmax;x++) {
+ for (y = ymin; y <= ymax; y++) {
+ for (x = xmin; x <= xmax; x++) {
GLfloat dx = x/*+0.5F*/ - VB->Win.data[i][0];
GLfloat dy = y/*+0.5F*/ - VB->Win.data[i][1];
GLfloat dist2 = dx*dx + dy*dy;
- if (dist2<rmax2) {
+ if (dist2 < rmax2) {
alpha = VB->ColorPtr->data[i][3];
- if (dist2>=rmin2) {
- GLint coverage = (GLint) (256.0F-(dist2-rmin2)*cscale);
+ if (dist2 >= rmin2) {
+ GLint coverage = (GLint) (256.0F - (dist2 - rmin2) * cscale);
/* coverage is in [0,256] */
alpha = (alpha * coverage) >> 8;
}
alpha = (GLint) (alpha * alphaf);
if (ctx->Texture.ReallyEnabled >= TEXTURE1_1D) {
- PB_WRITE_MULTITEX_PIXEL( PB, x,y,z, red, green, blue, alpha, s, t, u, s1, t1, u1 );
+ PB_WRITE_MULTITEX_PIXEL( PB, x,y,z, red, green, blue,
+ alpha, s, t, u, s1, t1, u1 );
} else {
- PB_WRITE_TEX_PIXEL( PB, x,y,z, red, green, blue, alpha, s, t, u );
+ PB_WRITE_TEX_PIXEL( PB, x,y,z, red, green, blue, alpha,
+ s, t, u );
}
}
}
@@ -1205,26 +1206,28 @@ static void dist_atten_antialiased_rgba_points( GLcontext *ctx,
}
else {
/* Not texture mapped */
- for (i=first;i<=last;i++) {
- if (VB->ClipMask[i]==0) {
+ for (i = first; i <= last; i++) {
+ if (VB->ClipMask[i] == 0) {
+ GLfloat radius, rmin, rmax, rmin2, rmax2, cscale, alphaf;
GLint xmin, ymin, xmax, ymax;
GLint x, y, z;
GLint red, green, blue, alpha;
+ GLfloat dsize = psize * dist[i];
- dsize=psize*dist[i];
- if(dsize>=ctx->Point.Threshold) {
- radius=(MIN2(dsize,ctx->Point.MaxSize)*0.5F);
- alphaf=1.0;
- } else {
- radius=(MAX2(ctx->Point.Threshold,ctx->Point.MinSize)*0.5F);
- dsize/=ctx->Point.Threshold;
- alphaf=(dsize*dsize);
+ if (dsize >= ctx->Point.Threshold) {
+ radius = MIN2(dsize, ctx->Point.MaxSize) * 0.5F;
+ alphaf = 1.0F;
+ }
+ else {
+ radius = (MAX2(ctx->Point.Threshold, ctx->Point.MinSize) * 0.5F);
+ dsize /= ctx->Point.Threshold;
+ alphaf = dsize * dsize;
}
rmin = radius - 0.7071F; /* 0.7071 = sqrt(2)/2 */
rmax = radius + 0.7071F;
- rmin2 = rmin*rmin;
- rmax2 = rmax*rmax;
- cscale = 256.0F / (rmax2-rmin2);
+ rmin2 = rmin * rmin;
+ rmax2 = rmax * rmax;
+ cscale = 256.0F / (rmax2 - rmin2);
xmin = (GLint) (VB->Win.data[i][0] - radius);
xmax = (GLint) (VB->Win.data[i][0] + radius);
@@ -1236,21 +1239,20 @@ static void dist_atten_antialiased_rgba_points( GLcontext *ctx,
green = VB->ColorPtr->data[i][1];
blue = VB->ColorPtr->data[i][2];
- for (y=ymin;y<=ymax;y++) {
- for (x=xmin;x<=xmax;x++) {
+ for (y = ymin; y <= ymax; y++) {
+ for (x = xmin; x <= xmax; x++) {
GLfloat dx = x/*+0.5F*/ - VB->Win.data[i][0];
GLfloat dy = y/*+0.5F*/ - VB->Win.data[i][1];
- GLfloat dist2 = dx*dx + dy*dy;
- if (dist2<rmax2) {
+ GLfloat dist2 = dx * dx + dy * dy;
+ if (dist2 < rmax2) {
alpha = VB->ColorPtr->data[i][3];
- if (dist2>=rmin2) {
- GLint coverage = (GLint) (256.0F-(dist2-rmin2)*cscale);
+ if (dist2 >= rmin2) {
+ GLint coverage = (GLint) (256.0F - (dist2 - rmin2) * cscale);
/* coverage is in [0,256] */
alpha = (alpha * coverage) >> 8;
}
alpha = (GLint) (alpha * alphaf);
- PB_WRITE_RGBA_PIXEL( PB, x, y, z, red, green, blue, alpha )
- ;
+ PB_WRITE_RGBA_PIXEL(PB, x, y, z, red, green, blue, alpha);
}
}
}
@@ -1261,6 +1263,43 @@ static void dist_atten_antialiased_rgba_points( GLcontext *ctx,
}
+#ifdef DEBUG
+void
+_mesa_print_points_function(GLcontext *ctx)
+{
+ printf("Point Func == ");
+ if (ctx->Driver.PointsFunc == size1_ci_points)
+ printf("size1_ci_points\n");
+ else if (ctx->Driver.PointsFunc == size1_rgba_points)
+ printf("size1_rgba_points\n");
+ else if (ctx->Driver.PointsFunc == general_ci_points)
+ printf("general_ci_points\n");
+ else if (ctx->Driver.PointsFunc == general_rgba_points)
+ printf("general_rgba_points\n");
+ else if (ctx->Driver.PointsFunc == textured_rgba_points)
+ printf("textured_rgba_points\n");
+ else if (ctx->Driver.PointsFunc == multitextured_rgba_points)
+ printf("multitextured_rgba_points\n");
+ else if (ctx->Driver.PointsFunc == antialiased_rgba_points)
+ printf("antialiased_rgba_points\n");
+ else if (ctx->Driver.PointsFunc == null_points)
+ printf("null_points\n");
+ else if (ctx->Driver.PointsFunc == dist_atten_general_ci_points)
+ printf("dist_atten_general_ci_points\n");
+ else if (ctx->Driver.PointsFunc == dist_atten_general_rgba_points)
+ printf("dist_atten_general_rgba_points\n");
+ else if (ctx->Driver.PointsFunc == dist_atten_textured_rgba_points)
+ printf("dist_atten_textured_rgba_points\n");
+ else if (ctx->Driver.PointsFunc == dist_atten_antialiased_rgba_points)
+ printf("dist_atten_antialiased_rgba_points\n");
+ else if (!ctx->Driver.PointsFunc)
+ printf("NULL\n");
+ else
+ printf("Driver func %p\n", ctx->Driver.PointsFunc);
+}
+#endif
+
+
/*
* Examine the current context to determine which point drawing function
* should be used.
@@ -1329,5 +1368,6 @@ void gl_set_point_function( GLcontext *ctx )
ctx->Driver.PointsFunc = gl_select_points;
}
+ /*_mesa_print_points_function(ctx);*/
}
diff --git a/xc/extras/Mesa/src/readpix.c b/xc/extras/Mesa/src/readpix.c
index df5ca64ff..4f4ad90a3 100644
--- a/xc/extras/Mesa/src/readpix.c
+++ b/xc/extras/Mesa/src/readpix.c
@@ -508,7 +508,9 @@ read_fast_rgba_pixels( GLcontext *ctx,
ctx->Pixel.ScaleOrBiasRGBApcm ||
ctx->Pixel.ColorTableEnabled ||
ctx->Pixel.PostColorMatrixColorTableEnabled ||
- ctx->Pixel.MinMaxEnabled;
+ ctx->Pixel.MinMaxEnabled ||
+ ctx->Pixel.HistogramEnabled;
+
/* can't do scale, bias, mapping, etc */
if (applyTransferOps)
return GL_FALSE;
@@ -567,7 +569,7 @@ read_fast_rgba_pixels( GLcontext *ctx,
for (row=0; row<readHeight; row++) {
(*ctx->Driver.ReadRGBASpan)(ctx, readWidth, srcX, srcY,
(GLubyte (*)[4]) dest);
- if (ctx->ReadBuffer->UseSoftwareAlphaBuffers) {
+ if (ctx->DrawBuffer->UseSoftwareAlphaBuffers) {
_mesa_read_alpha_span(ctx, readWidth, srcX, srcY,
(GLubyte (*)[4]) dest);
}
diff --git a/xc/extras/Mesa/src/span.c b/xc/extras/Mesa/src/span.c
index 653d0dc12..598834047 100644
--- a/xc/extras/Mesa/src/span.c
+++ b/xc/extras/Mesa/src/span.c
@@ -176,6 +176,7 @@ void gl_write_index_span( GLcontext *ctx,
GLuint n, GLint x, GLint y, const GLdepth z[],
GLuint indexIn[], GLenum primitive )
{
+ const GLuint modBits = FOG_BIT | BLEND_BIT | MASKING_BIT | LOGIC_OP_BIT;
GLubyte mask[MAX_WIDTH];
GLuint indexBackup[MAX_WIDTH];
GLuint *index; /* points to indexIn or indexBackup */
@@ -189,7 +190,7 @@ void gl_write_index_span( GLcontext *ctx,
}
}
- if ((primitive==GL_BITMAP && ctx->MutablePixels)
+ if ((primitive==GL_BITMAP && (ctx->RasterMask & modBits))
|| (ctx->RasterMask & MULTI_DRAW_BIT)) {
/* Make copy of color indexes */
MEMCPY( indexBackup, indexIn, n * sizeof(GLuint) );
@@ -421,6 +422,8 @@ void gl_write_rgba_span( GLcontext *ctx,
GLubyte rgbaIn[][4],
GLenum primitive )
{
+ const GLuint modBits = FOG_BIT | BLEND_BIT | MASKING_BIT |
+ LOGIC_OP_BIT | TEXTURE_BIT;
GLubyte mask[MAX_WIDTH];
GLboolean write_all = GL_TRUE;
GLubyte rgbaBackup[MAX_WIDTH][4];
@@ -437,7 +440,7 @@ void gl_write_rgba_span( GLcontext *ctx,
write_all = GL_FALSE;
}
- if ((primitive==GL_BITMAP && ctx->MutablePixels)
+ if ((primitive==GL_BITMAP && (ctx->RasterMask & modBits))
|| (ctx->RasterMask & MULTI_DRAW_BIT)) {
/* must make a copy of the colors since they may be modified */
MEMCPY( rgbaBackup, rgbaIn, 4 * n * sizeof(GLubyte) );
diff --git a/xc/extras/Mesa/src/state.c b/xc/extras/Mesa/src/state.c
index bb8452842..b678f1e91 100644
--- a/xc/extras/Mesa/src/state.c
+++ b/xc/extras/Mesa/src/state.c
@@ -98,20 +98,17 @@ generic_noop(void)
}
+/*
+ * Set all pointers in the given dispatch table to point to a
+ * generic no-op function.
+ */
void
-_mesa_init_no_op_table(struct _glapi_table *table)
+_mesa_init_no_op_table(struct _glapi_table *table, GLuint tableSize)
{
- /* Check to be sure the dispatcher's table is at least as big as Mesa's. */
- const GLuint size = sizeof(struct _glapi_table) / sizeof(void *);
- assert(_glapi_get_dispatch_table_size() >= size);
-
- {
- const GLuint n = _glapi_get_dispatch_table_size();
- GLuint i;
- void **dispatch = (void **) table;
- for (i = 0; i < n; i++) {
- dispatch[i] = (void *) generic_noop;
- }
+ GLuint i;
+ void **dispatch = (void **) table;
+ for (i = 0; i < tableSize; i++) {
+ dispatch[i] = (void *) generic_noop;
}
}
@@ -121,10 +118,10 @@ _mesa_init_no_op_table(struct _glapi_table *table)
* immediate-mode commands.
*/
void
-_mesa_init_exec_table(struct _glapi_table *exec)
+_mesa_init_exec_table(struct _glapi_table *exec, GLuint tableSize)
{
/* first initialize all dispatch slots to no-op */
- _mesa_init_no_op_table(exec);
+ _mesa_init_no_op_table(exec, tableSize);
/* load the dispatch slots we understand */
exec->Accum = _mesa_Accum;
@@ -472,7 +469,6 @@ _mesa_init_exec_table(struct _glapi_table *exec)
exec->TexImage3D = _mesa_TexImage3D;
exec->TexSubImage3D = _mesa_TexSubImage3D;
-
/* OpenGL 1.2 GL_ARB_imaging */
exec->BlendColor = _mesa_BlendColor;
exec->BlendEquation = _mesa_BlendEquation;
@@ -509,26 +505,33 @@ _mesa_init_exec_table(struct _glapi_table *exec)
exec->ResetMinmax = _mesa_ResetMinmax;
exec->SeparableFilter2D = _mesa_SeparableFilter2D;
- /* GL_EXT_texture3d */
+ /* 2. GL_EXT_blend_color */
+#if 0
+ exec->BlendColorEXT = _mesa_BlendColorEXT;
+#endif
+
+ /* 3. GL_EXT_polygon_offset */
+ exec->PolygonOffsetEXT = _mesa_PolygonOffsetEXT;
+
+ /* 6. GL_EXT_texture3d */
#if 0
exec->CopyTexSubImage3DEXT = _mesa_CopyTexSubImage3D;
exec->TexImage3DEXT = _mesa_TexImage3DEXT;
exec->TexSubImage3DEXT = _mesa_TexSubImage3D;
#endif
- /* GL_EXT_paletted_texture */
-#if 0
- exec->ColorTableEXT = _mesa_ColorTableEXT;
- exec->ColorSubTableEXT = _mesa_ColorSubTableEXT;
-#endif
- exec->GetColorTableEXT = _mesa_GetColorTable;
- exec->GetColorTableParameterfvEXT = _mesa_GetColorTableParameterfv;
- exec->GetColorTableParameterivEXT = _mesa_GetColorTableParameteriv;
+ /* 11. GL_EXT_histogram */
+ exec->GetHistogramEXT = _mesa_GetHistogram;
+ exec->GetHistogramParameterfvEXT = _mesa_GetHistogramParameterfv;
+ exec->GetHistogramParameterivEXT = _mesa_GetHistogramParameteriv;
+ exec->GetMinmaxEXT = _mesa_GetMinmax;
+ exec->GetMinmaxParameterfvEXT = _mesa_GetMinmaxParameterfv;
+ exec->GetMinmaxParameterivEXT = _mesa_GetMinmaxParameteriv;
- /* GL_SGIX_pixel_texture */
+ /* ?. GL_SGIX_pixel_texture */
exec->PixelTexGenSGIX = _mesa_PixelTexGenSGIX;
- /* GL_SGIS_pixel_texture */
+ /* 15. GL_SGIS_pixel_texture */
exec->PixelTexGenParameteriSGIS = _mesa_PixelTexGenParameteriSGIS;
exec->PixelTexGenParameterivSGIS = _mesa_PixelTexGenParameterivSGIS;
exec->PixelTexGenParameterfSGIS = _mesa_PixelTexGenParameterfSGIS;
@@ -536,31 +539,64 @@ _mesa_init_exec_table(struct _glapi_table *exec)
exec->GetPixelTexGenParameterivSGIS = _mesa_GetPixelTexGenParameterivSGIS;
exec->GetPixelTexGenParameterfvSGIS = _mesa_GetPixelTexGenParameterfvSGIS;
- /* GL_EXT_compiled_vertex_array */
- exec->LockArraysEXT = _mesa_LockArraysEXT;
- exec->UnlockArraysEXT = _mesa_UnlockArraysEXT;
+ /* 37. GL_EXT_blend_minmax */
+#if 0
+ exec->BlendEquationEXT = _mesa_BlendEquationEXT;
+#endif
- /* GL_EXT_point_parameters */
+ /* 54. GL_EXT_point_parameters */
exec->PointParameterfEXT = _mesa_PointParameterfEXT;
exec->PointParameterfvEXT = _mesa_PointParameterfvEXT;
- /* GL_PGI_misc_hints */
+ /* 77. GL_PGI_misc_hints */
exec->HintPGI = _mesa_HintPGI;
- /* GL_EXT_polygon_offset */
- exec->PolygonOffsetEXT = _mesa_PolygonOffsetEXT;
-
- /* GL_EXT_blend_minmax */
+ /* 78. GL_EXT_paletted_texture */
#if 0
- exec->BlendEquationEXT = _mesa_BlendEquationEXT;
+ exec->ColorTableEXT = _mesa_ColorTableEXT;
+ exec->ColorSubTableEXT = _mesa_ColorSubTableEXT;
#endif
+ exec->GetColorTableEXT = _mesa_GetColorTable;
+ exec->GetColorTableParameterfvEXT = _mesa_GetColorTableParameterfv;
+ exec->GetColorTableParameterivEXT = _mesa_GetColorTableParameteriv;
- /* GL_EXT_blend_color */
-#if 0
- exec->BlendColorEXT = _mesa_BlendColorEXT;
-#endif
+ /* 97. GL_EXT_compiled_vertex_array */
+ exec->LockArraysEXT = _mesa_LockArraysEXT;
+ exec->UnlockArraysEXT = _mesa_UnlockArraysEXT;
+
+ /* 173. GL_INGR_blend_func_separate */
+ exec->BlendFuncSeparateEXT = _mesa_BlendFuncSeparateEXT;
+
+ /* 196. GL_MESA_resize_buffers */
+ exec->ResizeBuffersMESA = _mesa_ResizeBuffersMESA;
+
+ /* 197. GL_MESA_window_pos */
+ exec->WindowPos2dMESA = _mesa_WindowPos2dMESA;
+ exec->WindowPos2dvMESA = _mesa_WindowPos2dvMESA;
+ exec->WindowPos2fMESA = _mesa_WindowPos2fMESA;
+ exec->WindowPos2fvMESA = _mesa_WindowPos2fvMESA;
+ exec->WindowPos2iMESA = _mesa_WindowPos2iMESA;
+ exec->WindowPos2ivMESA = _mesa_WindowPos2ivMESA;
+ exec->WindowPos2sMESA = _mesa_WindowPos2sMESA;
+ exec->WindowPos2svMESA = _mesa_WindowPos2svMESA;
+ exec->WindowPos3dMESA = _mesa_WindowPos3dMESA;
+ exec->WindowPos3dvMESA = _mesa_WindowPos3dvMESA;
+ exec->WindowPos3fMESA = _mesa_WindowPos3fMESA;
+ exec->WindowPos3fvMESA = _mesa_WindowPos3fvMESA;
+ exec->WindowPos3iMESA = _mesa_WindowPos3iMESA;
+ exec->WindowPos3ivMESA = _mesa_WindowPos3ivMESA;
+ exec->WindowPos3sMESA = _mesa_WindowPos3sMESA;
+ exec->WindowPos3svMESA = _mesa_WindowPos3svMESA;
+ exec->WindowPos4dMESA = _mesa_WindowPos4dMESA;
+ exec->WindowPos4dvMESA = _mesa_WindowPos4dvMESA;
+ exec->WindowPos4fMESA = _mesa_WindowPos4fMESA;
+ exec->WindowPos4fvMESA = _mesa_WindowPos4fvMESA;
+ exec->WindowPos4iMESA = _mesa_WindowPos4iMESA;
+ exec->WindowPos4ivMESA = _mesa_WindowPos4ivMESA;
+ exec->WindowPos4sMESA = _mesa_WindowPos4sMESA;
+ exec->WindowPos4svMESA = _mesa_WindowPos4svMESA;
- /* GL_ARB_multitexture */
+ /* ARB 1. GL_ARB_multitexture */
exec->ActiveTextureARB = _mesa_ActiveTextureARB;
exec->ClientActiveTextureARB = _mesa_ClientActiveTextureARB;
exec->MultiTexCoord1dARB = _mesa_MultiTexCoord1dARB;
@@ -596,46 +632,25 @@ _mesa_init_exec_table(struct _glapi_table *exec)
exec->MultiTexCoord4sARB = _mesa_MultiTexCoord4sARB;
exec->MultiTexCoord4svARB = _mesa_MultiTexCoord4svARB;
- /* GL_INGR_blend_func_separate */
- exec->BlendFuncSeparateEXT = _mesa_BlendFuncSeparateEXT;
-
- /* GL_MESA_window_pos */
- exec->WindowPos2dMESA = _mesa_WindowPos2dMESA;
- exec->WindowPos2dvMESA = _mesa_WindowPos2dvMESA;
- exec->WindowPos2fMESA = _mesa_WindowPos2fMESA;
- exec->WindowPos2fvMESA = _mesa_WindowPos2fvMESA;
- exec->WindowPos2iMESA = _mesa_WindowPos2iMESA;
- exec->WindowPos2ivMESA = _mesa_WindowPos2ivMESA;
- exec->WindowPos2sMESA = _mesa_WindowPos2sMESA;
- exec->WindowPos2svMESA = _mesa_WindowPos2svMESA;
- exec->WindowPos3dMESA = _mesa_WindowPos3dMESA;
- exec->WindowPos3dvMESA = _mesa_WindowPos3dvMESA;
- exec->WindowPos3fMESA = _mesa_WindowPos3fMESA;
- exec->WindowPos3fvMESA = _mesa_WindowPos3fvMESA;
- exec->WindowPos3iMESA = _mesa_WindowPos3iMESA;
- exec->WindowPos3ivMESA = _mesa_WindowPos3ivMESA;
- exec->WindowPos3sMESA = _mesa_WindowPos3sMESA;
- exec->WindowPos3svMESA = _mesa_WindowPos3svMESA;
- exec->WindowPos4dMESA = _mesa_WindowPos4dMESA;
- exec->WindowPos4dvMESA = _mesa_WindowPos4dvMESA;
- exec->WindowPos4fMESA = _mesa_WindowPos4fMESA;
- exec->WindowPos4fvMESA = _mesa_WindowPos4fvMESA;
- exec->WindowPos4iMESA = _mesa_WindowPos4iMESA;
- exec->WindowPos4ivMESA = _mesa_WindowPos4ivMESA;
- exec->WindowPos4sMESA = _mesa_WindowPos4sMESA;
- exec->WindowPos4svMESA = _mesa_WindowPos4svMESA;
-
- /* GL_MESA_resize_buffers */
- exec->ResizeBuffersMESA = _mesa_ResizeBuffersMESA;
-
- /* GL_ARB_transpose_matrix */
+ /* ARB 3. GL_ARB_transpose_matrix */
exec->LoadTransposeMatrixdARB = _mesa_LoadTransposeMatrixdARB;
exec->LoadTransposeMatrixfARB = _mesa_LoadTransposeMatrixfARB;
exec->MultTransposeMatrixdARB = _mesa_MultTransposeMatrixdARB;
exec->MultTransposeMatrixfARB = _mesa_MultTransposeMatrixfARB;
+
+ /* ARB 12. GL_ARB_texture_compression */
+ exec->CompressedTexImage3DARB = _mesa_CompressedTexImage3DARB;
+ exec->CompressedTexImage2DARB = _mesa_CompressedTexImage2DARB;
+ exec->CompressedTexImage1DARB = _mesa_CompressedTexImage1DARB;
+ exec->CompressedTexSubImage3DARB = _mesa_CompressedTexSubImage3DARB;
+ exec->CompressedTexSubImage2DARB = _mesa_CompressedTexSubImage2DARB;
+ exec->CompressedTexSubImage1DARB = _mesa_CompressedTexSubImage1DARB;
+ exec->GetCompressedTexImageARB = _mesa_GetCompressedTexImageARB;
+
}
+
/**********************************************************************/
/***** State update logic *****/
/**********************************************************************/
@@ -790,6 +805,7 @@ static void update_rasterflags( GLcontext *ctx )
if (ctx->Scissor.Enabled) ctx->RasterMask |= SCISSOR_BIT;
if (ctx->Stencil.Enabled) ctx->RasterMask |= STENCIL_BIT;
if (ctx->Color.SWmasking) ctx->RasterMask |= MASKING_BIT;
+ if (ctx->Texture.ReallyEnabled) ctx->RasterMask |= TEXTURE_BIT;
if (ctx->DrawBuffer->UseSoftwareAlphaBuffers
&& ctx->Color.ColorMask[ACOMP]
@@ -914,8 +930,7 @@ void gl_update_state( GLcontext *ctx )
ctx->Enabled &= ~(ENABLE_TEXMAT0|ENABLE_TEXMAT1);
for (i=0; i < MAX_TEXTURE_UNITS; i++) {
- if (ctx->TextureMatrix[i].flags & MAT_DIRTY_ALL_OVER)
- {
+ if (ctx->TextureMatrix[i].flags & MAT_DIRTY_ALL_OVER) {
gl_matrix_analyze( &ctx->TextureMatrix[i] );
ctx->TextureMatrix[i].flags &= ~MAT_DIRTY_DEPENDENTS;
@@ -929,7 +944,7 @@ void gl_update_state( GLcontext *ctx )
if (ctx->NewState & (NEW_TEXTURING | NEW_TEXTURE_ENABLE)) {
ctx->Texture.NeedNormals = GL_FALSE;
gl_update_dirty_texobjs(ctx);
- ctx->Enabled &= ~(ENABLE_TEXGEN0|ENABLE_TEXGEN1);
+ ctx->Enabled &= ~(ENABLE_TEXGEN0 | ENABLE_TEXGEN1);
ctx->Texture.ReallyEnabled = 0;
for (i=0; i < MAX_TEXTURE_UNITS; i++) {
@@ -937,19 +952,17 @@ void gl_update_state( GLcontext *ctx )
gl_update_texture_unit( ctx, &ctx->Texture.Unit[i] );
ctx->Texture.ReallyEnabled |=
- ctx->Texture.Unit[i].ReallyEnabled<<(i*4);
+ ctx->Texture.Unit[i].ReallyEnabled << (i * 4);
if (ctx->Texture.Unit[i].GenFlags != 0) {
ctx->Enabled |= ENABLE_TEXGEN0 << i;
- if (ctx->Texture.Unit[i].GenFlags & TEXGEN_NEED_NORMALS)
- {
+ if (ctx->Texture.Unit[i].GenFlags & TEXGEN_NEED_NORMALS) {
ctx->Texture.NeedNormals = GL_TRUE;
ctx->Texture.NeedEyeCoords = GL_TRUE;
}
- if (ctx->Texture.Unit[i].GenFlags & TEXGEN_NEED_EYE_COORD)
- {
+ if (ctx->Texture.Unit[i].GenFlags & TEXGEN_NEED_EYE_COORD) {
ctx->Texture.NeedEyeCoords = GL_TRUE;
}
}
@@ -960,10 +973,9 @@ void gl_update_state( GLcontext *ctx )
ctx->NeedNormals = (ctx->Light.Enabled || ctx->Texture.NeedNormals);
}
- if (ctx->NewState & (NEW_RASTER_OPS | NEW_LIGHTING | NEW_FOG)) {
+ if (ctx->NewState & (NEW_RASTER_OPS | NEW_LIGHTING | NEW_FOG | NEW_TEXTURE_ENABLE)) {
-
- if (ctx->NewState & NEW_RASTER_OPS) {
+ if (ctx->NewState & (NEW_RASTER_OPS | NEW_TEXTURE_ENABLE)) {
update_pixel_logic(ctx);
update_pixel_masking(ctx);
update_fog_mode(ctx);
@@ -972,20 +984,7 @@ void gl_update_state( GLcontext *ctx )
(*ctx->Driver.Dither)( ctx, ctx->Color.DitherFlag );
}
- /* Check if incoming colors can be modified during rasterization */
- if (ctx->Fog.Enabled ||
- ctx->Texture.Enabled ||
- ctx->Color.BlendEnabled ||
- ctx->Color.SWmasking ||
- ctx->Color.SWLogicOpEnabled) {
- ctx->MutablePixels = GL_TRUE;
- }
- else {
- ctx->MutablePixels = GL_FALSE;
- }
-
/* update scissor region */
-
ctx->DrawBuffer->Xmin = 0;
ctx->DrawBuffer->Ymin = 0;
ctx->DrawBuffer->Xmax = ctx->DrawBuffer->Width-1;
diff --git a/xc/extras/Mesa/src/state.h b/xc/extras/Mesa/src/state.h
index 1c1c29a6f..3b12f5dcc 100644
--- a/xc/extras/Mesa/src/state.h
+++ b/xc/extras/Mesa/src/state.h
@@ -30,6 +30,13 @@
#include "types.h"
+extern void
+_mesa_init_no_op_table(struct _glapi_table *exec, GLuint tableSize);
+
+extern void
+_mesa_init_exec_table(struct _glapi_table *exec, GLuint tableSize);
+
+
extern void gl_update_state( GLcontext *ctx );
diff --git a/xc/extras/Mesa/src/teximage.c b/xc/extras/Mesa/src/teximage.c
index ae50558bf..0d25df6d8 100644
--- a/xc/extras/Mesa/src/teximage.c
+++ b/xc/extras/Mesa/src/teximage.c
@@ -137,15 +137,23 @@ logbase2( int n )
* Return -1 if invalid enum.
*/
GLint
-_mesa_base_tex_format( GLint format )
+_mesa_base_tex_format( GLcontext *ctx, GLint format )
{
switch (format) {
+ case GL_COMPRESSED_ALPHA_ARB:
+ if (ctx && !ctx->Extensions.HaveTextureCompression)
+ return -1;
+ /* fall-through */
case GL_ALPHA:
case GL_ALPHA4:
case GL_ALPHA8:
case GL_ALPHA12:
case GL_ALPHA16:
return GL_ALPHA;
+ case GL_COMPRESSED_LUMINANCE_ARB:
+ if (ctx && !ctx->Extensions.HaveTextureCompression)
+ return -1;
+ /* fall-through */
case 1:
case GL_LUMINANCE:
case GL_LUMINANCE4:
@@ -153,6 +161,10 @@ _mesa_base_tex_format( GLint format )
case GL_LUMINANCE12:
case GL_LUMINANCE16:
return GL_LUMINANCE;
+ case GL_COMPRESSED_LUMINANCE_ALPHA_ARB:
+ if (ctx && !ctx->Extensions.HaveTextureCompression)
+ return -1;
+ /* fall-through */
case 2:
case GL_LUMINANCE_ALPHA:
case GL_LUMINANCE4_ALPHA4:
@@ -162,12 +174,31 @@ _mesa_base_tex_format( GLint format )
case GL_LUMINANCE12_ALPHA12:
case GL_LUMINANCE16_ALPHA16:
return GL_LUMINANCE_ALPHA;
+ case GL_COMPRESSED_INTENSITY_ARB:
+ if (ctx && !ctx->Extensions.HaveTextureCompression)
+ return -1;
+ /* fall-through */
case GL_INTENSITY:
case GL_INTENSITY4:
case GL_INTENSITY8:
case GL_INTENSITY12:
case GL_INTENSITY16:
return GL_INTENSITY;
+ case GL_COMPRESSED_RGB_ARB:
+ if (ctx && ctx->Extensions.HaveTextureCompression)
+ return GL_RGB;
+ else
+ return -1;
+ case GL_COMPRESSED_RGB_FXT1_3DFX:
+ if (ctx && ctx->Extensions.HaveTextureCompressionFXT1)
+ return GL_RGB;
+ else
+ return -1;
+ case GL_COMPRESSED_RGB_S3TC_DXT1_EXT:
+ if (ctx && ctx->Extensions.HaveTextureCompressionS3TC)
+ return GL_RGB;
+ else
+ return -1;
case 3:
case GL_RGB:
case GL_R3_G3_B2:
@@ -178,6 +209,23 @@ _mesa_base_tex_format( GLint format )
case GL_RGB12:
case GL_RGB16:
return GL_RGB;
+ case GL_COMPRESSED_RGBA_ARB:
+ if (ctx && ctx->Extensions.HaveTextureCompression)
+ return GL_RGBA;
+ else
+ return -1;
+ case GL_COMPRESSED_RGBA_FXT1_3DFX:
+ if (ctx && ctx->Extensions.HaveTextureCompressionFXT1)
+ return GL_RGBA;
+ else
+ return -1;
+ case GL_COMPRESSED_RGBA_S3TC_DXT1_EXT:
+ case GL_COMPRESSED_RGBA_S3TC_DXT3_EXT:
+ case GL_COMPRESSED_RGBA_S3TC_DXT5_EXT:
+ if (ctx && ctx->Extensions.HaveTextureCompressionS3TC)
+ return GL_RGBA;
+ else
+ return -1;
case 4:
case GL_RGBA:
case GL_RGBA2:
@@ -275,6 +323,33 @@ components_in_intformat( GLint format )
}
+/*
+ * Return GL_TRUE if internalFormat is a compressed format, return GL_FALSE
+ * otherwise.
+ */
+static GLboolean
+is_compressed_format(GLenum internalFormat)
+{
+ switch (internalFormat) {
+ case GL_COMPRESSED_ALPHA_ARB:
+ case GL_COMPRESSED_LUMINANCE_ARB:
+ case GL_COMPRESSED_LUMINANCE_ALPHA_ARB:
+ case GL_COMPRESSED_INTENSITY_ARB:
+ case GL_COMPRESSED_RGB_ARB:
+ case GL_COMPRESSED_RGBA_ARB:
+ case GL_COMPRESSED_RGB_S3TC_DXT1_EXT:
+ case GL_COMPRESSED_RGBA_S3TC_DXT1_EXT:
+ case GL_COMPRESSED_RGBA_S3TC_DXT3_EXT:
+ case GL_COMPRESSED_RGBA_S3TC_DXT5_EXT:
+ case GL_COMPRESSED_RGB_FXT1_3DFX:
+ case GL_COMPRESSED_RGBA_FXT1_3DFX:
+ return GL_TRUE;
+ default:
+ return GL_FALSE;
+ }
+}
+
+
/*
* Examine the texImage->Format field and set the Red, Green, Blue, etc
@@ -385,6 +460,41 @@ set_teximage_component_sizes( struct gl_texture_image *texImage )
}
+static void
+set_tex_image(struct gl_texture_object *tObj,
+ GLenum target, GLint level,
+ struct gl_texture_image *texImage)
+{
+ ASSERT(tObj);
+ ASSERT(texImage);
+ switch (target) {
+ case GL_TEXTURE_2D:
+ tObj->Image[level] = texImage;
+ return;
+ case GL_TEXTURE_CUBE_MAP_POSITIVE_X_ARB:
+ tObj->Image[level] = texImage;
+ return;
+ case GL_TEXTURE_CUBE_MAP_NEGATIVE_X_ARB:
+ tObj->NegX[level] = texImage;
+ return;
+ case GL_TEXTURE_CUBE_MAP_POSITIVE_Y_ARB:
+ tObj->PosY[level] = texImage;
+ return;
+ case GL_TEXTURE_CUBE_MAP_NEGATIVE_Y_ARB:
+ tObj->NegY[level] = texImage;
+ return;
+ case GL_TEXTURE_CUBE_MAP_POSITIVE_Z_ARB:
+ tObj->PosZ[level] = texImage;
+ return;
+ case GL_TEXTURE_CUBE_MAP_NEGATIVE_Z_ARB:
+ tObj->NegZ[level] = texImage;
+ return;
+ default:
+ gl_problem(NULL, "bad target in set_tex_image()");
+ return;
+ }
+}
+
/*
* Return new gl_texture_image struct with all fields initialized to zero.
@@ -407,7 +517,7 @@ init_texture_image( struct gl_texture_image *img,
{
ASSERT(img);
ASSERT(!img->Data);
- img->Format = (GLenum) _mesa_base_tex_format(internalFormat);
+ img->Format = (GLenum) _mesa_base_tex_format(NULL, internalFormat);
set_teximage_component_sizes( img );
img->IntFormat = (GLenum) internalFormat;
img->Border = border;
@@ -427,6 +537,7 @@ init_texture_image( struct gl_texture_image *img,
img->Height2 = 1 << img->HeightLog2;
img->Depth2 = 1 << img->DepthLog2;
img->MaxLog2 = MAX2(img->WidthLog2, img->HeightLog2);
+ img->IsCompressed = is_compressed_format(internalFormat);
}
@@ -443,6 +554,123 @@ _mesa_free_texture_image( struct gl_texture_image *teximage )
+/*
+ * Return number of bytes of storage needed to store a compressed texture
+ * image.
+ */
+GLuint
+_mesa_compressed_image_size(GLenum internalFormat,
+ GLint width, GLint height, GLint depth)
+{
+ return 0;
+}
+
+
+
+/*
+ * Given a texture unit and a texture target, return the corresponding
+ * texture object.
+ */
+struct gl_texture_object *
+_mesa_select_tex_object(GLcontext *ctx, struct gl_texture_unit *texUnit,
+ GLenum target)
+{
+ switch (target) {
+ case GL_TEXTURE_1D:
+ return texUnit->CurrentD[1];
+ case GL_PROXY_TEXTURE_1D:
+ return ctx->Texture.Proxy1D;
+ case GL_TEXTURE_2D:
+ return texUnit->CurrentD[2];
+ case GL_PROXY_TEXTURE_2D:
+ return ctx->Texture.Proxy2D;
+ case GL_TEXTURE_3D:
+ return texUnit->CurrentD[3];
+ case GL_PROXY_TEXTURE_3D:
+ return ctx->Texture.Proxy3D;
+ case GL_TEXTURE_CUBE_MAP_POSITIVE_X_ARB:
+ case GL_TEXTURE_CUBE_MAP_NEGATIVE_X_ARB:
+ case GL_TEXTURE_CUBE_MAP_POSITIVE_Y_ARB:
+ case GL_TEXTURE_CUBE_MAP_NEGATIVE_Y_ARB:
+ case GL_TEXTURE_CUBE_MAP_POSITIVE_Z_ARB:
+ case GL_TEXTURE_CUBE_MAP_NEGATIVE_Z_ARB:
+ return ctx->Extensions.HaveTextureCubeMap
+ ? texUnit->CurrentCubeMap : NULL;
+ case GL_PROXY_TEXTURE_CUBE_MAP_ARB:
+ return ctx->Extensions.HaveTextureCubeMap
+ ? ctx->Texture.ProxyCubeMap : NULL;
+ default:
+ gl_problem(NULL, "bad target in _mesa_select_tex_object()");
+ return NULL;
+ }
+}
+
+
+/*
+ * Return the texture image struct which corresponds to target and level
+ * for the given texture unit.
+ */
+struct gl_texture_image *
+_mesa_select_tex_image(GLcontext *ctx, const struct gl_texture_unit *texUnit,
+ GLenum target, GLint level)
+{
+ ASSERT(texUnit);
+ switch (target) {
+ case GL_TEXTURE_1D:
+ return texUnit->CurrentD[1]->Image[level];
+ case GL_PROXY_TEXTURE_1D:
+ return ctx->Texture.Proxy1D->Image[level];
+ case GL_TEXTURE_2D:
+ return texUnit->CurrentD[2]->Image[level];
+ case GL_PROXY_TEXTURE_2D:
+ return ctx->Texture.Proxy2D->Image[level];
+ case GL_TEXTURE_3D:
+ return texUnit->CurrentD[3]->Image[level];
+ case GL_PROXY_TEXTURE_3D:
+ return ctx->Texture.Proxy3D->Image[level];
+ case GL_TEXTURE_CUBE_MAP_POSITIVE_X_ARB:
+ if (ctx->Extensions.HaveTextureCubeMap)
+ return texUnit->CurrentCubeMap->Image[level];
+ else
+ return NULL;
+ case GL_TEXTURE_CUBE_MAP_NEGATIVE_X_ARB:
+ if (ctx->Extensions.HaveTextureCubeMap)
+ return texUnit->CurrentCubeMap->NegX[level];
+ else
+ return NULL;
+ case GL_TEXTURE_CUBE_MAP_POSITIVE_Y_ARB:
+ if (ctx->Extensions.HaveTextureCubeMap)
+ return texUnit->CurrentCubeMap->PosY[level];
+ else
+ return NULL;
+ case GL_TEXTURE_CUBE_MAP_NEGATIVE_Y_ARB:
+ if (ctx->Extensions.HaveTextureCubeMap)
+ return texUnit->CurrentCubeMap->NegY[level];
+ else
+ return NULL;
+ case GL_TEXTURE_CUBE_MAP_POSITIVE_Z_ARB:
+ if (ctx->Extensions.HaveTextureCubeMap)
+ return texUnit->CurrentCubeMap->PosZ[level];
+ else
+ return NULL;
+ case GL_TEXTURE_CUBE_MAP_NEGATIVE_Z_ARB:
+ if (ctx->Extensions.HaveTextureCubeMap)
+ return texUnit->CurrentCubeMap->NegZ[level];
+ else
+ return NULL;
+ case GL_PROXY_TEXTURE_CUBE_MAP_ARB:
+ if (ctx->Extensions.HaveTextureCubeMap)
+ return ctx->Texture.ProxyCubeMap->Image[level];
+ else
+ return NULL;
+ default:
+ gl_problem(ctx, "bad target in _mesa_select_tex_image()");
+ return NULL;
+ }
+}
+
+
+
/* Need this to prevent an out-of-bounds memory access when using
* X86 optimized code.
*/
@@ -675,7 +903,10 @@ texture_error_check( GLcontext *ctx, GLenum target,
}
else if (dimensions == 2) {
isProxy = (GLboolean) (target == GL_PROXY_TEXTURE_2D);
- if (target != GL_TEXTURE_2D && !isProxy) {
+ if (target != GL_TEXTURE_2D && !isProxy &&
+ !(ctx->Extensions.HaveTextureCubeMap &&
+ target >= GL_TEXTURE_CUBE_MAP_POSITIVE_X_ARB &&
+ target <= GL_TEXTURE_CUBE_MAP_NEGATIVE_Z_ARB)) {
gl_error( ctx, GL_INVALID_ENUM, "glTexImage2D(target)" );
return GL_TRUE;
}
@@ -726,6 +957,17 @@ texture_error_check( GLcontext *ctx, GLenum target,
}
}
+ /* For cube map, width must equal height */
+ if (target >= GL_TEXTURE_CUBE_MAP_POSITIVE_X_ARB &&
+ target <= GL_TEXTURE_CUBE_MAP_NEGATIVE_Z_ARB) {
+ if (width != height) {
+ if (!isProxy) {
+ gl_error(ctx, GL_INVALID_VALUE, "glTexImage2D(width != height)");
+ }
+ return GL_TRUE;
+ }
+ }
+
/* Depth */
if (dimensions >= 3) {
if (depth < 2 * border || depth > 2 + ctx->Const.MaxTextureSize
@@ -747,7 +989,7 @@ texture_error_check( GLcontext *ctx, GLenum target,
return GL_TRUE;
}
- iformat = _mesa_base_tex_format( internalFormat );
+ iformat = _mesa_base_tex_format( ctx, internalFormat );
if (iformat < 0) {
if (!isProxy) {
char message[100];
@@ -757,16 +999,18 @@ texture_error_check( GLcontext *ctx, GLenum target,
return GL_TRUE;
}
- if (!_mesa_is_legal_format_and_type( format, type )) {
- /* Yes, generate GL_INVALID_OPERATION, not GL_INVALID_ENUM, if there
- * is a type/format mismatch. See 1.2 spec page 94, sec 3.6.4.
- */
- if (!isProxy) {
- char message[100];
- sprintf(message, "glTexImage%dD(format or type)", dimensions);
- gl_error(ctx, GL_INVALID_OPERATION, message);
+ if (!is_compressed_format(internalFormat)) {
+ if (!_mesa_is_legal_format_and_type( format, type )) {
+ /* Yes, generate GL_INVALID_OPERATION, not GL_INVALID_ENUM, if there
+ * is a type/format mismatch. See 1.2 spec page 94, sec 3.6.4.
+ */
+ if (!isProxy) {
+ char message[100];
+ sprintf(message, "glTexImage%dD(format or type)", dimensions);
+ gl_error(ctx, GL_INVALID_OPERATION, message);
+ }
+ return GL_TRUE;
}
- return GL_TRUE;
}
/* if we get here, the parameters are OK */
@@ -798,7 +1042,15 @@ subtexture_error_check( GLcontext *ctx, GLuint dimensions,
}
}
else if (dimensions == 2) {
- if (target != GL_TEXTURE_2D) {
+ if (ctx->Extensions.HaveTextureCubeMap) {
+ if ((target < GL_TEXTURE_CUBE_MAP_POSITIVE_X_ARB ||
+ target > GL_TEXTURE_CUBE_MAP_NEGATIVE_Z_ARB) &&
+ target != GL_TEXTURE_2D) {
+ gl_error( ctx, GL_INVALID_ENUM, "glTexSubImage2D(target)" );
+ return GL_TRUE;
+ }
+ }
+ else if (target != GL_TEXTURE_2D) {
gl_error( ctx, GL_INVALID_ENUM, "glTexSubImage2D(target)" );
return GL_TRUE;
}
@@ -873,11 +1125,13 @@ subtexture_error_check( GLcontext *ctx, GLuint dimensions,
}
}
- if (!_mesa_is_legal_format_and_type(format, type)) {
- char message[100];
- sprintf(message, "glTexSubImage%dD(format or type)", dimensions);
- gl_error(ctx, GL_INVALID_ENUM, message);
- return GL_TRUE;
+ if (!is_compressed_format(destTex->IntFormat)) {
+ if (!_mesa_is_legal_format_and_type(format, type)) {
+ char message[100];
+ sprintf(message, "glTexSubImage%dD(format or type)", dimensions);
+ gl_error(ctx, GL_INVALID_ENUM, message);
+ return GL_TRUE;
+ }
}
return GL_FALSE;
@@ -896,18 +1150,25 @@ copytexture_error_check( GLcontext *ctx, GLuint dimensions,
{
GLint iformat;
- if (target != GL_TEXTURE_1D && target != GL_TEXTURE_2D) {
- gl_error( ctx, GL_INVALID_ENUM, "glCopyTexImage1/2D(target)" );
- return GL_TRUE;
- }
-
- if (dimensions == 1 && target != GL_TEXTURE_1D) {
- gl_error( ctx, GL_INVALID_ENUM, "glCopyTexImage1D(target)" );
- return GL_TRUE;
+ if (dimensions == 1) {
+ if (target != GL_TEXTURE_1D) {
+ gl_error( ctx, GL_INVALID_ENUM, "glCopyTexImage1D(target)" );
+ return GL_TRUE;
+ }
}
- else if (dimensions == 2 && target != GL_TEXTURE_2D) {
- gl_error( ctx, GL_INVALID_ENUM, "glCopyTexImage2D(target)" );
- return GL_TRUE;
+ else if (dimensions == 2) {
+ if (ctx->Extensions.HaveTextureCubeMap) {
+ if ((target < GL_TEXTURE_CUBE_MAP_POSITIVE_X_ARB ||
+ target > GL_TEXTURE_CUBE_MAP_NEGATIVE_Z_ARB) &&
+ target != GL_TEXTURE_2D) {
+ gl_error( ctx, GL_INVALID_ENUM, "glCopyTexImage2D(target)" );
+ return GL_TRUE;
+ }
+ }
+ else if (target != GL_TEXTURE_2D) {
+ gl_error( ctx, GL_INVALID_ENUM, "glCopyTexImage2D(target)" );
+ return GL_TRUE;
+ }
}
/* Border */
@@ -938,6 +1199,15 @@ copytexture_error_check( GLcontext *ctx, GLuint dimensions,
}
}
+ /* For cube map, width must equal height */
+ if (target >= GL_TEXTURE_CUBE_MAP_POSITIVE_X_ARB &&
+ target <= GL_TEXTURE_CUBE_MAP_NEGATIVE_Z_ARB) {
+ if (width != height) {
+ gl_error(ctx, GL_INVALID_VALUE, "glCopyTexImage2D(width != height)");
+ return GL_TRUE;
+ }
+ }
+
/* Level */
if (level<0 || level>=ctx->Const.MaxTextureLevels) {
char message[100];
@@ -946,7 +1216,7 @@ copytexture_error_check( GLcontext *ctx, GLuint dimensions,
return GL_TRUE;
}
- iformat = _mesa_base_tex_format( internalFormat );
+ iformat = _mesa_base_tex_format( ctx, internalFormat );
if (iformat < 0) {
char message[100];
sprintf(message, "glCopyTexImage%dD(internalFormat)", dimensions);
@@ -968,17 +1238,31 @@ copytexsubimage_error_check( GLcontext *ctx, GLuint dimensions,
struct gl_texture_unit *texUnit = &ctx->Texture.Unit[ctx->Texture.CurrentUnit];
struct gl_texture_image *teximage;
- if (dimensions == 1 && target != GL_TEXTURE_1D) {
- gl_error( ctx, GL_INVALID_ENUM, "glCopyTexSubImage1D(target)" );
- return GL_TRUE;
+ if (dimensions == 1) {
+ if (target != GL_TEXTURE_1D) {
+ gl_error( ctx, GL_INVALID_ENUM, "glCopyTexSubImage1D(target)" );
+ return GL_TRUE;
+ }
}
- else if (dimensions == 2 && target != GL_TEXTURE_2D) {
- gl_error( ctx, GL_INVALID_ENUM, "glCopyTexSubImage2D(target)" );
- return GL_TRUE;
+ else if (dimensions == 2) {
+ if (ctx->Extensions.HaveTextureCubeMap) {
+ if ((target < GL_TEXTURE_CUBE_MAP_POSITIVE_X_ARB ||
+ target > GL_TEXTURE_CUBE_MAP_NEGATIVE_Z_ARB) &&
+ target != GL_TEXTURE_2D) {
+ gl_error( ctx, GL_INVALID_ENUM, "glCopyTexSubImage2D(target)" );
+ return GL_TRUE;
+ }
+ }
+ else if (target != GL_TEXTURE_2D) {
+ gl_error( ctx, GL_INVALID_ENUM, "glCopyTexSubImage2D(target)" );
+ return GL_TRUE;
+ }
}
- else if (dimensions == 3 && target != GL_TEXTURE_3D) {
- gl_error( ctx, GL_INVALID_ENUM, "glCopyTexSubImage3D(target)" );
- return GL_TRUE;
+ else if (dimensions == 3) {
+ if (target != GL_TEXTURE_3D) {
+ gl_error( ctx, GL_INVALID_ENUM, "glCopyTexSubImage3D(target)" );
+ return GL_TRUE;
+ }
}
if (level < 0 || level >= ctx->Const.MaxTextureLevels) {
@@ -1075,8 +1359,8 @@ _mesa_TexImage1D( GLenum target, GLint level, GLint internalFormat,
struct gl_texture_object *texObj;
struct gl_texture_image *texImage;
- if (texture_error_check( ctx, target, level, internalFormat,
- format, type, 1, width, 1, 1, border )) {
+ if (texture_error_check(ctx, target, level, internalFormat,
+ format, type, 1, width, 1, 1, border)) {
return; /* error in texture image was detected */
}
@@ -1145,21 +1429,18 @@ _mesa_TexImage1D( GLenum target, GLint level, GLint internalFormat,
}
else if (target==GL_PROXY_TEXTURE_1D) {
/* Proxy texture: check for errors and update proxy state */
- if (texture_error_check( ctx, target, level, internalFormat,
- format, type, 1, width, 1, 1, border )) {
+ if (texture_error_check(ctx, target, level, internalFormat,
+ format, type, 1, width, 1, 1, border)) {
+ /* if error, clear all proxy texture image parameters */
if (level>=0 && level<ctx->Const.MaxTextureLevels) {
MEMSET( ctx->Texture.Proxy1D->Image[level], 0,
sizeof(struct gl_texture_image) );
}
}
else {
- ctx->Texture.Proxy1D->Image[level]->Format = (GLenum) format;
- set_teximage_component_sizes( ctx->Texture.Proxy1D->Image[level] );
- ctx->Texture.Proxy1D->Image[level]->IntFormat = (GLenum) internalFormat;
- ctx->Texture.Proxy1D->Image[level]->Border = border;
- ctx->Texture.Proxy1D->Image[level]->Width = width;
- ctx->Texture.Proxy1D->Image[level]->Height = 1;
- ctx->Texture.Proxy1D->Image[level]->Depth = 1;
+ /* if no error, update proxy texture image parameters */
+ init_texture_image(ctx->Texture.Proxy1D->Image[level],
+ width, 1, 1, border, internalFormat);
}
}
else {
@@ -1178,23 +1459,27 @@ _mesa_TexImage2D( GLenum target, GLint level, GLint internalFormat,
GET_CURRENT_CONTEXT(ctx);
ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx, "glTexImage2D");
- if (target==GL_TEXTURE_2D) {
+ if (target==GL_TEXTURE_2D ||
+ (ctx->Extensions.HaveTextureCubeMap &&
+ target >= GL_TEXTURE_CUBE_MAP_POSITIVE_X_ARB &&
+ target <= GL_TEXTURE_CUBE_MAP_NEGATIVE_Z_ARB)) {
struct gl_texture_unit *texUnit;
struct gl_texture_object *texObj;
struct gl_texture_image *texImage;
- if (texture_error_check( ctx, target, level, internalFormat,
- format, type, 2, width, height, 1, border )) {
+ if (texture_error_check(ctx, target, level, internalFormat,
+ format, type, 2, width, height, 1, border)) {
return; /* error in texture image was detected */
}
texUnit = &ctx->Texture.Unit[ctx->Texture.CurrentUnit];
- texObj = texUnit->CurrentD[2];
- texImage = texObj->Image[level];
+ texObj = _mesa_select_tex_object(ctx, texUnit, target);
+ texImage = _mesa_select_tex_image(ctx, texUnit, target, level);
if (!texImage) {
texImage = _mesa_alloc_texture_image();
- texObj->Image[level] = texImage;
+ set_tex_image(texObj, target, level, texImage);
+ /*texObj->Image[level] = texImage;*/
if (!texImage) {
gl_error(ctx, GL_OUT_OF_MEMORY, "glTexImage2D");
return;
@@ -1262,21 +1547,18 @@ _mesa_TexImage2D( GLenum target, GLint level, GLint internalFormat,
}
else if (target==GL_PROXY_TEXTURE_2D) {
/* Proxy texture: check for errors and update proxy state */
- if (texture_error_check( ctx, target, level, internalFormat,
- format, type, 2, width, height, 1, border )) {
+ if (texture_error_check(ctx, target, level, internalFormat,
+ format, type, 2, width, height, 1, border)) {
+ /* if error, clear all proxy texture image parameters */
if (level>=0 && level<ctx->Const.MaxTextureLevels) {
MEMSET( ctx->Texture.Proxy2D->Image[level], 0,
sizeof(struct gl_texture_image) );
}
}
else {
- ctx->Texture.Proxy2D->Image[level]->Format = (GLenum) format;
- set_teximage_component_sizes( ctx->Texture.Proxy2D->Image[level] );
- ctx->Texture.Proxy2D->Image[level]->IntFormat = (GLenum) internalFormat;
- ctx->Texture.Proxy2D->Image[level]->Border = border;
- ctx->Texture.Proxy2D->Image[level]->Width = width;
- ctx->Texture.Proxy2D->Image[level]->Height = height;
- ctx->Texture.Proxy2D->Image[level]->Depth = 1;
+ /* if no error, update proxy texture image parameters */
+ init_texture_image(ctx->Texture.Proxy1D->Image[level],
+ width, height, 1, border, internalFormat);
}
}
else {
@@ -1304,9 +1586,8 @@ _mesa_TexImage3D( GLenum target, GLint level, GLint internalFormat,
struct gl_texture_unit *texUnit;
struct gl_texture_object *texObj;
struct gl_texture_image *texImage;
- if (texture_error_check( ctx, target, level, internalFormat,
- format, type, 3, width, height, depth,
- border )) {
+ if (texture_error_check(ctx, target, level, internalFormat,
+ format, type, 3, width, height, depth, border)) {
return; /* error in texture image was detected */
}
@@ -1374,24 +1655,20 @@ _mesa_TexImage3D( GLenum target, GLint level, GLint internalFormat,
gl_put_texobj_on_dirty_list( ctx, texObj );
ctx->NewState |= NEW_TEXTURING;
}
- else if (target==GL_PROXY_TEXTURE_3D_EXT) {
+ else if (target==GL_PROXY_TEXTURE_3D) {
/* Proxy texture: check for errors and update proxy state */
- if (texture_error_check( ctx, target, level, internalFormat,
- format, type, 3, width, height, depth,
- border )) {
+ if (texture_error_check(ctx, target, level, internalFormat,
+ format, type, 3, width, height, depth, border)) {
+ /* if error, clear all proxy texture image parameters */
if (level>=0 && level<ctx->Const.MaxTextureLevels) {
MEMSET( ctx->Texture.Proxy3D->Image[level], 0,
sizeof(struct gl_texture_image) );
}
}
else {
- ctx->Texture.Proxy3D->Image[level]->Format = (GLenum) format;
- set_teximage_component_sizes( ctx->Texture.Proxy3D->Image[level] );
- ctx->Texture.Proxy3D->Image[level]->IntFormat = (GLenum) internalFormat;
- ctx->Texture.Proxy3D->Image[level]->Border = border;
- ctx->Texture.Proxy3D->Image[level]->Width = width;
- ctx->Texture.Proxy3D->Image[level]->Height = height;
- ctx->Texture.Proxy3D->Image[level]->Depth = depth;
+ /* if no error, update proxy texture image parameters */
+ init_texture_image(ctx->Texture.Proxy1D->Image[level],
+ width, height, depth, border, internalFormat);
}
}
else {
@@ -1535,19 +1812,45 @@ _mesa_GetTexImage( GLenum target, GLint level, GLenum format,
switch (target) {
case GL_TEXTURE_1D:
texObj = ctx->Texture.Unit[ctx->Texture.CurrentUnit].CurrentD[1];
+ texImage = texObj->Image[level];
break;
case GL_TEXTURE_2D:
texObj = ctx->Texture.Unit[ctx->Texture.CurrentUnit].CurrentD[2];
+ texImage = texObj->Image[level];
+ break;
+ case GL_TEXTURE_CUBE_MAP_POSITIVE_X_ARB:
+ texObj = ctx->Texture.Unit[ctx->Texture.CurrentUnit].CurrentCubeMap;
+ texImage = texObj->Image[level];
+ break;
+ case GL_TEXTURE_CUBE_MAP_NEGATIVE_X_ARB:
+ texObj = ctx->Texture.Unit[ctx->Texture.CurrentUnit].CurrentCubeMap;
+ texImage = texObj->NegX[level];
+ break;
+ case GL_TEXTURE_CUBE_MAP_POSITIVE_Y_ARB:
+ texObj = ctx->Texture.Unit[ctx->Texture.CurrentUnit].CurrentCubeMap;
+ texImage = texObj->PosY[level];
+ break;
+ case GL_TEXTURE_CUBE_MAP_NEGATIVE_Y_ARB:
+ texObj = ctx->Texture.Unit[ctx->Texture.CurrentUnit].CurrentCubeMap;
+ texImage = texObj->NegY[level];
+ break;
+ case GL_TEXTURE_CUBE_MAP_POSITIVE_Z_ARB:
+ texObj = ctx->Texture.Unit[ctx->Texture.CurrentUnit].CurrentCubeMap;
+ texImage = texObj->PosZ[level];
+ break;
+ case GL_TEXTURE_CUBE_MAP_NEGATIVE_Z_ARB:
+ texObj = ctx->Texture.Unit[ctx->Texture.CurrentUnit].CurrentCubeMap;
+ texImage = texObj->NegZ[level];
break;
case GL_TEXTURE_3D:
texObj = ctx->Texture.Unit[ctx->Texture.CurrentUnit].CurrentD[3];
+ texImage = texObj->Image[level];
break;
default:
gl_error( ctx, GL_INVALID_ENUM, "glGetTexImage(target)" );
return;
}
- texImage = texObj->Image[level];
if (!texImage) {
/* invalid mipmap level */
return;
@@ -1756,7 +2059,7 @@ _mesa_TexSubImage2D( GLenum target, GLint level,
}
texUnit = &ctx->Texture.Unit[ctx->Texture.CurrentUnit];
- texObj = texUnit->CurrentD[2];
+ texObj = _mesa_select_tex_object(ctx, texUnit, target);
texImage = texObj->Image[level];
assert(texImage);
@@ -2197,3 +2500,491 @@ _mesa_CopyTexSubImage3D( GLenum target, GLint level,
}
}
}
+
+
+
+void
+_mesa_CompressedTexImage1DARB(GLenum target, GLint level,
+ GLenum internalFormat, GLsizei width,
+ GLint border, GLsizei imageSize,
+ const GLvoid *data)
+{
+ GET_CURRENT_CONTEXT(ctx);
+ ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx, "glCompressedTexImage1DARB");
+
+ if (target == GL_TEXTURE_1D) {
+ struct gl_texture_unit *texUnit;
+ struct gl_texture_object *texObj;
+ struct gl_texture_image *texImage;
+
+ if (texture_error_check(ctx, target, level, internalFormat,
+ GL_NONE, GL_NONE, 1, width, 1, 1, border)) {
+ return; /* error in texture image was detected */
+ }
+
+ texUnit = &ctx->Texture.Unit[ctx->Texture.CurrentUnit];
+ texObj = texUnit->CurrentD[1];
+ texImage = texObj->Image[level];
+
+ if (!texImage) {
+ texImage = _mesa_alloc_texture_image();
+ texObj->Image[level] = texImage;
+ if (!texImage) {
+ gl_error(ctx, GL_OUT_OF_MEMORY, "glCompressedTexImage1DARB");
+ return;
+ }
+ }
+ else if (texImage->Data) {
+ FREE(texImage->Data);
+ texImage->Data = NULL;
+ }
+
+ /* setup the teximage struct's fields */
+ init_texture_image(texImage, width, 1, 1, border, internalFormat);
+
+ /* process the texture image */
+ if (data) {
+ GLboolean retain = GL_TRUE;
+ GLboolean success = GL_FALSE;
+ if (ctx->Driver.CompressedTexImage1D) {
+ success = (*ctx->Driver.CompressedTexImage1D)( ctx, target, level,
+ data, texObj, texImage, &retain);
+ }
+ if (retain || !success) {
+ /* make internal copy of the texture image */
+ GLuint imageSize = _mesa_compressed_image_size(internalFormat,
+ width, 1, 1);
+ texImage->Data = MALLOC(imageSize);
+ if (texImage->Data) {
+ MEMCPY(texImage->Data, data, imageSize);
+ }
+ }
+ if (!retain && texImage->Data) {
+ FREE(texImage->Data);
+ texImage->Data = NULL;
+ }
+ }
+ else {
+ make_null_texture(texImage);
+ if (ctx->Driver.CompressedTexImage1D) {
+ GLboolean retain;
+ (*ctx->Driver.CompressedTexImage1D)( ctx, target, level,
+ texImage->Data, texObj, texImage, &retain);
+ }
+ }
+
+ /* state update */
+ gl_put_texobj_on_dirty_list( ctx, texObj );
+ ctx->NewState |= NEW_TEXTURING;
+ }
+ else if (target == GL_PROXY_TEXTURE_1D) {
+ /* Proxy texture: check for errors and update proxy state */
+ if (texture_error_check(ctx, target, level, internalFormat,
+ GL_NONE, GL_NONE, 1, width, 1, 1, border)) {
+ /* if error, clear all proxy texture image parameters */
+ if (level>=0 && level<ctx->Const.MaxTextureLevels) {
+ MEMSET( ctx->Texture.Proxy1D->Image[level], 0,
+ sizeof(struct gl_texture_image) );
+ }
+ }
+ else {
+ /* if no error, update proxy texture image parameters */
+ init_texture_image(ctx->Texture.Proxy1D->Image[level],
+ width, 1, 1, border, internalFormat);
+ }
+ }
+ else {
+ gl_error( ctx, GL_INVALID_ENUM, "glCompressedTexImage1DARB(target)" );
+ return;
+ }
+}
+
+
+void
+_mesa_CompressedTexImage2DARB(GLenum target, GLint level,
+ GLenum internalFormat, GLsizei width,
+ GLsizei height, GLint border, GLsizei imageSize,
+ const GLvoid *data)
+{
+ GET_CURRENT_CONTEXT(ctx);
+ ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx, "glCompressedTexImage2DARB");
+
+ if (target==GL_TEXTURE_2D ||
+ (ctx->Extensions.HaveTextureCubeMap &&
+ target >= GL_TEXTURE_CUBE_MAP_POSITIVE_X_ARB &&
+ target <= GL_TEXTURE_CUBE_MAP_NEGATIVE_Z_ARB)) {
+ struct gl_texture_unit *texUnit;
+ struct gl_texture_object *texObj;
+ struct gl_texture_image *texImage;
+
+ if (texture_error_check(ctx, target, level, internalFormat,
+ GL_NONE, GL_NONE, 1, width, height, 1, border)) {
+ return; /* error in texture image was detected */
+ }
+
+ texUnit = &ctx->Texture.Unit[ctx->Texture.CurrentUnit];
+ texObj = texUnit->CurrentD[2];
+ texImage = texObj->Image[level];
+
+ if (!texImage) {
+ texImage = _mesa_alloc_texture_image();
+ texObj->Image[level] = texImage;
+ if (!texImage) {
+ gl_error(ctx, GL_OUT_OF_MEMORY, "glCompressedTexImage2DARB");
+ return;
+ }
+ }
+ else if (texImage->Data) {
+ FREE(texImage->Data);
+ texImage->Data = NULL;
+ }
+
+ /* setup the teximage struct's fields */
+ init_texture_image(texImage, width, height, 1, border, internalFormat);
+
+ /* process the texture image */
+ if (data) {
+ GLboolean retain = GL_TRUE;
+ GLboolean success = GL_FALSE;
+ if (ctx->Driver.CompressedTexImage2D) {
+ success = (*ctx->Driver.CompressedTexImage2D)( ctx, target, level,
+ data, texObj, texImage, &retain);
+ }
+ if (retain || !success) {
+ /* make internal copy of the texture image */
+ GLuint imageSize = _mesa_compressed_image_size(internalFormat,
+ width, height, 1);
+ texImage->Data = MALLOC(imageSize);
+ if (texImage->Data) {
+ MEMCPY(texImage->Data, data, imageSize);
+ }
+ }
+ if (!retain && texImage->Data) {
+ FREE(texImage->Data);
+ texImage->Data = NULL;
+ }
+ }
+ else {
+ make_null_texture(texImage);
+ if (ctx->Driver.CompressedTexImage2D) {
+ GLboolean retain;
+ (*ctx->Driver.CompressedTexImage2D)( ctx, target, level,
+ texImage->Data, texObj, texImage, &retain);
+ }
+ }
+
+ /* state update */
+ gl_put_texobj_on_dirty_list( ctx, texObj );
+ ctx->NewState |= NEW_TEXTURING;
+ }
+ else if (target == GL_PROXY_TEXTURE_2D) {
+ /* Proxy texture: check for errors and update proxy state */
+ if (texture_error_check(ctx, target, level, internalFormat,
+ GL_NONE, GL_NONE, 1, width, 1, 1, border)) {
+ /* if error, clear all proxy texture image parameters */
+ if (level>=0 && level<ctx->Const.MaxTextureLevels) {
+ MEMSET( ctx->Texture.Proxy2D->Image[level], 0,
+ sizeof(struct gl_texture_image) );
+ }
+ }
+ else {
+ /* if no error, update proxy texture image parameters */
+ init_texture_image(ctx->Texture.Proxy2D->Image[level],
+ width, 1, 1, border, internalFormat);
+ }
+ }
+ else {
+ gl_error( ctx, GL_INVALID_ENUM, "glCompressedTexImage2DARB(target)" );
+ return;
+ }
+}
+
+
+void
+_mesa_CompressedTexImage3DARB(GLenum target, GLint level,
+ GLenum internalFormat, GLsizei width,
+ GLsizei height, GLsizei depth, GLint border,
+ GLsizei imageSize, const GLvoid *data)
+{
+ GET_CURRENT_CONTEXT(ctx);
+ ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx, "glCompressedTexImage3DARB");
+
+ if (target == GL_TEXTURE_3D) {
+ struct gl_texture_unit *texUnit;
+ struct gl_texture_object *texObj;
+ struct gl_texture_image *texImage;
+
+ if (texture_error_check(ctx, target, level, internalFormat,
+ GL_NONE, GL_NONE, 1, width, height, depth, border)) {
+ return; /* error in texture image was detected */
+ }
+
+ texUnit = &ctx->Texture.Unit[ctx->Texture.CurrentUnit];
+ texObj = texUnit->CurrentD[3];
+ texImage = texObj->Image[level];
+
+ if (!texImage) {
+ texImage = _mesa_alloc_texture_image();
+ texObj->Image[level] = texImage;
+ if (!texImage) {
+ gl_error(ctx, GL_OUT_OF_MEMORY, "glCompressedTexImage3DARB");
+ return;
+ }
+ }
+ else if (texImage->Data) {
+ FREE(texImage->Data);
+ texImage->Data = NULL;
+ }
+
+ /* setup the teximage struct's fields */
+ init_texture_image(texImage, width, height, depth, border, internalFormat);
+
+ /* process the texture image */
+ if (data) {
+ GLboolean retain = GL_TRUE;
+ GLboolean success = GL_FALSE;
+ if (ctx->Driver.CompressedTexImage3D) {
+ success = (*ctx->Driver.CompressedTexImage3D)( ctx, target, level,
+ data, texObj, texImage, &retain);
+ }
+ if (retain || !success) {
+ /* make internal copy of the texture image */
+ GLuint imageSize = _mesa_compressed_image_size(internalFormat,
+ width, height, depth);
+ texImage->Data = MALLOC(imageSize);
+ if (texImage->Data) {
+ MEMCPY(texImage->Data, data, imageSize);
+ }
+ }
+ if (!retain && texImage->Data) {
+ FREE(texImage->Data);
+ texImage->Data = NULL;
+ }
+ }
+ else {
+ make_null_texture(texImage);
+ if (ctx->Driver.CompressedTexImage3D) {
+ GLboolean retain;
+ (*ctx->Driver.CompressedTexImage3D)( ctx, target, level,
+ texImage->Data, texObj, texImage, &retain);
+ }
+ }
+
+ /* state update */
+ gl_put_texobj_on_dirty_list( ctx, texObj );
+ ctx->NewState |= NEW_TEXTURING;
+ }
+ else if (target == GL_PROXY_TEXTURE_3D) {
+ /* Proxy texture: check for errors and update proxy state */
+ if (texture_error_check(ctx, target, level, internalFormat,
+ GL_NONE, GL_NONE, 1, width, height, depth, border)) {
+ /* if error, clear all proxy texture image parameters */
+ if (level>=0 && level<ctx->Const.MaxTextureLevels) {
+ MEMSET( ctx->Texture.Proxy3D->Image[level], 0,
+ sizeof(struct gl_texture_image) );
+ }
+ }
+ else {
+ /* if no error, update proxy texture image parameters */
+ init_texture_image(ctx->Texture.Proxy3D->Image[level],
+ width, 1, 1, border, internalFormat);
+ }
+ }
+ else {
+ gl_error( ctx, GL_INVALID_ENUM, "glCompressedTexImage3DARB(target)" );
+ return;
+ }
+}
+
+
+void
+_mesa_CompressedTexSubImage1DARB(GLenum target, GLint level, GLint xoffset,
+ GLsizei width, GLenum format,
+ GLsizei imageSize, const GLvoid *data)
+{
+ GET_CURRENT_CONTEXT(ctx);
+ struct gl_texture_unit *texUnit;
+ struct gl_texture_object *texObj;
+ struct gl_texture_image *texImage;
+ GLboolean success = GL_FALSE;
+
+ if (subtexture_error_check(ctx, 1, target, level, xoffset, 0, 0,
+ width, 1, 1, format, GL_NONE)) {
+ return; /* error was detected */
+ }
+
+ texUnit = &ctx->Texture.Unit[ctx->Texture.CurrentUnit];
+ texObj = _mesa_select_tex_object(ctx, texUnit, target);
+ texImage = texObj->Image[level];
+ assert(texImage);
+
+ if (width == 0 || !data)
+ return; /* no-op, not an error */
+
+ if (ctx->Driver.CompressedTexSubImage1D) {
+ success = (*ctx->Driver.CompressedTexSubImage1D)(ctx, target, level,
+ xoffset, width, format, imageSize, data, texObj, texImage);
+ }
+ if (!success) {
+ /* XXX what else can we do? */
+ gl_problem(ctx, "glCompressedTexSubImage1DARB failed!");
+ return;
+ }
+
+}
+
+
+void
+_mesa_CompressedTexSubImage2DARB(GLenum target, GLint level, GLint xoffset,
+ GLint yoffset, GLsizei width, GLsizei height,
+ GLenum format, GLsizei imageSize,
+ const GLvoid *data)
+{
+ GET_CURRENT_CONTEXT(ctx);
+ struct gl_texture_unit *texUnit;
+ struct gl_texture_object *texObj;
+ struct gl_texture_image *texImage;
+ GLboolean success = GL_FALSE;
+
+ if (subtexture_error_check(ctx, 2, target, level, xoffset, yoffset, 0,
+ width, height, 1, format, GL_NONE)) {
+ return; /* error was detected */
+ }
+
+ texUnit = &ctx->Texture.Unit[ctx->Texture.CurrentUnit];
+ texObj = _mesa_select_tex_object(ctx, texUnit, target);
+ texImage = texObj->Image[level];
+ assert(texImage);
+
+ if (width == 0 || height == 0 || !data)
+ return; /* no-op, not an error */
+
+ if (ctx->Driver.CompressedTexSubImage2D) {
+ success = (*ctx->Driver.CompressedTexSubImage2D)(ctx, target, level,
+ xoffset, yoffset, width, height, format,
+ imageSize, data, texObj, texImage);
+ }
+ if (!success) {
+ /* XXX what else can we do? */
+ gl_problem(ctx, "glCompressedTexSubImage2DARB failed!");
+ return;
+ }
+}
+
+
+void
+_mesa_CompressedTexSubImage3DARB(GLenum target, GLint level, GLint xoffset,
+ GLint yoffset, GLint zoffset, GLsizei width,
+ GLsizei height, GLsizei depth, GLenum format,
+ GLsizei imageSize, const GLvoid *data)
+{
+ GET_CURRENT_CONTEXT(ctx);
+ struct gl_texture_unit *texUnit;
+ struct gl_texture_object *texObj;
+ struct gl_texture_image *texImage;
+ GLboolean success = GL_FALSE;
+
+ if (subtexture_error_check(ctx, 3, target, level, xoffset, yoffset, zoffset,
+ width, height, depth, format, GL_NONE)) {
+ return; /* error was detected */
+ }
+
+ texUnit = &ctx->Texture.Unit[ctx->Texture.CurrentUnit];
+ texObj = _mesa_select_tex_object(ctx, texUnit, target);
+ texImage = texObj->Image[level];
+ assert(texImage);
+
+ if (width == 0 || height == 0 || depth == 0 || !data)
+ return; /* no-op, not an error */
+
+ if (ctx->Driver.CompressedTexSubImage3D) {
+ success = (*ctx->Driver.CompressedTexSubImage3D)(ctx, target, level,
+ xoffset, yoffset, zoffset, width, height, depth,
+ format, imageSize, data, texObj, texImage);
+ }
+ if (!success) {
+ /* XXX what else can we do? */
+ gl_problem(ctx, "glCompressedTexSubImage3DARB failed!");
+ return;
+ }
+}
+
+
+void
+_mesa_GetCompressedTexImageARB(GLenum target, GLint level, GLvoid *img)
+{
+ GET_CURRENT_CONTEXT(ctx);
+ const struct gl_texture_object *texObj;
+ struct gl_texture_image *texImage;
+
+ ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx, "glGetCompressedTexImageARB");
+
+ if (level < 0 || level >= ctx->Const.MaxTextureLevels) {
+ gl_error( ctx, GL_INVALID_VALUE, "glGetCompressedTexImageARB(level)" );
+ return;
+ }
+
+ switch (target) {
+ case GL_TEXTURE_1D:
+ texObj = ctx->Texture.Unit[ctx->Texture.CurrentUnit].CurrentD[1];
+ texImage = texObj->Image[level];
+ break;
+ case GL_TEXTURE_2D:
+ texObj = ctx->Texture.Unit[ctx->Texture.CurrentUnit].CurrentD[2];
+ texImage = texObj->Image[level];
+ break;
+ case GL_TEXTURE_CUBE_MAP_POSITIVE_X_ARB:
+ texObj = ctx->Texture.Unit[ctx->Texture.CurrentUnit].CurrentCubeMap;
+ texImage = texObj->Image[level];
+ break;
+ case GL_TEXTURE_CUBE_MAP_NEGATIVE_X_ARB:
+ texObj = ctx->Texture.Unit[ctx->Texture.CurrentUnit].CurrentCubeMap;
+ texImage = texObj->NegX[level];
+ break;
+ case GL_TEXTURE_CUBE_MAP_POSITIVE_Y_ARB:
+ texObj = ctx->Texture.Unit[ctx->Texture.CurrentUnit].CurrentCubeMap;
+ texImage = texObj->PosY[level];
+ break;
+ case GL_TEXTURE_CUBE_MAP_NEGATIVE_Y_ARB:
+ texObj = ctx->Texture.Unit[ctx->Texture.CurrentUnit].CurrentCubeMap;
+ texImage = texObj->NegY[level];
+ break;
+ case GL_TEXTURE_CUBE_MAP_POSITIVE_Z_ARB:
+ texObj = ctx->Texture.Unit[ctx->Texture.CurrentUnit].CurrentCubeMap;
+ texImage = texObj->PosZ[level];
+ break;
+ case GL_TEXTURE_CUBE_MAP_NEGATIVE_Z_ARB:
+ texObj = ctx->Texture.Unit[ctx->Texture.CurrentUnit].CurrentCubeMap;
+ texImage = texObj->NegZ[level];
+ break;
+ case GL_TEXTURE_3D:
+ texObj = ctx->Texture.Unit[ctx->Texture.CurrentUnit].CurrentD[3];
+ texImage = texObj->Image[level];
+ break;
+ default:
+ gl_error(ctx, GL_INVALID_ENUM, "glGetCompressedTexImageARB(target)");
+ return;
+ }
+
+ if (!texImage) {
+ /* invalid mipmap level */
+ gl_error(ctx, GL_INVALID_VALUE, "glGetCompressedTexImageARB(level)");
+ return;
+ }
+
+ if (!texImage->IsCompressed) {
+ gl_error(ctx, GL_INVALID_OPERATION, "glGetCompressedTexImageARB");
+ return;
+ }
+
+ if (!img)
+ return;
+
+ if (ctx->Driver.GetCompressedTexImage) {
+ (*ctx->Driver.GetCompressedTexImage)(ctx, target, level, img, texObj,
+ texImage);
+ }
+ else {
+ gl_problem(ctx, "Driver doesn't implement GetCompressedTexImage");
+ }
+}
diff --git a/xc/extras/Mesa/src/teximage.h b/xc/extras/Mesa/src/teximage.h
index 665f39cb2..606bac31c 100644
--- a/xc/extras/Mesa/src/teximage.h
+++ b/xc/extras/Mesa/src/teximage.h
@@ -35,7 +35,7 @@
extern GLint
-_mesa_base_tex_format( GLint format );
+_mesa_base_tex_format( GLcontext *ctx, GLint format );
extern struct gl_texture_image *
@@ -46,6 +46,21 @@ extern void
_mesa_free_texture_image( struct gl_texture_image *teximage );
+extern GLuint
+_mesa_compressed_image_size(GLenum internalFormat,
+ GLint width, GLint height, GLint depth);
+
+
+extern struct gl_texture_object *
+_mesa_select_tex_object(GLcontext *ctx, struct gl_texture_unit *texUnit,
+ GLenum target);
+
+
+extern struct gl_texture_image *
+_mesa_select_tex_image(GLcontext *ctx, const struct gl_texture_unit *texUnit,
+ GLenum target, GLint level);
+
+
extern void
_mesa_get_teximage_from_driver( GLcontext *ctx, GLenum target, GLint level,
const struct gl_texture_object *texObj );
@@ -134,5 +149,47 @@ _mesa_CopyTexSubImage3D( GLenum target, GLint level,
GLint xoffset, GLint yoffset, GLint zoffset,
GLint x, GLint y, GLsizei width, GLsizei height );
+
+
+extern void
+_mesa_CompressedTexImage1DARB(GLenum target, GLint level,
+ GLenum internalformat, GLsizei width,
+ GLint border, GLsizei imageSize,
+ const GLvoid *data);
+
+extern void
+_mesa_CompressedTexImage2DARB(GLenum target, GLint level,
+ GLenum internalformat, GLsizei width,
+ GLsizei height, GLint border, GLsizei imageSize,
+ const GLvoid *data);
+
+extern void
+_mesa_CompressedTexImage3DARB(GLenum target, GLint level,
+ GLenum internalformat, GLsizei width,
+ GLsizei height, GLsizei depth, GLint border,
+ GLsizei imageSize, const GLvoid *data);
+
+
+extern void
+_mesa_CompressedTexSubImage1DARB(GLenum target, GLint level, GLint xoffset,
+ GLsizei width, GLenum format,
+ GLsizei imageSize, const GLvoid *data);
+
+extern void
+_mesa_CompressedTexSubImage2DARB(GLenum target, GLint level, GLint xoffset,
+ GLint yoffset, GLsizei width, GLsizei height,
+ GLenum format, GLsizei imageSize,
+ const GLvoid *data);
+
+extern void
+_mesa_CompressedTexSubImage3DARB(GLenum target, GLint level, GLint xoffset,
+ GLint yoffset, GLint zoffset, GLsizei width,
+ GLsizei height, GLsizei depth, GLenum format,
+ GLsizei imageSize, const GLvoid *data);
+
+extern void
+_mesa_GetCompressedTexImageARB(GLenum target, GLint lod, GLvoid *img);
+
+
#endif
diff --git a/xc/extras/Mesa/src/texobj.c b/xc/extras/Mesa/src/texobj.c
index 330943b57..91876bf5b 100644
--- a/xc/extras/Mesa/src/texobj.c
+++ b/xc/extras/Mesa/src/texobj.c
@@ -47,7 +47,7 @@
* table.
* Input: shared - the shared GL state structure to contain the texture object
* name - integer name for the texture object
- * dimensions - either 1, 2 or 3
+ * dimensions - either 1, 2, 3 or 6 (cube map)
* Return: pointer to new texture object
*/
struct gl_texture_object *
@@ -56,7 +56,7 @@ gl_alloc_texture_object( struct gl_shared_state *shared, GLuint name,
{
struct gl_texture_object *obj;
- ASSERT(dimensions <= 3);
+ ASSERT(dimensions <= 3 || dimensions == 6);
obj = CALLOC_STRUCT(gl_texture_object);
@@ -159,7 +159,9 @@ void gl_free_texture_object( struct gl_shared_state *shared,
* Examine a texture object to determine if it is complete or not.
* The t->Complete flag will be set to GL_TRUE or GL_FALSE accordingly.
*/
-void gl_test_texture_object_completeness( const GLcontext *ctx, struct gl_texture_object *t )
+void
+_mesa_test_texobj_completeness( const GLcontext *ctx,
+ struct gl_texture_object *t )
{
t->Complete = GL_TRUE; /* be optimistic */
@@ -170,13 +172,13 @@ void gl_test_texture_object_completeness( const GLcontext *ctx, struct gl_textur
}
/* Compute number of mipmap levels */
- if (t->Dimensions==1) {
+ if (t->Dimensions == 1) {
t->P = t->Image[0]->WidthLog2;
}
- else if (t->Dimensions==2) {
+ else if (t->Dimensions == 2 || t->Dimensions == 6) {
t->P = MAX2(t->Image[0]->WidthLog2, t->Image[0]->HeightLog2);
}
- else if (t->Dimensions==3) {
+ else if (t->Dimensions == 3) {
GLint max = MAX2(t->Image[0]->WidthLog2, t->Image[0]->HeightLog2);
max = MAX2(max, (GLint)(t->Image[0]->DepthLog2));
t->P = max;
@@ -186,7 +188,21 @@ void gl_test_texture_object_completeness( const GLcontext *ctx, struct gl_textur
t->M = (GLfloat) (MIN2(t->MaxLevel, t->P) - t->BaseLevel);
- if (t->MinFilter!=GL_NEAREST && t->MinFilter!=GL_LINEAR) {
+ if (t->Dimensions == 6) {
+ /* make sure all six level 0 images are same size */
+ const GLint w = t->Image[0]->Width2;
+ const GLint h = t->Image[0]->Height2;
+ if (!t->NegX[0] || t->NegX[0]->Width2 != w || t->NegX[0]->Height2 != h ||
+ !t->PosY[0] || t->PosY[0]->Width2 != w || t->PosY[0]->Height2 != h ||
+ !t->NegY[0] || t->NegY[0]->Width2 != w || t->NegY[0]->Height2 != h ||
+ !t->PosZ[0] || t->PosZ[0]->Width2 != w || t->PosZ[0]->Height2 != h ||
+ !t->NegZ[0] || t->NegZ[0]->Width2 != w || t->NegZ[0]->Height2 != h) {
+ t->Complete = GL_FALSE;
+ return;
+ }
+ }
+
+ if (t->MinFilter != GL_NEAREST && t->MinFilter != GL_LINEAR) {
/*
* Mipmapping: determine if we have a complete set of mipmaps
*/
@@ -215,11 +231,11 @@ void gl_test_texture_object_completeness( const GLcontext *ctx, struct gl_textur
}
/* Test things which depend on number of texture image dimensions */
- if (t->Dimensions==1) {
+ if (t->Dimensions == 1) {
/* Test 1-D mipmaps */
GLuint width = t->Image[0]->Width2;
- for (i=1; i<ctx->Const.MaxTextureLevels; i++) {
- if (width>1) {
+ for (i = 1; i < ctx->Const.MaxTextureLevels; i++) {
+ if (width > 1) {
width /= 2;
}
if (i >= minLevel && i <= maxLevel) {
@@ -232,20 +248,20 @@ void gl_test_texture_object_completeness( const GLcontext *ctx, struct gl_textur
return;
}
}
- if (width==1) {
+ if (width == 1) {
return; /* found smallest needed mipmap, all done! */
}
}
}
- else if (t->Dimensions==2) {
+ else if (t->Dimensions == 2) {
/* Test 2-D mipmaps */
GLuint width = t->Image[0]->Width2;
GLuint height = t->Image[0]->Height2;
- for (i=1; i<ctx->Const.MaxTextureLevels; i++) {
- if (width>1) {
+ for (i = 1; i < ctx->Const.MaxTextureLevels; i++) {
+ if (width > 1) {
width /= 2;
}
- if (height>1) {
+ if (height > 1) {
height /= 2;
}
if (i >= minLevel && i <= maxLevel) {
@@ -267,19 +283,19 @@ void gl_test_texture_object_completeness( const GLcontext *ctx, struct gl_textur
}
}
}
- else if (t->Dimensions==3) {
+ else if (t->Dimensions == 3) {
/* Test 3-D mipmaps */
GLuint width = t->Image[0]->Width2;
GLuint height = t->Image[0]->Height2;
GLuint depth = t->Image[0]->Depth2;
- for (i=1; i<ctx->Const.MaxTextureLevels; i++) {
- if (width>1) {
+ for (i = 1; i < ctx->Const.MaxTextureLevels; i++) {
+ if (width > 1) {
width /= 2;
}
- if (height>1) {
+ if (height > 1) {
height /= 2;
}
- if (depth>1) {
+ if (depth > 1) {
depth /= 2;
}
if (i >= minLevel && i <= maxLevel) {
@@ -300,7 +316,41 @@ void gl_test_texture_object_completeness( const GLcontext *ctx, struct gl_textur
return;
}
}
- if (width==1 && height==1 && depth==1) {
+ if (width == 1 && height == 1 && depth == 1) {
+ return; /* found smallest needed mipmap, all done! */
+ }
+ }
+ }
+ else if (t->Dimensions == 6) {
+ /* make sure 6 cube faces are consistant */
+ GLuint width = t->Image[0]->Width2;
+ GLuint height = t->Image[0]->Height2;
+ for (i = 1; i < ctx->Const.MaxTextureLevels; i++) {
+ if (width > 1) {
+ width /= 2;
+ }
+ if (height > 1) {
+ height /= 2;
+ }
+ if (i >= minLevel && i <= maxLevel) {
+ /* check that we have images defined */
+ if (!t->Image[i] || !t->NegX[i] ||
+ !t->PosY[i] || !t->NegY[i] ||
+ !t->PosZ[i] || !t->NegZ[i]) {
+ t->Complete = GL_FALSE;
+ return;
+ }
+ /* check that all six images have same size */
+ if (t->NegX[i]->Width2!=width || t->NegX[i]->Height2!=height ||
+ t->PosY[i]->Width2!=width || t->PosY[i]->Height2!=height ||
+ t->NegY[i]->Width2!=width || t->NegY[i]->Height2!=height ||
+ t->PosZ[i]->Width2!=width || t->PosZ[i]->Height2!=height ||
+ t->NegZ[i]->Width2!=width || t->NegZ[i]->Height2!=height) {
+ t->Complete = GL_FALSE;
+ return;
+ }
+ }
+ if (width == 1 && height == 1) {
return; /* found smallest needed mipmap, all done! */
}
}
@@ -428,25 +478,37 @@ _mesa_BindTexture( GLenum target, GLuint texName )
switch (target) {
case GL_TEXTURE_1D:
dim = 1;
+ oldTexObj = texUnit->CurrentD[1];
break;
case GL_TEXTURE_2D:
dim = 2;
+ oldTexObj = texUnit->CurrentD[2];
break;
case GL_TEXTURE_3D:
dim = 3;
+ oldTexObj = texUnit->CurrentD[3];
break;
+ case GL_TEXTURE_CUBE_MAP_ARB:
+ if (ctx->Extensions.HaveTextureCubeMap) {
+ dim = 6;
+ oldTexObj = texUnit->CurrentCubeMap;
+ break;
+ }
+ /* fallthrough */
default:
gl_error( ctx, GL_INVALID_ENUM, "glBindTexture(target)" );
return;
}
- oldTexObj = texUnit->CurrentD[dim];
-
if (oldTexObj->Name == texName)
return;
- if (texName == 0)
- newTexObj = ctx->Shared->DefaultD[dim];
+ if (texName == 0) {
+ if (target == GL_TEXTURE_CUBE_MAP_ARB)
+ newTexObj = ctx->Shared->DefaultCubeMap;
+ else
+ newTexObj = ctx->Shared->DefaultD[dim];
+ }
else {
struct _mesa_HashTable *hash = ctx->Shared->TexObjects;
newTexObj = (struct gl_texture_object *) _mesa_HashLookup(hash, texName);
@@ -466,7 +528,22 @@ _mesa_BindTexture( GLenum target, GLuint texName )
newTexObj->RefCount++;
- texUnit->CurrentD[dim] = newTexObj;
+ switch (target) {
+ case GL_TEXTURE_1D:
+ texUnit->CurrentD[1] = newTexObj;
+ break;
+ case GL_TEXTURE_2D:
+ texUnit->CurrentD[2] = newTexObj;
+ break;
+ case GL_TEXTURE_3D:
+ texUnit->CurrentD[3] = newTexObj;
+ break;
+ case GL_TEXTURE_CUBE_MAP_ARB:
+ texUnit->CurrentCubeMap = newTexObj;
+ break;
+ default:
+ gl_problem(ctx, "bad target in BindTexture");
+ }
/* If we've changed the CurrentD[123] texture object then update the
* ctx->Texture.Current pointer to point to the new texture object.
diff --git a/xc/extras/Mesa/src/texobj.h b/xc/extras/Mesa/src/texobj.h
index 5c578e9d0..c83c6144c 100644
--- a/xc/extras/Mesa/src/texobj.h
+++ b/xc/extras/Mesa/src/texobj.h
@@ -31,9 +31,6 @@
#include "types.h"
-#ifdef VMS
-#define gl_test_texture_object_completeness gl_test_texture_object_complete
-#endif
/*
* Internal functions
@@ -48,7 +45,9 @@ extern void gl_free_texture_object( struct gl_shared_state *shared,
struct gl_texture_object *t );
-extern void gl_test_texture_object_completeness( const GLcontext *ctx, struct gl_texture_object *t );
+extern void
+_mesa_test_texobj_completeness( const GLcontext *ctx,
+ struct gl_texture_object *t );
/*
diff --git a/xc/extras/Mesa/src/texstate.c b/xc/extras/Mesa/src/texstate.c
index 41b2f0219..a51a7f873 100644
--- a/xc/extras/Mesa/src/texstate.c
+++ b/xc/extras/Mesa/src/texstate.c
@@ -34,6 +34,7 @@
#include "macros.h"
#include "matrix.h"
#include "texobj.h"
+#include "teximage.h"
#include "texstate.h"
#include "texture.h"
#include "types.h"
@@ -272,6 +273,12 @@ _mesa_TexParameterfv( GLenum target, GLenum pname, const GLfloat *params )
case GL_TEXTURE_3D_EXT:
texObj = texUnit->CurrentD[3];
break;
+ case GL_TEXTURE_CUBE_MAP_ARB:
+ if (ctx->Extensions.HaveTextureCubeMap) {
+ texObj = texUnit->CurrentCubeMap;
+ break;
+ }
+ /* fallthrough */
default:
gl_error( ctx, GL_INVALID_ENUM, "glTexParameter(target)" );
return;
@@ -424,6 +431,28 @@ _mesa_GetTexLevelParameterfv( GLenum target, GLint level,
}
+static GLuint
+tex_image_dimensions(GLcontext *ctx, GLenum target)
+{
+ switch (target) {
+ case GL_TEXTURE_1D:
+ case GL_PROXY_TEXTURE_1D:
+ return 1;
+ case GL_TEXTURE_2D:
+ case GL_PROXY_TEXTURE_2D:
+ return 2;
+ case GL_TEXTURE_3D:
+ case GL_PROXY_TEXTURE_3D:
+ return 3;
+ case GL_TEXTURE_CUBE_MAP_ARB:
+ case GL_PROXY_TEXTURE_CUBE_MAP_ARB:
+ return ctx->Extensions.HaveTextureCubeMap ? 2 : 0;
+ default:
+ gl_problem(ctx, "bad target in _mesa_tex_target_dimensions()");
+ return 0;
+ }
+}
+
void
_mesa_GetTexLevelParameteriv( GLenum target, GLint level,
@@ -433,6 +462,7 @@ _mesa_GetTexLevelParameteriv( GLenum target, GLint level,
const struct gl_texture_unit *texUnit = &ctx->Texture.Unit[ctx->Texture.CurrentUnit];
const struct gl_texture_image *img = NULL;
GLuint dimensions;
+ GLboolean isProxy;
ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx, "glGetTexLevelParameter");
@@ -441,36 +471,13 @@ _mesa_GetTexLevelParameteriv( GLenum target, GLint level,
return;
}
- switch (target) {
- case GL_TEXTURE_1D:
- img = texUnit->CurrentD[1]->Image[level];
- dimensions = 1;
- break;
- case GL_TEXTURE_2D:
- img = texUnit->CurrentD[2]->Image[level];
- dimensions = 2;
- break;
- case GL_TEXTURE_3D:
- img = texUnit->CurrentD[3]->Image[level];
- dimensions = 3;
- break;
- case GL_PROXY_TEXTURE_1D:
- img = ctx->Texture.Proxy1D->Image[level];
- dimensions = 1;
- break;
- case GL_PROXY_TEXTURE_2D:
- img = ctx->Texture.Proxy2D->Image[level];
- dimensions = 2;
- break;
- case GL_PROXY_TEXTURE_3D:
- img = ctx->Texture.Proxy3D->Image[level];
- dimensions = 3;
- break;
- default:
- gl_error(ctx, GL_INVALID_ENUM, "glGetTexLevelParameter[if]v(target)");
- return;
+ dimensions = tex_image_dimensions(ctx, target); /* 1, 2 or 3 */
+ if (dimensions == 0) {
+ gl_error(ctx, GL_INVALID_ENUM, "glGetTexLevelParameter[if]v(target)");
+ return;
}
+ img = _mesa_select_tex_image(ctx, texUnit, target, level);
if (!img) {
if (pname == GL_TEXTURE_COMPONENTS)
*params = 1;
@@ -479,6 +486,11 @@ _mesa_GetTexLevelParameteriv( GLenum target, GLint level,
return;
}
+ isProxy = (target == GL_PROXY_TEXTURE_1D) ||
+ (target == GL_PROXY_TEXTURE_2D) ||
+ (target == GL_PROXY_TEXTURE_3D) ||
+ (target == GL_PROXY_TEXTURE_CUBE_MAP_ARB);
+
switch (pname) {
case GL_TEXTURE_WIDTH:
*params = img->Width;
@@ -528,9 +540,31 @@ _mesa_GetTexLevelParameteriv( GLenum target, GLint level,
case GL_TEXTURE_INDEX_SIZE_EXT:
*params = img->IndexBits;
return;
+
+ /* GL_ARB_texture_compression */
+ case GL_TEXTURE_COMPRESSED_IMAGE_SIZE_ARB:
+ if (ctx->Extensions.HaveTextureCompression) {
+ if (img->IsCompressed && !isProxy)
+ *params = img->CompressedSize;
+ else
+ gl_error(ctx, GL_INVALID_OPERATION,
+ "glGetTexLevelParameter[if]v(pname)");
+ }
+ else {
+ gl_error(ctx, GL_INVALID_ENUM, "glGetTexLevelParameter[if]v(pname)");
+ }
+ return;
+ case GL_TEXTURE_COMPRESSED_ARB:
+ if (ctx->Extensions.HaveTextureCompression) {
+ *params = (GLint) img->IsCompressed;
+ }
+ else {
+ gl_error(ctx, GL_INVALID_ENUM, "glGetTexLevelParameter[if]v(pname)");
+ }
+ return;
+
default:
- gl_error( ctx, GL_INVALID_ENUM,
- "glGetTexLevelParameter[if]v(pname)" );
+ gl_error(ctx, GL_INVALID_ENUM, "glGetTexLevelParameter[if]v(pname)");
}
}
@@ -545,19 +579,10 @@ _mesa_GetTexParameterfv( GLenum target, GLenum pname, GLfloat *params )
ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx, "glGetTexParameterfv");
- switch (target) {
- case GL_TEXTURE_1D:
- obj = texUnit->CurrentD[1];
- break;
- case GL_TEXTURE_2D:
- obj = texUnit->CurrentD[2];
- break;
- case GL_TEXTURE_3D_EXT:
- obj = texUnit->CurrentD[3];
- break;
- default:
- gl_error(ctx, GL_INVALID_ENUM, "glGetTexParameterfv(target)");
- return;
+ obj = _mesa_select_tex_object(ctx, texUnit, target);
+ if (!obj) {
+ gl_error(ctx, GL_INVALID_ENUM, "glGetTexParameterfv(target)");
+ return;
}
switch (pname) {
@@ -615,19 +640,10 @@ _mesa_GetTexParameteriv( GLenum target, GLenum pname, GLint *params )
ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx, "glGetTexParameteriv");
- switch (target) {
- case GL_TEXTURE_1D:
- obj = texUnit->CurrentD[1];
- break;
- case GL_TEXTURE_2D:
- obj = texUnit->CurrentD[2];
- break;
- case GL_TEXTURE_3D_EXT:
- obj = texUnit->CurrentD[3];
- break;
- default:
- gl_error(ctx, GL_INVALID_ENUM, "glGetTexParameteriv(target)");
- return;
+ obj = _mesa_select_tex_object(ctx, texUnit, target);
+ if (!obj) {
+ gl_error(ctx, GL_INVALID_ENUM, "glGetTexParameteriv(target)");
+ return;
}
switch (pname) {
@@ -756,30 +772,30 @@ _mesa_TexGenfv( GLenum coord, GLenum pname, const GLfloat *params )
case GL_T:
if (pname==GL_TEXTURE_GEN_MODE) {
GLenum mode = (GLenum) (GLint) *params;
- switch(mode) {
- case GL_OBJECT_LINEAR:
- texUnit->GenModeT = GL_OBJECT_LINEAR;
- texUnit->GenBitT = TEXGEN_OBJ_LINEAR;
- break;
- case GL_EYE_LINEAR:
- texUnit->GenModeT = GL_EYE_LINEAR;
- texUnit->GenBitT = TEXGEN_EYE_LINEAR;
- break;
- case GL_REFLECTION_MAP_NV:
- texUnit->GenModeT = GL_REFLECTION_MAP_NV;
- texUnit->GenBitT = TEXGEN_REFLECTION_MAP_NV;
- break;
- case GL_NORMAL_MAP_NV:
- texUnit->GenModeT = GL_NORMAL_MAP_NV;
- texUnit->GenBitT = TEXGEN_NORMAL_MAP_NV;
- break;
- case GL_SPHERE_MAP:
- texUnit->GenModeT = GL_SPHERE_MAP;
- texUnit->GenBitT = TEXGEN_SPHERE_MAP;
- break;
- default:
- gl_error( ctx, GL_INVALID_ENUM, "glTexGenfv(param)" );
- return;
+ switch (mode) {
+ case GL_OBJECT_LINEAR:
+ texUnit->GenModeT = GL_OBJECT_LINEAR;
+ texUnit->GenBitT = TEXGEN_OBJ_LINEAR;
+ break;
+ case GL_EYE_LINEAR:
+ texUnit->GenModeT = GL_EYE_LINEAR;
+ texUnit->GenBitT = TEXGEN_EYE_LINEAR;
+ break;
+ case GL_REFLECTION_MAP_NV:
+ texUnit->GenModeT = GL_REFLECTION_MAP_NV;
+ texUnit->GenBitT = TEXGEN_REFLECTION_MAP_NV;
+ break;
+ case GL_NORMAL_MAP_NV:
+ texUnit->GenModeT = GL_NORMAL_MAP_NV;
+ texUnit->GenBitT = TEXGEN_NORMAL_MAP_NV;
+ break;
+ case GL_SPHERE_MAP:
+ texUnit->GenModeT = GL_SPHERE_MAP;
+ texUnit->GenBitT = TEXGEN_SPHERE_MAP;
+ break;
+ default:
+ gl_error( ctx, GL_INVALID_ENUM, "glTexGenfv(param)" );
+ return;
}
}
else if (pname==GL_OBJECT_PLANE) {
@@ -946,7 +962,7 @@ _mesa_GetTexGendv( GLenum coord, GLenum pname, GLdouble *params )
ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx, "glGetTexGendv");
- switch( coord ) {
+ switch (coord) {
case GL_S:
if (pname==GL_TEXTURE_GEN_MODE) {
params[0] = ENUM_TO_DOUBLE(texUnit->GenModeS);
@@ -1024,7 +1040,7 @@ _mesa_GetTexGenfv( GLenum coord, GLenum pname, GLfloat *params )
ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx, "glGetTexGenfv");
- switch( coord ) {
+ switch (coord) {
case GL_S:
if (pname==GL_TEXTURE_GEN_MODE) {
params[0] = ENUM_TO_FLOAT(texUnit->GenModeS);
@@ -1102,7 +1118,7 @@ _mesa_GetTexGeniv( GLenum coord, GLenum pname, GLint *params )
ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx, "glGetTexGeniv");
- switch( coord ) {
+ switch (coord) {
case GL_S:
if (pname==GL_TEXTURE_GEN_MODE) {
params[0] = texUnit->GenModeS;
@@ -1308,8 +1324,8 @@ void gl_update_dirty_texobjs( GLcontext *ctx )
struct gl_texture_object *t, *next;
for (t = ctx->Shared->DirtyTexObjList; t; t = next) {
next = t->NextDirty;
- gl_test_texture_object_completeness(ctx, t);
- gl_set_texture_sampler(t);
+ _mesa_test_texobj_completeness(ctx, t);
+ _mesa_set_texture_sampler(t);
t->NextDirty = NULL;
t->Dirty = GL_FALSE;
}
diff --git a/xc/extras/Mesa/src/texture.c b/xc/extras/Mesa/src/texture.c
index d101e2518..829b1bcb7 100644
--- a/xc/extras/Mesa/src/texture.c
+++ b/xc/extras/Mesa/src/texture.c
@@ -145,7 +145,12 @@ void gl_update_texture_unit( GLcontext *ctx, struct gl_texture_unit *texUnit )
{
(void) ctx;
- if ((texUnit->Enabled & TEXTURE0_3D) && texUnit->CurrentD[3]->Complete) {
+ if ((texUnit->Enabled & TEXTURE0_CUBE) && texUnit->CurrentCubeMap->Complete) {
+ texUnit->ReallyEnabled = TEXTURE0_CUBE;
+ texUnit->Current = texUnit->CurrentCubeMap;
+ texUnit->CurrentDimension = 6;
+ }
+ else if ((texUnit->Enabled & TEXTURE0_3D) && texUnit->CurrentD[3]->Complete) {
texUnit->ReallyEnabled = TEXTURE0_3D;
texUnit->Current = texUnit->CurrentD[3];
texUnit->CurrentDimension = 3;
@@ -163,6 +168,10 @@ void gl_update_texture_unit( GLcontext *ctx, struct gl_texture_unit *texUnit )
else {
if (MESA_VERBOSE & VERBOSE_TEXTURE) {
switch (texUnit->Enabled) {
+ case TEXTURE0_CUBE:
+ fprintf(stderr, "Using incomplete cube texture %u\n",
+ texUnit->CurrentCubeMap->Name);
+ break;
case TEXTURE0_3D:
fprintf(stderr, "Using incomplete 3d texture %u\n",
texUnit->CurrentD[3]->Name);
@@ -1651,6 +1660,187 @@ static void sample_lambda_3d( const struct gl_texture_object *tObj, GLuint n,
}
+/**********************************************************************/
+/* Texture Cube Map Sampling Functions */
+/**********************************************************************/
+
+static struct gl_texture_image *
+choose_cube_face(const struct gl_texture_object *texObj,
+ const GLfloat texcoord[4],
+ GLint level,
+ GLfloat *newS, GLfloat *newT)
+{
+/*
+ major axis
+ direction target sc tc ma
+ ---------- ------------------------------- --- --- ---
+ +rx TEXTURE_CUBE_MAP_POSITIVE_X_EXT -rz -ry rx
+ -rx TEXTURE_CUBE_MAP_NEGATIVE_X_EXT +rz -ry rx
+ +ry TEXTURE_CUBE_MAP_POSITIVE_Y_EXT +rx +rz ry
+ -ry TEXTURE_CUBE_MAP_NEGATIVE_Y_EXT +rx -rz ry
+ +rz TEXTURE_CUBE_MAP_POSITIVE_Z_EXT +rx -ry rz
+ -rz TEXTURE_CUBE_MAP_NEGATIVE_Z_EXT -rx -ry rz
+*/
+ struct gl_texture_image *texImg;
+ const GLfloat rx = texcoord[0], ry = texcoord[1], rz = texcoord[2];
+ const GLfloat arx = ABSF(rx), ary = ABSF(ry), arz = ABSF(rz);
+ GLfloat sc, tc, ma;
+
+ if (arx > ary && arx > arz) {
+ if (rx >= 0.0F) {
+ texImg = texObj->Image[level];
+ sc = -rz;
+ tc = -ry;
+ ma = arx;
+ }
+ else {
+ texImg = texObj->NegX[level];
+ sc = rz;
+ tc = -ry;
+ ma = arx;
+ }
+ }
+ else if (ary > arx && ary > arz) {
+ if (ry >= 0.0F) {
+ texImg = texObj->PosY[level];
+ sc = rx;
+ tc = rz;
+ ma = ary;
+ }
+ else {
+ texImg = texObj->NegY[level];
+ sc = rx;
+ tc = -rz;
+ ma = ary;
+ }
+ }
+ else {
+ if (rz > 0.0F) {
+ texImg = texObj->PosZ[level];
+ sc = rx;
+ tc = -ry;
+ ma = arz;
+ }
+ else {
+ texImg = texObj->NegZ[level];
+ sc = -rx;
+ tc = -ry;
+ ma = arz;
+ }
+ }
+
+ *newS = ( sc / ma + 1.0F ) * 0.5F;
+ *newT = ( tc / ma + 1.0F ) * 0.5F;
+ return texImg;
+}
+
+
+static void
+sample_nearest_cube(const struct gl_texture_object *tObj, GLuint n,
+ const GLfloat s[], const GLfloat t[],
+ const GLfloat u[], const GLfloat lambda[],
+ GLubyte rgba[][4])
+{
+ GLuint i;
+ (void) lambda;
+ for (i = 0; i < n; i++) {
+ struct gl_texture_image *image;
+ GLfloat newS, newT;
+ GLfloat coord[4];
+ coord[0] = s[i];
+ coord[1] = t[i];
+ coord[2] = u[i];
+ image = choose_cube_face(tObj, coord, 0, &newS, &newT);
+ sample_2d_nearest( tObj, image, newS, newT, rgba[i] );
+ }
+}
+
+static void
+sample_linear_cube(const struct gl_texture_object *tObj, GLuint n,
+ const GLfloat s[], const GLfloat t[],
+ const GLfloat u[], const GLfloat lambda[],
+ GLubyte rgba[][4])
+{
+ GLuint i;
+ (void) lambda;
+ for (i = 0; i < n; i++) {
+ struct gl_texture_image *image;
+ GLfloat newS, newT;
+ GLfloat coord[4];
+ coord[0] = s[i];
+ coord[1] = t[i];
+ coord[2] = u[i];
+ image = choose_cube_face(tObj, coord, 0, &newS, &newT);
+ sample_2d_linear( tObj, image, newS, newT, rgba[i] );
+ }
+}
+
+static void
+sample_lambda_cube(const struct gl_texture_object *tObj, GLuint n,
+ const GLfloat s[], const GLfloat t[],
+ const GLfloat u[], const GLfloat lambda[],
+ GLubyte rgba[][4])
+{
+ GLuint i;
+
+ for (i = 0; i < n; i++) {
+ struct gl_texture_image *image;
+ GLfloat newS, newT;
+ GLfloat coord[4];
+ coord[0] = s[i];
+ coord[1] = t[i];
+ coord[2] = u[i];
+ image = choose_cube_face(tObj, coord, 0, &newS, &newT);
+
+ if (lambda[i] > tObj->MinMagThresh) {
+ /* minification */
+ switch (tObj->MinFilter) {
+ case GL_NEAREST:
+ sample_2d_nearest( tObj, image, newS, newT, rgba[i] );
+ break;
+ case GL_LINEAR:
+ sample_2d_linear( tObj, image, newS, newT, rgba[i] );
+ break;
+ case GL_NEAREST_MIPMAP_NEAREST:
+ /*
+ sample_3d_nearest_mipmap_nearest( tObj, s[i], t[i], u[i], lambda[i], rgba[i] );
+ */
+ break;
+ case GL_LINEAR_MIPMAP_NEAREST:
+ /*
+ sample_3d_linear_mipmap_nearest( tObj, s[i], t[i], u[i], lambda[i], rgba[i] );
+ */
+ break;
+ case GL_NEAREST_MIPMAP_LINEAR:
+ /*
+ sample_3d_nearest_mipmap_linear( tObj, s[i], t[i], u[i], lambda[i], rgba[i] );
+ */
+ break;
+ case GL_LINEAR_MIPMAP_LINEAR:
+ /*
+ sample_3d_linear_mipmap_linear( tObj, s[i], t[i], u[i], lambda[i], rgba[i] );
+ */
+ break;
+ default:
+ gl_problem(NULL, "Bad min filter in sample_lambda_cube");
+ }
+ }
+ else {
+ /* magnification */
+ switch (tObj->MagFilter) {
+ case GL_NEAREST:
+ sample_2d_nearest( tObj, image, newS, newT, rgba[i] );
+ break;
+ case GL_LINEAR:
+ sample_2d_linear( tObj, image, newS, newT, rgba[i] );
+ break;
+ default:
+ gl_problem(NULL, "Bad mag filter in sample_lambda_cube");
+ }
+ }
+ }
+}
+
/**********************************************************************/
/* Texture Sampling Setup */
@@ -1660,7 +1850,8 @@ static void sample_lambda_3d( const struct gl_texture_object *tObj, GLuint n,
/*
* Setup the texture sampling function for this texture object.
*/
-void gl_set_texture_sampler( struct gl_texture_object *t )
+void
+_mesa_set_texture_sampler( struct gl_texture_object *t )
{
if (!t->Complete) {
t->SampleFunc = NULL;
@@ -1726,8 +1917,20 @@ void gl_set_texture_sampler( struct gl_texture_object *t )
t->SampleFunc = sample_nearest_3d;
}
break;
+ case 6: /* cube map */
+ if (needLambda) {
+ t->SampleFunc = sample_lambda_cube;
+ }
+ else if (t->MinFilter==GL_LINEAR) {
+ t->SampleFunc = sample_linear_cube;
+ }
+ else {
+ ASSERT(t->MinFilter==GL_NEAREST);
+ t->SampleFunc = sample_nearest_cube;
+ }
+ break;
default:
- gl_problem(NULL, "invalid dimensions in gl_set_texture_sampler");
+ gl_problem(NULL, "invalid dimensions in _mesa_set_texture_sampler");
}
}
}
@@ -2095,12 +2298,11 @@ void gl_texture_pixels( GLcontext *ctx, GLuint texUnit, GLuint n,
const GLfloat r[], GLfloat lambda[],
GLubyte rgba[][4] )
{
- GLuint mask = (TEXTURE0_1D | TEXTURE0_2D | TEXTURE0_3D) << (texUnit * 4);
+ GLuint mask = (TEXTURE0_1D | TEXTURE0_2D | TEXTURE0_3D | TEXTURE0_CUBE) << (texUnit * 4);
if (ctx->Texture.Enabled & mask) {
const struct gl_texture_unit *textureUnit = &ctx->Texture.Unit[texUnit];
if (textureUnit->Current && textureUnit->Current->SampleFunc) {
GLubyte texel[PB_SIZE][4];
-
if (textureUnit->LodBias != 0.0F) {
/* apply LOD bias, but don't clamp yet */
GLuint i;
@@ -2123,7 +2325,14 @@ void gl_texture_pixels( GLcontext *ctx, GLuint texUnit, GLuint n,
/* fetch texture images from device driver, if needed */
{
- static const GLenum targets[] = {GL_TEXTURE_1D, GL_TEXTURE_2D, GL_TEXTURE_3D};
+ static const GLenum targets[] = {
+ GL_TEXTURE_1D,
+ GL_TEXTURE_2D,
+ GL_TEXTURE_3D,
+ GL_TEXTURE_CUBE_MAP_ARB,
+ GL_TEXTURE_CUBE_MAP_ARB,
+ GL_TEXTURE_CUBE_MAP_ARB
+ };
struct gl_texture_object *texObj = textureUnit->Current;
GLboolean needLambda = (texObj->MinFilter != texObj->MagFilter);
GLenum target = targets[texObj->Dimensions - 1];
diff --git a/xc/extras/Mesa/src/texture.h b/xc/extras/Mesa/src/texture.h
index d6631b786..58bc13136 100644
--- a/xc/extras/Mesa/src/texture.h
+++ b/xc/extras/Mesa/src/texture.h
@@ -34,7 +34,8 @@
#include "types.h"
-extern void gl_set_texture_sampler( struct gl_texture_object *t );
+extern void
+_mesa_set_texture_sampler( struct gl_texture_object *t );
extern void gl_init_texture( void );
diff --git a/xc/extras/Mesa/src/types.h b/xc/extras/Mesa/src/types.h
index 00c4275e7..d85698a73 100644
--- a/xc/extras/Mesa/src/types.h
+++ b/xc/extras/Mesa/src/types.h
@@ -31,7 +31,6 @@
#include "glheader.h"
#include "config.h"
-#include "extensions.h"
#include "fixed.h"
#include "glapitable.h"
#include "glthread.h"
@@ -176,49 +175,52 @@ typedef void (*TextureSampleFunc)( const struct gl_texture_object *tObj,
/* Texture image record */
struct gl_texture_image {
- GLenum Format; /* GL_ALPHA, GL_LUMINANCE, GL_LUMINANCE_ALPHA,
+ GLenum Format; /* GL_ALPHA, GL_LUMINANCE, GL_LUMINANCE_ALPHA,
* GL_INTENSITY, GL_RGB, GL_RGBA, or
* GL_COLOR_INDEX only
*/
- GLenum IntFormat; /* Internal format as given by the user */
- GLubyte RedBits; /* Bits per texel component */
- GLubyte GreenBits; /* These are initialized by Mesa but */
- GLubyte BlueBits; /* may be reassigned by the device */
- GLubyte AlphaBits; /* driver to indicate the true texture */
- GLubyte IntensityBits; /* color resolution. */
- GLubyte LuminanceBits;
- GLubyte IndexBits;
- GLuint Border; /* 0 or 1 */
- GLuint Width; /* = 2^WidthLog2 + 2*Border */
- GLuint Height; /* = 2^HeightLog2 + 2*Border */
- GLuint Depth; /* = 2^DepthLog2 + 2*Border */
- GLuint Width2; /* = Width - 2*Border */
- GLuint Height2; /* = Height - 2*Border */
- GLuint Depth2; /* = Depth - 2*Border */
- GLuint WidthLog2; /* = log2(Width2) */
- GLuint HeightLog2; /* = log2(Height2) */
- GLuint DepthLog2; /* = log2(Depth2) */
- GLuint MaxLog2; /* = MAX(WidthLog2, HeightLog2) */
- GLubyte *Data; /* Image data as unsigned bytes */
-
- /* For device driver: */
- void *DriverData; /* Arbitrary device driver data */
+ GLenum IntFormat; /* Internal format as given by the user */
+ GLubyte RedBits; /* Bits per texel component */
+ GLubyte GreenBits; /* These are initialized by Mesa but */
+ GLubyte BlueBits; /* may be reassigned by the device */
+ GLubyte AlphaBits; /* driver to indicate the true texture */
+ GLubyte IntensityBits; /* color resolution. */
+ GLubyte LuminanceBits;
+ GLubyte IndexBits;
+ GLuint Border; /* 0 or 1 */
+ GLuint Width; /* = 2^WidthLog2 + 2*Border */
+ GLuint Height; /* = 2^HeightLog2 + 2*Border */
+ GLuint Depth; /* = 2^DepthLog2 + 2*Border */
+ GLuint Width2; /* = Width - 2*Border */
+ GLuint Height2; /* = Height - 2*Border */
+ GLuint Depth2; /* = Depth - 2*Border */
+ GLuint WidthLog2; /* = log2(Width2) */
+ GLuint HeightLog2; /* = log2(Height2) */
+ GLuint DepthLog2; /* = log2(Depth2) */
+ GLuint MaxLog2; /* = MAX(WidthLog2, HeightLog2) */
+ GLubyte *Data; /* Image data as unsigned bytes */
+
+ GLboolean IsCompressed; /* GL_ARB_texture_compression */
+ GLuint CompressedSize; /* GL_ARB_texture_compression */
+
+ /* For device driver: */
+ void *DriverData; /* Arbitrary device driver data */
};
/* Data structure for color tables */
struct gl_color_table {
- GLvoid *Table;
- GLenum TableType; /* GL_UNSIGNED_BYTE or GL_FLOAT */
- GLuint Size; /* number of entries (rows) in table */
- GLenum Format;
- GLenum IntFormat;
- GLint RedSize;
- GLint GreenSize;
- GLint BlueSize;
- GLint AlphaSize;
- GLint LuminanceSize;
- GLint IntensitySize;
+ GLvoid *Table;
+ GLenum TableType; /* GL_UNSIGNED_BYTE or GL_FLOAT */
+ GLuint Size; /* number of entries (rows) in table */
+ GLenum Format;
+ GLenum IntFormat;
+ GLint RedSize;
+ GLint GreenSize;
+ GLint BlueSize;
+ GLint AlphaSize;
+ GLint LuminanceSize;
+ GLint IntensitySize;
};
@@ -262,47 +264,47 @@ struct gl_color_table {
#define SHINE_TABLE_SIZE 256
struct gl_light {
- struct gl_light *next; /* double linked list with sentinel */
- struct gl_light *prev;
-
- GLfloat Ambient[4]; /* ambient color */
- GLfloat Diffuse[4]; /* diffuse color */
- GLfloat Specular[4]; /* specular color */
- GLfloat EyePosition[4]; /* position in eye coordinates */
- GLfloat EyeDirection[4]; /* spotlight dir in eye coordinates */
- GLfloat SpotExponent;
- GLfloat SpotCutoff; /* in degress */
- GLfloat CosCutoff; /* = MAX(0, cos(SpotCutoff)) */
- GLfloat ConstantAttenuation;
- GLfloat LinearAttenuation;
- GLfloat QuadraticAttenuation;
- GLboolean Enabled; /* On/off flag */
-
- /* Derived fields */
- GLuint Flags; /* State */
-
- GLfloat Position[4]; /* position in eye/obj coordinates */
- GLfloat VP_inf_norm[3]; /* Norm direction to infinite light */
- GLfloat h_inf_norm[3]; /* Norm( VP_inf_norm + <0,0,1> ) */
- GLfloat NormDirection[4]; /* normalized spotlight direction */
- GLfloat VP_inf_spot_attenuation;
-
- GLfloat SpotExpTable[EXP_TABLE_SIZE][2]; /* to replace a pow() call */
- GLfloat MatAmbient[2][3]; /* material ambient * light ambient */
- GLfloat MatDiffuse[2][3]; /* material diffuse * light diffuse */
- GLfloat MatSpecular[2][3]; /* material spec * light specular */
- GLfloat dli; /* CI diffuse light intensity */
- GLfloat sli; /* CI specular light intensity */
- GLboolean IsMatSpecular[2];
+ struct gl_light *next; /* double linked list with sentinel */
+ struct gl_light *prev;
+
+ GLfloat Ambient[4]; /* ambient color */
+ GLfloat Diffuse[4]; /* diffuse color */
+ GLfloat Specular[4]; /* specular color */
+ GLfloat EyePosition[4]; /* position in eye coordinates */
+ GLfloat EyeDirection[4]; /* spotlight dir in eye coordinates */
+ GLfloat SpotExponent;
+ GLfloat SpotCutoff; /* in degress */
+ GLfloat CosCutoff; /* = MAX(0, cos(SpotCutoff)) */
+ GLfloat ConstantAttenuation;
+ GLfloat LinearAttenuation;
+ GLfloat QuadraticAttenuation;
+ GLboolean Enabled; /* On/off flag */
+
+ /* Derived fields */
+ GLuint Flags; /* State */
+
+ GLfloat Position[4]; /* position in eye/obj coordinates */
+ GLfloat VP_inf_norm[3]; /* Norm direction to infinite light */
+ GLfloat h_inf_norm[3]; /* Norm( VP_inf_norm + <0,0,1> ) */
+ GLfloat NormDirection[4]; /* normalized spotlight direction */
+ GLfloat VP_inf_spot_attenuation;
+
+ GLfloat SpotExpTable[EXP_TABLE_SIZE][2]; /* to replace a pow() call */
+ GLfloat MatAmbient[2][3]; /* material ambient * light ambient */
+ GLfloat MatDiffuse[2][3]; /* material diffuse * light diffuse */
+ GLfloat MatSpecular[2][3]; /* material spec * light specular */
+ GLfloat dli; /* CI diffuse light intensity */
+ GLfloat sli; /* CI specular light intensity */
+ GLboolean IsMatSpecular[2];
};
struct gl_lightmodel {
- GLfloat Ambient[4]; /* ambient color */
- GLboolean LocalViewer; /* Local (or infinite) view point? */
- GLboolean TwoSide; /* Two (or one) sided lighting? */
- GLenum ColorControl; /* either GL_SINGLE_COLOR */
- /* or GL_SEPARATE_SPECULAR_COLOR */
+ GLfloat Ambient[4]; /* ambient color */
+ GLboolean LocalViewer; /* Local (or infinite) view point? */
+ GLboolean TwoSide; /* Two (or one) sided lighting? */
+ GLenum ColorControl; /* either GL_SINGLE_COLOR */
+ /* or GL_SEPARATE_SPECULAR_COLOR */
};
@@ -314,7 +316,7 @@ struct gl_lightmodel {
struct gl_accum_attrib {
- GLfloat ClearColor[4]; /* Accumulation buffer clear color */
+ GLfloat ClearColor[4]; /* Accumulation buffer clear color */
};
@@ -328,197 +330,203 @@ struct gl_accum_attrib {
struct gl_colorbuffer_attrib {
- GLuint ClearIndex; /* Index to use for glClear */
- GLfloat ClearColor[4]; /* Color to use for glClear */
-
- GLuint IndexMask; /* Color index write mask */
- GLubyte ColorMask[4]; /* Each flag is 0xff or 0x0 */
- GLboolean SWmasking; /* Do color/CI masking in software? */
-
- GLenum DrawBuffer; /* Which buffer to draw into */
- GLenum DriverDrawBuffer; /* Current device driver dest buffer */
- GLboolean MultiDrawBuffer; /* Drawing to mutliple buffers? */
- GLubyte DrawDestMask; /* bitwise-OR of bitflags above */
-
- /* alpha testing */
- GLboolean AlphaEnabled; /* Alpha test enabled flag */
- GLenum AlphaFunc; /* Alpha test function */
- GLubyte AlphaRef; /* Alpha ref value in range [0,255] */
-
- /* blending */
- GLboolean BlendEnabled; /* Blending enabled flag */
- GLenum BlendSrcRGB; /* Blending source operator */
- GLenum BlendDstRGB; /* Blending destination operator */
- GLenum BlendSrcA; /* GL_INGR_blend_func_separate */
- GLenum BlendDstA; /* GL_INGR_blend_func_separate */
- GLenum BlendEquation;
- GLfloat BlendColor[4];
- blend_func BlendFunc; /* Points to C blending function */
-
- /* logic op */
- GLenum LogicOp; /* Logic operator */
- GLboolean IndexLogicOpEnabled; /* Color index logic op enabled flag */
- GLboolean ColorLogicOpEnabled; /* RGBA logic op enabled flag */
- GLboolean SWLogicOpEnabled; /* Do logic ops in software? */
-
- GLboolean DitherFlag; /* Dither enable flag */
+ GLuint ClearIndex; /* Index to use for glClear */
+ GLfloat ClearColor[4]; /* Color to use for glClear */
+
+ GLuint IndexMask; /* Color index write mask */
+ GLubyte ColorMask[4]; /* Each flag is 0xff or 0x0 */
+ GLboolean SWmasking; /* Do color/CI masking in software? */
+
+ GLenum DrawBuffer; /* Which buffer to draw into */
+ GLenum DriverDrawBuffer; /* Current device driver dest buffer */
+ GLboolean MultiDrawBuffer; /* Drawing to mutliple buffers? */
+ GLubyte DrawDestMask; /* bitwise-OR of bitflags above */
+
+ /* alpha testing */
+ GLboolean AlphaEnabled; /* Alpha test enabled flag */
+ GLenum AlphaFunc; /* Alpha test function */
+ GLubyte AlphaRef; /* Alpha ref value in range [0,255] */
+
+ /* blending */
+ GLboolean BlendEnabled; /* Blending enabled flag */
+ GLenum BlendSrcRGB; /* Blending source operator */
+ GLenum BlendDstRGB; /* Blending destination operator */
+ GLenum BlendSrcA; /* GL_INGR_blend_func_separate */
+ GLenum BlendDstA; /* GL_INGR_blend_func_separate */
+ GLenum BlendEquation;
+ GLfloat BlendColor[4];
+ blend_func BlendFunc; /* Points to C blending function */
+
+ /* logic op */
+ GLenum LogicOp; /* Logic operator */
+ GLboolean IndexLogicOpEnabled; /* Color index logic op enabled flag */
+ GLboolean ColorLogicOpEnabled; /* RGBA logic op enabled flag */
+ GLboolean SWLogicOpEnabled; /* Do logic ops in software? */
+
+ GLboolean DitherFlag; /* Dither enable flag */
};
struct gl_current_attrib {
- /* KW: These values valid only when the VB is flushed.
- */
- GLuint Flag; /* Contains size information */
- GLfloat Normal[3];
- GLubyte ByteColor[4]; /* Current RGBA color */
- GLuint Index; /* Current color index */
- GLboolean EdgeFlag; /* Current edge flag */
- GLfloat Texcoord[MAX_TEXTURE_UNITS][4]; /* Current texture coords */
- GLenum Primitive; /* Prim or GL_POLYGON+1 */
+ /* KW: These values valid only when the VB is flushed.
+ */
+ GLuint Flag; /* Contains size information */
+ GLfloat Normal[3];
+ GLubyte ByteColor[4]; /* Current RGBA color */
+ GLuint Index; /* Current color index */
+ GLboolean EdgeFlag; /* Current edge flag */
+ GLfloat Texcoord[MAX_TEXTURE_UNITS][4]; /* Current texture coords */
+ GLenum Primitive; /* Prim or GL_POLYGON+1 */
- /* KW: No change to these values.
- */
- GLfloat RasterPos[4]; /* Current raster position */
- GLfloat RasterDistance; /* Current raster distance */
- GLfloat RasterColor[4]; /* Current raster color */
- GLuint RasterIndex; /* Current raster index */
- GLfloat *RasterTexCoord; /* Current raster texcoord*/
- GLfloat RasterMultiTexCoord[MAX_TEXTURE_UNITS][4];
- GLboolean RasterPosValid; /* Raster po valid flag */
+ /* KW: No change to these values.
+ */
+ GLfloat RasterPos[4]; /* Current raster position */
+ GLfloat RasterDistance; /* Current raster distance */
+ GLfloat RasterColor[4]; /* Current raster color */
+ GLuint RasterIndex; /* Current raster index */
+ GLfloat *RasterTexCoord; /* Current raster texcoord*/
+ GLfloat RasterMultiTexCoord[MAX_TEXTURE_UNITS][4];
+ GLboolean RasterPosValid; /* Raster po valid flag */
};
struct gl_depthbuffer_attrib {
- GLenum Func; /* Function for depth buffer compare */
- GLfloat Clear; /* Value to clear depth buffer to */
- GLboolean Test; /* Depth buffering enabled flag */
- GLboolean Mask; /* Depth buffer writable? */
- GLboolean OcclusionTest;/* XXX GL_HP_occlusion_test */
+ GLenum Func; /* Function for depth buffer compare */
+ GLfloat Clear; /* Value to clear depth buffer to */
+ GLboolean Test; /* Depth buffering enabled flag */
+ GLboolean Mask; /* Depth buffer writable? */
+ GLboolean OcclusionTest; /* GL_HP_occlusion_test */
};
struct gl_enable_attrib {
- GLboolean AlphaTest;
- GLboolean AutoNormal;
- GLboolean Blend;
- GLboolean ClipPlane[MAX_CLIP_PLANES];
- GLboolean ColorMaterial;
- GLboolean CullFace;
- GLboolean DepthTest;
- GLboolean Dither;
- GLboolean Fog;
- GLboolean Histogram;
- GLboolean Light[MAX_LIGHTS];
- GLboolean Lighting;
- GLboolean LineSmooth;
- GLboolean LineStipple;
- GLboolean IndexLogicOp;
- GLboolean ColorLogicOp;
- GLboolean Map1Color4;
- GLboolean Map1Index;
- GLboolean Map1Normal;
- GLboolean Map1TextureCoord1;
- GLboolean Map1TextureCoord2;
- GLboolean Map1TextureCoord3;
- GLboolean Map1TextureCoord4;
- GLboolean Map1Vertex3;
- GLboolean Map1Vertex4;
- GLboolean Map2Color4;
- GLboolean Map2Index;
- GLboolean Map2Normal;
- GLboolean Map2TextureCoord1;
- GLboolean Map2TextureCoord2;
- GLboolean Map2TextureCoord3;
- GLboolean Map2TextureCoord4;
- GLboolean Map2Vertex3;
- GLboolean Map2Vertex4;
- GLboolean MinMax;
- GLboolean Normalize;
- GLboolean PixelTexture;
- GLboolean PointSmooth;
- GLboolean PolygonOffsetPoint;
- GLboolean PolygonOffsetLine;
- GLboolean PolygonOffsetFill;
- GLboolean PolygonSmooth;
- GLboolean PolygonStipple;
- GLboolean RescaleNormals;
- GLboolean Scissor;
- GLboolean Stencil;
- GLuint Texture;
- GLuint TexGen[MAX_TEXTURE_UNITS];
+ GLboolean AlphaTest;
+ GLboolean AutoNormal;
+ GLboolean Blend;
+ GLboolean ClipPlane[MAX_CLIP_PLANES];
+ GLboolean ColorMaterial;
+ GLboolean Convolution1D;
+ GLboolean Convolution2D;
+ GLboolean Separable2D;
+ GLboolean CullFace;
+ GLboolean DepthTest;
+ GLboolean Dither;
+ GLboolean Fog;
+ GLboolean Histogram;
+ GLboolean Light[MAX_LIGHTS];
+ GLboolean Lighting;
+ GLboolean LineSmooth;
+ GLboolean LineStipple;
+ GLboolean IndexLogicOp;
+ GLboolean ColorLogicOp;
+ GLboolean Map1Color4;
+ GLboolean Map1Index;
+ GLboolean Map1Normal;
+ GLboolean Map1TextureCoord1;
+ GLboolean Map1TextureCoord2;
+ GLboolean Map1TextureCoord3;
+ GLboolean Map1TextureCoord4;
+ GLboolean Map1Vertex3;
+ GLboolean Map1Vertex4;
+ GLboolean Map2Color4;
+ GLboolean Map2Index;
+ GLboolean Map2Normal;
+ GLboolean Map2TextureCoord1;
+ GLboolean Map2TextureCoord2;
+ GLboolean Map2TextureCoord3;
+ GLboolean Map2TextureCoord4;
+ GLboolean Map2Vertex3;
+ GLboolean Map2Vertex4;
+ GLboolean MinMax;
+ GLboolean Normalize;
+ GLboolean PixelTexture;
+ GLboolean PointSmooth;
+ GLboolean PolygonOffsetPoint;
+ GLboolean PolygonOffsetLine;
+ GLboolean PolygonOffsetFill;
+ GLboolean PolygonSmooth;
+ GLboolean PolygonStipple;
+ GLboolean RescaleNormals;
+ GLboolean Scissor;
+ GLboolean Stencil;
+ GLuint Texture;
+ GLuint TexGen[MAX_TEXTURE_UNITS];
};
struct gl_eval_attrib {
- /* Enable bits */
- GLboolean Map1Color4;
- GLboolean Map1Index;
- GLboolean Map1Normal;
- GLboolean Map1TextureCoord1;
- GLboolean Map1TextureCoord2;
- GLboolean Map1TextureCoord3;
- GLboolean Map1TextureCoord4;
- GLboolean Map1Vertex3;
- GLboolean Map1Vertex4;
- GLboolean Map2Color4;
- GLboolean Map2Index;
- GLboolean Map2Normal;
- GLboolean Map2TextureCoord1;
- GLboolean Map2TextureCoord2;
- GLboolean Map2TextureCoord3;
- GLboolean Map2TextureCoord4;
- GLboolean Map2Vertex3;
- GLboolean Map2Vertex4;
- GLboolean AutoNormal;
- /* Map Grid endpoints and divisions and calculated du values */
- GLint MapGrid1un;
- GLfloat MapGrid1u1, MapGrid1u2, MapGrid1du;
- GLint MapGrid2un, MapGrid2vn;
- GLfloat MapGrid2u1, MapGrid2u2, MapGrid2du;
- GLfloat MapGrid2v1, MapGrid2v2, MapGrid2dv;
+ /* Enable bits */
+ GLboolean Map1Color4;
+ GLboolean Map1Index;
+ GLboolean Map1Normal;
+ GLboolean Map1TextureCoord1;
+ GLboolean Map1TextureCoord2;
+ GLboolean Map1TextureCoord3;
+ GLboolean Map1TextureCoord4;
+ GLboolean Map1Vertex3;
+ GLboolean Map1Vertex4;
+ GLboolean Map2Color4;
+ GLboolean Map2Index;
+ GLboolean Map2Normal;
+ GLboolean Map2TextureCoord1;
+ GLboolean Map2TextureCoord2;
+ GLboolean Map2TextureCoord3;
+ GLboolean Map2TextureCoord4;
+ GLboolean Map2Vertex3;
+ GLboolean Map2Vertex4;
+ GLboolean AutoNormal;
+ /* Map Grid endpoints and divisions and calculated du values */
+ GLint MapGrid1un;
+ GLfloat MapGrid1u1, MapGrid1u2, MapGrid1du;
+ GLint MapGrid2un, MapGrid2vn;
+ GLfloat MapGrid2u1, MapGrid2u2, MapGrid2du;
+ GLfloat MapGrid2v1, MapGrid2v2, MapGrid2dv;
};
struct gl_fog_attrib {
- GLboolean Enabled; /* Fog enabled flag */
- GLfloat Color[4]; /* Fog color */
- GLfloat Density; /* Density >= 0.0 */
- GLfloat Start; /* Start distance in eye coords */
- GLfloat End; /* End distance in eye coords */
- GLfloat Index; /* Fog index */
- GLenum Mode; /* Fog mode */
+ GLboolean Enabled; /* Fog enabled flag */
+ GLfloat Color[4]; /* Fog color */
+ GLfloat Density; /* Density >= 0.0 */
+ GLfloat Start; /* Start distance in eye coords */
+ GLfloat End; /* End distance in eye coords */
+ GLfloat Index; /* Fog index */
+ GLenum Mode; /* Fog mode */
};
struct gl_hint_attrib {
- /* always one of GL_FASTEST, GL_NICEST, or GL_DONT_CARE */
- GLenum PerspectiveCorrection;
- GLenum PointSmooth;
- GLenum LineSmooth;
- GLenum PolygonSmooth;
- GLenum Fog;
-
- /* GL_PGI_misc_hints */
- GLenum AllowDrawWin;
- GLenum AllowDrawFrg;
- GLenum AllowDrawMem;
- GLenum StrictLighting;
-
- /* GL_EXT_clip_volume_hint */
- GLenum ClipVolumeClipping;
+ /* always one of GL_FASTEST, GL_NICEST, or GL_DONT_CARE */
+ GLenum PerspectiveCorrection;
+ GLenum PointSmooth;
+ GLenum LineSmooth;
+ GLenum PolygonSmooth;
+ GLenum Fog;
+
+ /* GL_PGI_misc_hints */
+ GLenum AllowDrawWin;
+ GLenum AllowDrawFrg;
+ GLenum AllowDrawMem;
+ GLenum StrictLighting;
+
+ /* GL_EXT_clip_volume_hint */
+ GLenum ClipVolumeClipping;
+
+ /* GL_ARB_texture_compression */
+ GLenum TextureCompression;
};
struct gl_histogram_attrib {
- GLuint Width;
- GLint Format;
- GLboolean Sink;
- GLuint RedSize;
- GLuint GreenSize;
- GLuint BlueSize;
- GLuint AlphaSize;
- GLuint LuminanceSize;
- GLuint Count[HISTOGRAM_TABLE_SIZE][4];
+ GLuint Width;
+ GLint Format;
+ GLboolean Sink;
+ GLuint RedSize;
+ GLuint GreenSize;
+ GLuint BlueSize;
+ GLuint AlphaSize;
+ GLuint LuminanceSize;
+ GLuint Count[HISTOGRAM_TABLE_SIZE][4];
};
@@ -529,6 +537,16 @@ struct gl_minmax_attrib {
};
+struct gl_convolution_attrib {
+ /* XXX not done yet */
+ GLenum Format;
+ GLenum InternalFormat;
+ GLuint Width;
+ GLuint Height;
+ GLfloat Filter[MAX_CONVOLUTION_WIDTH * MAX_CONVOLUTION_HEIGHT * 4];
+};
+
+
struct gl_light_attrib {
struct gl_light Light[MAX_LIGHTS]; /* Array of lights */
struct gl_lightmodel Model; /* Lighting model */
@@ -559,135 +577,139 @@ struct gl_light_attrib {
#define LIGHT_NEED_VERTICES (LIGHT_POSITIONAL|LIGHT_LOCAL_VIEWER)
struct gl_line_attrib {
- GLboolean SmoothFlag; /* GL_LINE_SMOOTH enabled? */
- GLboolean StippleFlag; /* GL_LINE_STIPPLE enabled? */
- GLushort StipplePattern; /* Stipple pattern */
- GLint StippleFactor; /* Stipple repeat factor */
- GLfloat Width; /* Line width */
+ GLboolean SmoothFlag; /* GL_LINE_SMOOTH enabled? */
+ GLboolean StippleFlag; /* GL_LINE_STIPPLE enabled? */
+ GLushort StipplePattern; /* Stipple pattern */
+ GLint StippleFactor; /* Stipple repeat factor */
+ GLfloat Width; /* Line width */
};
struct gl_list_attrib {
- GLuint ListBase;
+ GLuint ListBase;
};
struct gl_pixel_attrib {
- GLenum ReadBuffer; /* src buffer for glRead/CopyPixels */
- GLenum DriverReadBuffer; /* Driver's current source buffer */
- GLfloat RedBias, RedScale;
- GLfloat GreenBias, GreenScale;
- GLfloat BlueBias, BlueScale;
- GLfloat AlphaBias, AlphaScale;
- GLboolean ScaleOrBiasRGBA;
- GLfloat DepthBias, DepthScale;
- GLint IndexShift, IndexOffset;
- GLboolean MapColorFlag;
- GLboolean MapStencilFlag;
- GLfloat ZoomX, ZoomY;
- GLint MapStoSsize; /* Size of each pixel map */
- GLint MapItoIsize;
- GLint MapItoRsize;
- GLint MapItoGsize;
- GLint MapItoBsize;
- GLint MapItoAsize;
- GLint MapRtoRsize;
- GLint MapGtoGsize;
- GLint MapBtoBsize;
- GLint MapAtoAsize;
- GLint MapStoS[MAX_PIXEL_MAP_TABLE]; /* Pixel map tables */
- GLint MapItoI[MAX_PIXEL_MAP_TABLE];
- GLfloat MapItoR[MAX_PIXEL_MAP_TABLE];
- GLfloat MapItoG[MAX_PIXEL_MAP_TABLE];
- GLfloat MapItoB[MAX_PIXEL_MAP_TABLE];
- GLfloat MapItoA[MAX_PIXEL_MAP_TABLE];
- GLubyte MapItoR8[MAX_PIXEL_MAP_TABLE]; /* converted to 8-bit color */
- GLubyte MapItoG8[MAX_PIXEL_MAP_TABLE];
- GLubyte MapItoB8[MAX_PIXEL_MAP_TABLE];
- GLubyte MapItoA8[MAX_PIXEL_MAP_TABLE];
- GLfloat MapRtoR[MAX_PIXEL_MAP_TABLE];
- GLfloat MapGtoG[MAX_PIXEL_MAP_TABLE];
- GLfloat MapBtoB[MAX_PIXEL_MAP_TABLE];
- GLfloat MapAtoA[MAX_PIXEL_MAP_TABLE];
- /* GL_EXT_histogram */
- GLboolean HistogramEnabled;
- GLboolean MinMaxEnabled;
- /* GL_SGIS_pixel_texture */
- GLboolean PixelTextureEnabled;
- GLenum FragmentRgbSource;
- GLenum FragmentAlphaSource;
- /* GL_SGI_color_matrix */
- GLfloat PostColorMatrixRedScale;
- GLfloat PostColorMatrixRedBias;
- GLfloat PostColorMatrixGreenScale;
- GLfloat PostColorMatrixGreenBias;
- GLfloat PostColorMatrixBlueScale;
- GLfloat PostColorMatrixBlueBias;
- GLfloat PostColorMatrixAlphaScale;
- GLfloat PostColorMatrixAlphaBias;
- GLboolean ScaleOrBiasRGBApcm;
- /* GL_SGI_color_table */
- GLfloat ColorTableScale[4];
- GLfloat ColorTableBias[4];
- GLboolean ColorTableEnabled;
- GLfloat PCCTscale[4];
- GLfloat PCCTbias[4];
- GLboolean PostConvolutionColorTableEnabled;
- GLfloat PCMCTscale[4];
- GLfloat PCMCTbias[4];
- GLboolean PostColorMatrixColorTableEnabled;
+ GLenum ReadBuffer; /* src buffer for glRead/CopyPixels */
+ GLenum DriverReadBuffer; /* Driver's current source buffer */
+ GLfloat RedBias, RedScale;
+ GLfloat GreenBias, GreenScale;
+ GLfloat BlueBias, BlueScale;
+ GLfloat AlphaBias, AlphaScale;
+ GLboolean ScaleOrBiasRGBA;
+ GLfloat DepthBias, DepthScale;
+ GLint IndexShift, IndexOffset;
+ GLboolean MapColorFlag;
+ GLboolean MapStencilFlag;
+ GLfloat ZoomX, ZoomY;
+ GLint MapStoSsize; /* Size of each pixel map */
+ GLint MapItoIsize;
+ GLint MapItoRsize;
+ GLint MapItoGsize;
+ GLint MapItoBsize;
+ GLint MapItoAsize;
+ GLint MapRtoRsize;
+ GLint MapGtoGsize;
+ GLint MapBtoBsize;
+ GLint MapAtoAsize;
+ GLint MapStoS[MAX_PIXEL_MAP_TABLE]; /* Pixel map tables */
+ GLint MapItoI[MAX_PIXEL_MAP_TABLE];
+ GLfloat MapItoR[MAX_PIXEL_MAP_TABLE];
+ GLfloat MapItoG[MAX_PIXEL_MAP_TABLE];
+ GLfloat MapItoB[MAX_PIXEL_MAP_TABLE];
+ GLfloat MapItoA[MAX_PIXEL_MAP_TABLE];
+ GLubyte MapItoR8[MAX_PIXEL_MAP_TABLE]; /* converted to 8-bit color */
+ GLubyte MapItoG8[MAX_PIXEL_MAP_TABLE];
+ GLubyte MapItoB8[MAX_PIXEL_MAP_TABLE];
+ GLubyte MapItoA8[MAX_PIXEL_MAP_TABLE];
+ GLfloat MapRtoR[MAX_PIXEL_MAP_TABLE];
+ GLfloat MapGtoG[MAX_PIXEL_MAP_TABLE];
+ GLfloat MapBtoB[MAX_PIXEL_MAP_TABLE];
+ GLfloat MapAtoA[MAX_PIXEL_MAP_TABLE];
+ /* GL_EXT_histogram */
+ GLboolean HistogramEnabled;
+ GLboolean MinMaxEnabled;
+ /* GL_SGIS_pixel_texture */
+ GLboolean PixelTextureEnabled;
+ GLenum FragmentRgbSource;
+ GLenum FragmentAlphaSource;
+ /* GL_SGI_color_matrix */
+ GLfloat PostColorMatrixScale[4]; /* RGBA */
+ GLfloat PostColorMatrixBias[4]; /* RGBA */
+ GLboolean ScaleOrBiasRGBApcm;
+ /* GL_SGI_color_table */
+ GLfloat ColorTableScale[4];
+ GLfloat ColorTableBias[4];
+ GLboolean ColorTableEnabled;
+ GLfloat PCCTscale[4];
+ GLfloat PCCTbias[4];
+ GLboolean PostConvolutionColorTableEnabled;
+ GLfloat PCMCTscale[4];
+ GLfloat PCMCTbias[4];
+ GLboolean PostColorMatrixColorTableEnabled;
+ /* Convolution */
+ GLboolean Convolution1DEnabled;
+ GLboolean Convolution2DEnabled;
+ GLboolean Separable2DEnabled;
+ GLfloat ConvolutionBorderColor[3][4];
+ GLenum ConvolutionBorderMode[3];
+ GLfloat ConvolutionFilterScale[3][4];
+ GLfloat ConvolutionFilterBias[3][4];
+ GLfloat PostConvolutionScale[4]; /* RGBA */
+ GLfloat PostConvolutionBias[4]; /* RGBA */
};
struct gl_point_attrib {
- GLboolean SmoothFlag; /* True if GL_POINT_SMOOTH is enabled */
- GLfloat Size; /* Point size */
- GLfloat Params[3]; /* Point Parameters EXT distance atenuation
- factors by default = {1,0,0} */
- GLfloat MinSize; /* Default 0.0 always >=0 */
- GLfloat MaxSize; /* Default MAX_POINT_SIZE */
- GLfloat Threshold; /* Default 1.0 */
- GLboolean Attenuated;
+ GLboolean SmoothFlag;/* True if GL_POINT_SMOOTH is enabled */
+ GLfloat UserSize; /* User-specified point size */
+ GLfloat Size; /* Point size actually used */
+ GLfloat Params[3]; /* Point Parameters EXT distance atenuation
+ factors by default = {1,0,0} */
+ GLfloat MinSize; /* Default 0.0 always >=0 */
+ GLfloat MaxSize; /* Default MAX_POINT_SIZE */
+ GLfloat Threshold; /* Default 1.0 */
+ GLboolean Attenuated;
};
struct gl_polygon_attrib {
- GLenum FrontFace; /* Either GL_CW or GL_CCW */
- GLenum FrontMode; /* Either GL_POINT, GL_LINE or GL_FILL */
- GLenum BackMode; /* Either GL_POINT, GL_LINE or GL_FILL */
- GLboolean FrontBit; /* */
- GLboolean Unfilled; /* True if back or front mode is not GL_FILL */
- GLboolean CullFlag; /* Culling on/off flag */
- GLubyte CullBits; /* Used for cull testing */
- GLboolean SmoothFlag; /* True if GL_POLYGON_SMOOTH is enabled */
- GLboolean StippleFlag; /* True if GL_POLYGON_STIPPLE is enabled */
- GLenum CullFaceMode; /* Culling mode GL_FRONT or GL_BACK */
- GLfloat OffsetFactor; /* Polygon offset factor */
- GLfloat OffsetUnits; /* Polygon offset units */
- GLboolean OffsetPoint; /* Offset in GL_POINT mode? */
- GLboolean OffsetLine; /* Offset in GL_LINE mode? */
- GLboolean OffsetFill; /* Offset in GL_FILL mode? */
-
+ GLenum FrontFace; /* Either GL_CW or GL_CCW */
+ GLenum FrontMode; /* Either GL_POINT, GL_LINE or GL_FILL */
+ GLenum BackMode; /* Either GL_POINT, GL_LINE or GL_FILL */
+ GLboolean FrontBit; /* */
+ GLboolean Unfilled; /* True if back or front mode is not GL_FILL */
+ GLboolean CullFlag; /* Culling on/off flag */
+ GLubyte CullBits; /* Used for cull testing */
+ GLboolean SmoothFlag; /* True if GL_POLYGON_SMOOTH is enabled */
+ GLboolean StippleFlag; /* True if GL_POLYGON_STIPPLE is enabled */
+ GLenum CullFaceMode; /* Culling mode GL_FRONT or GL_BACK */
+ GLfloat OffsetFactor; /* Polygon offset factor */
+ GLfloat OffsetUnits; /* Polygon offset units */
+ GLboolean OffsetPoint; /* Offset in GL_POINT mode? */
+ GLboolean OffsetLine; /* Offset in GL_LINE mode? */
+ GLboolean OffsetFill; /* Offset in GL_FILL mode? */
};
struct gl_scissor_attrib {
- GLboolean Enabled; /* Scissor test enabled? */
- GLint X, Y; /* Lower left corner of box */
- GLsizei Width, Height; /* Size of box */
+ GLboolean Enabled; /* Scissor test enabled? */
+ GLint X, Y; /* Lower left corner of box */
+ GLsizei Width, Height; /* Size of box */
};
struct gl_stencil_attrib {
- GLboolean Enabled; /* Enabled flag */
- GLenum Function; /* Stencil function */
- GLenum FailFunc; /* Fail function */
- GLenum ZPassFunc; /* Depth buffer pass function */
- GLenum ZFailFunc; /* Depth buffer fail function */
- GLstencil Ref; /* Reference value */
- GLstencil ValueMask; /* Value mask */
- GLstencil Clear; /* Clear value */
- GLstencil WriteMask; /* Write mask */
+ GLboolean Enabled; /* Enabled flag */
+ GLenum Function; /* Stencil function */
+ GLenum FailFunc; /* Fail function */
+ GLenum ZPassFunc; /* Depth buffer pass function */
+ GLenum ZFailFunc; /* Depth buffer fail function */
+ GLstencil Ref; /* Reference value */
+ GLstencil ValueMask; /* Value mask */
+ GLstencil Clear; /* Clear value */
+ GLstencil WriteMask; /* Write mask */
};
@@ -698,14 +720,16 @@ struct gl_stencil_attrib {
#define Q_BIT 8
/* Texture Enabled flags */
-#define TEXTURE0_1D S_BIT /* Texture unit 0 (default) */
-#define TEXTURE0_2D T_BIT
-#define TEXTURE0_3D R_BIT
-#define TEXTURE0_ANY (TEXTURE0_1D | TEXTURE0_2D | TEXTURE0_3D)
-#define TEXTURE1_1D (S_BIT<<4) /* Texture unit 1 */
-#define TEXTURE1_2D (T_BIT<<4)
-#define TEXTURE1_3D (R_BIT<<4)
-#define TEXTURE1_ANY (TEXTURE1_1D | TEXTURE1_2D | TEXTURE1_3D)
+#define TEXTURE0_1D 0x1 /* Texture unit 0 (default) */
+#define TEXTURE0_2D 0x2
+#define TEXTURE0_3D 0x4
+#define TEXTURE0_CUBE 0x8
+#define TEXTURE0_ANY (TEXTURE0_1D | TEXTURE0_2D | TEXTURE0_3D | TEXTURE0_CUBE)
+#define TEXTURE1_1D (TEXTURE0_1D << 4) /* Texture unit 1 */
+#define TEXTURE1_2D (TEXTURE0_2D << 4)
+#define TEXTURE1_3D (TEXTURE0_3D << 4)
+#define TEXTURE1_CUBE (TEXTURE0_CUBE << 4)
+#define TEXTURE1_ANY (TEXTURE1_1D | TEXTURE1_2D | TEXTURE1_3D | TEXTURE1_CUBE)
/* Bitmap versions of the GL_ constants.
*/
@@ -757,37 +781,45 @@ typedef void (*texgen_func)( struct vertex_buffer *VB,
/* Texture object record */
struct gl_texture_object {
- _glthread_Mutex Mutex; /* for thread safety */
- GLint RefCount; /* reference count */
- GLuint Name; /* an unsigned integer */
- GLuint Dimensions; /* 1 or 2 or 3 */
- GLfloat Priority; /* in [0,1] */
- GLubyte BorderColor[4]; /* as integers in [0,255] */
- GLenum WrapS; /* GL_CLAMP, REPEAT or CLAMP_TO_EDGE */
- GLenum WrapT; /* GL_CLAMP, REPEAT or CLAMP_TO_EDGE */
- GLenum WrapR; /* GL_CLAMP, REPEAT or CLAMP_TO_EDGE */
- GLenum MinFilter; /* minification filter */
- GLenum MagFilter; /* magnification filter */
- GLfloat MinLod; /* OpenGL 1.2 */
- GLfloat MaxLod; /* OpenGL 1.2 */
- GLint BaseLevel; /* OpenGL 1.2 */
- GLint MaxLevel; /* OpenGL 1.2 */
- GLint P; /* Highest mipmap level */
- GLfloat M; /* = MIN(MaxLevel, P) - BaseLevel */
- GLfloat MinMagThresh; /* min/mag threshold */
- struct gl_texture_image *Image[MAX_TEXTURE_LEVELS];
-
- /* GL_EXT_paletted_texture */
- struct gl_color_table Palette;
-
- /* For device driver: */
- GLboolean Dirty; /* Is this texture object in dirty list? */
- void *DriverData; /* Arbitrary device driver data */
-
- GLboolean Complete; /* Complete set of images? */
- TextureSampleFunc SampleFunc; /* The texel sampling function */
- struct gl_texture_object *Next; /* Next in linked list */
- struct gl_texture_object *NextDirty; /* Next in dirty linked list */
+ _glthread_Mutex Mutex; /* for thread safety */
+ GLint RefCount; /* reference count */
+ GLuint Name; /* an unsigned integer */
+ GLuint Dimensions; /* 1 or 2 or 3 */
+ GLfloat Priority; /* in [0,1] */
+ GLubyte BorderColor[4]; /* as integers in [0,255] */
+ GLenum WrapS; /* GL_CLAMP, REPEAT or CLAMP_TO_EDGE */
+ GLenum WrapT; /* GL_CLAMP, REPEAT or CLAMP_TO_EDGE */
+ GLenum WrapR; /* GL_CLAMP, REPEAT or CLAMP_TO_EDGE */
+ GLenum MinFilter; /* minification filter */
+ GLenum MagFilter; /* magnification filter */
+ GLfloat MinLod; /* OpenGL 1.2 */
+ GLfloat MaxLod; /* OpenGL 1.2 */
+ GLint BaseLevel; /* OpenGL 1.2 */
+ GLint MaxLevel; /* OpenGL 1.2 */
+ GLint P; /* Highest mipmap level */
+ GLfloat M; /* = MIN(MaxLevel, P) - BaseLevel */
+ GLfloat MinMagThresh; /* min/mag threshold */
+ struct gl_texture_image *Image[MAX_TEXTURE_LEVELS];
+
+ /* Texture cube faces */
+ /* Image[] is alias for *PosX[MAX_TEXTURE_LEVELS]; */
+ struct gl_texture_image *NegX[MAX_TEXTURE_LEVELS];
+ struct gl_texture_image *PosY[MAX_TEXTURE_LEVELS];
+ struct gl_texture_image *NegY[MAX_TEXTURE_LEVELS];
+ struct gl_texture_image *PosZ[MAX_TEXTURE_LEVELS];
+ struct gl_texture_image *NegZ[MAX_TEXTURE_LEVELS];
+
+ /* GL_EXT_paletted_texture */
+ struct gl_color_table Palette;
+
+ /* For device driver: */
+ GLboolean Dirty; /* Is this texture object in dirty list? */
+ void *DriverData; /* Arbitrary device driver data */
+
+ GLboolean Complete; /* Complete set of images? */
+ TextureSampleFunc SampleFunc; /* The texel sampling function */
+ struct gl_texture_object *Next; /* Next in linked list */
+ struct gl_texture_object *NextDirty; /* Next in dirty linked list */
};
@@ -796,70 +828,73 @@ struct gl_texture_object {
* Texture units are new with the multitexture extension.
*/
struct gl_texture_unit {
- GLuint Enabled;
- GLuint ReallyEnabled;
-
- GLenum EnvMode; /* GL_MODULATE, GL_DECAL, GL_BLEND */
- GLenum LastEnvMode;
-
- GLfloat EnvColor[4];
- GLuint TexGenEnabled; /* Bitwise-OR of [STRQ]_BIT values */
- GLenum GenModeS; /* Tex coord generation mode, either */
- GLenum GenModeT; /* GL_OBJECT_LINEAR, or */
- GLenum GenModeR; /* GL_EYE_LINEAR, or */
- GLenum GenModeQ; /* GL_SPHERE_MAP */
- GLuint GenBitS;
- GLuint GenBitT;
- GLuint GenBitR;
- GLuint GenBitQ;
- GLuint GenFlags; /* bitwise or of GenBit[STRQ] */
- GLfloat ObjectPlaneS[4];
- GLfloat ObjectPlaneT[4];
- GLfloat ObjectPlaneR[4];
- GLfloat ObjectPlaneQ[4];
- GLfloat EyePlaneS[4];
- GLfloat EyePlaneT[4];
- GLfloat EyePlaneR[4];
- GLfloat EyePlaneQ[4];
- texgen_func *func; /* points to array of func pointers */
- GLubyte Holes; /* elements not generated by texgen */
- GLuint TexgenSize; /* size of element generated */
- GLboolean AnyTransform; /* texgen or non-identity matrix */
- GLfloat LodBias; /* for biasing mipmap levels */
-
- struct gl_texture_object *CurrentD[4];
- struct gl_texture_object *Current;
- GLuint CurrentDimension;
-
- struct gl_texture_object Saved1D; /* only used by glPush/PopAttrib */
- struct gl_texture_object Saved2D;
- struct gl_texture_object Saved3D;
+ GLuint Enabled;
+ GLuint ReallyEnabled;
+
+ GLenum EnvMode; /* GL_MODULATE, GL_DECAL, GL_BLEND */
+ GLenum LastEnvMode;
+
+ GLfloat EnvColor[4];
+ GLuint TexGenEnabled; /* Bitwise-OR of [STRQ]_BIT values */
+ GLenum GenModeS; /* Tex coord generation mode, either */
+ GLenum GenModeT; /* GL_OBJECT_LINEAR, or */
+ GLenum GenModeR; /* GL_EYE_LINEAR, or */
+ GLenum GenModeQ; /* GL_SPHERE_MAP */
+ GLuint GenBitS;
+ GLuint GenBitT;
+ GLuint GenBitR;
+ GLuint GenBitQ;
+ GLuint GenFlags; /* bitwise or of GenBit[STRQ] */
+ GLfloat ObjectPlaneS[4];
+ GLfloat ObjectPlaneT[4];
+ GLfloat ObjectPlaneR[4];
+ GLfloat ObjectPlaneQ[4];
+ GLfloat EyePlaneS[4];
+ GLfloat EyePlaneT[4];
+ GLfloat EyePlaneR[4];
+ GLfloat EyePlaneQ[4];
+ texgen_func *func; /* points to array of func pointers */
+ GLubyte Holes; /* elements not generated by texgen */
+ GLuint TexgenSize; /* size of element generated */
+ GLboolean AnyTransform; /* texgen or non-identity matrix */
+ GLfloat LodBias; /* for biasing mipmap levels */
+
+ struct gl_texture_object *CurrentD[4];
+ struct gl_texture_object *CurrentCubeMap; /* GL_ARB_texture_cube_map */
+
+ struct gl_texture_object *Current;
+ GLuint CurrentDimension;
+
+ struct gl_texture_object Saved1D; /* only used by glPush/PopAttrib */
+ struct gl_texture_object Saved2D;
+ struct gl_texture_object Saved3D;
};
struct gl_texture_attrib {
- /* multitexture */
- GLuint CurrentUnit; /* Current texture unit */
- GLuint CurrentTransformUnit; /* Current texture xform unit */
+ /* multitexture */
+ GLuint CurrentUnit; /* Current texture unit */
+ GLuint CurrentTransformUnit; /* Current texture xform unit */
- /* Bitwise-OR of TEXTURE_XD values */
- GLuint Enabled; /* Enabled by the user */
- GLuint ReallyEnabled; /* Really enabled (w.r.t. completeness, etc) */
+ /* Bitwise-OR of TEXTURE_XD values */
+ GLuint Enabled; /* Enabled by the user */
+ GLuint ReallyEnabled; /* Really enabled (w.r.t. completeness, etc) */
- GLuint LastEnabled; /* Decide whether enabled has really changed */
+ GLuint LastEnabled; /* Decide whether enabled has really changed */
- GLboolean NeedNormals;
- GLboolean NeedEyeCoords;
+ GLboolean NeedNormals;
+ GLboolean NeedEyeCoords;
- struct gl_texture_unit Unit[MAX_TEXTURE_UNITS];
+ struct gl_texture_unit Unit[MAX_TEXTURE_UNITS];
- struct gl_texture_object *Proxy1D;
- struct gl_texture_object *Proxy2D;
- struct gl_texture_object *Proxy3D;
-
- /* GL_EXT_shared_texture_palette */
- GLboolean SharedPalette;
- struct gl_color_table Palette;
+ struct gl_texture_object *Proxy1D;
+ struct gl_texture_object *Proxy2D;
+ struct gl_texture_object *Proxy3D;
+ struct gl_texture_object *ProxyCubeMap;
+
+ /* GL_EXT_shared_texture_palette */
+ GLboolean SharedPalette;
+ struct gl_color_table Palette;
};
@@ -867,29 +902,29 @@ struct gl_texture_attrib {
/* KW: Renamed ClipEquation to avoid having 'ClipClipEquation'
*/
struct gl_transform_attrib {
- GLenum MatrixMode; /* Matrix mode */
- GLfloat EyeUserPlane[MAX_CLIP_PLANES][4];
- GLfloat ClipUserPlane[MAX_CLIP_PLANES][4]; /* derived */
- GLboolean ClipEnabled[MAX_CLIP_PLANES];
- GLubyte AnyClip; /* How many ClipEnabled? */
- GLboolean Normalize; /* Normalize all normals? */
- GLboolean RescaleNormals; /* GL_EXT_rescale_normal */
+ GLenum MatrixMode; /* Matrix mode */
+ GLfloat EyeUserPlane[MAX_CLIP_PLANES][4];
+ GLfloat ClipUserPlane[MAX_CLIP_PLANES][4]; /* derived */
+ GLboolean ClipEnabled[MAX_CLIP_PLANES];
+ GLubyte AnyClip; /* How many ClipEnabled? */
+ GLboolean Normalize; /* Normalize all normals? */
+ GLboolean RescaleNormals; /* GL_EXT_rescale_normal */
};
struct gl_viewport_attrib {
- GLint X, Y; /* position */
- GLsizei Width, Height; /* size */
- GLfloat Near, Far; /* Depth buffer range */
- GLmatrix WindowMap; /* Mapping transformation as a matrix. */
+ GLint X, Y; /* position */
+ GLsizei Width, Height; /* size */
+ GLfloat Near, Far; /* Depth buffer range */
+ GLmatrix WindowMap; /* Mapping transformation as a matrix. */
};
/* For the attribute stack: */
struct gl_attrib_node {
- GLbitfield kind;
- void *data;
- struct gl_attrib_node *next;
+ GLbitfield kind;
+ void *data;
+ struct gl_attrib_node *next;
};
@@ -898,14 +933,14 @@ struct gl_attrib_node {
* Client pixel packing/unpacking attributes
*/
struct gl_pixelstore_attrib {
- GLint Alignment;
- GLint RowLength;
- GLint SkipPixels;
- GLint SkipRows;
- GLint ImageHeight; /* for GL_EXT_texture3D */
- GLint SkipImages; /* for GL_EXT_texture3D */
- GLboolean SwapBytes;
- GLboolean LsbFirst;
+ GLint Alignment;
+ GLint RowLength;
+ GLint SkipPixels;
+ GLint SkipRows;
+ GLint ImageHeight; /* for GL_EXT_texture3D */
+ GLint SkipImages; /* for GL_EXT_texture3D */
+ GLboolean SwapBytes;
+ GLboolean LsbFirst;
};
@@ -996,37 +1031,37 @@ typedef void (*trans_elt_3f_func)(GLfloat (*to)[3],
struct gl_array_attrib {
- struct gl_client_array Vertex; /* client data descriptors */
- struct gl_client_array Normal;
- struct gl_client_array Color;
- struct gl_client_array Index;
- struct gl_client_array TexCoord[MAX_TEXTURE_UNITS];
- struct gl_client_array EdgeFlag;
-
- trans_4f_func VertexFunc; /* conversion functions */
- trans_3f_func NormalFunc;
- trans_4ub_func ColorFunc;
- trans_1ui_func IndexFunc;
- trans_4f_func TexCoordFunc[MAX_TEXTURE_UNITS];
- trans_1ub_func EdgeFlagFunc;
-
- trans_elt_4f_func VertexEltFunc; /* array elt conversion functions */
- trans_elt_3f_func NormalEltFunc;
- trans_elt_4ub_func ColorEltFunc;
- trans_elt_1ui_func IndexEltFunc;
- trans_elt_4f_func TexCoordEltFunc[MAX_TEXTURE_UNITS];
- trans_elt_1ub_func EdgeFlagEltFunc;
-
- GLint TexCoordInterleaveFactor;
- GLint ActiveTexture; /* Client Active Texture */
-
- GLuint LockFirst;
- GLuint LockCount;
+ struct gl_client_array Vertex; /* client data descriptors */
+ struct gl_client_array Normal;
+ struct gl_client_array Color;
+ struct gl_client_array Index;
+ struct gl_client_array TexCoord[MAX_TEXTURE_UNITS];
+ struct gl_client_array EdgeFlag;
+
+ trans_4f_func VertexFunc; /* conversion functions */
+ trans_3f_func NormalFunc;
+ trans_4ub_func ColorFunc;
+ trans_1ui_func IndexFunc;
+ trans_4f_func TexCoordFunc[MAX_TEXTURE_UNITS];
+ trans_1ub_func EdgeFlagFunc;
+
+ trans_elt_4f_func VertexEltFunc; /* array elt conversion functions */
+ trans_elt_3f_func NormalEltFunc;
+ trans_elt_4ub_func ColorEltFunc;
+ trans_elt_1ui_func IndexEltFunc;
+ trans_elt_4f_func TexCoordEltFunc[MAX_TEXTURE_UNITS];
+ trans_elt_1ub_func EdgeFlagEltFunc;
+
+ GLint TexCoordInterleaveFactor;
+ GLint ActiveTexture; /* Client Active Texture */
+
+ GLuint LockFirst;
+ GLuint LockCount;
- GLuint Flag[VB_SIZE]; /* crock */
- GLuint Flags;
- GLuint Summary; /* Like flags, but no size information */
- GLuint NewArrayState; /* Tracks which arrays have been changed. */
+ GLuint Flag[VB_SIZE]; /* crock */
+ GLuint Flags;
+ GLuint Summary; /* Like flags, but no size information */
+ GLuint NewArrayState; /* Tracks which arrays have been changed. */
};
@@ -1034,11 +1069,11 @@ struct gl_array_attrib {
* arrays (with zero StrideB).
*/
struct gl_fallback_arrays {
- struct gl_client_array Normal;
- struct gl_client_array Color;
- struct gl_client_array Index;
- struct gl_client_array TexCoord[MAX_TEXTURE_UNITS];
- struct gl_client_array EdgeFlag;
+ struct gl_client_array Normal;
+ struct gl_client_array Color;
+ struct gl_client_array Index;
+ struct gl_client_array TexCoord[MAX_TEXTURE_UNITS];
+ struct gl_client_array EdgeFlag;
};
#define MAX_PIPELINE_STAGES 30
@@ -1062,10 +1097,10 @@ struct gl_fallback_arrays {
* point/line/tri primitives.
*/
struct gl_prim_state {
- GLuint v0, v1;
- GLboolean draw;
- GLboolean finish_loop; /* not used... */
- struct gl_prim_state *next;
+ GLuint v0, v1;
+ GLboolean draw;
+ GLboolean finish_loop; /* not used... */
+ struct gl_prim_state *next;
};
@@ -1073,88 +1108,88 @@ typedef void (*vb_func)( struct vertex_buffer *VB );
typedef void (*ctx_func)( GLcontext * );
struct gl_pipeline_stage {
- const char *name;
- GLuint ops; /* PIPE_OP flags */
- GLuint type; /* PIPE flags */
- GLuint special; /* PIPE flags - force update_inputs() */
- GLuint state_change; /* state flags - trigger update_inputs() */
- GLuint cva_state_change; /* state flags - recalc cva buffer */
- GLuint elt_forbidden_inputs; /* VERT flags - force a pipeline recalc */
- GLuint pre_forbidden_inputs; /* VERT flags - force a pipeline recalc */
- GLuint active; /* PIPE flags */
- GLuint inputs; /* VERT flags */
- GLuint outputs; /* VERT flags */
- void (*check)( GLcontext *ctx, struct gl_pipeline_stage * );
- void (*run)( struct vertex_buffer *VB );
+ const char *name;
+ GLuint ops; /* PIPE_OP flags */
+ GLuint type; /* PIPE flags */
+ GLuint special; /* PIPE flags - force update_inputs() */
+ GLuint state_change; /* state flags - trigger update_inputs() */
+ GLuint cva_state_change; /* state flags - recalc cva buffer */
+ GLuint elt_forbidden_inputs; /* VERT flags - force a pipeline recalc */
+ GLuint pre_forbidden_inputs; /* VERT flags - force a pipeline recalc */
+ GLuint active; /* PIPE flags */
+ GLuint inputs; /* VERT flags */
+ GLuint outputs; /* VERT flags */
+ void (*check)( GLcontext *ctx, struct gl_pipeline_stage * );
+ void (*run)( struct vertex_buffer *VB );
};
struct gl_pipeline {
- GLuint state_change; /* state changes which require recalc */
- GLuint cva_state_change; /* ... which require re-run */
- GLuint forbidden_inputs; /* inputs which require recalc */
- GLuint ops; /* what gets done in this pipe */
- GLuint changed_ops;
- GLuint inputs;
- GLuint outputs;
- GLuint new_inputs;
- GLuint new_outputs;
- GLuint fallback;
- GLuint type;
- GLuint pipeline_valid:1;
- GLuint data_valid:1;
- GLuint copy_transformed_data:1;
- GLuint replay_copied_vertices:1;
- GLuint new_state; /* state changes since last recalc */
- struct gl_pipeline_stage *stages[MAX_PIPELINE_STAGES];
+ GLuint state_change; /* state changes which require recalc */
+ GLuint cva_state_change; /* ... which require re-run */
+ GLuint forbidden_inputs; /* inputs which require recalc */
+ GLuint ops; /* what gets done in this pipe */
+ GLuint changed_ops;
+ GLuint inputs;
+ GLuint outputs;
+ GLuint new_inputs;
+ GLuint new_outputs;
+ GLuint fallback;
+ GLuint type;
+ GLuint pipeline_valid:1;
+ GLuint data_valid:1;
+ GLuint copy_transformed_data:1;
+ GLuint replay_copied_vertices:1;
+ GLuint new_state; /* state changes since last recalc */
+ struct gl_pipeline_stage *stages[MAX_PIPELINE_STAGES];
};
struct gl_cva {
- struct gl_pipeline pre;
- struct gl_pipeline elt;
+ struct gl_pipeline pre;
+ struct gl_pipeline elt;
- struct gl_client_array Elt;
- trans_1ui_func EltFunc;
+ struct gl_client_array Elt;
+ trans_1ui_func EltFunc;
- struct vertex_buffer *VB;
- struct vertex_arrays v;
- struct vertex_data store;
+ struct vertex_buffer *VB;
+ struct vertex_arrays v;
+ struct vertex_data store;
- GLuint elt_count;
- GLenum elt_mode;
- GLuint elt_size;
+ GLuint elt_count;
+ GLenum elt_mode;
+ GLuint elt_size;
- GLuint forbidden_inputs;
- GLuint orflag;
- GLuint merge;
+ GLuint forbidden_inputs;
+ GLuint orflag;
+ GLuint merge;
- GLuint lock_changed;
- GLuint last_orflag;
- GLuint last_array_flags;
- GLuint last_array_new_state;
+ GLuint lock_changed;
+ GLuint last_orflag;
+ GLuint last_array_flags;
+ GLuint last_array_new_state;
};
struct gl_feedback {
- GLenum Type;
- GLuint Mask;
- GLfloat *Buffer;
- GLuint BufferSize;
- GLuint Count;
+ GLenum Type;
+ GLuint Mask;
+ GLfloat *Buffer;
+ GLuint BufferSize;
+ GLuint Count;
};
struct gl_selection {
- GLuint *Buffer;
- GLuint BufferSize; /* size of SelectBuffer */
- GLuint BufferCount; /* number of values in SelectBuffer */
- GLuint Hits; /* number of records in SelectBuffer */
- GLuint NameStackDepth;
- GLuint NameStack[MAX_NAME_STACK_DEPTH];
- GLboolean HitFlag;
- GLfloat HitMinZ, HitMaxZ;
+ GLuint *Buffer;
+ GLuint BufferSize; /* size of SelectBuffer */
+ GLuint BufferCount; /* number of values in SelectBuffer */
+ GLuint Hits; /* number of records in SelectBuffer */
+ GLuint NameStackDepth;
+ GLuint NameStack[MAX_NAME_STACK_DEPTH];
+ GLboolean HitFlag;
+ GLfloat HitMinZ, HitMaxZ;
};
@@ -1163,9 +1198,9 @@ struct gl_selection {
* 1-D Evaluator control points
*/
struct gl_1d_map {
- GLuint Order; /* Number of control points */
- GLfloat u1, u2, du; /* u1, u2, 1.0/(u2-u1) */
- GLfloat *Points; /* Points to contiguous control points */
+ GLuint Order; /* Number of control points */
+ GLfloat u1, u2, du; /* u1, u2, 1.0/(u2-u1) */
+ GLfloat *Points; /* Points to contiguous control points */
};
@@ -1173,11 +1208,11 @@ struct gl_1d_map {
* 2-D Evaluator control points
*/
struct gl_2d_map {
- GLuint Uorder; /* Number of control points in U dimension */
- GLuint Vorder; /* Number of control points in V dimension */
- GLfloat u1, u2, du;
- GLfloat v1, v2, dv;
- GLfloat *Points; /* Points to contiguous control points */
+ GLuint Uorder; /* Number of control points in U dimension */
+ GLuint Vorder; /* Number of control points in V dimension */
+ GLfloat u1, u2, du;
+ GLfloat v1, v2, dv;
+ GLfloat *Points; /* Points to contiguous control points */
};
@@ -1185,27 +1220,27 @@ struct gl_2d_map {
* All evalutator control points
*/
struct gl_evaluators {
- /* 1-D maps */
- struct gl_1d_map Map1Vertex3;
- struct gl_1d_map Map1Vertex4;
- struct gl_1d_map Map1Index;
- struct gl_1d_map Map1Color4;
- struct gl_1d_map Map1Normal;
- struct gl_1d_map Map1Texture1;
- struct gl_1d_map Map1Texture2;
- struct gl_1d_map Map1Texture3;
- struct gl_1d_map Map1Texture4;
-
- /* 2-D maps */
- struct gl_2d_map Map2Vertex3;
- struct gl_2d_map Map2Vertex4;
- struct gl_2d_map Map2Index;
- struct gl_2d_map Map2Color4;
- struct gl_2d_map Map2Normal;
- struct gl_2d_map Map2Texture1;
- struct gl_2d_map Map2Texture2;
- struct gl_2d_map Map2Texture3;
- struct gl_2d_map Map2Texture4;
+ /* 1-D maps */
+ struct gl_1d_map Map1Vertex3;
+ struct gl_1d_map Map1Vertex4;
+ struct gl_1d_map Map1Index;
+ struct gl_1d_map Map1Color4;
+ struct gl_1d_map Map1Normal;
+ struct gl_1d_map Map1Texture1;
+ struct gl_1d_map Map1Texture2;
+ struct gl_1d_map Map1Texture3;
+ struct gl_1d_map Map1Texture4;
+
+ /* 2-D maps */
+ struct gl_2d_map Map2Vertex3;
+ struct gl_2d_map Map2Vertex4;
+ struct gl_2d_map Map2Index;
+ struct gl_2d_map Map2Color4;
+ struct gl_2d_map Map2Normal;
+ struct gl_2d_map Map2Texture1;
+ struct gl_2d_map Map2Texture2;
+ struct gl_2d_map Map2Texture3;
+ struct gl_2d_map Map2Texture4;
};
@@ -1223,6 +1258,7 @@ struct gl_shared_state {
/* Default texture objects (shared by all multi-texture units) */
struct gl_texture_object *DefaultD[4];
+ struct gl_texture_object *DefaultCubeMap;
};
@@ -1300,6 +1336,7 @@ struct gl_frame_buffer {
*/
struct gl_constants {
GLint MaxTextureSize;
+ GLint MaxCubeTextureSize;
GLint MaxTextureLevels;
GLuint MaxTextureUnits;
GLuint MaxArrayLockSize;
@@ -1312,6 +1349,10 @@ struct gl_constants {
GLfloat LineWidthGranularity;
GLuint NumAuxBuffers;
GLuint MaxColorTableSize;
+ GLuint MaxConvolutionWidth;
+ GLuint MaxConvolutionHeight;
+ GLuint NumCompressedTextureFormats; /* GL_ARB_texture_compression */
+ GLenum CompressedTextureFormats[MAX_COMPRESSED_TEXTURE_FORMATS];
};
@@ -1326,6 +1367,10 @@ struct gl_extensions {
GLboolean HaveTextureEnvAdd;
GLboolean HaveTextureLodBias;
GLboolean HaveHpOcclusionTest;
+ GLboolean HaveTextureCubeMap;
+ GLboolean HaveTextureCompression;
+ GLboolean HaveTextureCompressionS3TC;
+ GLboolean HaveTextureCompressionFXT1;
};
@@ -1345,6 +1390,7 @@ struct gl_extensions {
#define MULTI_DRAW_BIT 0x400 /* Write to more than one color- */
/* buffer or no buffers. */
#define OCCLUSION_BIT 0x800 /* GL_HP_occlusion_test enabled */
+#define TEXTURE_BIT 0x1000 /* Texturing really enabled */
/*
@@ -1695,249 +1741,232 @@ typedef GLuint (*clip_poly_func)( struct vertex_buffer *VB,
*/
struct gl_context {
- /* State possibly shared with other contexts in the address space */
- struct gl_shared_state *Shared;
+ /* State possibly shared with other contexts in the address space */
+ struct gl_shared_state *Shared;
- /* API function pointer tables */
- struct _glapi_table *Save; /* Display list save funcs */
- struct _glapi_table *Exec; /* Execute funcs */
- struct _glapi_table *CurrentDispatch; /* == Save or Exec !! */
+ /* API function pointer tables */
+ struct _glapi_table *Save; /* Display list save funcs */
+ struct _glapi_table *Exec; /* Execute funcs */
+ struct _glapi_table *CurrentDispatch; /* == Save or Exec !! */
- GLvisual *Visual;
- GLframebuffer *DrawBuffer; /* buffer for writing */
- GLframebuffer *ReadBuffer; /* buffer for reading */
+ GLvisual *Visual;
+ GLframebuffer *DrawBuffer; /* buffer for writing */
+ GLframebuffer *ReadBuffer; /* buffer for reading */
- /* Driver function pointer table */
- struct dd_function_table Driver;
+ /* Driver function pointer table */
+ struct dd_function_table Driver;
- triangle_func TriangleFunc; /* driver or indirect triangle func */
- quad_func QuadFunc;
- triangle_func ClippedTriangleFunc;
- clip_poly_func *poly_clip_tab;
- clip_line_func *line_clip_tab;
-
- void *DriverCtx; /* Points to device driver context/state */
- void *DriverMgrCtx; /* Points to device driver manager (optional)*/
-
- /* Core/Driver constants */
- struct gl_constants Const;
-
- /* Modelview matrix and stack */
- GLmatrix ModelView; /* current matrix, not stored on stack */
- GLuint ModelViewStackDepth;
- GLmatrix ModelViewStack[MAX_MODELVIEW_STACK_DEPTH - 1];
-
- /* Projection matrix and stack */
- GLmatrix ProjectionMatrix; /* current matrix, not stored on stack */
- GLuint ProjectionStackDepth;
- GLmatrix ProjectionStack[MAX_PROJECTION_STACK_DEPTH - 1];
- GLfloat NearFarStack[MAX_PROJECTION_STACK_DEPTH - 1][2];
-
- /* Combined modelview and projection matrix */
- GLmatrix ModelProjectMatrix;
-
- /* Combined modelview, projection and window matrix */
- GLmatrix ModelProjectWinMatrix;
- GLboolean ModelProjectWinMatrixUptodate;
-
- /* Texture matrix and stack */
- GLmatrix TextureMatrix[MAX_TEXTURE_UNITS];
- GLuint TextureStackDepth[MAX_TEXTURE_UNITS];
- GLmatrix TextureStack[MAX_TEXTURE_UNITS][MAX_TEXTURE_STACK_DEPTH - 1];
-
- /* Color matrix and stack */
- GLmatrix ColorMatrix;
- GLuint ColorStackDepth;
- GLmatrix ColorStack[MAX_COLOR_STACK_DEPTH - 1];
-
- /* Display lists */
- GLuint CallDepth; /* Current recursion calling depth */
- GLboolean ExecuteFlag; /* Execute GL commands? */
- GLboolean CompileFlag; /* Compile GL commands into display list? */
- GLboolean CompileCVAFlag;
- Node *CurrentListPtr; /* Head of list being compiled */
- GLuint CurrentListNum; /* Number of the list being compiled */
- Node *CurrentBlock; /* Pointer to current block of nodes */
- GLuint CurrentPos; /* Index into current block of nodes */
-
- /* Extensions */
- struct gl_extensions Extensions;
-
-
- /* Pipeline stages - shared between the two pipelines,
- * which live in CVA.
- */
- struct gl_pipeline_stage PipelineStage[MAX_PIPELINE_STAGES];
- GLuint NrPipelineStages;
-
- /* Cva */
- struct gl_cva CVA;
-
- /* Renderer attribute stack */
- GLuint AttribStackDepth;
- struct gl_attrib_node *AttribStack[MAX_ATTRIB_STACK_DEPTH];
-
- /* Renderer attribute groups */
- struct gl_accum_attrib Accum;
- struct gl_colorbuffer_attrib Color;
- struct gl_current_attrib Current;
- struct gl_depthbuffer_attrib Depth;
- struct gl_eval_attrib Eval;
- struct gl_fog_attrib Fog;
- struct gl_hint_attrib Hint;
- struct gl_histogram_attrib Histogram;
- struct gl_light_attrib Light;
- struct gl_line_attrib Line;
- struct gl_list_attrib List;
- struct gl_minmax_attrib MinMax;
- struct gl_pixel_attrib Pixel;
- struct gl_point_attrib Point;
- struct gl_polygon_attrib Polygon;
- GLuint PolygonStipple[32];
- struct gl_scissor_attrib Scissor;
- struct gl_stencil_attrib Stencil;
- struct gl_texture_attrib Texture;
- struct gl_transform_attrib Transform;
- struct gl_viewport_attrib Viewport;
-
- /* Client attribute stack */
- GLuint ClientAttribStackDepth;
- struct gl_attrib_node *ClientAttribStack[MAX_CLIENT_ATTRIB_STACK_DEPTH];
-
- /* Client attribute groups */
- struct gl_array_attrib Array; /* Vertex arrays */
- struct gl_pixelstore_attrib Pack; /* Pixel packing */
- struct gl_pixelstore_attrib Unpack; /* Pixel unpacking */
-
- struct gl_evaluators EvalMap; /* All evaluators */
- struct gl_feedback Feedback; /* Feedback */
- struct gl_selection Select; /* Selection */
-
- struct gl_color_table ColorTable; /* Pre-convolution */
- struct gl_color_table ProxyColorTable; /* Pre-convolution */
- struct gl_color_table PostConvolutionColorTable;
- struct gl_color_table ProxyPostConvolutionColorTable;
- struct gl_color_table PostColorMatrixColorTable;
- struct gl_color_table ProxyPostColorMatrixColorTable;
-
- /* Optimized Accumulation buffer info */
- GLboolean IntegerAccumMode; /* Storing unscaled integers? */
- GLfloat IntegerAccumScaler; /* Implicit scale factor */
-
-
- struct gl_fallback_arrays Fallback;
-
- GLenum ErrorValue; /* Last error code */
-
- /* Miscellaneous */
- GLuint NewState; /* bitwise OR of NEW_* flags */
- GLuint Enabled; /* bitwise or of ENABLE_* flags */
- GLenum RenderMode; /* either GL_RENDER, GL_SELECT, GL_FEEDBACK */
- GLuint StippleCounter; /* Line stipple counter */
- GLuint RasterMask; /* OR of rasterization flags */
- GLuint TriangleCaps; /* OR of DD_* flags */
- GLuint IndirectTriangles; /* TriangleCaps not handled by the driver */
- GLfloat PolygonZoffset; /* Z offset for GL_FILL polygons */
- GLfloat LineZoffset; /* Z offset for GL_LINE polygons */
- GLfloat PointZoffset; /* Z offset for GL_POINT polygons */
- GLboolean NeedNormals; /* Are vertex normal vectors needed? */
- GLboolean MutablePixels;/* Can rasterization change pixel's color? */
- GLboolean MonoPixels; /* Are all pixels likely to be same color? */
- GLuint FogMode; /* FOG_OFF, FOG_VERTEX or FOG_FRAGMENT */
-
- GLboolean DoViewportMapping;
-
- GLuint RenderFlags; /* Active inputs to render stage */
-
- GLuint RequireWriteableFlags; /* What can the driver/clipping tolerate? */
-
- /* Points to function which interpolates colors, etc when clipping */
- clip_interp_func ClipInterpFunc;
- GLuint ClipTabMask;
-
- normal_func *NormalTransform;
-
- /* Current shading function */
- GLuint shade_func_flags;
-
- GLfloat EyeZDir[3];
- GLfloat rescale_factor;
-
- GLfloat vb_rescale_factor;
- GLmatrix *vb_proj_matrix;
-
- GLubyte AllowVertexCull; /* To be set by the geometry driver */
- GLboolean NeedEyeCoords;
- GLboolean NeedEyeNormals;
- GLboolean NeedClipCoords;
-
- GLfloat backface_sign;
-
- GLboolean OcclusionResult; /* GL_HP_occlusion_test */
- GLboolean OcclusionResultSaved; /* GL_HP_occlusion_test */
-
- /* Destination of immediate mode commands */
- struct immediate *input;
-
-
- /* Cache of unused immediate structs
- */
- struct immediate *freed_im_queue;
- GLuint nr_im_queued;
-
- /* The vertex buffer being used by this context.
- */
- struct vertex_buffer *VB;
+ triangle_func TriangleFunc; /* driver or indirect triangle func */
+ quad_func QuadFunc;
+ triangle_func ClippedTriangleFunc;
+ clip_poly_func *poly_clip_tab;
+ clip_line_func *line_clip_tab;
+
+ void *DriverCtx; /* Points to device driver context/state */
+ void *DriverMgrCtx; /* Points to device driver manager (optional)*/
+
+ /* Core/Driver constants */
+ struct gl_constants Const;
+
+ /* Modelview matrix and stack */
+ GLmatrix ModelView; /* current matrix, not stored on stack */
+ GLuint ModelViewStackDepth;
+ GLmatrix ModelViewStack[MAX_MODELVIEW_STACK_DEPTH - 1];
+
+ /* Projection matrix and stack */
+ GLmatrix ProjectionMatrix; /* current matrix, not stored on stack */
+ GLuint ProjectionStackDepth;
+ GLmatrix ProjectionStack[MAX_PROJECTION_STACK_DEPTH - 1];
+ GLfloat NearFarStack[MAX_PROJECTION_STACK_DEPTH - 1][2];
+
+ /* Combined modelview and projection matrix */
+ GLmatrix ModelProjectMatrix;
+
+ /* Combined modelview, projection and window matrix */
+ GLmatrix ModelProjectWinMatrix;
+ GLboolean ModelProjectWinMatrixUptodate;
+
+ /* Texture matrix and stack */
+ GLmatrix TextureMatrix[MAX_TEXTURE_UNITS];
+ GLuint TextureStackDepth[MAX_TEXTURE_UNITS];
+ GLmatrix TextureStack[MAX_TEXTURE_UNITS][MAX_TEXTURE_STACK_DEPTH - 1];
+
+ /* Color matrix and stack */
+ GLmatrix ColorMatrix;
+ GLuint ColorStackDepth;
+ GLmatrix ColorStack[MAX_COLOR_STACK_DEPTH - 1];
+
+ /* Display lists */
+ GLuint CallDepth; /* Current recursion calling depth */
+ GLboolean ExecuteFlag; /* Execute GL commands? */
+ GLboolean CompileFlag; /* Compile GL commands into display list? */
+ GLboolean CompileCVAFlag;
+ Node *CurrentListPtr; /* Head of list being compiled */
+ GLuint CurrentListNum; /* Number of the list being compiled */
+ Node *CurrentBlock; /* Pointer to current block of nodes */
+ GLuint CurrentPos; /* Index into current block of nodes */
+
+ /* Extensions */
+ struct gl_extensions Extensions;
+
+
+ /* Pipeline stages - shared between the two pipelines,
+ * which live in CVA.
+ */
+ struct gl_pipeline_stage PipelineStage[MAX_PIPELINE_STAGES];
+ GLuint NrPipelineStages;
+
+ /* Cva */
+ struct gl_cva CVA;
+
+ /* Renderer attribute stack */
+ GLuint AttribStackDepth;
+ struct gl_attrib_node *AttribStack[MAX_ATTRIB_STACK_DEPTH];
+
+ /* Renderer attribute groups */
+ struct gl_accum_attrib Accum;
+ struct gl_colorbuffer_attrib Color;
+ struct gl_current_attrib Current;
+ struct gl_depthbuffer_attrib Depth;
+ struct gl_eval_attrib Eval;
+ struct gl_fog_attrib Fog;
+ struct gl_hint_attrib Hint;
+ struct gl_light_attrib Light;
+ struct gl_line_attrib Line;
+ struct gl_list_attrib List;
+ struct gl_pixel_attrib Pixel;
+ struct gl_point_attrib Point;
+ struct gl_polygon_attrib Polygon;
+ GLuint PolygonStipple[32];
+ struct gl_scissor_attrib Scissor;
+ struct gl_stencil_attrib Stencil;
+ struct gl_texture_attrib Texture;
+ struct gl_transform_attrib Transform;
+ struct gl_viewport_attrib Viewport;
+
+ /* Other attribute groups */
+ struct gl_histogram_attrib Histogram;
+ struct gl_minmax_attrib MinMax;
+ struct gl_convolution_attrib Convolution1D;
+ struct gl_convolution_attrib Convolution2D;
+ struct gl_convolution_attrib Separable2D;
+
+ /* Client attribute stack */
+ GLuint ClientAttribStackDepth;
+ struct gl_attrib_node *ClientAttribStack[MAX_CLIENT_ATTRIB_STACK_DEPTH];
+
+ /* Client attribute groups */
+ struct gl_array_attrib Array; /* Vertex arrays */
+ struct gl_pixelstore_attrib Pack; /* Pixel packing */
+ struct gl_pixelstore_attrib Unpack; /* Pixel unpacking */
+
+ struct gl_evaluators EvalMap; /* All evaluators */
+ struct gl_feedback Feedback; /* Feedback */
+ struct gl_selection Select; /* Selection */
+
+ struct gl_color_table ColorTable; /* Pre-convolution */
+ struct gl_color_table ProxyColorTable; /* Pre-convolution */
+ struct gl_color_table PostConvolutionColorTable;
+ struct gl_color_table ProxyPostConvolutionColorTable;
+ struct gl_color_table PostColorMatrixColorTable;
+ struct gl_color_table ProxyPostColorMatrixColorTable;
+
+ /* Optimized Accumulation buffer info */
+ GLboolean IntegerAccumMode; /* Storing unscaled integers? */
+ GLfloat IntegerAccumScaler; /* Implicit scale factor */
+
+ struct gl_fallback_arrays Fallback;
+
+ GLenum ErrorValue; /* Last error code */
+
+ /* Miscellaneous */
+ GLuint NewState; /* bitwise OR of NEW_* flags */
+ GLuint Enabled; /* bitwise or of ENABLE_* flags */
+ GLenum RenderMode; /* either GL_RENDER, GL_SELECT, GL_FEEDBACK */
+ GLuint StippleCounter; /* Line stipple counter */
+ GLuint RasterMask; /* OR of rasterization flags */
+ GLuint TriangleCaps; /* OR of DD_* flags */
+ GLuint IndirectTriangles; /* TriangleCaps not handled by the driver */
+ GLfloat PolygonZoffset; /* Z offset for GL_FILL polygons */
+ GLfloat LineZoffset; /* Z offset for GL_LINE polygons */
+ GLfloat PointZoffset; /* Z offset for GL_POINT polygons */
+ GLboolean NeedNormals; /* Are vertex normal vectors needed? */
+ GLuint FogMode; /* FOG_OFF, FOG_VERTEX or FOG_FRAGMENT */
+
+ GLboolean DoViewportMapping;
+
+ GLuint RenderFlags; /* Active inputs to render stage */
+
+ GLuint RequireWriteableFlags; /* What can the driver/clipping tolerate? */
+
+ /* Points to function which interpolates colors, etc when clipping */
+ clip_interp_func ClipInterpFunc;
+ GLuint ClipTabMask;
+
+ normal_func *NormalTransform;
+
+ /* Current shading function */
+ GLuint shade_func_flags;
+
+ GLfloat EyeZDir[3];
+ GLfloat rescale_factor;
+
+ GLfloat vb_rescale_factor;
+ GLmatrix *vb_proj_matrix;
+
+ GLubyte AllowVertexCull; /* To be set by the geometry driver */
+ GLboolean NeedEyeCoords;
+ GLboolean NeedEyeNormals;
+ GLboolean NeedClipCoords;
+
+ GLfloat backface_sign;
+
+ GLboolean OcclusionResult; /* GL_HP_occlusion_test */
+ GLboolean OcclusionResultSaved; /* GL_HP_occlusion_test */
+
+ /* Destination of immediate mode commands */
+ struct immediate *input;
+
+
+ /* Cache of unused immediate structs
+ */
+ struct immediate *freed_im_queue;
+ GLuint nr_im_queued;
+
+ /* The vertex buffer being used by this context.
+ */
+ struct vertex_buffer *VB;
- /* The pixel buffer being used by this context */
- struct pixel_buffer* PB;
-
- struct gl_shine_tab *ShineTable[4]; /* Active shine tables */
- struct gl_shine_tab *ShineTabList; /* Mru list of inactive shine tables */
-
-
-#ifdef PROFILE
- /* Performance measurements */
- GLuint BeginEndCount; /* number of glBegin/glEnd pairs */
- GLdouble BeginEndTime; /* seconds spent between glBegin/glEnd */
- GLuint VertexCount; /* number of vertices processed */
- GLdouble VertexTime; /* total time in seconds */
- GLuint PointCount; /* number of points rendered */
- GLdouble PointTime; /* total time in seconds */
- GLuint LineCount; /* number of lines rendered */
- GLdouble LineTime; /* total time in seconds */
- GLuint PolygonCount; /* number of polygons rendered */
- GLdouble PolygonTime; /* total time in seconds */
- GLuint ClearCount; /* number of glClear calls */
- GLdouble ClearTime; /* seconds spent in glClear */
- GLuint SwapCount; /* number of swap-buffer calls */
- GLdouble SwapTime; /* seconds spent in swap-buffers */
-#endif
+ /* The pixel buffer being used by this context */
+ struct pixel_buffer* PB;
+ struct gl_shine_tab *ShineTable[4]; /* Active shine tables */
+ struct gl_shine_tab *ShineTabList; /* Mru list of inactive shine tables */
- /* Should 3Dfx Glide driver catch signals? */
- GLboolean CatchSignals;
+ /* Should 3Dfx Glide driver catch signals? */
+ GLboolean CatchSignals;
- /* For debugging/development only */
- GLboolean NoRaster;
- GLboolean FirstTimeCurrent;
+ /* For debugging/development only */
+ GLboolean NoRaster;
+ GLboolean FirstTimeCurrent;
- /* Dither disable via MESA_NO_DITHER env var */
- GLboolean NoDither;
+ /* Dither disable via MESA_NO_DITHER env var */
+ GLboolean NoDither;
};
-#ifndef MESA_DEBUG
+#ifdef MESA_DEBUG
+extern int MESA_VERBOSE;
+extern int MESA_DEBUG_FLAGS;
+#else
# define MESA_VERBOSE 0
# define MESA_DEBUG_FLAGS 0
# ifndef NDEBUG
# define NDEBUG
# endif
-#else
-extern int MESA_VERBOSE;
-extern int MESA_DEBUG_FLAGS;
#endif
+
enum _verbose {
VERBOSE_VARRAY = 0x1,
VERBOSE_TEXTURE = 0x2,
diff --git a/xc/extras/Mesa/src/vb.c b/xc/extras/Mesa/src/vb.c
index 1677806b6..7dcb64b10 100644
--- a/xc/extras/Mesa/src/vb.c
+++ b/xc/extras/Mesa/src/vb.c
@@ -271,7 +271,11 @@ struct immediate *gl_immediate_alloc( GLcontext *ctx )
IM->Start = VB_START;
IM->Material = 0;
IM->MaterialMask = 0;
-
+#ifdef VMS
+ for (j=0; j<VB_SIZE ; j++ )
+ IM->Normal[j][0] = IM->Normal[j][1] = IM->Normal[j][2] = 0.0;
+#endif
+
if (MESA_VERBOSE&VERBOSE_IMMEDIATE)
fprintf(stderr, "alloc immediate %d\n", id);
diff --git a/xc/extras/Mesa/src/vbrender.c b/xc/extras/Mesa/src/vbrender.c
index 507bf195a..9ee4fbb8c 100644
--- a/xc/extras/Mesa/src/vbrender.c
+++ b/xc/extras/Mesa/src/vbrender.c
@@ -719,9 +719,6 @@ void gl_reduced_prim_change( GLcontext *ctx, GLenum prim )
if (ctx->PB->count > 0)
gl_flush_pb(ctx);
- ctx->PB->count = 0;
- ctx->PB->mono = GL_FALSE;
-
if (ctx->PB->primitive != prim) {
ctx->PB->primitive = prim;
diff --git a/xc/include/GL/Imakefile b/xc/include/GL/Imakefile
index 2e18a43cb..2ac6c9e0e 100644
--- a/xc/include/GL/Imakefile
+++ b/xc/include/GL/Imakefile
@@ -3,9 +3,10 @@ XCOMM $XFree86: xc/include/GL/Imakefile,v 1.8 2000/03/02 16:07:29 martin Exp $
LinkSourceFile(gl.h, ../../extras/Mesa/include/GL)
LinkSourceFile(glext.h, ../../extras/Mesa/include/GL)
+LinkSourceFile(osmesa.h, ../../extras/Mesa/include/GL)
#if BuildGLXLibrary
-GLXHEADERS = gl.h glext.h glx.h glxint.h glxmd.h glxproto.h glxtokens.h
+GLXHEADERS = gl.h glext.h glx.h glxint.h glxmd.h glxproto.h glxtokens.h osmesa.h
#endif
HEADERS = $(GLXHEADERS)
diff --git a/xc/lib/GL/Imakefile b/xc/lib/GL/Imakefile
index 79a9c4b7d..c882109e1 100644
--- a/xc/lib/GL/Imakefile
+++ b/xc/lib/GL/Imakefile
@@ -233,6 +233,13 @@ InstallLibrary($(LIBNAME),$(USRLIBDIR))
#if SharedLibGlx
SharedDepLibraryTarget($(LIBNAME),$(SOREV),$(GLXSUBDIRS) $(DONES),$(OBJS) $(THREADOBJS),.,.)
InstallSharedLibrary($(LIBNAME),$(SOREV),$(SHLIBDIR))
+#if LinkGLToUsrLib && AlternateUsrLibDir
+install::
+ $(RM) $(DESTDIR)$(SYSTEMUSRLIBDIR)/lib$(LIBNAME).so
+ $(LN) $(SHLIBDIR)/lib$(LIBNAME).so $(DESTDIR)$(SYSTEMUSRLIBDIR)/lib$(LIBNAME).so
+ $(RM) $(DESTDIR)$(SYSTEMUSRLIBDIR)/lib$(LIBNAME).so.1
+ $(LN) $(SHLIBDIR)/lib$(LIBNAME).so.1 $(DESTDIR)$(SYSTEMUSRLIBDIR)/lib$(LIBNAME).so.1
+#endif
#endif
#if DebugLibGlx
DebuggedDepLibraryTarget($(LIBNAME),$(GLXSUBDIRS) $(DONES),$(DOBJS))
diff --git a/xc/lib/GL/dri/XF86dri.c b/xc/lib/GL/dri/XF86dri.c
index 5c86222c6..dd0ee56ff 100644
--- a/xc/lib/GL/dri/XF86dri.c
+++ b/xc/lib/GL/dri/XF86dri.c
@@ -205,6 +205,7 @@ Bool XF86DRIAuthConnection(dpy, screen, magic)
{
XExtDisplayInfo *info = find_display (dpy);
xXF86DRIAuthConnectionReq *req;
+ xXF86DRIAuthConnectionReply rep;
XF86DRICheckExtension (dpy, info, False);
@@ -214,6 +215,12 @@ Bool XF86DRIAuthConnection(dpy, screen, magic)
req->driReqType = X_XF86DRIAuthConnection;
req->screen = screen;
req->magic = magic;
+ rep.authenticated = 0;
+ if (!_XReply(dpy, (xReply *)&rep, 0, xFalse) || !rep.authenticated) {
+ UnlockDisplay(dpy);
+ SyncHandle();
+ return False;
+ }
UnlockDisplay(dpy);
SyncHandle();
return True;
diff --git a/xc/lib/GL/dri/dri_glx.c b/xc/lib/GL/dri/dri_glx.c
index 22cc354e5..5b83792f7 100644
--- a/xc/lib/GL/dri/dri_glx.c
+++ b/xc/lib/GL/dri/dri_glx.c
@@ -314,9 +314,9 @@ void *driCreateDisplay(Display *dpy, __DRIdisplay *pdisp)
return NULL;
}
- pdpyp->major = major;
- pdpyp->minor = minor;
- pdpyp->patch = patch;
+ pdpyp->driMajor = major;
+ pdpyp->driMinor = minor;
+ pdpyp->driPatch = patch;
pdisp->destroyDisplay = driDestroyDisplay;
diff --git a/xc/lib/GL/dri/dri_glx.h b/xc/lib/GL/dri/dri_glx.h
index 21fe733bc..75561685c 100644
--- a/xc/lib/GL/dri/dri_glx.h
+++ b/xc/lib/GL/dri/dri_glx.h
@@ -41,9 +41,9 @@ struct __DRIdisplayPrivateRec {
/*
** XFree86-DRI version information
*/
- int major;
- int minor;
- int patch;
+ int driMajor;
+ int driMinor;
+ int driPatch;
/*
** Array of library handles [indexed by screen number]
diff --git a/xc/lib/GL/dri/xf86dristr.h b/xc/lib/GL/dri/xf86dristr.h
index dd246bac8..42e5da785 100644
--- a/xc/lib/GL/dri/xf86dristr.h
+++ b/xc/lib/GL/dri/xf86dristr.h
@@ -40,7 +40,7 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#define XF86DRINAME "XFree86-DRI"
-#define XF86DRI_MAJOR_VERSION 2 /* current version numbers */
+#define XF86DRI_MAJOR_VERSION 3 /* current version numbers */
#define XF86DRI_MINOR_VERSION 0
#define XF86DRI_PATCH_VERSION 0
@@ -122,6 +122,20 @@ typedef struct _XF86DRIAuthConnection {
} xXF86DRIAuthConnectionReq;
#define sz_xXF86DRIAuthConnectionReq 12
+typedef struct {
+ BYTE type;
+ BOOL pad1;
+ CARD16 sequenceNumber B16;
+ CARD32 length B32;
+ CARD32 authenticated B32;
+ CARD32 pad2 B32;
+ CARD32 pad3 B32;
+ CARD32 pad4 B32;
+ CARD32 pad5 B32;
+ CARD32 pad6 B32;
+} xXF86DRIAuthConnectionReply;
+#define zx_xXF86DRIAuthConnectionReply 32
+
typedef struct _XF86DRICloseConnection {
CARD8 reqType; /* always DRIReqCode */
CARD8 driReqType; /* always X_DRICloseConnection */
diff --git a/xc/lib/GL/glx/glxcmds.c b/xc/lib/GL/glx/glxcmds.c
index 6cc0f1169..d7462eb2b 100644
--- a/xc/lib/GL/glx/glxcmds.c
+++ b/xc/lib/GL/glx/glxcmds.c
@@ -49,7 +49,8 @@ static const char GLXClientVersion[] = "1.2";
static const char GLXClientExtensions[] =
"GLX_EXT_visual_info "
"GLX_EXT_visual_rating "
- "GLX_EXT_import_context ";
+ "GLX_EXT_import_context "
+ "GLX_ARB_get_proc_address ";
/*
** Create a new context.
diff --git a/xc/lib/GL/mesa/dri/dri_mesa.c b/xc/lib/GL/mesa/dri/dri_mesa.c
index b679b41a4..e6435e218 100644
--- a/xc/lib/GL/mesa/dri/dri_mesa.c
+++ b/xc/lib/GL/mesa/dri/dri_mesa.c
@@ -71,6 +71,19 @@ static void *driMesaCreateScreen(Display *dpy, int scrn, __DRIscreen *psc,
static void driMesaDestroyScreen(Display *dpy, int scrn, void *private);
+
+/*
+** Print message to stderr if LIBGL_DEBUG env var is set.
+*/
+void
+__driMesaMessage(const char *msg)
+{
+ if (getenv("LIBGL_DEBUG")) {
+ fprintf(stderr, "libGL error: %s\n", msg);
+ }
+}
+
+
/*****************************************************************/
/* Maintain a list of drawables */
@@ -543,6 +556,7 @@ static void *driMesaCreateScreen(Display *dpy, int scrn, __DRIscreen *psc,
return NULL;
}
+ psp->display = dpy;
psp->myNum = scrn;
if (!XF86DRIOpenConnection(dpy, scrn, &hSAREA, &BusID)) {
@@ -558,7 +572,7 @@ static void *driMesaCreateScreen(Display *dpy, int scrn, __DRIscreen *psc,
psp->drawLockID = 1;
psp->fd = drmOpen(NULL,BusID);
- if (!psp->fd) {
+ if (psp->fd < 0) {
Xfree(BusID);
Xfree(psp);
(void)XF86DRICloseConnection(dpy, scrn);
@@ -573,6 +587,21 @@ static void *driMesaCreateScreen(Display *dpy, int scrn, __DRIscreen *psc,
return NULL;
}
+ {
+ drmVersionPtr version = drmGetVersion(psp->fd);
+ if (version) {
+ psp->drmMajor = version->version_major;
+ psp->drmMinor = version->version_minor;
+ psp->drmPatch = version->version_patchlevel;
+ drmFreeVersion(version);
+ }
+ else {
+ psp->drmMajor = -1;
+ psp->drmMinor = -1;
+ psp->drmPatch = -1;
+ }
+ }
+
if (!XF86DRIAuthConnection(dpy, scrn, magic)) {
(void)drmClose(psp->fd);
Xfree(psp);
@@ -581,9 +610,9 @@ static void *driMesaCreateScreen(Display *dpy, int scrn, __DRIscreen *psc,
}
if (!XF86DRIGetClientDriverName(dpy, scrn,
- &psp->major,
- &psp->minor,
- &psp->patch,
+ &psp->ddxMajor,
+ &psp->ddxMinor,
+ &psp->ddxPatch,
&driverName)) {
(void)drmClose(psp->fd);
Xfree(psp);
diff --git a/xc/lib/GL/mesa/dri/dri_mesa.h b/xc/lib/GL/mesa/dri/dri_mesa.h
index 4a6870801..42903bf1e 100644
--- a/xc/lib/GL/mesa/dri/dri_mesa.h
+++ b/xc/lib/GL/mesa/dri/dri_mesa.h
@@ -43,5 +43,8 @@ typedef struct __DRIvisualPrivateRec __DRIvisualPrivate;
typedef struct __DRIcontextPrivateRec __DRIcontextPrivate;
typedef struct __DRIdrawablePrivateRec __DRIdrawablePrivate;
+extern void __driMesaMessage(const char *msg);
+
#endif
+
#endif /* _DRI_MESA_H_ */
diff --git a/xc/lib/GL/mesa/dri/dri_mesaint.h b/xc/lib/GL/mesa/dri/dri_mesaint.h
index e8918724c..9c33dda17 100644
--- a/xc/lib/GL/mesa/dri/dri_mesaint.h
+++ b/xc/lib/GL/mesa/dri/dri_mesaint.h
@@ -176,6 +176,11 @@ struct __DRIvisualPrivateRec {
struct __DRIscreenPrivateRec {
/*
+ ** Display for this screen
+ */
+ Display *display;
+
+ /*
** Current screen's number
*/
int myNum;
@@ -193,11 +198,18 @@ struct __DRIscreenPrivateRec {
__MesaAPI MesaAPI;
/*
- ** Core rendering library's driver version information.
+ ** DDX / 2D driver version information.
+ */
+ int ddxMajor;
+ int ddxMinor;
+ int ddxPatch;
+
+ /*
+ ** DRM version information.
*/
- int major;
- int minor;
- int patch;
+ int drmMajor;
+ int drmMinor;
+ int drmPatch;
/*
** ID used when the client sets the drawable lock. The X server
diff --git a/xc/lib/GL/mesa/include/GL/Imakefile b/xc/lib/GL/mesa/include/GL/Imakefile
index bc6730a85..da1b03d8d 100644
--- a/xc/lib/GL/mesa/include/GL/Imakefile
+++ b/xc/lib/GL/mesa/include/GL/Imakefile
@@ -11,3 +11,4 @@ LinkSourceFile(glx.h, ../../../../../extras/Mesa/include/GL)
LinkSourceFile(xmesa.h, ../../../../../extras/Mesa/include/GL)
LinkSourceFile(xmesa_x.h, ../../../../../extras/Mesa/include/GL)
LinkSourceFile(xmesa_xf86.h, ../../../../../extras/Mesa/include/GL)
+LinkSourceFile(osmesa.h, ../../../../../extras/Mesa/include/GL)
diff --git a/xc/lib/GL/mesa/src/Imakefile b/xc/lib/GL/mesa/src/Imakefile
index 4f5af973c..1d42b4950 100644
--- a/xc/lib/GL/mesa/src/Imakefile
+++ b/xc/lib/GL/mesa/src/Imakefile
@@ -382,7 +382,7 @@ NormalLintTarget($(SRCS))
#define IHaveSubdirs
#define PassCDebugFlags
-SUBDIRS = $(MESASUBDIRS) $(ASMSUBDIRS) drv
+SUBDIRS = $(MESASUBDIRS) $(ASMSUBDIRS) drv OSmesa
MakeSubdirs($(SUBDIRS))
DependSubdirs($(SUBDIRS))
diff --git a/xc/lib/GL/mesa/src/OSmesa/Imakefile b/xc/lib/GL/mesa/src/OSmesa/Imakefile
new file mode 100644
index 000000000..e92b9e3a8
--- /dev/null
+++ b/xc/lib/GL/mesa/src/OSmesa/Imakefile
@@ -0,0 +1,249 @@
+
+#include <Threads.tmpl>
+
+#define DoNormalLib NormalLibGlx
+#define DoSharedLib SharedLibGlx
+#define DoExtraLib SharedLibGlx
+#define DoDebugLib DebugLibGlx
+#define DoProfileLib ProfileLibGlx
+
+LinkSourceFile(osmesa.c, ../../../../../extras/Mesa/src/OSmesa)
+
+
+#if Malloc0ReturnsNull
+ALLOC_DEFINES = -DMALLOC_0_RETURNS_NULL
+#endif
+
+MESA_INCLUDES = -I. -I.. -I../../include -I../../../../../include
+
+ DEFINES = $(ALLOC_DEFINES) $(DRI_DEFINES)
+ INCLUDES = -I$(XLIBSRC) -I$(EXTINCSRC) $(MESA_INCLUDES) $(DRI_INCLUDES)
+
+ MESASRCS = ../aatriangle.c \
+ ../accum.c \
+ ../alpha.c \
+ ../alphabuf.c \
+ ../attrib.c \
+ ../bbox.c \
+ ../bitmap.c \
+ ../blend.c \
+ ../buffers.c \
+ ../clip.c \
+ ../colortab.c \
+ ../config.c \
+ ../context.c \
+ ../copypix.c \
+ ../cva.c \
+ ../debug_xform.c \
+ ../depth.c \
+ ../dlist.c \
+ ../drawpix.c \
+ ../enable.c \
+ ../enums.c \
+ ../eval.c \
+ ../extensions.c \
+ ../feedback.c \
+ ../fog.c \
+ ../get.c \
+ ../glapi.c \
+ ../glapinoop.c \
+ ../glthread.c \
+ ../hash.c \
+ ../image.c \
+ ../imaging.c \
+ ../light.c \
+ ../lines.c \
+ ../logic.c \
+ ../masking.c \
+ ../matrix.c \
+ ../mem.c \
+ ../mmath.c \
+ ../pb.c \
+ ../pipeline.c \
+ ../pixel.c \
+ ../pixeltex.c \
+ ../points.c \
+ ../polygon.c \
+ ../quads.c \
+ ../rastpos.c \
+ ../readpix.c \
+ ../rect.c \
+ ../scissor.c \
+ ../shade.c \
+ ../span.c \
+ ../stages.c \
+ ../state.c \
+ ../stencil.c \
+ ../teximage.c \
+ ../texobj.c \
+ ../texstate.c \
+ ../texture.c \
+ ../texutil.c \
+ ../translate.c \
+ ../triangle.c \
+ ../varray.c \
+ ../vb.c \
+ ../vbcull.c \
+ ../vbfill.c \
+ ../vbindirect.c \
+ ../vbrender.c \
+ ../vbxform.c \
+ ../vector.c \
+ ../vertices.c \
+ ../winpos.c \
+ ../xform.c \
+ ../zoom.c \
+ ../X86/common_x86.c \
+ osmesa.c
+
+ MESAOBJS = ../aatriangle.o \
+ ../accum.o \
+ ../alpha.o \
+ ../alphabuf.o \
+ ../attrib.o \
+ ../bbox.o \
+ ../bitmap.o \
+ ../blend.o \
+ ../buffers.o \
+ ../clip.o \
+ ../colortab.o \
+ ../config.o \
+ ../context.o \
+ ../copypix.o \
+ ../cva.o \
+ ../debug_xform.o \
+ ../depth.o \
+ ../dlist.o \
+ ../drawpix.o \
+ ../enable.o \
+ ../enums.o \
+ ../eval.o \
+ ../extensions.o \
+ ../feedback.o \
+ ../fog.o \
+ ../get.o \
+ ../hash.o \
+ ../hint.o \
+ ../image.o \
+ ../imaging.o \
+ ../light.o \
+ ../lines.o \
+ ../logic.o \
+ ../masking.o \
+ ../matrix.o \
+ ../mem.o \
+ ../mmath.o \
+ ../pb.o \
+ ../pipeline.o \
+ ../pixel.o \
+ ../pixeltex.o \
+ ../points.o \
+ ../polygon.o \
+ ../quads.o \
+ ../rastpos.o \
+ ../readpix.o \
+ ../rect.o \
+ ../scissor.o \
+ ../shade.o \
+ ../span.o \
+ ../stages.o \
+ ../state.o \
+ ../stencil.o \
+ ../teximage.o \
+ ../texobj.o \
+ ../texstate.o \
+ ../texture.o \
+ ../texutil.o \
+ ../translate.o \
+ ../triangle.o \
+ ../varray.o \
+ ../vb.o \
+ ../vbcull.o \
+ ../vbfill.o \
+ ../vbindirect.o \
+ ../vbrender.o \
+ ../vbxform.o \
+ ../vector.o \
+ ../vertices.o \
+ ../winpos.o \
+ ../xform.o \
+ ../zoom.o \
+ osmesa.o
+
+#ifdef i386Architecture
+ X86_SRCS = ../X86/x86.c \
+ ../X86/x86a.S \
+ ../X86/common_x86.c \
+ ../X86/common_x86asm.S \
+ ../X86/vertex.S
+
+ X86_OBJS = ../X86/x86.o \
+ ../X86/x86a.o \
+ ../X86/common_x86.o \
+ ../X86/common_x86asm.o \
+ ../X86/vertex.o
+
+ MMX_SRCS = ../X86/mmx_blend.S
+
+ MMX_OBJS = ../X86/mmx_blend.o
+
+XCOMM Disabling 3Dnow code for the time being.
+#if 0
+ 3DNOW_SRCS = ../X86/3dnow.c \
+ ../X86/3dnow_norm_raw.S \
+ ../X86/3dnow_xform_masked1.S \
+ ../X86/3dnow_xform_masked2.S \
+ ../X86/3dnow_xform_masked3.S \
+ ../X86/3dnow_xform_masked4.S \
+ ../X86/3dnow_xform_raw1.S \
+ ../X86/3dnow_xform_raw2.S \
+ ../X86/3dnow_xform_raw3.S \
+ ../X86/3dnow_xform_raw4.S \
+ ../X86/vertex_3dnow.S
+
+ 3DNOW_OBJS = ../X86/3dnow.o \
+ ../X86/3dnow_norm_raw.o \
+ ../X86/3dnow_xform_masked1.o \
+ ../X86/3dnow_xform_masked2.o \
+ ../X86/3dnow_xform_masked3.o \
+ ../X86/3dnow_xform_masked4.o \
+ ../X86/3dnow_xform_raw1.o \
+ ../X86/3dnow_xform_raw2.o \
+ ../X86/3dnow_xform_raw3.o \
+ ../X86/3dnow_xform_raw4.o \
+ ../X86/vertex_3dnow.o
+#endif
+
+#endif
+
+ ASMSRCS = $(X86_SRCS) $(MMX_SRCS) $(3DNOW_SRCS)
+ ASMOBJS = $(X86_OBJS) $(MMX_OBJS) $(3DNOW_OBJS)
+
+ SRCS = $(MESASRCS) $(ASMSRCS)
+ OBJS = $(MESAOBJS) $(ASMOBJS)
+ UOBJS = $(MESAOBJS) $(ASMOBJS)
+ DONES = DONE
+
+#if !GlxUseBuiltInDRIDriver
+ REQUIREDLIBS += -L../../.. -lGL
+#endif
+
+#include <Library.tmpl>
+
+LibraryObjectRule()
+
+SubdirLibraryRule($(OBJS))
+NormalLintTarget($(SRCS))
+
+LIBNAME = OSMesa
+SOREV = 3.3
+
+
+/*NormalDepLibraryTarget($(LIBNAME), $(DONES), $(UOBJS))*/
+/*InstallLibrary($(LIBNAME),$(USRLIBDIR))*/
+
+SharedDepLibraryTarget($(LIBNAME),$(SOREV), $(DONES), $(OBJS), ., .)
+InstallSharedLibrary($(LIBNAME),$(SOREV),$(SHLIBDIR))
+
+
+DependTarget()
diff --git a/xc/lib/GL/mesa/src/drv/gamma/gamma_xmesa.c b/xc/lib/GL/mesa/src/drv/gamma/gamma_xmesa.c
index 3c1fe64fc..b199bc073 100644
--- a/xc/lib/GL/mesa/src/drv/gamma/gamma_xmesa.c
+++ b/xc/lib/GL/mesa/src/drv/gamma/gamma_xmesa.c
@@ -51,31 +51,65 @@ gammaContextPrivate *gCCPriv = NULL;
static struct _glapi_table *Dispatch = NULL;
-GLboolean XMesaInitDriver(__DRIscreenPrivate *driScrnPriv)
+GLboolean XMesaInitDriver(__DRIscreenPrivate *sPriv)
{
gammaScreenPrivate *gsp;
+ /* Check the DRI version */
+ {
+ int major, minor, patch;
+ if (XF86DRIQueryVersion(sPriv->display, &major, &minor, &patch)) {
+ if (major != 3 || minor != 0 || patch < 0) {
+ char msg[1000];
+ sprintf(msg, "gamma DRI driver expected DRI version 3.0.x but got version %d.%d.%d", major, minor, patch);
+ __driMesaMessage(msg);
+ return GL_FALSE;
+ }
+ }
+ }
+
+ /* Check that the DDX driver version is compatible */
+ if (sPriv->ddxMajor != 1 ||
+ sPriv->ddxMinor != 0 ||
+ sPriv->ddxPatch < 0) {
+ char msg[1000];
+ sprintf(msg, "gamma DRI driver expected DDX driver version 1.0.x but got version %d.%d.%d", sPriv->ddxMajor, sPriv->ddxMinor, sPriv->ddxPatch);
+ __driMesaMessage(msg);
+ return GL_FALSE;
+ }
+
+ /* Check that the DRM driver version is compatible */
+ if (sPriv->drmMajor != 1 ||
+ sPriv->drmMinor != 0 ||
+ sPriv->drmPatch < 0) {
+ char msg[1000];
+ sprintf(msg, "gamm DRI driver expected DRM driver version 1.0.x but got version %d.%d.%d", sPriv->drmMajor, sPriv->drmMinor, sPriv->drmPatch);
+ __driMesaMessage(msg);
+ return GL_FALSE;
+ }
+
/* Allocate the private area */
gsp = (gammaScreenPrivate *)Xmalloc(sizeof(gammaScreenPrivate));
if (!gsp) {
return GL_FALSE;
}
- gsp->driScrnPriv = driScrnPriv;
+ gsp->driScrnPriv = sPriv;
- driScrnPriv->private = (void *)gsp;
+ sPriv->private = (void *)gsp;
- if (!gammaMapAllRegions(driScrnPriv)) {
- Xfree(driScrnPriv->private);
+ if (!gammaMapAllRegions(sPriv)) {
+ Xfree(sPriv->private);
return GL_FALSE;
}
return GL_TRUE;
}
-void XMesaResetDriver(__DRIscreenPrivate *driScrnPriv)
+void XMesaResetDriver(__DRIscreenPrivate *sPriv)
{
- gammaUnmapAllRegions(driScrnPriv);
- Xfree(driScrnPriv->private);
+ gammaUnmapAllRegions(sPriv);
+ Xfree(sPriv->private);
+ sPriv->private = NULL;
}
GLvisual *XMesaCreateVisual(Display *dpy,
diff --git a/xc/lib/GL/mesa/src/drv/i810/i810_xmesa.c b/xc/lib/GL/mesa/src/drv/i810/i810_xmesa.c
index 5edcf2620..8b439e52c 100644
--- a/xc/lib/GL/mesa/src/drv/i810/i810_xmesa.c
+++ b/xc/lib/GL/mesa/src/drv/i810/i810_xmesa.c
@@ -113,9 +113,43 @@ GLboolean XMesaInitDriver(__DRIscreenPrivate *sPriv)
i810ScreenPrivate *i810Screen;
I810DRIPtr gDRIPriv = (I810DRIPtr)sPriv->pDevPriv;
+ /* Check the DRI version */
+ {
+ int major, minor, patch;
+ if (XF86DRIQueryVersion(sPriv->display, &major, &minor, &patch)) {
+ if (major != 3 || minor != 0 || patch < 0) {
+ char msg[1000];
+ sprintf(msg, "i810 DRI driver expected DRI version 3.0.x but got version %d.%d.%d", major, minor, patch);
+ __driMesaMessage(msg);
+ return GL_FALSE;
+ }
+ }
+ }
+
+ /* Check that the DDX driver version is compatible */
+ if (sPriv->ddxMajor != 1 ||
+ sPriv->ddxMinor != 0 ||
+ sPriv->ddxPatch < 0) {
+ char msg[1000];
+ sprintf(msg, "i810 DRI driver expected DDX driver version 1.0.x but got version %d.%d.%d", sPriv->ddxMajor, sPriv->ddxMinor, sPriv->ddxPatch);
+ __driMesaMessage(msg);
+ return GL_FALSE;
+ }
+
+ /* Check that the DRM driver version is compatible */
+ if (sPriv->drmMajor != 1 ||
+ sPriv->drmMinor != 0 ||
+ sPriv->drmPatch < 0) {
+ char msg[1000];
+ sprintf(msg, "i810 DRI driver expected DRM driver version 1.0.x but got version %d.%d.%d", sPriv->drmMajor, sPriv->drmMinor, sPriv->drmPatch);
+ __driMesaMessage(msg);
+ return GL_FALSE;
+ }
+
/* Allocate the private area */
i810Screen = (i810ScreenPrivate *)Xmalloc(sizeof(i810ScreenPrivate));
- if (!i810Screen) return GL_FALSE;
+ if (!i810Screen)
+ return GL_FALSE;
i810Screen->driScrnPriv = sPriv;
sPriv->private = (void *)i810Screen;
@@ -141,7 +175,7 @@ GLboolean XMesaInitDriver(__DRIscreenPrivate *sPriv)
i810Screen->textureSize=gDRIPriv->textureSize;
i810Screen->logTextureGranularity = gDRIPriv->logTextureGranularity;
- if (1)
+ if (0)
fprintf(stderr, "Tex heap size %x, granularity %x bytes\n",
i810Screen->textureSize, 1<<(i810Screen->logTextureGranularity));
@@ -161,6 +195,7 @@ GLboolean XMesaInitDriver(__DRIscreenPrivate *sPriv)
(drmAddress *)&i810Screen->back.map) != 0)
{
Xfree(i810Screen);
+ sPriv->private = NULL;
return GL_FALSE;
}
@@ -173,6 +208,8 @@ GLboolean XMesaInitDriver(__DRIscreenPrivate *sPriv)
(drmAddress *)&i810Screen->depth.map) != 0)
{
Xfree(i810Screen);
+ drmUnmap(i810Screen->back.map, i810Screen->back.size);
+ sPriv->private = NULL;
return GL_FALSE;
}
@@ -185,6 +222,9 @@ GLboolean XMesaInitDriver(__DRIscreenPrivate *sPriv)
(drmAddress *)&i810Screen->tex.map) != 0)
{
Xfree(i810Screen);
+ drmUnmap(i810Screen->back.map, i810Screen->back.size);
+ drmUnmap(i810Screen->depth.map, i810Screen->depth.size);
+ sPriv->private = NULL;
return GL_FALSE;
}
@@ -204,9 +244,12 @@ void XMesaResetDriver(__DRIscreenPrivate *sPriv)
/* Need to unmap all the bufs and maps here:
*/
-
+ drmUnmap(i810Screen->back.map, i810Screen->back.size);
+ drmUnmap(i810Screen->depth.map, i810Screen->depth.size);
+ drmUnmap(i810Screen->tex.map, i810Screen->tex.size);
Xfree(i810Screen);
+ sPriv->private = NULL;
}
@@ -459,7 +502,7 @@ void i810XMesaSetBackClipRects( i810ContextPtr imesa )
static void i810XMesaWindowMoved( i810ContextPtr imesa )
{
if (0)
- fprintf(stderr, "i810XMesaWindowMoved\n\n");
+ fprintf(stderr, "i810XMesaWindowMoved\n\n");
switch (imesa->glCtx->Color.DriverDrawBuffer) {
case GL_FRONT_LEFT:
@@ -469,7 +512,7 @@ static void i810XMesaWindowMoved( i810ContextPtr imesa )
i810XMesaSetBackClipRects( imesa );
break;
default:
- fprintf(stderr, "fallback buffer\n");
+ /*fprintf(stderr, "fallback buffer\n");*/
break;
}
}
diff --git a/xc/lib/GL/mesa/src/drv/i810/i810dd.c b/xc/lib/GL/mesa/src/drv/i810/i810dd.c
index 7c04f6d56..583eb630c 100644
--- a/xc/lib/GL/mesa/src/drv/i810/i810dd.c
+++ b/xc/lib/GL/mesa/src/drv/i810/i810dd.c
@@ -56,7 +56,7 @@ static const GLubyte *i810DDGetString( GLcontext *ctx, GLenum name )
case GL_VENDOR:
return "Keith Whitwell, Precision Insight Inc.";
case GL_RENDERER:
- return "Mesa DRI I810 20000415";
+ return "Mesa DRI I810 20000510";
default:
return 0;
}
diff --git a/xc/lib/GL/mesa/src/drv/i810/i810tris.c b/xc/lib/GL/mesa/src/drv/i810/i810tris.c
index df28991f1..c601ca492 100644
--- a/xc/lib/GL/mesa/src/drv/i810/i810tris.c
+++ b/xc/lib/GL/mesa/src/drv/i810/i810tris.c
@@ -114,6 +114,7 @@ void i810DDChooseRenderState( GLcontext *ctx )
if (flags & DD_MULTIDRAW) shared |= I810_FALLBACK_BIT;
if (flags & DD_SELECT) shared |= I810_FALLBACK_BIT;
if (flags & DD_FEEDBACK) shared |= I810_FALLBACK_BIT;
+ if (flags & DD_STENCIL) shared |= I810_FALLBACK_BIT;
imesa->renderindex = shared;
imesa->PointsFunc = points_tab[shared];
diff --git a/xc/lib/GL/mesa/src/drv/mga/mga_xmesa.c b/xc/lib/GL/mesa/src/drv/mga/mga_xmesa.c
index c6aadc144..a0d9cdf73 100644
--- a/xc/lib/GL/mesa/src/drv/mga/mga_xmesa.c
+++ b/xc/lib/GL/mesa/src/drv/mga/mga_xmesa.c
@@ -99,9 +99,43 @@ GLboolean XMesaInitDriver(__DRIscreenPrivate *sPriv)
mgaScreenPrivate *mgaScreen;
MGADRIPtr serverInfo = (MGADRIPtr)sPriv->pDevPriv;
+ /* Check the DRI version */
+ {
+ int major, minor, patch;
+ if (XF86DRIQueryVersion(sPriv->display, &major, &minor, &patch)) {
+ if (major != 3 || minor != 0 || patch < 0) {
+ char msg[1000];
+ sprintf(msg, "MGA DRI driver expected DRI version 3.0.x but got version %d.%d.%d", major, minor, patch);
+ __driMesaMessage(msg);
+ return GL_FALSE;
+ }
+ }
+ }
+
+ /* Check that the DDX driver version is compatible */
+ if (sPriv->ddxMajor != 1 ||
+ sPriv->ddxMinor != 0 ||
+ sPriv->ddxPatch < 0) {
+ char msg[1000];
+ sprintf(msg, "MGA DRI driver expected DDX driver version 1.0.x but got version %d.%d.%d", sPriv->ddxMajor, sPriv->ddxMinor, sPriv->ddxPatch);
+ __driMesaMessage(msg);
+ return GL_FALSE;
+ }
+
+ /* Check that the DRM driver version is compatible */
+ if (sPriv->drmMajor != 1 ||
+ sPriv->drmMinor != 0 ||
+ sPriv->drmPatch < 0) {
+ char msg[1000];
+ sprintf(msg, "MGA DRI driver expected DRM driver version 1.0.x but got version %d.%d.%d", sPriv->drmMajor, sPriv->drmMinor, sPriv->drmPatch);
+ __driMesaMessage(msg);
+ return GL_FALSE;
+ }
+
/* Allocate the private area */
mgaScreen = (mgaScreenPrivate *)Xmalloc(sizeof(mgaScreenPrivate));
- if (!mgaScreen) return GL_FALSE;
+ if (!mgaScreen)
+ return GL_FALSE;
mgaScreen->sPriv = sPriv;
sPriv->private = (void *)mgaScreen;
@@ -111,8 +145,12 @@ GLboolean XMesaInitDriver(__DRIscreenPrivate *sPriv)
*/
if (serverInfo->chipset != MGA_CARD_TYPE_G200 &&
- serverInfo->chipset != MGA_CARD_TYPE_G400)
- return GL_FALSE;
+ serverInfo->chipset != MGA_CARD_TYPE_G400) {
+ XFree(mgaScreen);
+ sPriv->private = NULL;
+ return GL_FALSE;
+ }
+
mgaScreen->chipset = serverInfo->chipset;
mgaScreen->width = serverInfo->width;
@@ -136,6 +174,7 @@ GLboolean XMesaInitDriver(__DRIscreenPrivate *sPriv)
(drmAddress *)&mgaScreen->agp.map) != 0)
{
Xfree(mgaScreen);
+ sPriv->private = NULL;
return GL_FALSE;
}
@@ -177,6 +216,12 @@ GLboolean XMesaInitDriver(__DRIscreenPrivate *sPriv)
mgaScreen->Attrib = MGA_PF_565;
mgaScreen->bufs = drmMapBufs(sPriv->fd);
+ if (!mgaScreen->bufs) {
+ /*drmUnmap(mgaScreen->agp_tex.map, mgaScreen->agp_tex.size);*/
+ XFree(mgaScreen);
+ sPriv->private = NULL;
+ return GL_FALSE;
+ }
/* Other mgaglx stuff, too??
*/
@@ -190,11 +235,15 @@ GLboolean XMesaInitDriver(__DRIscreenPrivate *sPriv)
return GL_TRUE;
}
+
/* Accessed by dlsym from dri_mesa_init.c
*/
void XMesaResetDriver(__DRIscreenPrivate *sPriv)
{
- Xfree(sPriv->private);
+ mgaScreenPrivate *mgaScreen = (mgaScreenPrivate *) sPriv->private;
+ /*drmUnmap(mgaScreen->agp_tex.map, mgaScreen->agp_tex.size);*/
+ Xfree(mgaScreen);
+ sPriv->private = NULL;
}
diff --git a/xc/lib/GL/mesa/src/drv/mga/mgadd.c b/xc/lib/GL/mesa/src/drv/mga/mgadd.c
index 438ef254c..8eb717d5c 100644
--- a/xc/lib/GL/mesa/src/drv/mga/mgadd.c
+++ b/xc/lib/GL/mesa/src/drv/mga/mgadd.c
@@ -63,9 +63,9 @@ static const GLubyte *mgaDDGetString( GLcontext *ctx, GLenum name )
case GL_VENDOR:
return "Precision Insight, Inc.";
case GL_RENDERER:
- if (MGA_IS_G200(mmesa)) return "Mesa DRI G200 20000415";
- if (MGA_IS_G400(mmesa)) return "Mesa DRI G400 20000415";
- return "Mesa DRI MGA 20000415";
+ if (MGA_IS_G200(mmesa)) return "Mesa DRI G200 20000510";
+ if (MGA_IS_G400(mmesa)) return "Mesa DRI G400 20000510";
+ return "Mesa DRI MGA 20000510";
default:
return 0;
}
diff --git a/xc/lib/GL/mesa/src/drv/mga/mgafastpath.c b/xc/lib/GL/mesa/src/drv/mga/mgafastpath.c
index 76e0047f8..73a939b74 100644
--- a/xc/lib/GL/mesa/src/drv/mga/mgafastpath.c
+++ b/xc/lib/GL/mesa/src/drv/mga/mgafastpath.c
@@ -383,9 +383,9 @@ static void mga_project_vertices( struct vertex_buffer *VB )
REFRESH_DRAWABLE_INFO(mmesa);
m[MAT_SX] = mat->m[MAT_SX];
- m[MAT_TX] = mat->m[MAT_TX] + mmesa->drawX + .5;
+ m[MAT_TX] = mat->m[MAT_TX] + mmesa->drawX + SUBPIXEL_X;
m[MAT_SY] = (- mat->m[MAT_SY]);
- m[MAT_TY] = (- mat->m[MAT_TY]) + mmesa->driDrawable->h + mmesa->drawY - .5;
+ m[MAT_TY] = (- mat->m[MAT_TY]) + mmesa->driDrawable->h + mmesa->drawY + SUBPIXEL_Y;
m[MAT_SZ] = mat->m[MAT_SZ] * (1.0 / 0x10000);
m[MAT_TZ] = mat->m[MAT_TZ] * (1.0 / 0x10000);
@@ -406,9 +406,9 @@ static void mga_project_clipped_vertices( struct vertex_buffer *VB )
REFRESH_DRAWABLE_INFO(mmesa);
m[MAT_SX] = mat->m[MAT_SX];
- m[MAT_TX] = mat->m[MAT_TX] + mmesa->drawX + .5;
+ m[MAT_TX] = mat->m[MAT_TX] + mmesa->drawX + SUBPIXEL_X;
m[MAT_SY] = (- mat->m[MAT_SY]);
- m[MAT_TY] = (- mat->m[MAT_TY]) + mmesa->driDrawable->h + mmesa->drawY - .5;
+ m[MAT_TY] = (- mat->m[MAT_TY]) + mmesa->driDrawable->h + mmesa->drawY - SUBPIXEL_Y;
m[MAT_SZ] = mat->m[MAT_SZ] * (1.0 / 0x10000);
m[MAT_TZ] = mat->m[MAT_TZ] * (1.0 / 0x10000);
diff --git a/xc/lib/GL/mesa/src/drv/mga/mgalib.h b/xc/lib/GL/mesa/src/drv/mga/mgalib.h
index 7d086ae28..e00525f7b 100644
--- a/xc/lib/GL/mesa/src/drv/mga/mgalib.h
+++ b/xc/lib/GL/mesa/src/drv/mga/mgalib.h
@@ -313,4 +313,12 @@ static __inline__ mgaUI32 mgaPackColor(mgaUI32 format,
}
}
+
+/*
+ * Subpixel offsets for window coordinates:
+ */
+#define SUBPIXEL_X (-0.5F)
+#define SUBPIXEL_Y (-0.5F + 0.125)
+
+
#endif
diff --git a/xc/lib/GL/mesa/src/drv/mga/mgaspan.c b/xc/lib/GL/mesa/src/drv/mga/mgaspan.c
index 61405cbe7..887e194d2 100644
--- a/xc/lib/GL/mesa/src/drv/mga/mgaspan.c
+++ b/xc/lib/GL/mesa/src/drv/mga/mgaspan.c
@@ -132,11 +132,11 @@ do { \
/* 16 bit depthbuffer functions.
*/
-#define WRITE_DEPTH( _x, _y, d ) \
- *(GLdepth *)(buf + _x*2 + _y*pitch) = d;
+#define WRITE_DEPTH( _x, _y, d ) \
+ *(GLushort *)(buf + _x*2 + _y*pitch) = d;
-#define READ_DEPTH( d, _x, _y ) \
- d = *(GLdepth *)(buf + _x*2 + _y*pitch);
+#define READ_DEPTH( d, _x, _y ) \
+ d = *(GLushort *)(buf + _x*2 + _y*pitch);
#define TAG(x) mga##x##_16
#include "depthtmp.h"
diff --git a/xc/lib/GL/mesa/src/drv/mga/mgavb.c b/xc/lib/GL/mesa/src/drv/mga/mgavb.c
index 2d61f301d..3f246d9a7 100644
--- a/xc/lib/GL/mesa/src/drv/mga/mgavb.c
+++ b/xc/lib/GL/mesa/src/drv/mga/mgavb.c
@@ -100,8 +100,8 @@ static void name(struct vertex_buffer *VB, GLuint start, GLuint end) \
mgaVertexPtr v; \
GLfloat (*tc0)[4]; \
GLfloat (*tc1)[4]; \
- GLfloat xoffset = 0.5 + mmesa->drawX; \
- GLfloat yoffset = mmesa->driDrawable->h - 0.5 + mmesa->drawY; \
+ GLfloat xoffset = mmesa->drawX + SUBPIXEL_X; \
+ GLfloat yoffset = mmesa->driDrawable->h + mmesa->drawY + SUBPIXEL_Y; \
int i; \
(void) xoffset; (void) yoffset; \
if (0) fprintf(stderr, "V"); \
diff --git a/xc/lib/GL/mesa/src/drv/r128/r128_dd.c b/xc/lib/GL/mesa/src/drv/r128/r128_dd.c
index 0ed7ae471..f270cbe13 100644
--- a/xc/lib/GL/mesa/src/drv/r128/r128_dd.c
+++ b/xc/lib/GL/mesa/src/drv/r128/r128_dd.c
@@ -100,7 +100,7 @@ static const GLubyte *r128DDGetString(GLcontext *ctx, GLenum name)
case GL_VENDOR:
return (GLubyte *)"Precision Insight, Inc.";
case GL_RENDERER:
- return (GLubyte *)"Mesa DRI Rage128 20000320";
+ return (GLubyte *)"Mesa DRI Rage128 20000607";
default:
return NULL;
}
diff --git a/xc/lib/GL/mesa/src/drv/r128/r128_screen.c b/xc/lib/GL/mesa/src/drv/r128/r128_screen.c
index b385271f4..64fa94ebd 100644
--- a/xc/lib/GL/mesa/src/drv/r128/r128_screen.c
+++ b/xc/lib/GL/mesa/src/drv/r128/r128_screen.c
@@ -50,6 +50,46 @@ r128ScreenPtr r128CreateScreen(__DRIscreenPrivate *sPriv)
{
r128ScreenPtr r128Screen;
R128DRIPtr r128DRIPriv = (R128DRIPtr)sPriv->pDevPriv;
+ int major, minor, patch;
+
+ /* Check that the DRI version is compatible */
+ if (XF86DRIQueryVersion(sPriv->display, &major, &minor, &patch)) {
+ if (major != 3 || minor != 0 || patch < 0) {
+ char msg[1000];
+ sprintf(msg,
+ "r128 DRI driver expected DRI version 3.0.x "
+ "but got version %d.%d.%d",
+ major, minor, patch);
+ __driMesaMessage(msg);
+ return NULL;
+ }
+ }
+
+ /* Check that the DDX driver version is compatible */
+ if (sPriv->ddxMajor != 3 ||
+ sPriv->ddxMinor != 1 ||
+ sPriv->ddxPatch < 0) {
+ char msg[1000];
+ sprintf(msg,
+ "r128 DRI driver expected DDX driver version 3.1.x "
+ "but got version %d.%d.%d",
+ sPriv->ddxMajor, sPriv->ddxMinor, sPriv->ddxPatch);
+ __driMesaMessage(msg);
+ return NULL;
+ }
+
+ /* Check that the DRM driver version is compatible */
+ if (sPriv->drmMajor != 1 ||
+ sPriv->drmMinor != 0 ||
+ sPriv->drmPatch < 0) {
+ char msg[1000];
+ sprintf(msg,
+ "r128 DRI driver expected DRM driver version 1.0.x "
+ "but got version %d.%d.%d",
+ sPriv->drmMajor, sPriv->drmMinor, sPriv->drmPatch);
+ __driMesaMessage(msg);
+ return NULL;
+ }
/* Allocate the private area */
r128Screen = (r128ScreenPtr)Xmalloc(sizeof(*r128Screen));
diff --git a/xc/lib/GL/mesa/src/drv/r128/r128_xmesa.c b/xc/lib/GL/mesa/src/drv/r128/r128_xmesa.c
index 60d528813..ff4f9df63 100644
--- a/xc/lib/GL/mesa/src/drv/r128/r128_xmesa.c
+++ b/xc/lib/GL/mesa/src/drv/r128/r128_xmesa.c
@@ -77,10 +77,7 @@ static r128ContextPtr r128Context = NULL;
GLboolean XMesaInitDriver(__DRIscreenPrivate *sPriv)
{
sPriv->private = (void *)r128CreateScreen(sPriv);
- if (!sPriv->private) {
- r128DestroyScreen(sPriv);
- return GL_FALSE;
- }
+ if (!sPriv->private) return GL_FALSE;
return GL_TRUE;
}
diff --git a/xc/lib/GL/mesa/src/drv/tdfx/tdfx_xmesa.c b/xc/lib/GL/mesa/src/drv/tdfx/tdfx_xmesa.c
index e99c57a07..0a99539e8 100644
--- a/xc/lib/GL/mesa/src/drv/tdfx/tdfx_xmesa.c
+++ b/xc/lib/GL/mesa/src/drv/tdfx/tdfx_xmesa.c
@@ -45,30 +45,66 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
__DRIcontextPrivate *gCC = 0;
-GLboolean XMesaInitDriver(__DRIscreenPrivate *driScrnPriv)
+GLboolean XMesaInitDriver(__DRIscreenPrivate *sPriv)
{
- tdfxScreenPrivate *gsp;
+ tdfxScreenPrivate *gsp;
- /* Allocate the private area */
- gsp = (tdfxScreenPrivate *)Xmalloc(sizeof(tdfxScreenPrivate));
- if (!gsp) return GL_FALSE;
+ /* Check the DRI version */
+ {
+ int major, minor, patch;
+ if (XF86DRIQueryVersion(sPriv->display, &major, &minor, &patch)) {
+ if (major != 3 || minor != 0 || patch < 0) {
+ char msg[1000];
+ sprintf(msg, "3dfx DRI driver expected DRI version 3.0.x but got version %d.%d.%d", major, minor, patch);
+ __driMesaMessage(msg);
+ return GL_FALSE;
+ }
+ }
+ }
- gsp->driScrnPriv = driScrnPriv;
+ /* Check that the DDX driver version is compatible */
+ if (sPriv->ddxMajor != 1 ||
+ sPriv->ddxMinor != 0 ||
+ sPriv->ddxPatch < 0) {
+ char msg[1000];
+ sprintf(msg, "3dfx DRI driver expected DDX driver version 1.0.x but got version %d.%d.%d", sPriv->ddxMajor, sPriv->ddxMinor, sPriv->ddxPatch);
+ __driMesaMessage(msg);
+ return GL_FALSE;
+ }
- driScrnPriv->private = (void *)gsp;
+ /* Check that the DRM driver version is compatible */
+ if (sPriv->drmMajor != 1 ||
+ sPriv->drmMinor != 0 ||
+ sPriv->drmPatch < 0) {
+ char msg[1000];
+ sprintf(msg, "3dfx DRI driver expected DRM driver version 1.0.x but got version %d.%d.%d", sPriv->drmMajor, sPriv->drmMinor, sPriv->drmPatch);
+ __driMesaMessage(msg);
+ return GL_FALSE;
+ }
- if (!tdfxMapAllRegions(driScrnPriv)) {
- Xfree(driScrnPriv->private);
- return GL_FALSE;
- }
+ /* Allocate the private area */
+ gsp = (tdfxScreenPrivate *)Xmalloc(sizeof(tdfxScreenPrivate));
+ if (!gsp)
+ return GL_FALSE;
- return GL_TRUE;
+ gsp->driScrnPriv = sPriv;
+
+ sPriv->private = (void *) gsp;
+
+ if (!tdfxMapAllRegions(sPriv)) {
+ Xfree(gsp);
+ sPriv->private = NULL;
+ return GL_FALSE;
+ }
+
+ return GL_TRUE;
}
-void XMesaResetDriver(__DRIscreenPrivate *driScrnPriv)
+void XMesaResetDriver(__DRIscreenPrivate *sPriv)
{
- tdfxUnmapAllRegions(driScrnPriv);
- Xfree(driScrnPriv->private);
+ tdfxUnmapAllRegions(sPriv);
+ Xfree(sPriv->private);
+ sPriv->private = NULL;
}
@@ -135,11 +171,9 @@ GLboolean XMesaCreateContext(Display *dpy, GLvisual *mesaVis,
void XMesaDestroyContext(__DRIcontextPrivate *driContextPriv)
{
- tdfxContextPrivate *cPriv;
-
- cPriv = (tdfxContextPrivate *) driContextPriv->driverPrivate;
+ tdfxContextPrivate *cPriv = (tdfxContextPrivate *) driContextPriv->driverPrivate;
if (cPriv) {
- /* XXX XFree the tdfxContextPrivate struct? */
+ XFree(cPriv);
driContextPriv->driverPrivate = NULL;
}
@@ -158,7 +192,7 @@ GLframebuffer *XMesaCreateWindowBuffer( Display *dpy,
GL_FALSE, /* software depth buffer? */
mesaVis->StencilBits > 0,
mesaVis->AccumRedBits > 0,
- mesaVis->AlphaBits > 0
+ GL_FALSE /* software alpha channel? */
);
}
@@ -219,8 +253,8 @@ void XMesaSwapBuffers(__DRIdrawablePrivate *driDrawPriv)
#endif
FX_grDRIBufferSwap(gCCPriv->swapInterval);
do {
- result=FX_grGetInteger(FX_PENDING_BUFFERSWAPS);
- } while (result>gCCPriv->maxPendingSwapBuffers);
+ result = FX_grGetInteger(FX_PENDING_BUFFERSWAPS);
+ } while (result > gCCPriv->maxPendingSwapBuffers);
gCCPriv->stats.swapBuffer++;
}
}
diff --git a/xc/programs/Xserver/GL/dri/dri.c b/xc/programs/Xserver/GL/dri/dri.c
index 652ecb822..1d3eeee37 100644
--- a/xc/programs/Xserver/GL/dri/dri.c
+++ b/xc/programs/Xserver/GL/dri/dri.c
@@ -93,10 +93,7 @@ DRIDrvMsg(int scrnIndex, MessageType type, const char *format, ...)
}
Bool
-DRIScreenInit(
- ScreenPtr pScreen,
- DRIInfoPtr pDRIInfo,
- int* pDRMFD)
+DRIScreenInit(ScreenPtr pScreen, DRIInfoPtr pDRIInfo, int *pDRMFD)
{
DRIScreenPrivPtr pDRIPriv;
drmContextPtr reserved;
@@ -446,8 +443,7 @@ DRIExtensionInit(void)
}
void
-DRIReset(
-)
+DRIReset(void)
{
/*
* This stub routine is called when the X Server recycles, resources
@@ -459,10 +455,7 @@ DRIReset(
}
Bool
-DRIQueryDirectRenderingCapable(
- ScreenPtr pScreen,
- Bool* isCapable
-)
+DRIQueryDirectRenderingCapable(ScreenPtr pScreen, Bool* isCapable)
{
DRIScreenPrivPtr pDRIPriv = DRI_SCREEN_PRIV(pScreen);
@@ -475,11 +468,7 @@ DRIQueryDirectRenderingCapable(
}
Bool
-DRIOpenConnection(
- ScreenPtr pScreen,
- drmHandlePtr hSAREA,
- char **busIdString
-)
+DRIOpenConnection(ScreenPtr pScreen, drmHandlePtr hSAREA, char **busIdString)
{
DRIScreenPrivPtr pDRIPriv = DRI_SCREEN_PRIV(pScreen);
@@ -490,10 +479,7 @@ DRIOpenConnection(
}
Bool
-DRIAuthConnection(
- ScreenPtr pScreen,
- drmMagic magic
-)
+DRIAuthConnection(ScreenPtr pScreen, drmMagic magic)
{
DRIScreenPrivPtr pDRIPriv = DRI_SCREEN_PRIV(pScreen);
@@ -502,21 +488,17 @@ DRIAuthConnection(
}
Bool
-DRICloseConnection(
- ScreenPtr pScreen
-)
+DRICloseConnection(ScreenPtr pScreen)
{
return TRUE;
}
Bool
-DRIGetClientDriverName(
- ScreenPtr pScreen,
- int* ddxDriverMajorVersion,
- int* ddxDriverMinorVersion,
- int* ddxDriverPatchVersion,
- char** clientDriverName
-)
+DRIGetClientDriverName(ScreenPtr pScreen,
+ int *ddxDriverMajorVersion,
+ int *ddxDriverMinorVersion,
+ int *ddxDriverPatchVersion,
+ char **clientDriverName)
{
DRIScreenPrivPtr pDRIPriv = DRI_SCREEN_PRIV(pScreen);
@@ -628,11 +610,8 @@ DRIDestroyContextPriv(DRIContextPrivPtr pDRIContextPriv)
}
Bool
-DRICreateContext(
- ScreenPtr pScreen,
- VisualPtr visual,
- XID context,
- drmContextPtr pHWContext
+DRICreateContext(ScreenPtr pScreen, VisualPtr visual,
+ XID context, drmContextPtr pHWContext
)
{
DRIScreenPrivPtr pDRIPriv = DRI_SCREEN_PRIV(pScreen);
@@ -677,10 +656,7 @@ DRICreateContext(
}
Bool
-DRIDestroyContext(
- ScreenPtr pScreen,
- XID context
-)
+DRIDestroyContext(ScreenPtr pScreen, XID context)
{
FreeResourceByType(context, DRIContextPrivResType, FALSE);
@@ -689,9 +665,7 @@ DRIDestroyContext(
/* DRIContextPrivDelete is called by the resource manager. */
Bool
-DRIContextPrivDelete(
- pointer pResource,
- XID id)
+DRIContextPrivDelete(pointer pResource, XID id)
{
DRIContextPrivPtr pDRIContextPriv = (DRIContextPrivPtr)pResource;
DRIScreenPrivPtr pDRIPriv;
@@ -715,7 +689,7 @@ DRIContextPrivDelete(
* shared->private is sometimes missed if we don't do this.
*/
static void
-DRIClipNotifyAllDrawables( ScreenPtr pScreen )
+DRIClipNotifyAllDrawables(ScreenPtr pScreen)
{
int i;
DRIScreenPrivPtr pDRIPriv = DRI_SCREEN_PRIV(pScreen);
@@ -727,7 +701,7 @@ DRIClipNotifyAllDrawables( ScreenPtr pScreen )
static void
-DRITransitionToSharedBuffers( ScreenPtr pScreen )
+DRITransitionToSharedBuffers(ScreenPtr pScreen)
{
/* ErrorF("DRITransitionToSharedBuffers\n"); */
DRIClipNotifyAllDrawables( pScreen );
@@ -735,7 +709,7 @@ DRITransitionToSharedBuffers( ScreenPtr pScreen )
static void
-DRITransitionToPrivateBuffers( ScreenPtr pScreen )
+DRITransitionToPrivateBuffers(ScreenPtr pScreen)
{
/* ErrorF("DRITransitionToPrivateBuffers\n"); */
DRIClipNotifyAllDrawables( pScreen );
@@ -743,7 +717,7 @@ DRITransitionToPrivateBuffers( ScreenPtr pScreen )
static void
-DRITransitionTo3d( ScreenPtr pScreen )
+DRITransitionTo3d(ScreenPtr pScreen)
{
DRIScreenPrivPtr pDRIPriv = DRI_SCREEN_PRIV(pScreen);
DRIInfoPtr pDRIInfo = pDRIPriv->pDriverInfo;
@@ -755,7 +729,7 @@ DRITransitionTo3d( ScreenPtr pScreen )
}
static void
-DRITransitionTo2d( ScreenPtr pScreen )
+DRITransitionTo2d(ScreenPtr pScreen)
{
DRIScreenPrivPtr pDRIPriv = DRI_SCREEN_PRIV(pScreen);
DRIInfoPtr pDRIInfo = pDRIPriv->pDriverInfo;
@@ -768,12 +742,8 @@ DRITransitionTo2d( ScreenPtr pScreen )
Bool
-DRICreateDrawable(
- ScreenPtr pScreen,
- Drawable id,
- DrawablePtr pDrawable,
- drmDrawablePtr hHWDrawable
-)
+DRICreateDrawable(ScreenPtr pScreen, Drawable id,
+ DrawablePtr pDrawable, drmDrawablePtr hHWDrawable)
{
DRIScreenPrivPtr pDRIPriv = DRI_SCREEN_PRIV(pScreen);
DRIDrawablePrivPtr pDRIDrawablePriv;
@@ -830,11 +800,7 @@ DRICreateDrawable(
}
Bool
-DRIDestroyDrawable(
- ScreenPtr pScreen,
- Drawable id,
- DrawablePtr pDrawable
-)
+DRIDestroyDrawable(ScreenPtr pScreen, Drawable id, DrawablePtr pDrawable)
{
DRIDrawablePrivPtr pDRIDrawablePriv;
WindowPtr pWin;
@@ -858,9 +824,7 @@ DRIDestroyDrawable(
}
Bool
-DRIDrawablePrivDelete(
- pointer pResource,
- XID id)
+DRIDrawablePrivDelete(pointer pResource, XID id)
{
DrawablePtr pDrawable = (DrawablePtr)pResource;
DRIScreenPrivPtr pDRIPriv = DRI_SCREEN_PRIV(pDrawable->pScreen);
@@ -903,28 +867,27 @@ DRIDrawablePrivDelete(
}
Bool
-DRIGetDrawableInfo(
- ScreenPtr pScreen,
- DrawablePtr pDrawable,
- unsigned int* index,
- unsigned int* stamp,
- int* X,
- int* Y,
- int* W,
- int* H,
- int* numClipRects,
- XF86DRIClipRectPtr* pClipRects,
- int* backX,
- int* backY,
- int* numBackClipRects,
- XF86DRIClipRectPtr* pBackClipRects
-)
+DRIGetDrawableInfo(ScreenPtr pScreen,
+ DrawablePtr pDrawable,
+ unsigned int* index,
+ unsigned int* stamp,
+ int* X,
+ int* Y,
+ int* W,
+ int* H,
+ int* numClipRects,
+ XF86DRIClipRectPtr* pClipRects,
+ int* backX,
+ int* backY,
+ int* numBackClipRects,
+ XF86DRIClipRectPtr* pBackClipRects)
{
DRIScreenPrivPtr pDRIPriv = DRI_SCREEN_PRIV(pScreen);
DRIDrawablePrivPtr pDRIDrawablePriv, pOldDrawPriv;
WindowPtr pWin, pOldWin;
- int i, oldestIndex = 0;
- unsigned int oldestStamp;
+ int i;
+
+ printf("maxDrawableTableEntry = %d\n", pDRIPriv->pDriverInfo->maxDrawableTableEntry);
if (pDrawable->type == DRAWABLE_WINDOW) {
pWin = (WindowPtr)pDrawable;
@@ -948,7 +911,8 @@ DRIGetDrawableInfo(
/* Search table for oldest entry */
if (i == pDRIPriv->pDriverInfo->maxDrawableTableEntry) {
- oldestStamp = ~0;
+ unsigned int oldestStamp = ~0;
+ int oldestIndex = 0;
i = pDRIPriv->pDriverInfo->maxDrawableTableEntry;
while (i--) {
if (pDRIPriv->pSAREA->drawableTable[i].stamp <
@@ -966,10 +930,10 @@ DRIGetDrawableInfo(
pOldDrawPriv->drawableIndex = -1;
/* claim drawable table entry */
- pDRIPriv->DRIDrawables[i] = pDrawable;
+ pDRIPriv->DRIDrawables[oldestIndex] = pDrawable;
/* validate SAREA entry */
- pDRIPriv->pSAREA->drawableTable[i].stamp =
+ pDRIPriv->pSAREA->drawableTable[oldestIndex].stamp =
DRIDrawableValidationStamp++;
/* check for stamp wrap around */
@@ -1050,15 +1014,13 @@ DRIGetDrawableInfo(
}
Bool
-DRIGetDeviceInfo(
- ScreenPtr pScreen,
- drmHandlePtr hFrameBuffer,
- int* fbOrigin,
- int* fbSize,
- int* fbStride,
- int* devPrivateSize,
- void** pDevPrivate
-)
+DRIGetDeviceInfo(ScreenPtr pScreen,
+ drmHandlePtr hFrameBuffer,
+ int* fbOrigin,
+ int* fbSize,
+ int* fbStride,
+ int* devPrivateSize,
+ void** pDevPrivate)
{
DRIScreenPrivPtr pDRIPriv = DRI_SCREEN_PRIV(pScreen);
@@ -1106,10 +1068,7 @@ DRIDestroyInfoRec(DRIInfoPtr DRIInfo)
void
-DRIWakeupHandler(
- pointer wakeupData,
- int result,
- pointer pReadmask)
+DRIWakeupHandler(pointer wakeupData, int result, pointer pReadmask)
{
int i;
@@ -1125,10 +1084,7 @@ DRIWakeupHandler(
}
void
-DRIBlockHandler(
- pointer blockData,
- OSTimePtr pTimeout,
- pointer pReadmask)
+DRIBlockHandler(pointer blockData, OSTimePtr pTimeout, pointer pReadmask)
{
int i;
@@ -1144,11 +1100,8 @@ DRIBlockHandler(
}
void
-DRIDoWakeupHandler(
- int screenNum,
- pointer wakeupData,
- unsigned long result,
- pointer pReadmask)
+DRIDoWakeupHandler(int screenNum, pointer wakeupData,
+ unsigned long result, pointer pReadmask)
{
ScreenPtr pScreen = screenInfo.screens[screenNum];
DRIScreenPrivPtr pDRIPriv = DRI_SCREEN_PRIV(pScreen);
@@ -1166,11 +1119,8 @@ DRIDoWakeupHandler(
}
void
-DRIDoBlockHandler(
- int screenNum,
- pointer blockData,
- pointer pTimeout,
- pointer pReadmask)
+DRIDoBlockHandler(int screenNum, pointer blockData,
+ pointer pTimeout, pointer pReadmask)
{
ScreenPtr pScreen = screenInfo.screens[screenNum];
DRIScreenPrivPtr pDRIPriv = DRI_SCREEN_PRIV(pScreen);
@@ -1188,11 +1138,7 @@ DRIDoBlockHandler(
}
void
-DRISwapContext(
- int drmFD,
- void *oldctx,
- void *newctx
-)
+DRISwapContext(int drmFD, void *oldctx, void *newctx)
{
DRIContextPrivPtr oldContext = (DRIContextPrivPtr)oldctx;
DRIContextPrivPtr newContext = (DRIContextPrivPtr)newctx;
@@ -1347,10 +1293,7 @@ DRIGetContextStore(DRIContextPrivPtr context)
}
void
-DRIPaintWindow(
- WindowPtr pWin,
- RegionPtr prgn,
- int what)
+DRIPaintWindow(WindowPtr pWin, RegionPtr prgn, int what)
{
ScreenPtr pScreen = pWin->drawable.pScreen;
DRIScreenPrivPtr pDRIPriv = DRI_SCREEN_PRIV(pScreen);
@@ -1412,10 +1355,7 @@ DRIPaintWindow(
}
void
-DRICopyWindow(
- WindowPtr pWin,
- DDXPointRec ptOldOrg,
- RegionPtr prgnSrc)
+DRICopyWindow(WindowPtr pWin, DDXPointRec ptOldOrg, RegionPtr prgnSrc)
{
ScreenPtr pScreen = pWin->drawable.pScreen;
DRIScreenPrivPtr pDRIPriv = DRI_SCREEN_PRIV(pScreen);
@@ -1509,10 +1449,7 @@ DRISpinLockTimeout(drmLock *lock, int val, unsigned long timeout /* in mS */)
}
int
-DRIValidateTree(
- WindowPtr pParent,
- WindowPtr pChild,
- VTKind kind)
+DRIValidateTree(WindowPtr pParent, WindowPtr pChild, VTKind kind)
{
ScreenPtr pScreen = pParent->drawable.pScreen;
DRIScreenPrivPtr pDRIPriv = DRI_SCREEN_PRIV(pScreen);
@@ -1567,10 +1504,7 @@ DRIValidateTree(
}
void
-DRIPostValidateTree(
- WindowPtr pParent,
- WindowPtr pChild,
- VTKind kind)
+DRIPostValidateTree(WindowPtr pParent, WindowPtr pChild, VTKind kind)
{
ScreenPtr pScreen;
DRIScreenPrivPtr pDRIPriv;
@@ -1601,10 +1535,7 @@ DRIPostValidateTree(
}
void
-DRIClipNotify(
- WindowPtr pWin,
- int dx,
- int dy)
+DRIClipNotify(WindowPtr pWin, int dx, int dy)
{
DRIScreenPrivPtr pDRIPriv;
DRIDrawablePrivPtr pDRIDrawablePriv;
@@ -1617,8 +1548,7 @@ DRIClipNotify(
}
CARD32
-DRIGetDrawableIndex(
- WindowPtr pWin)
+DRIGetDrawableIndex(WindowPtr pWin)
{
ScreenPtr pScreen = pWin->drawable.pScreen;
DRIScreenPrivPtr pDRIPriv = DRI_SCREEN_PRIV(pScreen);
@@ -1636,16 +1566,15 @@ DRIGetDrawableIndex(
}
unsigned int
-DRIGetDrawableStamp(
- ScreenPtr pScreen,
- CARD32 drawable_index)
+DRIGetDrawableStamp(ScreenPtr pScreen, CARD32 drawable_index)
{
DRIScreenPrivPtr pDRIPriv = DRI_SCREEN_PRIV(pScreen);
return pDRIPriv->pSAREA->drawableTable[drawable_index].stamp;
}
-void DRIPrintDrawableLock(ScreenPtr pScreen, char *msg)
+void
+DRIPrintDrawableLock(ScreenPtr pScreen, char *msg)
{
DRIScreenPrivPtr pDRIPriv = DRI_SCREEN_PRIV(pScreen);
@@ -1678,14 +1607,16 @@ DRIUnlock(ScreenPtr pScreen) {
DRM_UNLOCK(pDRIPriv->drmFD, pDRIPriv->pSAREA, pDRIPriv->myContext);
}
-void *DRIGetSAREAPrivate(ScreenPtr pScreen)
+void *
+DRIGetSAREAPrivate(ScreenPtr pScreen)
{
DRIScreenPrivPtr pDRIPriv = DRI_SCREEN_PRIV(pScreen);
if (!pDRIPriv) return 0;
return (void *)(((char*)pDRIPriv->pSAREA)+sizeof(XF86DRISAREARec));
}
-drmContext DRIGetContext(ScreenPtr pScreen)
+drmContext
+DRIGetContext(ScreenPtr pScreen)
{
DRIScreenPrivPtr pDRIPriv = DRI_SCREEN_PRIV(pScreen);
if (!pDRIPriv) return 0;
@@ -1696,7 +1627,18 @@ drmContext DRIGetContext(ScreenPtr pScreen)
* call the lowerlevel functions, and choose whether they will be
* called at every level of recursion (eg in validatetree).
*/
-DRIWrappedFuncsRec *DRIGetWrappedFuncs( ScreenPtr pScreen )
+DRIWrappedFuncsRec *
+DRIGetWrappedFuncs(ScreenPtr pScreen)
{
return &(DRI_SCREEN_PRIV(pScreen)->wrap);
}
+
+void
+DRIQueryVersion(int *majorVersion,
+ int *minorVersion,
+ int *patchVersion)
+{
+ *majorVersion = XF86DRI_MAJOR_VERSION;
+ *minorVersion = XF86DRI_MINOR_VERSION;
+ *patchVersion = XF86DRI_PATCH_VERSION;
+}
diff --git a/xc/programs/Xserver/GL/dri/dri.h b/xc/programs/Xserver/GL/dri/dri.h
index 367351836..443ba5e30 100644
--- a/xc/programs/Xserver/GL/dri/dri.h
+++ b/xc/programs/Xserver/GL/dri/dri.h
@@ -141,143 +141,158 @@ typedef struct {
void* devPrivate;
} DRIInfoRec, *DRIInfoPtr;
-extern Bool DRIScreenInit(
- ScreenPtr pScreen,
- DRIInfoPtr pDRIInfo,
- int* pDRMFD);
-void DRICloseScreen(ScreenPtr pScreen);
-Bool DRIExtensionInit(void);
-void DRIReset(void);
-Bool DRIQueryDirectRenderingCapable( ScreenPtr pScreen, Bool* isCapable);
-Bool DRIOpenConnection(
- ScreenPtr pScreen,
- drmHandlePtr hSAREA,
- char **busIdString
-);
-Bool DRIAuthConnection(ScreenPtr pScreen, drmMagic magic);
-Bool DRICloseConnection( ScreenPtr pScreen);
-Bool DRIGetClientDriverName(
- ScreenPtr pScreen,
- int* ddxDriverMajorVersion,
- int* ddxDriverMinorVersion,
- int* ddxDriverPatchVersion,
- char** clientDriverName
-);
-Bool DRICreateContext(
- ScreenPtr pScreen,
- VisualPtr visual,
- XID context,
- drmContextPtr pHWContext
-);
-Bool DRIDestroyContext( ScreenPtr pScreen, XID context);
-Bool DRIContextPrivDelete(
- pointer pResource,
- XID id);
-Bool DRICreateDrawable(
- ScreenPtr pScreen,
- Drawable id,
- DrawablePtr pDrawable,
- drmDrawablePtr hHWDrawable
-);
-Bool DRIDestroyDrawable( ScreenPtr pScreen,
- Drawable id,
- DrawablePtr pDrawable);
-Bool DRIDrawablePrivDelete(
- pointer pResource,
- XID id);
-Bool DRIGetDrawableInfo(
- ScreenPtr pScreen,
- DrawablePtr pDrawable,
- unsigned int* index,
- unsigned int* stamp,
- int* X,
- int* Y,
- int* W,
- int* H,
- int* numClipRects,
- XF86DRIClipRectPtr* pClipRects,
- int* backX,
- int* backY,
- int* numBackClipRects,
- XF86DRIClipRectPtr* pBackClipRects
-);
-Bool DRIGetDeviceInfo(
- ScreenPtr pScreen,
- drmHandlePtr hFrameBuffer,
- int* fbOrigin,
- int* fbSize,
- int* fbStride,
- int* devPrivateSize,
- void** pDevPrivate
-);
-DRIInfoPtr DRICreateInfoRec(void);
-void DRIDestroyInfoRec(DRIInfoPtr DRIInfo);
-Bool DRIFinishScreenInit(ScreenPtr pScreen);
-
-void DRIWakeupHandler(
- pointer wakeupData,
- int result,
- pointer pReadmask);
-void DRIBlockHandler(
- pointer blockData,
- OSTimePtr pTimeout,
- pointer pReadmask);
-void DRIDoWakeupHandler(
- int screenNum,
- pointer wakeupData,
- unsigned long result,
- pointer pReadmask);
-void DRIDoBlockHandler(
- int screenNum,
- pointer blockData,
- pointer pTimeout,
- pointer pReadmask);
-void DRISwapContext(
- int drmFD,
- void *oldctx,
- void *newctx);
-void* DRIGetContextStore(DRIContextPrivPtr context);
-void DRIPaintWindow(
- WindowPtr pWin,
- RegionPtr prgn,
- int what);
-void DRICopyWindow(
- WindowPtr pWin,
- DDXPointRec ptOldOrg,
- RegionPtr prgnSrc);
-int DRIValidateTree(
- WindowPtr pParent,
- WindowPtr pChild,
- VTKind kind);
-void DRIPostValidateTree(
- WindowPtr pParent,
- WindowPtr pChild,
- VTKind kind);
-void DRIClipNotify(
- WindowPtr pWin,
- int dx,
- int dy);
-CARD32 DRIGetDrawableIndex(
- WindowPtr pWin);
-void DRILock(ScreenPtr pScreen, int flags);
-void DRIUnlock(ScreenPtr pScreen);
-
-DRIWrappedFuncsRec *DRIGetWrappedFuncs( ScreenPtr pScreen );
-
-void *DRIGetSAREAPrivate(ScreenPtr pScreen);
-
-unsigned int DRIGetDrawableStamp(ScreenPtr pScreen, CARD32 drawable_index);
-
-DRIContextPrivPtr
-DRICreateContextPriv(ScreenPtr pScreen,
- drmContextPtr pHWContext,
- DRIContextFlags flags);
-DRIContextPrivPtr
-DRICreateContextPrivFromHandle(ScreenPtr pScreen,
- drmContext hHWContext,
- DRIContextFlags flags);
-Bool DRIDestroyContextPriv(DRIContextPrivPtr pDRIContextPriv);
-drmContext DRIGetContext(ScreenPtr pScreen);
+
+extern Bool DRIScreenInit(ScreenPtr pScreen,
+ DRIInfoPtr pDRIInfo,
+ int *pDRMFD);
+
+extern void DRICloseScreen(ScreenPtr pScreen);
+
+extern Bool DRIExtensionInit(void);
+
+extern void DRIReset(void);
+
+extern Bool DRIQueryDirectRenderingCapable(ScreenPtr pScreen,
+ Bool *isCapable);
+
+extern Bool DRIOpenConnection(ScreenPtr pScreen,
+ drmHandlePtr hSAREA,
+ char **busIdString);
+
+extern Bool DRIAuthConnection(ScreenPtr pScreen, drmMagic magic);
+
+extern Bool DRICloseConnection(ScreenPtr pScreen);
+
+extern Bool DRIGetClientDriverName(ScreenPtr pScreen,
+ int* ddxDriverMajorVersion,
+ int* ddxDriverMinorVersion,
+ int* ddxDriverPatchVersion,
+ char** clientDriverName);
+
+extern Bool DRICreateContext(ScreenPtr pScreen,
+ VisualPtr visual,
+ XID context,
+ drmContextPtr pHWContext);
+
+extern Bool DRIDestroyContext(ScreenPtr pScreen, XID context);
+
+extern Bool DRIContextPrivDelete(pointer pResource, XID id);
+
+extern Bool DRICreateDrawable(ScreenPtr pScreen,
+ Drawable id,
+ DrawablePtr pDrawable,
+ drmDrawablePtr hHWDrawable);
+
+extern Bool DRIDestroyDrawable(ScreenPtr pScreen,
+ Drawable id,
+ DrawablePtr pDrawable);
+
+extern Bool DRIDrawablePrivDelete(pointer pResource,
+ XID id);
+
+extern Bool DRIGetDrawableInfo(ScreenPtr pScreen,
+ DrawablePtr pDrawable,
+ unsigned int* index,
+ unsigned int* stamp,
+ int* X,
+ int* Y,
+ int* W,
+ int* H,
+ int* numClipRects,
+ XF86DRIClipRectPtr* pClipRects,
+ int* backX,
+ int* backY,
+ int* numBackClipRects,
+ XF86DRIClipRectPtr* pBackClipRects);
+
+extern Bool DRIGetDeviceInfo(ScreenPtr pScreen,
+ drmHandlePtr hFrameBuffer,
+ int* fbOrigin,
+ int* fbSize,
+ int* fbStride,
+ int* devPrivateSize,
+ void** pDevPrivate);
+
+extern DRIInfoPtr DRICreateInfoRec(void);
+
+extern void DRIDestroyInfoRec(DRIInfoPtr DRIInfo);
+
+extern Bool DRIFinishScreenInit(ScreenPtr pScreen);
+
+extern void DRIWakeupHandler(pointer wakeupData,
+ int result,
+ pointer pReadmask);
+
+extern void DRIBlockHandler(pointer blockData,
+ OSTimePtr pTimeout,
+ pointer pReadmask);
+
+extern void DRIDoWakeupHandler(int screenNum,
+ pointer wakeupData,
+ unsigned long result,
+ pointer pReadmask);
+
+extern void DRIDoBlockHandler(int screenNum,
+ pointer blockData,
+ pointer pTimeout,
+ pointer pReadmask);
+
+extern void DRISwapContext(int drmFD,
+ void *oldctx,
+ void *newctx);
+
+extern void *DRIGetContextStore(DRIContextPrivPtr context);
+
+extern void DRIPaintWindow(WindowPtr pWin,
+ RegionPtr prgn,
+ int what);
+
+extern void DRICopyWindow(WindowPtr pWin,
+ DDXPointRec ptOldOrg,
+ RegionPtr prgnSrc);
+
+extern int DRIValidateTree(WindowPtr pParent,
+ WindowPtr pChild,
+ VTKind kind);
+
+extern void DRIPostValidateTree(WindowPtr pParent,
+ WindowPtr pChild,
+ VTKind kind);
+
+extern void DRIClipNotify(WindowPtr pWin,
+ int dx,
+ int dy);
+
+extern CARD32 DRIGetDrawableIndex(WindowPtr pWin);
+
+extern void DRIPrintDrawableLock(ScreenPtr pScreen, char *msg);
+
+extern void DRILock(ScreenPtr pScreen, int flags);
+
+extern void DRIUnlock(ScreenPtr pScreen);
+
+extern DRIWrappedFuncsRec *DRIGetWrappedFuncs(ScreenPtr pScreen);
+
+extern void *DRIGetSAREAPrivate(ScreenPtr pScreen);
+
+extern unsigned int DRIGetDrawableStamp(ScreenPtr pScreen,
+ CARD32 drawable_index);
+
+extern DRIContextPrivPtr DRICreateContextPriv(ScreenPtr pScreen,
+ drmContextPtr pHWContext,
+ DRIContextFlags flags);
+
+extern DRIContextPrivPtr DRICreateContextPrivFromHandle(ScreenPtr pScreen,
+ drmContext hHWContext,
+ DRIContextFlags flags);
+
+extern Bool DRIDestroyContextPriv(DRIContextPrivPtr pDRIContextPriv);
+
+extern drmContext DRIGetContext(ScreenPtr pScreen);
+
+extern void DRIQueryVersion(int *majorVersion,
+ int *minorVersion,
+ int *patchVersion);
#define _DRI_H_
diff --git a/xc/programs/Xserver/GL/dri/xf86dri.c b/xc/programs/Xserver/GL/dri/xf86dri.c
index 2619fba87..f6a637d7c 100644
--- a/xc/programs/Xserver/GL/dri/xf86dri.c
+++ b/xc/programs/Xserver/GL/dri/xf86dri.c
@@ -210,12 +210,21 @@ ProcXF86DRIAuthConnection(
register ClientPtr client
)
{
+ xXF86DRIAuthConnectionReply rep;
+
REQUEST(xXF86DRIAuthConnectionReq);
REQUEST_SIZE_MATCH(xXF86DRIAuthConnectionReq);
- if (!DRIAuthConnection( screenInfo.screens[stuff->screen], stuff->magic))
- ErrorF("Failed to authenticate %u\n", stuff->magic);
+ rep.type = X_Reply;
+ rep.length = 0;
+ rep.sequenceNumber = client->sequence;
+ rep.authenticated = 1;
+ if (!DRIAuthConnection( screenInfo.screens[stuff->screen], stuff->magic)) {
+ ErrorF("Failed to authenticate %u\n", stuff->magic);
+ rep.authenticated = 0;
+ }
+ WriteToClient(client, sizeof(xXF86DRIAuthConnectionReply), (char *)&rep);
return (client->noClientException);
}
diff --git a/xc/programs/Xserver/GL/glx/glxscreens.c b/xc/programs/Xserver/GL/glx/glxscreens.c
index d10696847..9e4a3c91c 100644
--- a/xc/programs/Xserver/GL/glx/glxscreens.c
+++ b/xc/programs/Xserver/GL/glx/glxscreens.c
@@ -246,9 +246,14 @@ void __glXScreenInit(GLint numscreens)
if ((*__glXScreens[j]->screenProbe)(i)) {
__glXActiveScreens[i] = *__glXScreens[j];
+#if 0
+ /* we don't use this since matchVisuals doesn't allow alpha */
__glXActiveScreens[i].numUsableVisuals =
matchVisuals(__glXActiveScreens[i].pGlxVisual,
__glXActiveScreens[i].numVisuals, i);
+#else
+ __glXActiveScreens[i].numUsableVisuals = __glXActiveScreens[i].numVisuals;
+#endif
__glXActiveScreens[i].GLXvendor = __glXStrdup(GLXServerVendorName);
__glXActiveScreens[i].GLXversion = __glXStrdup(GLXServerVersion);
__glXActiveScreens[i].GLXextensions = __glXStrdup(GLXServerExtensions);
diff --git a/xc/programs/Xserver/GL/mesa/src/X/xf86glx.c b/xc/programs/Xserver/GL/mesa/src/X/xf86glx.c
index effcf9921..656c7af5a 100644
--- a/xc/programs/Xserver/GL/mesa/src/X/xf86glx.c
+++ b/xc/programs/Xserver/GL/mesa/src/X/xf86glx.c
@@ -94,12 +94,12 @@ __GLXextensionInfo __glDDXExtensionInfo = {
__MESA_setVisualConfigs
};
-__MESA_screen MESAScreens[MAXSCREENS];
-__GLcontext *MESA_CC = NULL;
+static __MESA_screen MESAScreens[MAXSCREENS];
+static __GLcontext *MESA_CC = NULL;
-int numConfigs = 0;
-__GLXvisualConfig *visualConfigs = NULL;
-void **visualPrivates = NULL;
+static int numConfigs = 0;
+static __GLXvisualConfig *visualConfigs = NULL;
+static void **visualPrivates = NULL;
static int count_bits(unsigned int n)
@@ -357,11 +357,11 @@ static Bool init_visuals(int *nvisualp, VisualPtr *visualp,
glXVisualPtr[j].redSize = count_bits(pVisual[i].redMask);
glXVisualPtr[j].greenSize = count_bits(pVisual[i].greenMask);
glXVisualPtr[j].blueSize = count_bits(pVisual[i].blueMask);
- glXVisualPtr[j].alphaSize = count_bits(glXVisualPtr[i].alphaMask);
+ glXVisualPtr[j].alphaSize = glXVisualPtr[j].alphaSize;
glXVisualPtr[j].redMask = pVisual[i].redMask;
glXVisualPtr[j].greenMask = pVisual[i].greenMask;
glXVisualPtr[j].blueMask = pVisual[i].blueMask;
- /*glXVisualPtr[j].alphaMask = 0; Not supported in Mesa */
+ glXVisualPtr[j].alphaMask = glXVisualPtr[j].alphaMask;
glXVisualPtr[j].bufferSize = rootDepth;
}
diff --git a/xc/programs/Xserver/Imakefile b/xc/programs/Xserver/Imakefile
index 0305b16ce..cf9770537 100644
--- a/xc/programs/Xserver/Imakefile
+++ b/xc/programs/Xserver/Imakefile
@@ -634,7 +634,8 @@ XF86SERVERSYSLIBS = $(FONTLIBS) $(SYSLIBS) $(LIBDL) $(LIBREGEX)
#endif
XF86SERVEROBJS = $(XF86DRVOBJS) $(XF86IDRVOBJS)
XF86SERVERLIBS = $(XF86DRVLIBS) $(XF86IDRVLIBS) $(XF86LIBS) $(XF86LOADERLIB) \
- $(XF86COMLIB) $(XF86MAINLIBS) $(XF86SCANLIB) $(XF86OSLIB)
+ $(XF86COMLIB) $(XF86MAINLIBS) $(XF86SCANLIB) $(XF86OSLIB) \
+ $(XF86DDCLIB)
#if HasParallelMake
MakeMutex($(XF86SERVERSUBDIRS) $(XF86SERVERLIBS) $(XF86SERVERSYSLIBS))
#endif
diff --git a/xc/programs/Xserver/hw/xfree86/drivers/glint/glint.h b/xc/programs/Xserver/hw/xfree86/drivers/glint/glint.h
index 7890fdcde..9ef168854 100644
--- a/xc/programs/Xserver/hw/xfree86/drivers/glint/glint.h
+++ b/xc/programs/Xserver/hw/xfree86/drivers/glint/glint.h
@@ -45,6 +45,13 @@
#include "glint_dripriv.h"
#endif
+#define GLINT_VERSION 4000
+#define GLINT_NAME "GLINT"
+#define GLINT_DRIVER_NAME "glint"
+#define GLINT_MAJOR_VERSION 1
+#define GLINT_MINOR_VERSION 0
+#define GLINT_PATCHLEVEL 0
+
#define GLINT_MAX_MX_DEVICES 2
#define GLINT_VGA_MMIO_OFF 0x6000
@@ -192,17 +199,20 @@ Bool Permedia2HWCursorInit(ScreenPtr pScreen);
void PermediaRestore(ScrnInfoPtr pScrn, GLINTRegPtr glintReg);
void PermediaSave(ScrnInfoPtr pScrn, GLINTRegPtr glintReg);
Bool PermediaInit(ScrnInfoPtr pScrn, DisplayModePtr mode);
+void PermediaInitializeEngine(ScrnInfoPtr pScrn);
Bool PermediaAccelInit(ScreenPtr pScreen);
void Permedia2VRestore(ScrnInfoPtr pScrn, GLINTRegPtr glintReg);
void Permedia2VSave(ScrnInfoPtr pScrn, GLINTRegPtr glintReg);
Bool Permedia2VInit(ScrnInfoPtr pScrn, DisplayModePtr mode);
Bool Permedia2vHWCursorInit(ScreenPtr pScreen);
+void TXInitializeEngine(ScrnInfoPtr pScrn);
void TXRestore(ScrnInfoPtr pScrn, GLINTRegPtr glintReg);
void TXSave(ScrnInfoPtr pScrn, GLINTRegPtr glintReg);
Bool TXInit(ScrnInfoPtr pScrn, DisplayModePtr mode);
Bool TXAccelInit(ScreenPtr pScreen);
+void DualMXInitializeEngine(ScrnInfoPtr pScrn);
void DualMXRestore(ScrnInfoPtr pScrn, GLINTRegPtr glintReg);
void DualMXSave(ScrnInfoPtr pScrn, GLINTRegPtr glintReg);
Bool DualMXInit(ScrnInfoPtr pScrn, DisplayModePtr mode);
diff --git a/xc/programs/Xserver/hw/xfree86/drivers/glint/glint_dri.c b/xc/programs/Xserver/hw/xfree86/drivers/glint/glint_dri.c
index c6c0d1e22..9aa55de42 100644
--- a/xc/programs/Xserver/hw/xfree86/drivers/glint/glint_dri.c
+++ b/xc/programs/Xserver/hw/xfree86/drivers/glint/glint_dri.c
@@ -346,6 +346,18 @@ GLINTDRIScreenInit(ScreenPtr pScreen)
if (!LoaderSymbol("drmAvailable")) return FALSE;
#endif
+ /* Check the DRI version */
+ {
+ int major, minor, patch;
+ DRIQueryVersion(&major, &minor, &patch);
+ if (major != 3 || minor != 0 || patch < 0) {
+ xf86DrvMsg(pScreen->myNum, X_ERROR,
+ "GLINTDRIScreenInit failed (DRI version = %d.%d.%d, expected 3.0.x). Disabling DRI.\n",
+ major, minor, patch);
+ return FALSE;
+ }
+ }
+
if (pGlint->Chipset != PCI_VENDOR_3DLABS_CHIP_GAMMA) return FALSE;
if (pGlint->numMXDevices > 2) return FALSE;
@@ -364,9 +376,9 @@ GLINTDRIScreenInit(ScreenPtr pScreen)
((pciConfigPtr)pGlint->PciInfo->thisCard)->busnum,
((pciConfigPtr)pGlint->PciInfo->thisCard)->devnum,
((pciConfigPtr)pGlint->PciInfo->thisCard)->funcnum);
- pDRIInfo->ddxDriverMajorVersion = 0;
- pDRIInfo->ddxDriverMinorVersion = 1;
- pDRIInfo->ddxDriverPatchVersion = 0;
+ pDRIInfo->ddxDriverMajorVersion = GLINT_MAJOR_VERSION;
+ pDRIInfo->ddxDriverMinorVersion = GLINT_MINOR_VERSION;
+ pDRIInfo->ddxDriverPatchVersion = GLINT_PATCHLEVEL;
pDRIInfo->frameBufferPhysicalAddress = pGlint->FbAddress;
pDRIInfo->frameBufferSize = pGlint->FbMapSize;
pDRIInfo->frameBufferStride =
@@ -418,6 +430,27 @@ GLINTDRIScreenInit(ScreenPtr pScreen)
return FALSE;
}
+ /* Check the MGA DRM version */
+ {
+ drmVersionPtr version = drmGetVersion(pGlint->drmSubFD);
+ if (version) {
+ if (version->version_major != 1 ||
+ version->version_minor != 0 ||
+ version->version_patchlevel < 0) {
+ /* incompatible drm version */
+ xf86DrvMsg(pScreen->myNum, X_ERROR,
+ "GLINTDRIScreenInit failed (DRM version = %d.%d.%d, expected 1.0.x). Disabling DRI.\n",
+ version->version_major,
+ version->version_minor,
+ version->version_patchlevel);
+ GLINTDRICloseScreen(pScreen);
+ drmFreeVersion(version);
+ return FALSE;
+ }
+ drmFreeVersion(version);
+ }
+ }
+
/* Tell the client driver how many MX's we have */
pGlintDRI->numMXDevices = pGlint->numMXDevices;
/* Tell the client about our screen size setup */
@@ -713,9 +746,9 @@ GLINTDRISwapContext(
ScreenPtr pScreen,
DRISyncType syncType,
DRIContextType readContextType,
- void* readContextStore,
+ void *readContextStore,
DRIContextType writeContextType,
- void* writeContextStore)
+ void *writeContextStore)
{
ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum];
GLINTPtr pGlint = GLINTPTR(pScrn);
diff --git a/xc/programs/Xserver/hw/xfree86/drivers/glint/glint_driver.c b/xc/programs/Xserver/hw/xfree86/drivers/glint/glint_driver.c
index fabb44ef9..f0b316729 100644
--- a/xc/programs/Xserver/hw/xfree86/drivers/glint/glint_driver.c
+++ b/xc/programs/Xserver/hw/xfree86/drivers/glint/glint_driver.c
@@ -123,13 +123,6 @@ static Bool GLINTModeInit(ScrnInfoPtr pScrn, DisplayModePtr mode);
static int pix24bpp = 0;
static Bool FBDevProbed = FALSE;
-#define VERSION 4000
-#define GLINT_NAME "GLINT"
-#define GLINT_DRIVER_NAME "glint"
-#define GLINT_MAJOR_VERSION 1
-#define GLINT_MINOR_VERSION 0
-#define GLINT_PATCHLEVEL 0
-
/*
* This contains the functions needed by the server after loading the driver
* module. It must be supplied, and gets passed back by the SetupProc
@@ -139,7 +132,7 @@ static Bool FBDevProbed = FALSE;
*/
DriverRec GLINT = {
- VERSION,
+ GLINT_VERSION,
GLINT_DRIVER_NAME,
#if 0
"accelerated driver for 3dlabs and derived chipsets",
@@ -704,7 +697,7 @@ GLINTProbe(DriverPtr drv, int flags)
NULL,NULL,NULL,NULL);
}
/* Fill in what we can of the ScrnInfoRec */
- pScrn->driverVersion = VERSION;
+ pScrn->driverVersion = GLINT_VERSION;
pScrn->driverName = GLINT_DRIVER_NAME;
pScrn->name = GLINT_NAME;
pScrn->Probe = GLINTProbe;
@@ -807,7 +800,7 @@ GLINTProbe(DriverPtr drv, int flags)
}
}
/* Fill in what we can of the ScrnInfoRec */
- pScrn->driverVersion = VERSION;
+ pScrn->driverVersion = GLINT_VERSION;
pScrn->driverName = GLINT_DRIVER_NAME;
pScrn->name = GLINT_NAME;
pScrn->Probe = GLINTProbe;
diff --git a/xc/programs/Xserver/hw/xfree86/drivers/i810/i810.h b/xc/programs/Xserver/hw/xfree86/drivers/i810/i810.h
index 58a17ad74..030b66a91 100644
--- a/xc/programs/Xserver/hw/xfree86/drivers/i810/i810.h
+++ b/xc/programs/Xserver/hw/xfree86/drivers/i810/i810.h
@@ -54,6 +54,14 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#endif
+#define I810_VERSION 4000
+#define I810_NAME "I810"
+#define I810_DRIVER_NAME "i810"
+#define I810_MAJOR_VERSION 1
+#define I810_MINOR_VERSION 0
+#define I810_PATCHLEVEL 0
+
+
/* Globals */
typedef struct _I810Rec *I810Ptr;
diff --git a/xc/programs/Xserver/hw/xfree86/drivers/i810/i810_dri.c b/xc/programs/Xserver/hw/xfree86/drivers/i810/i810_dri.c
index 591207b65..e2c48f68f 100644
--- a/xc/programs/Xserver/hw/xfree86/drivers/i810/i810_dri.c
+++ b/xc/programs/Xserver/hw/xfree86/drivers/i810/i810_dri.c
@@ -64,7 +64,8 @@ Bool I810CleanupDma(ScrnInfoPtr pScrn)
Bool ret_val;
ret_val = drmI810CleanupDma(pI810->drmSubFD);
- if(ret_val == FALSE) ErrorF("I810 Dma Cleanup Failed\n");
+ if (ret_val == FALSE)
+ xf86DrvMsg(pScrn->scrnIndex, X_ERROR, "I810 Dma Cleanup Failed\n");
return ret_val;
}
@@ -104,6 +105,7 @@ I810InitVisualConfigs(ScreenPtr pScreen)
__GLXvisualConfig *pConfigs = 0;
I810ConfigPrivPtr pI810Configs = 0;
I810ConfigPrivPtr *pI810ConfigPtrs = 0;
+ int accum, stencil, db, depth;
int i;
switch (pScrn->bitsPerPixel) {
@@ -112,25 +114,20 @@ I810InitVisualConfigs(ScreenPtr pScreen)
case 32:
break;
case 16:
- numConfigs = 4;
+ numConfigs = 8;
- if (!(pConfigs = (__GLXvisualConfig*)xnfcalloc(sizeof(__GLXvisualConfig),
- numConfigs))) {
+ pConfigs = (__GLXvisualConfig *) xnfcalloc(sizeof(__GLXvisualConfig), numConfigs);
+ if (!pConfigs)
return FALSE;
- }
- if (!(pI810Configs =
- (I810ConfigPrivPtr)xnfcalloc(sizeof(I810ConfigPrivRec),
- numConfigs)))
- {
+ pI810Configs = (I810ConfigPrivPtr) xnfcalloc(sizeof(I810ConfigPrivRec), numConfigs);
+ if (!pI810Configs) {
xfree(pConfigs);
return FALSE;
}
- if (!(pI810ConfigPtrs =
- (I810ConfigPrivPtr*)xnfcalloc(sizeof(I810ConfigPrivPtr),
- numConfigs)))
- {
+ pI810ConfigPtrs = (I810ConfigPrivPtr *) xnfcalloc(sizeof(I810ConfigPrivPtr), numConfigs);
+ if (!pI810ConfigPtrs) {
xfree(pConfigs);
xfree(pI810Configs);
return FALSE;
@@ -139,126 +136,61 @@ I810InitVisualConfigs(ScreenPtr pScreen)
for (i=0; i<numConfigs; i++)
pI810ConfigPtrs[i] = &pI810Configs[i];
- /* config 0: db=FALSE, depth=0
- config 1: db=FALSE, depth=16
- config 2: db=TRUE, depth=0;
- config 3: db=TRUE, depth=16
- */
- pConfigs[0].vid = -1;
- pConfigs[0].class = -1;
- pConfigs[0].rgba = TRUE;
- pConfigs[0].redSize = 5;
- pConfigs[0].greenSize = 6;
- pConfigs[0].blueSize = 5;
- pConfigs[0].redMask = 0x0000F800;
- pConfigs[0].greenMask = 0x000007E0;
- pConfigs[0].blueMask = 0x0000001F;
- pConfigs[0].alphaMask = 0;
- pConfigs[0].accumRedSize = 0;
- pConfigs[0].accumGreenSize = 0;
- pConfigs[0].accumBlueSize = 0;
- pConfigs[0].accumAlphaSize = 0;
- pConfigs[0].doubleBuffer = FALSE;
- pConfigs[0].stereo = FALSE;
- pConfigs[0].bufferSize = 16;
- pConfigs[0].depthSize = 16;
- pConfigs[0].stencilSize = 0;
- pConfigs[0].auxBuffers = 0;
- pConfigs[0].level = 0;
- pConfigs[0].visualRating = 0;
- pConfigs[0].transparentPixel = 0;
- pConfigs[0].transparentRed = 0;
- pConfigs[0].transparentGreen = 0;
- pConfigs[0].transparentBlue = 0;
- pConfigs[0].transparentAlpha = 0;
- pConfigs[0].transparentIndex = 0;
-
- pConfigs[1].vid = -1;
- pConfigs[1].class = -1;
- pConfigs[1].rgba = TRUE;
- pConfigs[1].redSize = 5;
- pConfigs[1].greenSize = 6;
- pConfigs[1].blueSize = 5;
- pConfigs[1].redMask = 0x0000F800;
- pConfigs[1].greenMask = 0x000007E0;
- pConfigs[1].blueMask = 0x0000001F;
- pConfigs[1].alphaMask = 0;
- pConfigs[1].accumRedSize = 0;
- pConfigs[1].accumGreenSize = 0;
- pConfigs[1].accumBlueSize = 0;
- pConfigs[1].accumAlphaSize = 0;
- pConfigs[1].doubleBuffer = FALSE;
- pConfigs[1].stereo = FALSE;
- pConfigs[1].bufferSize = 16;
- pConfigs[1].depthSize = 16;
- pConfigs[1].stencilSize = 0;
- pConfigs[1].auxBuffers = 0;
- pConfigs[1].level = 0;
- pConfigs[1].visualRating = 0;
- pConfigs[1].transparentPixel = 0;
- pConfigs[1].transparentRed = 0;
- pConfigs[1].transparentGreen = 0;
- pConfigs[1].transparentBlue = 0;
- pConfigs[1].transparentAlpha = 0;
- pConfigs[1].transparentIndex = 0;
-
- pConfigs[2].vid = -1;
- pConfigs[2].class = -1;
- pConfigs[2].rgba = TRUE;
- pConfigs[2].redSize = 5;
- pConfigs[2].greenSize = 6;
- pConfigs[2].blueSize = 5;
- pConfigs[2].redMask = 0x0000F800;
- pConfigs[2].greenMask = 0x000007E0;
- pConfigs[2].blueMask = 0x0000001F;
- pConfigs[2].alphaMask = 0;
- pConfigs[2].accumRedSize = 0;
- pConfigs[2].accumGreenSize = 0;
- pConfigs[2].accumBlueSize = 0;
- pConfigs[2].accumAlphaSize = 0;
- pConfigs[2].doubleBuffer = TRUE;
- pConfigs[2].stereo = FALSE;
- pConfigs[2].bufferSize = 16;
- pConfigs[2].depthSize = 16;
- pConfigs[2].stencilSize = 0;
- pConfigs[2].auxBuffers = 0;
- pConfigs[2].level = 0;
- pConfigs[2].visualRating = 0;
- pConfigs[2].transparentPixel = 0;
- pConfigs[2].transparentRed = 0;
- pConfigs[2].transparentGreen = 0;
- pConfigs[2].transparentBlue = 0;
- pConfigs[2].transparentAlpha = 0;
- pConfigs[2].transparentIndex = 0;
-
- pConfigs[3].vid = -1;
- pConfigs[3].class = -1;
- pConfigs[3].rgba = TRUE;
- pConfigs[3].redSize = 5;
- pConfigs[3].greenSize = 6;
- pConfigs[3].blueSize = 5;
- pConfigs[3].redMask = 0x0000F800;
- pConfigs[3].greenMask = 0x000007E0;
- pConfigs[3].blueMask = 0x0000001F;
- pConfigs[3].alphaMask = 0;
- pConfigs[3].accumRedSize = 0;
- pConfigs[3].accumGreenSize = 0;
- pConfigs[3].accumBlueSize = 0;
- pConfigs[3].accumAlphaSize = 0;
- pConfigs[3].doubleBuffer = TRUE;
- pConfigs[3].stereo = FALSE;
- pConfigs[3].bufferSize = 16;
- pConfigs[3].depthSize = 16;
- pConfigs[3].stencilSize = 0;
- pConfigs[3].auxBuffers = 0;
- pConfigs[3].level = 0;
- pConfigs[3].visualRating = 0;
- pConfigs[3].transparentPixel = 0;
- pConfigs[3].transparentRed = 0;
- pConfigs[3].transparentGreen = 0;
- pConfigs[3].transparentBlue = 0;
- pConfigs[3].transparentAlpha = 0;
- pConfigs[3].transparentIndex = 0;
+ i = 0;
+ depth = 1;
+ for (accum = 0; accum <= 1; accum++) {
+ for (stencil = 0; stencil <= 1; stencil++) {
+ for (db = 0; db <= 1; db++) {
+ pConfigs[i].vid = -1;
+ pConfigs[i].class = -1;
+ pConfigs[i].rgba = TRUE;
+ pConfigs[i].redSize = 5;
+ pConfigs[i].greenSize = 6;
+ pConfigs[i].blueSize = 5;
+ pConfigs[i].redMask = 0x0000F800;
+ pConfigs[i].greenMask = 0x000007E0;
+ pConfigs[i].blueMask = 0x0000001F;
+ pConfigs[i].alphaMask = 0;
+ if (accum) {
+ pConfigs[i].accumRedSize = 16;
+ pConfigs[i].accumGreenSize = 16;
+ pConfigs[i].accumBlueSize = 16;
+ pConfigs[i].accumAlphaSize = 16;
+ }
+ else {
+ pConfigs[i].accumRedSize = 0;
+ pConfigs[i].accumGreenSize = 0;
+ pConfigs[i].accumBlueSize = 0;
+ pConfigs[i].accumAlphaSize = 0;
+ }
+ pConfigs[i].doubleBuffer = db ? TRUE : FALSE;
+ pConfigs[i].stereo = FALSE;
+ pConfigs[i].bufferSize = 16;
+ if (depth)
+ pConfigs[i].depthSize = 16;
+ else
+ pConfigs[i].depthSize = 0;
+ if (stencil)
+ pConfigs[i].stencilSize = 8;
+ else
+ pConfigs[i].stencilSize = 0;
+ pConfigs[i].auxBuffers = 0;
+ pConfigs[i].level = 0;
+ if (stencil)
+ pConfigs[i].visualRating = GLX_SLOW_VISUAL_EXT;
+ else
+ pConfigs[i].visualRating = GLX_NONE_EXT;
+ pConfigs[i].transparentPixel = 0;
+ pConfigs[i].transparentRed = 0;
+ pConfigs[i].transparentGreen = 0;
+ pConfigs[i].transparentBlue = 0;
+ pConfigs[i].transparentAlpha = 0;
+ pConfigs[i].transparentIndex = 0;
+ i++;
+ }
+ }
+ }
+ assert(i == numConfigs);
break;
}
pI810->numVisualConfigs = numConfigs;
@@ -301,9 +233,21 @@ Bool I810DRIScreenInit(ScreenPtr pScreen)
if (!LoaderSymbol("drmAvailable")) return FALSE;
#endif
+ /* Check the DRI version */
+ {
+ int major, minor, patch;
+ DRIQueryVersion(&major, &minor, &patch);
+ if (major != 3 || minor != 0 || patch < 0) {
+ xf86DrvMsg(pScreen->myNum, X_ERROR,
+ "I810DRIScreenInit failed (DRI version = %d.%d.%d, expected 3.0.x). Disabling DRI.\n",
+ major, minor, patch);
+ return FALSE;
+ }
+ }
+
pDRIInfo = DRICreateInfoRec();
if (!pDRIInfo) {
- ErrorF("DRICreateInfoRec failed\n");
+ xf86DrvMsg(pScreen->myNum, X_ERROR, "DRICreateInfoRec failed\n");
return FALSE;
}
@@ -322,10 +266,9 @@ Bool I810DRIScreenInit(ScreenPtr pScreen)
((pciConfigPtr)pI810->PciInfo->thisCard)->busnum,
((pciConfigPtr)pI810->PciInfo->thisCard)->devnum,
((pciConfigPtr)pI810->PciInfo->thisCard)->funcnum);
-
- pDRIInfo->ddxDriverMajorVersion = 0;
- pDRIInfo->ddxDriverMinorVersion = 1;
- pDRIInfo->ddxDriverPatchVersion = 0;
+ pDRIInfo->ddxDriverMajorVersion = I810_MAJOR_VERSION;
+ pDRIInfo->ddxDriverMinorVersion = I810_MINOR_VERSION;
+ pDRIInfo->ddxDriverPatchVersion = I810_PATCHLEVEL;
pDRIInfo->frameBufferPhysicalAddress = pI810->LinearAddr;
pDRIInfo->frameBufferSize = (((pScrn->displayWidth *
pScrn->virtualY * pI810->cpp) +
@@ -343,7 +286,7 @@ Bool I810DRIScreenInit(ScreenPtr pScreen)
* in the SAREA header
*/
if (sizeof(XF86DRISAREARec)+sizeof(I810SAREARec)>SAREA_MAX) {
- ErrorF("Data does not fit in SAREA\n");
+ xf86DrvMsg(pScreen->myNum, X_ERROR, "Data does not fit in SAREA\n");
return FALSE;
}
pDRIInfo->SAREASize = SAREA_MAX;
@@ -369,7 +312,7 @@ Bool I810DRIScreenInit(ScreenPtr pScreen)
* to allocate it. Scary stuff, hold on...
*/
if (!DRIScreenInit(pScreen, pDRIInfo, &pI810->drmSubFD)) {
- ErrorF("DRIScreenInit failed\n");
+ xf86DrvMsg(pScreen->myNum, X_ERROR, "DRIScreenInit failed\n");
xfree(pDRIInfo->devPrivate);
pDRIInfo->devPrivate=0;
DRIDestroyInfoRec(pI810->pDRIInfo);
@@ -377,10 +320,31 @@ Bool I810DRIScreenInit(ScreenPtr pScreen)
return FALSE;
}
+ /* Check the i810 DRM version */
+ {
+ drmVersionPtr version = drmGetVersion(pI810->drmSubFD);
+ if (version) {
+ if (version->version_major != 1 ||
+ version->version_minor != 0 ||
+ version->version_patchlevel < 0) {
+ /* incompatible drm version */
+ xf86DrvMsg(pScreen->myNum, X_ERROR,
+ "I810DRIScreenInit failed (DRM version = %d.%d.%d, expected 1.0.x). Disabling DRI.\n",
+ version->version_major,
+ version->version_minor,
+ version->version_patchlevel);
+ I810DRICloseScreen(pScreen);
+ drmFreeVersion(version);
+ return FALSE;
+ }
+ drmFreeVersion(version);
+ }
+ }
+
pI810DRI->regsSize=I810_REG_SIZE;
if (drmAddMap(pI810->drmSubFD, (drmHandle)pI810->MMIOAddr,
pI810DRI->regsSize, DRM_REGISTERS, 0, &pI810DRI->regs)<0) {
- ErrorF("drmAddMap(regs) failed\n");
+ xf86DrvMsg(pScreen->myNum, X_ERROR, "drmAddMap(regs) failed\n");
DRICloseScreen(pScreen);
return FALSE;
}
@@ -397,14 +361,14 @@ Bool I810DRIScreenInit(ScreenPtr pScreen)
/* Agp Support - Need this just to get the framebuffer.
*/
if(drmAgpAcquire(pI810->drmSubFD) < 0) {
- ErrorF("drmAgpAquire failed\n");
+ xf86DrvMsg(pScreen->myNum, X_ERROR, "drmAgpAquire failed\n");
DRICloseScreen(pScreen);
return FALSE;
}
pI810->agpAcquired = TRUE;
if (drmAgpEnable(pI810->drmSubFD, 0) < 0) {
- ErrorF("drmAgpEnable failed\n");
+ xf86DrvMsg(pScreen->myNum, X_ERROR, "drmAgpEnable failed\n");
DRICloseScreen(pScreen);
return FALSE;
}
@@ -420,7 +384,7 @@ Bool I810DRIScreenInit(ScreenPtr pScreen)
drmAgpAlloc(pI810->drmSubFD, 4096 * 1024, 1, NULL, &dcacheHandle);
pI810->dcacheHandle = dcacheHandle;
-
+ xf86DrvMsg(pScreen->myNum, X_INFO, "dcacheHandle : %p\n", dcacheHandle);
#define Elements(x) sizeof(x)/sizeof(*x)
for (pitch_idx = 0 ; pitch_idx < Elements(i810_pitches) ; pitch_idx++)
@@ -432,22 +396,25 @@ Bool I810DRIScreenInit(ScreenPtr pScreen)
"Couldn't find depth/back buffer pitch");
DRICloseScreen(pScreen);
return FALSE;
- } else {
+ }
+ else {
back_size = i810_pitches[pitch_idx] * (pScrn->virtualY + 4);
back_size = ((back_size + 4096 - 1) / 4096) * 4096;
}
sysmem_size = pScrn->videoRam * 1024;
- if(dcacheHandle != 0) {
- if(back_size > 4*1024*1024) {
- ErrorF("Backsize is larger then 4 meg\n");
+ if (dcacheHandle != 0) {
+ if (back_size > 4*1024*1024) {
+ xf86DrvMsg(pScreen->myNum, X_INFO, "Backsize is larger then 4 meg\n");
sysmem_size = sysmem_size - 2*back_size;
drmAgpFree(pI810->drmSubFD, dcacheHandle);
pI810->dcacheHandle = dcacheHandle = 0;
- } else {
+ }
+ else {
sysmem_size = sysmem_size - back_size;
}
- } else {
+ }
+ else {
sysmem_size = sysmem_size - 2*back_size;
}
@@ -499,7 +466,7 @@ Bool I810DRIScreenInit(ScreenPtr pScreen)
drmAgpAlloc(pI810->drmSubFD, back_size, 0, NULL, &agpHandle);
pI810->backHandle = agpHandle;
- if(agpHandle != 0) {
+ if (agpHandle != 0) {
/* The backbuffer is always aligned to the 56 mb mark in the aperture */
if(drmAgpBind(pI810->drmSubFD, agpHandle, 56*1024*1024) == 0) {
xf86DrvMsg(pScrn->scrnIndex, X_INFO,
@@ -552,15 +519,15 @@ Bool I810DRIScreenInit(ScreenPtr pScreen)
* regular framebuffer as well as texture memory.
*/
drmAgpAlloc(pI810->drmSubFD, sysmem_size, 0, NULL, &agpHandle);
- if(agpHandle == 0) {
- ErrorF("drmAgpAlloc failed\n");
+ if (agpHandle == 0) {
+ xf86DrvMsg(pScreen->myNum, X_ERROR, "drmAgpAlloc failed\n");
DRICloseScreen(pScreen);
return FALSE;
}
pI810->sysmemHandle = agpHandle;
- if(drmAgpBind(pI810->drmSubFD, agpHandle, 0) != 0) {
- ErrorF("drmAgpBind failed\n");
+ if (drmAgpBind(pI810->drmSubFD, agpHandle, 0) != 0) {
+ xf86DrvMsg(pScreen->myNum, X_ERROR, "drmAgpBind failed\n");
DRICloseScreen(pScreen);
return FALSE;
}
@@ -572,16 +539,18 @@ Bool I810DRIScreenInit(ScreenPtr pScreen)
if (agpHandle != 0) {
tom = sysmem_size;
- if(drmAgpBind(pI810->drmSubFD, agpHandle, tom) == 0) {
+ if (drmAgpBind(pI810->drmSubFD, agpHandle, tom) == 0) {
xf86DrvMsg(pScrn->scrnIndex, X_INFO,
"GART: Allocated 4K for mouse cursor image\n");
pI810->CursorStart = tom;
tom += 4096;
- } else {
+ }
+ else {
xf86DrvMsg(pScrn->scrnIndex, X_INFO, "GART: cursor bind failed\n");
pI810->CursorPhysical = 0;
}
- } else {
+ }
+ else {
xf86DrvMsg(pScrn->scrnIndex, X_INFO, "GART: cursor alloc failed\n");
pI810->CursorPhysical = 0;
}
@@ -604,7 +573,7 @@ Bool I810DRIScreenInit(ScreenPtr pScreen)
if (drmAddMap(pI810->drmSubFD, (drmHandle)pI810->BackBuffer.Start,
pI810->BackBuffer.Size, DRM_AGP, 0,
&pI810DRI->backbuffer) < 0) {
- ErrorF("drmAddMap(backbuffer) failed\n");
+ xf86DrvMsg(pScreen->myNum, X_ERROR, "drmAddMap(backbuffer) failed\n");
DRICloseScreen(pScreen);
return FALSE;
}
@@ -613,7 +582,7 @@ Bool I810DRIScreenInit(ScreenPtr pScreen)
if (drmAddMap(pI810->drmSubFD, (drmHandle)pI810->DepthBuffer.Start,
pI810->DepthBuffer.Size, DRM_AGP, 0,
&pI810DRI->depthbuffer) < 0) {
- ErrorF("drmAddMap(depthbuffer) failed\n");
+ xf86DrvMsg(pScreen->myNum, X_ERROR, "drmAddMap(depthbuffer) failed\n");
DRICloseScreen(pScreen);
return FALSE;
}
@@ -625,17 +594,21 @@ Bool I810DRIScreenInit(ScreenPtr pScreen)
I810AllocHigh( &(pI810->BufferMem), &(pI810->SysMem),
I810_DMA_BUF_NR * I810_DMA_BUF_SZ);
- if(pI810->BufferMem.Start == 0 ||
+ xf86DrvMsg(pScreen->myNum, X_INFO, "Buffer map : %lx\n",
+ pI810->BufferMem.Start);
+
+ if (pI810->BufferMem.Start == 0 ||
pI810->BufferMem.End - pI810->BufferMem.Start >
I810_DMA_BUF_NR * I810_DMA_BUF_SZ) {
- ErrorF("Not enough memory for dma buffers\n");
+ xf86DrvMsg(pScreen->myNum, X_ERROR,
+ "Not enough memory for dma buffers\n");
DRICloseScreen(pScreen);
return FALSE;
}
- if(drmAddMap(pI810->drmSubFD, (drmHandle)pI810->BufferMem.Start,
+ if (drmAddMap(pI810->drmSubFD, (drmHandle)pI810->BufferMem.Start,
pI810->BufferMem.Size, DRM_AGP, 0,
&pI810->buffer_map) < 0) {
- ErrorF("drmAddMap(buffer_map) failed\n");
+ xf86DrvMsg(pScreen->myNum, X_ERROR, "drmAddMap(buffer_map) failed\n");
DRICloseScreen(pScreen);
return FALSE;
}
@@ -646,7 +619,7 @@ Bool I810DRIScreenInit(ScreenPtr pScreen)
if (drmAddMap(pI810->drmSubFD, (drmHandle)pI810->LpRing.mem.Start,
pI810->LpRing.mem.Size, DRM_AGP, 0,
&pI810->ring_map) < 0) {
- ErrorF("drmAddMap(ring_map) failed\n");
+ xf86DrvMsg(pScreen->myNum, X_ERROR, "drmAddMap(ring_map) failed\n");
DRICloseScreen(pScreen);
return FALSE;
}
@@ -674,7 +647,7 @@ Bool I810DRIScreenInit(ScreenPtr pScreen)
if (drmAddMap(pI810->drmSubFD, (drmHandle)pI810->TexMem.Start,
pI810->TexMem.Size, DRM_AGP, 0,
&pI810DRI->textures) < 0) {
- ErrorF("drmAddMap(textures) failed\n");
+ xf86DrvMsg(pScreen->myNum, X_ERROR, "drmAddMap(textures) failed\n");
DRICloseScreen(pScreen);
return FALSE;
}
@@ -745,7 +718,7 @@ Bool I810DRIScreenInit(ScreenPtr pScreen)
pI810DRI->auxPitchBits = pI810->auxPitchBits;
if (!(I810InitVisualConfigs(pScreen))) {
- ErrorF("I810InitVisualConfigs failed\n");
+ xf86DrvMsg(pScreen->myNum, X_ERROR, "I810InitVisualConfigs failed\n");
DRICloseScreen(pScreen);
return FALSE;
}
diff --git a/xc/programs/Xserver/hw/xfree86/drivers/i810/i810_driver.c b/xc/programs/Xserver/hw/xfree86/drivers/i810/i810_driver.c
index 99369f50b..6d4c8aafb 100644
--- a/xc/programs/Xserver/hw/xfree86/drivers/i810/i810_driver.c
+++ b/xc/programs/Xserver/hw/xfree86/drivers/i810/i810_driver.c
@@ -95,15 +95,8 @@ static void I810DisplayPowerManagementSet(ScrnInfoPtr pScrn,
int flags);
#endif
-#define VERSION 4000
-#define I810_NAME "I810"
-#define I810_DRIVER_NAME "i810"
-#define I810_MAJOR_VERSION 1
-#define I810_MINOR_VERSION 0
-#define I810_PATCHLEVEL 0
-
DriverRec I810 = {
- VERSION,
+ I810_VERSION,
"Accelerated driver for Intel i810 cards",
I810Identify,
I810Probe,
@@ -407,7 +400,7 @@ I810Probe(DriverPtr drv, int flags) {
/* Allocate new ScrnInfoRec and claim the slot */
pScrn = xf86AllocateScreen(drv, 0);
- pScrn->driverVersion = VERSION;
+ pScrn->driverVersion = I810_VERSION;
pScrn->driverName = I810_DRIVER_NAME;
pScrn->name = I810_NAME;
pScrn->Probe = I810Probe;
diff --git a/xc/programs/Xserver/hw/xfree86/drivers/mga/mga.h b/xc/programs/Xserver/hw/xfree86/drivers/mga/mga.h
index 5e0430616..931e4a19d 100644
--- a/xc/programs/Xserver/hw/xfree86/drivers/mga/mga.h
+++ b/xc/programs/Xserver/hw/xfree86/drivers/mga/mga.h
@@ -32,6 +32,13 @@
#include "mga_dri.h"
#endif
+#define MGA_VERSION 4000
+#define MGA_NAME "MGA"
+#define MGA_DRIVER_NAME "mga"
+#define MGA_MAJOR_VERSION 1
+#define MGA_MINOR_VERSION 0
+#define MGA_PATCHLEVEL 0
+
#if !defined(EXTRADEBUG)
#define INREG8(addr) MMIO_IN8(pMga->IOBase, addr)
#define INREG16(addr) MMIO_IN16(pMga->IOBase, addr)
diff --git a/xc/programs/Xserver/hw/xfree86/drivers/mga/mga_dri.c b/xc/programs/Xserver/hw/xfree86/drivers/mga/mga_dri.c
index 0f4ba439a..7f91b6630 100644
--- a/xc/programs/Xserver/hw/xfree86/drivers/mga/mga_dri.c
+++ b/xc/programs/Xserver/hw/xfree86/drivers/mga/mga_dri.c
@@ -55,10 +55,11 @@ Bool MgaCleanupDma(ScrnInfoPtr pScrn)
{
MGAPtr pMGA = MGAPTR(pScrn);
Bool ret_val;
-
+
ret_val = drmMgaCleanupDma(pMGA->drmSubFD);
- if(ret_val == FALSE) ErrorF("Mga Dma Cleanup Failed\n");
-
+ if (ret_val == FALSE)
+ xf86DrvMsg(pScrn->scrnIndex, X_ERROR, "Mga Dma Cleanup Failed\n");
+
return ret_val;
}
@@ -66,10 +67,11 @@ Bool MgaLockUpdate(ScrnInfoPtr pScrn, drmLockFlags flags)
{
MGAPtr pMGA = MGAPTR(pScrn);
Bool ret_val;
-
+
ret_val = drmMgaLockUpdate(pMGA->drmSubFD, flags);
- if(ret_val == FALSE) ErrorF("LockUpdate failed\n");
-
+ if (ret_val == FALSE)
+ xf86DrvMsg(pScrn->scrnIndex, X_ERROR, "LockUpdate failed\n");
+
return ret_val;
}
@@ -98,7 +100,8 @@ Bool MgaInitDma(ScrnInfoPtr pScrn, int prim_size)
break;
case PCI_CHIP_MGAG200_PCI:
default:
- ErrorF("Direct rendering not supported on this card/chipset\n");
+ xf86DrvMsg(pScrn->scrnIndex, X_ERROR,
+ "[drm] Direct rendering not supported on this card/chipset\n");
return FALSE;
}
@@ -116,11 +119,13 @@ Bool MgaInitDma(ScrnInfoPtr pScrn, int prim_size)
memcpy(&init.WarpIndex, &pMGADRIServer->WarpIndex,
sizeof(drmMgaWarpIndex) * MGA_MAX_WARP_PIPES);
- ErrorF("Mga Dma Initialization start\n");
+ xf86DrvMsg(pScrn->scrnIndex, X_INFO, "[drm] Mga Dma Initialization start\n");
ret_val = drmMgaInitDma(pMGA->drmSubFD, &init);
- if(ret_val == FALSE) ErrorF("Mga Dma Initialization Failed\n");
- else ErrorF("Mga Dma Initialization done\n");
+ if (ret_val == FALSE)
+ xf86DrvMsg(pScrn->scrnIndex, X_ERROR, "[drm] Mga Dma Initialization Failed\n");
+ else
+ xf86DrvMsg(pScrn->scrnIndex, X_INFO, "[drm] Mga Dma Initialization done\n");
return ret_val;
}
@@ -217,8 +222,9 @@ MGAInitVisualConfigs(ScreenPtr pScreen)
}
}
}
- if (i!=numConfigs) {
- ErrorF("Incorrect initialization of visuals\n");
+ if (i != numConfigs) {
+ xf86DrvMsg(pScrn->scrnIndex, X_ERROR,
+ "[drm] Incorrect initialization of visuals\n");
return FALSE;
}
break;
@@ -242,93 +248,110 @@ static unsigned int mylog2(unsigned int n)
Bool MGADRIScreenInit(ScreenPtr pScreen)
{
- ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum];
- MGAPtr pMGA = MGAPTR(pScrn);
- DRIInfoPtr pDRIInfo;
- MGADRIPtr pMGADRI;
- MGADRIServerPrivatePtr pMGADRIServer;
- int bufs, size;
- int prim_size;
- int init_offset;
- int i;
+ ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum];
+ MGAPtr pMGA = MGAPTR(pScrn);
+ DRIInfoPtr pDRIInfo;
+ MGADRIPtr pMGADRI;
+ MGADRIServerPrivatePtr pMGADRIServer;
+ int bufs, size;
+ int prim_size;
+ int init_offset;
+ int i;
#if XFree86LOADER
- /* Check that the GLX, DRI, and DRM modules have been loaded by testing
- * for canonical symbols in each module. */
- if (!LoaderSymbol("GlxSetVisualConfigs")) return FALSE;
- if (!LoaderSymbol("DRIScreenInit")) return FALSE;
- if (!LoaderSymbol("drmAvailable")) return FALSE;
+ /* Check that the GLX, DRI, and DRM modules have been loaded by testing
+ * for canonical symbols in each module. */
+ if (!LoaderSymbol("GlxSetVisualConfigs")) return FALSE;
+ if (!LoaderSymbol("DRIScreenInit")) return FALSE;
+ if (!LoaderSymbol("drmAvailable")) return FALSE;
#endif
- if((pScrn->bitsPerPixel / 8) != 2) {
- ErrorF("Direct Rendering only supported in 16 bpp mode\n");
- return FALSE;
- }
+ /* Check the DRI version */
+ {
+ int major, minor, patch;
+ DRIQueryVersion(&major, &minor, &patch);
+ if (major != 3 || minor != 0 || patch < 0) {
+ xf86DrvMsg(pScreen->myNum, X_ERROR,
+ "[drm] MGADRIScreenInit failed (DRI version = %d.%d.%d, expected 3.0.x). Disabling DRI.\n",
+ major, minor, patch);
+ return FALSE;
+ }
+ }
+
+ if ((pScrn->bitsPerPixel / 8) != 2) {
+ xf86DrvMsg(pScreen->myNum, X_INFO,
+ "[drm] Direct Rendering only supported in 16 bpp mode\n");
+ return FALSE;
+ }
- pDRIInfo = DRICreateInfoRec();
- if (!pDRIInfo) return FALSE;
- pMGA->pDRIInfo = pDRIInfo;
-
- pDRIInfo->drmDriverName = MGAKernelDriverName;
- pDRIInfo->clientDriverName = MGAClientDriverName;
- pDRIInfo->busIdString = xalloc(64);
- sprintf(pDRIInfo->busIdString, "PCI:%d:%d:%d",
- ((pciConfigPtr)pMGA->PciInfo->thisCard)->busnum,
- ((pciConfigPtr)pMGA->PciInfo->thisCard)->devnum,
- ((pciConfigPtr)pMGA->PciInfo->thisCard)->funcnum);
- pDRIInfo->ddxDriverMajorVersion = 0;
- pDRIInfo->ddxDriverMinorVersion = 1;
- pDRIInfo->ddxDriverPatchVersion = 0;
- pDRIInfo->frameBufferPhysicalAddress = pMGA->FbAddress;
- pDRIInfo->frameBufferSize = pMGA->FbMapSize;
- pDRIInfo->frameBufferStride = pScrn->displayWidth*(pScrn->bitsPerPixel/8);
- pDRIInfo->ddxDrawableTableEntry = MGA_MAX_DRAWABLES;
-
- MGADRIWrapFunctions( pScreen, pDRIInfo );
-
- if (SAREA_MAX_DRAWABLES < MGA_MAX_DRAWABLES)
- pDRIInfo->maxDrawableTableEntry = SAREA_MAX_DRAWABLES;
- else
- pDRIInfo->maxDrawableTableEntry = MGA_MAX_DRAWABLES;
-
- /* For now the mapping works by using a fixed size defined
- * in the SAREA header
- */
- if (sizeof(XF86DRISAREARec)+sizeof(MGASAREARec)>SAREA_MAX) {
- ErrorF("Data does not fit in SAREA\n");
- return FALSE;
- }
+ pDRIInfo = DRICreateInfoRec();
+ if (!pDRIInfo)
+ return FALSE;
+ pMGA->pDRIInfo = pDRIInfo;
+
+ pDRIInfo->drmDriverName = MGAKernelDriverName;
+ pDRIInfo->clientDriverName = MGAClientDriverName;
+ pDRIInfo->busIdString = xalloc(64);
+ sprintf(pDRIInfo->busIdString, "PCI:%d:%d:%d",
+ ((pciConfigPtr)pMGA->PciInfo->thisCard)->busnum,
+ ((pciConfigPtr)pMGA->PciInfo->thisCard)->devnum,
+ ((pciConfigPtr)pMGA->PciInfo->thisCard)->funcnum);
+ pDRIInfo->ddxDriverMajorVersion = MGA_MAJOR_VERSION;
+ pDRIInfo->ddxDriverMinorVersion = MGA_MINOR_VERSION;
+ pDRIInfo->ddxDriverPatchVersion = MGA_PATCHLEVEL;
+ pDRIInfo->frameBufferPhysicalAddress = pMGA->FbAddress;
+ pDRIInfo->frameBufferSize = pMGA->FbMapSize;
+ pDRIInfo->frameBufferStride = pScrn->displayWidth*(pScrn->bitsPerPixel/8);
+ pDRIInfo->ddxDrawableTableEntry = MGA_MAX_DRAWABLES;
+
+ MGADRIWrapFunctions( pScreen, pDRIInfo );
+
+ if (SAREA_MAX_DRAWABLES < MGA_MAX_DRAWABLES)
+ pDRIInfo->maxDrawableTableEntry = SAREA_MAX_DRAWABLES;
+ else
+ pDRIInfo->maxDrawableTableEntry = MGA_MAX_DRAWABLES;
+
+ /* For now the mapping works by using a fixed size defined
+ * in the SAREA header
+ */
+ if (sizeof(XF86DRISAREARec)+sizeof(MGASAREARec)>SAREA_MAX) {
+ xf86DrvMsg(pScrn->scrnIndex, X_ERROR, "[drm] Data does not fit in SAREA\n");
+ return FALSE;
+ }
- ErrorF("\n\n\nSarea %d+%d: %d\n", sizeof(XF86DRISAREARec),
- sizeof(MGASAREARec), sizeof(XF86DRISAREARec) + sizeof(MGASAREARec));
+ xf86DrvMsg(pScrn->scrnIndex, X_INFO, "[drm] Sarea %d+%d: %d\n",
+ sizeof(XF86DRISAREARec), sizeof(MGASAREARec),
+ sizeof(XF86DRISAREARec) + sizeof(MGASAREARec));
- pDRIInfo->SAREASize = SAREA_MAX;
+ pDRIInfo->SAREASize = SAREA_MAX;
- if (!(pMGADRI = (MGADRIPtr)xnfcalloc(sizeof(MGADRIRec),1))) {
- DRIDestroyInfoRec(pMGA->pDRIInfo);
- pMGA->pDRIInfo=0;
- ErrorF("Failed to allocate memory for private record \n");
- return FALSE;
- }
+ if (!(pMGADRI = (MGADRIPtr)xnfcalloc(sizeof(MGADRIRec),1))) {
+ DRIDestroyInfoRec(pMGA->pDRIInfo);
+ pMGA->pDRIInfo=0;
+ xf86DrvMsg(pScrn->scrnIndex, X_ERROR,
+ "[drm] Failed to allocate memory for private record\n");
+ return FALSE;
+ }
if (!(pMGADRIServer = (MGADRIServerPrivatePtr)
xnfcalloc(sizeof(MGADRIServerPrivateRec),1))) {
- xfree(pMGADRI);
- DRIDestroyInfoRec(pMGA->pDRIInfo);
- pMGA->pDRIInfo=0;
- ErrorF("Failed to allocate memory for private record \n");
- return FALSE;
- }
+ xfree(pMGADRI);
+ DRIDestroyInfoRec(pMGA->pDRIInfo);
+ pMGA->pDRIInfo=0;
+ xf86DrvMsg(pScrn->scrnIndex, X_ERROR,
+ "[drm] Failed to allocate memory for private record\n");
+ return FALSE;
+ }
- pDRIInfo->devPrivate = pMGADRI;
- pMGA->DRIServerInfo = pMGADRIServer;
- pDRIInfo->devPrivateSize = sizeof(MGADRIRec);
- pDRIInfo->contextSize = sizeof(MGADRIContextRec);
+ pDRIInfo->devPrivate = pMGADRI;
+ pMGA->DRIServerInfo = pMGADRIServer;
+ pDRIInfo->devPrivateSize = sizeof(MGADRIRec);
+ pDRIInfo->contextSize = sizeof(MGADRIContextRec);
- pDRIInfo->CreateContext = MGACreateContext;
- pDRIInfo->DestroyContext = MGADestroyContext;
- pDRIInfo->SwapContext = MGADRISwapContext;
+ pDRIInfo->CreateContext = MGACreateContext;
+ pDRIInfo->DestroyContext = MGADestroyContext;
+ pDRIInfo->SwapContext = MGADRISwapContext;
- switch( pScrn->bitsPerPixel ) {
+ switch( pScrn->bitsPerPixel ) {
case 8:
pDRIInfo->InitBuffers = Mga8DRIInitBuffers;
pDRIInfo->MoveBuffers = Mga8DRIMoveBuffers;
@@ -341,113 +364,138 @@ Bool MGADRIScreenInit(ScreenPtr pScreen)
case 32:
pDRIInfo->InitBuffers = Mga32DRIInitBuffers;
pDRIInfo->MoveBuffers = Mga32DRIMoveBuffers;
- }
+ }
- pDRIInfo->bufferRequests = DRI_ALL_WINDOWS;
+ pDRIInfo->bufferRequests = DRI_ALL_WINDOWS;
+
+ if (!DRIScreenInit(pScreen, pDRIInfo, &pMGA->drmSubFD)) {
+ xfree(pMGADRIServer);
+ pMGA->DRIServerInfo = 0;
+ xfree(pDRIInfo->devPrivate);
+ pDRIInfo->devPrivate = 0;
+ DRIDestroyInfoRec(pMGA->pDRIInfo);
+ pMGA->pDRIInfo = 0;
+ xf86DrvMsg(pScreen->myNum, X_ERROR, "[drm] DRIScreenInit Failed\n");
+ return FALSE;
+ }
- if (!DRIScreenInit(pScreen, pDRIInfo, &pMGA->drmSubFD)) {
- xfree(pMGADRIServer);
- pMGA->DRIServerInfo = 0;
- xfree(pDRIInfo->devPrivate);
- pDRIInfo->devPrivate = 0;
- DRIDestroyInfoRec(pMGA->pDRIInfo);
- pMGA->pDRIInfo = 0;
- ErrorF("DRIScreenInit Failed\n");
- return FALSE;
- }
+ /* Check the MGA DRM version */
+ {
+ drmVersionPtr version = drmGetVersion(pMGA->drmSubFD);
+ if (version) {
+ if (version->version_major != 1 ||
+ version->version_minor != 0 ||
+ version->version_patchlevel < 0) {
+ /* incompatible drm version */
+ xf86DrvMsg(pScreen->myNum, X_ERROR,
+ "[drm] MGADRIScreenInit failed (DRM version = %d.%d.%d, expected 1.0.x). Disabling DRI.\n",
+ version->version_major,
+ version->version_minor,
+ version->version_patchlevel);
+ MGADRICloseScreen(pScreen);
+ drmFreeVersion(version);
+ return FALSE;
+ }
+ drmFreeVersion(version);
+ }
+ }
- pMGADRIServer->regsSize = MGAIOMAPSIZE;
- if (drmAddMap(pMGA->drmSubFD, (drmHandle)pMGA->IOAddress,
- pMGADRIServer->regsSize, DRM_REGISTERS, 0,
- &pMGADRIServer->regs)<0) {
- DRICloseScreen(pScreen);
- ErrorF("drmAddMap failed Register MMIO region\n");
- return FALSE;
- }
- xf86DrvMsg(pScreen->myNum, X_INFO, "[drm] Registers = 0x%08lx\n",
- pMGADRIServer->regs);
+ pMGADRIServer->regsSize = MGAIOMAPSIZE;
+ if (drmAddMap(pMGA->drmSubFD, (drmHandle)pMGA->IOAddress,
+ pMGADRIServer->regsSize, DRM_REGISTERS, 0,
+ &pMGADRIServer->regs)<0) {
+ DRICloseScreen(pScreen);
+ xf86DrvMsg(pScreen->myNum, X_ERROR,
+ "[drm] drmAddMap failed Register MMIO region\n");
+ return FALSE;
+ }
+ xf86DrvMsg(pScreen->myNum, X_INFO, "[drm] Registers = 0x%08lx\n",
+ pMGADRIServer->regs);
- /* Agp Support */
- pMGADRIServer->agpAcquired = FALSE;
- pMGADRIServer->agpHandle = 0;
- pMGADRIServer->agpSizep = 0;
- pMGADRIServer->agp_map = 0;
+ /* Agp Support */
+ pMGADRIServer->agpAcquired = FALSE;
+ pMGADRIServer->agpHandle = 0;
+ pMGADRIServer->agpSizep = 0;
+ pMGADRIServer->agp_map = 0;
- if(drmAgpAcquire(pMGA->drmSubFD) < 0) {
- DRICloseScreen(pScreen);
- ErrorF("drmAgpAcquire failed\n");
- return FALSE;
- }
- pMGADRIServer->agpAcquired = TRUE;
+ if (drmAgpAcquire(pMGA->drmSubFD) < 0) {
+ DRICloseScreen(pScreen);
+ xf86DrvMsg(pScreen->myNum, X_ERROR, "[drm] drmAgpAcquire failed\n");
+ return FALSE;
+ }
+ pMGADRIServer->agpAcquired = TRUE;
- pMGADRIServer->warp_ucode_size = mgaGetMicrocodeSize(pScreen);
- if(pMGADRIServer->warp_ucode_size == 0) {
- ErrorF("microcodeSize is zero\n");
+ pMGADRIServer->warp_ucode_size = mgaGetMicrocodeSize(pScreen);
+ if (pMGADRIServer->warp_ucode_size == 0) {
+ xf86DrvMsg(pScreen->myNum, X_ERROR, "[drm] microcodeSize is zero\n");
DRICloseScreen(pScreen);
return FALSE;
}
- pMGADRIServer->agpMode = drmAgpGetMode(pMGA->drmSubFD);
- /* Default to 1X agp mode */
- pMGADRIServer->agpMode &= ~0x00000002;
- if (drmAgpEnable(pMGA->drmSubFD, pMGADRIServer->agpMode) < 0) {
- ErrorF("drmAgpEnable failed\n");
- DRICloseScreen(pScreen);
- return FALSE;
- }
- ErrorF("drmAgpEnabled succeeded\n");
+ pMGADRIServer->agpMode = drmAgpGetMode(pMGA->drmSubFD);
+ /* Default to 1X agp mode */
+ pMGADRIServer->agpMode &= ~0x00000002;
+ if (drmAgpEnable(pMGA->drmSubFD, pMGADRIServer->agpMode) < 0) {
+ xf86DrvMsg(pScreen->myNum, X_ERROR, "[drm] drmAgpEnable failed\n");
+ DRICloseScreen(pScreen);
+ return FALSE;
+ }
+ ErrorF("[drm] drmAgpEnabled succeeded\n");
- prim_size = 65536;
- init_offset = ((prim_size + pMGADRIServer->warp_ucode_size +
+ prim_size = 65536;
+ init_offset = ((prim_size + pMGADRIServer->warp_ucode_size +
4096 - 1) / 4096) * 4096;
- pMGADRIServer->agpSizep = init_offset;
- pMGADRI->agpSize = (drmAgpSize(pMGA->drmSubFD)) - init_offset;
-
- pMGADRIServer->agpBase = (drmAddress) drmAgpBase(pMGA->drmSubFD);
- if (drmAddMap(pMGA->drmSubFD, 0,
- init_offset, DRM_AGP, 0,
- &pMGADRIServer->agp_private) < 0) {
- DRICloseScreen(pScreen);
- ErrorF("drmAddMap failed on AGP aperture\n");
- return FALSE;
- }
+ pMGADRIServer->agpSizep = init_offset;
+ pMGADRI->agpSize = (drmAgpSize(pMGA->drmSubFD)) - init_offset;
+
+ pMGADRIServer->agpBase = (drmAddress) drmAgpBase(pMGA->drmSubFD);
+ if (drmAddMap(pMGA->drmSubFD, 0,
+ init_offset, DRM_AGP, 0,
+ &pMGADRIServer->agp_private) < 0) {
+ DRICloseScreen(pScreen);
+ xf86DrvMsg(pScreen->myNum, X_ERROR,
+ "[drm] drmAddMap failed on AGP aperture\n");
+ return FALSE;
+ }
- if (drmMap(pMGA->drmSubFD, (drmHandle)pMGADRIServer->agp_private,
- init_offset,
- (drmAddressPtr)&pMGADRIServer->agp_map) < -1) {
- DRICloseScreen(pScreen);
- ErrorF("drmMap failed on AGP aperture\n");
- return FALSE;
- }
+ if (drmMap(pMGA->drmSubFD, (drmHandle)pMGADRIServer->agp_private,
+ init_offset,
+ (drmAddressPtr)&pMGADRIServer->agp_map) < -1) {
+ DRICloseScreen(pScreen);
+ xf86DrvMsg(pScreen->myNum, X_ERROR,
+ "[drm] drmMap failed on AGP aperture\n");
+ return FALSE;
+ }
- /* Now allocate and bind a default of 8 megs */
-
- drmAgpAlloc(pMGA->drmSubFD, 0x00800000, 0, 0,
- &pMGADRIServer->agpHandle);
+ /* Now allocate and bind a default of 8 megs */
+ drmAgpAlloc(pMGA->drmSubFD, 0x00800000, 0, 0,
+ &pMGADRIServer->agpHandle);
- if(pMGADRIServer->agpHandle == 0) {
- ErrorF("drmAgpAlloc failed\n");
- DRICloseScreen(pScreen);
- return FALSE;
- }
+ if (pMGADRIServer->agpHandle == 0) {
+ xf86DrvMsg(pScreen->myNum, X_ERROR,
+ "[drm] drmAgpAlloc failed\n");
+ DRICloseScreen(pScreen);
+ return FALSE;
+ }
- if(drmAgpBind(pMGA->drmSubFD, pMGADRIServer->agpHandle, 0) < 0) {
- DRICloseScreen(pScreen);
- ErrorF("drmAgpBind failed\n");
- return FALSE;
- }
-
- mgaInstallMicrocode(pScreen, prim_size);
+ if (drmAgpBind(pMGA->drmSubFD, pMGADRIServer->agpHandle, 0) < 0) {
+ DRICloseScreen(pScreen);
+ xf86DrvMsg(pScreen->myNum, X_ERROR,
+ "[drm] drmAgpBind failed\n");
+ return FALSE;
+ }
- if(drmAddMap(pMGA->drmSubFD, (drmHandle)init_offset,
- pMGADRI->agpSize, DRM_AGP, 0,
- &pMGADRI->agp) < 0) {
- ErrorF("Failed to map public agp area\n");
- DRICloseScreen(pScreen);
- return FALSE;
- }
+ mgaInstallMicrocode(pScreen, prim_size);
+ if (drmAddMap(pMGA->drmSubFD, (drmHandle)init_offset,
+ pMGADRI->agpSize, DRM_AGP, 0,
+ &pMGADRI->agp) < 0) {
+ xf86DrvMsg(pScreen->myNum, X_ERROR,
+ "[drm] Failed to map public agp area\n");
+ DRICloseScreen(pScreen);
+ return FALSE;
+ }
switch(pMGA->Chipset) {
case PCI_CHIP_MGAG400:
@@ -458,126 +506,128 @@ Bool MGADRIScreenInit(ScreenPtr pScreen)
break;
case PCI_CHIP_MGAG200_PCI:
default:
- ErrorF("Direct rendering not supported on this card/chipset\n");
+ xf86DrvMsg(pScreen->myNum, X_ERROR,
+ "[drm] Direct rendering not supported on this card/chipset\n");
return FALSE;
}
+
+ pMGADRI->width = pScrn->virtualX;
+ pMGADRI->height = pScrn->virtualY;
+ pMGADRI->mem = pScrn->videoRam * 1024;
+ pMGADRI->cpp = pScrn->bitsPerPixel / 8;
+ pMGADRI->frontPitch = pScrn->displayWidth * (pScrn->bitsPerPixel / 8);
- pMGADRI->width = pScrn->virtualX;
- pMGADRI->height = pScrn->virtualY;
- pMGADRI->mem = pScrn->videoRam * 1024;
- pMGADRI->cpp = pScrn->bitsPerPixel / 8;
- pMGADRI->frontPitch = pScrn->displayWidth * (pScrn->bitsPerPixel / 8);
-
-
- pMGADRI->frontOffset = 0; /* pMGA->YDstOrg * (pScrn->bitsPerPixel / 8) */
- pMGADRI->backOffset = ((pScrn->virtualY+129) * pScrn->displayWidth *
- (pScrn->bitsPerPixel / 8) + 4095) & ~0xFFF;
+ pMGADRI->frontOffset = 0; /* pMGA->YDstOrg * (pScrn->bitsPerPixel / 8) */
+ pMGADRI->backOffset = ((pScrn->virtualY+129) * pScrn->displayWidth *
+ (pScrn->bitsPerPixel / 8) + 4095) & ~0xFFF;
- fprintf(stderr, "calced backoffset: 0x%x\n",
- pMGADRI->backOffset);
+ xf86DrvMsg(pScreen->myNum, X_INFO, "[drm] calced backoffset: 0x%x\n",
+ pMGADRI->backOffset);
#if 0
- size = 2 * pScrn->virtualX * pScrn->virtualY;
- pMGADRI->depthOffset = (pMGADRI->backOffset + size + 4095) & ~0xFFF;
- pMGADRI->textureOffset = pMGADRI->depthOffset + size;
- pMGADRI->textureSize = pMGA->FbUsableSize - pMGADRI->textureOffset;
+ size = 2 * pScrn->virtualX * pScrn->virtualY;
+ pMGADRI->depthOffset = (pMGADRI->backOffset + size + 4095) & ~0xFFF;
+ pMGADRI->textureOffset = pMGADRI->depthOffset + size;
+ pMGADRI->textureSize = pMGA->FbUsableSize - pMGADRI->textureOffset;
#else
- size = 2 * pScrn->virtualX * pScrn->virtualY;
- size += 4095;
- size &= ~4095;
- pMGADRI->depthOffset = pMGA->FbUsableSize - size;
- pMGADRI->depthOffset &= ~4095;
- pMGADRI->textureOffset = pMGADRI->backOffset + size;
- pMGADRI->textureSize = pMGADRI->depthOffset - pMGADRI->textureOffset;
-
- if (pMGADRI->depthOffset < pMGADRI->textureOffset + 512*1024) {
- ErrorF("Insufficient memory for direct rendering\n");
- DRICloseScreen(pScreen);
- return FALSE;
- }
+ size = 2 * pScrn->virtualX * pScrn->virtualY;
+ size += 4095;
+ size &= ~4095;
+ pMGADRI->depthOffset = pMGA->FbUsableSize - size;
+ pMGADRI->depthOffset &= ~4095;
+ pMGADRI->textureOffset = pMGADRI->backOffset + size;
+ pMGADRI->textureSize = pMGADRI->depthOffset - pMGADRI->textureOffset;
+
+ if (pMGADRI->depthOffset < pMGADRI->textureOffset + 512*1024) {
+ xf86DrvMsg(pScreen->myNum, X_ERROR,
+ "[drm] Insufficient memory for direct rendering\n");
+ DRICloseScreen(pScreen);
+ return FALSE;
+ }
#endif
- pMGADRI->mAccess = pMGA->MAccess;
+ pMGADRI->mAccess = pMGA->MAccess;
- i = mylog2(pMGADRI->textureSize / MGA_NR_TEX_REGIONS);
- if (i < MGA_LOG_MIN_TEX_REGION_SIZE)
+ i = mylog2(pMGADRI->textureSize / MGA_NR_TEX_REGIONS);
+ if (i < MGA_LOG_MIN_TEX_REGION_SIZE)
i = MGA_LOG_MIN_TEX_REGION_SIZE;
- pMGADRI->logTextureGranularity = i;
- pMGADRI->textureSize = (pMGADRI->textureSize >> i) << i; /* truncate */
-
-
- /* Here is where we need to do initialization of the dma engine */
- if((bufs = drmAddBufs(pMGA->drmSubFD,
- MGA_DMA_BUF_NR,
- MGA_DMA_BUF_SZ,
- DRM_AGP_BUFFER,
- init_offset)) <= 0) {
- xf86DrvMsg(pScrn->scrnIndex, X_INFO,
- "[drm] failure adding %d %d byte DMA buffers\n",
- MGA_DMA_BUF_NR,
- MGA_DMA_BUF_SZ);
- DRICloseScreen(pScreen);
- return FALSE;
- }
+ pMGADRI->logTextureGranularity = i;
+ pMGADRI->textureSize = (pMGADRI->textureSize >> i) << i; /* truncate */
+
+
+ /* Here is where we need to do initialization of the dma engine */
+ if((bufs = drmAddBufs(pMGA->drmSubFD,
+ MGA_DMA_BUF_NR,
+ MGA_DMA_BUF_SZ,
+ DRM_AGP_BUFFER,
+ init_offset)) <= 0) {
+ xf86DrvMsg(pScrn->scrnIndex, X_INFO,
+ "[drm] failure adding %d %d byte DMA buffers\n",
+ MGA_DMA_BUF_NR,
+ MGA_DMA_BUF_SZ);
+ DRICloseScreen(pScreen);
+ return FALSE;
+ }
- pMGADRI->agpBufferOffset = init_offset + pMGADRIServer->agp_private;
+ pMGADRI->agpBufferOffset = init_offset + pMGADRIServer->agp_private;
- /* Calculate texture constants for AGP texture space
- */
- {
- CARD32 agpTextureOffset = MGA_DMA_BUF_SZ * MGA_DMA_BUF_NR;
- CARD32 agpTextureSize = pMGADRI->agpSize - agpTextureOffset;
-
- i = mylog2(agpTextureSize / MGA_NR_TEX_REGIONS);
- if (i < MGA_LOG_MIN_TEX_REGION_SIZE)
- i = MGA_LOG_MIN_TEX_REGION_SIZE;
-
- pMGADRI->logAgpTextureGranularity = i;
- pMGADRI->agpTextureSize = (agpTextureSize >> i) << i;
- pMGADRI->agpTextureOffset = agpTextureOffset;
- }
+ /* Calculate texture constants for AGP texture space
+ */
+ {
+ CARD32 agpTextureOffset = MGA_DMA_BUF_SZ * MGA_DMA_BUF_NR;
+ CARD32 agpTextureSize = pMGADRI->agpSize - agpTextureOffset;
+
+ i = mylog2(agpTextureSize / MGA_NR_TEX_REGIONS);
+ if (i < MGA_LOG_MIN_TEX_REGION_SIZE)
+ i = MGA_LOG_MIN_TEX_REGION_SIZE;
+
+ pMGADRI->logAgpTextureGranularity = i;
+ pMGADRI->agpTextureSize = (agpTextureSize >> i) << i;
+ pMGADRI->agpTextureOffset = agpTextureOffset;
+ }
- xf86DrvMsg(pScrn->scrnIndex, X_INFO,
- "[drm] added %d %d byte DMA buffers\n",
- bufs, MGA_DMA_BUF_SZ);
+ xf86DrvMsg(pScrn->scrnIndex, X_INFO,
+ "[drm] added %d %d byte DMA buffers\n",
+ bufs, MGA_DMA_BUF_SZ);
- if((MgaInitDma(pScrn, prim_size)) != TRUE) {
- ErrorF("Failed to initialize dma engine\n");
- DRICloseScreen(pScreen);
- return FALSE;
- }
+ if ((MgaInitDma(pScrn, prim_size)) != TRUE) {
+ xf86DrvMsg(pScreen->myNum, X_ERROR,
+ "[drm] Failed to initialize dma engine\n");
+ DRICloseScreen(pScreen);
+ return FALSE;
+ }
- ErrorF("Initialized Dma Engine\n");
+ xf86DrvMsg(pScreen->myNum, X_INFO, "[drm] Initialized Dma Engine\n");
- if (!pMGADRIServer->irq) {
- pMGADRIServer->irq = drmGetInterruptFromBusID(pMGA->drmSubFD,
- ((pciConfigPtr)pMGA->PciInfo
+ if (!pMGADRIServer->irq) {
+ pMGADRIServer->irq = drmGetInterruptFromBusID(pMGA->drmSubFD,
+ ((pciConfigPtr)pMGA->PciInfo
->thisCard)->busnum,
((pciConfigPtr)pMGA->PciInfo
->thisCard)->devnum,
((pciConfigPtr)pMGA->PciInfo
->thisCard)->funcnum);
- drmCtlInstHandler(pMGA->drmSubFD, pMGADRIServer->irq);
- }
+ drmCtlInstHandler(pMGA->drmSubFD, pMGADRIServer->irq);
+ }
- xf86DrvMsg(pScrn->scrnIndex, X_INFO,
- "[drm] dma control initialized, using IRQ %d\n",
- pMGADRIServer->irq);
-
-
- if (!(MGAInitVisualConfigs(pScreen))) {
- DRICloseScreen(pScreen);
- return FALSE;
- }
- xf86DrvMsg(pScrn->scrnIndex, X_INFO, "visual configs initialized\n" );
+ xf86DrvMsg(pScrn->scrnIndex, X_INFO,
+ "[drm] dma control initialized, using IRQ %d\n",
+ pMGADRIServer->irq);
- return TRUE;
+
+ if (!(MGAInitVisualConfigs(pScreen))) {
+ DRICloseScreen(pScreen);
+ return FALSE;
+ }
+ xf86DrvMsg(pScrn->scrnIndex, X_INFO, "visual configs initialized\n" );
+
+ return TRUE;
}
void
diff --git a/xc/programs/Xserver/hw/xfree86/drivers/mga/mga_driver.c b/xc/programs/Xserver/hw/xfree86/drivers/mga/mga_driver.c
index 6f95b8d87..b379022af 100644
--- a/xc/programs/Xserver/hw/xfree86/drivers/mga/mga_driver.c
+++ b/xc/programs/Xserver/hw/xfree86/drivers/mga/mga_driver.c
@@ -148,12 +148,7 @@ static void MGASave(ScrnInfoPtr pScrn);
static void MGARestore(ScrnInfoPtr pScrn);
static Bool MGAModeInit(ScrnInfoPtr pScrn, DisplayModePtr mode);
-#define VERSION 4000
-#define MGA_NAME "MGA"
-#define MGA_DRIVER_NAME "mga"
-#define MGA_MAJOR_VERSION 1
-#define MGA_MINOR_VERSION 0
-#define MGA_PATCHLEVEL 0
+
/*
* This contains the functions needed by the server after loading the
@@ -164,7 +159,7 @@ static Bool MGAModeInit(ScrnInfoPtr pScrn, DisplayModePtr mode);
*/
DriverRec MGA = {
- VERSION,
+ MGA_VERSION,
MGA_DRIVER_NAME,
#if 0
"accelerated driver for Matrox Millennium and Mystique cards",
@@ -593,7 +588,7 @@ MGAProbe(DriverPtr drv, int flags)
pScrn = xf86AllocateScreen(drv, 0);
/* Fill in what we can of the ScrnInfoRec */
- pScrn->driverVersion = VERSION;
+ pScrn->driverVersion = MGA_VERSION;
pScrn->driverName = MGA_DRIVER_NAME;
pScrn->name = MGA_NAME;
pScrn->Probe = MGAProbe;
@@ -1057,7 +1052,7 @@ VgaIOEnable(void *arg)
extern xf86MonPtr ConfiguredMonitor;
-void
+static void
MGAProbeDDC(ScrnInfoPtr pScrn, int index)
{
vbeInfoPtr pVbe;
diff --git a/xc/programs/Xserver/hw/xfree86/drivers/mga/mga_wrap.c b/xc/programs/Xserver/hw/xfree86/drivers/mga/mga_wrap.c
index d812149e1..7a456258a 100644
--- a/xc/programs/Xserver/hw/xfree86/drivers/mga/mga_wrap.c
+++ b/xc/programs/Xserver/hw/xfree86/drivers/mga/mga_wrap.c
@@ -65,7 +65,7 @@ static void MGAWakeupHandler(int screenNum,
pointer pReadmask)
{
ScreenPtr pScreen = screenInfo.screens[screenNum];
- DRIWrappedFuncsRec *pDRIWrap = DRIGetWrappedFuncs(pScreen);
+ /*DRIWrappedFuncsRec *pDRIWrap = DRIGetWrappedFuncs(pScreen);*/
if (0) ErrorF("MGAWakeupHandler (in)\n");
@@ -84,7 +84,7 @@ static void MGABlockHandler(int screenNum,
{
ScreenPtr pScreen = screenInfo.screens[screenNum];
- DRIWrappedFuncsRec *pDRIWrap = DRIGetWrappedFuncs(pScreen);
+ /*DRIWrappedFuncsRec *pDRIWrap = DRIGetWrappedFuncs(pScreen);*/
MGASAREAPtr sa = (MGASAREAPtr)DRIGetSAREAPrivate( pScreen );
if (0) ErrorF("MGABlockHandler (out)\n");
diff --git a/xc/programs/Xserver/hw/xfree86/drivers/r128/r128.h b/xc/programs/Xserver/hw/xfree86/drivers/r128/r128.h
index acb04f96e..29fa87a5b 100644
--- a/xc/programs/Xserver/hw/xfree86/drivers/r128/r128.h
+++ b/xc/programs/Xserver/hw/xfree86/drivers/r128/r128.h
@@ -45,8 +45,8 @@ USE OR OTHER DEALINGS IN THE SOFTWARE.
and the kernel-level DRM driver. */
#define R128_NAME "r128"
#define R128_VERSION_MAJOR 3
-#define R128_VERSION_MINOR 0
-#define R128_VERSION_PATCH 0
+#define R128_VERSION_MINOR 1
+#define R128_VERSION_PATCH 1
#define R128_VERSION ((R128_VERSION_MAJOR << 16) \
| (R128_VERSION_MINOR << 8) \
| R128_VERSION_PATCH)
diff --git a/xc/programs/Xserver/hw/xfree86/drivers/r128/r128_dri.c b/xc/programs/Xserver/hw/xfree86/drivers/r128/r128_dri.c
index cb647d6b6..329100c43 100644
--- a/xc/programs/Xserver/hw/xfree86/drivers/r128/r128_dri.c
+++ b/xc/programs/Xserver/hw/xfree86/drivers/r128/r128_dri.c
@@ -970,11 +970,32 @@ static void R128DRICCEInit(ScrnInfoPtr pScrn)
create the DRI data structures and initialize the DRI state. */
Bool R128DRIScreenInit(ScreenPtr pScreen)
{
- ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum];
- R128InfoPtr pR128 = R128PTR(pScrn);
- DRIInfoPtr pDRIInfo;
- R128DRIPtr pR128DRI;
+ ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum];
+ R128InfoPtr pR128 = R128PTR(pScrn);
+ DRIInfoPtr pDRIInfo;
+ R128DRIPtr pR128DRI;
+ int major, minor, patch;
+ drmVersionPtr version;
+#if XFree86LOADER
+ /* Check that the GLX, DRI, and DRM modules have been loaded by testing
+ * for known symbols in each module. */
+ if (!LoaderSymbol("GlxSetVisualConfigs")) return FALSE;
+ if (!LoaderSymbol("DRIScreenInit")) return FALSE;
+ if (!LoaderSymbol("drmAvailable")) return FALSE;
+#endif
+
+ /* Check the DRI version */
+ DRIQueryVersion(&major, &minor, &patch);
+ if (major != 3 || minor != 0 || patch < 0) {
+ xf86DrvMsg(pScreen->myNum, X_ERROR,
+ "R128DRIScreenInit failed "
+ "(DRI version = %d.%d.%d, expected 3.0.x). "
+ "Disabling DRI.\n",
+ major, minor, patch);
+ return FALSE;
+ }
+
switch (pR128->pixel_code) {
case 8:
/* These modes are not supported (yet). */
@@ -1056,6 +1077,27 @@ Bool R128DRIScreenInit(ScreenPtr pScreen)
return FALSE;
}
+ /* Check the r128 DRM version */
+ version = drmGetVersion(pR128->drmFD);
+ if (version) {
+ if (version->version_major != 1 ||
+ version->version_minor != 0 ||
+ version->version_patchlevel < 0) {
+ /* incompatible drm version */
+ xf86DrvMsg(pScreen->myNum, X_ERROR,
+ "R128DRIScreenInit failed "
+ "(DRM version = %d.%d.%d, expected 1.0.x). "
+ "Disabling DRI.\n",
+ version->version_major,
+ version->version_minor,
+ version->version_patchlevel);
+ drmFreeVersion(version);
+ R128DRICloseScreen(pScreen);
+ return FALSE;
+ }
+ drmFreeVersion(version);
+ }
+
/* Initialize AGP */
if (!pR128->IsPCI && !R128DRIAgpInit(pR128, pScreen)) {
R128DRICloseScreen(pScreen);
diff --git a/xc/programs/Xserver/hw/xfree86/drivers/tdfx/tdfx.h b/xc/programs/Xserver/hw/xfree86/drivers/tdfx/tdfx.h
index 1a14b1412..10bf7e4aa 100644
--- a/xc/programs/Xserver/hw/xfree86/drivers/tdfx/tdfx.h
+++ b/xc/programs/Xserver/hw/xfree86/drivers/tdfx/tdfx.h
@@ -25,6 +25,13 @@
#include "tdfx_dripriv.h"
#endif
+#define TDFX_VERSION 4000
+#define TDFX_NAME "TDFX"
+#define TDFX_DRIVER_NAME "tdfx"
+#define TDFX_MAJOR_VERSION 1
+#define TDFX_MINOR_VERSION 0
+#define TDFX_PATCHLEVEL 0
+
struct _TDFXRec;
typedef struct _TDFXRec *TDFXPtr;
@@ -37,6 +44,7 @@ typedef struct _TDFXRec *TDFXPtr;
extern Bool TDFXInitPrivate(ScreenPtr pScreen);
extern void TDFXShutdownPrivate(ScreenPtr pScreen);
extern void TDFXSwapContextPrivate(ScreenPtr pScreen);
+extern void TDFXLostContext(ScreenPtr pScreen);
#ifdef XF86DRI
extern void FillPrivateDRI(TDFXPtr pTDFX, TDFXDRIPtr pTDFXDRI);
@@ -202,6 +210,7 @@ extern Bool TDFXDRIFinishScreenInit(ScreenPtr pScreen);
extern Bool TDFXDGAInit(ScreenPtr pScreen);
extern void TDFXCursorGrabMemory(ScreenPtr pScreen);
extern void TDFXSetLFBConfig(TDFXPtr pTDFX);
+extern void TDFXSendNOPPrivate(TDFXPtr pTDFX);
extern Bool TDFXSwitchMode(int scrnIndex, DisplayModePtr mode, int flags);
extern void TDFXAdjustFrame(int scrnIndex, int x, int y, int flags);
@@ -226,6 +235,9 @@ extern void TDFXSetupForSolidFill(ScrnInfoPtr pScrn, int color, int rop,
extern void TDFXSubsequentSolidFillRect(ScrnInfoPtr pScrn, int x, int y,
int w, int h);
+extern void TDFXSelectBuffer(TDFXPtr pTDFX, int which);
+
+
#ifndef PROP_3DFX
#define DECLARE(a)
#define DECLARE_LAUNCH(size, x)
diff --git a/xc/programs/Xserver/hw/xfree86/drivers/tdfx/tdfx_accel.c b/xc/programs/Xserver/hw/xfree86/drivers/tdfx/tdfx_accel.c
index 14365b441..a02fd5308 100644
--- a/xc/programs/Xserver/hw/xfree86/drivers/tdfx/tdfx_accel.c
+++ b/xc/programs/Xserver/hw/xfree86/drivers/tdfx/tdfx_accel.c
@@ -73,8 +73,6 @@ static void TDFXSubsequentCPUToScreenColorExpandFill(ScrnInfoPtr pScrn,
int skipleft);
static void TDFXSubsequentColorExpandScanline(ScrnInfoPtr pScrn, int bufno);
-void TDFXSelectBuffer(TDFXPtr pTDFX, int which);
-
void
TDFXNeedSync(ScrnInfoPtr pScrn) {
TDFXPtr pTDFX = TDFXPTR(pScrn);
diff --git a/xc/programs/Xserver/hw/xfree86/drivers/tdfx/tdfx_dri.c b/xc/programs/Xserver/hw/xfree86/drivers/tdfx/tdfx_dri.c
index 0304d8f19..f8f0a6cb1 100644
--- a/xc/programs/Xserver/hw/xfree86/drivers/tdfx/tdfx_dri.c
+++ b/xc/programs/Xserver/hw/xfree86/drivers/tdfx/tdfx_dri.c
@@ -4,7 +4,6 @@
#include "xf86_OSproc.h"
#include "xf86_ansic.h"
#include "xf86Priv.h"
-
#include "xf86PciInfo.h"
#include "xf86Pci.h"
#define PSZ 8
@@ -12,11 +11,8 @@
#undef PSZ
#include "cfb16.h"
#include "cfb32.h"
-
#include "miline.h"
-
#include "GL/glxtokens.h"
-
#include "tdfx.h"
#include "tdfx_dri.h"
#include "tdfx_dripriv.h"
@@ -24,7 +20,6 @@
static char TDFXKernelDriverName[] = "tdfx";
static char TDFXClientDriverName[] = "tdfx";
-static Bool TDFXInitVisualConfigs(ScreenPtr pScreen);
static Bool TDFXCreateContext(ScreenPtr pScreen, VisualPtr visual,
drmContext hwContext, void *pVisualConfigPriv,
DRIContextType contextStore);
@@ -58,22 +53,24 @@ TDFXInitVisualConfigs(ScreenPtr pScreen)
case 16:
numConfigs = 8;
- if (!(pConfigs = (__GLXvisualConfig*)xnfcalloc(sizeof(__GLXvisualConfig),
- numConfigs))) {
+ pConfigs = (__GLXvisualConfig*) xnfcalloc(sizeof(__GLXvisualConfig), numConfigs);
+ if (!pConfigs)
return FALSE;
- }
- if (!(pTDFXConfigs = (TDFXConfigPrivPtr)xnfcalloc(sizeof(TDFXConfigPrivRec),
- numConfigs))) {
+
+ pTDFXConfigs = (TDFXConfigPrivPtr) xnfcalloc(sizeof(TDFXConfigPrivRec), numConfigs);
+ if (!pTDFXConfigs) {
xfree(pConfigs);
return FALSE;
}
- if (!(pTDFXConfigPtrs = (TDFXConfigPrivPtr*)xnfcalloc(sizeof(TDFXConfigPrivPtr),
- numConfigs))) {
+
+ pTDFXConfigPtrs = (TDFXConfigPrivPtr *) xnfcalloc(sizeof(TDFXConfigPrivPtr), numConfigs);
+ if (!pTDFXConfigPtrs) {
xfree(pConfigs);
xfree(pTDFXConfigs);
return FALSE;
}
- for (i=0; i<numConfigs; i++)
+
+ for (i = 0; i < numConfigs; i++)
pTDFXConfigPtrs[i] = &pTDFXConfigs[i];
i=0;
@@ -133,7 +130,8 @@ TDFXInitVisualConfigs(ScreenPtr pScreen)
}
}
if (i!=numConfigs) {
- ErrorF("Incorrect initialization of visuals\n");
+ xf86DrvMsg(pScreen->myNum, X_ERROR,
+ "Incorrect initialization of visuals\n");
return FALSE;
}
break;
@@ -162,8 +160,21 @@ Bool TDFXDRIScreenInit(ScreenPtr pScreen)
if (!LoaderSymbol("drmAvailable")) return FALSE;
#endif
+ /* Check the DRI version */
+ {
+ int major, minor, patch;
+ DRIQueryVersion(&major, &minor, &patch);
+ if (major != 3 || minor != 0 || patch < 0) {
+ xf86DrvMsg(pScreen->myNum, X_ERROR,
+ "TDFXDRIScreenInit failed (DRI version = %d.%d.%d, expected 3.0.x). Disabling DRI.\n",
+ major, minor, patch);
+ return FALSE;
+ }
+ }
+
pDRIInfo = DRICreateInfoRec();
- if (!pDRIInfo) return FALSE;
+ if (!pDRIInfo)
+ return FALSE;
pTDFX->pDRIInfo = pDRIInfo;
pDRIInfo->drmDriverName = TDFXKernelDriverName;
@@ -173,9 +184,9 @@ Bool TDFXDRIScreenInit(ScreenPtr pScreen)
((pciConfigPtr)pTDFX->PciInfo->thisCard)->busnum,
((pciConfigPtr)pTDFX->PciInfo->thisCard)->devnum,
((pciConfigPtr)pTDFX->PciInfo->thisCard)->funcnum);
- pDRIInfo->ddxDriverMajorVersion = 0;
- pDRIInfo->ddxDriverMinorVersion = 1;
- pDRIInfo->ddxDriverPatchVersion = 0;
+ pDRIInfo->ddxDriverMajorVersion = TDFX_MAJOR_VERSION;
+ pDRIInfo->ddxDriverMinorVersion = TDFX_MINOR_VERSION;
+ pDRIInfo->ddxDriverPatchVersion = TDFX_PATCHLEVEL;
pDRIInfo->frameBufferPhysicalAddress = pTDFX->LinearAddr;
pDRIInfo->frameBufferSize = pTDFX->FbMapSize;
pDRIInfo->frameBufferStride = pTDFX->stride;
@@ -198,7 +209,7 @@ Bool TDFXDRIScreenInit(ScreenPtr pScreen)
* in the SAREA header
*/
if (sizeof(XF86DRISAREARec)+sizeof(TDFXSAREAPriv)>SAREA_MAX) {
- ErrorF("Data does not fit in SAREA\n");
+ xf86DrvMsg(pScreen->myNum, X_ERROR, "Data does not fit in SAREA\n");
return FALSE;
}
pDRIInfo->SAREASize = SAREA_MAX;
@@ -228,6 +239,27 @@ Bool TDFXDRIScreenInit(ScreenPtr pScreen)
return FALSE;
}
+ /* Check the TDFX DRM version */
+ {
+ drmVersionPtr version = drmGetVersion(pTDFX->drmSubFD);
+ if (version) {
+ if (version->version_major != 1 ||
+ version->version_minor != 0 ||
+ version->version_patchlevel < 0) {
+ /* incompatible drm version */
+ xf86DrvMsg(pScreen->myNum, X_ERROR,
+ "TDFXDRIScreenInit failed (DRM version = %d.%d.%d, expected 1.0.x). Disabling DRI.\n",
+ version->version_major,
+ version->version_minor,
+ version->version_patchlevel);
+ TDFXDRICloseScreen(pScreen);
+ drmFreeVersion(version);
+ return FALSE;
+ }
+ drmFreeVersion(version);
+ }
+ }
+
pTDFXDRI->regsSize=TDFXIOMAPSIZE;
if (drmAddMap(pTDFX->drmSubFD, (drmHandle)pTDFX->MMIOAddr,
pTDFXDRI->regsSize, DRM_REGISTERS, 0, &pTDFXDRI->regs)<0) {
diff --git a/xc/programs/Xserver/hw/xfree86/drivers/tdfx/tdfx_driver.c b/xc/programs/Xserver/hw/xfree86/drivers/tdfx/tdfx_driver.c
index 0c0d046a4..9f1483629 100644
--- a/xc/programs/Xserver/hw/xfree86/drivers/tdfx/tdfx_driver.c
+++ b/xc/programs/Xserver/hw/xfree86/drivers/tdfx/tdfx_driver.c
@@ -146,17 +146,11 @@ static void TDFXDisplayPowerManagementSet(ScrnInfoPtr pScrn,
int PowerManagermentMode, int flags);
#endif
-#define VERSION 4000
-#define TDFX_NAME "TDFX"
-#define TDFX_DRIVER_NAME "tdfx"
-#define TDFX_MAJOR_VERSION 1
-#define TDFX_MINOR_VERSION 0
-#define TDFX_PATCHLEVEL 0
#define PCI_SUBDEVICE_ID_VOODOO3_2000 0x0036
#define PCI_SUBDEVICE_ID_VOODOO3_3000 0x003a
DriverRec TDFX = {
- VERSION,
+ TDFX_VERSION,
TDFX_DRIVER_NAME,
#if 0
"Accelerated driver for 3dfx Voodoo Banshee and Voodoo3 cards",
@@ -434,7 +428,7 @@ TDFXProbe(DriverPtr drv, int flags) {
/* Allocate new ScrnInfoRec and claim the slot */
pScrn = xf86AllocateScreen(drv, 0);
- pScrn->driverVersion = VERSION;
+ pScrn->driverVersion = TDFX_VERSION;
pScrn->driverName = TDFX_DRIVER_NAME;
pScrn->name = TDFX_NAME;
pScrn->Probe = TDFXProbe;
@@ -539,7 +533,7 @@ TDFXCountRam(ScrnInfoPtr pScrn) {
extern xf86MonPtr ConfiguredMonitor;
-void
+static void
TDFXProbeDDC(ScrnInfoPtr pScrn, int index)
{
vbeInfoPtr pVbe;
diff --git a/xc/programs/Xserver/hw/xfree86/drivers/tdfx/tdfx_priv.c b/xc/programs/Xserver/hw/xfree86/drivers/tdfx/tdfx_priv.c
index e8a75056f..7082547df 100644
--- a/xc/programs/Xserver/hw/xfree86/drivers/tdfx/tdfx_priv.c
+++ b/xc/programs/Xserver/hw/xfree86/drivers/tdfx/tdfx_priv.c
@@ -23,14 +23,14 @@
C - D-1 : Z buffer
*/
-void TDFXSendNOPPrivate2D(TDFXPtr pTDFX)
+static void TDFXSendNOPPrivate2D(TDFXPtr pTDFX)
{
TDFXAllocateSlots(pTDFX, 2);
SET_3DPK4_HEADER(1, 0x48);
WRITE_FIFO(pTDFX, 0, 0);
}
-void TDFXSendNOPPrivate3D(TDFXPtr pTDFX)
+static void TDFXSendNOPPrivate3D(TDFXPtr pTDFX)
{
TDFXAllocateSlots(pTDFX, 2);
SET_PKT2_HEADER(SSTCP_COMMAND);
@@ -43,7 +43,7 @@ void TDFXSendNOPPrivate(TDFXPtr pTDFX)
TDFXSendNOPPrivate3D(pTDFX);
}
-void InstallFifo(TDFXPtr pTDFX)
+static void InstallFifo(TDFXPtr pTDFX)
{
/* Install the fifo */
TDFXWriteLongMMIO(pTDFX, SST_FIFO_BASEADDR0, pTDFX->fifoOffset>>12);
@@ -68,7 +68,7 @@ void InstallFifo(TDFXPtr pTDFX)
TDFXSendNOPPrivate(pTDFX);
}
-void TDFXResetFifo(TDFXPtr pTDFX)
+static void TDFXResetFifo(TDFXPtr pTDFX)
{
int oldValue;
CARD32 start_sec, end_sec, dummy;
@@ -102,7 +102,7 @@ void TDFXResetFifo(TDFXPtr pTDFX)
!!! We should use expedential backoff in our reads !!!
*/
-void TDFXSyncFifo(ScrnInfoPtr pScrn)
+static void TDFXSyncFifo(ScrnInfoPtr pScrn)
{
TDFXPtr pTDFX;
int i, cnt;
@@ -190,7 +190,6 @@ void TDFXSwapContextPrivate(ScreenPtr pScreen)
ScrnInfoPtr pScrn;
TDFXPtr pTDFX;
int dummy, readPos;
- int offset;
TDFXSAREAPriv *sPriv;
pScrn = xf86Screens[pScreen->myNum];
@@ -226,7 +225,8 @@ void TDFXSwapContextPrivate(ScreenPtr pScreen)
pTDFX->fifoSlots = pTDFX->fifoEnd-pTDFX->fifoPtr-8;
}
-void TDFXLostContext(ScreenPtr pScreen) {
+void TDFXLostContext(ScreenPtr pScreen)
+{
ScrnInfoPtr pScrn;
TDFXPtr pTDFX;
TDFXSAREAPriv *sPriv;
@@ -312,7 +312,8 @@ TDFXMakeSpace(TDFXPtr pTDFX, uint32 slots)
}
void
-TDFXAllocateSlots(TDFXPtr pTDFX, int slots) {
+TDFXAllocateSlots(TDFXPtr pTDFX, int slots)
+{
#ifdef TDFX_DEBUG_FIFO
if (pTDFX->fifoEnd-pTDFX->fifoPtr<pTDFX->fifoSlots)
ErrorF("FIFO overrun\n");
diff --git a/xc/programs/Xserver/hw/xfree86/loader/xf86sym.c b/xc/programs/Xserver/hw/xfree86/loader/xf86sym.c
index b1589b67e..9844d6d90 100644
--- a/xc/programs/Xserver/hw/xfree86/loader/xf86sym.c
+++ b/xc/programs/Xserver/hw/xfree86/loader/xf86sym.c
@@ -785,6 +785,8 @@ LOOKUP xfree86LookupTab[] = {
SYMFUNC(xf86fstat)
SYMFUNC(xf86access)
SYMFUNC(xf86geteuid)
+ SYMFUNC(xf86getegid)
+ SYMFUNC(xf86getpid)
SYMFUNC(xf86mknod)
SYMFUNC(xf86chmod)
SYMFUNC(xf86chown)
diff --git a/xc/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel/Makefile.linux b/xc/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel/Makefile.linux
index 368c3c850..ecc196bdd 100644
--- a/xc/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel/Makefile.linux
+++ b/xc/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel/Makefile.linux
@@ -1,7 +1,8 @@
# Makefile -- For the Direct Rendering Manager module (drm)
# Created: Mon Jan 4 09:26:53 1999 by faith@precisioninsight.com
#
-# Copyright 1999, 2000 Precision Insight, Inc., Cedar Park, Texas.
+# Copyright 1999 Precision Insight, Inc., Cedar Park, Texas.
+# Copyright 2000 VA Linux Systems, Inc., Sunnyvale, California.
# All rights reserved.
#
# Permission is hereby granted, free of charge, to any person obtaining a
@@ -23,8 +24,22 @@
# ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
# DEALINGS IN THE SOFTWARE.
#
-# $XFree86: xc/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel/Makefile.linux,v 1.6 2000/02/23 04:47:25 martin Exp $
-#
+#
+# ***** NOTE NOTE NOTE NOTE NOTE *****
+# To override the automatic Linux source tree determination, pass the
+# pathname for the kernel that you want to compile on the command line,
+# like this:
+# make TREE=/usr/my-kernel-tree/include
+#
+#
+# ***** NOTE NOTE NOTE NOTE NOTE *****
+# Because some distributions patch 2.2.x kernels to make kill_fasync have
+# three parameters, this script tries to determine, via the examination of
+# header files, if your kernel has been patched. If this detection is
+# incorrect, you can override the value on the command line, like this:
+# make PARAMS=2
+# or
+# make PARAMS=3
.SUFFIXES:
@@ -96,11 +111,6 @@ endif
endif
endif
-# To override this determination, pass the path on the make command line:
-# make TREE=/usr/my-kernel-tree/include
-# or hardcode a value for TREE here:
-# TREE:=/usr/include
-
ifeq ($(TREE),0)
all:; @echo Error: Could not locate kernel tree in $A $B $C
else
@@ -110,6 +120,8 @@ MODVERSIONS := $(shell gcc -E -I $(TREE) picker.c 2>/dev/null \
| grep -s 'MODVERSIONS = ' | cut -d' ' -f3)
AGP := $(shell gcc -E -nostdinc -I$(TREE) picker.c 2>/dev/null \
| grep -s 'AGP = ' | cut -d' ' -f3)
+PARAMS := $(shell if fgrep kill_fasync $(TREE)/linux/fs.h \
+ | fgrep -q band; then echo 3; else echo 2; fi)
ifeq ($(AGP),0)
AGP := $(shell gcc -E -nostdinc -I$(TREE) picker.c 2>/dev/null \
| grep -s 'AGP_MODULE = ' | cut -d' ' -f3)
@@ -127,8 +139,9 @@ I810OBJS= i810_drv.o i810_dma.o i810_bufs.o i810_context.o
I810HEADERS= i810_drv.h $(DRMHEADERS)
endif
-all::;@echo KERNEL HEADERS IN $(TREE): SMP=${SMP} MODVERSIONS=${MODVERSIONS} \
- AGP=${AGP}
+all::;@echo === KERNEL HEADERS IN $(TREE)
+all::;@echo === SMP=${SMP} MODVERSIONS=${MODVERSIONS} AGP=${AGP}
+all::;@echo === kill_fasync has $(PARAMS) parameters
all:: $(LIBS) $(MODS) $(PROGS)
endif
@@ -141,7 +154,9 @@ endif
ifeq ($(MODVERSIONS),1)
MODCFLAGS += -DMODVERSIONS -include $(TREE)/linux/modversions.h
endif
-
+ifeq ($(PARAMS),3)
+MODCFLAGS += -DKILLFASYNCHASTHREEPARAMETERS
+endif
# **** End of configuration
@@ -178,7 +193,7 @@ ChangeLog:
# .o files are used for modules
%.o: %.c
- $(CC) $(MODCFLAGS) -c $< -o $@
+ $(CC) $(MODCFLAGS) -I$(TREE) -c $< -o $@
%.po: %.c
$(CC) $(PRGCFLAGS) -DDRM_USE_MALLOC -c $< -o $@
diff --git a/xc/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel/agpsupport.c b/xc/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel/agpsupport.c
index 14fb8b53f..c89c3e258 100644
--- a/xc/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel/agpsupport.c
+++ b/xc/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel/agpsupport.c
@@ -2,6 +2,7 @@
* Created: Mon Dec 13 09:56:45 1999 by faith@precisioninsight.com
*
* Copyright 1999 Precision Insight, Inc., Cedar Park, Texas.
+ * Copyright 2000 VA Linux Systems, Inc., Sunnyvale, California.
* All Rights Reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a
@@ -23,9 +24,7 @@
* ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
* DEALINGS IN THE SOFTWARE.
*
- * Author: Rickard E. (Rik) Faith <faith@precisioninsight.com>
- *
- * $XFree86: xc/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel/agpsupport.c,v 1.1 2000/02/11 17:26:02 dawes Exp $
+ * Author: Rickard E. (Rik) Faith <faith@valinux.com>
*
*/
diff --git a/xc/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel/auth.c b/xc/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel/auth.c
index 0e3b1c565..b133bc506 100644
--- a/xc/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel/auth.c
+++ b/xc/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel/auth.c
@@ -1,8 +1,8 @@
/* auth.c -- IOCTLs for authentication -*- linux-c -*-
* Created: Tue Feb 2 08:37:54 1999 by faith@precisioninsight.com
- * Revised: Fri Aug 20 11:31:48 1999 by faith@precisioninsight.com
*
* Copyright 1999 Precision Insight, Inc., Cedar Park, Texas.
+ * Copyright 2000 VA Linux Systems, Inc., Sunnyvale, California.
* All Rights Reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a
@@ -24,7 +24,8 @@
* ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
* DEALINGS IN THE SOFTWARE.
*
- * $XFree86: xc/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel/auth.c,v 1.2 2000/02/23 04:47:25 martin Exp $
+ * Authors:
+ * Rickard E. (Rik) Faith <faith@valinux.com>
*
*/
@@ -44,7 +45,6 @@ static drm_file_t *drm_find_file(drm_device_t *dev, drm_magic_t magic)
down(&dev->struct_sem);
for (pt = dev->magiclist[hash].head; pt; pt = pt->next) {
- if (pt->priv->authenticated) continue;
if (pt->magic == magic) {
retval = pt->priv;
break;
diff --git a/xc/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel/bufs.c b/xc/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel/bufs.c
index 7902f0ccf..011e42410 100644
--- a/xc/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel/bufs.c
+++ b/xc/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel/bufs.c
@@ -1,8 +1,8 @@
/* bufs.c -- IOCTLs to manage buffers -*- linux-c -*-
* Created: Tue Feb 2 08:37:54 1999 by faith@precisioninsight.com
- * Revised: Mon Feb 14 00:14:11 2000 by kevin@precisioninsight.com
*
- * Copyright 1999 Precision Insight, Inc., Cedar Park, Texas.
+ * Copyright 1999, 2000 Precision Insight, Inc., Cedar Park, Texas.
+ * Copyright 2000 VA Linux Systems, Inc., Sunnyvale, California.
* All Rights Reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a
@@ -24,11 +24,13 @@
* ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
* DEALINGS IN THE SOFTWARE.
*
- * $XFree86: xc/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel/bufs.c,v 1.5 2000/02/23 04:47:25 martin Exp $
+ * Authors:
+ * Rickard E. (Rik) Faith <faith@valinux.com>
*
*/
#define __NO_VERSION__
+#include <linux/config.h>
#include "drmP.h"
#include "linux/un.h"
diff --git a/xc/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel/context.c b/xc/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel/context.c
index fdf8fd9f1..ca491094e 100644
--- a/xc/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel/context.c
+++ b/xc/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel/context.c
@@ -1,8 +1,8 @@
/* context.c -- IOCTLs for contexts and DMA queues -*- linux-c -*-
* Created: Tue Feb 2 08:37:54 1999 by faith@precisioninsight.com
- * Revised: Fri Aug 20 11:32:09 1999 by faith@precisioninsight.com
*
* Copyright 1999 Precision Insight, Inc., Cedar Park, Texas.
+ * Copyright 2000 VA Linux Systems, Inc., Sunnyvale, California.
* All Rights Reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a
@@ -24,7 +24,8 @@
* ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
* DEALINGS IN THE SOFTWARE.
*
- * $XFree86: xc/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel/context.c,v 1.2 2000/02/23 04:47:26 martin Exp $
+ * Authors:
+ * Rickard E. (Rik) Faith <faith@valinux.com>
*
*/
diff --git a/xc/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel/ctxbitmap.c b/xc/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel/ctxbitmap.c
index 781984f11..615505979 100644
--- a/xc/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel/ctxbitmap.c
+++ b/xc/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel/ctxbitmap.c
@@ -1,7 +1,8 @@
/* ctxbitmap.c -- Context bitmap management -*- linux-c -*-
* Created: Thu Jan 6 03:56:42 2000 by jhartmann@precisioninsight.com
*
- * Copyright 1999 Precision Insight, Inc., Cedar Park, Texas.
+ * Copyright 2000 Precision Insight, Inc., Cedar Park, Texas.
+ * Copyright 2000 VA Linux Systems, Inc., Sunnyvale, California.
* All Rights Reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a
@@ -23,9 +24,7 @@
* ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
* DEALINGS IN THE SOFTWARE.
*
- * Author: Jeff Hartmann <jhartmann@precisioninsight.com>
- *
- * $XFree86: xc/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel/ctxbitmap.c,v 1.1 2000/02/11 17:26:02 dawes Exp $
+ * Author: Jeff Hartmann <jhartmann@valinux.com>
*
*/
diff --git a/xc/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel/dma.c b/xc/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel/dma.c
index 37ab674f8..ac2d1bc5a 100644
--- a/xc/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel/dma.c
+++ b/xc/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel/dma.c
@@ -1,8 +1,8 @@
/* dma.c -- DMA IOCTL and function support -*- linux-c -*-
* Created: Fri Mar 19 14:30:16 1999 by faith@precisioninsight.com
- * Revised: Sun Feb 13 23:19:45 2000 by kevin@precisioninsight.com
*
- * Copyright 1999 Precision Insight, Inc., Cedar Park, Texas.
+ * Copyright 1999, 2000 Precision Insight, Inc., Cedar Park, Texas.
+ * Copyright 2000 VA Linux Systems, Inc., Sunnyvale, California.
* All Rights Reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a
@@ -24,7 +24,8 @@
* ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
* DEALINGS IN THE SOFTWARE.
*
- * $XFree86: xc/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel/dma.c,v 1.5 2000/02/23 04:47:26 martin Exp $
+ * Authors:
+ * Rickard E. (Rik) Faith <faith@valinuxa.com>
*
*/
diff --git a/xc/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel/drawable.c b/xc/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel/drawable.c
index c7acecb97..03839f5be 100644
--- a/xc/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel/drawable.c
+++ b/xc/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel/drawable.c
@@ -1,8 +1,8 @@
/* drawable.c -- IOCTLs for drawables -*- linux-c -*-
* Created: Tue Feb 2 08:37:54 1999 by faith@precisioninsight.com
- * Revised: Fri Aug 20 09:27:03 1999 by faith@precisioninsight.com
*
* Copyright 1999 Precision Insight, Inc., Cedar Park, Texas.
+ * Copyright 2000 VA Linux Systems, Inc., Sunnyvale, California.
* All Rights Reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a
@@ -24,7 +24,8 @@
* ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
* DEALINGS IN THE SOFTWARE.
*
- * $XFree86: xc/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel/drawable.c,v 1.2 2000/02/23 04:47:26 martin Exp $
+ * Authors:
+ * Rickard E. (Rik) Faith <faith@valinux.com>
*
*/
diff --git a/xc/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel/drm.h b/xc/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel/drm.h
index c63d0f637..c8c5581da 100644
--- a/xc/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel/drm.h
+++ b/xc/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel/drm.h
@@ -1,7 +1,8 @@
/* drm.h -- Header for Direct Rendering Manager -*- linux-c -*-
* Created: Mon Jan 4 10:05:05 1999 by faith@precisioninsight.com
*
- * Copyright 1999, 2000 Precision Insight, Inc., Cedar Park, Texas.
+ * Copyright 1999 Precision Insight, Inc., Cedar Park, Texas.
+ * Copyright 2000 VA Linux Systems, Inc., Sunnyvale, California.
* All rights reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a
@@ -22,8 +23,9 @@
* 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.
- *
- * $XFree86: xc/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel/drm.h,v 1.5 2000/02/23 04:47:26 martin Exp $
+ *
+ * Authors:
+ * Rickard E. (Rik) Faith <faith@valinux.com>
*
* Acknowledgements:
* Dec 1999, Richard Henderson <rth@twiddle.net>, move to generic cmpxchg.
diff --git a/xc/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel/drmP.h b/xc/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel/drmP.h
index 43670e28a..350d1ef9b 100644
--- a/xc/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel/drmP.h
+++ b/xc/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel/drmP.h
@@ -1,7 +1,8 @@
/* drmP.h -- Private header for Direct Rendering Manager -*- linux-c -*-
* Created: Mon Jan 4 10:05:05 1999 by faith@precisioninsight.com
*
- * Copyright 1999, 2000 Precision Insight, Inc., Cedar Park, Texas.
+ * Copyright 1999 Precision Insight, Inc., Cedar Park, Texas.
+ * Copyright 2000 VA Linux Systems, Inc., Sunnyvale, California.
* All rights reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a
@@ -23,7 +24,8 @@
* ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
* DEALINGS IN THE SOFTWARE.
*
- * $XFree86: xc/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel/drmP.h,v 1.6 2000/02/23 04:47:27 martin Exp $
+ * Authors:
+ * Rickard E. (Rik) Faith <faith@valinux.com>
*
*/
@@ -528,6 +530,7 @@ typedef struct drm_device {
/* Misc. support (init.c) */
extern int drm_flags;
extern void drm_parse_options(char *s);
+extern int drm_cpu_valid(void);
/* Device support (fops.c) */
diff --git a/xc/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel/drmstat.c b/xc/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel/drmstat.c
index a96a38b26..8c691c49b 100644
--- a/xc/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel/drmstat.c
+++ b/xc/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel/drmstat.c
@@ -1,8 +1,8 @@
/* drmstat.c -- DRM device status and testing program
* Created: Tue Jan 5 08:19:24 1999 by faith@precisioninsight.com
- * Revised: Sun Feb 13 23:35:00 2000 by kevin@precisioninsight.com
*
* Copyright 1999 Precision Insight, Inc., Cedar Park, Texas.
+ * Copyright 2000 VA Linux Systems, Inc., Sunnyvale, California.
* All Rights Reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a
@@ -24,7 +24,7 @@
* ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
* DEALINGS IN THE SOFTWARE.
*
- * $XFree86: xc/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel/drmstat.c,v 1.6 2000/02/23 04:47:27 martin Exp $
+ * Authors: Rickard E. (Rik) Faith <faith@valinux.com>
*
*/
diff --git a/xc/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel/fops.c b/xc/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel/fops.c
index 1c1a3584e..1eb2bdac7 100644
--- a/xc/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel/fops.c
+++ b/xc/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel/fops.c
@@ -1,8 +1,8 @@
/* fops.c -- File operations for DRM -*- linux-c -*-
* Created: Mon Jan 4 08:58:31 1999 by faith@precisioninsight.com
- * Revised: Fri Dec 3 10:26:26 1999 by faith@precisioninsight.com
*
* Copyright 1999 Precision Insight, Inc., Cedar Park, Texas.
+ * Copyright 2000 VA Linux Systems, Inc., Sunnyvale, California.
* All Rights Reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a
@@ -23,8 +23,10 @@
* 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.
- *
- * $XFree86: xc/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel/fops.c,v 1.6 2000/02/23 04:47:27 martin Exp $
+ *
+ * Authors:
+ * Rickard E. (Rik) Faith <faith@valinux.com>
+ * Daryll Strauss <daryll@valinux.com>
*
*/
@@ -40,6 +42,7 @@ int drm_open_helper(struct inode *inode, struct file *filp, drm_device_t *dev)
drm_file_t *priv;
if (filp->f_flags & O_EXCL) return -EBUSY; /* No exclusive opens */
+ if (!drm_cpu_valid()) return -EINVAL;
DRM_DEBUG("pid = %d, minor = %d\n", current->pid, minor);
@@ -211,11 +214,15 @@ int drm_write_string(drm_device_t *dev, const char *s)
send -= count;
}
-#if LINUX_VERSION_CODE < 0x02020e || \
- ( LINUX_VERSION_CODE > 0x020300 && LINUX_VERSION_CODE < 0x020315 )
+#if LINUX_VERSION_CODE < 0x020315 && !defined(KILLFASYNCHASTHREEPARAMETERS)
+ /* The extra parameter to kill_fasync was added in 2.3.21, and is
+ _not_ present in _stock_ 2.2.14 and 2.2.15. However, some
+ distributions patch 2.2.x kernels to add this parameter. The
+ Makefile.linux attempts to detect this addition and defines
+ KILLFASYNCHASTHREEPARAMETERS if three parameters are found. */
if (dev->buf_async) kill_fasync(dev->buf_async, SIGIO);
#else
- /* Parameter added in 2.2.14 and 2.3.21 */
+ /* Parameter added in 2.3.21 */
if (dev->buf_async) kill_fasync(dev->buf_async, SIGIO, POLL_IN);
#endif
DRM_DEBUG("waking\n");
diff --git a/xc/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel/gamma_dma.c b/xc/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel/gamma_dma.c
index 444f25efb..eb78c0374 100644
--- a/xc/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel/gamma_dma.c
+++ b/xc/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel/gamma_dma.c
@@ -1,8 +1,8 @@
/* gamma_dma.c -- DMA support for GMX 2000 -*- linux-c -*-
* Created: Fri Mar 19 14:30:16 1999 by faith@precisioninsight.com
- * Revised: Thu Sep 16 12:55:37 1999 by faith@precisioninsight.com
*
* Copyright 1999 Precision Insight, Inc., Cedar Park, Texas.
+ * Copyright 2000 VA Linux Systems, Inc., Sunnyvale, California.
* All Rights Reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a
@@ -23,8 +23,9 @@
* 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.
- *
- * $XFree86: xc/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel/gamma_dma.c,v 1.2 2000/02/23 04:47:28 martin Exp $
+ *
+ * Authors:
+ * Rickard E. (Rik) Faith <faith@valinux.com>
*
*/
diff --git a/xc/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel/gamma_drv.c b/xc/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel/gamma_drv.c
index 875952443..d42cf4aea 100644
--- a/xc/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel/gamma_drv.c
+++ b/xc/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel/gamma_drv.c
@@ -1,8 +1,8 @@
/* gamma.c -- 3dlabs GMX 2000 driver -*- linux-c -*-
* Created: Mon Jan 4 08:58:31 1999 by faith@precisioninsight.com
- * Revised: Tue Oct 12 08:51:36 1999 by faith@precisioninsight.com
*
* Copyright 1999 Precision Insight, Inc., Cedar Park, Texas.
+ * Copyright 2000 VA Linux Systems, Inc., Sunnyvale, California.
* All Rights Reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a
@@ -24,7 +24,8 @@
* ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
* DEALINGS IN THE SOFTWARE.
*
- * $XFree86: xc/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel/gamma_drv.c,v 1.4 2000/02/23 04:47:28 martin Exp $
+ * Authors:
+ * Rickard E. (Rik) Faith <faith@valinux.com>
*
*/
@@ -38,9 +39,9 @@ EXPORT_SYMBOL(gamma_cleanup);
#define GAMMA_NAME "gamma"
#define GAMMA_DESC "3dlabs GMX 2000"
#define GAMMA_DATE "19990830"
-#define GAMMA_MAJOR 0
+#define GAMMA_MAJOR 1
#define GAMMA_MINOR 0
-#define GAMMA_PATCHLEVEL 5
+#define GAMMA_PATCHLEVEL 0
static drm_device_t gamma_device;
@@ -125,7 +126,7 @@ void cleanup_module(void)
#ifndef MODULE
/* gamma_setup is called by the kernel to parse command-line options passed
* via the boot-loader (e.g., LILO). It calls the insmod option routine,
- * drm_parse_drm.
+ * drm_parse_options.
*
* This is not currently supported, since it requires changes to
* linux/init/main.c. */
@@ -275,10 +276,12 @@ static int gamma_takedown(drm_device_t *dev)
- PAGE_SHIFT,
DRM_MEM_SAREA);
break;
+#ifdef DRM_AGP
case _DRM_AGP:
/* Do nothing here, because this is all
handled in the AGP/GART driver. */
break;
+#endif
}
drm_free(map, sizeof(*map), DRM_MEM_MAPS);
}
diff --git a/xc/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel/gamma_drv.h b/xc/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel/gamma_drv.h
index 3d5b5dec1..55dc26bec 100644
--- a/xc/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel/gamma_drv.h
+++ b/xc/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel/gamma_drv.h
@@ -1,8 +1,8 @@
/* gamma_drv.h -- Private header for 3dlabs GMX 2000 driver -*- linux-c -*-
* Created: Mon Jan 4 10:05:05 1999 by faith@precisioninsight.com
- * Revised: Fri Aug 20 09:24:27 1999 by faith@precisioninsight.com
*
* Copyright 1999 Precision Insight, Inc., Cedar Park, Texas.
+ * Copyright 2000 VA Linux Systems, Inc., Sunnyvale, California.
* All rights reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a
@@ -24,8 +24,6 @@
* ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
* DEALINGS IN THE SOFTWARE.
*
- * $XFree86: xc/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel/gamma_drv.h,v 1.2 2000/02/23 04:47:28 martin Exp $
- *
*/
#ifndef _GAMMA_DRV_H_
diff --git a/xc/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel/i810_bufs.c b/xc/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel/i810_bufs.c
index 9737ae92d..fa1f84dcd 100644
--- a/xc/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel/i810_bufs.c
+++ b/xc/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel/i810_bufs.c
@@ -2,6 +2,7 @@
* Created: Thu Jan 6 01:47:26 2000 by jhartmann@precisioninsight.com
*
* Copyright 1999 Precision Insight, Inc., Cedar Park, Texas.
+ * Copyright 2000 VA Linux Systems, Inc., Sunnyvale, California.
* All Rights Reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a
@@ -23,11 +24,9 @@
* ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
* DEALINGS IN THE SOFTWARE.
*
- * Authors: Rickard E. (Rik) Faith <faith@precisioninsight.com>
- * Jeff Hartmann <jhartmann@precisioninsight.com>
+ * Authors: Rickard E. (Rik) Faith <faith@valinux.com>
+ * Jeff Hartmann <jhartmann@valinux.com>
*
- * $XFree86: xc/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel/i810_bufs.c,v 1.1 2000/02/11 17:26:04 dawes Exp $
- *
*/
#define __NO_VERSION__
diff --git a/xc/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel/i810_context.c b/xc/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel/i810_context.c
index 5503edf24..689814db5 100644
--- a/xc/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel/i810_context.c
+++ b/xc/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel/i810_context.c
@@ -2,6 +2,7 @@
* Created: Mon Dec 13 09:51:35 1999 by faith@precisioninsight.com
*
* Copyright 1999 Precision Insight, Inc., Cedar Park, Texas.
+ * Copyright 2000 VA Linux Systems, Inc., Sunnyvale, California.
* All Rights Reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a
@@ -23,9 +24,8 @@
* ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
* DEALINGS IN THE SOFTWARE.
*
- * Author: Rickard E. (Rik) Faith <faith@precisioninsight.com>
- *
- * $XFree86$
+ * Authors: Rickard E. (Rik) Faith <faith@valinux.com>
+ * Jeff Hartmann <jhartmann@valinux.com>
*
*/
diff --git a/xc/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel/i810_dma.c b/xc/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel/i810_dma.c
index 2380a434c..94f35b61c 100644
--- a/xc/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel/i810_dma.c
+++ b/xc/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel/i810_dma.c
@@ -2,6 +2,7 @@
* Created: Mon Dec 13 01:50:01 1999 by jhartmann@precisioninsight.com
*
* Copyright 1999 Precision Insight, Inc., Cedar Park, Texas.
+ * Copyright 2000 VA Linux Systems, Inc., Sunnyvale, California.
* All Rights Reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a
@@ -23,11 +24,9 @@
* ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
* DEALINGS IN THE SOFTWARE.
*
- * Authors: Rickard E. (Rik) Faith <faith@precisioninsight.com>
- * Jeff Hartmann <jhartmann@precisioninsight.com>
- * Keith Whitwell <keithw@precisioninsight.com>
- *
- * $XFree86$
+ * Authors: Rickard E. (Rik) Faith <faith@valinux.com>
+ * Jeff Hartmann <jhartmann@valinux.com>
+ * Keith Whitwell <keithw@valinux.com>
*
*/
diff --git a/xc/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel/i810_drv.c b/xc/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel/i810_drv.c
index 75b402daa..b523db902 100644
--- a/xc/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel/i810_drv.c
+++ b/xc/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel/i810_drv.c
@@ -2,6 +2,7 @@
* Created: Mon Dec 13 01:56:22 1999 by jhartmann@precisioninsight.com
*
* Copyright 1999 Precision Insight, Inc., Cedar Park, Texas.
+ * Copyright 2000 VA Linux Systems, Inc., Sunnyvale, California.
* All Rights Reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a
@@ -23,10 +24,8 @@
* ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
* DEALINGS IN THE SOFTWARE.
*
- * Authors: Rickard E. (Rik) Faith <faith@precisioninsight.com>
- * Jeff Hartmann <jhartmann@precisioninsight.com>
- *
- * $XFree86: xc/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel/i810_drv.c,v 1.1 2000/02/11 17:26:05 dawes Exp $
+ * Authors: Rickard E. (Rik) Faith <faith@valinux.com>
+ * Jeff Hartmann <jhartmann@valinux.com>
*
*/
@@ -41,9 +40,9 @@ EXPORT_SYMBOL(i810_cleanup);
#define I810_NAME "i810"
#define I810_DESC "Intel I810"
#define I810_DATE "19991213"
-#define I810_MAJOR 0
+#define I810_MAJOR 1
#define I810_MINOR 0
-#define I810_PATCHLEVEL 1
+#define I810_PATCHLEVEL 0
static drm_device_t i810_device;
drm_ctx_t i810_res_ctx;
diff --git a/xc/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel/i810_drv.h b/xc/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel/i810_drv.h
index 334cacb2a..c387bf727 100644
--- a/xc/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel/i810_drv.h
+++ b/xc/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel/i810_drv.h
@@ -2,6 +2,7 @@
* Created: Mon Dec 13 01:50:01 1999 by jhartmann@precisioninsight.com
*
* Copyright 1999 Precision Insight, Inc., Cedar Park, Texas.
+ * Copyright 2000 VA Linux Systems, Inc., Sunnyvale, California.
* All rights reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a
@@ -23,10 +24,9 @@
* ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
* DEALINGS IN THE SOFTWARE.
*
- * Authors: Rickard E. (Rik) Faith <faith@precisioninsight.com>
- * Jeff Hartmann <jhartmann@precisioninsight.com>
+ * Authors: Rickard E. (Rik) Faith <faith@valinux.com>
+ * Jeff Hartmann <jhartmann@valinux.com>
*
- * $XFree86: xc/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel/i810_drv.h,v 1.1 2000/02/11 17:26:05 dawes Exp $
*/
#ifndef _I810_DRV_H_
diff --git a/xc/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel/init.c b/xc/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel/init.c
index 25c0aed22..aefc884eb 100644
--- a/xc/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel/init.c
+++ b/xc/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel/init.c
@@ -1,8 +1,8 @@
/* init.c -- Setup/Cleanup for DRM -*- linux-c -*-
* Created: Mon Jan 4 08:58:31 1999 by faith@precisioninsight.com
- * Revised: Fri Aug 20 09:27:02 1999 by faith@precisioninsight.com
*
* Copyright 1999 Precision Insight, Inc., Cedar Park, Texas.
+ * Copyright 2000 VA Linux Systems, Inc., Sunnyvale, California.
* All Rights Reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a
@@ -24,7 +24,8 @@
* ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
* DEALINGS IN THE SOFTWARE.
*
- * $XFree86: xc/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel/init.c,v 1.2 2000/02/23 04:47:29 martin Exp $
+ * Authors:
+ * Rickard E. (Rik) Faith <faith@valinux.com>
*
*/
@@ -34,7 +35,7 @@
int drm_flags = 0;
/* drm_parse_option parses a single option. See description for
- drm_parse_drm for details. */
+ drm_parse_options for details. */
static void drm_parse_option(char *s)
{
@@ -96,3 +97,10 @@ void drm_parse_options(char *s)
}
}
+int drm_cpu_valid(void)
+{
+#if defined(__i386__)
+ if (boot_cpu_data.x86 == 3) return 0; /* No cmpxchg on a 386 */
+#endif
+ return 1;
+}
diff --git a/xc/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel/ioctl.c b/xc/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel/ioctl.c
index 8edfb4374..b246f76e5 100644
--- a/xc/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel/ioctl.c
+++ b/xc/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel/ioctl.c
@@ -1,8 +1,8 @@
/* ioctl.c -- IOCTL processing for DRM -*- linux-c -*-
* Created: Fri Jan 8 09:01:26 1999 by faith@precisioninsight.com
- * Revised: Fri Aug 20 09:27:02 1999 by faith@precisioninsight.com
*
* Copyright 1999 Precision Insight, Inc., Cedar Park, Texas.
+ * Copyright 2000 VA Linux Systems, Inc., Sunnyvale, California.
* All Rights Reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a
@@ -24,7 +24,8 @@
* ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
* DEALINGS IN THE SOFTWARE.
*
- * $XFree86: xc/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel/ioctl.c,v 1.2 2000/02/23 04:47:29 martin Exp $
+ * Authors:
+ * Rickard E. (Rik) Faith <faith@valinux.com>
*
*/
diff --git a/xc/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel/lists.c b/xc/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel/lists.c
index af8f6150a..f62495aa2 100644
--- a/xc/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel/lists.c
+++ b/xc/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel/lists.c
@@ -1,8 +1,8 @@
/* lists.c -- Buffer list handling routines -*- linux-c -*-
* Created: Mon Apr 19 20:54:22 1999 by faith@precisioninsight.com
- * Revised: Sun Feb 13 23:37:52 2000 by kevin@precisioninsight.com
*
* Copyright 1999 Precision Insight, Inc., Cedar Park, Texas.
+ * Copyright 2000 VA Linux Systems, Inc., Sunnyvale, California.
* All Rights Reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a
@@ -24,7 +24,8 @@
* ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
* DEALINGS IN THE SOFTWARE.
*
- * $XFree86: xc/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel/lists.c,v 1.6 2000/02/23 04:56:42 martin Exp $
+ * Authors:
+ * Rickard E. (Rik) Faith <faith@valinux.com>
*
*/
diff --git a/xc/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel/lock.c b/xc/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel/lock.c
index adf27ab5d..550827278 100644
--- a/xc/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel/lock.c
+++ b/xc/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel/lock.c
@@ -1,8 +1,8 @@
/* lock.c -- IOCTLs for locking -*- linux-c -*-
* Created: Tue Feb 2 08:37:54 1999 by faith@precisioninsight.com
- * Revised: Sun Feb 13 23:38:25 2000 by kevin@precisioninsight.com
*
* Copyright 1999 Precision Insight, Inc., Cedar Park, Texas.
+ * Copyright 2000 VA Linux Systems, Inc., Sunnyvale, California.
* All Rights Reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a
@@ -24,7 +24,8 @@
* ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
* DEALINGS IN THE SOFTWARE.
*
- * $XFree86: xc/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel/lock.c,v 1.5 2000/02/23 04:47:29 martin Exp $
+ * Authors:
+ * Rickard E. (Rik) Faith <faith@valinux.com>
*
*/
diff --git a/xc/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel/memory.c b/xc/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel/memory.c
index 559ac7391..0e92401bb 100644
--- a/xc/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel/memory.c
+++ b/xc/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel/memory.c
@@ -1,8 +1,8 @@
/* memory.c -- Memory management wrappers for DRM -*- linux-c -*-
* Created: Thu Feb 4 14:00:34 1999 by faith@precisioninsight.com
- * Revised: Sun Feb 13 23:39:37 2000 by kevin@precisioninsight.com
*
* Copyright 1999 Precision Insight, Inc., Cedar Park, Texas.
+ * Copyright 2000 VA Linux Systems, Inc., Sunnyvale, California.
* All Rights Reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a
@@ -24,7 +24,8 @@
* ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
* DEALINGS IN THE SOFTWARE.
*
- * $XFree86: xc/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel/memory.c,v 1.5 2000/02/23 04:47:30 martin Exp $
+ * Authors:
+ * Rickard E. (Rik) Faith <faith@valinux.com>
*
*/
diff --git a/xc/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel/mga_bufs.c b/xc/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel/mga_bufs.c
index 3ce428b27..b97eb4959 100644
--- a/xc/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel/mga_bufs.c
+++ b/xc/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel/mga_bufs.c
@@ -2,6 +2,7 @@
* Created: Thu Jan 6 01:47:26 2000 by jhartmann@precisioninsight.com
*
* Copyright 1999 Precision Insight, Inc., Cedar Park, Texas.
+ * Copyright 2000 VA Linux Systems, Inc., Sunnyvale, California.
* All Rights Reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a
@@ -23,10 +24,8 @@
* ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
* DEALINGS IN THE SOFTWARE.
*
- * Authors: Rickard E. (Rik) Faith <faith@precisioninsight.com>
- * Jeff Hartmann <jhartmann@precisioninsight.com>
- *
- * $XFree86: xc/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel/mga_bufs.c,v 1.1 2000/02/11 17:26:06 dawes Exp $
+ * Authors: Rickard E. (Rik) Faith <faith@valinux.com>
+ * Jeff Hartmann <jhartmann@valinux.com>
*
*/
diff --git a/xc/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel/mga_context.c b/xc/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel/mga_context.c
index 2459b35bb..d02592740 100644
--- a/xc/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel/mga_context.c
+++ b/xc/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel/mga_context.c
@@ -2,6 +2,7 @@
* Created: Mon Dec 13 09:51:35 1999 by faith@precisioninsight.com
*
* Copyright 1999 Precision Insight, Inc., Cedar Park, Texas.
+ * Copyright 2000 VA Linux Systems, Inc., Sunnyvale, California.
* All Rights Reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a
@@ -23,9 +24,8 @@
* ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
* DEALINGS IN THE SOFTWARE.
*
- * Author: Rickard E. (Rik) Faith <faith@precisioninsight.com>
- *
- * $XFree86: xc/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel/mga_context.c,v 1.1 2000/02/11 17:26:06 dawes Exp $
+ * Author: Rickard E. (Rik) Faith <faith@valinux.com>
+ * Jeff Hartmann <jhartmann@valinux.com>
*
*/
diff --git a/xc/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel/mga_dma.c b/xc/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel/mga_dma.c
index fe6a7b525..25e3622ca 100644
--- a/xc/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel/mga_dma.c
+++ b/xc/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel/mga_dma.c
@@ -2,6 +2,7 @@
* Created: Mon Dec 13 01:50:01 1999 by jhartmann@precisioninsight.com
*
* Copyright 1999 Precision Insight, Inc., Cedar Park, Texas.
+ * Copyright 2000 VA Linux Systems, Inc., Sunnyvale, California.
* All Rights Reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a
@@ -23,11 +24,9 @@
* ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
* DEALINGS IN THE SOFTWARE.
*
- * Authors: Rickard E. (Rik) Faith <faith@precisioninsight.com>
- * Jeff Hartmann <jhartmann@precisioninsight.com>
- * Keith Whitwell <keithw@precisioninsight.com>
- *
- * $XFree86$
+ * Authors: Rickard E. (Rik) Faith <faith@valinux.com>
+ * Jeff Hartmann <jhartmann@valinux.com>
+ * Keith Whitwell <keithw@valinux.com>
*
*/
diff --git a/xc/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel/mga_drm.h b/xc/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel/mga_drm.h
index 7228b9051..e75e91a4f 100644
--- a/xc/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel/mga_drm.h
+++ b/xc/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel/mga_drm.h
@@ -2,6 +2,7 @@
* Created: Tue Jan 25 01:50:01 1999 by jhartmann@precisioninsight.com
*
* Copyright 1999 Precision Insight, Inc., Cedar Park, Texas.
+ * Copyright 2000 VA Linux Systems, Inc., Sunnyvale, California.
* All rights reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a
@@ -23,10 +24,9 @@
* ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
* DEALINGS IN THE SOFTWARE.
*
- * Authors: Jeff Hartmann <jhartmann@precisioninsight.com>
- * Keith Whitwell <keithw@precisioninsight.com>
+ * Authors: Jeff Hartmann <jhartmann@valinux.com>
+ * Keith Whitwell <keithw@valinux.com>
*
- * $XFree86$
*/
#ifndef _MGA_DRM_H_
diff --git a/xc/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel/mga_drv.c b/xc/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel/mga_drv.c
index 5fabe1f25..4b2c835fa 100644
--- a/xc/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel/mga_drv.c
+++ b/xc/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel/mga_drv.c
@@ -2,6 +2,7 @@
* Created: Mon Dec 13 01:56:22 1999 by jhartmann@precisioninsight.com
*
* Copyright 1999 Precision Insight, Inc., Cedar Park, Texas.
+ * Copyright 2000 VA Linux Systems, Inc., Sunnyvale, California.
* All Rights Reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a
@@ -23,10 +24,9 @@
* ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
* DEALINGS IN THE SOFTWARE.
*
- * Authors: Rickard E. (Rik) Faith <faith@precisioninsight.com>
- * Jeff Hartmann <jhartmann@precisioninsight.com>
+ * Authors: Rickard E. (Rik) Faith <faith@valinux.com>
+ * Jeff Hartmann <jhartmann@valinux.com>
*
- * $XFree86: xc/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel/mga_drv.c,v 1.1 2000/02/11 17:26:07 dawes Exp $
*
*/
@@ -39,9 +39,9 @@ EXPORT_SYMBOL(mga_cleanup);
#define MGA_NAME "mga"
#define MGA_DESC "Matrox g200/g400"
#define MGA_DATE "19991213"
-#define MGA_MAJOR 0
+#define MGA_MAJOR 1
#define MGA_MINOR 0
-#define MGA_PATCHLEVEL 1
+#define MGA_PATCHLEVEL 0
static drm_device_t mga_device;
drm_ctx_t mga_res_ctx;
@@ -385,9 +385,9 @@ int mga_init(void)
DRM_DEBUG("doing agp init\n");
dev->agp = drm_agp_init();
if(dev->agp == NULL) {
- DRM_DEBUG("The mga drm module requires the agpgart module"
- " to function correctly\nPlease load the agpgart"
- " module before you load the mga module\n");
+ DRM_INFO("The mga drm module requires the agpgart module"
+ " to function correctly\nPlease load the agpgart"
+ " module before you load the mga module\n");
drm_proc_cleanup();
misc_deregister(&mga_misc);
mga_takedown(dev);
diff --git a/xc/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel/mga_drv.h b/xc/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel/mga_drv.h
index ee75a03e2..f217acb97 100644
--- a/xc/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel/mga_drv.h
+++ b/xc/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel/mga_drv.h
@@ -2,6 +2,7 @@
* Created: Mon Dec 13 01:50:01 1999 by jhartmann@precisioninsight.com
*
* Copyright 1999 Precision Insight, Inc., Cedar Park, Texas.
+ * Copyright 2000 VA Linux Systems, Inc., Sunnyvale, California.
* All rights reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a
@@ -23,10 +24,9 @@
* ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
* DEALINGS IN THE SOFTWARE.
*
- * Authors: Rickard E. (Rik) Faith <faith@precisioninsight.com>
- * Jeff Hartmann <jhartmann@precisioninsight.com>
+ * Authors: Rickard E. (Rik) Faith <faith@valinux.com>
+ * Jeff Hartmann <jhartmann@valinux.com>
*
- * $XFree86$
*/
#ifndef _MGA_DRV_H_
diff --git a/xc/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel/mga_state.c b/xc/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel/mga_state.c
index 32f6bcf4b..3134b7853 100644
--- a/xc/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel/mga_state.c
+++ b/xc/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel/mga_state.c
@@ -2,6 +2,7 @@
* Created: Thu Jan 27 02:53:43 2000 by jhartmann@precisioninsight.com
*
* Copyright 1999 Precision Insight, Inc., Cedar Park, Texas.
+ * Copyright 2000 VA Linux Systems, Inc., Sunnyvale, California.
* All Rights Reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a
@@ -23,10 +24,8 @@
* ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
* DEALINGS IN THE SOFTWARE.
*
- * Authors: Jeff Hartmann <jhartmann@precisioninsight.com>
- * Keith Whitwell <keithw@precisioninsight.com>
- *
- * $XFree86$
+ * Authors: Jeff Hartmann <jhartmann@valinux.com>
+ * Keith Whitwell <keithw@valinux.com>
*
*/
diff --git a/xc/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel/proc.c b/xc/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel/proc.c
index 392abceb9..ba6dee00d 100644
--- a/xc/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel/proc.c
+++ b/xc/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel/proc.c
@@ -1,7 +1,8 @@
/* proc.c -- /proc support for DRM -*- linux-c -*-
* Created: Mon Jan 11 09:48:47 1999 by faith@precisioninsight.com
*
- * Copyright 1999, 2000 Precision Insight, Inc., Cedar Park, Texas.
+ * Copyright 1999 Precision Insight, Inc., Cedar Park, Texas.
+ * Copyright 2000 VA Linux Systems, Inc., Sunnyvale, California.
* All Rights Reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a
@@ -22,9 +23,9 @@
* 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.
- *
- * $XFree86: xc/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel/proc.c,v 1.6 2000/02/23 04:47:30 martin Exp $
*
+ * Authors:
+ * Rickard E. (Rik) Faith <faith@valinux.com>
*/
#define __NO_VERSION__
diff --git a/xc/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel/r128_drv.c b/xc/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel/r128_drv.c
index 45ade1def..53ac8ce34 100644
--- a/xc/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel/r128_drv.c
+++ b/xc/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel/r128_drv.c
@@ -38,10 +38,10 @@ EXPORT_SYMBOL(r128_cleanup);
#define R128_NAME "r128"
#define R128_DESC "r128"
-#define R128_DATE "20000422"
-#define R128_MAJOR 0
+#define R128_DATE "20000607"
+#define R128_MAJOR 1
#define R128_MINOR 0
-#define R128_PATCHLEVEL 5
+#define R128_PATCHLEVEL 0
static drm_device_t r128_device;
drm_ctx_t r128_res_ctx;
diff --git a/xc/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel/tdfx_context.c b/xc/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel/tdfx_context.c
index 74b107bd2..c8d6e50ea 100644
--- a/xc/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel/tdfx_context.c
+++ b/xc/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel/tdfx_context.c
@@ -1,8 +1,8 @@
/* tdfx_context.c -- IOCTLs for tdfx contexts -*- linux-c -*-
* Created: Thu Oct 7 10:50:22 1999 by faith@precisioninsight.com
- * Revised: Sat Oct 9 23:39:56 1999 by faith@precisioninsight.com
*
* Copyright 1999 Precision Insight, Inc., Cedar Park, Texas.
+ * Copyright 2000 VA Linux Systems, Inc., Sunnyvale, California.
* All Rights Reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a
@@ -24,8 +24,10 @@
* ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
* DEALINGS IN THE SOFTWARE.
*
- * $XFree86: xc/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel/tdfx_context.c,v 1.2 2000/02/23 04:47:30 martin Exp $
- *
+ * Authors:
+ * Rickard E. (Rik) Faith <faith@valinux.com>
+ * Daryll Strauss <daryll@valinux.com>
+ *
*/
#include <linux/sched.h>
diff --git a/xc/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel/tdfx_drv.c b/xc/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel/tdfx_drv.c
index fb7a997b4..d8fef9538 100644
--- a/xc/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel/tdfx_drv.c
+++ b/xc/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel/tdfx_drv.c
@@ -1,8 +1,8 @@
/* tdfx.c -- tdfx driver -*- linux-c -*-
* Created: Thu Oct 7 10:38:32 1999 by faith@precisioninsight.com
- * Revised: Tue Oct 12 08:51:35 1999 by faith@precisioninsight.com
*
* Copyright 1999 Precision Insight, Inc., Cedar Park, Texas.
+ * Copyright 2000 VA Linux Systems, Inc., Sunnyvale, California.
* All Rights Reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a
@@ -24,7 +24,9 @@
* ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
* DEALINGS IN THE SOFTWARE.
*
- * $XFree86: xc/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel/tdfx_drv.c,v 1.3 2000/02/23 04:47:31 martin Exp $
+ * Authors:
+ * Rickard E. (Rik) Faith <faith@valinux.com>
+ * Daryll Strauss <daryll@valinux.com>
*
*/
@@ -37,9 +39,9 @@ EXPORT_SYMBOL(tdfx_cleanup);
#define TDFX_NAME "tdfx"
#define TDFX_DESC "tdfx"
#define TDFX_DATE "19991009"
-#define TDFX_MAJOR 0
+#define TDFX_MAJOR 1
#define TDFX_MINOR 0
-#define TDFX_PATCHLEVEL 1
+#define TDFX_PATCHLEVEL 0
static drm_device_t tdfx_device;
drm_ctx_t tdfx_res_ctx;
diff --git a/xc/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel/tdfx_drv.h b/xc/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel/tdfx_drv.h
index 3866010a8..6b1c208ef 100644
--- a/xc/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel/tdfx_drv.h
+++ b/xc/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel/tdfx_drv.h
@@ -1,8 +1,8 @@
/* tdfx_drv.h -- Private header for tdfx driver -*- linux-c -*-
* Created: Thu Oct 7 10:40:04 1999 by faith@precisioninsight.com
- * Revised: Sat Oct 9 23:38:19 1999 by faith@precisioninsight.com
*
* Copyright 1999 Precision Insight, Inc., Cedar Park, Texas.
+ * Copyright 2000 VA Linux Systems, Inc., Sunnyvale, California.
* All rights reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a
@@ -24,7 +24,6 @@
* ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
* DEALINGS IN THE SOFTWARE.
*
- * $XFree86: xc/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel/tdfx_drv.h,v 1.2 2000/02/23 04:47:31 martin Exp $
*
*/
diff --git a/xc/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel/vm.c b/xc/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel/vm.c
index 9c2cea56a..0b2b00e0a 100644
--- a/xc/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel/vm.c
+++ b/xc/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel/vm.c
@@ -1,7 +1,8 @@
/* vm.c -- Memory mapping for DRM -*- linux-c -*-
* Created: Mon Jan 4 08:58:31 1999 by faith@precisioninsight.com
*
- * Copyright 1999, 2000 Precision Insight, Inc., Cedar Park, Texas.
+ * Copyright 1999 Precision Insight, Inc., Cedar Park, Texas.
+ * Copyright 2000 VA Linux Systems, Inc., Sunnyvale, California.
* All Rights Reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a
@@ -23,7 +24,8 @@
* ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
* DEALINGS IN THE SOFTWARE.
*
- * $XFree86: xc/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel/vm.c,v 1.5 2000/02/23 04:47:31 martin Exp $
+ * Authors:
+ * Rickard E. (Rik) Faith <faith@valinux.com>
*
*/
diff --git a/xc/programs/Xserver/hw/xfree86/os-support/linux/drm/xf86drm.c b/xc/programs/Xserver/hw/xfree86/os-support/linux/drm/xf86drm.c
index 2e3c9b431..1174a0fa2 100644
--- a/xc/programs/Xserver/hw/xfree86/os-support/linux/drm/xf86drm.c
+++ b/xc/programs/Xserver/hw/xfree86/os-support/linux/drm/xf86drm.c
@@ -1,7 +1,8 @@
/* xf86drm.c -- User-level interface to DRM device
* Created: Tue Jan 5 08:16:21 1999 by faith@precisioninsight.com
*
- * Copyright 1999, 2000 Precision Insight, Inc., Cedar Park, Texas.
+ * Copyright 1999 Precision Insight, Inc., Cedar Park, Texas.
+ * Copyright 2000 VA Linux Systems, Inc., Sunnyvale, California.
* All Rights Reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a
@@ -23,8 +24,9 @@
* ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
* DEALINGS IN THE SOFTWARE.
*
- * Author: Rickard E. (Rik) Faith <faith@precisioninsight.com>
- *
+ * Authors: Rickard E. (Rik) Faith <faith@valinux.com>
+ * Kevin E. Martin <martin@valinux.com>
+ *
* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/linux/drm/xf86drm.c,v 1.10 2000/02/23 04:47:23 martin Exp $
*
*/
@@ -71,10 +73,23 @@ extern int xf86RemoveSIGIOHandler(int fd);
#define MAP_FAILED ((void *)-1)
#endif
-#include <sys/sysmacros.h> /* for makedev() */
#include "xf86drm.h"
#include "drm.h"
+#define DRM_FIXED_DEVICE_MAJOR 145
+
+#ifdef __linux__
+#include <sys/sysmacros.h> /* for makedev() */
+#endif
+
+#ifndef makedev
+ /* This definition needs to be changed on
+ some systems if dev_t is a structure.
+ If there is a header file we can get it
+ from, there would be best. */
+#define makedev(x,y) ((dev_t)(((x) << 8) | (y)))
+#endif
+
static void *drmHashTable = NULL; /* Context switch callbacks */
typedef struct drmHashEntry {
@@ -95,9 +110,16 @@ void drmFree(void *pt)
if (pt) _DRM_FREE(pt);
}
+/* drmStrdup can't use strdup(3), since it doesn't call _DRM_MALLOC... */
static char *drmStrdup(const char *s)
{
- return s ? strdup(s) : NULL;
+ char *retval = NULL;
+
+ if (s) {
+ retval = _DRM_MALLOC(strlen(s)+1);
+ strcpy(retval, s);
+ }
+ return retval;
}
@@ -134,7 +156,7 @@ static drmHashEntry *drmGetEntry(int fd)
return entry;
}
-/* drm_open is used to open the /dev/drm device */
+/* drm_open is used to open the /dev/dri device */
static int drm_open(const char *file)
{
@@ -144,14 +166,6 @@ static int drm_open(const char *file)
return -errno;
}
-/* drmAvailable looks for /proc/dri, and returns 1 if it is present. */
-
-int drmAvailable(void)
-{
- if (!access("/proc/dri/0", R_OK)) return 1;
- return 0;
-}
-
static int drmOpenDevice(const char *path, long dev,
mode_t mode, uid_t user, gid_t group)
{
@@ -161,7 +175,16 @@ static int drmOpenDevice(const char *path, long dev,
struct stat st;
#endif
- if (!stat(path, &st) && st.st_rdev == dev) return drm_open(path);
+ /* Fiddle mode to remove execute bits */
+ mode &= ~(S_IXUSR|S_IXGRP|S_IXOTH);
+
+ if (!stat(path, &st) && st.st_rdev == dev) {
+ if (!geteuid()) {
+ chown(path, user, group);
+ chmod(path, mode);
+ }
+ return drm_open(path);
+ }
if (geteuid()) return DRM_ERR_NOT_ROOT;
remove(path);
@@ -174,6 +197,38 @@ static int drmOpenDevice(const char *path, long dev,
return drm_open(path);
}
+/* drmAvailable looks for /proc/dri, and returns 1 if it is present. On
+ OSs that do not have a Linux-like /proc, this information will not be
+ available, and we'll have to create a device and check if the driver is
+ loaded that way. */
+
+int drmAvailable(void)
+{
+ char dev_name[64];
+ drmVersionPtr version;
+ int retval = 0;
+ int fd;
+
+ if (!access("/proc/dri/0", R_OK)) return 1;
+
+ sprintf(dev_name, "/dev/dri-temp-%d", getpid());
+
+ remove(dev_name);
+ if ((fd = drmOpenDevice(dev_name, makedev(DRM_FIXED_DEVICE_MAJOR, 0),
+ S_IRUSR, geteuid(), getegid())) >= 0) {
+ /* Read version to make sure this is
+ actually a DRI device. */
+ if ((version = drmGetVersion(fd))) {
+ retval = 1;
+ drmFreeVersion(version);
+ }
+ close(fd);
+ }
+ remove(dev_name);
+
+ return retval;
+}
+
static int drmOpenByBusid(const char *busid)
{
int i;
@@ -268,7 +323,24 @@ static int drmOpenByName(const char *name)
}
}
}
- } else remove(dev_name);
+ } else {
+ drmVersionPtr version;
+ /* /proc/dri not available, possibly
+ because we aren't on a Linux system.
+ So, try to create the next device and
+ see if it's active. */
+ dev = makedev(DRM_FIXED_DEVICE_MAJOR, i);
+ if ((fd = drmOpenDevice(dev_name, dev, mode, user, group))) {
+ if ((version = drmGetVersion(fd))) {
+ if (!strcmp(version->name, name)) {
+ drmFreeVersion(version);
+ return fd;
+ }
+ drmFreeVersion(version);
+ }
+ }
+ remove(dev_name);
+ }
}
return -1;
}
@@ -303,7 +375,7 @@ static void drmFreeKernelVersion(drm_version_t *v)
drmFree(v);
}
-static void drmCopyVersion(drmVersionPtr d, drm_version_t *s)
+static void drmCopyVersion(drmVersionPtr d, const drm_version_t *s)
{
d->version_major = s->version_major;
d->version_minor = s->version_minor;
@@ -317,7 +389,7 @@ static void drmCopyVersion(drmVersionPtr d, drm_version_t *s)
}
/* drmVersion obtains the version information via an ioctl. Similar
- * information is available via /proc/drm. */
+ * information is available via /proc/dri. */
drmVersionPtr drmGetVersion(int fd)
{
diff --git a/xc/programs/Xserver/hw/xfree86/os-support/shared/drm/kernel/drm.h b/xc/programs/Xserver/hw/xfree86/os-support/shared/drm/kernel/drm.h
index c63d0f637..c8c5581da 100644
--- a/xc/programs/Xserver/hw/xfree86/os-support/shared/drm/kernel/drm.h
+++ b/xc/programs/Xserver/hw/xfree86/os-support/shared/drm/kernel/drm.h
@@ -1,7 +1,8 @@
/* drm.h -- Header for Direct Rendering Manager -*- linux-c -*-
* Created: Mon Jan 4 10:05:05 1999 by faith@precisioninsight.com
*
- * Copyright 1999, 2000 Precision Insight, Inc., Cedar Park, Texas.
+ * Copyright 1999 Precision Insight, Inc., Cedar Park, Texas.
+ * Copyright 2000 VA Linux Systems, Inc., Sunnyvale, California.
* All rights reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a
@@ -22,8 +23,9 @@
* 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.
- *
- * $XFree86: xc/programs/Xserver/hw/xfree86/os-support/linux/drm/kernel/drm.h,v 1.5 2000/02/23 04:47:26 martin Exp $
+ *
+ * Authors:
+ * Rickard E. (Rik) Faith <faith@valinux.com>
*
* Acknowledgements:
* Dec 1999, Richard Henderson <rth@twiddle.net>, move to generic cmpxchg.
diff --git a/xc/programs/Xserver/hw/xfree86/os-support/shared/libc_wrapper.c b/xc/programs/Xserver/hw/xfree86/os-support/shared/libc_wrapper.c
index fc08cb51a..14a8c9f5a 100644
--- a/xc/programs/Xserver/hw/xfree86/os-support/shared/libc_wrapper.c
+++ b/xc/programs/Xserver/hw/xfree86/os-support/shared/libc_wrapper.c
@@ -1361,6 +1361,18 @@ xf86geteuid(void)
return geteuid();
}
+xf86gid_t
+xf86getegid(void)
+{
+ return getegid();
+}
+
+int
+xf86getpid(void)
+{
+ return getpid();
+}
+
static mode_t
xfToOsMknodMode(xf86mode_t xfmode)
{
diff --git a/xc/programs/Xserver/hw/xfree86/os-support/xf86_ansic.h b/xc/programs/Xserver/hw/xfree86/os-support/xf86_ansic.h
index 23389ea39..01e12ec0f 100644
--- a/xc/programs/Xserver/hw/xfree86/os-support/xf86_ansic.h
+++ b/xc/programs/Xserver/hw/xfree86/os-support/xf86_ansic.h
@@ -267,6 +267,8 @@ extern long xf86fpossize(void);
extern int xf86chmod(const char *, xf86mode_t);
extern int xf86chown(const char *, xf86uid_t, xf86gid_t);
extern xf86uid_t xf86geteuid(void);
+extern xf86gid_t xf86getegid(void);
+extern int xf86getpid(void);
extern int xf86mknod(const char *, xf86mode_t, xf86dev_t);
extern int xf86mkdir(const char *, xf86mode_t);
unsigned int xf86sleep(unsigned int seconds);
diff --git a/xc/programs/Xserver/hw/xfree86/os-support/xf86_libc.h b/xc/programs/Xserver/hw/xfree86/os-support/xf86_libc.h
index 321fd3f13..c11c73c48 100644
--- a/xc/programs/Xserver/hw/xfree86/os-support/xf86_libc.h
+++ b/xc/programs/Xserver/hw/xfree86/os-support/xf86_libc.h
@@ -421,6 +421,10 @@ typedef int xf86key_t;
#define chown(a,b,c) xf86chown(a,b,c)
#undef geteuid
#define geteuid xf86geteuid
+#undef getegid
+#define getegid xf86getegid
+#undef getpid
+#define getpid xf86getpid
#undef mknod
#define mknod(a,b,c) xf86mknod(a,b,c)
#undef sleep