summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJulien Cristau <[email protected]>2007-07-23 16:28:56 +0200
committerJulien Cristau <[email protected]>2007-07-23 16:28:56 +0200
commitc5837f279107d9eac4d9afdfc63ae3e8d2184ceb (patch)
treebbe3e57db626536284f7f278ff93e8f0bb566403
parent490bd43f18f8f17ab7b8d5789944b50b3e5f598f (diff)
parent005eea249c2565cd33bb7c5f599040ead1ef99a5 (diff)
Merge branch 'mesa_7_0_branch' of git://anongit.freedesktop.org/git/mesa/mesa into debian-experimental
-rw-r--r--Makefile22
-rw-r--r--Makefile.mgw28
-rw-r--r--configs/config.mgw42
-rw-r--r--configs/default4
-rw-r--r--docs/README.MINGW3249
-rw-r--r--docs/relnotes-7.0.1.html86
-rw-r--r--docs/relnotes-7.0.html10
-rw-r--r--docs/relnotes.html1
-rw-r--r--include/GL/gl.h17
-rw-r--r--include/GL/gl_mangle.h93
-rw-r--r--include/GL/glu.h13
-rw-r--r--include/GL/glut.h17
-rw-r--r--include/GL/mesa_wgl.h59
-rw-r--r--progs/demos/geartrain.c1
-rw-r--r--progs/demos/gltestperf.c1
-rw-r--r--progs/demos/isosurf.c1
-rw-r--r--progs/demos/morph3d.c9
-rw-r--r--progs/demos/winpos.c1
-rw-r--r--progs/samples/Makefile.mgw33
-rw-r--r--src/glu/sgi/Makefile.mgw229
-rw-r--r--src/glu/sgi/libnurbs/interface/glcurveval.h2
-rw-r--r--src/glu/sgi/libnurbs/interface/glsurfeval.cc7
-rw-r--r--src/glu/sgi/libnurbs/interface/glsurfeval.h2
-rw-r--r--src/glu/sgi/libnurbs/nurbtess/monoTriangulation.h3
-rw-r--r--src/glut/glx/Makefile.mgw198
-rw-r--r--src/glut/glx/glut_fbc.c4
-rw-r--r--src/glut/glx/glut_input.c3
-rw-r--r--src/glut/glx/glut_joy.c3
-rw-r--r--src/glut/glx/glutint.h3
-rw-r--r--src/glut/glx/win32_util.c1
-rw-r--r--src/glut/glx/win32_winproc.c3
-rw-r--r--src/glut/glx/win32_x11.h10
-rw-r--r--src/mesa/Makefile7
-rw-r--r--src/mesa/Makefile.mgw51
-rw-r--r--src/mesa/drivers/dri/Makefile2
-rw-r--r--src/mesa/drivers/dri/common/dri_util.c2
-rw-r--r--src/mesa/drivers/dri/common/extension_helper.h20
-rw-r--r--src/mesa/drivers/dri/i915/i915_vtbl.c1
-rw-r--r--src/mesa/drivers/dri/i915tex/i915_vtbl.c1
-rw-r--r--src/mesa/drivers/dri/i915tex/intel_buffers.c10
-rw-r--r--src/mesa/drivers/dri/i915tex/intel_context.c57
-rw-r--r--src/mesa/drivers/dri/i965/intel_blit.c7
-rw-r--r--src/mesa/drivers/dri/i965/intel_blit.h3
-rw-r--r--src/mesa/drivers/dri/i965/intel_pixel_bitmap.c7
-rw-r--r--src/mesa/drivers/windows/gdi/wgl.c59
-rw-r--r--src/mesa/drivers/windows/gdi/wmesa.c139
-rw-r--r--src/mesa/drivers/windows/gdi/wmesadef.h4
-rw-r--r--src/mesa/glapi/gl_API.xml21
-rw-r--r--src/mesa/glapi/glapitemp.h30
-rw-r--r--src/mesa/glapi/glprocs.h282
-rw-r--r--src/mesa/main/api_validate.c19
-rw-r--r--src/mesa/main/glheader.h3
-rw-r--r--src/mesa/main/image.c117
-rw-r--r--src/mesa/main/imports.c4
-rw-r--r--src/mesa/main/imports.h4
-rw-r--r--src/mesa/main/shaders.c8
-rw-r--r--src/mesa/main/texcompress_fxt1.c5
-rw-r--r--src/mesa/main/texenvprogram.c2
-rw-r--r--src/mesa/main/teximage.c30
-rw-r--r--src/mesa/main/version.h6
-rw-r--r--src/mesa/shader/shader_api.c6
-rw-r--r--src/mesa/shader/slang/library/slang_core.gc5
-rw-r--r--src/mesa/shader/slang/library/slang_core_gc.h107
-rw-r--r--src/mesa/shader/slang/slang_codegen.c13
-rw-r--r--src/mesa/sparc/glapi_sparc.S5
-rw-r--r--src/mesa/swrast/s_drawpix.c11
-rw-r--r--src/mesa/tnl/t_save_api.c1834
-rw-r--r--src/mesa/vbo/vbo_exec_api.c5
-rw-r--r--src/mesa/vbo/vbo_save_api.c4
-rw-r--r--src/mesa/x86-64/glapi_x86-64.S5
-rw-r--r--src/mesa/x86/common_x86.c9
-rw-r--r--src/mesa/x86/glapi_x86.S5
-rw-r--r--windows/VC6/mesa/mesa/mesa.dsp44
-rw-r--r--windows/VC7/mesa/mesa/mesa.vcproj32
74 files changed, 1531 insertions, 2410 deletions
diff --git a/Makefile b/Makefile
index 3482799ba08..920e8af3af2 100644
--- a/Makefile
+++ b/Makefile
@@ -162,10 +162,10 @@ ultrix-gcc:
# Rules for making release tarballs
-DIRECTORY = Mesa-7.0
-LIB_NAME = MesaLib-7.0
-DEMO_NAME = MesaDemos-7.0
-GLUT_NAME = MesaGLUT-7.0
+DIRECTORY = Mesa-7.0.1
+LIB_NAME = MesaLib-7.0.1
+DEMO_NAME = MesaDemos-7.0.1
+GLUT_NAME = MesaGLUT-7.0.1
MAIN_FILES = \
$(DIRECTORY)/Makefile* \
@@ -288,17 +288,6 @@ MAIN_FILES = \
$(DIRECTORY)/vms/analyze_map.com \
$(DIRECTORY)/vms/xlib.opt \
$(DIRECTORY)/vms/xlib_share.opt \
- $(DIRECTORY)/windows/VC6/mesa/gdi/gdi.dsp \
- $(DIRECTORY)/windows/VC6/mesa/glu/*.txt \
- $(DIRECTORY)/windows/VC6/mesa/glu/glu.dsp \
- $(DIRECTORY)/windows/VC6/mesa/mesa.dsw \
- $(DIRECTORY)/windows/VC6/mesa/mesa/mesa.dsp \
- $(DIRECTORY)/windows/VC6/mesa/osmesa/osmesa.dsp \
- $(DIRECTORY)/windows/VC7/mesa/gdi/gdi.vcproj \
- $(DIRECTORY)/windows/VC7/mesa/glu/glu.vcproj \
- $(DIRECTORY)/windows/VC7/mesa/mesa.sln \
- $(DIRECTORY)/windows/VC7/mesa/mesa/mesa.vcproj \
- $(DIRECTORY)/windows/VC7/mesa/osmesa/osmesa.vcproj \
$(DIRECTORY)/windows/VC8/mesa/mesa.sln \
$(DIRECTORY)/windows/VC8/mesa/gdi/gdi.vcproj \
$(DIRECTORY)/windows/VC8/mesa/glu/glu.vcproj \
@@ -328,6 +317,7 @@ SGI_GLU_FILES = \
$(DIRECTORY)/src/glu/Makefile \
$(DIRECTORY)/src/glu/descrip.mms \
$(DIRECTORY)/src/glu/sgi/Makefile \
+ $(DIRECTORY)/src/glu/sgi/Makefile.mgw \
$(DIRECTORY)/src/glu/sgi/Makefile.win \
$(DIRECTORY)/src/glu/sgi/Makefile.DJ \
$(DIRECTORY)/src/glu/sgi/glu.def \
@@ -372,6 +362,8 @@ DEMO_FILES = \
$(DIRECTORY)/progs/demos/*.cxx \
$(DIRECTORY)/progs/demos/*.dat \
$(DIRECTORY)/progs/demos/README \
+ $(DIRECTORY)/progs/fbdev/Makefile \
+ $(DIRECTORY)/progs/fbdev/glfbdevtest.c \
$(DIRECTORY)/progs/osdemos/Makefile \
$(DIRECTORY)/progs/osdemos/*.c \
$(DIRECTORY)/progs/xdemos/Makefile* \
diff --git a/Makefile.mgw b/Makefile.mgw
index 70c264a8d86..3dc9f626438 100644
--- a/Makefile.mgw
+++ b/Makefile.mgw
@@ -51,37 +51,59 @@
# realclean: remove all generated files
#
+# MinGW core makefile updated for Mesa 7.0
+#
+# Updated : by Heromyth, on 2007-7-21
+# Bugs : 1) All the default settings work fine. But the setting X86=1 can't work.
+# The others havn't been tested yet.
+# 2) The generated DLLs are *not* compatible with the ones built
+# with the other compilers like VC8, especially for GLUT.
+# 3) MAlthough more tests are needed, it can be used individually!
.PHONY : all libgl clean realclean
ifeq ($(ICD),1)
# when -std=c99 mingw will not define WIN32
- CFLAGS = -Wall -W -Werror
+ CFLAGS = -Wall -Werror
else
# I love c89
- CFLAGS = -Wall -W -pedantic
+ CFLAGS = -Wall -pedantic
endif
CFLAGS += -O2 -ffast-math
export CFLAGS
+
ifeq ($(wildcard $(addsuffix /rm.exe,$(subst ;, ,$(PATH)))),)
UNLINK = del $(subst /,\,$(1))
else
UNLINK = $(RM) $(1)
endif
-all: libgl
+all: libgl libglu libglut example
libgl: lib
$(MAKE) -f Makefile.mgw -C src/mesa
+libglu: libgl
+ $(MAKE) -f Makefile.mgw -C src/glu/sgi
+
+libglut: libglu
+ $(MAKE) -f Makefile.mgw -C src/glut/glx
+
+example: libglut
+ $(MAKE) -f Makefile.mgw star -C progs/samples
+ copy progs\samples\star.exe lib
+
lib:
mkdir lib
clean:
$(MAKE) -f Makefile.mgw clean -C src/mesa
+ $(MAKE) -f Makefile.mgw clean -C src/glu/sgi
+ $(MAKE) -f Makefile.mgw clean -C src/glut/glx
realclean: clean
-$(call UNLINK,lib/*.a)
diff --git a/configs/config.mgw b/configs/config.mgw
new file mode 100644
index 00000000000..b961eb965cb
--- /dev/null
+++ b/configs/config.mgw
@@ -0,0 +1,42 @@
+# MinGW config include file updated for Mesa 7.0
+#
+# Updated : by Heromyth, on 2007-7-21
+# Email : [email protected]
+# Bugs : 1) All the default settings work fine. But the setting X86=1 can't work.
+# The others havn't been tested yet.
+# 2) The generated DLLs are *not* compatible with the ones built
+# with the other compilers like VC8, especially for GLUT.
+# 3) Although more tests are needed, it can be used individually!
+
+# The generated DLLs by MingW with STDCALL are not totally compatible
+# with the ones linked by Microsoft's compilers.
+#
+# xxx_USING_STDCALL = 1 Compiling MESA with __stdcall. This is default!
+#
+# xxx_USING_STDCALL = 0 Compiling MESA without __stdcall. I like this:)
+#
+
+# In fact, GL_USING_STDCALL and GLUT_USING_STDCALL can be
+# different. For example:
+#
+# GL_USING_STDCALL = 0
+# GLUT_USING_STDCALL = 1
+#
+# Suggested setting:
+#
+# ALL_USING_STDCALL = 1
+#
+# That's default!
+#
+
+
+ALL_USING_STDCALL = 1
+
+
+ifeq ($(ALL_USING_STDCALL),1)
+ GL_USING_STDCALL = 1
+ GLUT_USING_STDCALL = 1
+else
+ GL_USING_STDCALL = 0
+ GLUT_USING_STDCALL = 0
+endif
diff --git a/configs/default b/configs/default
index a7de3f813d6..81f0338b271 100644
--- a/configs/default
+++ b/configs/default
@@ -9,8 +9,8 @@ CONFIG_NAME = default
# Version info
MESA_MAJOR=7
-MESA_MINOR=1
-MESA_TINY=0
+MESA_MINOR=0
+MESA_TINY=1
# external projects. This should be useless now that we use libdrm.
DRM_SOURCE_PATH=$(TOP)/../drm
diff --git a/docs/README.MINGW32 b/docs/README.MINGW32
index 2b39f120908..138dd43eacc 100644
--- a/docs/README.MINGW32
+++ b/docs/README.MINGW32
@@ -88,3 +88,52 @@ Running the Build:
Daniel Borca <[email protected]>
+
+
+
+*******************This section is added by Heromyth*****************************
+Updated on 2007-7-21, by Heromyth <[email protected]>
+
+
+Notice:
+ 1) The generated DLLs are *not* compatible with the ones built
+with the other compilers like VC8, especially for GLUT.
+
+ 2) Although more tests are needed, it can be used individually!
+
+ 3) You can set the options about whether using STDCALL to build MESA. The
+config file is <Mesa3D-root>\configs\config.mgw. The default setting is that:
+ ALL_USING_STDCALL = 1
+, which means using STDCALL to build MESA.
+
+ 4) Of course, you can MESA without using STDCALL,I like this:)
+The setting is :
+ ALL_USING_STDCALL = 0
+To do this, however, you must modify wingdi.h which is in MingW's include dir.
+For example, run:
+ notepad C:\MingW\include\wingdi.h
+, and delete all the lines where all the wgl*() functions are. Because they would
+be conflicted with the ones in <Mesa3D-root>\include\GL\mesa_wgl.h.
+
+======= Conflicted Functions List ======
+WINGDIAPI BOOL WINAPI wglCopyContext(HGLRC,HGLRC,UINT);
+WINGDIAPI HGLRC WINAPI wglCreateContext(HDC);
+WINGDIAPI HGLRC WINAPI wglCreateLayerContext(HDC,int);
+WINGDIAPI BOOL WINAPI wglDeleteContext(HGLRC);
+WINGDIAPI BOOL WINAPI wglDescribeLayerPlane(HDC,int,int,UINT,LPLAYERPLANEDESCRIPTOR);
+WINGDIAPI HGLRC WINAPI wglGetCurrentContext(void);
+WINGDIAPI HDC WINAPI wglGetCurrentDC(void);
+WINGDIAPI int WINAPI wglGetLayerPaletteEntries(HDC,int,int,int,COLORREF*);
+WINGDIAPI PROC WINAPI wglGetProcAddress(LPCSTR);
+WINGDIAPI BOOL WINAPI wglMakeCurrent(HDC,HGLRC);
+WINGDIAPI BOOL WINAPI wglRealizeLayerPalette(HDC,int,BOOL);
+WINGDIAPI int WINAPI wglSetLayerPaletteEntries(HDC,int,int,int,const COLORREF*);
+WINGDIAPI BOOL WINAPI wglShareLists(HGLRC,HGLRC);
+WINGDIAPI BOOL WINAPI wglSwapLayerBuffers(HDC,UINT);
+WINGDIAPI BOOL WINAPI wglUseFontBitmapsA(HDC,DWORD,DWORD,DWORD);
+WINGDIAPI BOOL WINAPI wglUseFontBitmapsW(HDC,DWORD,DWORD,DWORD);
+WINGDIAPI BOOL WINAPI wglUseFontOutlinesA(HDC,DWORD,DWORD,DWORD,FLOAT,FLOAT,int,LPGLYPHMETRICSFLOAT);
+WINGDIAPI BOOL WINAPI wglUseFontOutlinesW(HDC,DWORD,DWORD,DWORD,FLOAT,FLOAT,int,LPGLYPHMETRICSFLOAT);
+===================
+
+********************************************************************************* \ No newline at end of file
diff --git a/docs/relnotes-7.0.1.html b/docs/relnotes-7.0.1.html
new file mode 100644
index 00000000000..302ac1c5737
--- /dev/null
+++ b/docs/relnotes-7.0.1.html
@@ -0,0 +1,86 @@
+<HTML>
+
+<TITLE>Mesa Release Notes</TITLE>
+
+<head><link rel="stylesheet" type="text/css" href="mesa.css"></head>
+
+<BODY>
+
+<body bgcolor="#eeeeee">
+
+<H1>Mesa 7.0.1 Release Notes / (date), 2007</H1>
+
+<p>
+Mesa 7.0.1 is a stable release with bug fixes since version 7.0.
+</p>
+
+
+<h2>MD5 checksums</h2>
+<pre>
+</pre>
+
+
+<h2>New features</h2>
+<ul>
+</ul>
+
+<h2>Bug fixes</h2>
+<ul>
+<li>Fixed some MingW build issues
+<li>Added a few missing OpenGL 2.0 API entrypoints:
+ <ul>
+ <li>glVertexAttrib4bv
+ <li>glVertexAttrib4iv
+ <li>glVertexAttrib4ubv
+ <li>glVertexAttrib4uiv
+ <li>glVertexAttrib4usv
+ </ul>
+<li>Fixed glDrawPixels(GL_STENCIL_INDEX) pixel transfer bug 11457
+<li>GLSL bug fix: added vec2(vec4) constructor
+<li>GLSL bug fix: .strq and .rgba writemasks didn't always work
+<li>Stencil pixel map didn't always work for glDrawPixels (bug 11475)
+<li>Fixed polygon stipple bug in i915 driver
+<li>Binding a zero-sized texture didn't disable texturing (bug 11309)
+<li>Queries of GL_INFO_LOG_LENGTH, GL_SHADER_SOURCE_LENGTH didn't include
+the terminating zero (bug 11588)
+</ul>
+
+
+<h2>Change</h2>
+<ul>
+<li>The libOSMesa library version has been reverted to 6.5.3 (soname=6)
+in order to avoid application linking issues. Otherwise, applications
+previously linked with libOSMesa.so.6 would no longer link with libOSMesa.so.7
+<li>Dropped obsolete, unmaintained Windows project files for VC6 and VC7.
+</ul>
+
+
+<h2>To Do (someday) items</h2>
+<ul>
+<li>Switch to freeglut
+<li>Fix linux-glide target/driver.
+<li>Improved lambda and derivative calculation for frag progs.
+</ul>
+
+
+<h2>Driver Status</h2>
+
+<pre>
+Driver Status
+---------------------- ----------------------
+DRI drivers varies with the driver
+XMesa/GLX (on Xlib) implements OpenGL 2.1
+OSMesa (off-screen) implements OpenGL 2.1
+Windows/Win32 implements OpenGL 2.1
+Glide (3dfx Voodoo1/2) implements OpenGL 1.3
+SVGA unsupported
+Wind River UGL unsupported
+DJGPP unsupported
+GGI unsupported
+BeOS unsupported
+Allegro unsupported
+D3D unsupported
+</pre>
+
+</body>
+</html>
diff --git a/docs/relnotes-7.0.html b/docs/relnotes-7.0.html
index c3635ce3975..2c036b2ec7f 100644
--- a/docs/relnotes-7.0.html
+++ b/docs/relnotes-7.0.html
@@ -18,7 +18,15 @@ A number of bugs have been fixed since the 6.5.3 release.
<h2>MD5 checksums</h2>
<pre>
-TBD
+35a1698986f7ac8dc435624ee9256cda MesaLib-7.0.tar.gz
+50c371455fa7532c04aa0a970f9bc51f MesaLib-7.0.tar.bz2
+bcedb6f43c97c1bc49e5cc7f12835722 MesaLib-7.0.zip
+9bad332c7b74f59be96556135212ca9e MesaDemos-7.0.tar.gz
+fada2bc1f29da513e015fda1e3abd0c0 MesaDemos-7.0.tar.bz2
+84e3bbe470d983ae32f1f0c779faf99e MesaDemos-7.0.zip
+76c7bb54f9850c689eba844f6daed332 MesaGLUT-7.0.tar.gz
+4af28296e02772ef1de00e4e79bf3d12 MesaGLUT-7.0.tar.bz2
+9043cb0b54cc03d1874728d74b12188c MesaGLUT-7.0.zip
</pre>
diff --git a/docs/relnotes.html b/docs/relnotes.html
index c698dfe1312..9a978d93f6a 100644
--- a/docs/relnotes.html
+++ b/docs/relnotes.html
@@ -20,6 +20,7 @@ The release notes summarize what's new or changed in each Mesa release.
</p>
<UL>
+<LI><A HREF="relnotes-7.0.1.html">7.0.1 release notes</A>
<LI><A HREF="relnotes-7.0.html">7.0 release notes</A>
<LI><A HREF="relnotes-6.5.3.html">6.5.3 release notes</A>
<LI><A HREF="relnotes-6.5.2.html">6.5.2 release notes</A>
diff --git a/include/GL/gl.h b/include/GL/gl.h
index fa0f891ade1..ff012d57e62 100644
--- a/include/GL/gl.h
+++ b/include/GL/gl.h
@@ -58,7 +58,11 @@
# else /* for use with static link lib build of Win32 edition only */
# define GLAPI extern
# endif /* _STATIC_MESA support */
-# define GLAPIENTRY __stdcall
+# if defined(__MINGW32__) && defined(GL_NO_STDCALL) /* The generated DLLs by MingW with STDCALL are not compatible with the ones done by Microsoft's compilers */
+# define GLAPIENTRY
+# else
+# define GLAPIENTRY __stdcall
+# endif
#elif defined(__CYGWIN__) && defined(USE_OPENGL32) /* use native windows opengl32 */
# define GLAPI extern
# define GLAPIENTRY __stdcall
@@ -84,7 +88,8 @@
#include <windows.h>
#endif
-#if defined(_WIN32) && !defined(_WINGDI_) && !defined(_GNU_H_WINDOWS32_DEFINES) && !defined(OPENSTEP) && !defined(__CYGWIN__)
+#if defined(_WIN32) && !defined(_WINGDI_) && !defined(_GNU_H_WINDOWS32_DEFINES) \
+ && !defined(OPENSTEP) && !defined(__CYGWIN__) || defined(__MINGW32__)
#include <GL/mesa_wgl.h>
#endif
@@ -2161,11 +2166,11 @@ typedef void (APIENTRYP PFNGLMULTITEXCOORD4SVARBPROC) (GLenum target, const GLsh
#define GL_DEBUG_PRINT_MESA 0x875A
#define GL_DEBUG_ASSERT_MESA 0x875B
-GLAPI GLhandleARB APIENTRY glCreateDebugObjectMESA (void);
-GLAPI void APIENTRY glClearDebugLogMESA (GLhandleARB obj, GLenum logType, GLenum shaderType);
-GLAPI void APIENTRY glGetDebugLogMESA (GLhandleARB obj, GLenum logType, GLenum shaderType, GLsizei maxLength,
+GLAPI GLhandleARB GLAPIENTRY glCreateDebugObjectMESA (void);
+GLAPI void GLAPIENTRY glClearDebugLogMESA (GLhandleARB obj, GLenum logType, GLenum shaderType);
+GLAPI void GLAPIENTRY glGetDebugLogMESA (GLhandleARB obj, GLenum logType, GLenum shaderType, GLsizei maxLength,
GLsizei *length, GLcharARB *debugLog);
-GLAPI GLsizei APIENTRY glGetDebugLogLengthMESA (GLhandleARB obj, GLenum logType, GLenum shaderType);
+GLAPI GLsizei GLAPIENTRY glGetDebugLogLengthMESA (GLhandleARB obj, GLenum logType, GLenum shaderType);
#endif /* GL_MESA_shader_debug */
diff --git a/include/GL/gl_mangle.h b/include/GL/gl_mangle.h
index e9c1c8a658d..1dcd4a895b8 100644
--- a/include/GL/gl_mangle.h
+++ b/include/GL/gl_mangle.h
@@ -33,6 +33,7 @@
#define glActiveStencilFaceEXT MANGLE(ActiveStencilFaceEXT)
#define glActiveTextureARB MANGLE(ActiveTextureARB)
#define glActiveTexture MANGLE(ActiveTexture)
+#define glActiveVaryingNV MANGLE(ActiveVaryingNV)
#define glAlphaFragmentOp1ATI MANGLE(AlphaFragmentOp1ATI)
#define glAlphaFragmentOp2ATI MANGLE(AlphaFragmentOp2ATI)
#define glAlphaFragmentOp3ATI MANGLE(AlphaFragmentOp3ATI)
@@ -52,11 +53,16 @@
#define glBeginOcclusionQueryNV MANGLE(BeginOcclusionQueryNV)
#define glBeginQueryARB MANGLE(BeginQueryARB)
#define glBeginQuery MANGLE(BeginQuery)
+#define glBeginTransformFeedbackNV MANGLE(BeginTransformFeedbackNV)
#define glBeginVertexShaderEXT MANGLE(BeginVertexShaderEXT)
#define glBindAttribLocationARB MANGLE(BindAttribLocationARB)
#define glBindAttribLocation MANGLE(BindAttribLocation)
#define glBindBufferARB MANGLE(BindBufferARB)
+#define glBindBufferBaseNV MANGLE(BindBufferBaseNV)
#define glBindBuffer MANGLE(BindBuffer)
+#define glBindBufferOffsetNV MANGLE(BindBufferOffsetNV)
+#define glBindBufferRangeNV MANGLE(BindBufferRangeNV)
+#define glBindFragDataLocationEXT MANGLE(BindFragDataLocationEXT)
#define glBindFragmentShaderATI MANGLE(BindFragmentShaderATI)
#define glBindFramebufferEXT MANGLE(BindFramebufferEXT)
#define glBindLightParameterEXT MANGLE(BindLightParameterEXT)
@@ -97,6 +103,7 @@
#define glBlitFramebufferEXT MANGLE(BlitFramebufferEXT)
#define glBufferDataARB MANGLE(BufferDataARB)
#define glBufferData MANGLE(BufferData)
+#define glBufferParameteriAPPLE MANGLE(BufferParameteriAPPLE)
#define glBufferSubDataARB MANGLE(BufferSubDataARB)
#define glBufferSubData MANGLE(BufferSubData)
#define glCallList MANGLE(CallList)
@@ -104,8 +111,11 @@
#define glCheckFramebufferStatusEXT MANGLE(CheckFramebufferStatusEXT)
#define glClampColorARB MANGLE(ClampColorARB)
#define glClearAccum MANGLE(ClearAccum)
+#define glClearColorIiEXT MANGLE(ClearColorIiEXT)
+#define glClearColorIuiEXT MANGLE(ClearColorIuiEXT)
#define glClearColor MANGLE(ClearColor)
#define glClearDebugLogMESA MANGLE(ClearDebugLogMESA)
+#define glClearDepthdNV MANGLE(ClearDepthdNV)
#define glClearDepth MANGLE(ClearDepth)
#define glClearIndex MANGLE(ClearIndex)
#define glClear MANGLE(Clear)
@@ -161,6 +171,7 @@
#define glColorFragmentOp1ATI MANGLE(ColorFragmentOp1ATI)
#define glColorFragmentOp2ATI MANGLE(ColorFragmentOp2ATI)
#define glColorFragmentOp3ATI MANGLE(ColorFragmentOp3ATI)
+#define glColorMaskIndexedEXT MANGLE(ColorMaskIndexedEXT)
#define glColorMask MANGLE(ColorMask)
#define glColorMaterial MANGLE(ColorMaterial)
#define glColorPointerEXT MANGLE(ColorPointerEXT)
@@ -261,19 +272,23 @@
#define glDeleteTextures MANGLE(DeleteTextures)
#define glDeleteVertexArraysAPPLE MANGLE(DeleteVertexArraysAPPLE)
#define glDeleteVertexShaderEXT MANGLE(DeleteVertexShaderEXT)
+#define glDepthBoundsdNV MANGLE(DepthBoundsdNV)
#define glDepthBoundsEXT MANGLE(DepthBoundsEXT)
#define glDepthFunc MANGLE(DepthFunc)
#define glDepthMask MANGLE(DepthMask)
+#define glDepthRangedNV MANGLE(DepthRangedNV)
#define glDepthRange MANGLE(DepthRange)
#define glDetachObjectARB MANGLE(DetachObjectARB)
#define glDetachShader MANGLE(DetachShader)
#define glDetailTexFuncSGIS MANGLE(DetailTexFuncSGIS)
#define glDisableClientState MANGLE(DisableClientState)
+#define glDisableIndexedEXT MANGLE(DisableIndexedEXT)
#define glDisable MANGLE(Disable)
#define glDisableVariantClientStateEXT MANGLE(DisableVariantClientStateEXT)
#define glDisableVertexAttribArrayARB MANGLE(DisableVertexAttribArrayARB)
#define glDisableVertexAttribArray MANGLE(DisableVertexAttribArray)
#define glDrawArraysEXT MANGLE(DrawArraysEXT)
+#define glDrawArraysInstancedEXT MANGLE(DrawArraysInstancedEXT)
#define glDrawArrays MANGLE(DrawArrays)
#define glDrawBuffer MANGLE(DrawBuffer)
#define glDrawBuffersARB MANGLE(DrawBuffersARB)
@@ -281,6 +296,7 @@
#define glDrawBuffers MANGLE(DrawBuffers)
#define glDrawElementArrayAPPLE MANGLE(DrawElementArrayAPPLE)
#define glDrawElementArrayATI MANGLE(DrawElementArrayATI)
+#define glDrawElementsInstancedEXT MANGLE(DrawElementsInstancedEXT)
#define glDrawElements MANGLE(DrawElements)
#define glDrawMeshArraysSUN MANGLE(DrawMeshArraysSUN)
#define glDrawPixels MANGLE(DrawPixels)
@@ -296,6 +312,7 @@
#define glElementPointerAPPLE MANGLE(ElementPointerAPPLE)
#define glElementPointerATI MANGLE(ElementPointerATI)
#define glEnableClientState MANGLE(EnableClientState)
+#define glEnableIndexedEXT MANGLE(EnableIndexedEXT)
#define glEnable MANGLE(Enable)
#define glEnableVariantClientStateEXT MANGLE(EnableVariantClientStateEXT)
#define glEnableVertexAttribArrayARB MANGLE(EnableVertexAttribArrayARB)
@@ -306,6 +323,7 @@
#define glEndOcclusionQueryNV MANGLE(EndOcclusionQueryNV)
#define glEndQueryARB MANGLE(EndQueryARB)
#define glEndQuery MANGLE(EndQuery)
+#define glEndTransformFeedbackNV MANGLE(EndTransformFeedbackNV)
#define glEndVertexShaderEXT MANGLE(EndVertexShaderEXT)
#define glEvalCoord1d MANGLE(EvalCoord1d)
#define glEvalCoord1dv MANGLE(EvalCoord1dv)
@@ -331,6 +349,7 @@
#define glFinishObjectAPPLE MANGLE(FinishObjectAPPLE)
#define glFinishTextureSUNX MANGLE(FinishTextureSUNX)
#define glFlush MANGLE(Flush)
+#define glFlushMappedBufferRangeAPPLE MANGLE(FlushMappedBufferRangeAPPLE)
#define glFlushPixelDataRangeNV MANGLE(FlushPixelDataRangeNV)
#define glFlushRasterSGIX MANGLE(FlushRasterSGIX)
#define glFlushVertexArrayRangeAPPLE MANGLE(FlushVertexArrayRangeAPPLE)
@@ -370,6 +389,9 @@
#define glFramebufferTexture1DEXT MANGLE(FramebufferTexture1DEXT)
#define glFramebufferTexture2DEXT MANGLE(FramebufferTexture2DEXT)
#define glFramebufferTexture3DEXT MANGLE(FramebufferTexture3DEXT)
+#define glFramebufferTextureEXT MANGLE(FramebufferTextureEXT)
+#define glFramebufferTextureFaceEXT MANGLE(FramebufferTextureFaceEXT)
+#define glFramebufferTextureLayerEXT MANGLE(FramebufferTextureLayerEXT)
#define glFrameZoomSGIX MANGLE(FrameZoomSGIX)
#define glFreeObjectBufferATI MANGLE(FreeObjectBufferATI)
#define glFrontFace MANGLE(FrontFace)
@@ -398,12 +420,14 @@
#define glGetActiveAttrib MANGLE(GetActiveAttrib)
#define glGetActiveUniformARB MANGLE(GetActiveUniformARB)
#define glGetActiveUniform MANGLE(GetActiveUniform)
+#define glGetActiveVaryingNV MANGLE(GetActiveVaryingNV)
#define glGetArrayObjectfvATI MANGLE(GetArrayObjectfvATI)
#define glGetArrayObjectivATI MANGLE(GetArrayObjectivATI)
#define glGetAttachedObjectsARB MANGLE(GetAttachedObjectsARB)
#define glGetAttachedShaders MANGLE(GetAttachedShaders)
#define glGetAttribLocationARB MANGLE(GetAttribLocationARB)
#define glGetAttribLocation MANGLE(GetAttribLocation)
+#define glGetBooleanIndexedvEXT MANGLE(GetBooleanIndexedvEXT)
#define glGetBooleanv MANGLE(GetBooleanv)
#define glGetBufferParameterivARB MANGLE(GetBufferParameterivARB)
#define glGetBufferParameteriv MANGLE(GetBufferParameteriv)
@@ -444,6 +468,7 @@
#define glGetFinalCombinerInputParameterivNV MANGLE(GetFinalCombinerInputParameterivNV)
#define glGetFloatv MANGLE(GetFloatv)
#define glGetFogFuncSGIS MANGLE(GetFogFuncSGIS)
+#define glGetFragDataLocationEXT MANGLE(GetFragDataLocationEXT)
#define glGetFragmentLightfvSGIX MANGLE(GetFragmentLightfvSGIX)
#define glGetFragmentLightivSGIX MANGLE(GetFragmentLightivSGIX)
#define glGetFragmentMaterialfvSGIX MANGLE(GetFragmentMaterialfvSGIX)
@@ -460,6 +485,7 @@
#define glGetImageTransformParameterivHP MANGLE(GetImageTransformParameterivHP)
#define glGetInfoLogARB MANGLE(GetInfoLogARB)
#define glGetInstrumentsSGIX MANGLE(GetInstrumentsSGIX)
+#define glGetIntegerIndexedvEXT MANGLE(GetIntegerIndexedvEXT)
#define glGetIntegerv MANGLE(GetIntegerv)
#define glGetInvariantBooleanvEXT MANGLE(GetInvariantBooleanvEXT)
#define glGetInvariantFloatvEXT MANGLE(GetInvariantFloatvEXT)
@@ -503,12 +529,16 @@
#define glGetPolygonStipple MANGLE(GetPolygonStipple)
#define glGetProgramEnvParameterdvARB MANGLE(GetProgramEnvParameterdvARB)
#define glGetProgramEnvParameterfvARB MANGLE(GetProgramEnvParameterfvARB)
+#define glGetProgramEnvParameterIivNV MANGLE(GetProgramEnvParameterIivNV)
+#define glGetProgramEnvParameterIuivNV MANGLE(GetProgramEnvParameterIuivNV)
#define glGetProgramInfoLog MANGLE(GetProgramInfoLog)
#define glGetProgramivARB MANGLE(GetProgramivARB)
#define glGetProgramiv MANGLE(GetProgramiv)
#define glGetProgramivNV MANGLE(GetProgramivNV)
#define glGetProgramLocalParameterdvARB MANGLE(GetProgramLocalParameterdvARB)
#define glGetProgramLocalParameterfvARB MANGLE(GetProgramLocalParameterfvARB)
+#define glGetProgramLocalParameterIivNV MANGLE(GetProgramLocalParameterIivNV)
+#define glGetProgramLocalParameterIuivNV MANGLE(GetProgramLocalParameterIuivNV)
#define glGetProgramNamedParameterdvNV MANGLE(GetProgramNamedParameterdvNV)
#define glGetProgramNamedParameterfvNV MANGLE(GetProgramNamedParameterfvNV)
#define glGetProgramParameterdvNV MANGLE(GetProgramParameterdvNV)
@@ -545,20 +575,27 @@
#define glGetTexLevelParameterfv MANGLE(GetTexLevelParameterfv)
#define glGetTexLevelParameteriv MANGLE(GetTexLevelParameteriv)
#define glGetTexParameterfv MANGLE(GetTexParameterfv)
+#define glGetTexParameterIivEXT MANGLE(GetTexParameterIivEXT)
+#define glGetTexParameterIuivEXT MANGLE(GetTexParameterIuivEXT)
#define glGetTexParameteriv MANGLE(GetTexParameteriv)
#define glGetTrackMatrixivNV MANGLE(GetTrackMatrixivNV)
+#define glGetTransformFeedbackVaryingNV MANGLE(GetTransformFeedbackVaryingNV)
+#define glGetUniformBufferSizeEXT MANGLE(GetUniformBufferSizeEXT)
#define glGetUniformfvARB MANGLE(GetUniformfvARB)
#define glGetUniformfv MANGLE(GetUniformfv)
#define glGetUniformivARB MANGLE(GetUniformivARB)
#define glGetUniformiv MANGLE(GetUniformiv)
#define glGetUniformLocationARB MANGLE(GetUniformLocationARB)
#define glGetUniformLocation MANGLE(GetUniformLocation)
+#define glGetUniformOffsetEXT MANGLE(GetUniformOffsetEXT)
+#define glGetUniformuivEXT MANGLE(GetUniformuivEXT)
#define glGetVariantArrayObjectfvATI MANGLE(GetVariantArrayObjectfvATI)
#define glGetVariantArrayObjectivATI MANGLE(GetVariantArrayObjectivATI)
#define glGetVariantBooleanvEXT MANGLE(GetVariantBooleanvEXT)
#define glGetVariantFloatvEXT MANGLE(GetVariantFloatvEXT)
#define glGetVariantIntegervEXT MANGLE(GetVariantIntegervEXT)
#define glGetVariantPointervEXT MANGLE(GetVariantPointervEXT)
+#define glGetVaryingLocationNV MANGLE(GetVaryingLocationNV)
#define glGetVertexAttribArrayObjectfvATI MANGLE(GetVertexAttribArrayObjectfvATI)
#define glGetVertexAttribArrayObjectivATI MANGLE(GetVertexAttribArrayObjectivATI)
#define glGetVertexAttribdvARB MANGLE(GetVertexAttribdvARB)
@@ -567,6 +604,8 @@
#define glGetVertexAttribfvARB MANGLE(GetVertexAttribfvARB)
#define glGetVertexAttribfv MANGLE(GetVertexAttribfv)
#define glGetVertexAttribfvNV MANGLE(GetVertexAttribfvNV)
+#define glGetVertexAttribIivEXT MANGLE(GetVertexAttribIivEXT)
+#define glGetVertexAttribIuivEXT MANGLE(GetVertexAttribIuivEXT)
#define glGetVertexAttribivARB MANGLE(GetVertexAttribivARB)
#define glGetVertexAttribiv MANGLE(GetVertexAttribiv)
#define glGetVertexAttribivNV MANGLE(GetVertexAttribivNV)
@@ -613,6 +652,7 @@
#define glIsAsyncMarkerSGIX MANGLE(IsAsyncMarkerSGIX)
#define glIsBufferARB MANGLE(IsBufferARB)
#define glIsBuffer MANGLE(IsBuffer)
+#define glIsEnabledIndexedEXT MANGLE(IsEnabledIndexedEXT)
#define glIsEnabled MANGLE(IsEnabled)
#define glIsFenceAPPLE MANGLE(IsFenceAPPLE)
#define glIsFenceNV MANGLE(IsFenceNV)
@@ -852,17 +892,32 @@
#define glPrimitiveRestartNV MANGLE(PrimitiveRestartNV)
#define glPrioritizeTexturesEXT MANGLE(PrioritizeTexturesEXT)
#define glPrioritizeTextures MANGLE(PrioritizeTextures)
+#define glProgramBufferParametersfvNV MANGLE(ProgramBufferParametersfvNV)
+#define glProgramBufferParametersIivNV MANGLE(ProgramBufferParametersIivNV)
+#define glProgramBufferParametersIuivNV MANGLE(ProgramBufferParametersIuivNV)
#define glProgramCallbackMESA MANGLE(ProgramCallbackMESA)
#define glProgramEnvParameter4dARB MANGLE(ProgramEnvParameter4dARB)
#define glProgramEnvParameter4dvARB MANGLE(ProgramEnvParameter4dvARB)
#define glProgramEnvParameter4fARB MANGLE(ProgramEnvParameter4fARB)
#define glProgramEnvParameter4fvARB MANGLE(ProgramEnvParameter4fvARB)
+#define glProgramEnvParameterI4iNV MANGLE(ProgramEnvParameterI4iNV)
+#define glProgramEnvParameterI4ivNV MANGLE(ProgramEnvParameterI4ivNV)
+#define glProgramEnvParameterI4uiNV MANGLE(ProgramEnvParameterI4uiNV)
+#define glProgramEnvParameterI4uivNV MANGLE(ProgramEnvParameterI4uivNV)
#define glProgramEnvParameters4fvEXT MANGLE(ProgramEnvParameters4fvEXT)
+#define glProgramEnvParametersI4ivNV MANGLE(ProgramEnvParametersI4ivNV)
+#define glProgramEnvParametersI4uivNV MANGLE(ProgramEnvParametersI4uivNV)
#define glProgramLocalParameter4dARB MANGLE(ProgramLocalParameter4dARB)
#define glProgramLocalParameter4dvARB MANGLE(ProgramLocalParameter4dvARB)
#define glProgramLocalParameter4fARB MANGLE(ProgramLocalParameter4fARB)
#define glProgramLocalParameter4fvARB MANGLE(ProgramLocalParameter4fvARB)
+#define glProgramLocalParameterI4iNV MANGLE(ProgramLocalParameterI4iNV)
+#define glProgramLocalParameterI4ivNV MANGLE(ProgramLocalParameterI4ivNV)
+#define glProgramLocalParameterI4uiNV MANGLE(ProgramLocalParameterI4uiNV)
+#define glProgramLocalParameterI4uivNV MANGLE(ProgramLocalParameterI4uivNV)
#define glProgramLocalParameters4fvEXT MANGLE(ProgramLocalParameters4fvEXT)
+#define glProgramLocalParametersI4ivNV MANGLE(ProgramLocalParametersI4ivNV)
+#define glProgramLocalParametersI4uivNV MANGLE(ProgramLocalParametersI4uivNV)
#define glProgramNamedParameter4dNV MANGLE(ProgramNamedParameter4dNV)
#define glProgramNamedParameter4dvNV MANGLE(ProgramNamedParameter4dvNV)
#define glProgramNamedParameter4fNV MANGLE(ProgramNamedParameter4fNV)
@@ -871,9 +926,11 @@
#define glProgramParameter4dvNV MANGLE(ProgramParameter4dvNV)
#define glProgramParameter4fNV MANGLE(ProgramParameter4fNV)
#define glProgramParameter4fvNV MANGLE(ProgramParameter4fvNV)
+#define glProgramParameteriEXT MANGLE(ProgramParameteriEXT)
#define glProgramParameters4dvNV MANGLE(ProgramParameters4dvNV)
#define glProgramParameters4fvNV MANGLE(ProgramParameters4fvNV)
#define glProgramStringARB MANGLE(ProgramStringARB)
+#define glProgramVertexLimitNV MANGLE(ProgramVertexLimitNV)
#define glPushAttrib MANGLE(PushAttrib)
#define glPushClientAttrib MANGLE(PushClientAttrib)
#define glPushMatrix MANGLE(PushMatrix)
@@ -915,6 +972,7 @@
#define glRectsv MANGLE(Rectsv)
#define glReferencePlaneSGIX MANGLE(ReferencePlaneSGIX)
#define glRenderbufferStorageEXT MANGLE(RenderbufferStorageEXT)
+#define glRenderbufferStorageMultisampleCoverageNV MANGLE(RenderbufferStorageMultisampleCoverageNV)
#define glRenderbufferStorageMultisampleEXT MANGLE(RenderbufferStorageMultisampleEXT)
#define glRenderMode MANGLE(RenderMode)
#define glReplacementCodePointerSUN MANGLE(ReplacementCodePointerSUN)
@@ -1043,6 +1101,7 @@
#define glTestFenceAPPLE MANGLE(TestFenceAPPLE)
#define glTestFenceNV MANGLE(TestFenceNV)
#define glTestObjectAPPLE MANGLE(TestObjectAPPLE)
+#define glTexBufferEXT MANGLE(TexBufferEXT)
#define glTexBumpParameterfvATI MANGLE(TexBumpParameterfvATI)
#define glTexBumpParameterivATI MANGLE(TexBumpParameterivATI)
#define glTexCoord1d MANGLE(TexCoord1d)
@@ -1121,7 +1180,9 @@
#define glTexImage4DSGIS MANGLE(TexImage4DSGIS)
#define glTexParameterf MANGLE(TexParameterf)
#define glTexParameterfv MANGLE(TexParameterfv)
+#define glTexParameterIivEXT MANGLE(TexParameterIivEXT)
#define glTexParameteri MANGLE(TexParameteri)
+#define glTexParameterIuivEXT MANGLE(TexParameterIuivEXT)
#define glTexParameteriv MANGLE(TexParameteriv)
#define glTexSubImage1DEXT MANGLE(TexSubImage1DEXT)
#define glTexSubImage1D MANGLE(TexSubImage1D)
@@ -1135,6 +1196,8 @@
#define glTextureMaterialEXT MANGLE(TextureMaterialEXT)
#define glTextureNormalEXT MANGLE(TextureNormalEXT)
#define glTrackMatrixNV MANGLE(TrackMatrixNV)
+#define glTransformFeedbackAttribsNV MANGLE(TransformFeedbackAttribsNV)
+#define glTransformFeedbackVaryingsNV MANGLE(TransformFeedbackVaryingsNV)
#define glTranslated MANGLE(Translated)
#define glTranslatef MANGLE(Translatef)
#define glUniform1fARB MANGLE(Uniform1fARB)
@@ -1145,6 +1208,8 @@
#define glUniform1i MANGLE(Uniform1i)
#define glUniform1ivARB MANGLE(Uniform1ivARB)
#define glUniform1iv MANGLE(Uniform1iv)
+#define glUniform1uiEXT MANGLE(Uniform1uiEXT)
+#define glUniform1uivEXT MANGLE(Uniform1uivEXT)
#define glUniform2fARB MANGLE(Uniform2fARB)
#define glUniform2f MANGLE(Uniform2f)
#define glUniform2fvARB MANGLE(Uniform2fvARB)
@@ -1153,6 +1218,8 @@
#define glUniform2i MANGLE(Uniform2i)
#define glUniform2ivARB MANGLE(Uniform2ivARB)
#define glUniform2iv MANGLE(Uniform2iv)
+#define glUniform2uiEXT MANGLE(Uniform2uiEXT)
+#define glUniform2uivEXT MANGLE(Uniform2uivEXT)
#define glUniform3fARB MANGLE(Uniform3fARB)
#define glUniform3f MANGLE(Uniform3f)
#define glUniform3fvARB MANGLE(Uniform3fvARB)
@@ -1161,6 +1228,8 @@
#define glUniform3i MANGLE(Uniform3i)
#define glUniform3ivARB MANGLE(Uniform3ivARB)
#define glUniform3iv MANGLE(Uniform3iv)
+#define glUniform3uiEXT MANGLE(Uniform3uiEXT)
+#define glUniform3uivEXT MANGLE(Uniform3uivEXT)
#define glUniform4fARB MANGLE(Uniform4fARB)
#define glUniform4f MANGLE(Uniform4f)
#define glUniform4fvARB MANGLE(Uniform4fvARB)
@@ -1169,6 +1238,9 @@
#define glUniform4i MANGLE(Uniform4i)
#define glUniform4ivARB MANGLE(Uniform4ivARB)
#define glUniform4iv MANGLE(Uniform4iv)
+#define glUniform4uiEXT MANGLE(Uniform4uiEXT)
+#define glUniform4uivEXT MANGLE(Uniform4uivEXT)
+#define glUniformBufferEXT MANGLE(UniformBufferEXT)
#define glUniformMatrix2fvARB MANGLE(UniformMatrix2fvARB)
#define glUniformMatrix2fv MANGLE(UniformMatrix2fv)
#define glUniformMatrix2x3fv MANGLE(UniformMatrix2x3fv)
@@ -1340,6 +1412,27 @@
#define glVertexAttrib4usvARB MANGLE(VertexAttrib4usvARB)
#define glVertexAttrib4usv MANGLE(VertexAttrib4usv)
#define glVertexAttribArrayObjectATI MANGLE(VertexAttribArrayObjectATI)
+#define glVertexAttribI1iEXT MANGLE(VertexAttribI1iEXT)
+#define glVertexAttribI1ivEXT MANGLE(VertexAttribI1ivEXT)
+#define glVertexAttribI1uiEXT MANGLE(VertexAttribI1uiEXT)
+#define glVertexAttribI1uivEXT MANGLE(VertexAttribI1uivEXT)
+#define glVertexAttribI2iEXT MANGLE(VertexAttribI2iEXT)
+#define glVertexAttribI2ivEXT MANGLE(VertexAttribI2ivEXT)
+#define glVertexAttribI2uiEXT MANGLE(VertexAttribI2uiEXT)
+#define glVertexAttribI2uivEXT MANGLE(VertexAttribI2uivEXT)
+#define glVertexAttribI3iEXT MANGLE(VertexAttribI3iEXT)
+#define glVertexAttribI3ivEXT MANGLE(VertexAttribI3ivEXT)
+#define glVertexAttribI3uiEXT MANGLE(VertexAttribI3uiEXT)
+#define glVertexAttribI3uivEXT MANGLE(VertexAttribI3uivEXT)
+#define glVertexAttribI4bvEXT MANGLE(VertexAttribI4bvEXT)
+#define glVertexAttribI4iEXT MANGLE(VertexAttribI4iEXT)
+#define glVertexAttribI4ivEXT MANGLE(VertexAttribI4ivEXT)
+#define glVertexAttribI4svEXT MANGLE(VertexAttribI4svEXT)
+#define glVertexAttribI4ubvEXT MANGLE(VertexAttribI4ubvEXT)
+#define glVertexAttribI4uiEXT MANGLE(VertexAttribI4uiEXT)
+#define glVertexAttribI4uivEXT MANGLE(VertexAttribI4uivEXT)
+#define glVertexAttribI4usvEXT MANGLE(VertexAttribI4usvEXT)
+#define glVertexAttribIPointerEXT MANGLE(VertexAttribIPointerEXT)
#define glVertexAttribPointerARB MANGLE(VertexAttribPointerARB)
#define glVertexAttribPointer MANGLE(VertexAttribPointer)
#define glVertexAttribPointerNV MANGLE(VertexAttribPointerNV)
diff --git a/include/GL/glu.h b/include/GL/glu.h
index c0bac75a8cc..d82103d141a 100644
--- a/include/GL/glu.h
+++ b/include/GL/glu.h
@@ -44,6 +44,19 @@
#define GLAPIENTRYP GLAPIENTRY *
#endif
+#ifdef GLAPI
+#undef GLAPI
+#endif
+
+# if (defined(_MSC_VER) || defined(__MINGW32__)) && defined(BUILD_GLU32)
+# define GLAPI __declspec(dllexport)
+# elif (defined(_MSC_VER) || defined(__MINGW32__)) && defined(_DLL) /* tag specifying we're building for DLL runtime support */
+# define GLAPI __declspec(dllimport)
+# else /* for use with static link lib build of Win32 edition only */
+# define GLAPI extern
+# endif /* _STATIC_MESA support */
+
+
#ifndef GLAPI
#define GLAPI
#endif
diff --git a/include/GL/glut.h b/include/GL/glut.h
index 23c740ee117..e286349f9b0 100644
--- a/include/GL/glut.h
+++ b/include/GL/glut.h
@@ -10,6 +10,10 @@
#include <GL/gl.h>
#include <GL/glu.h>
+#if defined(__MINGW32__)
+#include <GL/mesa_wgl.h>
+#endif
+
#ifdef __cplusplus
extern "C" {
#endif
@@ -108,14 +112,14 @@ extern _CRTIMP void __cdecl exit(int);
and redifinition of Windows system defs, also removes requirement of
pretty much any standard windows header from this file */
-#if (_MSC_VER >= 800) || defined(__MINGW32__) || defined(_STDCALL_SUPPORTED) || defined(__CYGWIN32__)
+#if (_MSC_VER >= 800) || defined(_STDCALL_SUPPORTED) || defined(__CYGWIN32__)
# define GLUTAPIENTRY __stdcall
#else
# define GLUTAPIENTRY
#endif
/* GLUT API entry point declarations for Win32. */
-#if defined(GLUT_BUILDING_LIB) && defined(_DLL)
+#if (defined(BUILD_GLUT32) || defined(GLUT_BUILDING_LIB)) && defined(_DLL)
# define GLUTAPI __declspec(dllexport)
#elif defined(_DLL)
# define GLUTAPI __declspec(dllimport)
@@ -130,9 +134,12 @@ extern _CRTIMP void __cdecl exit(int);
# pragma message( "----: being multiply defined you should include WINDOWS.H priot to gl/glut.h" )
# endif
# define CALLBACK __stdcall
-typedef int (GLUTAPIENTRY *PROC)();
-typedef void *HGLRC;
-typedef void *HDC;
+
+#if !defined(__MINGW32__)
+ typedef int (GLUTAPIENTRY *PROC)();
+ typedef void *HGLRC;
+ typedef void *HDC;
+#endif
typedef unsigned long COLORREF;
#endif
diff --git a/include/GL/mesa_wgl.h b/include/GL/mesa_wgl.h
index acc7eac2a71..1d774571d94 100644
--- a/include/GL/mesa_wgl.h
+++ b/include/GL/mesa_wgl.h
@@ -26,11 +26,12 @@
/* prototypes for the Mesa WGL functions */
/* relocated here so that I could make GLUT get them properly */
-#define _mesa_wgl_h_
-
#ifndef _mesa_wgl_h_
#define _mesa_wgl_h_
+#if defined(__MINGW32__)
+# define __W32API_USE_DLLIMPORT__
+#endif
#include <GL/gl.h>
@@ -39,23 +40,16 @@ extern "C" {
#endif
-#if !defined(OPENSTEP) && (defined(__WIN32__) || defined(__CYGWIN32__))
-# if (defined(_MSC_VER) || defined(__MINGW32__)) && 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(__MINGW32__)) && 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
-#else
-/* non-Windows compilation */
-# define GLAPI extern
-# define GLAPIENTRY
-#endif /* WIN32 / CYGWIN32 bracket */
+#ifndef WGLAPI
+#define WGLAPI GLAPI
+#endif
+
+#if defined(__MINGW32__)
+# ifndef WIN32_LEAN_AND_MEAN
+# define WIN32_LEAN_AND_MEAN 1
+# endif
+# include <windows.h>
+#endif
#if defined(_WIN32) && !defined(_WINGDI_) && !defined(_GNU_H_WINDOWS32_DEFINES) && !defined(OPENSTEP)
@@ -80,23 +74,25 @@ typedef struct tagPIXELFORMATDESCRIPTOR PIXELFORMATDESCRIPTOR, *PPIXELFORMATDESC
# pragma warning( disable : 4273 ) /* 'function' : inconsistent DLL linkage. dllexport assumed. */
#endif
-WGLAPI int GLAPIENTRY wglDeleteContext(HGLRC);
-WGLAPI int GLAPIENTRY wglMakeCurrent(HDC,HGLRC);
+
WGLAPI int GLAPIENTRY wglSetPixelFormat(HDC, int, const PIXELFORMATDESCRIPTOR *);
WGLAPI int GLAPIENTRY wglSwapBuffers(HDC hdc);
-WGLAPI HDC GLAPIENTRY wglGetCurrentDC(void);
-WGLAPI HGLRC GLAPIENTRY wglCreateContext(HDC);
-WGLAPI HGLRC GLAPIENTRY wglCreateLayerContext(HDC,int);
-WGLAPI HGLRC GLAPIENTRY wglGetCurrentContext(void);
-WGLAPI PROC GLAPIENTRY wglGetProcAddress(const char*);
WGLAPI int GLAPIENTRY wglChoosePixelFormat(HDC, const PIXELFORMATDESCRIPTOR *);
+WGLAPI int GLAPIENTRY wglDescribePixelFormat(HDC,int, unsigned int, LPPIXELFORMATDESCRIPTOR);
+WGLAPI int GLAPIENTRY wglGetPixelFormat(HDC hdc);
+
+
+#if defined(GL_NO_STDCALL) || !defined(__MINGW32__)
WGLAPI int GLAPIENTRY wglCopyContext(HGLRC, HGLRC, unsigned int);
+WGLAPI HGLRC GLAPIENTRY wglCreateContext(HDC);
+WGLAPI HGLRC GLAPIENTRY wglCreateLayerContext(HDC,int);
WGLAPI int GLAPIENTRY wglDeleteContext(HGLRC);
WGLAPI int GLAPIENTRY wglDescribeLayerPlane(HDC, int, int, unsigned int,LPLAYERPLANEDESCRIPTOR);
-WGLAPI int GLAPIENTRY wglDescribePixelFormat(HDC,int, unsigned int, LPPIXELFORMATDESCRIPTOR);
+WGLAPI HGLRC GLAPIENTRY wglGetCurrentContext(void);
+WGLAPI HDC GLAPIENTRY wglGetCurrentDC(void);
WGLAPI int GLAPIENTRY wglGetLayerPaletteEntries(HDC, int, int, int,COLORREF *);
-WGLAPI int GLAPIENTRY wglGetPixelFormat(HDC hdc);
-WGLAPI int GLAPIENTRY wglMakeCurrent(HDC, HGLRC);
+WGLAPI PROC GLAPIENTRY wglGetProcAddress(const char*);
+WGLAPI int GLAPIENTRY wglMakeCurrent(HDC,HGLRC);
WGLAPI int GLAPIENTRY wglRealizeLayerPalette(HDC, int, int);
WGLAPI int GLAPIENTRY wglSetLayerPaletteEntries(HDC, int, int, int,const COLORREF *);
WGLAPI int GLAPIENTRY wglShareLists(HGLRC, HGLRC);
@@ -105,12 +101,15 @@ WGLAPI int GLAPIENTRY wglUseFontBitmapsA(HDC, unsigned long, unsigned long, un
WGLAPI int GLAPIENTRY wglUseFontBitmapsW(HDC, unsigned long, unsigned long, unsigned long);
WGLAPI int GLAPIENTRY wglUseFontOutlinesA(HDC, unsigned long, unsigned long, unsigned long, float,float, int, LPGLYPHMETRICSFLOAT);
WGLAPI int GLAPIENTRY wglUseFontOutlinesW(HDC, unsigned long, unsigned long, unsigned long, float,float, int, LPGLYPHMETRICSFLOAT);
+#endif
+
+#ifndef __MINGW32__
WGLAPI int GLAPIENTRY SwapBuffers(HDC);
WGLAPI int GLAPIENTRY ChoosePixelFormat(HDC,const PIXELFORMATDESCRIPTOR *);
WGLAPI int GLAPIENTRY DescribePixelFormat(HDC,int,unsigned int,LPPIXELFORMATDESCRIPTOR);
WGLAPI int GLAPIENTRY GetPixelFormat(HDC);
WGLAPI int GLAPIENTRY SetPixelFormat(HDC,int,const PIXELFORMATDESCRIPTOR *);
-
+#endif
#ifndef WGL_ARB_extensions_string
#define WGL_ARB_extensions_string 1
diff --git a/progs/demos/geartrain.c b/progs/demos/geartrain.c
index 3feb2a0524b..8363f2abc6d 100644
--- a/progs/demos/geartrain.c
+++ b/progs/demos/geartrain.c
@@ -1053,6 +1053,7 @@ main (int argc, char *argv[])
else
file = argv[1];
+ glutInit(&argc, argv);
glutInitWindowPosition (0, 0);
glutInitWindowSize(640,480);
glutInitDisplayMode (GLUT_RGB | GLUT_DEPTH | GLUT_DOUBLE );
diff --git a/progs/demos/gltestperf.c b/progs/demos/gltestperf.c
index be953901014..2188b024192 100644
--- a/progs/demos/gltestperf.c
+++ b/progs/demos/gltestperf.c
@@ -569,6 +569,7 @@ main(int ac, char **av)
if (ac == 2)
frontbuffer = 0;
+ glutInit(&ac, av);
glutInitDisplayMode(GLUT_DOUBLE | GLUT_RGB | GLUT_DEPTH);
glutInitWindowPosition(0, 0);
glutInitWindowSize(640, 480);
diff --git a/progs/demos/isosurf.c b/progs/demos/isosurf.c
index 0710bc6047b..10f94b6ace2 100644
--- a/progs/demos/isosurf.c
+++ b/progs/demos/isosurf.c
@@ -1042,6 +1042,7 @@ int main(int argc, char **argv)
read_surface( "isosurf.dat" );
+ glutInit( &argc, argv);
glutInitWindowPosition(0, 0);
glutInitWindowSize(400, 400);
diff --git a/progs/demos/morph3d.c b/progs/demos/morph3d.c
index 162a6ff847e..6aca8270ff5 100644
--- a/progs/demos/morph3d.c
+++ b/progs/demos/morph3d.c
@@ -826,7 +826,7 @@ static void pinit(void)
}
-static void INIT(void)
+int main(int argc, char **argv)
{
printf("Morph 3D - Shows morphing platonic polyhedra\n");
printf("Author: Marcelo Fernandes Vianna ([email protected])\n\n");
@@ -841,6 +841,7 @@ static void INIT(void)
object=1;
+ glutInit(&argc, argv);
glutInitWindowPosition(0,0);
glutInitWindowSize(640,480);
@@ -888,9 +889,3 @@ static void INIT(void)
glutMainLoop();
}
-
-int main(int argc, char **argv)
-{
- INIT();
- return(0);
-}
diff --git a/progs/demos/winpos.c b/progs/demos/winpos.c
index 3a1a19ecdb9..b58e3308643 100644
--- a/progs/demos/winpos.c
+++ b/progs/demos/winpos.c
@@ -100,6 +100,7 @@ static void init( void )
int main( int argc, char *argv[] )
{
+ glutInit(&argc, argv);
glutInitWindowPosition(0, 0);
glutInitWindowSize(500, 500);
glutInitDisplayMode( GLUT_RGB );
diff --git a/progs/samples/Makefile.mgw b/progs/samples/Makefile.mgw
index 11935405783..3b2fd785def 100644
--- a/progs/samples/Makefile.mgw
+++ b/progs/samples/Makefile.mgw
@@ -26,6 +26,15 @@
# Web : http://www.geocities.com/dborca
+# MinGW samples makefile updated for Mesa 7.0
+#
+# Updated : by Heromyth, on 2007-7-21
+# Bugs : 1) All the default settings work fine. But the setting X86=1 can't work.
+# The others havn't been tested yet.
+# 2) The generated DLLs are *not* compatible with the ones built
+# with the other compilers like VC8, especially for GLUT.
+# 3) Although more tests are needed, it can be used individually!
#
# Available options:
@@ -44,15 +53,31 @@
TOP = ../..
+include $(TOP)/configs/config.mgw
+ALL_USING_STDCALL ?= 1
+GL_USING_STDCALL ?= 1
+GLUT_USING_STDCALL ?= 1
+
CC = mingw32-gcc
-CFLAGS = -Wall -W -pedantic
+CFLAGS = -Wall -pedantic
CFLAGS += -O2 -ffast-math
CFLAGS += -I$(TOP)/include -I../util
ifeq ($(FX),1)
-CFLAGS += -DFX
+ CFLAGS += -DFX
+endif
+
+CFLAGS += -DGLUT_DISABLE_ATEXIT_HACK
+
+ifeq ($(GL_USING_STDCALL),0)
+ CFLAGS += -DGL_NO_STDCALL
+endif
+
+ifeq ($(GLUT_USING_STDCALL),1)
+ CFLAGS += -D_STDCALL_SUPPORTED
+else
+ CFLAGS += -DGLUT_NO_STDCALL
endif
-CFLAGS += -DGLUT_DISABLE_ATEXIT_HACK -D_STDCALL_SUPPORTED
-CFLAGS += -D_WINDEF_ -D_WINGDI_
+
LD = mingw32-g++
LDFLAGS = -s -L$(TOP)/lib
diff --git a/src/glu/sgi/Makefile.mgw b/src/glu/sgi/Makefile.mgw
new file mode 100644
index 00000000000..43b421e737a
--- /dev/null
+++ b/src/glu/sgi/Makefile.mgw
@@ -0,0 +1,229 @@
+# Mesa 3-D graphics library
+# Version: 5.1
+#
+# Copyright (C) 1999-2003 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.
+
+# MinGW core makefile v1.4 for Mesa
+#
+# Copyright (C) 2002 - Daniel Borca
+# Web : http://www.geocities.com/dborca
+
+# MinGW core-glu makefile updated for Mesa 7.0
+#
+# Updated : by Heromyth, on 2007-7-21
+# Bugs : 1) All the default settings work fine. But the setting X86=1 can't work.
+# The others havn't been tested yet.
+# 2) The generated DLLs are *not* compatible with the ones built
+# with the other compilers like VC8, especially for GLUT.
+# 3) Although more tests are needed, it can be used individually!
+
+#
+# Available options:
+#
+# Environment variables:
+# CFLAGS
+#
+# GLIDE path to Glide3 SDK; used with FX.
+# default = $(TOP)/glide3
+# FX=1 build for 3dfx Glide3. Note that this disables
+# compilation of most WMesa code and requires fxMesa.
+# As a consequence, you'll need the Win32 Glide3
+# library to build any application.
+# default = no
+# ICD=1 build the installable client driver interface
+# (windows opengl driver interface)
+# default = no
+# X86=1 optimize for x86 (if possible, use MMX, SSE, 3DNow).
+# default = no
+#
+# Targets:
+# all: build GL
+# clean: remove object files
+#
+
+
+
+.PHONY: all clean
+.INTERMEDIATE: x86/gen_matypes.exe
+.SUFFIXES: .rc .res
+
+# Set this to the prefix of your build tools, i.e. mingw32-
+TOOLS_PREFIX = mingw32-
+
+TOP = ../../..
+
+LIBDIR = $(TOP)/lib
+
+GLU_DLL = glu32.dll
+GLU_IMP = libglu32.a
+GLU_DEF = glu.def
+
+include $(TOP)/configs/config.mgw
+GL_USING_STDCALL ?= 1
+
+LDLIBS = -L$(LIBDIR) -lopengl32
+LDFLAGS = -Wl,--out-implib=$(LIBDIR)/$(GLU_IMP) -Wl,--output-def=$(LIBDIR)/$(GLU_DEF)
+
+CFLAGS += -DBUILD_GLU32 -D_DLL
+
+ifeq ($(GL_USING_STDCALL),1)
+ LDFLAGS += -Wl,--add-stdcall-alias
+else
+ CFLAGS += -DGL_NO_STDCALL
+endif
+
+CC = gcc
+CFLAGS += -DNDEBUG -DLIBRARYBUILD -I$(TOP)/include -Iinclude
+CXX = g++
+CXXFLAGS = $(CFLAGS) -Ilibnurbs/internals -Ilibnurbs/interface -Ilibnurbs/nurbtess
+
+AR = ar
+ARFLAGS = crus
+
+UNLINK = del $(subst /,\,$(1))
+ifneq ($(wildcard $(addsuffix /rm.exe,$(subst ;, ,$(PATH)))),)
+UNLINK = $(RM) $(1)
+endif
+ifneq ($(wildcard $(addsuffix /rm,$(subst :, ,$(PATH)))),)
+UNLINK = $(RM) $(1)
+endif
+
+C_SOURCES = \
+ libutil/error.c \
+ libutil/glue.c \
+ libutil/mipmap.c \
+ libutil/project.c \
+ libutil/quad.c \
+ libutil/registry.c \
+ libtess/dict.c \
+ libtess/geom.c \
+ libtess/memalloc.c \
+ libtess/mesh.c \
+ libtess/normal.c \
+ libtess/priorityq.c \
+ libtess/render.c \
+ libtess/sweep.c \
+ libtess/tess.c \
+ libtess/tessmono.c
+
+CC_SOURCES = \
+ libnurbs/interface/bezierEval.cc \
+ libnurbs/interface/bezierPatch.cc \
+ libnurbs/interface/bezierPatchMesh.cc \
+ libnurbs/interface/glcurveval.cc \
+ libnurbs/interface/glinterface.cc \
+ libnurbs/interface/glrenderer.cc \
+ libnurbs/interface/glsurfeval.cc \
+ libnurbs/interface/incurveeval.cc \
+ libnurbs/interface/insurfeval.cc \
+ libnurbs/internals/arc.cc \
+ libnurbs/internals/arcsorter.cc \
+ libnurbs/internals/arctess.cc \
+ libnurbs/internals/backend.cc \
+ libnurbs/internals/basiccrveval.cc \
+ libnurbs/internals/basicsurfeval.cc \
+ libnurbs/internals/bin.cc \
+ libnurbs/internals/bufpool.cc \
+ libnurbs/internals/cachingeval.cc \
+ libnurbs/internals/ccw.cc \
+ libnurbs/internals/coveandtiler.cc \
+ libnurbs/internals/curve.cc \
+ libnurbs/internals/curvelist.cc \
+ libnurbs/internals/curvesub.cc \
+ libnurbs/internals/dataTransform.cc \
+ libnurbs/internals/displaylist.cc \
+ libnurbs/internals/flist.cc \
+ libnurbs/internals/flistsorter.cc \
+ libnurbs/internals/hull.cc \
+ libnurbs/internals/intersect.cc \
+ libnurbs/internals/knotvector.cc \
+ libnurbs/internals/mapdesc.cc \
+ libnurbs/internals/mapdescv.cc \
+ libnurbs/internals/maplist.cc \
+ libnurbs/internals/mesher.cc \
+ libnurbs/internals/monoTriangulationBackend.cc \
+ libnurbs/internals/monotonizer.cc \
+ libnurbs/internals/mycode.cc \
+ libnurbs/internals/nurbsinterfac.cc \
+ libnurbs/internals/nurbstess.cc \
+ libnurbs/internals/patch.cc \
+ libnurbs/internals/patchlist.cc \
+ libnurbs/internals/quilt.cc \
+ libnurbs/internals/reader.cc \
+ libnurbs/internals/renderhints.cc \
+ libnurbs/internals/slicer.cc \
+ libnurbs/internals/sorter.cc \
+ libnurbs/internals/splitarcs.cc \
+ libnurbs/internals/subdivider.cc \
+ libnurbs/internals/tobezier.cc \
+ libnurbs/internals/trimline.cc \
+ libnurbs/internals/trimregion.cc \
+ libnurbs/internals/trimvertpool.cc \
+ libnurbs/internals/uarray.cc \
+ libnurbs/internals/varray.cc \
+ libnurbs/nurbtess/directedLine.cc \
+ libnurbs/nurbtess/gridWrap.cc \
+ libnurbs/nurbtess/monoChain.cc \
+ libnurbs/nurbtess/monoPolyPart.cc \
+ libnurbs/nurbtess/monoTriangulation.cc \
+ libnurbs/nurbtess/partitionX.cc \
+ libnurbs/nurbtess/partitionY.cc \
+ libnurbs/nurbtess/polyDBG.cc \
+ libnurbs/nurbtess/polyUtil.cc \
+ libnurbs/nurbtess/primitiveStream.cc \
+ libnurbs/nurbtess/quicksort.cc \
+ libnurbs/nurbtess/rectBlock.cc \
+ libnurbs/nurbtess/sampleComp.cc \
+ libnurbs/nurbtess/sampleCompBot.cc \
+ libnurbs/nurbtess/sampleCompRight.cc \
+ libnurbs/nurbtess/sampleCompTop.cc \
+ libnurbs/nurbtess/sampleMonoPoly.cc \
+ libnurbs/nurbtess/sampledLine.cc \
+ libnurbs/nurbtess/searchTree.cc
+
+SOURCES = $(C_SOURCES) $(CC_SOURCES)
+
+OBJECTS = $(addsuffix .o,$(basename $(SOURCES)))
+
+.c.o:
+ $(CC) -o $@ $(CFLAGS) -c $<
+.cc.o:
+ $(CXX) -o $@ $(CXXFLAGS) -c $<
+
+
+all: $(LIBDIR) $(LIBDIR)/$(GLU_DLL) $(LIBDIR)/$(GLU_IMP)
+
+$(LIBDIR):
+ mkdir -p $(LIBDIR)
+
+$(LIBDIR)/$(GLU_DLL) $(LIBDIR)/$(GLU_IMP): $(OBJECTS)
+ g++ -shared -fPIC -o $(LIBDIR)/$(GLU_DLL) $(LDFLAGS) \
+ $^ $(LDLIBS)
+
+
+
+clean:
+ -$(call UNLINK,libutil/*.o)
+ -$(call UNLINK,libtess/*.o)
+ -$(call UNLINK,libnurbs/interface/*.o)
+ -$(call UNLINK,libnurbs/internals/*.o)
+ -$(call UNLINK,libnurbs/nurbtess/*.o)
diff --git a/src/glu/sgi/libnurbs/interface/glcurveval.h b/src/glu/sgi/libnurbs/interface/glcurveval.h
index 4b44f6e847e..a09a74d04c3 100644
--- a/src/glu/sgi/libnurbs/interface/glcurveval.h
+++ b/src/glu/sgi/libnurbs/interface/glcurveval.h
@@ -93,7 +93,7 @@ public:
output_triangles = flag;
}
#ifdef _WIN32
- void putCallBack(GLenum which, void (APIENTRY *fn)() );
+ void putCallBack(GLenum which, void (GLAPIENTRY *fn)() );
#else
void putCallBack(GLenum which, _GLUfuncptr fn );
#endif
diff --git a/src/glu/sgi/libnurbs/interface/glsurfeval.cc b/src/glu/sgi/libnurbs/interface/glsurfeval.cc
index a36b304508c..b5bfab1e281 100644
--- a/src/glu/sgi/libnurbs/interface/glsurfeval.cc
+++ b/src/glu/sgi/libnurbs/interface/glsurfeval.cc
@@ -1184,8 +1184,11 @@ return;
}
-void
-OpenGLSurfaceEvaluator::putCallBack(GLenum which, _GLUfuncptr fn )
+#ifdef _WIN32
+void OpenGLSurfaceEvaluator::putCallBack(GLenum which, void (GLAPIENTRY *fn)() )
+#else
+void OpenGLSurfaceEvaluator::putCallBack(GLenum which, _GLUfuncptr fn )
+#endif
{
switch(which)
{
diff --git a/src/glu/sgi/libnurbs/interface/glsurfeval.h b/src/glu/sgi/libnurbs/interface/glsurfeval.h
index c34a58cb9b9..b7a88069f5a 100644
--- a/src/glu/sgi/libnurbs/interface/glsurfeval.h
+++ b/src/glu/sgi/libnurbs/interface/glsurfeval.h
@@ -145,7 +145,7 @@ public:
void newtmeshvert( long, long );
#ifdef _WIN32
- void putCallBack(GLenum which, void (APIENTRY *fn)() );
+ void putCallBack(GLenum which, void (GLAPIENTRY *fn)() );
#else
void putCallBack(GLenum which, _GLUfuncptr fn );
#endif
diff --git a/src/glu/sgi/libnurbs/nurbtess/monoTriangulation.h b/src/glu/sgi/libnurbs/nurbtess/monoTriangulation.h
index 7ff77394341..002549ecbd7 100644
--- a/src/glu/sgi/libnurbs/nurbtess/monoTriangulation.h
+++ b/src/glu/sgi/libnurbs/nurbtess/monoTriangulation.h
@@ -43,10 +43,9 @@
#include "definitions.h"
#include "primitiveStream.h"
#include "directedLine.h"
+#include "arc.h"
class Backend;
-class Arc;
-typedef Arc *Arc_ptr;
class reflexChain{
Real2 *queue;
diff --git a/src/glut/glx/Makefile.mgw b/src/glut/glx/Makefile.mgw
new file mode 100644
index 00000000000..ae4eb6addc5
--- /dev/null
+++ b/src/glut/glx/Makefile.mgw
@@ -0,0 +1,198 @@
+# Mesa 3-D graphics library
+# Version: 5.1
+#
+# Copyright (C) 1999-2003 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.
+
+# MinGW core makefile v1.4 for Mesa
+#
+# Copyright (C) 2002 - Daniel Borca
+# Web : http://www.geocities.com/dborca
+
+# MinGW core-glut makefile updated for Mesa 7.0
+#
+# Updated : by Heromyth, on 2007-7-21
+# Bugs : 1) All the default settings work fine. But the setting X86=1 can't work.
+# The others havn't been tested yet.
+# 2) The generated DLLs are *not* compatible with the ones built
+# with the other compilers like VC8, especially for GLUT.
+# 3) Although more tests are needed, it can be used individually!
+
+
+#
+# Available options:
+#
+# Environment variables:
+# CFLAGS
+#
+# GLIDE path to Glide3 SDK; used with FX.
+# default = $(TOP)/glide3
+# FX=1 build for 3dfx Glide3. Note that this disables
+# compilation of most WMesa code and requires fxMesa.
+# As a consequence, you'll need the Win32 Glide3
+# library to build any application.
+# default = no
+# ICD=1 build the installable client driver interface
+# (windows opengl driver interface)
+# default = no
+# X86=1 optimize for x86 (if possible, use MMX, SSE, 3DNow).
+# default = no
+#
+# Targets:
+# all: build GL
+# clean: remove object files
+#
+
+
+
+.PHONY: all clean
+.INTERMEDIATE: x86/gen_matypes.exe
+.SUFFIXES: .rc .res
+
+# Set this to the prefix of your build tools, i.e. mingw32-
+TOOLS_PREFIX = mingw32-
+
+TOP = ../../..
+
+LIBDIR = $(TOP)/lib
+
+GLUT_DLL = glut32.dll
+GLUT_IMP = libglut32.a
+GLUT_DEF = glut.def
+
+include $(TOP)/configs/config.mgw
+GLUT_USING_STDCALL ?= 1
+
+
+
+LDLIBS = -L$(LIBDIR) -lwinmm -lgdi32 -luser32 -lopengl32 -lglu32
+LDFLAGS = -Wl,--out-implib=$(LIBDIR)/$(GLUT_IMP) -Wl,--output-def=$(LIBDIR)/$(GLUT_DEF)
+
+CFLAGS += -DBUILD_GLUT32 -DGLUT_BUILDING_LIB -DMESA -D_DLL
+
+ifeq ($(GL_USING_STDCALL),0)
+ CFLAGS += -DGL_NO_STDCALL
+endif
+
+ifeq ($(GLUT_USING_STDCALL),1)
+ CFLAGS += -D_STDCALL_SUPPORTED
+ LDFLAGS += -Wl,--add-stdcall-alias
+else
+ CFLAGS += -DGLUT_NO_STDCALL
+endif
+
+CFLAGS += -DNDEBUG -DLIBRARYBUILD -I$(TOP)/include
+
+CC = gcc
+CXX = g++
+CXXFLAGS = $(CFLAGS)
+
+AR = ar
+ARFLAGS = crus
+
+UNLINK = del $(subst /,\,$(1))
+ifneq ($(wildcard $(addsuffix /rm.exe,$(subst ;, ,$(PATH)))),)
+UNLINK = $(RM) $(1)
+endif
+ifneq ($(wildcard $(addsuffix /rm,$(subst :, ,$(PATH)))),)
+UNLINK = $(RM) $(1)
+endif
+
+HDRS = glutint.h glutstroke.h glutbitmap.h glutwin32.h stroke.h win32_glx.h win32_x11.h
+
+SRCS = \
+ glut_bitmap.c \
+ glut_bwidth.c \
+ glut_cindex.c \
+ glut_cmap.c \
+ glut_cursor.c \
+ glut_dials.c \
+ glut_dstr.c \
+ glut_event.c \
+ glut_ext.c \
+ glut_fbc.c \
+ glut_fullscrn.c \
+ glut_gamemode.c \
+ glut_get.c \
+ glut_init.c \
+ glut_input.c \
+ glut_joy.c \
+ glut_key.c \
+ glut_keyctrl.c \
+ glut_keyup.c \
+ glut_mesa.c \
+ glut_modifier.c \
+ glut_overlay.c \
+ glut_shapes.c \
+ glut_space.c \
+ glut_stroke.c \
+ glut_swap.c \
+ glut_swidth.c \
+ glut_tablet.c \
+ glut_teapot.c \
+ glut_util.c \
+ glut_vidresize.c \
+ glut_warp.c \
+ glut_win.c \
+ glut_winmisc.c \
+ win32_glx.c \
+ win32_menu.c \
+ win32_util.c \
+ win32_winproc.c \
+ win32_x11.c
+
+
+SRCSSEMIGENS = \
+ glut_8x13.c \
+ glut_9x15.c \
+ glut_hel10.c \
+ glut_hel12.c \
+ glut_hel18.c \
+ glut_mroman.c \
+ glut_roman.c \
+ glut_tr10.c \
+ glut_tr24.c
+
+
+
+SOURCES = $(SRCS) $(SRCSSEMIGENS)
+
+OBJECTS = $(addsuffix .o,$(basename $(SOURCES)))
+
+.c.o:
+ $(CC) -o $@ $(CFLAGS) -c $<
+.cc.o:
+ $(CXX) -o $@ $(CXXFLAGS) -c $<
+
+
+all: $(LIBDIR) $(LIBDIR)/$(GLUT_DLL) $(LIBDIR)/$(GLUT_IMP)
+
+$(LIBDIR):
+ mkdir -p $(LIBDIR)
+
+$(LIBDIR)/$(GLUT_DLL) $(LIBDIR)/$(GLUT_IMP): $(OBJECTS)
+ $(CXX) -shared -fPIC -o $(LIBDIR)/$(GLUT_DLL) $(LDFLAGS) \
+ $^ $(LDLIBS)
+
+
+
+clean:
+ -$(call UNLINK,*.o) \ No newline at end of file
diff --git a/src/glut/glx/glut_fbc.c b/src/glut/glx/glut_fbc.c
index deb46c3d8db..e93188b8622 100644
--- a/src/glut/glx/glut_fbc.c
+++ b/src/glut/glx/glut_fbc.c
@@ -18,7 +18,7 @@
/* Set a Fortran callback function. */
-void GLUTAPIENTRY
+void APIENTRY
__glutSetFCB(int which, void *func)
{
#ifdef SUPPORT_FORTRAN
@@ -100,7 +100,7 @@ __glutSetFCB(int which, void *func)
/* Get a Fortran callback function. */
-void* GLUTAPIENTRY
+void* APIENTRY
__glutGetFCB(int which)
{
#ifdef SUPPORT_FORTRAN
diff --git a/src/glut/glx/glut_input.c b/src/glut/glx/glut_input.c
index add3df7c3fd..a76ff9a435e 100644
--- a/src/glut/glx/glut_input.c
+++ b/src/glut/glx/glut_input.c
@@ -23,6 +23,9 @@
#endif
#include <X11/Xutil.h>
#else
+#ifdef __MINGW32__
+#include <GL/gl.h>
+#endif
#include <windows.h>
#ifndef __CYGWIN32__
#include <mmsystem.h> /* Win32 Multimedia API header. */
diff --git a/src/glut/glx/glut_joy.c b/src/glut/glx/glut_joy.c
index a4528ae1ce4..5025607922c 100644
--- a/src/glut/glx/glut_joy.c
+++ b/src/glut/glx/glut_joy.c
@@ -6,6 +6,9 @@
implied. This program is -not- in the public domain. */
#ifdef _WIN32
+#ifdef __MINGW32__
+#include <GL/gl.h>
+#endif
#include <windows.h>
#ifndef __CYGWIN32__
#include <mmsystem.h> /* Win32 Multimedia API header. */
diff --git a/src/glut/glx/glutint.h b/src/glut/glx/glutint.h
index 6fe09ffe7e7..a962c780238 100644
--- a/src/glut/glx/glutint.h
+++ b/src/glut/glx/glutint.h
@@ -26,7 +26,10 @@
#include <GL/glx.h>
#endif
+#ifndef GLUT_BUILDING_LIB
#define GLUT_BUILDING_LIB /* Building the GLUT library itself. */
+#endif
+
#include <GL/glut.h>
#if defined(MESA) && defined(_WIN32) && !defined(__CYGWIN32__)
diff --git a/src/glut/glx/win32_util.c b/src/glut/glx/win32_util.c
index becd823a409..25af48a1125 100644
--- a/src/glut/glx/win32_util.c
+++ b/src/glut/glx/win32_util.c
@@ -15,6 +15,7 @@
/* The following added by Paul Garceau <[email protected]> */
#if defined(__MINGW32__)
+#include <GL/gl.h>
#include <time.h>
#include <windows.h>
struct timeval;
diff --git a/src/glut/glx/win32_winproc.c b/src/glut/glx/win32_winproc.c
index a54bac75fa0..e1fc785ebb7 100644
--- a/src/glut/glx/win32_winproc.c
+++ b/src/glut/glx/win32_winproc.c
@@ -9,6 +9,9 @@
#include "glutint.h"
#include <sys/timeb.h>
+#ifdef __MINGW32__
+#include <ctype.h>
+#endif
#if defined(_WIN32) && !defined(__CYGWIN32__)
#include <mmsystem.h> /* Win32 Multimedia API header. */
diff --git a/src/glut/glx/win32_x11.h b/src/glut/glx/win32_x11.h
index 1d8d048b2e0..6f5c3a9aeaf 100644
--- a/src/glut/glx/win32_x11.h
+++ b/src/glut/glx/win32_x11.h
@@ -6,16 +6,14 @@
/* This program is freely distributable without licensing fees
and is provided without guarantee or warrantee expressed or
implied. This program is -not- in the public domain. */
-
+#ifdef __MINGW32__
+#include <GL/gl.h>
+#endif
#include <stdlib.h>
#include <windows.h>
/* These definitions are missing from windows.h */
-WINGDIAPI int WINAPI wglChoosePixelFormat(HDC, PIXELFORMATDESCRIPTOR *);
-WINGDIAPI int WINAPI wglDescribePixelFormat(HDC, int, UINT, LPPIXELFORMATDESCRIPTOR);
-WINGDIAPI int WINAPI wglGetPixelFormat(HDC);
-WINGDIAPI BOOL WINAPI wglSetPixelFormat(HDC, int, PIXELFORMATDESCRIPTOR *);
-WINGDIAPI BOOL WINAPI wglSwapBuffers(HDC);
+
/* Type definitions (conversions) */
typedef int Visual; /* Win32 equivalent of X11 type */
diff --git a/src/mesa/Makefile b/src/mesa/Makefile
index c03c5f80ff2..eadd7f281a6 100644
--- a/src/mesa/Makefile
+++ b/src/mesa/Makefile
@@ -117,17 +117,16 @@ $(TOP)/$(LIB_DIR)/$(GL_LIB_NAME): $(STAND_ALONE_OBJECTS)
$(MKLIB_OPTIONS) $(GL_LIB_DEPS) $(STAND_ALONE_OBJECTS)
# Make the OSMesa library
+# Note: version is kept at 6.5.3 to simplify app/linking issues
$(TOP)/$(LIB_DIR)/$(OSMESA_LIB_NAME): $(OSMESA_DRIVER_OBJECTS) $(OSMESA16_OBJECTS)
@ if [ "${DRIVER_DIRS}" = "osmesa" ] ; then \
$(TOP)/bin/mklib -o $(OSMESA_LIB) -linker '$(CC)' \
- -major $(MESA_MAJOR) \
- -minor $(MESA_MINOR) -patch $(MESA_TINY) \
+ -major 6 -minor 5 -patch 3 \
-install $(TOP)/$(LIB_DIR) $(MKLIB_OPTIONS) \
$(OSMESA_LIB_DEPS) $(OSMESA16_OBJECTS) ; \
else \
$(TOP)/bin/mklib -o $(OSMESA_LIB) -linker '$(CC)' \
- -major $(MESA_MAJOR) \
- -minor $(MESA_MINOR) -patch $(GL_TINY) \
+ -major 6 -minor 5 -patch 3 \
-install $(TOP)/$(LIB_DIR) $(MKLIB_OPTIONS) \
$(OSMESA_LIB_DEPS) $(OSMESA_DRIVER_OBJECTS) ; \
fi
diff --git a/src/mesa/Makefile.mgw b/src/mesa/Makefile.mgw
index ebec5c055a8..3b52834bd1c 100644
--- a/src/mesa/Makefile.mgw
+++ b/src/mesa/Makefile.mgw
@@ -1,5 +1,5 @@
# Mesa 3-D graphics library
-# Version: 5.1
+# Version: 7.0
#
# Copyright (C) 1999-2003 Brian Paul All Rights Reserved.
#
@@ -26,6 +26,16 @@
# Web : http://www.geocities.com/dborca
+# MinGW core-gl makefile updated for Mesa 7.0
+#
+# updated : by Heromyth, on 2007-7-21
+# Bugs : 1) All the default settings work fine. But the setting X86=1 can't work.
+# The others havn't been tested yet.
+# 2) The generated DLLs are *not* compatible with the ones built
+# with the other compilers like VC8, especially for GLUT.
+# 3) Although more tests are needed, it can be used individually!
+
#
# Available options:
@@ -52,7 +62,6 @@
#
-
.PHONY: all clean
.INTERMEDIATE: x86/gen_matypes.exe
.SUFFIXES: .rc .res
@@ -60,6 +69,8 @@
# Set this to the prefix of your build tools, i.e. mingw32-
TOOLS_PREFIX = mingw32-
+
+
TOP = ../..
GLIDE ?= $(TOP)/glide3
LIBDIR = $(TOP)/lib
@@ -71,11 +82,25 @@ else
GL_IMP = libopengl32.a
endif
-LDLIBS = -lgdi32
+GL_DEF = gl.def
+
+include $(TOP)/configs/config.mgw
+GL_USING_STDCALL ?= 1
+
+MESA_LIB = libmesa.a
+
+LDLIBS = -lgdi32 -luser32 -liberty
+LDFLAGS = -Wl,--out-implib=$(LIBDIR)/$(GL_IMP) -Wl,--output-def=$(LIBDIR)/gl.def
CC = $(TOOLS_PREFIX)gcc
-CFLAGS += -DBUILD_GL32 -D_OPENGL32_
-CFLAGS += $(INCLUDE_DIRS)
+CFLAGS += -DBUILD_GL32 -D_OPENGL32_ -D_DLL -DMESA_MINWARN -DNDEBUG -D_USRDLL -DGDI_EXPORTS
+
+ifeq ($(GL_USING_STDCALL),1)
+ LDFLAGS += -Wl,--add-stdcall-alias
+else
+ CFLAGS += -DGL_NO_STDCALL
+endif
+
CFLAGS += -DUSE_EXTERNAL_DXTN_LIB=1
ifeq ($(FX),1)
CFLAGS += -I$(GLIDE)/include -DFX
@@ -104,6 +129,8 @@ endif
include sources
+CFLAGS += $(INCLUDE_DIRS)
+
ifeq ($(X86),1)
CFLAGS += -DUSE_X86_ASM
CFLAGS += -DUSE_MMX_ASM
@@ -140,10 +167,9 @@ RESOURCE = $(GL_RES:.rc=.res)
.c.o:
$(CC) -o $@ $(CFLAGS) -c $<
-.S.o:
- $(CC) -o $@ $(CFLAGS) -c $<
.s.o:
$(CC) -o $@ $(CFLAGS) -x assembler-with-cpp -c $<
+
.rc.res:
windres -o $@ -Irc -Ocoff $<
@@ -153,9 +179,8 @@ $(LIBDIR):
mkdir -p $(LIBDIR)
$(LIBDIR)/$(GL_DLL) $(LIBDIR)/$(GL_IMP): $(OBJECTS) $(RESOURCE)
- $(TOOLS_PREFIX)dllwrap -o $(LIBDIR)/$(GL_DLL) --output-lib $(LIBDIR)/$(GL_IMP) \
- --target i386-mingw32 --def $(GL_DEF) -Wl,-enable-stdcall-fixup \
- $^ $(LDLIBS)
+ $(CC) -shared -fPIC -o $(LIBDIR)/$(GL_DLL) $(LDFLAGS) \
+ $^ $(LDLIBS)
$(X86_OBJECTS): x86/matypes.h
@@ -187,17 +212,21 @@ tnl/t_vtx_x86_gcc.o: tnl/t_vtx_x86_gcc.S
$(CC) -o $@ $(CFLAGS) -DSTDCALL_API -c $<
clean:
- -$(call UNLINK,array_cache/*.o)
-$(call UNLINK,glapi/*.o)
-$(call UNLINK,main/*.o)
-$(call UNLINK,math/*.o)
+ -$(call UNLINK,vbo/*.o)
-$(call UNLINK,shader/*.o)
+ -$(call UNLINK,shader/slang/*.o)
+ -$(call UNLINK,shader/grammar/*.o)
-$(call UNLINK,sparc/*.o)
-$(call UNLINK,ppc/*.o)
-$(call UNLINK,swrast/*.o)
-$(call UNLINK,swrast_setup/*.o)
-$(call UNLINK,tnl/*.o)
-$(call UNLINK,x86/*.o)
+ -$(call UNLINK,x86/rtasm/*.o)
+ -$(call UNLINK,x86-64/*.o)
-$(call UNLINK,drivers/common/*.o)
-$(call UNLINK,drivers/glide/*.o)
-$(call UNLINK,drivers/windows/fx/*.o)
diff --git a/src/mesa/drivers/dri/Makefile b/src/mesa/drivers/dri/Makefile
index 4abcc16c1bc..f466ce6c3cc 100644
--- a/src/mesa/drivers/dri/Makefile
+++ b/src/mesa/drivers/dri/Makefile
@@ -32,7 +32,7 @@ install:
clean:
@for dir in $(DRI_DIRS) ; do \
if [ -d $$dir ] ; then \
- (cd $$dir && $(MAKE) clean ; \
+ (cd $$dir && $(MAKE) clean) ; \
fi \
done
-rm -f common/*.o
diff --git a/src/mesa/drivers/dri/common/dri_util.c b/src/mesa/drivers/dri/common/dri_util.c
index 07ac4c7cd5f..25d32894dc8 100644
--- a/src/mesa/drivers/dri/common/dri_util.c
+++ b/src/mesa/drivers/dri/common/dri_util.c
@@ -428,10 +428,12 @@ __driUtilUpdateDrawableInfo(__DRIdrawablePrivate *pdp)
if (pdp->pClipRects) {
_mesa_free(pdp->pClipRects);
+ pdp->pClipRects = NULL;
}
if (pdp->pBackClipRects) {
_mesa_free(pdp->pBackClipRects);
+ pdp->pBackClipRects = NULL;
}
DRM_SPINUNLOCK(&psp->pSAREA->drawable_lock, psp->drawLockID);
diff --git a/src/mesa/drivers/dri/common/extension_helper.h b/src/mesa/drivers/dri/common/extension_helper.h
index c7984964255..49f3ee94e77 100644
--- a/src/mesa/drivers/dri/common/extension_helper.h
+++ b/src/mesa/drivers/dri/common/extension_helper.h
@@ -1471,9 +1471,10 @@ static const char ImageTransformParameterfvHP_names[] =
"";
#endif
-#if defined(need_GL_ARB_vertex_program)
+#if defined(need_GL_VERSION_2_0) || defined(need_GL_ARB_vertex_program)
static const char VertexAttrib4ivARB_names[] =
"ip\0" /* Parameter signature */
+ "glVertexAttrib4iv\0"
"glVertexAttrib4ivARB\0"
"";
#endif
@@ -1579,9 +1580,10 @@ static const char PixelTransformParameterfvEXT_names[] =
"";
#endif
-#if defined(need_GL_ARB_vertex_program)
+#if defined(need_GL_VERSION_2_0) || defined(need_GL_ARB_vertex_program)
static const char VertexAttrib4bvARB_names[] =
"ip\0" /* Parameter signature */
+ "glVertexAttrib4bv\0"
"glVertexAttrib4bvARB\0"
"";
#endif
@@ -2384,9 +2386,10 @@ static const char GetAttribLocationARB_names[] =
"";
#endif
-#if defined(need_GL_ARB_vertex_program)
+#if defined(need_GL_VERSION_2_0) || defined(need_GL_ARB_vertex_program)
static const char VertexAttrib4ubvARB_names[] =
"ip\0" /* Parameter signature */
+ "glVertexAttrib4ubv\0"
"glVertexAttrib4ubvARB\0"
"";
#endif
@@ -2903,9 +2906,10 @@ static const char ReplacementCodeuiColor4ubVertex3fSUN_names[] =
"";
#endif
-#if defined(need_GL_ARB_vertex_program)
+#if defined(need_GL_VERSION_2_0) || defined(need_GL_ARB_vertex_program)
static const char VertexAttrib4usvARB_names[] =
"ip\0" /* Parameter signature */
+ "glVertexAttrib4usv\0"
"glVertexAttrib4usvARB\0"
"";
#endif
@@ -4386,9 +4390,10 @@ static const char WindowPos4iMESA_names[] =
"";
#endif
-#if defined(need_GL_ARB_vertex_program)
+#if defined(need_GL_VERSION_2_0) || defined(need_GL_ARB_vertex_program)
static const char VertexAttrib4uivARB_names[] =
"ip\0" /* Parameter signature */
+ "glVertexAttrib4uiv\0"
"glVertexAttrib4uivARB\0"
"";
#endif
@@ -6243,6 +6248,8 @@ static const struct dri_extension_function GL_VERSION_2_0_functions[] = {
{ GetVertexAttribivARB_names, GetVertexAttribivARB_remap_index, -1 },
{ CreateProgram_names, CreateProgram_remap_index, -1 },
{ StencilFuncSeparate_names, StencilFuncSeparate_remap_index, -1 },
+ { VertexAttrib4ivARB_names, VertexAttrib4ivARB_remap_index, -1 },
+ { VertexAttrib4bvARB_names, VertexAttrib4bvARB_remap_index, -1 },
{ VertexAttrib3dARB_names, VertexAttrib3dARB_remap_index, -1 },
{ VertexAttrib4fARB_names, VertexAttrib4fARB_remap_index, -1 },
{ VertexAttrib4fvARB_names, VertexAttrib4fvARB_remap_index, -1 },
@@ -6256,6 +6263,7 @@ static const struct dri_extension_function GL_VERSION_2_0_functions[] = {
{ VertexAttrib1dvARB_names, VertexAttrib1dvARB_remap_index, -1 },
{ GetVertexAttribfvARB_names, GetVertexAttribfvARB_remap_index, -1 },
{ GetAttribLocationARB_names, GetAttribLocationARB_remap_index, -1 },
+ { VertexAttrib4ubvARB_names, VertexAttrib4ubvARB_remap_index, -1 },
{ Uniform3ivARB_names, Uniform3ivARB_remap_index, -1 },
{ VertexAttrib4sARB_names, VertexAttrib4sARB_remap_index, -1 },
{ VertexAttrib2dvARB_names, VertexAttrib2dvARB_remap_index, -1 },
@@ -6268,6 +6276,7 @@ static const struct dri_extension_function GL_VERSION_2_0_functions[] = {
{ VertexAttrib4NuivARB_names, VertexAttrib4NuivARB_remap_index, -1 },
{ Uniform4fARB_names, Uniform4fARB_remap_index, -1 },
{ VertexAttrib1dARB_names, VertexAttrib1dARB_remap_index, -1 },
+ { VertexAttrib4usvARB_names, VertexAttrib4usvARB_remap_index, -1 },
{ LinkProgramARB_names, LinkProgramARB_remap_index, -1 },
{ ShaderSourceARB_names, ShaderSourceARB_remap_index, -1 },
{ VertexAttrib3svARB_names, VertexAttrib3svARB_remap_index, -1 },
@@ -6297,6 +6306,7 @@ static const struct dri_extension_function GL_VERSION_2_0_functions[] = {
{ DrawBuffersARB_names, DrawBuffersARB_remap_index, -1 },
{ Uniform1fvARB_names, Uniform1fvARB_remap_index, -1 },
{ EnableVertexAttribArrayARB_names, EnableVertexAttribArrayARB_remap_index, -1 },
+ { VertexAttrib4uivARB_names, VertexAttrib4uivARB_remap_index, -1 },
{ VertexAttrib4svARB_names, VertexAttrib4svARB_remap_index, -1 },
{ GetShaderiv_names, GetShaderiv_remap_index, -1 },
{ VertexAttrib2svARB_names, VertexAttrib2svARB_remap_index, -1 },
diff --git a/src/mesa/drivers/dri/i915/i915_vtbl.c b/src/mesa/drivers/dri/i915/i915_vtbl.c
index b0e5f87fc75..cc8a605e505 100644
--- a/src/mesa/drivers/dri/i915/i915_vtbl.c
+++ b/src/mesa/drivers/dri/i915/i915_vtbl.c
@@ -64,6 +64,7 @@ static void i915_reduced_primitive_state( intelContextPtr intel,
st1 &= ~ST1_ENABLE;
switch (rprim) {
+ case GL_QUADS: /* from RASTERIZE(GL_QUADS) in t_dd_tritemp.h */
case GL_TRIANGLES:
if (intel->ctx.Polygon.StippleFlag &&
intel->hw_stipple)
diff --git a/src/mesa/drivers/dri/i915tex/i915_vtbl.c b/src/mesa/drivers/dri/i915tex/i915_vtbl.c
index 52db9a95e6b..264cf0fd9f4 100644
--- a/src/mesa/drivers/dri/i915tex/i915_vtbl.c
+++ b/src/mesa/drivers/dri/i915tex/i915_vtbl.c
@@ -61,6 +61,7 @@ i915_reduced_primitive_state(struct intel_context *intel, GLenum rprim)
st1 &= ~ST1_ENABLE;
switch (rprim) {
+ case GL_QUADS: /* from RASTERIZE(GL_QUADS) in t_dd_tritemp.h */
case GL_TRIANGLES:
if (intel->ctx.Polygon.StippleFlag && intel->hw_stipple)
st1 |= ST1_ENABLE;
diff --git a/src/mesa/drivers/dri/i915tex/intel_buffers.c b/src/mesa/drivers/dri/i915tex/intel_buffers.c
index 62ff54b0075..15d02f8e2cf 100644
--- a/src/mesa/drivers/dri/i915tex/intel_buffers.c
+++ b/src/mesa/drivers/dri/i915tex/intel_buffers.c
@@ -316,7 +316,8 @@ intelWindowMoved(struct intel_context *intel)
flags = intel_fb->vblank_flags & ~VBLANK_FLAG_SECONDARY;
}
- if (flags != intel_fb->vblank_flags) {
+ if (flags != intel_fb->vblank_flags && intel_fb->vblank_flags &&
+ !(intel_fb->vblank_flags & VBLANK_FLAG_NO_IRQ)) {
drmVBlank vbl;
int i;
@@ -327,7 +328,9 @@ intelWindowMoved(struct intel_context *intel)
}
for (i = 0; i < intel_fb->pf_num_pages; i++) {
- if (!intel_fb->color_rb[i])
+ if (!intel_fb->color_rb[i] ||
+ (intel_fb->vbl_waited - intel_fb->color_rb[i]->vbl_pending) <=
+ (1<<23))
continue;
vbl.request.sequence = intel_fb->color_rb[i]->vbl_pending;
@@ -828,7 +831,8 @@ intelScheduleSwap(const __DRIdrawablePrivate * dPriv, GLboolean *missed_target)
drm_i915_vblank_swap_t swap;
GLboolean ret;
- if ((intel_fb->vblank_flags & VBLANK_FLAG_NO_IRQ) ||
+ if (!intel_fb->vblank_flags ||
+ (intel_fb->vblank_flags & VBLANK_FLAG_NO_IRQ) ||
intelScreen->current_rotation != 0 ||
intelScreen->drmMinor < (intel_fb->pf_active ? 9 : 6))
return GL_FALSE;
diff --git a/src/mesa/drivers/dri/i915tex/intel_context.c b/src/mesa/drivers/dri/i915tex/intel_context.c
index 20b2b41ef24..093b3b416b4 100644
--- a/src/mesa/drivers/dri/i915tex/intel_context.c
+++ b/src/mesa/drivers/dri/i915tex/intel_context.c
@@ -607,12 +607,23 @@ intelMakeCurrent(__DRIcontextPrivate * driContextPriv,
if (intel->ctx.DrawBuffer == &intel_fb->Base) {
if (intel->driDrawable != driDrawPriv) {
- intel_fb->vblank_flags = (intel->intelScreen->irq_active != 0)
- ? driGetDefaultVBlankFlags(&intel->optionCache)
- : VBLANK_FLAG_NO_IRQ;
- (*dri_interface->getUST) (&intel_fb->swap_ust);
- driDrawableInitVBlank(driDrawPriv, intel_fb->vblank_flags,
- &intel_fb->vbl_seq);
+ if (driDrawPriv->pdraw->swap_interval == (unsigned)-1) {
+ int i;
+
+ intel_fb->vblank_flags = (intel->intelScreen->irq_active != 0)
+ ? driGetDefaultVBlankFlags(&intel->optionCache)
+ : VBLANK_FLAG_NO_IRQ;
+
+ (*dri_interface->getUST) (&intel_fb->swap_ust);
+ driDrawableInitVBlank(driDrawPriv, intel_fb->vblank_flags,
+ &intel_fb->vbl_seq);
+ intel_fb->vbl_waited = intel_fb->vbl_seq;
+
+ for (i = 0; i < (intel->intelScreen->third.handle ? 3 : 2); i++) {
+ if (intel_fb->color_rb[i])
+ intel_fb->color_rb[i]->vbl_pending = intel_fb->vbl_seq;
+ }
+ }
intel->driDrawable = driDrawPriv;
intelWindowMoved(intel);
}
@@ -658,37 +669,27 @@ intelContendedLock(struct intel_context *intel, GLuint flags)
if (sarea->width != intel->width ||
sarea->height != intel->height ||
sarea->rotation != intel->current_rotation) {
-
- void *batchMap = intel->batch->map;
-
+ int numClipRects = intel->numClipRects;
+
/*
* FIXME: Really only need to do this when drawing to a
* common back- or front buffer.
*/
/*
- * This will drop the outstanding batchbuffer on the floor
+ * This will essentially drop the outstanding batchbuffer on the floor.
*/
+ intel->numClipRects = 0;
- if (batchMap != NULL) {
- driBOUnmap(intel->batch->buffer);
- intel->batch->map = NULL;
- }
-
- intel_batchbuffer_reset(intel->batch);
+ if (intel->Fallback)
+ _swrast_flush(&intel->ctx);
- if (batchMap == NULL) {
- driBOUnmap(intel->batch->buffer);
- intel->batch->map = NULL;
- }
+ INTEL_FIREVERTICES(intel);
- /* lose all primitives */
- intel->prim.primitive = ~0;
- intel->prim.start_ptr = 0;
- intel->prim.flush = 0;
+ if (intel->batch->map != intel->batch->ptr)
+ intel_batchbuffer_flush(intel->batch);
- /* re-emit all state */
- intel->vtbl.lost_hardware(intel);
+ intel->numClipRects = numClipRects;
/* force window update */
intel->lastStamp = 0;
@@ -729,7 +730,9 @@ void LOCK_HARDWARE( struct intel_context *intel )
BUFFER_BACK_LEFT);
}
- if (intel_rb && (intel_fb->vbl_waited - intel_rb->vbl_pending) > (1<<23)) {
+ if (intel_rb && intel_fb->vblank_flags &&
+ !(intel_fb->vblank_flags & VBLANK_FLAG_NO_IRQ) &&
+ (intel_fb->vbl_waited - intel_rb->vbl_pending) > (1<<23)) {
drmVBlank vbl;
vbl.request.type = DRM_VBLANK_ABSOLUTE;
diff --git a/src/mesa/drivers/dri/i965/intel_blit.c b/src/mesa/drivers/dri/i965/intel_blit.c
index 173d1d5b6c2..f88cbb2328d 100644
--- a/src/mesa/drivers/dri/i965/intel_blit.c
+++ b/src/mesa/drivers/dri/i965/intel_blit.c
@@ -532,12 +532,15 @@ intelEmitImmediateColorExpandBlit(struct intel_context *intel,
GLuint dst_offset,
GLboolean dst_tiled,
GLshort x, GLshort y,
- GLshort w, GLshort h)
+ GLshort w, GLshort h,
+ GLenum logic_op)
{
struct xy_setup_blit setup;
struct xy_text_immediate_blit text;
int dwords = ((src_size + 7) & ~7) / 4;
+ assert( logic_op - GL_CLEAR >= 0 );
+ assert( logic_op - GL_CLEAR < 0x10 );
if (w < 0 || h < 0)
return;
@@ -561,7 +564,7 @@ intelEmitImmediateColorExpandBlit(struct intel_context *intel,
setup.br0.length = (sizeof(setup) / sizeof(int)) - 2;
setup.br13.dest_pitch = dst_pitch;
- setup.br13.rop = 0xcc;
+ setup.br13.rop = translate_raster_op(logic_op);
setup.br13.color_depth = (cpp == 4) ? BR13_8888 : BR13_565;
setup.br13.clipping_enable = 0;
setup.br13.mono_source_transparency = 1;
diff --git a/src/mesa/drivers/dri/i965/intel_blit.h b/src/mesa/drivers/dri/i965/intel_blit.h
index 8b0cc65243c..e361545c8fa 100644
--- a/src/mesa/drivers/dri/i965/intel_blit.h
+++ b/src/mesa/drivers/dri/i965/intel_blit.h
@@ -72,6 +72,7 @@ intelEmitImmediateColorExpandBlit(struct intel_context *intel,
GLuint dst_offset,
GLboolean dst_tiled,
GLshort dst_x, GLshort dst_y,
- GLshort w, GLshort h);
+ GLshort w, GLshort h,
+ GLenum logic_op );
#endif
diff --git a/src/mesa/drivers/dri/i965/intel_pixel_bitmap.c b/src/mesa/drivers/dri/i965/intel_pixel_bitmap.c
index 5841afaa3ef..421fcc5e511 100644
--- a/src/mesa/drivers/dri/i965/intel_pixel_bitmap.c
+++ b/src/mesa/drivers/dri/i965/intel_pixel_bitmap.c
@@ -260,7 +260,9 @@ do_blit_bitmap( GLcontext *ctx,
int h = MIN2(DY, box_h - py);
int w = MIN2(DX, box_w - px);
GLuint sz = align(align(w,8) * h, 64)/8;
-
+ GLenum logic_op = ctx->Color.ColorLogicOpEnabled ?
+ ctx->Color.LogicOp : GL_COPY;
+
assert(sz <= sizeof(stipple));
memset(stipple, 0, sz);
@@ -288,7 +290,8 @@ do_blit_bitmap( GLcontext *ctx,
dst->tiled,
rect.x1 + px,
rect.y2 - (py + h),
- w, h);
+ w, h,
+ logic_op);
}
}
}
diff --git a/src/mesa/drivers/windows/gdi/wgl.c b/src/mesa/drivers/windows/gdi/wgl.c
index 197de0743c7..dad3dc11604 100644
--- a/src/mesa/drivers/windows/gdi/wgl.c
+++ b/src/mesa/drivers/windows/gdi/wgl.c
@@ -32,10 +32,31 @@
/* We're essentially building part of GDI here, so define this so that
* we get the right export linkage. */
+#ifdef __MINGW32__
+
+#include <stdarg.h>
+#include <windef.h>
+#include <wincon.h>
+#include <winbase.h>
+
+# if defined(BUILD_GL32)
+# define WINGDIAPI __declspec(dllexport)
+# else
+# define __W32API_USE_DLLIMPORT__
+# endif
+
+#include <wingdi.h>
+#include "GL/mesa_wgl.h"
+#include <stdlib.h>
+
+#else
+
#define _GDI32_
#include <windows.h>
-#include "glapi.h"
+#endif
+
+#include "glapi.h"
#include "GL/wmesa.h" /* protos for wmesa* functions */
/*
@@ -333,7 +354,7 @@ WINGDIAPI int GLAPIENTRY wglGetPixelFormat(HDC hdc)
}
WINGDIAPI BOOL GLAPIENTRY wglSetPixelFormat(HDC hdc,int iPixelFormat,
- PIXELFORMATDESCRIPTOR *ppfd)
+ const PIXELFORMATDESCRIPTOR *ppfd)
{
(void) hdc;
@@ -386,12 +407,12 @@ static BOOL wglUseFontBitmaps_FX(HDC fontDevice, DWORD firstChar,
bitDevice = CreateCompatibleDC(fontDevice);
- // Swap fore and back colors so the bitmap has the right polarity
+ /* Swap fore and back colors so the bitmap has the right polarity */
tempColor = GetBkColor(bitDevice);
SetBkColor(bitDevice, GetTextColor(bitDevice));
SetTextColor(bitDevice, tempColor);
- // Place chars based on base line
+ /* Place chars based on base line */
VERIFY(SetTextAlign(bitDevice, TA_BASELINE) != GDI_ERROR ? 1 : 0);
for(i = 0; i < (int)numChars; i++) {
@@ -404,36 +425,36 @@ static BOOL wglUseFontBitmaps_FX(HDC fontDevice, DWORD firstChar,
curChar = (char)(i + firstChar);
- // Find how high/wide this character is
+ /* Find how high/wide this character is */
VERIFY(GetTextExtentPoint32(bitDevice, &curChar, 1, &size));
- // Create the output bitmap
+ /* Create the output bitmap */
charWidth = size.cx;
charHeight = size.cy;
- // Round up to the next multiple of 32 bits
+ /* Round up to the next multiple of 32 bits */
bmapWidth = ((charWidth + 31) / 32) * 32;
bmapHeight = charHeight;
bitObject = CreateCompatibleBitmap(bitDevice,
bmapWidth,
bmapHeight);
- //VERIFY(bitObject);
+ /* VERIFY(bitObject); */
- // Assign the output bitmap to the device
+ /* Assign the output bitmap to the device */
origBmap = SelectObject(bitDevice, bitObject);
(void) VERIFY(origBmap);
VERIFY( PatBlt( bitDevice, 0, 0, bmapWidth, bmapHeight,BLACKNESS ) );
- // Use our source font on the device
+ /* Use our source font on the device */
VERIFY(SelectObject(bitDevice, GetCurrentObject(fontDevice,OBJ_FONT)));
- // Draw the character
+ /* Draw the character */
VERIFY(TextOut(bitDevice, 0, metric.tmAscent, &curChar, 1));
- // Unselect our bmap object
+ /* Unselect our bmap object */
VERIFY(SelectObject(bitDevice, origBmap));
- // Convert the display dependant representation to a 1 bit deep DIB
+ /* Convert the display dependant representation to a 1 bit deep DIB */
numBytes = (bmapWidth * bmapHeight) / 8;
bmap = malloc(numBytes);
dibInfo->bmiHeader.biWidth = bmapWidth;
@@ -441,24 +462,24 @@ static BOOL wglUseFontBitmaps_FX(HDC fontDevice, DWORD firstChar,
res = GetDIBits(bitDevice, bitObject, 0, bmapHeight, bmap,
dibInfo,
DIB_RGB_COLORS);
- //VERIFY(res);
+ /* VERIFY(res); */
- // Create the GL object
+ /* Create the GL object */
glNewList(i + listBase, GL_COMPILE);
glBitmap(bmapWidth, bmapHeight, 0.0, (GLfloat)metric.tmDescent,
(GLfloat)charWidth, 0.0,
bmap);
glEndList();
- // CheckGL();
+ /* CheckGL(); */
- // Destroy the bmap object
+ /* Destroy the bmap object */
DeleteObject(bitObject);
- // Deallocate the bitmap data
+ /* Deallocate the bitmap data */
free(bmap);
}
- // Destroy the DC
+ /* Destroy the DC */
VERIFY(DeleteDC(bitDevice));
free(dibInfo);
diff --git a/src/mesa/drivers/windows/gdi/wmesa.c b/src/mesa/drivers/windows/gdi/wmesa.c
index c5cd2c615b7..5b67439f0f2 100644
--- a/src/mesa/drivers/windows/gdi/wmesa.c
+++ b/src/mesa/drivers/windows/gdi/wmesa.c
@@ -6,6 +6,7 @@
#include "wmesadef.h"
#include "colors.h"
#include <GL/wmesa.h>
+#include <winuser.h>
#include "context.h"
#include "extensions.h"
#include "framebuffer.h"
@@ -114,7 +115,7 @@ static void wmSetPixelFormat(WMesaFramebuffer pwfb, HDC hDC)
{
pwfb->cColorBits = GetDeviceCaps(hDC, BITSPIXEL);
- // Only 16 and 32 bit targets are supported now
+ /* Only 16 and 32 bit targets are supported now */
assert(pwfb->cColorBits == 0 ||
pwfb->cColorBits == 16 ||
pwfb->cColorBits == 32);
@@ -1171,7 +1172,7 @@ WMesaContext WMesaCreateContext(HDC hDC,
/* I do not understand this contributed code */
/* Support memory and device contexts */
if(WindowFromDC(hDC) != NULL) {
- c->hDC = GetDC(WindowFromDC(hDC)); // huh ????
+ c->hDC = GetDC(WindowFromDC(hDC)); /* huh ???? */
}
else {
c->hDC = hDC;
@@ -1404,70 +1405,72 @@ void WMesaSwapBuffers( HDC hdc )
* table entries. Hopefully, I'll find a better solution. The
* dispatch table generation scripts ought to be making these dummy
* stubs as well. */
-void gl_dispatch_stub_543(void){};
-void gl_dispatch_stub_544(void){};
-void gl_dispatch_stub_545(void){};
-void gl_dispatch_stub_546(void){};
-void gl_dispatch_stub_547(void){};
-void gl_dispatch_stub_548(void){};
-void gl_dispatch_stub_549(void){};
-void gl_dispatch_stub_550(void){};
-void gl_dispatch_stub_551(void){};
-void gl_dispatch_stub_552(void){};
-void gl_dispatch_stub_553(void){};
-void gl_dispatch_stub_554(void){};
-void gl_dispatch_stub_555(void){};
-void gl_dispatch_stub_556(void){};
-void gl_dispatch_stub_557(void){};
-void gl_dispatch_stub_558(void){};
-void gl_dispatch_stub_559(void){};
-void gl_dispatch_stub_560(void){};
-void gl_dispatch_stub_561(void){};
-void gl_dispatch_stub_565(void){};
-void gl_dispatch_stub_566(void){};
-void gl_dispatch_stub_577(void){};
-void gl_dispatch_stub_578(void){};
-void gl_dispatch_stub_603(void){};
-void gl_dispatch_stub_645(void){};
-void gl_dispatch_stub_646(void){};
-void gl_dispatch_stub_647(void){};
-void gl_dispatch_stub_648(void){};
-void gl_dispatch_stub_649(void){};
-void gl_dispatch_stub_650(void){};
-void gl_dispatch_stub_651(void){};
-void gl_dispatch_stub_652(void){};
-void gl_dispatch_stub_653(void){};
-void gl_dispatch_stub_734(void){};
-void gl_dispatch_stub_735(void){};
-void gl_dispatch_stub_736(void){};
-void gl_dispatch_stub_737(void){};
-void gl_dispatch_stub_738(void){};
-void gl_dispatch_stub_745(void){};
-void gl_dispatch_stub_746(void){};
-void gl_dispatch_stub_760(void){};
-void gl_dispatch_stub_761(void){};
-void gl_dispatch_stub_766(void){};
-void gl_dispatch_stub_767(void){};
-void gl_dispatch_stub_768(void){};
-
-void gl_dispatch_stub_562(void){};
-void gl_dispatch_stub_563(void){};
-void gl_dispatch_stub_564(void){};
-void gl_dispatch_stub_567(void){};
-void gl_dispatch_stub_568(void){};
-void gl_dispatch_stub_569(void){};
-void gl_dispatch_stub_580(void){};
-void gl_dispatch_stub_581(void){};
-void gl_dispatch_stub_606(void){};
-void gl_dispatch_stub_654(void){};
-void gl_dispatch_stub_655(void){};
-void gl_dispatch_stub_656(void){};
-void gl_dispatch_stub_739(void){};
-void gl_dispatch_stub_740(void){};
-void gl_dispatch_stub_741(void){};
-void gl_dispatch_stub_748(void){};
-void gl_dispatch_stub_749(void){};
-void gl_dispatch_stub_769(void){};
-void gl_dispatch_stub_770(void){};
-void gl_dispatch_stub_771(void){};
+#if !defined(__MINGW32__) || !defined(GL_NO_STDCALL)
+void gl_dispatch_stub_543(void){}
+void gl_dispatch_stub_544(void){}
+void gl_dispatch_stub_545(void){}
+void gl_dispatch_stub_546(void){}
+void gl_dispatch_stub_547(void){}
+void gl_dispatch_stub_548(void){}
+void gl_dispatch_stub_549(void){}
+void gl_dispatch_stub_550(void){}
+void gl_dispatch_stub_551(void){}
+void gl_dispatch_stub_552(void){}
+void gl_dispatch_stub_553(void){}
+void gl_dispatch_stub_554(void){}
+void gl_dispatch_stub_555(void){}
+void gl_dispatch_stub_556(void){}
+void gl_dispatch_stub_557(void){}
+void gl_dispatch_stub_558(void){}
+void gl_dispatch_stub_559(void){}
+void gl_dispatch_stub_560(void){}
+void gl_dispatch_stub_561(void){}
+void gl_dispatch_stub_565(void){}
+void gl_dispatch_stub_566(void){}
+void gl_dispatch_stub_577(void){}
+void gl_dispatch_stub_578(void){}
+void gl_dispatch_stub_603(void){}
+void gl_dispatch_stub_645(void){}
+void gl_dispatch_stub_646(void){}
+void gl_dispatch_stub_647(void){}
+void gl_dispatch_stub_648(void){}
+void gl_dispatch_stub_649(void){}
+void gl_dispatch_stub_650(void){}
+void gl_dispatch_stub_651(void){}
+void gl_dispatch_stub_652(void){}
+void gl_dispatch_stub_653(void){}
+void gl_dispatch_stub_734(void){}
+void gl_dispatch_stub_735(void){}
+void gl_dispatch_stub_736(void){}
+void gl_dispatch_stub_737(void){}
+void gl_dispatch_stub_738(void){}
+void gl_dispatch_stub_745(void){}
+void gl_dispatch_stub_746(void){}
+void gl_dispatch_stub_760(void){}
+void gl_dispatch_stub_761(void){}
+void gl_dispatch_stub_766(void){}
+void gl_dispatch_stub_767(void){}
+void gl_dispatch_stub_768(void){}
+
+void gl_dispatch_stub_562(void){}
+void gl_dispatch_stub_563(void){}
+void gl_dispatch_stub_564(void){}
+void gl_dispatch_stub_567(void){}
+void gl_dispatch_stub_568(void){}
+void gl_dispatch_stub_569(void){}
+void gl_dispatch_stub_580(void){}
+void gl_dispatch_stub_581(void){}
+void gl_dispatch_stub_606(void){}
+void gl_dispatch_stub_654(void){}
+void gl_dispatch_stub_655(void){}
+void gl_dispatch_stub_656(void){}
+void gl_dispatch_stub_739(void){}
+void gl_dispatch_stub_740(void){}
+void gl_dispatch_stub_741(void){}
+void gl_dispatch_stub_748(void){}
+void gl_dispatch_stub_749(void){}
+void gl_dispatch_stub_769(void){}
+void gl_dispatch_stub_770(void){}
+void gl_dispatch_stub_771(void){}
+#endif
diff --git a/src/mesa/drivers/windows/gdi/wmesadef.h b/src/mesa/drivers/windows/gdi/wmesadef.h
index 97b063a8bab..83a42e60824 100644
--- a/src/mesa/drivers/windows/gdi/wmesadef.h
+++ b/src/mesa/drivers/windows/gdi/wmesadef.h
@@ -1,6 +1,8 @@
#ifndef WMESADEF_H
#define WMESADEF_H
-
+#ifdef __MINGW32__
+#include <windows.h>
+#endif
#include "context.h"
diff --git a/src/mesa/glapi/gl_API.xml b/src/mesa/glapi/gl_API.xml
index c7b48c45b51..4bd3b2f0fb7 100644
--- a/src/mesa/glapi/gl_API.xml
+++ b/src/mesa/glapi/gl_API.xml
@@ -5605,7 +5605,10 @@
<param name="index" type="GLuint"/>
<param name="v" type="const GLushort *"/>
</function>
-
+ <function name="VertexAttrib4bv" alias="VertexAttrib4bvARB">
+ <param name="index" type="GLuint"/>
+ <param name="v" type="const GLbyte *" count="4"/>
+ </function>
<function name="VertexAttrib4d" alias="VertexAttrib4dARB">
<param name="index" type="GLuint"/>
<param name="x" type="GLdouble"/>
@@ -5628,6 +5631,10 @@
<param name="index" type="GLuint"/>
<param name="v" type="const GLfloat *"/>
</function>
+ <function name="VertexAttrib4iv" alias="VertexAttrib4ivARB">
+ <param name="index" type="GLuint"/>
+ <param name="v" type="const GLint *" count="4"/>
+ </function>
<function name="VertexAttrib4s" alias="VertexAttrib4sARB">
<param name="index" type="GLuint"/>
<param name="x" type="GLshort"/>
@@ -5639,6 +5646,18 @@
<param name="index" type="GLuint"/>
<param name="v" type="const GLshort *"/>
</function>
+ <function name="VertexAttrib4ubv" alias="VertexAttrib4ubvARB">
+ <param name="index" type="GLuint"/>
+ <param name="v" type="const GLubyte *" count="4"/>
+ </function>
+ <function name="VertexAttrib4uiv" alias="VertexAttrib4uivARB">
+ <param name="index" type="GLuint"/>
+ <param name="v" type="const GLuint *" count="4"/>
+ </function>
+ <function name="VertexAttrib4usv" alias="VertexAttrib4usvARB">
+ <param name="index" type="GLuint"/>
+ <param name="v" type="const GLushort *" count="4"/>
+ </function>
<function name="VertexAttribPointer" alias="VertexAttribPointerARB">
<param name="index" type="GLuint"/>
diff --git a/src/mesa/glapi/glapitemp.h b/src/mesa/glapi/glapitemp.h
index 62407968ccc..2a8051ff0a9 100644
--- a/src/mesa/glapi/glapitemp.h
+++ b/src/mesa/glapi/glapitemp.h
@@ -3284,6 +3284,11 @@ KEYWORD1 void KEYWORD2 NAME(VertexAttrib4NusvARB)(GLuint index, const GLushort *
DISPATCH(VertexAttrib4NusvARB, (index, v), (F, "glVertexAttrib4NusvARB(%d, %p);\n", index, (const void *) v));
}
+KEYWORD1 void KEYWORD2 NAME(VertexAttrib4bv)(GLuint index, const GLbyte * v)
+{
+ DISPATCH(VertexAttrib4bvARB, (index, v), (F, "glVertexAttrib4bv(%d, %p);\n", index, (const void *) v));
+}
+
KEYWORD1 void KEYWORD2 NAME(VertexAttrib4bvARB)(GLuint index, const GLbyte * v)
{
DISPATCH(VertexAttrib4bvARB, (index, v), (F, "glVertexAttrib4bvARB(%d, %p);\n", index, (const void *) v));
@@ -3329,6 +3334,11 @@ KEYWORD1 void KEYWORD2 NAME(VertexAttrib4fvARB)(GLuint index, const GLfloat * v)
DISPATCH(VertexAttrib4fvARB, (index, v), (F, "glVertexAttrib4fvARB(%d, %p);\n", index, (const void *) v));
}
+KEYWORD1 void KEYWORD2 NAME(VertexAttrib4iv)(GLuint index, const GLint * v)
+{
+ DISPATCH(VertexAttrib4ivARB, (index, v), (F, "glVertexAttrib4iv(%d, %p);\n", index, (const void *) v));
+}
+
KEYWORD1 void KEYWORD2 NAME(VertexAttrib4ivARB)(GLuint index, const GLint * v)
{
DISPATCH(VertexAttrib4ivARB, (index, v), (F, "glVertexAttrib4ivARB(%d, %p);\n", index, (const void *) v));
@@ -3354,16 +3364,31 @@ KEYWORD1 void KEYWORD2 NAME(VertexAttrib4svARB)(GLuint index, const GLshort * v)
DISPATCH(VertexAttrib4svARB, (index, v), (F, "glVertexAttrib4svARB(%d, %p);\n", index, (const void *) v));
}
+KEYWORD1 void KEYWORD2 NAME(VertexAttrib4ubv)(GLuint index, const GLubyte * v)
+{
+ DISPATCH(VertexAttrib4ubvARB, (index, v), (F, "glVertexAttrib4ubv(%d, %p);\n", index, (const void *) v));
+}
+
KEYWORD1 void KEYWORD2 NAME(VertexAttrib4ubvARB)(GLuint index, const GLubyte * v)
{
DISPATCH(VertexAttrib4ubvARB, (index, v), (F, "glVertexAttrib4ubvARB(%d, %p);\n", index, (const void *) v));
}
+KEYWORD1 void KEYWORD2 NAME(VertexAttrib4uiv)(GLuint index, const GLuint * v)
+{
+ DISPATCH(VertexAttrib4uivARB, (index, v), (F, "glVertexAttrib4uiv(%d, %p);\n", index, (const void *) v));
+}
+
KEYWORD1 void KEYWORD2 NAME(VertexAttrib4uivARB)(GLuint index, const GLuint * v)
{
DISPATCH(VertexAttrib4uivARB, (index, v), (F, "glVertexAttrib4uivARB(%d, %p);\n", index, (const void *) v));
}
+KEYWORD1 void KEYWORD2 NAME(VertexAttrib4usv)(GLuint index, const GLushort * v)
+{
+ DISPATCH(VertexAttrib4usvARB, (index, v), (F, "glVertexAttrib4usv(%d, %p);\n", index, (const void *) v));
+}
+
KEYWORD1 void KEYWORD2 NAME(VertexAttrib4usvARB)(GLuint index, const GLushort * v)
{
DISPATCH(VertexAttrib4usvARB, (index, v), (F, "glVertexAttrib4usvARB(%d, %p);\n", index, (const void *) v));
@@ -6458,12 +6483,17 @@ static _glapi_proc UNUSED_TABLE_NAME[] = {
TABLE_ENTRY(VertexAttrib4Nubv),
TABLE_ENTRY(VertexAttrib4Nuiv),
TABLE_ENTRY(VertexAttrib4Nusv),
+ TABLE_ENTRY(VertexAttrib4bv),
TABLE_ENTRY(VertexAttrib4d),
TABLE_ENTRY(VertexAttrib4dv),
TABLE_ENTRY(VertexAttrib4f),
TABLE_ENTRY(VertexAttrib4fv),
+ TABLE_ENTRY(VertexAttrib4iv),
TABLE_ENTRY(VertexAttrib4s),
TABLE_ENTRY(VertexAttrib4sv),
+ TABLE_ENTRY(VertexAttrib4ubv),
+ TABLE_ENTRY(VertexAttrib4uiv),
+ TABLE_ENTRY(VertexAttrib4usv),
TABLE_ENTRY(VertexAttribPointer),
TABLE_ENTRY(BindBuffer),
TABLE_ENTRY(BufferData),
diff --git a/src/mesa/glapi/glprocs.h b/src/mesa/glapi/glprocs.h
index 190d9ed149b..99120bcb687 100644
--- a/src/mesa/glapi/glprocs.h
+++ b/src/mesa/glapi/glprocs.h
@@ -957,12 +957,17 @@ static const char gl_string_table[] =
"glVertexAttrib4Nubv\0"
"glVertexAttrib4Nuiv\0"
"glVertexAttrib4Nusv\0"
+ "glVertexAttrib4bv\0"
"glVertexAttrib4d\0"
"glVertexAttrib4dv\0"
"glVertexAttrib4f\0"
"glVertexAttrib4fv\0"
+ "glVertexAttrib4iv\0"
"glVertexAttrib4s\0"
"glVertexAttrib4sv\0"
+ "glVertexAttrib4ubv\0"
+ "glVertexAttrib4uiv\0"
+ "glVertexAttrib4usv\0"
"glVertexAttribPointer\0"
"glBindBuffer\0"
"glBufferData\0"
@@ -2100,142 +2105,147 @@ static const glprocs_table_t static_functions[] = {
NAME_FUNC_OFFSET(16268, glVertexAttrib4NubvARB, glVertexAttrib4NubvARB, NULL, _gloffset_VertexAttrib4NubvARB),
NAME_FUNC_OFFSET(16288, glVertexAttrib4NuivARB, glVertexAttrib4NuivARB, NULL, _gloffset_VertexAttrib4NuivARB),
NAME_FUNC_OFFSET(16308, glVertexAttrib4NusvARB, glVertexAttrib4NusvARB, NULL, _gloffset_VertexAttrib4NusvARB),
- NAME_FUNC_OFFSET(16328, glVertexAttrib4dARB, glVertexAttrib4dARB, NULL, _gloffset_VertexAttrib4dARB),
- NAME_FUNC_OFFSET(16345, glVertexAttrib4dvARB, glVertexAttrib4dvARB, NULL, _gloffset_VertexAttrib4dvARB),
- NAME_FUNC_OFFSET(16363, glVertexAttrib4fARB, glVertexAttrib4fARB, NULL, _gloffset_VertexAttrib4fARB),
- NAME_FUNC_OFFSET(16380, glVertexAttrib4fvARB, glVertexAttrib4fvARB, NULL, _gloffset_VertexAttrib4fvARB),
- NAME_FUNC_OFFSET(16398, glVertexAttrib4sARB, glVertexAttrib4sARB, NULL, _gloffset_VertexAttrib4sARB),
- NAME_FUNC_OFFSET(16415, glVertexAttrib4svARB, glVertexAttrib4svARB, NULL, _gloffset_VertexAttrib4svARB),
- NAME_FUNC_OFFSET(16433, glVertexAttribPointerARB, glVertexAttribPointerARB, NULL, _gloffset_VertexAttribPointerARB),
- NAME_FUNC_OFFSET(16455, glBindBufferARB, glBindBufferARB, NULL, _gloffset_BindBufferARB),
- NAME_FUNC_OFFSET(16468, glBufferDataARB, glBufferDataARB, NULL, _gloffset_BufferDataARB),
- NAME_FUNC_OFFSET(16481, glBufferSubDataARB, glBufferSubDataARB, NULL, _gloffset_BufferSubDataARB),
- NAME_FUNC_OFFSET(16497, glDeleteBuffersARB, glDeleteBuffersARB, NULL, _gloffset_DeleteBuffersARB),
- NAME_FUNC_OFFSET(16513, glGenBuffersARB, glGenBuffersARB, NULL, _gloffset_GenBuffersARB),
- NAME_FUNC_OFFSET(16526, glGetBufferParameterivARB, glGetBufferParameterivARB, NULL, _gloffset_GetBufferParameterivARB),
- NAME_FUNC_OFFSET(16549, glGetBufferPointervARB, glGetBufferPointervARB, NULL, _gloffset_GetBufferPointervARB),
- NAME_FUNC_OFFSET(16569, glGetBufferSubDataARB, glGetBufferSubDataARB, NULL, _gloffset_GetBufferSubDataARB),
- NAME_FUNC_OFFSET(16588, glIsBufferARB, glIsBufferARB, NULL, _gloffset_IsBufferARB),
- NAME_FUNC_OFFSET(16599, glMapBufferARB, glMapBufferARB, NULL, _gloffset_MapBufferARB),
- NAME_FUNC_OFFSET(16611, glUnmapBufferARB, glUnmapBufferARB, NULL, _gloffset_UnmapBufferARB),
- NAME_FUNC_OFFSET(16625, glBeginQueryARB, glBeginQueryARB, NULL, _gloffset_BeginQueryARB),
- NAME_FUNC_OFFSET(16638, glDeleteQueriesARB, glDeleteQueriesARB, NULL, _gloffset_DeleteQueriesARB),
- NAME_FUNC_OFFSET(16654, glEndQueryARB, glEndQueryARB, NULL, _gloffset_EndQueryARB),
- NAME_FUNC_OFFSET(16665, glGenQueriesARB, glGenQueriesARB, NULL, _gloffset_GenQueriesARB),
- NAME_FUNC_OFFSET(16678, glGetQueryObjectivARB, glGetQueryObjectivARB, NULL, _gloffset_GetQueryObjectivARB),
- NAME_FUNC_OFFSET(16697, glGetQueryObjectuivARB, glGetQueryObjectuivARB, NULL, _gloffset_GetQueryObjectuivARB),
- NAME_FUNC_OFFSET(16717, glGetQueryivARB, glGetQueryivARB, NULL, _gloffset_GetQueryivARB),
- NAME_FUNC_OFFSET(16730, glIsQueryARB, glIsQueryARB, NULL, _gloffset_IsQueryARB),
- NAME_FUNC_OFFSET(16740, glCompileShaderARB, glCompileShaderARB, NULL, _gloffset_CompileShaderARB),
- NAME_FUNC_OFFSET(16756, glGetActiveUniformARB, glGetActiveUniformARB, NULL, _gloffset_GetActiveUniformARB),
- NAME_FUNC_OFFSET(16775, glGetShaderSourceARB, glGetShaderSourceARB, NULL, _gloffset_GetShaderSourceARB),
- NAME_FUNC_OFFSET(16793, glGetUniformLocationARB, glGetUniformLocationARB, NULL, _gloffset_GetUniformLocationARB),
- NAME_FUNC_OFFSET(16814, glGetUniformfvARB, glGetUniformfvARB, NULL, _gloffset_GetUniformfvARB),
- NAME_FUNC_OFFSET(16829, glGetUniformivARB, glGetUniformivARB, NULL, _gloffset_GetUniformivARB),
- NAME_FUNC_OFFSET(16844, glLinkProgramARB, glLinkProgramARB, NULL, _gloffset_LinkProgramARB),
- NAME_FUNC_OFFSET(16858, glShaderSourceARB, glShaderSourceARB, NULL, _gloffset_ShaderSourceARB),
- NAME_FUNC_OFFSET(16873, glUniform1fARB, glUniform1fARB, NULL, _gloffset_Uniform1fARB),
- NAME_FUNC_OFFSET(16885, glUniform1fvARB, glUniform1fvARB, NULL, _gloffset_Uniform1fvARB),
- NAME_FUNC_OFFSET(16898, glUniform1iARB, glUniform1iARB, NULL, _gloffset_Uniform1iARB),
- NAME_FUNC_OFFSET(16910, glUniform1ivARB, glUniform1ivARB, NULL, _gloffset_Uniform1ivARB),
- NAME_FUNC_OFFSET(16923, glUniform2fARB, glUniform2fARB, NULL, _gloffset_Uniform2fARB),
- NAME_FUNC_OFFSET(16935, glUniform2fvARB, glUniform2fvARB, NULL, _gloffset_Uniform2fvARB),
- NAME_FUNC_OFFSET(16948, glUniform2iARB, glUniform2iARB, NULL, _gloffset_Uniform2iARB),
- NAME_FUNC_OFFSET(16960, glUniform2ivARB, glUniform2ivARB, NULL, _gloffset_Uniform2ivARB),
- NAME_FUNC_OFFSET(16973, glUniform3fARB, glUniform3fARB, NULL, _gloffset_Uniform3fARB),
- NAME_FUNC_OFFSET(16985, glUniform3fvARB, glUniform3fvARB, NULL, _gloffset_Uniform3fvARB),
- NAME_FUNC_OFFSET(16998, glUniform3iARB, glUniform3iARB, NULL, _gloffset_Uniform3iARB),
- NAME_FUNC_OFFSET(17010, glUniform3ivARB, glUniform3ivARB, NULL, _gloffset_Uniform3ivARB),
- NAME_FUNC_OFFSET(17023, glUniform4fARB, glUniform4fARB, NULL, _gloffset_Uniform4fARB),
- NAME_FUNC_OFFSET(17035, glUniform4fvARB, glUniform4fvARB, NULL, _gloffset_Uniform4fvARB),
- NAME_FUNC_OFFSET(17048, glUniform4iARB, glUniform4iARB, NULL, _gloffset_Uniform4iARB),
- NAME_FUNC_OFFSET(17060, glUniform4ivARB, glUniform4ivARB, NULL, _gloffset_Uniform4ivARB),
- NAME_FUNC_OFFSET(17073, glUniformMatrix2fvARB, glUniformMatrix2fvARB, NULL, _gloffset_UniformMatrix2fvARB),
- NAME_FUNC_OFFSET(17092, glUniformMatrix3fvARB, glUniformMatrix3fvARB, NULL, _gloffset_UniformMatrix3fvARB),
- NAME_FUNC_OFFSET(17111, glUniformMatrix4fvARB, glUniformMatrix4fvARB, NULL, _gloffset_UniformMatrix4fvARB),
- NAME_FUNC_OFFSET(17130, glUseProgramObjectARB, glUseProgramObjectARB, NULL, _gloffset_UseProgramObjectARB),
- NAME_FUNC_OFFSET(17143, glValidateProgramARB, glValidateProgramARB, NULL, _gloffset_ValidateProgramARB),
- NAME_FUNC_OFFSET(17161, glBindAttribLocationARB, glBindAttribLocationARB, NULL, _gloffset_BindAttribLocationARB),
- NAME_FUNC_OFFSET(17182, glGetActiveAttribARB, glGetActiveAttribARB, NULL, _gloffset_GetActiveAttribARB),
- NAME_FUNC_OFFSET(17200, glGetAttribLocationARB, glGetAttribLocationARB, NULL, _gloffset_GetAttribLocationARB),
- NAME_FUNC_OFFSET(17220, glDrawBuffersARB, glDrawBuffersARB, NULL, _gloffset_DrawBuffersARB),
- NAME_FUNC_OFFSET(17234, glDrawBuffersARB, glDrawBuffersARB, NULL, _gloffset_DrawBuffersARB),
- NAME_FUNC_OFFSET(17251, gl_dispatch_stub_568, gl_dispatch_stub_568, NULL, _gloffset_SampleMaskSGIS),
- NAME_FUNC_OFFSET(17267, gl_dispatch_stub_569, gl_dispatch_stub_569, NULL, _gloffset_SamplePatternSGIS),
- NAME_FUNC_OFFSET(17286, glPointParameterfEXT, glPointParameterfEXT, NULL, _gloffset_PointParameterfEXT),
- NAME_FUNC_OFFSET(17304, glPointParameterfEXT, glPointParameterfEXT, NULL, _gloffset_PointParameterfEXT),
- NAME_FUNC_OFFSET(17325, glPointParameterfEXT, glPointParameterfEXT, NULL, _gloffset_PointParameterfEXT),
- NAME_FUNC_OFFSET(17347, glPointParameterfvEXT, glPointParameterfvEXT, NULL, _gloffset_PointParameterfvEXT),
- NAME_FUNC_OFFSET(17366, glPointParameterfvEXT, glPointParameterfvEXT, NULL, _gloffset_PointParameterfvEXT),
- NAME_FUNC_OFFSET(17388, glPointParameterfvEXT, glPointParameterfvEXT, NULL, _gloffset_PointParameterfvEXT),
- NAME_FUNC_OFFSET(17411, glSecondaryColor3bEXT, glSecondaryColor3bEXT, NULL, _gloffset_SecondaryColor3bEXT),
- NAME_FUNC_OFFSET(17430, glSecondaryColor3bvEXT, glSecondaryColor3bvEXT, NULL, _gloffset_SecondaryColor3bvEXT),
- NAME_FUNC_OFFSET(17450, glSecondaryColor3dEXT, glSecondaryColor3dEXT, NULL, _gloffset_SecondaryColor3dEXT),
- NAME_FUNC_OFFSET(17469, glSecondaryColor3dvEXT, glSecondaryColor3dvEXT, NULL, _gloffset_SecondaryColor3dvEXT),
- NAME_FUNC_OFFSET(17489, glSecondaryColor3fEXT, glSecondaryColor3fEXT, NULL, _gloffset_SecondaryColor3fEXT),
- NAME_FUNC_OFFSET(17508, glSecondaryColor3fvEXT, glSecondaryColor3fvEXT, NULL, _gloffset_SecondaryColor3fvEXT),
- NAME_FUNC_OFFSET(17528, glSecondaryColor3iEXT, glSecondaryColor3iEXT, NULL, _gloffset_SecondaryColor3iEXT),
- NAME_FUNC_OFFSET(17547, glSecondaryColor3ivEXT, glSecondaryColor3ivEXT, NULL, _gloffset_SecondaryColor3ivEXT),
- NAME_FUNC_OFFSET(17567, glSecondaryColor3sEXT, glSecondaryColor3sEXT, NULL, _gloffset_SecondaryColor3sEXT),
- NAME_FUNC_OFFSET(17586, glSecondaryColor3svEXT, glSecondaryColor3svEXT, NULL, _gloffset_SecondaryColor3svEXT),
- NAME_FUNC_OFFSET(17606, glSecondaryColor3ubEXT, glSecondaryColor3ubEXT, NULL, _gloffset_SecondaryColor3ubEXT),
- NAME_FUNC_OFFSET(17626, glSecondaryColor3ubvEXT, glSecondaryColor3ubvEXT, NULL, _gloffset_SecondaryColor3ubvEXT),
- NAME_FUNC_OFFSET(17647, glSecondaryColor3uiEXT, glSecondaryColor3uiEXT, NULL, _gloffset_SecondaryColor3uiEXT),
- NAME_FUNC_OFFSET(17667, glSecondaryColor3uivEXT, glSecondaryColor3uivEXT, NULL, _gloffset_SecondaryColor3uivEXT),
- NAME_FUNC_OFFSET(17688, glSecondaryColor3usEXT, glSecondaryColor3usEXT, NULL, _gloffset_SecondaryColor3usEXT),
- NAME_FUNC_OFFSET(17708, glSecondaryColor3usvEXT, glSecondaryColor3usvEXT, NULL, _gloffset_SecondaryColor3usvEXT),
- NAME_FUNC_OFFSET(17729, glSecondaryColorPointerEXT, glSecondaryColorPointerEXT, NULL, _gloffset_SecondaryColorPointerEXT),
- NAME_FUNC_OFFSET(17753, glMultiDrawArraysEXT, glMultiDrawArraysEXT, NULL, _gloffset_MultiDrawArraysEXT),
- NAME_FUNC_OFFSET(17771, glMultiDrawElementsEXT, glMultiDrawElementsEXT, NULL, _gloffset_MultiDrawElementsEXT),
- NAME_FUNC_OFFSET(17791, glFogCoordPointerEXT, glFogCoordPointerEXT, NULL, _gloffset_FogCoordPointerEXT),
- NAME_FUNC_OFFSET(17809, glFogCoorddEXT, glFogCoorddEXT, NULL, _gloffset_FogCoorddEXT),
- NAME_FUNC_OFFSET(17821, glFogCoorddvEXT, glFogCoorddvEXT, NULL, _gloffset_FogCoorddvEXT),
- NAME_FUNC_OFFSET(17834, glFogCoordfEXT, glFogCoordfEXT, NULL, _gloffset_FogCoordfEXT),
- NAME_FUNC_OFFSET(17846, glFogCoordfvEXT, glFogCoordfvEXT, NULL, _gloffset_FogCoordfvEXT),
- NAME_FUNC_OFFSET(17859, glBlendFuncSeparateEXT, glBlendFuncSeparateEXT, NULL, _gloffset_BlendFuncSeparateEXT),
- NAME_FUNC_OFFSET(17879, glBlendFuncSeparateEXT, glBlendFuncSeparateEXT, NULL, _gloffset_BlendFuncSeparateEXT),
- NAME_FUNC_OFFSET(17903, glWindowPos2dMESA, glWindowPos2dMESA, NULL, _gloffset_WindowPos2dMESA),
- NAME_FUNC_OFFSET(17917, glWindowPos2dMESA, glWindowPos2dMESA, NULL, _gloffset_WindowPos2dMESA),
- NAME_FUNC_OFFSET(17934, glWindowPos2dvMESA, glWindowPos2dvMESA, NULL, _gloffset_WindowPos2dvMESA),
- NAME_FUNC_OFFSET(17949, glWindowPos2dvMESA, glWindowPos2dvMESA, NULL, _gloffset_WindowPos2dvMESA),
- NAME_FUNC_OFFSET(17967, glWindowPos2fMESA, glWindowPos2fMESA, NULL, _gloffset_WindowPos2fMESA),
- NAME_FUNC_OFFSET(17981, glWindowPos2fMESA, glWindowPos2fMESA, NULL, _gloffset_WindowPos2fMESA),
- NAME_FUNC_OFFSET(17998, glWindowPos2fvMESA, glWindowPos2fvMESA, NULL, _gloffset_WindowPos2fvMESA),
- NAME_FUNC_OFFSET(18013, glWindowPos2fvMESA, glWindowPos2fvMESA, NULL, _gloffset_WindowPos2fvMESA),
- NAME_FUNC_OFFSET(18031, glWindowPos2iMESA, glWindowPos2iMESA, NULL, _gloffset_WindowPos2iMESA),
- NAME_FUNC_OFFSET(18045, glWindowPos2iMESA, glWindowPos2iMESA, NULL, _gloffset_WindowPos2iMESA),
- NAME_FUNC_OFFSET(18062, glWindowPos2ivMESA, glWindowPos2ivMESA, NULL, _gloffset_WindowPos2ivMESA),
- NAME_FUNC_OFFSET(18077, glWindowPos2ivMESA, glWindowPos2ivMESA, NULL, _gloffset_WindowPos2ivMESA),
- NAME_FUNC_OFFSET(18095, glWindowPos2sMESA, glWindowPos2sMESA, NULL, _gloffset_WindowPos2sMESA),
- NAME_FUNC_OFFSET(18109, glWindowPos2sMESA, glWindowPos2sMESA, NULL, _gloffset_WindowPos2sMESA),
- NAME_FUNC_OFFSET(18126, glWindowPos2svMESA, glWindowPos2svMESA, NULL, _gloffset_WindowPos2svMESA),
- NAME_FUNC_OFFSET(18141, glWindowPos2svMESA, glWindowPos2svMESA, NULL, _gloffset_WindowPos2svMESA),
- NAME_FUNC_OFFSET(18159, glWindowPos3dMESA, glWindowPos3dMESA, NULL, _gloffset_WindowPos3dMESA),
- NAME_FUNC_OFFSET(18173, glWindowPos3dMESA, glWindowPos3dMESA, NULL, _gloffset_WindowPos3dMESA),
- NAME_FUNC_OFFSET(18190, glWindowPos3dvMESA, glWindowPos3dvMESA, NULL, _gloffset_WindowPos3dvMESA),
- NAME_FUNC_OFFSET(18205, glWindowPos3dvMESA, glWindowPos3dvMESA, NULL, _gloffset_WindowPos3dvMESA),
- NAME_FUNC_OFFSET(18223, glWindowPos3fMESA, glWindowPos3fMESA, NULL, _gloffset_WindowPos3fMESA),
- NAME_FUNC_OFFSET(18237, glWindowPos3fMESA, glWindowPos3fMESA, NULL, _gloffset_WindowPos3fMESA),
- NAME_FUNC_OFFSET(18254, glWindowPos3fvMESA, glWindowPos3fvMESA, NULL, _gloffset_WindowPos3fvMESA),
- NAME_FUNC_OFFSET(18269, glWindowPos3fvMESA, glWindowPos3fvMESA, NULL, _gloffset_WindowPos3fvMESA),
- NAME_FUNC_OFFSET(18287, glWindowPos3iMESA, glWindowPos3iMESA, NULL, _gloffset_WindowPos3iMESA),
- NAME_FUNC_OFFSET(18301, glWindowPos3iMESA, glWindowPos3iMESA, NULL, _gloffset_WindowPos3iMESA),
- NAME_FUNC_OFFSET(18318, glWindowPos3ivMESA, glWindowPos3ivMESA, NULL, _gloffset_WindowPos3ivMESA),
- NAME_FUNC_OFFSET(18333, glWindowPos3ivMESA, glWindowPos3ivMESA, NULL, _gloffset_WindowPos3ivMESA),
- NAME_FUNC_OFFSET(18351, glWindowPos3sMESA, glWindowPos3sMESA, NULL, _gloffset_WindowPos3sMESA),
- NAME_FUNC_OFFSET(18365, glWindowPos3sMESA, glWindowPos3sMESA, NULL, _gloffset_WindowPos3sMESA),
- NAME_FUNC_OFFSET(18382, glWindowPos3svMESA, glWindowPos3svMESA, NULL, _gloffset_WindowPos3svMESA),
- NAME_FUNC_OFFSET(18397, glWindowPos3svMESA, glWindowPos3svMESA, NULL, _gloffset_WindowPos3svMESA),
- NAME_FUNC_OFFSET(18415, glBindProgramNV, glBindProgramNV, NULL, _gloffset_BindProgramNV),
- NAME_FUNC_OFFSET(18432, glDeleteProgramsNV, glDeleteProgramsNV, NULL, _gloffset_DeleteProgramsNV),
- NAME_FUNC_OFFSET(18452, glGenProgramsNV, glGenProgramsNV, NULL, _gloffset_GenProgramsNV),
- NAME_FUNC_OFFSET(18469, glGetVertexAttribPointervNV, glGetVertexAttribPointervNV, NULL, _gloffset_GetVertexAttribPointervNV),
- NAME_FUNC_OFFSET(18495, glGetVertexAttribPointervNV, glGetVertexAttribPointervNV, NULL, _gloffset_GetVertexAttribPointervNV),
- NAME_FUNC_OFFSET(18524, glIsProgramNV, glIsProgramNV, NULL, _gloffset_IsProgramNV),
- NAME_FUNC_OFFSET(18539, glPointParameteriNV, glPointParameteriNV, NULL, _gloffset_PointParameteriNV),
- NAME_FUNC_OFFSET(18557, glPointParameterivNV, glPointParameterivNV, NULL, _gloffset_PointParameterivNV),
- NAME_FUNC_OFFSET(18576, gl_dispatch_stub_749, gl_dispatch_stub_749, NULL, _gloffset_BlendEquationSeparateEXT),
- NAME_FUNC_OFFSET(18600, gl_dispatch_stub_749, gl_dispatch_stub_749, NULL, _gloffset_BlendEquationSeparateEXT),
+ NAME_FUNC_OFFSET(16328, glVertexAttrib4bvARB, glVertexAttrib4bvARB, NULL, _gloffset_VertexAttrib4bvARB),
+ NAME_FUNC_OFFSET(16346, glVertexAttrib4dARB, glVertexAttrib4dARB, NULL, _gloffset_VertexAttrib4dARB),
+ NAME_FUNC_OFFSET(16363, glVertexAttrib4dvARB, glVertexAttrib4dvARB, NULL, _gloffset_VertexAttrib4dvARB),
+ NAME_FUNC_OFFSET(16381, glVertexAttrib4fARB, glVertexAttrib4fARB, NULL, _gloffset_VertexAttrib4fARB),
+ NAME_FUNC_OFFSET(16398, glVertexAttrib4fvARB, glVertexAttrib4fvARB, NULL, _gloffset_VertexAttrib4fvARB),
+ NAME_FUNC_OFFSET(16416, glVertexAttrib4ivARB, glVertexAttrib4ivARB, NULL, _gloffset_VertexAttrib4ivARB),
+ NAME_FUNC_OFFSET(16434, glVertexAttrib4sARB, glVertexAttrib4sARB, NULL, _gloffset_VertexAttrib4sARB),
+ NAME_FUNC_OFFSET(16451, glVertexAttrib4svARB, glVertexAttrib4svARB, NULL, _gloffset_VertexAttrib4svARB),
+ NAME_FUNC_OFFSET(16469, glVertexAttrib4ubvARB, glVertexAttrib4ubvARB, NULL, _gloffset_VertexAttrib4ubvARB),
+ NAME_FUNC_OFFSET(16488, glVertexAttrib4uivARB, glVertexAttrib4uivARB, NULL, _gloffset_VertexAttrib4uivARB),
+ NAME_FUNC_OFFSET(16507, glVertexAttrib4usvARB, glVertexAttrib4usvARB, NULL, _gloffset_VertexAttrib4usvARB),
+ NAME_FUNC_OFFSET(16526, glVertexAttribPointerARB, glVertexAttribPointerARB, NULL, _gloffset_VertexAttribPointerARB),
+ NAME_FUNC_OFFSET(16548, glBindBufferARB, glBindBufferARB, NULL, _gloffset_BindBufferARB),
+ NAME_FUNC_OFFSET(16561, glBufferDataARB, glBufferDataARB, NULL, _gloffset_BufferDataARB),
+ NAME_FUNC_OFFSET(16574, glBufferSubDataARB, glBufferSubDataARB, NULL, _gloffset_BufferSubDataARB),
+ NAME_FUNC_OFFSET(16590, glDeleteBuffersARB, glDeleteBuffersARB, NULL, _gloffset_DeleteBuffersARB),
+ NAME_FUNC_OFFSET(16606, glGenBuffersARB, glGenBuffersARB, NULL, _gloffset_GenBuffersARB),
+ NAME_FUNC_OFFSET(16619, glGetBufferParameterivARB, glGetBufferParameterivARB, NULL, _gloffset_GetBufferParameterivARB),
+ NAME_FUNC_OFFSET(16642, glGetBufferPointervARB, glGetBufferPointervARB, NULL, _gloffset_GetBufferPointervARB),
+ NAME_FUNC_OFFSET(16662, glGetBufferSubDataARB, glGetBufferSubDataARB, NULL, _gloffset_GetBufferSubDataARB),
+ NAME_FUNC_OFFSET(16681, glIsBufferARB, glIsBufferARB, NULL, _gloffset_IsBufferARB),
+ NAME_FUNC_OFFSET(16692, glMapBufferARB, glMapBufferARB, NULL, _gloffset_MapBufferARB),
+ NAME_FUNC_OFFSET(16704, glUnmapBufferARB, glUnmapBufferARB, NULL, _gloffset_UnmapBufferARB),
+ NAME_FUNC_OFFSET(16718, glBeginQueryARB, glBeginQueryARB, NULL, _gloffset_BeginQueryARB),
+ NAME_FUNC_OFFSET(16731, glDeleteQueriesARB, glDeleteQueriesARB, NULL, _gloffset_DeleteQueriesARB),
+ NAME_FUNC_OFFSET(16747, glEndQueryARB, glEndQueryARB, NULL, _gloffset_EndQueryARB),
+ NAME_FUNC_OFFSET(16758, glGenQueriesARB, glGenQueriesARB, NULL, _gloffset_GenQueriesARB),
+ NAME_FUNC_OFFSET(16771, glGetQueryObjectivARB, glGetQueryObjectivARB, NULL, _gloffset_GetQueryObjectivARB),
+ NAME_FUNC_OFFSET(16790, glGetQueryObjectuivARB, glGetQueryObjectuivARB, NULL, _gloffset_GetQueryObjectuivARB),
+ NAME_FUNC_OFFSET(16810, glGetQueryivARB, glGetQueryivARB, NULL, _gloffset_GetQueryivARB),
+ NAME_FUNC_OFFSET(16823, glIsQueryARB, glIsQueryARB, NULL, _gloffset_IsQueryARB),
+ NAME_FUNC_OFFSET(16833, glCompileShaderARB, glCompileShaderARB, NULL, _gloffset_CompileShaderARB),
+ NAME_FUNC_OFFSET(16849, glGetActiveUniformARB, glGetActiveUniformARB, NULL, _gloffset_GetActiveUniformARB),
+ NAME_FUNC_OFFSET(16868, glGetShaderSourceARB, glGetShaderSourceARB, NULL, _gloffset_GetShaderSourceARB),
+ NAME_FUNC_OFFSET(16886, glGetUniformLocationARB, glGetUniformLocationARB, NULL, _gloffset_GetUniformLocationARB),
+ NAME_FUNC_OFFSET(16907, glGetUniformfvARB, glGetUniformfvARB, NULL, _gloffset_GetUniformfvARB),
+ NAME_FUNC_OFFSET(16922, glGetUniformivARB, glGetUniformivARB, NULL, _gloffset_GetUniformivARB),
+ NAME_FUNC_OFFSET(16937, glLinkProgramARB, glLinkProgramARB, NULL, _gloffset_LinkProgramARB),
+ NAME_FUNC_OFFSET(16951, glShaderSourceARB, glShaderSourceARB, NULL, _gloffset_ShaderSourceARB),
+ NAME_FUNC_OFFSET(16966, glUniform1fARB, glUniform1fARB, NULL, _gloffset_Uniform1fARB),
+ NAME_FUNC_OFFSET(16978, glUniform1fvARB, glUniform1fvARB, NULL, _gloffset_Uniform1fvARB),
+ NAME_FUNC_OFFSET(16991, glUniform1iARB, glUniform1iARB, NULL, _gloffset_Uniform1iARB),
+ NAME_FUNC_OFFSET(17003, glUniform1ivARB, glUniform1ivARB, NULL, _gloffset_Uniform1ivARB),
+ NAME_FUNC_OFFSET(17016, glUniform2fARB, glUniform2fARB, NULL, _gloffset_Uniform2fARB),
+ NAME_FUNC_OFFSET(17028, glUniform2fvARB, glUniform2fvARB, NULL, _gloffset_Uniform2fvARB),
+ NAME_FUNC_OFFSET(17041, glUniform2iARB, glUniform2iARB, NULL, _gloffset_Uniform2iARB),
+ NAME_FUNC_OFFSET(17053, glUniform2ivARB, glUniform2ivARB, NULL, _gloffset_Uniform2ivARB),
+ NAME_FUNC_OFFSET(17066, glUniform3fARB, glUniform3fARB, NULL, _gloffset_Uniform3fARB),
+ NAME_FUNC_OFFSET(17078, glUniform3fvARB, glUniform3fvARB, NULL, _gloffset_Uniform3fvARB),
+ NAME_FUNC_OFFSET(17091, glUniform3iARB, glUniform3iARB, NULL, _gloffset_Uniform3iARB),
+ NAME_FUNC_OFFSET(17103, glUniform3ivARB, glUniform3ivARB, NULL, _gloffset_Uniform3ivARB),
+ NAME_FUNC_OFFSET(17116, glUniform4fARB, glUniform4fARB, NULL, _gloffset_Uniform4fARB),
+ NAME_FUNC_OFFSET(17128, glUniform4fvARB, glUniform4fvARB, NULL, _gloffset_Uniform4fvARB),
+ NAME_FUNC_OFFSET(17141, glUniform4iARB, glUniform4iARB, NULL, _gloffset_Uniform4iARB),
+ NAME_FUNC_OFFSET(17153, glUniform4ivARB, glUniform4ivARB, NULL, _gloffset_Uniform4ivARB),
+ NAME_FUNC_OFFSET(17166, glUniformMatrix2fvARB, glUniformMatrix2fvARB, NULL, _gloffset_UniformMatrix2fvARB),
+ NAME_FUNC_OFFSET(17185, glUniformMatrix3fvARB, glUniformMatrix3fvARB, NULL, _gloffset_UniformMatrix3fvARB),
+ NAME_FUNC_OFFSET(17204, glUniformMatrix4fvARB, glUniformMatrix4fvARB, NULL, _gloffset_UniformMatrix4fvARB),
+ NAME_FUNC_OFFSET(17223, glUseProgramObjectARB, glUseProgramObjectARB, NULL, _gloffset_UseProgramObjectARB),
+ NAME_FUNC_OFFSET(17236, glValidateProgramARB, glValidateProgramARB, NULL, _gloffset_ValidateProgramARB),
+ NAME_FUNC_OFFSET(17254, glBindAttribLocationARB, glBindAttribLocationARB, NULL, _gloffset_BindAttribLocationARB),
+ NAME_FUNC_OFFSET(17275, glGetActiveAttribARB, glGetActiveAttribARB, NULL, _gloffset_GetActiveAttribARB),
+ NAME_FUNC_OFFSET(17293, glGetAttribLocationARB, glGetAttribLocationARB, NULL, _gloffset_GetAttribLocationARB),
+ NAME_FUNC_OFFSET(17313, glDrawBuffersARB, glDrawBuffersARB, NULL, _gloffset_DrawBuffersARB),
+ NAME_FUNC_OFFSET(17327, glDrawBuffersARB, glDrawBuffersARB, NULL, _gloffset_DrawBuffersARB),
+ NAME_FUNC_OFFSET(17344, gl_dispatch_stub_568, gl_dispatch_stub_568, NULL, _gloffset_SampleMaskSGIS),
+ NAME_FUNC_OFFSET(17360, gl_dispatch_stub_569, gl_dispatch_stub_569, NULL, _gloffset_SamplePatternSGIS),
+ NAME_FUNC_OFFSET(17379, glPointParameterfEXT, glPointParameterfEXT, NULL, _gloffset_PointParameterfEXT),
+ NAME_FUNC_OFFSET(17397, glPointParameterfEXT, glPointParameterfEXT, NULL, _gloffset_PointParameterfEXT),
+ NAME_FUNC_OFFSET(17418, glPointParameterfEXT, glPointParameterfEXT, NULL, _gloffset_PointParameterfEXT),
+ NAME_FUNC_OFFSET(17440, glPointParameterfvEXT, glPointParameterfvEXT, NULL, _gloffset_PointParameterfvEXT),
+ NAME_FUNC_OFFSET(17459, glPointParameterfvEXT, glPointParameterfvEXT, NULL, _gloffset_PointParameterfvEXT),
+ NAME_FUNC_OFFSET(17481, glPointParameterfvEXT, glPointParameterfvEXT, NULL, _gloffset_PointParameterfvEXT),
+ NAME_FUNC_OFFSET(17504, glSecondaryColor3bEXT, glSecondaryColor3bEXT, NULL, _gloffset_SecondaryColor3bEXT),
+ NAME_FUNC_OFFSET(17523, glSecondaryColor3bvEXT, glSecondaryColor3bvEXT, NULL, _gloffset_SecondaryColor3bvEXT),
+ NAME_FUNC_OFFSET(17543, glSecondaryColor3dEXT, glSecondaryColor3dEXT, NULL, _gloffset_SecondaryColor3dEXT),
+ NAME_FUNC_OFFSET(17562, glSecondaryColor3dvEXT, glSecondaryColor3dvEXT, NULL, _gloffset_SecondaryColor3dvEXT),
+ NAME_FUNC_OFFSET(17582, glSecondaryColor3fEXT, glSecondaryColor3fEXT, NULL, _gloffset_SecondaryColor3fEXT),
+ NAME_FUNC_OFFSET(17601, glSecondaryColor3fvEXT, glSecondaryColor3fvEXT, NULL, _gloffset_SecondaryColor3fvEXT),
+ NAME_FUNC_OFFSET(17621, glSecondaryColor3iEXT, glSecondaryColor3iEXT, NULL, _gloffset_SecondaryColor3iEXT),
+ NAME_FUNC_OFFSET(17640, glSecondaryColor3ivEXT, glSecondaryColor3ivEXT, NULL, _gloffset_SecondaryColor3ivEXT),
+ NAME_FUNC_OFFSET(17660, glSecondaryColor3sEXT, glSecondaryColor3sEXT, NULL, _gloffset_SecondaryColor3sEXT),
+ NAME_FUNC_OFFSET(17679, glSecondaryColor3svEXT, glSecondaryColor3svEXT, NULL, _gloffset_SecondaryColor3svEXT),
+ NAME_FUNC_OFFSET(17699, glSecondaryColor3ubEXT, glSecondaryColor3ubEXT, NULL, _gloffset_SecondaryColor3ubEXT),
+ NAME_FUNC_OFFSET(17719, glSecondaryColor3ubvEXT, glSecondaryColor3ubvEXT, NULL, _gloffset_SecondaryColor3ubvEXT),
+ NAME_FUNC_OFFSET(17740, glSecondaryColor3uiEXT, glSecondaryColor3uiEXT, NULL, _gloffset_SecondaryColor3uiEXT),
+ NAME_FUNC_OFFSET(17760, glSecondaryColor3uivEXT, glSecondaryColor3uivEXT, NULL, _gloffset_SecondaryColor3uivEXT),
+ NAME_FUNC_OFFSET(17781, glSecondaryColor3usEXT, glSecondaryColor3usEXT, NULL, _gloffset_SecondaryColor3usEXT),
+ NAME_FUNC_OFFSET(17801, glSecondaryColor3usvEXT, glSecondaryColor3usvEXT, NULL, _gloffset_SecondaryColor3usvEXT),
+ NAME_FUNC_OFFSET(17822, glSecondaryColorPointerEXT, glSecondaryColorPointerEXT, NULL, _gloffset_SecondaryColorPointerEXT),
+ NAME_FUNC_OFFSET(17846, glMultiDrawArraysEXT, glMultiDrawArraysEXT, NULL, _gloffset_MultiDrawArraysEXT),
+ NAME_FUNC_OFFSET(17864, glMultiDrawElementsEXT, glMultiDrawElementsEXT, NULL, _gloffset_MultiDrawElementsEXT),
+ NAME_FUNC_OFFSET(17884, glFogCoordPointerEXT, glFogCoordPointerEXT, NULL, _gloffset_FogCoordPointerEXT),
+ NAME_FUNC_OFFSET(17902, glFogCoorddEXT, glFogCoorddEXT, NULL, _gloffset_FogCoorddEXT),
+ NAME_FUNC_OFFSET(17914, glFogCoorddvEXT, glFogCoorddvEXT, NULL, _gloffset_FogCoorddvEXT),
+ NAME_FUNC_OFFSET(17927, glFogCoordfEXT, glFogCoordfEXT, NULL, _gloffset_FogCoordfEXT),
+ NAME_FUNC_OFFSET(17939, glFogCoordfvEXT, glFogCoordfvEXT, NULL, _gloffset_FogCoordfvEXT),
+ NAME_FUNC_OFFSET(17952, glBlendFuncSeparateEXT, glBlendFuncSeparateEXT, NULL, _gloffset_BlendFuncSeparateEXT),
+ NAME_FUNC_OFFSET(17972, glBlendFuncSeparateEXT, glBlendFuncSeparateEXT, NULL, _gloffset_BlendFuncSeparateEXT),
+ NAME_FUNC_OFFSET(17996, glWindowPos2dMESA, glWindowPos2dMESA, NULL, _gloffset_WindowPos2dMESA),
+ NAME_FUNC_OFFSET(18010, glWindowPos2dMESA, glWindowPos2dMESA, NULL, _gloffset_WindowPos2dMESA),
+ NAME_FUNC_OFFSET(18027, glWindowPos2dvMESA, glWindowPos2dvMESA, NULL, _gloffset_WindowPos2dvMESA),
+ NAME_FUNC_OFFSET(18042, glWindowPos2dvMESA, glWindowPos2dvMESA, NULL, _gloffset_WindowPos2dvMESA),
+ NAME_FUNC_OFFSET(18060, glWindowPos2fMESA, glWindowPos2fMESA, NULL, _gloffset_WindowPos2fMESA),
+ NAME_FUNC_OFFSET(18074, glWindowPos2fMESA, glWindowPos2fMESA, NULL, _gloffset_WindowPos2fMESA),
+ NAME_FUNC_OFFSET(18091, glWindowPos2fvMESA, glWindowPos2fvMESA, NULL, _gloffset_WindowPos2fvMESA),
+ NAME_FUNC_OFFSET(18106, glWindowPos2fvMESA, glWindowPos2fvMESA, NULL, _gloffset_WindowPos2fvMESA),
+ NAME_FUNC_OFFSET(18124, glWindowPos2iMESA, glWindowPos2iMESA, NULL, _gloffset_WindowPos2iMESA),
+ NAME_FUNC_OFFSET(18138, glWindowPos2iMESA, glWindowPos2iMESA, NULL, _gloffset_WindowPos2iMESA),
+ NAME_FUNC_OFFSET(18155, glWindowPos2ivMESA, glWindowPos2ivMESA, NULL, _gloffset_WindowPos2ivMESA),
+ NAME_FUNC_OFFSET(18170, glWindowPos2ivMESA, glWindowPos2ivMESA, NULL, _gloffset_WindowPos2ivMESA),
+ NAME_FUNC_OFFSET(18188, glWindowPos2sMESA, glWindowPos2sMESA, NULL, _gloffset_WindowPos2sMESA),
+ NAME_FUNC_OFFSET(18202, glWindowPos2sMESA, glWindowPos2sMESA, NULL, _gloffset_WindowPos2sMESA),
+ NAME_FUNC_OFFSET(18219, glWindowPos2svMESA, glWindowPos2svMESA, NULL, _gloffset_WindowPos2svMESA),
+ NAME_FUNC_OFFSET(18234, glWindowPos2svMESA, glWindowPos2svMESA, NULL, _gloffset_WindowPos2svMESA),
+ NAME_FUNC_OFFSET(18252, glWindowPos3dMESA, glWindowPos3dMESA, NULL, _gloffset_WindowPos3dMESA),
+ NAME_FUNC_OFFSET(18266, glWindowPos3dMESA, glWindowPos3dMESA, NULL, _gloffset_WindowPos3dMESA),
+ NAME_FUNC_OFFSET(18283, glWindowPos3dvMESA, glWindowPos3dvMESA, NULL, _gloffset_WindowPos3dvMESA),
+ NAME_FUNC_OFFSET(18298, glWindowPos3dvMESA, glWindowPos3dvMESA, NULL, _gloffset_WindowPos3dvMESA),
+ NAME_FUNC_OFFSET(18316, glWindowPos3fMESA, glWindowPos3fMESA, NULL, _gloffset_WindowPos3fMESA),
+ NAME_FUNC_OFFSET(18330, glWindowPos3fMESA, glWindowPos3fMESA, NULL, _gloffset_WindowPos3fMESA),
+ NAME_FUNC_OFFSET(18347, glWindowPos3fvMESA, glWindowPos3fvMESA, NULL, _gloffset_WindowPos3fvMESA),
+ NAME_FUNC_OFFSET(18362, glWindowPos3fvMESA, glWindowPos3fvMESA, NULL, _gloffset_WindowPos3fvMESA),
+ NAME_FUNC_OFFSET(18380, glWindowPos3iMESA, glWindowPos3iMESA, NULL, _gloffset_WindowPos3iMESA),
+ NAME_FUNC_OFFSET(18394, glWindowPos3iMESA, glWindowPos3iMESA, NULL, _gloffset_WindowPos3iMESA),
+ NAME_FUNC_OFFSET(18411, glWindowPos3ivMESA, glWindowPos3ivMESA, NULL, _gloffset_WindowPos3ivMESA),
+ NAME_FUNC_OFFSET(18426, glWindowPos3ivMESA, glWindowPos3ivMESA, NULL, _gloffset_WindowPos3ivMESA),
+ NAME_FUNC_OFFSET(18444, glWindowPos3sMESA, glWindowPos3sMESA, NULL, _gloffset_WindowPos3sMESA),
+ NAME_FUNC_OFFSET(18458, glWindowPos3sMESA, glWindowPos3sMESA, NULL, _gloffset_WindowPos3sMESA),
+ NAME_FUNC_OFFSET(18475, glWindowPos3svMESA, glWindowPos3svMESA, NULL, _gloffset_WindowPos3svMESA),
+ NAME_FUNC_OFFSET(18490, glWindowPos3svMESA, glWindowPos3svMESA, NULL, _gloffset_WindowPos3svMESA),
+ NAME_FUNC_OFFSET(18508, glBindProgramNV, glBindProgramNV, NULL, _gloffset_BindProgramNV),
+ NAME_FUNC_OFFSET(18525, glDeleteProgramsNV, glDeleteProgramsNV, NULL, _gloffset_DeleteProgramsNV),
+ NAME_FUNC_OFFSET(18545, glGenProgramsNV, glGenProgramsNV, NULL, _gloffset_GenProgramsNV),
+ NAME_FUNC_OFFSET(18562, glGetVertexAttribPointervNV, glGetVertexAttribPointervNV, NULL, _gloffset_GetVertexAttribPointervNV),
+ NAME_FUNC_OFFSET(18588, glGetVertexAttribPointervNV, glGetVertexAttribPointervNV, NULL, _gloffset_GetVertexAttribPointervNV),
+ NAME_FUNC_OFFSET(18617, glIsProgramNV, glIsProgramNV, NULL, _gloffset_IsProgramNV),
+ NAME_FUNC_OFFSET(18632, glPointParameteriNV, glPointParameteriNV, NULL, _gloffset_PointParameteriNV),
+ NAME_FUNC_OFFSET(18650, glPointParameterivNV, glPointParameterivNV, NULL, _gloffset_PointParameterivNV),
+ NAME_FUNC_OFFSET(18669, gl_dispatch_stub_749, gl_dispatch_stub_749, NULL, _gloffset_BlendEquationSeparateEXT),
+ NAME_FUNC_OFFSET(18693, gl_dispatch_stub_749, gl_dispatch_stub_749, NULL, _gloffset_BlendEquationSeparateEXT),
NAME_FUNC_OFFSET(-1, NULL, NULL, NULL, 0)
};
diff --git a/src/mesa/main/api_validate.c b/src/mesa/main/api_validate.c
index 3d20ba7d144..841c6a53026 100644
--- a/src/mesa/main/api_validate.c
+++ b/src/mesa/main/api_validate.c
@@ -1,8 +1,8 @@
/*
* Mesa 3-D graphics library
- * Version: 6.1
+ * Version: 7.0.1
*
- * Copyright (C) 1999-2003 Brian Paul All Rights Reserved.
+ * Copyright (C) 1999-2007 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"),
@@ -100,6 +100,11 @@ _mesa_validate_DrawElements(GLcontext *ctx,
(const GLubyte *) indices);
}
}
+ else {
+ /* not using a VBO */
+ if (!indices)
+ return GL_FALSE;
+ }
if (ctx->Const.CheckArrayBounds) {
/* find max array index */
@@ -170,6 +175,16 @@ _mesa_validate_DrawRangeElements(GLcontext *ctx, GLenum mode,
&& !(ctx->VertexProgram._Enabled && ctx->Array.ArrayObj->VertexAttrib[0].Enabled))
return GL_FALSE;
+ /* Vertex buffer object tests */
+ if (ctx->Array.ElementArrayBufferObj->Name) {
+ /* XXX re-use code from above? */
+ }
+ else {
+ /* not using VBO */
+ if (!indices)
+ return GL_FALSE;
+ }
+
if (ctx->Const.CheckArrayBounds) {
/* Find max array index.
* We don't trust the user's start and end values.
diff --git a/src/mesa/main/glheader.h b/src/mesa/main/glheader.h
index 5abea137d74..fd4127558a8 100644
--- a/src/mesa/main/glheader.h
+++ b/src/mesa/main/glheader.h
@@ -91,6 +91,9 @@
# pragma disable_message(201) /* Disable unreachable code warnings */
#endif
+#ifdef WGLAPI
+# undef WGLAPI
+#endif
#if !defined(OPENSTEP) && (defined(__WIN32__) && !defined(__CYGWIN__)) && !defined(BUILD_FOR_SNAP)
# if !defined(__GNUC__) /* mingw environment */
diff --git a/src/mesa/main/image.c b/src/mesa/main/image.c
index caaf2816571..e5b9ce82800 100644
--- a/src/mesa/main/image.c
+++ b/src/mesa/main/image.c
@@ -1,6 +1,6 @@
/*
* Mesa 3-D graphics library
- * Version: 7.0
+ * Version: 7.1
*
* Copyright (C) 1999-2007 Brian Paul All Rights Reserved.
*
@@ -3648,11 +3648,13 @@ _mesa_unpack_stencil_span( const GLcontext *ctx, GLuint n,
* Try simple cases first
*/
if (transferOps == 0 &&
+ !ctx->Pixel.MapStencilFlag &&
srcType == GL_UNSIGNED_BYTE &&
dstType == GL_UNSIGNED_BYTE) {
_mesa_memcpy(dest, source, n * sizeof(GLubyte));
}
else if (transferOps == 0 &&
+ !ctx->Pixel.MapStencilFlag &&
srcType == GL_UNSIGNED_INT &&
dstType == GL_UNSIGNED_INT &&
!srcPacking->SwapBytes) {
@@ -3668,19 +3670,17 @@ _mesa_unpack_stencil_span( const GLcontext *ctx, GLuint n,
extract_uint_indexes(n, indexes, GL_STENCIL_INDEX, srcType, source,
srcPacking);
- if (transferOps) {
- if (transferOps & IMAGE_SHIFT_OFFSET_BIT) {
- /* shift and offset indexes */
- shift_and_offset_ci(ctx, n, indexes);
- }
+ if (transferOps & IMAGE_SHIFT_OFFSET_BIT) {
+ /* shift and offset indexes */
+ shift_and_offset_ci(ctx, n, indexes);
+ }
- if (ctx->Pixel.MapStencilFlag) {
- /* Apply stencil lookup table */
- GLuint mask = ctx->PixelMaps.StoS.Size - 1;
- GLuint i;
- for (i=0;i<n;i++) {
- indexes[i] = ctx->PixelMaps.StoS.Map[ indexes[i] & mask ];
- }
+ if (ctx->Pixel.MapStencilFlag) {
+ /* Apply stencil lookup table */
+ const GLuint mask = ctx->PixelMaps.StoS.Size - 1;
+ GLuint i;
+ for (i = 0; i < n; i++) {
+ indexes[i] = ctx->PixelMaps.StoS.Map[ indexes[i] & mask ];
}
}
@@ -3878,10 +3878,20 @@ _mesa_pack_stencil_span( const GLcontext *ctx, GLuint n,
SWAP4BYTE(value); \
} \
} \
- depthValues[i] = CLAMP(GLTYPE2FLOAT(value), 0.0F, 1.0F); \
+ depthValues[i] = GLTYPE2FLOAT(value); \
} \
} while (0)
+
+/**
+ * Unpack a row of depth/z values from memory, returning GLushort, GLuint
+ * or GLfloat values.
+ * The glPixelTransfer (scale/bias) params will be applied.
+ *
+ * \param dstType one of GL_UNSIGNED_SHORT, GL_UNSIGNED_INT, GL_FLOAT
+ * \param depthScale scale factor (max value) for returned GLushort or
+ * GLuint values (ignored for GLfloat).
+ */
void
_mesa_unpack_depth_span( const GLcontext *ctx, GLuint n,
GLenum dstType, GLvoid *dest, GLfloat depthScale,
@@ -3889,6 +3899,7 @@ _mesa_unpack_depth_span( const GLcontext *ctx, GLuint n,
const struct gl_pixelstore_attrib *srcPacking )
{
GLfloat depthTemp[MAX_WIDTH], *depthValues;
+ GLboolean needClamp = GL_FALSE;
/* Look for special cases first.
* Not only are these faster, they're less prone to numeric conversion
@@ -3906,7 +3917,9 @@ _mesa_unpack_depth_span( const GLcontext *ctx, GLuint n,
}
return;
}
- if (srcType == GL_UNSIGNED_SHORT && dstType == GL_UNSIGNED_INT) {
+ if (srcType == GL_UNSIGNED_SHORT
+ && dstType == GL_UNSIGNED_INT
+ && depthScale == (GLfloat) 0xffffffff) {
const GLushort *src = (const GLushort *) source;
GLuint *dst = (GLuint *) dest;
GLuint i;
@@ -3918,7 +3931,7 @@ _mesa_unpack_depth_span( const GLcontext *ctx, GLuint n,
/* XXX may want to add additional cases here someday */
}
- /* general case path */
+ /* general case path follows */
if (dstType == GL_FLOAT) {
depthValues = (GLfloat *) dest;
@@ -3927,29 +3940,31 @@ _mesa_unpack_depth_span( const GLcontext *ctx, GLuint n,
depthValues = depthTemp;
}
- /* XXX we need to obey srcPacking->SwapBytes here!!! */
- (void) srcPacking;
-
- /* convert incoming values to GLfloat */
+ /* Convert incoming values to GLfloat. Some conversions will require
+ * clamping, below.
+ */
switch (srcType) {
case GL_BYTE:
- DEPTH_VALUES(GLbyte, BYTE_TO_FLOAT);
- break;
+ DEPTH_VALUES(GLbyte, BYTE_TO_FLOAT);
+ needClamp = GL_TRUE;
+ break;
case GL_UNSIGNED_BYTE:
- DEPTH_VALUES(GLubyte, UBYTE_TO_FLOAT);
- break;
+ DEPTH_VALUES(GLubyte, UBYTE_TO_FLOAT);
+ break;
case GL_SHORT:
- DEPTH_VALUES(GLshort, SHORT_TO_FLOAT);
- break;
+ DEPTH_VALUES(GLshort, SHORT_TO_FLOAT);
+ needClamp = GL_TRUE;
+ break;
case GL_UNSIGNED_SHORT:
- DEPTH_VALUES(GLushort, USHORT_TO_FLOAT);
- break;
+ DEPTH_VALUES(GLushort, USHORT_TO_FLOAT);
+ break;
case GL_INT:
- DEPTH_VALUES(GLint, INT_TO_FLOAT);
- break;
+ DEPTH_VALUES(GLint, INT_TO_FLOAT);
+ needClamp = GL_TRUE;
+ break;
case GL_UNSIGNED_INT:
- DEPTH_VALUES(GLuint, UINT_TO_FLOAT);
- break;
+ DEPTH_VALUES(GLuint, UINT_TO_FLOAT);
+ break;
case GL_UNSIGNED_INT_24_8_EXT: /* GL_EXT_packed_depth_stencil */
if (dstType == GL_UNSIGNED_INT &&
depthScale == (GLfloat) 0xffffff &&
@@ -3981,19 +3996,21 @@ _mesa_unpack_depth_span( const GLcontext *ctx, GLuint n,
}
break;
case GL_FLOAT:
- DEPTH_VALUES(GLfloat, 1*);
- break;
+ DEPTH_VALUES(GLfloat, 1*);
+ needClamp = GL_TRUE;
+ break;
case GL_HALF_FLOAT_ARB:
{
GLuint i;
const GLhalfARB *src = (const GLhalfARB *) source;
for (i = 0; i < n; i++) {
- GLhalfARB value = src[i];
- if (srcPacking->SwapBytes) {
- SWAP2BYTE(value);
- }
+ GLhalfARB value = src[i];
+ if (srcPacking->SwapBytes) {
+ SWAP2BYTE(value);
+ }
depthValues[i] = _mesa_half_to_float(value);
}
+ needClamp = GL_TRUE;
}
break;
default:
@@ -4001,12 +4018,30 @@ _mesa_unpack_depth_span( const GLcontext *ctx, GLuint n,
return;
}
+ /* apply depth scale and bias */
+ {
+ const GLfloat scale = ctx->Pixel.DepthScale;
+ const GLfloat bias = ctx->Pixel.DepthBias;
+ if (scale != 1.0 || bias != 0.0) {
+ GLuint i;
+ for (i = 0; i < n; i++) {
+ depthValues[i] = depthValues[i] * scale + bias;
+ }
+ needClamp = GL_TRUE;
+ }
+ }
- /* apply depth scale and bias and clamp to [0,1] */
- if (ctx->Pixel.DepthScale != 1.0 || ctx->Pixel.DepthBias != 0.0) {
- _mesa_scale_and_bias_depth(ctx, n, depthValues);
+ /* clamp to [0, 1] */
+ if (needClamp) {
+ GLuint i;
+ for (i = 0; i < n; i++) {
+ depthValues[i] = CLAMP(depthValues[i], 0.0, 1.0);
+ }
}
+ /*
+ * Convert values to dstType
+ */
if (dstType == GL_UNSIGNED_INT) {
GLuint *zValues = (GLuint *) dest;
GLuint i;
diff --git a/src/mesa/main/imports.c b/src/mesa/main/imports.c
index ca5f079f72a..2ecfbdc0264 100644
--- a/src/mesa/main/imports.c
+++ b/src/mesa/main/imports.c
@@ -575,7 +575,11 @@ _mesa_ffs(int i)
* if no bits set.
*/
int
+#ifdef __MINGW32__
+_mesa_ffsll(long val)
+#else
_mesa_ffsll(long long val)
+#endif
{
#ifdef ffsll
return ffsll(val);
diff --git a/src/mesa/main/imports.h b/src/mesa/main/imports.h
index 9be8014a131..ebdfc452a7a 100644
--- a/src/mesa/main/imports.h
+++ b/src/mesa/main/imports.h
@@ -700,7 +700,11 @@ extern int
_mesa_ffs(int i);
extern int
+#ifdef __MINGW32__
+_mesa_ffsll(long i);
+#else
_mesa_ffsll(long long i);
+#endif
extern unsigned int
_mesa_bitcount(unsigned int n);
diff --git a/src/mesa/main/shaders.c b/src/mesa/main/shaders.c
index 58be1f46e57..7bf88087670 100644
--- a/src/mesa/main/shaders.c
+++ b/src/mesa/main/shaders.c
@@ -83,7 +83,7 @@ _mesa_CreateShader(GLenum type)
}
-GLhandleARB APIENTRY
+GLhandleARB GLAPIENTRY
_mesa_CreateShaderObjectARB(GLenum type)
{
GET_CURRENT_CONTEXT(ctx);
@@ -99,7 +99,7 @@ _mesa_CreateProgram(void)
}
-GLhandleARB APIENTRY
+GLhandleARB GLAPIENTRY
_mesa_CreateProgramObjectARB(void)
{
GET_CURRENT_CONTEXT(ctx);
@@ -319,7 +319,7 @@ _mesa_GetUniformivARB(GLhandleARB program, GLint location, GLint * params)
#if 0
-GLint APIENTRY
+GLint GLAPIENTRY
_mesa_GetUniformLocation(GLuint program, const GLcharARB *name)
{
GET_CURRENT_CONTEXT(ctx);
@@ -336,7 +336,7 @@ _mesa_GetHandleARB(GLenum pname)
}
-GLint APIENTRY
+GLint GLAPIENTRY
_mesa_GetUniformLocationARB(GLhandleARB programObj, const GLcharARB *name)
{
GET_CURRENT_CONTEXT(ctx);
diff --git a/src/mesa/main/texcompress_fxt1.c b/src/mesa/main/texcompress_fxt1.c
index 411d51cfcc6..b6991f45ed8 100644
--- a/src/mesa/main/texcompress_fxt1.c
+++ b/src/mesa/main/texcompress_fxt1.c
@@ -302,7 +302,12 @@ const struct gl_texture_format _mesa_texformat_rgba_fxt1 = {
#define FX64_NATIVE 1
+#ifdef __MINGW32__
+typedef unsigned long Fx64;
+#else
typedef unsigned long long Fx64;
+#endif
+
#define FX64_MOV32(a, b) a = b
#define FX64_OR32(a, b) a |= b
diff --git a/src/mesa/main/texenvprogram.c b/src/mesa/main/texenvprogram.c
index 0c6fa82f112..1a46c10ffa3 100644
--- a/src/mesa/main/texenvprogram.c
+++ b/src/mesa/main/texenvprogram.c
@@ -871,7 +871,7 @@ emit_texenv(struct texenv_fragment_program *p, GLuint unit)
key->unit[unit].OptRGB);
}
else if (key->unit[unit].ModeRGB == MODE_DOT3_RGBA_EXT ||
- key->unit[unit].ModeA == MODE_DOT3_RGBA) {
+ key->unit[unit].ModeRGB == MODE_DOT3_RGBA) {
out = emit_combine( p, dest, WRITEMASK_XYZW, saturate,
unit,
diff --git a/src/mesa/main/teximage.c b/src/mesa/main/teximage.c
index c8ce79ea865..532b02d2910 100644
--- a/src/mesa/main/teximage.c
+++ b/src/mesa/main/teximage.c
@@ -1,8 +1,8 @@
/*
* Mesa 3-D graphics library
- * Version: 6.5.1
+ * Version: 7.0.1
*
- * Copyright (C) 1999-2006 Brian Paul All Rights Reserved.
+ * Copyright (C) 1999-2007 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"),
@@ -1207,6 +1207,10 @@ _mesa_init_teximage_fields(GLcontext *ctx, GLenum target,
* A hardware driver might override this function if, for example, the
* max 3D texture size is 512x512x64 (i.e. not a cube).
*
+ * Note that width, height, depth == 0 is not an error. However, a
+ * texture with zero width/height/depth will be considered "incomplete"
+ * and texturing will effectively be disabled.
+ *
* \param target one of GL_PROXY_TEXTURE_1D, GL_PROXY_TEXTURE_2D,
* GL_PROXY_TEXTURE_3D, GL_PROXY_TEXTURE_RECTANGLE_NV,
* GL_PROXY_TEXTURE_CUBE_MAP_ARB.
@@ -1236,7 +1240,7 @@ _mesa_test_proxy_teximage(GLcontext *ctx, GLenum target, GLint level,
maxSize = 1 << (ctx->Const.MaxTextureLevels - 1);
if (width < 2 * border || width > 2 + maxSize ||
(!ctx->Extensions.ARB_texture_non_power_of_two &&
- _mesa_bitcount(width - 2 * border) != 1) ||
+ width > 0 && _mesa_bitcount(width - 2 * border) != 1) ||
level >= ctx->Const.MaxTextureLevels) {
/* bad width or level */
return GL_FALSE;
@@ -1246,10 +1250,10 @@ _mesa_test_proxy_teximage(GLcontext *ctx, GLenum target, GLint level,
maxSize = 1 << (ctx->Const.MaxTextureLevels - 1);
if (width < 2 * border || width > 2 + maxSize ||
(!ctx->Extensions.ARB_texture_non_power_of_two &&
- _mesa_bitcount(width - 2 * border) != 1) ||
+ width > 0 && _mesa_bitcount(width - 2 * border) != 1) ||
height < 2 * border || height > 2 + maxSize ||
(!ctx->Extensions.ARB_texture_non_power_of_two &&
- _mesa_bitcount(height - 2 * border) != 1) ||
+ height > 0 && _mesa_bitcount(height - 2 * border) != 1) ||
level >= ctx->Const.MaxTextureLevels) {
/* bad width or height or level */
return GL_FALSE;
@@ -1259,21 +1263,21 @@ _mesa_test_proxy_teximage(GLcontext *ctx, GLenum target, GLint level,
maxSize = 1 << (ctx->Const.Max3DTextureLevels - 1);
if (width < 2 * border || width > 2 + maxSize ||
(!ctx->Extensions.ARB_texture_non_power_of_two &&
- _mesa_bitcount(width - 2 * border) != 1) ||
+ width > 0 && _mesa_bitcount(width - 2 * border) != 1) ||
height < 2 * border || height > 2 + maxSize ||
(!ctx->Extensions.ARB_texture_non_power_of_two &&
- _mesa_bitcount(height - 2 * border) != 1) ||
+ height > 0 && _mesa_bitcount(height - 2 * border) != 1) ||
depth < 2 * border || depth > 2 + maxSize ||
(!ctx->Extensions.ARB_texture_non_power_of_two &&
- _mesa_bitcount(depth - 2 * border) != 1) ||
+ depth > 0 && _mesa_bitcount(depth - 2 * border) != 1) ||
level >= ctx->Const.Max3DTextureLevels) {
/* bad width or height or depth or level */
return GL_FALSE;
}
return GL_TRUE;
case GL_PROXY_TEXTURE_RECTANGLE_NV:
- if (width < 1 || width > ctx->Const.MaxTextureRectSize ||
- height < 1 || height > ctx->Const.MaxTextureRectSize ||
+ if (width < 0 || width > ctx->Const.MaxTextureRectSize ||
+ height < 0 || height > ctx->Const.MaxTextureRectSize ||
level != 0) {
/* bad width or height or level */
return GL_FALSE;
@@ -1283,10 +1287,10 @@ _mesa_test_proxy_teximage(GLcontext *ctx, GLenum target, GLint level,
maxSize = 1 << (ctx->Const.MaxCubeTextureLevels - 1);
if (width < 2 * border || width > 2 + maxSize ||
(!ctx->Extensions.ARB_texture_non_power_of_two &&
- _mesa_bitcount(width - 2 * border) != 1) ||
+ width > 0 && _mesa_bitcount(width - 2 * border) != 1) ||
height < 2 * border || height > 2 + maxSize ||
(!ctx->Extensions.ARB_texture_non_power_of_two &&
- _mesa_bitcount(height - 2 * border) != 1) ||
+ height > 0 && _mesa_bitcount(height - 2 * border) != 1) ||
level >= ctx->Const.MaxCubeTextureLevels) {
/* bad width or height */
return GL_FALSE;
@@ -1382,7 +1386,7 @@ texture_error_check( GLcontext *ctx, GLenum target,
if (target == GL_PROXY_TEXTURE_1D || target == GL_TEXTURE_1D) {
proxy_target = GL_PROXY_TEXTURE_1D;
height = 1;
- width = 1;
+ depth = 1;
}
else {
_mesa_error( ctx, GL_INVALID_ENUM, "glTexImage1D(target)" );
diff --git a/src/mesa/main/version.h b/src/mesa/main/version.h
index afc0bc2ec91..2c84579918d 100644
--- a/src/mesa/main/version.h
+++ b/src/mesa/main/version.h
@@ -1,6 +1,6 @@
/*
* Mesa 3-D graphics library
- * Version: 7.0
+ * Version: 7.0.1
*
* Copyright (C) 1999-2007 Brian Paul All Rights Reserved.
*
@@ -30,8 +30,8 @@
/* Mesa version */
#define MESA_MAJOR 7
#define MESA_MINOR 0
-#define MESA_PATCH 0
-#define MESA_VERSION_STRING "7.0"
+#define MESA_PATCH 1
+#define MESA_VERSION_STRING "7.0.1"
/* To make version comparison easy */
#define MESA_VERSION(a,b,c) (((a) << 16) + ((b) << 8) + (c))
diff --git a/src/mesa/shader/shader_api.c b/src/mesa/shader/shader_api.c
index 3a54e68d0de..b794e30e970 100644
--- a/src/mesa/shader/shader_api.c
+++ b/src/mesa/shader/shader_api.c
@@ -780,7 +780,7 @@ _mesa_get_programiv(GLcontext *ctx, GLuint program,
*params = shProg->Validated;
break;
case GL_INFO_LOG_LENGTH:
- *params = shProg->InfoLog ? strlen(shProg->InfoLog) : 0;
+ *params = shProg->InfoLog ? strlen(shProg->InfoLog) + 1 : 0;
break;
case GL_ATTACHED_SHADERS:
*params = shProg->NumShaders;
@@ -832,10 +832,10 @@ _mesa_get_shaderiv(GLcontext *ctx, GLuint name, GLenum pname, GLint *params)
*params = shader->CompileStatus;
break;
case GL_INFO_LOG_LENGTH:
- *params = shader->InfoLog ? strlen(shader->InfoLog) : 0;
+ *params = shader->InfoLog ? strlen(shader->InfoLog) + 1 : 0;
break;
case GL_SHADER_SOURCE_LENGTH:
- *params = shader->Source ? strlen((char *) shader->Source) : 0;
+ *params = shader->Source ? strlen((char *) shader->Source) + 1 : 0;
break;
default:
_mesa_error(ctx, GL_INVALID_ENUM, "glGetShaderiv(pname)");
diff --git a/src/mesa/shader/slang/library/slang_core.gc b/src/mesa/shader/slang/library/slang_core.gc
index e398eabb15d..4639660ba1e 100644
--- a/src/mesa/shader/slang/library/slang_core.gc
+++ b/src/mesa/shader/slang/library/slang_core.gc
@@ -181,6 +181,11 @@ vec2 __constructor(const vec3 v)
__retVal.xy = v.xy;
}
+vec2 __constructor(const vec4 v)
+{
+ __retVal.xy = v.xy;
+}
+
//// vec3 constructors
diff --git a/src/mesa/shader/slang/library/slang_core_gc.h b/src/mesa/shader/slang/library/slang_core_gc.h
index dcd39a0e28d..acf1c66631f 100644
--- a/src/mesa/shader/slang/library/slang_core_gc.h
+++ b/src/mesa/shader/slang/library/slang_core_gc.h
@@ -18,59 +18,60 @@
20,0,0,1,0,10,1,1,1,0,5,105,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,59,120,121,0,18,105,0,59,
120,120,0,20,0,0,1,0,10,1,1,1,0,1,98,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,59,120,121,0,18,98,
0,59,120,120,0,20,0,0,1,0,10,1,1,1,0,11,118,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,59,120,121,
-0,18,118,0,59,120,121,0,20,0,0,1,0,11,1,1,1,0,9,120,0,0,1,1,0,9,121,0,0,1,1,0,9,122,0,0,0,1,9,18,
-95,95,114,101,116,86,97,108,0,59,120,0,18,120,0,20,0,9,18,95,95,114,101,116,86,97,108,0,59,121,0,
-18,121,0,20,0,9,18,95,95,114,101,116,86,97,108,0,59,122,0,18,122,0,20,0,0,1,0,11,1,1,1,0,9,102,0,0,
-0,1,9,18,95,95,114,101,116,86,97,108,0,59,120,121,122,0,18,102,0,59,120,120,120,0,20,0,0,1,0,11,1,
-1,1,0,5,105,0,0,0,1,4,105,110,116,95,116,111,95,102,108,111,97,116,0,18,95,95,114,101,116,86,97,
-108,0,59,120,121,122,0,0,18,105,0,59,120,120,120,0,0,0,0,1,0,11,1,1,1,0,1,98,0,0,0,1,9,18,95,95,
-114,101,116,86,97,108,0,59,120,121,122,0,18,98,0,59,120,120,120,0,20,0,0,1,0,11,1,1,1,0,12,118,0,0,
-0,1,9,18,95,95,114,101,116,86,97,108,0,59,120,121,122,0,18,118,0,59,120,121,122,0,20,0,0,1,0,12,1,
-1,1,0,9,120,0,0,1,1,0,9,121,0,0,1,1,0,9,122,0,0,1,1,0,9,119,0,0,0,1,9,18,95,95,114,101,116,86,97,
-108,0,59,120,0,18,120,0,20,0,9,18,95,95,114,101,116,86,97,108,0,59,121,0,18,121,0,20,0,9,18,95,95,
-114,101,116,86,97,108,0,59,122,0,18,122,0,20,0,9,18,95,95,114,101,116,86,97,108,0,59,119,0,18,119,
-0,20,0,0,1,0,12,1,1,1,0,9,102,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,18,102,0,59,120,120,120,
-120,0,20,0,0,1,0,12,1,1,1,0,5,105,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,18,105,0,59,120,120,
-120,120,0,20,0,0,1,0,12,1,1,1,0,1,98,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,18,98,0,59,120,120,
-120,120,0,20,0,0,1,0,12,1,1,1,0,11,118,51,0,0,1,1,0,9,102,0,0,0,1,9,18,95,95,114,101,116,86,97,108,
-0,59,120,121,122,0,18,118,51,0,20,0,9,18,95,95,114,101,116,86,97,108,0,59,119,0,18,102,0,20,0,0,1,
-0,6,1,1,1,0,5,105,0,0,1,1,0,5,106,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,59,120,0,18,105,0,20,
-0,9,18,95,95,114,101,116,86,97,108,0,59,121,0,18,106,0,20,0,0,1,0,6,1,1,1,0,5,105,0,0,0,1,9,18,95,
-95,114,101,116,86,97,108,0,59,120,121,0,18,105,0,59,120,120,0,20,0,0,1,0,6,1,1,1,0,9,102,0,0,0,1,4,
-102,108,111,97,116,95,116,111,95,105,110,116,0,18,95,95,114,101,116,86,97,108,0,59,120,121,0,0,18,
-102,0,59,120,120,0,0,0,0,1,0,6,1,1,1,0,1,98,0,0,0,1,4,102,108,111,97,116,95,116,111,95,105,110,116,
-0,18,95,95,114,101,116,86,97,108,0,59,120,121,0,0,18,98,0,59,120,120,0,0,0,0,1,0,7,1,1,1,0,5,105,0,
-0,1,1,0,5,106,0,0,1,1,0,5,107,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,59,120,0,18,105,0,20,0,9,
-18,95,95,114,101,116,86,97,108,0,59,121,0,18,106,0,20,0,9,18,95,95,114,101,116,86,97,108,0,59,122,
-0,18,107,0,20,0,0,1,0,7,1,1,1,0,5,105,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,59,120,121,122,0,
-18,105,0,59,120,120,120,0,20,0,0,1,0,7,1,1,1,0,9,102,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,59,
-120,121,122,0,18,102,0,59,120,120,120,0,20,0,0,1,0,7,1,1,1,0,1,98,0,0,0,1,9,18,95,95,114,101,116,
-86,97,108,0,59,120,121,122,0,18,98,0,59,120,120,120,0,20,0,0,1,0,8,1,1,1,0,5,120,0,0,1,1,0,5,121,0,
-0,1,1,0,5,122,0,0,1,1,0,5,119,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,59,120,0,18,120,0,20,0,9,
-18,95,95,114,101,116,86,97,108,0,59,121,0,18,121,0,20,0,9,18,95,95,114,101,116,86,97,108,0,59,122,
-0,18,122,0,20,0,9,18,95,95,114,101,116,86,97,108,0,59,119,0,18,119,0,20,0,0,1,0,8,1,1,1,0,5,105,0,
-0,0,1,9,18,95,95,114,101,116,86,97,108,0,18,105,0,59,120,120,120,120,0,20,0,0,1,0,8,1,1,1,0,9,102,
-0,0,0,1,4,102,108,111,97,116,95,116,111,95,105,110,116,0,18,95,95,114,101,116,86,97,108,0,0,18,102,
-0,59,120,120,120,120,0,0,0,0,1,0,8,1,1,1,0,1,98,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,18,98,0,
-59,120,120,120,120,0,20,0,0,1,0,2,1,1,1,0,1,98,49,0,0,1,1,0,1,98,50,0,0,0,1,9,18,95,95,114,101,116,
-86,97,108,0,59,120,0,18,98,49,0,20,0,9,18,95,95,114,101,116,86,97,108,0,59,121,0,18,98,50,0,20,0,0,
-1,0,2,1,1,1,0,1,98,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,59,120,121,0,18,98,0,59,120,120,0,20,
-0,0,1,0,2,1,1,1,0,9,102,0,0,0,1,3,2,1,10,1,122,101,114,111,0,2,58,118,101,99,50,0,17,48,0,48,0,0,0,
-17,48,0,48,0,0,0,0,0,0,4,118,101,99,52,95,115,101,113,0,18,95,95,114,101,116,86,97,108,0,59,120,
-121,0,0,18,102,0,59,120,120,0,0,18,122,101,114,111,0,0,0,0,1,0,2,1,1,1,0,5,105,0,0,0,1,3,2,1,6,1,
-122,101,114,111,0,2,58,105,118,101,99,50,0,16,8,48,0,0,16,8,48,0,0,0,0,0,4,118,101,99,52,95,115,
-101,113,0,18,95,95,114,101,116,86,97,108,0,59,120,121,0,0,18,105,0,59,120,120,0,0,18,122,101,114,
-111,0,0,0,0,1,0,3,1,1,1,0,1,98,49,0,0,1,1,0,1,98,50,0,0,1,1,0,1,98,51,0,0,0,1,9,18,95,95,114,101,
-116,86,97,108,0,59,120,0,18,98,49,0,20,0,9,18,95,95,114,101,116,86,97,108,0,59,121,0,18,98,50,0,20,
-0,9,18,95,95,114,101,116,86,97,108,0,59,122,0,18,98,51,0,20,0,0,1,0,3,1,1,1,0,1,98,0,0,0,1,9,18,95,
-95,114,101,116,86,97,108,0,59,120,121,122,0,18,98,0,59,120,120,120,0,20,0,0,1,0,3,1,1,1,0,9,102,0,
-0,0,1,3,2,1,11,1,122,101,114,111,0,2,58,118,101,99,51,0,17,48,0,48,0,0,0,17,48,0,48,0,0,0,17,48,0,
-48,0,0,0,0,0,0,4,118,101,99,52,95,115,101,113,0,18,95,95,114,101,116,86,97,108,0,59,120,121,122,0,
-0,18,102,0,59,120,120,120,0,0,18,122,101,114,111,0,0,0,0,1,0,3,1,1,1,0,5,105,0,0,0,1,3,2,1,7,1,122,
-101,114,111,0,2,58,105,118,101,99,51,0,16,8,48,0,0,16,8,48,0,0,16,8,48,0,0,0,0,0,4,118,101,99,52,
-95,115,101,113,0,18,95,95,114,101,116,86,97,108,0,59,120,121,122,0,0,18,105,0,59,120,120,120,0,0,
-18,122,101,114,111,0,0,0,0,1,0,4,1,1,1,0,1,98,49,0,0,1,1,0,1,98,50,0,0,1,1,0,1,98,51,0,0,1,1,0,1,
-98,52,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,59,120,0,18,98,49,0,20,0,9,18,95,95,114,101,116,
+0,18,118,0,59,120,121,0,20,0,0,1,0,10,1,1,1,0,12,118,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,59,
+120,121,0,18,118,0,59,120,121,0,20,0,0,1,0,11,1,1,1,0,9,120,0,0,1,1,0,9,121,0,0,1,1,0,9,122,0,0,0,
+1,9,18,95,95,114,101,116,86,97,108,0,59,120,0,18,120,0,20,0,9,18,95,95,114,101,116,86,97,108,0,59,
+121,0,18,121,0,20,0,9,18,95,95,114,101,116,86,97,108,0,59,122,0,18,122,0,20,0,0,1,0,11,1,1,1,0,9,
+102,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,59,120,121,122,0,18,102,0,59,120,120,120,0,20,0,0,1,
+0,11,1,1,1,0,5,105,0,0,0,1,4,105,110,116,95,116,111,95,102,108,111,97,116,0,18,95,95,114,101,116,
+86,97,108,0,59,120,121,122,0,0,18,105,0,59,120,120,120,0,0,0,0,1,0,11,1,1,1,0,1,98,0,0,0,1,9,18,95,
+95,114,101,116,86,97,108,0,59,120,121,122,0,18,98,0,59,120,120,120,0,20,0,0,1,0,11,1,1,1,0,12,118,
+0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,59,120,121,122,0,18,118,0,59,120,121,122,0,20,0,0,1,0,
+12,1,1,1,0,9,120,0,0,1,1,0,9,121,0,0,1,1,0,9,122,0,0,1,1,0,9,119,0,0,0,1,9,18,95,95,114,101,116,86,
+97,108,0,59,120,0,18,120,0,20,0,9,18,95,95,114,101,116,86,97,108,0,59,121,0,18,121,0,20,0,9,18,95,
+95,114,101,116,86,97,108,0,59,122,0,18,122,0,20,0,9,18,95,95,114,101,116,86,97,108,0,59,119,0,18,
+119,0,20,0,0,1,0,12,1,1,1,0,9,102,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,18,102,0,59,120,120,
+120,120,0,20,0,0,1,0,12,1,1,1,0,5,105,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,18,105,0,59,120,
+120,120,120,0,20,0,0,1,0,12,1,1,1,0,1,98,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,18,98,0,59,120,
+120,120,120,0,20,0,0,1,0,12,1,1,1,0,11,118,51,0,0,1,1,0,9,102,0,0,0,1,9,18,95,95,114,101,116,86,97,
+108,0,59,120,121,122,0,18,118,51,0,20,0,9,18,95,95,114,101,116,86,97,108,0,59,119,0,18,102,0,20,0,
+0,1,0,6,1,1,1,0,5,105,0,0,1,1,0,5,106,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,59,120,0,18,105,0,
+20,0,9,18,95,95,114,101,116,86,97,108,0,59,121,0,18,106,0,20,0,0,1,0,6,1,1,1,0,5,105,0,0,0,1,9,18,
+95,95,114,101,116,86,97,108,0,59,120,121,0,18,105,0,59,120,120,0,20,0,0,1,0,6,1,1,1,0,9,102,0,0,0,
+1,4,102,108,111,97,116,95,116,111,95,105,110,116,0,18,95,95,114,101,116,86,97,108,0,59,120,121,0,0,
+18,102,0,59,120,120,0,0,0,0,1,0,6,1,1,1,0,1,98,0,0,0,1,4,102,108,111,97,116,95,116,111,95,105,110,
+116,0,18,95,95,114,101,116,86,97,108,0,59,120,121,0,0,18,98,0,59,120,120,0,0,0,0,1,0,7,1,1,1,0,5,
+105,0,0,1,1,0,5,106,0,0,1,1,0,5,107,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,59,120,0,18,105,0,
+20,0,9,18,95,95,114,101,116,86,97,108,0,59,121,0,18,106,0,20,0,9,18,95,95,114,101,116,86,97,108,0,
+59,122,0,18,107,0,20,0,0,1,0,7,1,1,1,0,5,105,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,59,120,121,
+122,0,18,105,0,59,120,120,120,0,20,0,0,1,0,7,1,1,1,0,9,102,0,0,0,1,9,18,95,95,114,101,116,86,97,
+108,0,59,120,121,122,0,18,102,0,59,120,120,120,0,20,0,0,1,0,7,1,1,1,0,1,98,0,0,0,1,9,18,95,95,114,
+101,116,86,97,108,0,59,120,121,122,0,18,98,0,59,120,120,120,0,20,0,0,1,0,8,1,1,1,0,5,120,0,0,1,1,0,
+5,121,0,0,1,1,0,5,122,0,0,1,1,0,5,119,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,59,120,0,18,120,0,
+20,0,9,18,95,95,114,101,116,86,97,108,0,59,121,0,18,121,0,20,0,9,18,95,95,114,101,116,86,97,108,0,
+59,122,0,18,122,0,20,0,9,18,95,95,114,101,116,86,97,108,0,59,119,0,18,119,0,20,0,0,1,0,8,1,1,1,0,5,
+105,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,18,105,0,59,120,120,120,120,0,20,0,0,1,0,8,1,1,1,0,
+9,102,0,0,0,1,4,102,108,111,97,116,95,116,111,95,105,110,116,0,18,95,95,114,101,116,86,97,108,0,0,
+18,102,0,59,120,120,120,120,0,0,0,0,1,0,8,1,1,1,0,1,98,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,
+18,98,0,59,120,120,120,120,0,20,0,0,1,0,2,1,1,1,0,1,98,49,0,0,1,1,0,1,98,50,0,0,0,1,9,18,95,95,114,
+101,116,86,97,108,0,59,120,0,18,98,49,0,20,0,9,18,95,95,114,101,116,86,97,108,0,59,121,0,18,98,50,
+0,20,0,0,1,0,2,1,1,1,0,1,98,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,59,120,121,0,18,98,0,59,120,
+120,0,20,0,0,1,0,2,1,1,1,0,9,102,0,0,0,1,3,2,1,10,1,122,101,114,111,0,2,58,118,101,99,50,0,17,48,0,
+48,0,0,0,17,48,0,48,0,0,0,0,0,0,4,118,101,99,52,95,115,101,113,0,18,95,95,114,101,116,86,97,108,0,
+59,120,121,0,0,18,102,0,59,120,120,0,0,18,122,101,114,111,0,0,0,0,1,0,2,1,1,1,0,5,105,0,0,0,1,3,2,
+1,6,1,122,101,114,111,0,2,58,105,118,101,99,50,0,16,8,48,0,0,16,8,48,0,0,0,0,0,4,118,101,99,52,95,
+115,101,113,0,18,95,95,114,101,116,86,97,108,0,59,120,121,0,0,18,105,0,59,120,120,0,0,18,122,101,
+114,111,0,0,0,0,1,0,3,1,1,1,0,1,98,49,0,0,1,1,0,1,98,50,0,0,1,1,0,1,98,51,0,0,0,1,9,18,95,95,114,
+101,116,86,97,108,0,59,120,0,18,98,49,0,20,0,9,18,95,95,114,101,116,86,97,108,0,59,121,0,18,98,50,
+0,20,0,9,18,95,95,114,101,116,86,97,108,0,59,122,0,18,98,51,0,20,0,0,1,0,3,1,1,1,0,1,98,0,0,0,1,9,
+18,95,95,114,101,116,86,97,108,0,59,120,121,122,0,18,98,0,59,120,120,120,0,20,0,0,1,0,3,1,1,1,0,9,
+102,0,0,0,1,3,2,1,11,1,122,101,114,111,0,2,58,118,101,99,51,0,17,48,0,48,0,0,0,17,48,0,48,0,0,0,17,
+48,0,48,0,0,0,0,0,0,4,118,101,99,52,95,115,101,113,0,18,95,95,114,101,116,86,97,108,0,59,120,121,
+122,0,0,18,102,0,59,120,120,120,0,0,18,122,101,114,111,0,0,0,0,1,0,3,1,1,1,0,5,105,0,0,0,1,3,2,1,7,
+1,122,101,114,111,0,2,58,105,118,101,99,51,0,16,8,48,0,0,16,8,48,0,0,16,8,48,0,0,0,0,0,4,118,101,
+99,52,95,115,101,113,0,18,95,95,114,101,116,86,97,108,0,59,120,121,122,0,0,18,105,0,59,120,120,120,
+0,0,18,122,101,114,111,0,0,0,0,1,0,4,1,1,1,0,1,98,49,0,0,1,1,0,1,98,50,0,0,1,1,0,1,98,51,0,0,1,1,0,
+1,98,52,0,0,0,1,9,18,95,95,114,101,116,86,97,108,0,59,120,0,18,98,49,0,20,0,9,18,95,95,114,101,116,
86,97,108,0,59,121,0,18,98,50,0,20,0,9,18,95,95,114,101,116,86,97,108,0,59,122,0,18,98,51,0,20,0,9,
18,95,95,114,101,116,86,97,108,0,59,119,0,18,98,52,0,20,0,0,1,0,4,1,1,1,0,1,98,0,0,0,1,9,18,95,95,
114,101,116,86,97,108,0,59,120,121,122,119,0,18,98,0,59,120,120,120,120,0,20,0,0,1,0,4,1,1,1,0,9,
diff --git a/src/mesa/shader/slang/slang_codegen.c b/src/mesa/shader/slang/slang_codegen.c
index 02260d3422e..94cb6b38a46 100644
--- a/src/mesa/shader/slang/slang_codegen.c
+++ b/src/mesa/shader/slang/slang_codegen.c
@@ -1,6 +1,6 @@
/*
* Mesa 3-D graphics library
- * Version: 6.5.3
+ * Version: 7.0.1
*
* Copyright (C) 2005-2007 Brian Paul All Rights Reserved.
*
@@ -1261,15 +1261,23 @@ make_writemask(const char *field)
while (*field) {
switch (*field) {
case 'x':
+ case 's':
+ case 'r':
mask |= WRITEMASK_X;
break;
case 'y':
+ case 't':
+ case 'g':
mask |= WRITEMASK_Y;
break;
case 'z':
+ case 'p':
+ case 'b':
mask |= WRITEMASK_Z;
break;
case 'w':
+ case 'q':
+ case 'a':
mask |= WRITEMASK_W;
break;
default:
@@ -2320,7 +2328,8 @@ _slang_gen_field(slang_assemble_ctx * A, slang_operation *oper)
n = _slang_gen_swizzle(n, swizzle);
return n;
}
- else if (ti.spec.type == SLANG_SPEC_FLOAT) {
+ else if ( ti.spec.type == SLANG_SPEC_FLOAT
+ || ti.spec.type == SLANG_SPEC_INT) {
const GLuint rows = 1;
slang_swizzle swz;
slang_ir_node *n;
diff --git a/src/mesa/sparc/glapi_sparc.S b/src/mesa/sparc/glapi_sparc.S
index 86c9f30e143..420391a2d00 100644
--- a/src/mesa/sparc/glapi_sparc.S
+++ b/src/mesa/sparc/glapi_sparc.S
@@ -1731,12 +1731,17 @@ _mesa_sparc_glapi_end:
.globl glVertexAttrib4Nubv ; .type glVertexAttrib4Nubv,#function ; glVertexAttrib4Nubv = glVertexAttrib4NubvARB
.globl glVertexAttrib4Nuiv ; .type glVertexAttrib4Nuiv,#function ; glVertexAttrib4Nuiv = glVertexAttrib4NuivARB
.globl glVertexAttrib4Nusv ; .type glVertexAttrib4Nusv,#function ; glVertexAttrib4Nusv = glVertexAttrib4NusvARB
+ .globl glVertexAttrib4bv ; .type glVertexAttrib4bv,#function ; glVertexAttrib4bv = glVertexAttrib4bvARB
.globl glVertexAttrib4d ; .type glVertexAttrib4d,#function ; glVertexAttrib4d = glVertexAttrib4dARB
.globl glVertexAttrib4dv ; .type glVertexAttrib4dv,#function ; glVertexAttrib4dv = glVertexAttrib4dvARB
.globl glVertexAttrib4f ; .type glVertexAttrib4f,#function ; glVertexAttrib4f = glVertexAttrib4fARB
.globl glVertexAttrib4fv ; .type glVertexAttrib4fv,#function ; glVertexAttrib4fv = glVertexAttrib4fvARB
+ .globl glVertexAttrib4iv ; .type glVertexAttrib4iv,#function ; glVertexAttrib4iv = glVertexAttrib4ivARB
.globl glVertexAttrib4s ; .type glVertexAttrib4s,#function ; glVertexAttrib4s = glVertexAttrib4sARB
.globl glVertexAttrib4sv ; .type glVertexAttrib4sv,#function ; glVertexAttrib4sv = glVertexAttrib4svARB
+ .globl glVertexAttrib4ubv ; .type glVertexAttrib4ubv,#function ; glVertexAttrib4ubv = glVertexAttrib4ubvARB
+ .globl glVertexAttrib4uiv ; .type glVertexAttrib4uiv,#function ; glVertexAttrib4uiv = glVertexAttrib4uivARB
+ .globl glVertexAttrib4usv ; .type glVertexAttrib4usv,#function ; glVertexAttrib4usv = glVertexAttrib4usvARB
.globl glVertexAttribPointer ; .type glVertexAttribPointer,#function ; glVertexAttribPointer = glVertexAttribPointerARB
.globl glBindBuffer ; .type glBindBuffer,#function ; glBindBuffer = glBindBufferARB
.globl glBufferData ; .type glBufferData,#function ; glBufferData = glBufferDataARB
diff --git a/src/mesa/swrast/s_drawpix.c b/src/mesa/swrast/s_drawpix.c
index cd5b7bc2935..4c9194e148f 100644
--- a/src/mesa/swrast/s_drawpix.c
+++ b/src/mesa/swrast/s_drawpix.c
@@ -1,8 +1,8 @@
/*
* Mesa 3-D graphics library
- * Version: 6.5.2
+ * Version: 7.0.1
*
- * Copyright (C) 1999-2006 Brian Paul All Rights Reserved.
+ * Copyright (C) 1999-2007 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"),
@@ -406,10 +406,9 @@ draw_stencil_pixels( GLcontext *ctx, GLint x, GLint y,
width, height,
GL_COLOR_INDEX, type,
row, skipPixels);
- _mesa_unpack_index_span(ctx, spanWidth, destType, values,
- type, source, unpack,
- ctx->_ImageTransferState);
- _mesa_apply_stencil_transfer_ops(ctx, spanWidth, values);
+ _mesa_unpack_stencil_span(ctx, spanWidth, destType, values,
+ type, source, unpack,
+ ctx->_ImageTransferState);
if (zoom) {
_swrast_write_zoomed_stencil_span(ctx, x, y, spanWidth,
spanX, spanY, values);
diff --git a/src/mesa/tnl/t_save_api.c b/src/mesa/tnl/t_save_api.c
deleted file mode 100644
index b08f05374e4..00000000000
--- a/src/mesa/tnl/t_save_api.c
+++ /dev/null
@@ -1,1834 +0,0 @@
-/**************************************************************************
-
-Copyright 2002 Tungsten Graphics Inc., Cedar Park, Texas.
-
-All Rights Reserved.
-
-Permission is hereby granted, free of charge, to any person obtaining a
-copy of this software and associated documentation files (the "Software"),
-to deal in the Software without restriction, including without limitation
-on the rights to use, copy, modify, merge, publish, distribute, sub
-license, and/or sell copies of the Software, and to permit persons to whom
-the Software is furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice (including the next
-paragraph) shall be included in all copies or substantial portions of the
-Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
-TUNGSTEN GRAPHICS AND/OR THEIR SUPPLIERS BE LIABLE FOR ANY CLAIM,
-DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
-OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
-USE OR OTHER DEALINGS IN THE SOFTWARE.
-
-**************************************************************************/
-
-/*
- * Authors:
- * Keith Whitwell <[email protected]>
- */
-
-
-
-/**
- * The display list compiler attempts to store lists of vertices with the
- * same vertex layout. Additionally it attempts to minimize the need
- * for execute-time fixup of these vertex lists, allowing them to be
- * cached on hardware.
- *
- * There are still some circumstances where this can be thwarted, for
- * example by building a list that consists of one very long primitive
- * (eg Begin(Triangles), 1000 vertices, End), and calling that list
- * from inside a different begin/end object (Begin(Lines), CallList,
- * End).
- *
- * In that case the code will have to replay the list as individual
- * commands through the Exec dispatch table, or fix up the copied
- * vertices at execute-time.
- *
- * The other case where fixup is required is when a vertex attribute
- * is introduced in the middle of a primitive. Eg:
- * Begin(Lines)
- * TexCoord1f() Vertex2f()
- * TexCoord1f() Color3f() Vertex2f()
- * End()
- *
- * If the current value of Color isn't known at compile-time, this
- * primitive will require fixup.
- *
- *
- * The list compiler currently doesn't attempt to compile lists
- * containing EvalCoord or EvalPoint commands. On encountering one of
- * these, compilation falls back to opcodes.
- *
- * This could be improved to fallback only when a mix of EvalCoord and
- * Vertex commands are issued within a single primitive.
- */
-
-
-#include "glheader.h"
-#include "context.h"
-#include "dlist.h"
-#include "enums.h"
-#include "macros.h"
-#include "api_validate.h"
-#include "api_arrayelt.h"
-#include "vtxfmt.h"
-#include "t_save_api.h"
-#include "dispatch.h"
-
-/*
- * NOTE: Old 'parity' issue is gone, but copying can still be
- * wrong-footed on replay.
- */
-static GLuint _save_copy_vertices( GLcontext *ctx,
- const struct tnl_vertex_list *node )
-{
- TNLcontext *tnl = TNL_CONTEXT( ctx );
- const struct tnl_prim *prim = &node->prim[node->prim_count-1];
- GLuint nr = prim->count;
- GLuint sz = tnl->save.vertex_size;
- const GLfloat *src = node->buffer + prim->start * sz;
- GLfloat *dst = tnl->save.copied.buffer;
- GLuint ovf, i;
-
- if (prim->mode & PRIM_END)
- return 0;
-
- switch( prim->mode & PRIM_MODE_MASK )
- {
- case GL_POINTS:
- return 0;
- case GL_LINES:
- ovf = nr&1;
- for (i = 0 ; i < ovf ; i++)
- _mesa_memcpy( dst+i*sz, src+(nr-ovf+i)*sz, sz*sizeof(GLfloat) );
- return i;
- case GL_TRIANGLES:
- ovf = nr%3;
- for (i = 0 ; i < ovf ; i++)
- _mesa_memcpy( dst+i*sz, src+(nr-ovf+i)*sz, sz*sizeof(GLfloat) );
- return i;
- case GL_QUADS:
- ovf = nr&3;
- for (i = 0 ; i < ovf ; i++)
- _mesa_memcpy( dst+i*sz, src+(nr-ovf+i)*sz, sz*sizeof(GLfloat) );
- return i;
- case GL_LINE_STRIP:
- if (nr == 0)
- return 0;
- else {
- _mesa_memcpy( dst, src+(nr-1)*sz, sz*sizeof(GLfloat) );
- return 1;
- }
- case GL_LINE_LOOP:
- case GL_TRIANGLE_FAN:
- case GL_POLYGON:
- if (nr == 0)
- return 0;
- else if (nr == 1) {
- _mesa_memcpy( dst, src+0, sz*sizeof(GLfloat) );
- return 1;
- } else {
- _mesa_memcpy( dst, src+0, sz*sizeof(GLfloat) );
- _mesa_memcpy( dst+sz, src+(nr-1)*sz, sz*sizeof(GLfloat) );
- return 2;
- }
- case GL_TRIANGLE_STRIP:
- case GL_QUAD_STRIP:
- switch (nr) {
- case 0: ovf = 0; break;
- case 1: ovf = 1; break;
- default: ovf = 2 + (nr&1); break;
- }
- for (i = 0 ; i < ovf ; i++)
- _mesa_memcpy( dst+i*sz, src+(nr-ovf+i)*sz, sz*sizeof(GLfloat) );
- return i;
- default:
- assert(0);
- return 0;
- }
-}
-
-
-static void
-build_normal_lengths( struct tnl_vertex_list *node )
-{
- GLuint i;
- GLfloat *len;
- GLfloat *n = node->buffer;
- GLuint stride = node->vertex_size;
- GLuint count = node->count;
-
- len = node->normal_lengths = (GLfloat *) MALLOC( count * sizeof(GLfloat) );
- if (!len)
- return;
-
- /* Find the normal of the first vertex:
- */
- for (i = 0 ; i < _TNL_ATTRIB_NORMAL ; i++)
- n += node->attrsz[i];
-
- for (i = 0 ; i < count ; i++, n += stride) {
- len[i] = LEN_3FV( n );
- if (len[i] > 0.0F) len[i] = 1.0F / len[i];
- }
-}
-
-static struct tnl_vertex_store *alloc_vertex_store( GLcontext *ctx )
-{
- struct tnl_vertex_store *store = MALLOC_STRUCT(tnl_vertex_store);
- (void) ctx;
- store->used = 0;
- store->refcount = 1;
- return store;
-}
-
-static struct tnl_primitive_store *alloc_prim_store( GLcontext *ctx )
-{
- struct tnl_primitive_store *store = MALLOC_STRUCT(tnl_primitive_store);
- (void) ctx;
- store->used = 0;
- store->refcount = 1;
- return store;
-}
-
-static void _save_reset_counters( GLcontext *ctx )
-{
- TNLcontext *tnl = TNL_CONTEXT(ctx);
-
- tnl->save.prim = tnl->save.prim_store->buffer + tnl->save.prim_store->used;
- tnl->save.buffer = (tnl->save.vertex_store->buffer +
- tnl->save.vertex_store->used);
-
- if (tnl->save.vertex_size)
- tnl->save.initial_counter = ((SAVE_BUFFER_SIZE -
- tnl->save.vertex_store->used) /
- tnl->save.vertex_size);
- else
- tnl->save.initial_counter = 0;
-
- if (tnl->save.initial_counter > ctx->Const.MaxArrayLockSize )
- tnl->save.initial_counter = ctx->Const.MaxArrayLockSize;
-
- tnl->save.counter = tnl->save.initial_counter;
- tnl->save.prim_count = 0;
- tnl->save.prim_max = SAVE_PRIM_SIZE - tnl->save.prim_store->used;
- tnl->save.copied.nr = 0;
- tnl->save.dangling_attr_ref = 0;
-}
-
-
-/* Insert the active immediate struct onto the display list currently
- * being built.
- */
-static void _save_compile_vertex_list( GLcontext *ctx )
-{
- TNLcontext *tnl = TNL_CONTEXT(ctx);
- struct tnl_vertex_list *node;
-
- /* Allocate space for this structure in the display list currently
- * being compiled.
- */
- node = (struct tnl_vertex_list *)
- _mesa_alloc_instruction(ctx, tnl->save.opcode_vertex_list, sizeof(*node));
-
- if (!node)
- return;
-
- /* Duplicate our template, increment refcounts to the storage structs:
- */
- _mesa_memcpy(node->attrsz, tnl->save.attrsz, sizeof(node->attrsz));
- node->vertex_size = tnl->save.vertex_size;
- node->buffer = tnl->save.buffer;
- node->count = tnl->save.initial_counter - tnl->save.counter;
- node->wrap_count = tnl->save.copied.nr;
- node->have_materials = tnl->save.have_materials;
- node->dangling_attr_ref = tnl->save.dangling_attr_ref;
- node->normal_lengths = NULL;
- node->prim = tnl->save.prim;
- node->prim_count = tnl->save.prim_count;
- node->vertex_store = tnl->save.vertex_store;
- node->prim_store = tnl->save.prim_store;
-
- node->vertex_store->refcount++;
- node->prim_store->refcount++;
-
- assert(node->attrsz[_TNL_ATTRIB_POS] != 0 ||
- node->count == 0);
-
- if (tnl->save.dangling_attr_ref)
- ctx->ListState.CurrentList->flags |= MESA_DLIST_DANGLING_REFS;
-
- /* Maybe calculate normal lengths:
- */
- if (tnl->CalcDListNormalLengths &&
- node->attrsz[_TNL_ATTRIB_NORMAL] == 3 &&
- !(ctx->ListState.CurrentList->flags & MESA_DLIST_DANGLING_REFS))
- build_normal_lengths( node );
-
-
- tnl->save.vertex_store->used += tnl->save.vertex_size * node->count;
- tnl->save.prim_store->used += node->prim_count;
-
- /* Decide whether the storage structs are full, or can be used for
- * the next vertex lists as well.
- */
- if (tnl->save.vertex_store->used >
- SAVE_BUFFER_SIZE - 16 * (tnl->save.vertex_size + 4)) {
-
- tnl->save.vertex_store->refcount--;
- assert(tnl->save.vertex_store->refcount != 0);
- tnl->save.vertex_store = alloc_vertex_store( ctx );
- tnl->save.vbptr = tnl->save.vertex_store->buffer;
- }
-
- if (tnl->save.prim_store->used > SAVE_PRIM_SIZE - 6) {
- tnl->save.prim_store->refcount--;
- assert(tnl->save.prim_store->refcount != 0);
- tnl->save.prim_store = alloc_prim_store( ctx );
- }
-
- /* Reset our structures for the next run of vertices:
- */
- _save_reset_counters( ctx );
-
- /* Copy duplicated vertices
- */
- tnl->save.copied.nr = _save_copy_vertices( ctx, node );
-
-
- /* Deal with GL_COMPILE_AND_EXECUTE:
- */
- if (ctx->ExecuteFlag) {
- _tnl_playback_vertex_list( ctx, (void *) node );
- }
-}
-
-
-/* TODO -- If no new vertices have been stored, don't bother saving
- * it.
- */
-static void _save_wrap_buffers( GLcontext *ctx )
-{
- TNLcontext *tnl = TNL_CONTEXT(ctx);
- GLint i = tnl->save.prim_count - 1;
- GLenum mode;
-
- assert(i < (GLint) tnl->save.prim_max);
- assert(i >= 0);
-
- /* Close off in-progress primitive.
- */
- tnl->save.prim[i].count = ((tnl->save.initial_counter - tnl->save.counter) -
- tnl->save.prim[i].start);
- mode = tnl->save.prim[i].mode & ~(PRIM_BEGIN|PRIM_END);
-
- /* store the copied vertices, and allocate a new list.
- */
- _save_compile_vertex_list( ctx );
-
- /* Restart interrupted primitive
- */
- tnl->save.prim[0].mode = mode;
- tnl->save.prim[0].start = 0;
- tnl->save.prim[0].count = 0;
- tnl->save.prim_count = 1;
-}
-
-
-
-/* Called only when buffers are wrapped as the result of filling the
- * vertex_store struct.
- */
-static void _save_wrap_filled_vertex( GLcontext *ctx )
-{
- TNLcontext *tnl = TNL_CONTEXT(ctx);
- GLfloat *data = tnl->save.copied.buffer;
- GLuint i;
-
- /* Emit a glEnd to close off the last vertex list.
- */
- _save_wrap_buffers( ctx );
-
- /* Copy stored stored vertices to start of new list.
- */
- assert(tnl->save.counter > tnl->save.copied.nr);
-
- for (i = 0 ; i < tnl->save.copied.nr ; i++) {
- _mesa_memcpy( tnl->save.vbptr, data, tnl->save.vertex_size * sizeof(GLfloat));
- data += tnl->save.vertex_size;
- tnl->save.vbptr += tnl->save.vertex_size;
- tnl->save.counter--;
- }
-}
-
-
-static void _save_copy_to_current( GLcontext *ctx )
-{
- TNLcontext *tnl = TNL_CONTEXT(ctx);
- GLuint i;
-
- /* XXX Use _TNL_FIRST_* and _TNL_LAST_* values instead? */
- for (i = _TNL_ATTRIB_POS+1 ; i <= _TNL_ATTRIB_EDGEFLAG ; i++) {
- if (tnl->save.attrsz[i]) {
- tnl->save.currentsz[i][0] = tnl->save.attrsz[i];
- COPY_CLEAN_4V(tnl->save.current[i],
- tnl->save.attrsz[i],
- tnl->save.attrptr[i]);
- }
- }
-
- /* Edgeflag requires special treatment:
- *
- * TODO: change edgeflag to GLfloat in Mesa.
- */
- if (tnl->save.attrsz[_TNL_ATTRIB_EDGEFLAG]) {
- ctx->ListState.ActiveEdgeFlag = 1;
- tnl->save.CurrentFloatEdgeFlag =
- tnl->save.attrptr[_TNL_ATTRIB_EDGEFLAG][0];
- ctx->ListState.CurrentEdgeFlag =
- (tnl->save.CurrentFloatEdgeFlag == 1.0);
- }
-}
-
-
-static void _save_copy_from_current( GLcontext *ctx )
-{
- TNLcontext *tnl = TNL_CONTEXT(ctx);
- GLint i;
-
- for (i = _TNL_ATTRIB_POS+1 ; i <= _TNL_ATTRIB_EDGEFLAG ; i++)
- switch (tnl->save.attrsz[i]) {
- case 4: tnl->save.attrptr[i][3] = tnl->save.current[i][3];
- case 3: tnl->save.attrptr[i][2] = tnl->save.current[i][2];
- case 2: tnl->save.attrptr[i][1] = tnl->save.current[i][1];
- case 1: tnl->save.attrptr[i][0] = tnl->save.current[i][0];
- case 0: break;
- }
-
- /* Edgeflag requires special treatment:
- */
- if (tnl->save.attrsz[_TNL_ATTRIB_EDGEFLAG]) {
- tnl->save.CurrentFloatEdgeFlag = (GLfloat)ctx->ListState.CurrentEdgeFlag;
- tnl->save.attrptr[_TNL_ATTRIB_EDGEFLAG][0] = tnl->save.CurrentFloatEdgeFlag;
- }
-}
-
-
-
-
-/* Flush existing data, set new attrib size, replay copied vertices.
- */
-static void _save_upgrade_vertex( GLcontext *ctx,
- GLuint attr,
- GLuint newsz )
-{
- TNLcontext *tnl = TNL_CONTEXT(ctx);
- GLuint oldsz;
- GLuint i;
- GLfloat *tmp;
-
- /* Store the current run of vertices, and emit a GL_END. Emit a
- * BEGIN in the new buffer.
- */
- if (tnl->save.initial_counter != tnl->save.counter)
- _save_wrap_buffers( ctx );
- else
- assert( tnl->save.copied.nr == 0 );
-
- /* Do a COPY_TO_CURRENT to ensure back-copying works for the case
- * when the attribute already exists in the vertex and is having
- * its size increased.
- */
- _save_copy_to_current( ctx );
-
- /* Fix up sizes:
- */
- oldsz = tnl->save.attrsz[attr];
- tnl->save.attrsz[attr] = newsz;
-
- tnl->save.vertex_size += newsz - oldsz;
- tnl->save.counter = ((SAVE_BUFFER_SIZE - tnl->save.vertex_store->used) /
- tnl->save.vertex_size);
- if (tnl->save.counter > ctx->Const.MaxArrayLockSize )
- tnl->save.counter = ctx->Const.MaxArrayLockSize;
- tnl->save.initial_counter = tnl->save.counter;
-
- /* Recalculate all the attrptr[] values:
- */
- for (i = 0, tmp = tnl->save.vertex ; i < _TNL_ATTRIB_MAX ; i++) {
- if (tnl->save.attrsz[i]) {
- tnl->save.attrptr[i] = tmp;
- tmp += tnl->save.attrsz[i];
- }
- else
- tnl->save.attrptr[i] = NULL; /* will not be dereferenced. */
- }
-
- /* Copy from current to repopulate the vertex with correct values.
- */
- _save_copy_from_current( ctx );
-
- /* Replay stored vertices to translate them to new format here.
- *
- * If there are copied vertices and the new (upgraded) attribute
- * has not been defined before, this list is somewhat degenerate,
- * and will need fixup at runtime.
- */
- if (tnl->save.copied.nr)
- {
- GLfloat *data = tnl->save.copied.buffer;
- GLfloat *dest = tnl->save.buffer;
- GLuint j;
-
- /* Need to note this and fix up at runtime (or loopback):
- */
- if (tnl->save.currentsz[attr][0] == 0) {
- assert(oldsz == 0);
- tnl->save.dangling_attr_ref = GL_TRUE;
-
-/* _mesa_debug(NULL, "_save_upgrade_vertex: dangling reference attr %d\n", */
-/* attr); */
-
-#if 0
- /* The current strategy is to punt these degenerate cases
- * through _tnl_loopback_vertex_list(), a lower-performance
- * option. To minimize the impact of this, artificially
- * reduce the size of this vertex_list.
- */
- if (t->save.counter > 10) {
- t->save.initial_counter = 10;
- t->save.counter = 10;
- }
-#endif
- }
-
- for (i = 0 ; i < tnl->save.copied.nr ; i++) {
- for (j = 0 ; j < _TNL_ATTRIB_MAX ; j++) {
- if (tnl->save.attrsz[j]) {
- if (j == attr) {
- if (oldsz) {
- COPY_CLEAN_4V( dest, oldsz, data );
- data += oldsz;
- dest += newsz;
- }
- else {
- COPY_SZ_4V( dest, newsz, tnl->save.current[attr] );
- dest += newsz;
- }
- }
- else {
- GLint sz = tnl->save.attrsz[j];
- COPY_SZ_4V( dest, sz, data );
- data += sz;
- dest += sz;
- }
- }
- }
- }
-
- tnl->save.vbptr = dest;
- tnl->save.counter -= tnl->save.copied.nr;
- }
-}
-
-
-
-
-/* Helper function for 'CHOOSE' macro. Do what's necessary when an
- * entrypoint is called for the first time.
- */
-static void do_choose( GLuint attr, GLuint sz,
- void (*attr_func)( const GLfloat *),
- void (*choose1)( const GLfloat *),
- void (*choose2)( const GLfloat *),
- void (*choose3)( const GLfloat *),
- void (*choose4)( const GLfloat *),
- const GLfloat *v )
-{
- GET_CURRENT_CONTEXT( ctx );
- TNLcontext *tnl = TNL_CONTEXT(ctx);
- static GLfloat id[4] = { 0, 0, 0, 1 };
- int i;
-
- if (tnl->save.attrsz[attr] < sz) {
- /* New size is larger. Need to flush existing vertices and get
- * an enlarged vertex format.
- */
- _save_upgrade_vertex( ctx, attr, sz );
- }
- else {
- /* New size is equal or smaller - just need to fill in some
- * zeros.
- */
- for (i = sz ; i <= tnl->save.attrsz[attr] ; i++)
- tnl->save.attrptr[attr][i-1] = id[i-1];
- }
-
- /* Reset any active pointers for this attribute
- */
- tnl->save.tabfv[attr][0] = choose1;
- tnl->save.tabfv[attr][1] = choose2;
- tnl->save.tabfv[attr][2] = choose3;
- tnl->save.tabfv[attr][3] = choose4;
-
- /* Update the secondary dispatch table with the new function
- */
- tnl->save.tabfv[attr][sz-1] = attr_func;
-
- (*attr_func)(v);
-}
-
-
-
-/* Only one size for each attribute may be active at once. Eg. if
- * Color3f is installed/active, then Color4f may not be, even if the
- * vertex actually contains 4 color coordinates. This is because the
- * 3f version won't otherwise set color[3] to 1.0 -- this is the job
- * of the chooser function when switching between Color4f and Color3f.
- */
-#define ATTRFV( ATTR, N ) \
-static void save_choose_##ATTR##_##N( const GLfloat *v ); \
- \
-static void save_attrib_##ATTR##_##N( const GLfloat *v ) \
-{ \
- GET_CURRENT_CONTEXT( ctx ); \
- TNLcontext *tnl = TNL_CONTEXT(ctx); \
- \
- if ((ATTR) == 0) { \
- GLuint i; \
- \
- if (N>0) tnl->save.vbptr[0] = v[0]; \
- if (N>1) tnl->save.vbptr[1] = v[1]; \
- if (N>2) tnl->save.vbptr[2] = v[2]; \
- if (N>3) tnl->save.vbptr[3] = v[3]; \
- \
- for (i = N; i < tnl->save.vertex_size; i++) \
- tnl->save.vbptr[i] = tnl->save.vertex[i]; \
- \
- tnl->save.vbptr += tnl->save.vertex_size; \
- \
- if (--tnl->save.counter == 0) \
- _save_wrap_filled_vertex( ctx ); \
- } \
- else { \
- GLfloat *dest = tnl->save.attrptr[ATTR]; \
- if (N>0) dest[0] = v[0]; \
- if (N>1) dest[1] = v[1]; \
- if (N>2) dest[2] = v[2]; \
- if (N>3) dest[3] = v[3]; \
- } \
-}
-
-#define CHOOSE( ATTR, N ) \
-static void save_choose_##ATTR##_##N( const GLfloat *v ) \
-{ \
- do_choose(ATTR, N, \
- save_attrib_##ATTR##_##N, \
- save_choose_##ATTR##_1, \
- save_choose_##ATTR##_2, \
- save_choose_##ATTR##_3, \
- save_choose_##ATTR##_4, \
- v ); \
-}
-
-#define INIT(ATTR) \
-static void save_init_##ATTR( TNLcontext *tnl ) \
-{ \
- tnl->save.tabfv[ATTR][0] = save_choose_##ATTR##_1; \
- tnl->save.tabfv[ATTR][1] = save_choose_##ATTR##_2; \
- tnl->save.tabfv[ATTR][2] = save_choose_##ATTR##_3; \
- tnl->save.tabfv[ATTR][3] = save_choose_##ATTR##_4; \
-}
-
-#define ATTRS( ATTRIB ) \
- ATTRFV( ATTRIB, 1 ) \
- ATTRFV( ATTRIB, 2 ) \
- ATTRFV( ATTRIB, 3 ) \
- ATTRFV( ATTRIB, 4 ) \
- CHOOSE( ATTRIB, 1 ) \
- CHOOSE( ATTRIB, 2 ) \
- CHOOSE( ATTRIB, 3 ) \
- CHOOSE( ATTRIB, 4 ) \
- INIT( ATTRIB ) \
-
-
-/* Generate a lot of functions. These are the actual worker
- * functions, which are equivalent to those generated via codegen
- * elsewhere.
- */
-ATTRS( 0 )
-ATTRS( 1 )
-ATTRS( 2 )
-ATTRS( 3 )
-ATTRS( 4 )
-ATTRS( 5 )
-ATTRS( 6 )
-ATTRS( 7 )
-ATTRS( 8 )
-ATTRS( 9 )
-ATTRS( 10 )
-ATTRS( 11 )
-ATTRS( 12 )
-ATTRS( 13 )
-ATTRS( 14 )
-ATTRS( 15 )
-
-ATTRS( 16 )
-ATTRS( 17 )
-ATTRS( 18 )
-ATTRS( 19 )
-ATTRS( 20 )
-ATTRS( 21 )
-ATTRS( 22 )
-ATTRS( 23 )
-ATTRS( 24 )
-ATTRS( 25 )
-ATTRS( 26 )
-ATTRS( 27 )
-ATTRS( 28 )
-ATTRS( 29 )
-ATTRS( 30 )
-ATTRS( 31 )
-
-
-static void _save_reset_vertex( GLcontext *ctx )
-{
- TNLcontext *tnl = TNL_CONTEXT(ctx);
- GLuint i;
-
- /* conventional attributes */
- save_init_0( tnl );
- save_init_1( tnl );
- save_init_2( tnl );
- save_init_3( tnl );
- save_init_4( tnl );
- save_init_5( tnl );
- save_init_6( tnl );
- save_init_7( tnl );
- save_init_8( tnl );
- save_init_9( tnl );
- save_init_10( tnl );
- save_init_11( tnl );
- save_init_12( tnl );
- save_init_13( tnl );
- save_init_14( tnl );
- save_init_15( tnl );
-
- /* generic attributes */
- save_init_16( tnl );
- save_init_17( tnl );
- save_init_18( tnl );
- save_init_19( tnl );
- save_init_20( tnl );
- save_init_21( tnl );
- save_init_22( tnl );
- save_init_23( tnl );
- save_init_24( tnl );
- save_init_25( tnl );
- save_init_26( tnl );
- save_init_27( tnl );
- save_init_28( tnl );
- save_init_29( tnl );
- save_init_30( tnl );
- save_init_31( tnl );
-
- for (i = 0 ; i < _TNL_ATTRIB_MAX ; i++)
- tnl->save.attrsz[i] = 0;
-
- tnl->save.vertex_size = 0;
- tnl->save.have_materials = 0;
-
- _save_reset_counters( ctx );
-}
-
-
-
-/* Cope with aliasing of classic Vertex, Normal, etc. and the fan-out
- * of glMultTexCoord and glProgramParamterNV by routing all these
- * through a second level dispatch table.
- */
-#define DISPATCH_ATTRFV( ATTR, COUNT, P ) \
-do { \
- GET_CURRENT_CONTEXT( ctx ); \
- TNLcontext *tnl = TNL_CONTEXT(ctx); \
- tnl->save.tabfv[ATTR][COUNT-1]( P ); \
-} while (0)
-
-#define DISPATCH_ATTR1FV( ATTR, V ) DISPATCH_ATTRFV( ATTR, 1, V )
-#define DISPATCH_ATTR2FV( ATTR, V ) DISPATCH_ATTRFV( ATTR, 2, V )
-#define DISPATCH_ATTR3FV( ATTR, V ) DISPATCH_ATTRFV( ATTR, 3, V )
-#define DISPATCH_ATTR4FV( ATTR, V ) DISPATCH_ATTRFV( ATTR, 4, V )
-
-#define DISPATCH_ATTR1F( ATTR, S ) DISPATCH_ATTRFV( ATTR, 1, &(S) )
-
-#if defined(USE_X86_ASM) && 0 /* will break register calling convention */
-/* Naughty cheat:
- */
-#define DISPATCH_ATTR2F( ATTR, S,T ) DISPATCH_ATTRFV( ATTR, 2, &(S) )
-#define DISPATCH_ATTR3F( ATTR, S,T,R ) DISPATCH_ATTRFV( ATTR, 3, &(S) )
-#define DISPATCH_ATTR4F( ATTR, S,T,R,Q ) DISPATCH_ATTRFV( ATTR, 4, &(S) )
-#else
-/* Safe:
- */
-#define DISPATCH_ATTR2F( ATTR, S,T ) \
-do { \
- GLfloat v[2]; \
- v[0] = S; v[1] = T; \
- DISPATCH_ATTR2FV( ATTR, v ); \
-} while (0)
-#define DISPATCH_ATTR3F( ATTR, S,T,R ) \
-do { \
- GLfloat v[3]; \
- v[0] = S; v[1] = T; v[2] = R; \
- DISPATCH_ATTR3FV( ATTR, v ); \
-} while (0)
-#define DISPATCH_ATTR4F( ATTR, S,T,R,Q ) \
-do { \
- GLfloat v[4]; \
- v[0] = S; v[1] = T; v[2] = R; v[3] = Q; \
- DISPATCH_ATTR4FV( ATTR, v ); \
-} while (0)
-#endif
-
-
-static void enum_error( void )
-{
- GET_CURRENT_CONTEXT( ctx );
- _mesa_compile_error( ctx, GL_INVALID_ENUM, "glVertexAttrib" );
-}
-
-static void GLAPIENTRY _save_Vertex2f( GLfloat x, GLfloat y )
-{
- DISPATCH_ATTR2F( _TNL_ATTRIB_POS, x, y );
-}
-
-static void GLAPIENTRY _save_Vertex2fv( const GLfloat *v )
-{
- DISPATCH_ATTR2FV( _TNL_ATTRIB_POS, v );
-}
-
-static void GLAPIENTRY _save_Vertex3f( GLfloat x, GLfloat y, GLfloat z )
-{
- DISPATCH_ATTR3F( _TNL_ATTRIB_POS, x, y, z );
-}
-
-static void GLAPIENTRY _save_Vertex3fv( const GLfloat *v )
-{
- DISPATCH_ATTR3FV( _TNL_ATTRIB_POS, v );
-}
-
-static void GLAPIENTRY _save_Vertex4f( GLfloat x, GLfloat y, GLfloat z, GLfloat w )
-{
- DISPATCH_ATTR4F( _TNL_ATTRIB_POS, x, y, z, w );
-}
-
-static void GLAPIENTRY _save_Vertex4fv( const GLfloat *v )
-{
- DISPATCH_ATTR4FV( _TNL_ATTRIB_POS, v );
-}
-
-static void GLAPIENTRY _save_TexCoord1f( GLfloat x )
-{
- DISPATCH_ATTR1F( _TNL_ATTRIB_TEX0, x );
-}
-
-static void GLAPIENTRY _save_TexCoord1fv( const GLfloat *v )
-{
- DISPATCH_ATTR1FV( _TNL_ATTRIB_TEX0, v );
-}
-
-static void GLAPIENTRY _save_TexCoord2f( GLfloat x, GLfloat y )
-{
- DISPATCH_ATTR2F( _TNL_ATTRIB_TEX0, x, y );
-}
-
-static void GLAPIENTRY _save_TexCoord2fv( const GLfloat *v )
-{
- DISPATCH_ATTR2FV( _TNL_ATTRIB_TEX0, v );
-}
-
-static void GLAPIENTRY _save_TexCoord3f( GLfloat x, GLfloat y, GLfloat z )
-{
- DISPATCH_ATTR3F( _TNL_ATTRIB_TEX0, x, y, z );
-}
-
-static void GLAPIENTRY _save_TexCoord3fv( const GLfloat *v )
-{
- DISPATCH_ATTR3FV( _TNL_ATTRIB_TEX0, v );
-}
-
-static void GLAPIENTRY _save_TexCoord4f( GLfloat x, GLfloat y, GLfloat z, GLfloat w )
-{
- DISPATCH_ATTR4F( _TNL_ATTRIB_TEX0, x, y, z, w );
-}
-
-static void GLAPIENTRY _save_TexCoord4fv( const GLfloat *v )
-{
- DISPATCH_ATTR4FV( _TNL_ATTRIB_TEX0, v );
-}
-
-static void GLAPIENTRY _save_Normal3f( GLfloat x, GLfloat y, GLfloat z )
-{
- DISPATCH_ATTR3F( _TNL_ATTRIB_NORMAL, x, y, z );
-}
-
-static void GLAPIENTRY _save_Normal3fv( const GLfloat *v )
-{
- DISPATCH_ATTR3FV( _TNL_ATTRIB_NORMAL, v );
-}
-
-static void GLAPIENTRY _save_FogCoordfEXT( GLfloat x )
-{
- DISPATCH_ATTR1F( _TNL_ATTRIB_FOG, x );
-}
-
-static void GLAPIENTRY _save_FogCoordfvEXT( const GLfloat *v )
-{
- DISPATCH_ATTR1FV( _TNL_ATTRIB_FOG, v );
-}
-
-static void GLAPIENTRY _save_Color3f( GLfloat x, GLfloat y, GLfloat z )
-{
- DISPATCH_ATTR3F( _TNL_ATTRIB_COLOR0, x, y, z );
-}
-
-static void GLAPIENTRY _save_Color3fv( const GLfloat *v )
-{
- DISPATCH_ATTR3FV( _TNL_ATTRIB_COLOR0, v );
-}
-
-static void GLAPIENTRY _save_Color4f( GLfloat x, GLfloat y, GLfloat z, GLfloat w )
-{
- DISPATCH_ATTR4F( _TNL_ATTRIB_COLOR0, x, y, z, w );
-}
-
-static void GLAPIENTRY _save_Color4fv( const GLfloat *v )
-{
- DISPATCH_ATTR4FV( _TNL_ATTRIB_COLOR0, v );
-}
-
-static void GLAPIENTRY _save_SecondaryColor3fEXT( GLfloat x, GLfloat y, GLfloat z )
-{
- DISPATCH_ATTR3F( _TNL_ATTRIB_COLOR1, x, y, z );
-}
-
-static void GLAPIENTRY _save_SecondaryColor3fvEXT( const GLfloat *v )
-{
- DISPATCH_ATTR3FV( _TNL_ATTRIB_COLOR1, v );
-}
-
-static void GLAPIENTRY _save_MultiTexCoord1f( GLenum target, GLfloat x )
-{
- GLuint attr = (target & 0x7) + _TNL_ATTRIB_TEX0;
- DISPATCH_ATTR1F( attr, x );
-}
-
-static void GLAPIENTRY _save_MultiTexCoord1fv( GLenum target, const GLfloat *v )
-{
- GLuint attr = (target & 0x7) + _TNL_ATTRIB_TEX0;
- DISPATCH_ATTR1FV( attr, v );
-}
-
-static void GLAPIENTRY _save_MultiTexCoord2f( GLenum target, GLfloat x, GLfloat y )
-{
- GLuint attr = (target & 0x7) + _TNL_ATTRIB_TEX0;
- DISPATCH_ATTR2F( attr, x, y );
-}
-
-static void GLAPIENTRY _save_MultiTexCoord2fv( GLenum target, const GLfloat *v )
-{
- GLuint attr = (target & 0x7) + _TNL_ATTRIB_TEX0;
- DISPATCH_ATTR2FV( attr, v );
-}
-
-static void GLAPIENTRY _save_MultiTexCoord3f( GLenum target, GLfloat x, GLfloat y,
- GLfloat z)
-{
- GLuint attr = (target & 0x7) + _TNL_ATTRIB_TEX0;
- DISPATCH_ATTR3F( attr, x, y, z );
-}
-
-static void GLAPIENTRY _save_MultiTexCoord3fv( GLenum target, const GLfloat *v )
-{
- GLuint attr = (target & 0x7) + _TNL_ATTRIB_TEX0;
- DISPATCH_ATTR3FV( attr, v );
-}
-
-static void GLAPIENTRY _save_MultiTexCoord4f( GLenum target, GLfloat x, GLfloat y,
- GLfloat z, GLfloat w )
-{
- GLuint attr = (target & 0x7) + _TNL_ATTRIB_TEX0;
- DISPATCH_ATTR4F( attr, x, y, z, w );
-}
-
-static void GLAPIENTRY _save_MultiTexCoord4fv( GLenum target, const GLfloat *v )
-{
- GLuint attr = (target & 0x7) + _TNL_ATTRIB_TEX0;
- DISPATCH_ATTR4FV( attr, v );
-}
-
-
-
-static void GLAPIENTRY
-_save_VertexAttrib1fNV(GLuint index, GLfloat x)
-{
- if (index < MAX_VERTEX_PROGRAM_ATTRIBS) {
- if (index > 0)
- index += VERT_ATTRIB_GENERIC0;
- DISPATCH_ATTR1F( index, x );
- }
- else
- enum_error();
-}
-
-static void GLAPIENTRY
-_save_VertexAttrib1fvNV(GLuint index, const GLfloat *v)
-{
- if (index < MAX_VERTEX_PROGRAM_ATTRIBS) {
- if (index > 0)
- index += VERT_ATTRIB_GENERIC0;
- DISPATCH_ATTR1FV( index, v );
- }
- else
- enum_error();
-}
-
-static void GLAPIENTRY
-_save_VertexAttrib2fNV(GLuint index, GLfloat x, GLfloat y)
-{
- if (index < MAX_VERTEX_PROGRAM_ATTRIBS) {
- if (index > 0)
- index += VERT_ATTRIB_GENERIC0;
- DISPATCH_ATTR2F( index, x, y );
- }
- else
- enum_error();
-}
-
-static void GLAPIENTRY
-_save_VertexAttrib2fvNV(GLuint index, const GLfloat *v)
-{
- if (index < MAX_VERTEX_PROGRAM_ATTRIBS) {
- if (index > 0)
- index += VERT_ATTRIB_GENERIC0;
- DISPATCH_ATTR2FV( index, v );
- }
- else
- enum_error();
-}
-
-static void GLAPIENTRY
-_save_VertexAttrib3fNV(GLuint index, GLfloat x, GLfloat y, GLfloat z)
-{
- if (index < MAX_VERTEX_PROGRAM_ATTRIBS) {
- if (index > 0)
- index += VERT_ATTRIB_GENERIC0;
- DISPATCH_ATTR3F( index, x, y, z );
- }
- else
- enum_error();
-}
-
-static void GLAPIENTRY
-_save_VertexAttrib3fvNV(GLuint index, const GLfloat *v)
-{
- if (index < MAX_VERTEX_PROGRAM_ATTRIBS) {
- if (index > 0)
- index += VERT_ATTRIB_GENERIC0;
- DISPATCH_ATTR3FV( index, v );
- }
- else
- enum_error();
-}
-
-static void GLAPIENTRY
-_save_VertexAttrib4fNV(GLuint index, GLfloat x, GLfloat y,
- GLfloat z, GLfloat w)
-{
- if (index < MAX_VERTEX_PROGRAM_ATTRIBS) {
- if (index > 0)
- index += VERT_ATTRIB_GENERIC0;
- DISPATCH_ATTR4F( index, x, y, z, w );
- }
- else
- enum_error();
-}
-
-static void GLAPIENTRY
-_save_VertexAttrib4fvNV(GLuint index, const GLfloat *v)
-{
- if (index < MAX_VERTEX_PROGRAM_ATTRIBS) {
- if (index > 0)
- index += VERT_ATTRIB_GENERIC0;
- DISPATCH_ATTR4FV( index, v );
- }
- else
- enum_error();
-}
-
-static void GLAPIENTRY
-_save_VertexAttrib1fARB(GLuint index, GLfloat x)
-{
- if (index < MAX_VERTEX_ATTRIBS) {
- if (index > 0)
- index += VERT_ATTRIB_GENERIC0;
- DISPATCH_ATTR1F( index, x );
- }
- else
- enum_error();
-}
-
-static void GLAPIENTRY
-_save_VertexAttrib1fvARB(GLuint index, const GLfloat *v)
-{
- if (index < MAX_VERTEX_ATTRIBS) {
- if (index > 0)
- index += VERT_ATTRIB_GENERIC0;
- DISPATCH_ATTR1FV( index, v );
- }
- else
- enum_error();
-}
-
-static void GLAPIENTRY
-_save_VertexAttrib2fARB(GLuint index, GLfloat x, GLfloat y)
-{
- if (index < MAX_VERTEX_ATTRIBS) {
- if (index > 0)
- index += VERT_ATTRIB_GENERIC0;
- DISPATCH_ATTR2F( index, x, y );
- }
- else
- enum_error();
-}
-
-static void GLAPIENTRY
-_save_VertexAttrib2fvARB(GLuint index, const GLfloat *v)
-{
- if (index < MAX_VERTEX_ATTRIBS) {
- if (index > 0)
- index += VERT_ATTRIB_GENERIC0;
- DISPATCH_ATTR2FV( index, v );
- }
- else
- enum_error();
-}
-
-static void GLAPIENTRY
-_save_VertexAttrib3fARB(GLuint index, GLfloat x, GLfloat y, GLfloat z)
-{
- if (index < MAX_VERTEX_ATTRIBS) {
- if (index > 0)
- index += VERT_ATTRIB_GENERIC0;
- DISPATCH_ATTR3F( index, x, y, z );
- }
- else
- enum_error();
-}
-
-static void GLAPIENTRY
-_save_VertexAttrib3fvARB(GLuint index, const GLfloat *v)
-{
- if (index < MAX_VERTEX_ATTRIBS) {
- if (index > 0)
- index += VERT_ATTRIB_GENERIC0;
- DISPATCH_ATTR3FV( index, v );
- }
- else
- enum_error();
-}
-
-static void GLAPIENTRY
-_save_VertexAttrib4fARB(GLuint index, GLfloat x, GLfloat y,
- GLfloat z, GLfloat w)
-{
- if (index < MAX_VERTEX_ATTRIBS) {
- if (index > 0)
- index += VERT_ATTRIB_GENERIC0;
- DISPATCH_ATTR4F( index, x, y, z, w );
- }
- else
- enum_error();
-}
-
-static void GLAPIENTRY
-_save_VertexAttrib4fvARB(GLuint index, const GLfloat *v)
-{
- if (index < MAX_VERTEX_ATTRIBS) {
- if (index > 0)
- index += VERT_ATTRIB_GENERIC0;
- DISPATCH_ATTR4FV( index, v );
- }
- else
- enum_error();
-}
-
-
-/* Materials:
- *
- * These are treated as per-vertex attributes, at indices above where
- * the NV_vertex_program leaves off. There are a lot of good things
- * about treating materials this way.
- *
- * However: I don't want to double the number of generated functions
- * just to cope with this, so I unroll the 'C' varients of CHOOSE and
- * ATTRF into this function, and dispense with codegen and
- * second-level dispatch.
- *
- * There is no aliasing of material attributes with other entrypoints.
- */
-#define MAT_ATTR( A, N, params ) \
-do { \
- if (tnl->save.attrsz[A] < N) { \
- _save_upgrade_vertex( ctx, A, N ); \
- tnl->save.have_materials = GL_TRUE; \
- } \
- \
- { \
- GLfloat *dest = tnl->save.attrptr[A]; \
- if (N>0) dest[0] = params[0]; \
- if (N>1) dest[1] = params[1]; \
- if (N>2) dest[2] = params[2]; \
- if (N>3) dest[3] = params[3]; \
- } \
-} while (0)
-
-
-#define MAT( ATTR, N, face, params ) \
-do { \
- if (face != GL_BACK) \
- MAT_ATTR( ATTR, N, params ); /* front */ \
- if (face != GL_FRONT) \
- MAT_ATTR( ATTR + 1, N, params ); /* back */ \
-} while (0)
-
-
-/* NOTE: Have to remove/deal-with colormaterial crossovers, probably
- * later on - in the meantime just store everything.
- */
-static void GLAPIENTRY _save_Materialfv( GLenum face, GLenum pname,
- const GLfloat *params )
-{
- GET_CURRENT_CONTEXT( ctx );
- TNLcontext *tnl = TNL_CONTEXT(ctx);
-
- switch (pname) {
- case GL_EMISSION:
- MAT( _TNL_ATTRIB_MAT_FRONT_EMISSION, 4, face, params );
- break;
- case GL_AMBIENT:
- MAT( _TNL_ATTRIB_MAT_FRONT_AMBIENT, 4, face, params );
- break;
- case GL_DIFFUSE:
- MAT( _TNL_ATTRIB_MAT_FRONT_DIFFUSE, 4, face, params );
- break;
- case GL_SPECULAR:
- MAT( _TNL_ATTRIB_MAT_FRONT_SPECULAR, 4, face, params );
- break;
- case GL_SHININESS:
- MAT( _TNL_ATTRIB_MAT_FRONT_SHININESS, 1, face, params );
- break;
- case GL_COLOR_INDEXES:
- MAT( _TNL_ATTRIB_MAT_FRONT_INDEXES, 3, face, params );
- break;
- case GL_AMBIENT_AND_DIFFUSE:
- MAT( _TNL_ATTRIB_MAT_FRONT_AMBIENT, 4, face, params );
- MAT( _TNL_ATTRIB_MAT_FRONT_DIFFUSE, 4, face, params );
- break;
- default:
- _mesa_compile_error( ctx, GL_INVALID_ENUM, "glMaterialfv" );
- return;
- }
-}
-
-
-#define IDX_ATTR( A, IDX ) \
-do { \
- GET_CURRENT_CONTEXT( ctx ); \
- TNLcontext *tnl = TNL_CONTEXT(ctx); \
- \
- if (tnl->save.attrsz[A] < 1) { \
- _save_upgrade_vertex( ctx, A, 1 ); \
- } \
- \
- { \
- GLfloat *dest = tnl->save.attrptr[A]; \
- dest[0] = IDX; \
- } \
-} while (0)
-
-
-static void GLAPIENTRY _save_EdgeFlag( GLboolean b )
-{
- IDX_ATTR( _TNL_ATTRIB_EDGEFLAG, (GLfloat)b );
-}
-
-
-static void GLAPIENTRY _save_Indexf( GLfloat f )
-{
- IDX_ATTR( _TNL_ATTRIB_COLOR_INDEX, f );
-}
-
-static void GLAPIENTRY _save_Indexfv( const GLfloat *f )
-{
- IDX_ATTR( _TNL_ATTRIB_COLOR_INDEX, f[0] );
-}
-
-
-
-
-/* Cope with EvalCoord/CallList called within a begin/end object:
- * -- Flush current buffer
- * -- Fallback to opcodes for the rest of the begin/end object.
- */
-#define FALLBACK(ctx) \
-do { \
- TNLcontext *tnl = TNL_CONTEXT(ctx); \
- \
- if (tnl->save.initial_counter != tnl->save.counter || \
- tnl->save.prim_count) \
- _save_compile_vertex_list( ctx ); \
- \
- _save_copy_to_current( ctx ); \
- _save_reset_vertex( ctx ); \
- _mesa_install_save_vtxfmt( ctx, &ctx->ListState.ListVtxfmt ); \
- ctx->Driver.SaveNeedFlush = 0; \
-} while (0)
-
-static void GLAPIENTRY _save_EvalCoord1f( GLfloat u )
-{
- GET_CURRENT_CONTEXT(ctx);
- FALLBACK(ctx);
- CALL_EvalCoord1f(ctx->Save, ( u ));
-}
-
-static void GLAPIENTRY _save_EvalCoord1fv( const GLfloat *v )
-{
- GET_CURRENT_CONTEXT(ctx);
- FALLBACK(ctx);
- CALL_EvalCoord1fv(ctx->Save, ( v ));
-}
-
-static void GLAPIENTRY _save_EvalCoord2f( GLfloat u, GLfloat v )
-{
- GET_CURRENT_CONTEXT(ctx);
- FALLBACK(ctx);
- CALL_EvalCoord2f(ctx->Save, ( u, v ));
-}
-
-static void GLAPIENTRY _save_EvalCoord2fv( const GLfloat *v )
-{
- GET_CURRENT_CONTEXT(ctx);
- FALLBACK(ctx);
- CALL_EvalCoord2fv(ctx->Save, ( v ));
-}
-
-static void GLAPIENTRY _save_EvalPoint1( GLint i )
-{
- GET_CURRENT_CONTEXT(ctx);
- FALLBACK(ctx);
- CALL_EvalPoint1(ctx->Save, ( i ));
-}
-
-static void GLAPIENTRY _save_EvalPoint2( GLint i, GLint j )
-{
- GET_CURRENT_CONTEXT(ctx);
- FALLBACK(ctx);
- CALL_EvalPoint2(ctx->Save, ( i, j ));
-}
-
-static void GLAPIENTRY _save_CallList( GLuint l )
-{
- GET_CURRENT_CONTEXT(ctx);
- FALLBACK(ctx);
- CALL_CallList(ctx->Save, ( l ));
-}
-
-static void GLAPIENTRY _save_CallLists( GLsizei n, GLenum type, const GLvoid *v )
-{
- GET_CURRENT_CONTEXT(ctx);
- FALLBACK(ctx);
- CALL_CallLists(ctx->Save, ( n, type, v ));
-}
-
-
-
-
-/**
- * Called via ctx->Driver.NotifySaveBegin(ctx, mode) when we get a
- * glBegin() call while compiling a display list.
- * See save_Begin() in dlist.c
- *
- * This plugs in our special TNL-related display list functions.
- * All subsequent glBegin/glVertex/glEnd()s found while compiling a
- * display list will get routed to the functions in this file.
- *
- * Updating of ctx->Driver.CurrentSavePrimitive is already taken care of.
- */
-static GLboolean _save_NotifyBegin( GLcontext *ctx, GLenum mode )
-{
- TNLcontext *tnl = TNL_CONTEXT(ctx);
-
- if (1) {
- GLuint i = tnl->save.prim_count++;
-
- assert(i < tnl->save.prim_max);
- tnl->save.prim[i].mode = mode | PRIM_BEGIN;
- tnl->save.prim[i].start = tnl->save.initial_counter - tnl->save.counter;
- tnl->save.prim[i].count = 0;
-
- _mesa_install_save_vtxfmt( ctx, &tnl->save_vtxfmt );
- ctx->Driver.SaveNeedFlush = 1;
- return GL_TRUE;
- }
- else
- return GL_FALSE;
-}
-
-
-
-static void GLAPIENTRY _save_End( void )
-{
- GET_CURRENT_CONTEXT( ctx );
- TNLcontext *tnl = TNL_CONTEXT(ctx);
- GLint i = tnl->save.prim_count - 1;
-
- ctx->Driver.CurrentSavePrimitive = PRIM_OUTSIDE_BEGIN_END;
- if (ctx->ExecuteFlag)
- ctx->Driver.CurrentExecPrimitive = PRIM_OUTSIDE_BEGIN_END;
-
- tnl->save.prim[i].mode |= PRIM_END;
- tnl->save.prim[i].count = ((tnl->save.initial_counter - tnl->save.counter) -
- tnl->save.prim[i].start);
-
- if (i == (GLint) tnl->save.prim_max - 1) {
- _save_compile_vertex_list( ctx );
- assert(tnl->save.copied.nr == 0);
- }
-
- /* Swap out this vertex format while outside begin/end. Any color,
- * etc. received between here and the next begin will be compiled
- * as opcodes.
- */
- _mesa_install_save_vtxfmt( ctx, &ctx->ListState.ListVtxfmt );
-}
-
-
-/* These are all errors as this vtxfmt is only installed inside
- * begin/end pairs.
- */
-static void GLAPIENTRY _save_DrawElements(GLenum mode, GLsizei count, GLenum type,
- const GLvoid *indices)
-{
- GET_CURRENT_CONTEXT(ctx);
- (void) mode; (void) count; (void) type; (void) indices;
- _mesa_compile_error( ctx, GL_INVALID_OPERATION, "glDrawElements" );
-}
-
-
-static void GLAPIENTRY _save_DrawRangeElements(GLenum mode,
- GLuint start, GLuint end,
- GLsizei count, GLenum type,
- const GLvoid *indices)
-{
- GET_CURRENT_CONTEXT(ctx);
- (void) mode; (void) start; (void) end; (void) count; (void) type; (void) indices;
- _mesa_compile_error( ctx, GL_INVALID_OPERATION, "glDrawRangeElements" );
-}
-
-static void GLAPIENTRY _save_DrawArrays(GLenum mode, GLint start, GLsizei count)
-{
- GET_CURRENT_CONTEXT(ctx);
- (void) mode; (void) start; (void) count;
- _mesa_compile_error( ctx, GL_INVALID_OPERATION, "glDrawArrays" );
-}
-
-static void GLAPIENTRY _save_Rectf( GLfloat x1, GLfloat y1, GLfloat x2, GLfloat y2 )
-{
- GET_CURRENT_CONTEXT(ctx);
- (void) x1; (void) y1; (void) x2; (void) y2;
- _mesa_compile_error( ctx, GL_INVALID_OPERATION, "glRectf" );
-}
-
-static void GLAPIENTRY _save_EvalMesh1( GLenum mode, GLint i1, GLint i2 )
-{
- GET_CURRENT_CONTEXT(ctx);
- (void) mode; (void) i1; (void) i2;
- _mesa_compile_error( ctx, GL_INVALID_OPERATION, "glEvalMesh1" );
-}
-
-static void GLAPIENTRY _save_EvalMesh2( GLenum mode, GLint i1, GLint i2,
- GLint j1, GLint j2 )
-{
- GET_CURRENT_CONTEXT(ctx);
- (void) mode; (void) i1; (void) i2; (void) j1; (void) j2;
- _mesa_compile_error( ctx, GL_INVALID_OPERATION, "glEvalMesh2" );
-}
-
-/**
- * This is only called if someone tries to compile nested glBegin()s
- * in their display list.
- */
-static void GLAPIENTRY _save_Begin( GLenum mode )
-{
- GET_CURRENT_CONTEXT( ctx );
- (void) mode;
- _mesa_compile_error(ctx, GL_INVALID_OPERATION,
- "glBegin(called inside glBegin/End)");
-}
-
-
-/* Unlike the functions above, these are to be hooked into the vtxfmt
- * maintained in ctx->ListState, active when the list is known or
- * suspected to be outside any begin/end primitive.
- */
-static void GLAPIENTRY _save_OBE_Rectf( GLfloat x1, GLfloat y1, GLfloat x2, GLfloat y2 )
-{
- GET_CURRENT_CONTEXT(ctx);
- _save_NotifyBegin( ctx, GL_QUADS | PRIM_WEAK );
- CALL_Vertex2f(GET_DISPATCH(), ( x1, y1 ));
- CALL_Vertex2f(GET_DISPATCH(), ( x2, y1 ));
- CALL_Vertex2f(GET_DISPATCH(), ( x2, y2 ));
- CALL_Vertex2f(GET_DISPATCH(), ( x1, y2 ));
- CALL_End(GET_DISPATCH(), ());
-}
-
-
-static void GLAPIENTRY _save_OBE_DrawArrays(GLenum mode, GLint start, GLsizei count)
-{
- GET_CURRENT_CONTEXT(ctx);
- GLint i;
-
- if (!_mesa_validate_DrawArrays( ctx, mode, start, count ))
- return;
-
- _ae_map_vbos( ctx );
-
- _save_NotifyBegin( ctx, mode | PRIM_WEAK );
- for (i = 0; i < count; i++)
- CALL_ArrayElement(GET_DISPATCH(), (start + i));
- CALL_End(GET_DISPATCH(), ());
-
- _ae_unmap_vbos( ctx );
-}
-
-
-static void GLAPIENTRY _save_OBE_DrawElements(GLenum mode, GLsizei count, GLenum type,
- const GLvoid *indices)
-{
- GET_CURRENT_CONTEXT(ctx);
- GLint i;
-
- if (!_mesa_validate_DrawElements( ctx, mode, count, type, indices ))
- return;
-
- _ae_map_vbos( ctx );
-
- _save_NotifyBegin( ctx, mode | PRIM_WEAK );
-
- switch (type) {
- case GL_UNSIGNED_BYTE:
- for (i = 0 ; i < count ; i++)
- CALL_ArrayElement(GET_DISPATCH(), ( ((GLubyte *)indices)[i] ));
- break;
- case GL_UNSIGNED_SHORT:
- for (i = 0 ; i < count ; i++)
- CALL_ArrayElement(GET_DISPATCH(), ( ((GLushort *)indices)[i] ));
- break;
- case GL_UNSIGNED_INT:
- for (i = 0 ; i < count ; i++)
- CALL_ArrayElement(GET_DISPATCH(), ( ((GLuint *)indices)[i] ));
- break;
- default:
- _mesa_error( ctx, GL_INVALID_ENUM, "glDrawElements(type)" );
- break;
- }
-
- CALL_End(GET_DISPATCH(), ());
-
- _ae_unmap_vbos( ctx );
-}
-
-static void GLAPIENTRY _save_OBE_DrawRangeElements(GLenum mode,
- GLuint start, GLuint end,
- GLsizei count, GLenum type,
- const GLvoid *indices)
-{
- GET_CURRENT_CONTEXT(ctx);
- if (_mesa_validate_DrawRangeElements( ctx, mode,
- start, end,
- count, type, indices ))
- _save_OBE_DrawElements( mode, count, type, indices );
-}
-
-
-
-
-
-static void _save_vtxfmt_init( GLcontext *ctx )
-{
- TNLcontext *tnl = TNL_CONTEXT(ctx);
- GLvertexformat *vfmt = &tnl->save_vtxfmt;
-
- vfmt->ArrayElement = _ae_loopback_array_elt; /* generic helper */
- vfmt->Begin = _save_Begin;
- vfmt->Color3f = _save_Color3f;
- vfmt->Color3fv = _save_Color3fv;
- vfmt->Color4f = _save_Color4f;
- vfmt->Color4fv = _save_Color4fv;
- vfmt->EdgeFlag = _save_EdgeFlag;
- vfmt->End = _save_End;
- vfmt->FogCoordfEXT = _save_FogCoordfEXT;
- vfmt->FogCoordfvEXT = _save_FogCoordfvEXT;
- vfmt->Indexf = _save_Indexf;
- vfmt->Indexfv = _save_Indexfv;
- vfmt->Materialfv = _save_Materialfv;
- vfmt->MultiTexCoord1fARB = _save_MultiTexCoord1f;
- vfmt->MultiTexCoord1fvARB = _save_MultiTexCoord1fv;
- vfmt->MultiTexCoord2fARB = _save_MultiTexCoord2f;
- vfmt->MultiTexCoord2fvARB = _save_MultiTexCoord2fv;
- vfmt->MultiTexCoord3fARB = _save_MultiTexCoord3f;
- vfmt->MultiTexCoord3fvARB = _save_MultiTexCoord3fv;
- vfmt->MultiTexCoord4fARB = _save_MultiTexCoord4f;
- vfmt->MultiTexCoord4fvARB = _save_MultiTexCoord4fv;
- vfmt->Normal3f = _save_Normal3f;
- vfmt->Normal3fv = _save_Normal3fv;
- vfmt->SecondaryColor3fEXT = _save_SecondaryColor3fEXT;
- vfmt->SecondaryColor3fvEXT = _save_SecondaryColor3fvEXT;
- vfmt->TexCoord1f = _save_TexCoord1f;
- vfmt->TexCoord1fv = _save_TexCoord1fv;
- vfmt->TexCoord2f = _save_TexCoord2f;
- vfmt->TexCoord2fv = _save_TexCoord2fv;
- vfmt->TexCoord3f = _save_TexCoord3f;
- vfmt->TexCoord3fv = _save_TexCoord3fv;
- vfmt->TexCoord4f = _save_TexCoord4f;
- vfmt->TexCoord4fv = _save_TexCoord4fv;
- vfmt->Vertex2f = _save_Vertex2f;
- vfmt->Vertex2fv = _save_Vertex2fv;
- vfmt->Vertex3f = _save_Vertex3f;
- vfmt->Vertex3fv = _save_Vertex3fv;
- vfmt->Vertex4f = _save_Vertex4f;
- vfmt->Vertex4fv = _save_Vertex4fv;
- vfmt->VertexAttrib1fNV = _save_VertexAttrib1fNV;
- vfmt->VertexAttrib1fvNV = _save_VertexAttrib1fvNV;
- vfmt->VertexAttrib2fNV = _save_VertexAttrib2fNV;
- vfmt->VertexAttrib2fvNV = _save_VertexAttrib2fvNV;
- vfmt->VertexAttrib3fNV = _save_VertexAttrib3fNV;
- vfmt->VertexAttrib3fvNV = _save_VertexAttrib3fvNV;
- vfmt->VertexAttrib4fNV = _save_VertexAttrib4fNV;
- vfmt->VertexAttrib4fvNV = _save_VertexAttrib4fvNV;
- vfmt->VertexAttrib1fARB = _save_VertexAttrib1fARB;
- vfmt->VertexAttrib1fvARB = _save_VertexAttrib1fvARB;
- vfmt->VertexAttrib2fARB = _save_VertexAttrib2fARB;
- vfmt->VertexAttrib2fvARB = _save_VertexAttrib2fvARB;
- vfmt->VertexAttrib3fARB = _save_VertexAttrib3fARB;
- vfmt->VertexAttrib3fvARB = _save_VertexAttrib3fvARB;
- vfmt->VertexAttrib4fARB = _save_VertexAttrib4fARB;
- vfmt->VertexAttrib4fvARB = _save_VertexAttrib4fvARB;
-
- /* This will all require us to fallback to saving the list as opcodes:
- */
- vfmt->CallList = _save_CallList; /* inside begin/end */
- vfmt->CallLists = _save_CallLists; /* inside begin/end */
- vfmt->EvalCoord1f = _save_EvalCoord1f;
- vfmt->EvalCoord1fv = _save_EvalCoord1fv;
- vfmt->EvalCoord2f = _save_EvalCoord2f;
- vfmt->EvalCoord2fv = _save_EvalCoord2fv;
- vfmt->EvalPoint1 = _save_EvalPoint1;
- vfmt->EvalPoint2 = _save_EvalPoint2;
-
- /* These are all errors as we at least know we are in some sort of
- * begin/end pair:
- */
- vfmt->EvalMesh1 = _save_EvalMesh1;
- vfmt->EvalMesh2 = _save_EvalMesh2;
- vfmt->Begin = _save_Begin;
- vfmt->Rectf = _save_Rectf;
- vfmt->DrawArrays = _save_DrawArrays;
- vfmt->DrawElements = _save_DrawElements;
- vfmt->DrawRangeElements = _save_DrawRangeElements;
-
-}
-
-
-void _tnl_SaveFlushVertices( GLcontext *ctx )
-{
- TNLcontext *tnl = TNL_CONTEXT(ctx);
-
- /* Noop when we are actually active:
- */
- if (ctx->Driver.CurrentSavePrimitive == PRIM_INSIDE_UNKNOWN_PRIM ||
- ctx->Driver.CurrentSavePrimitive <= GL_POLYGON)
- return;
-
- if (tnl->save.initial_counter != tnl->save.counter ||
- tnl->save.prim_count)
- _save_compile_vertex_list( ctx );
-
- _save_copy_to_current( ctx );
- _save_reset_vertex( ctx );
- ctx->Driver.SaveNeedFlush = 0;
-}
-
-void _tnl_NewList( GLcontext *ctx, GLuint list, GLenum mode )
-{
- TNLcontext *tnl = TNL_CONTEXT(ctx);
-
- (void) list; (void) mode;
-
- if (!tnl->save.prim_store)
- tnl->save.prim_store = alloc_prim_store( ctx );
-
- if (!tnl->save.vertex_store) {
- tnl->save.vertex_store = alloc_vertex_store( ctx );
- tnl->save.vbptr = tnl->save.vertex_store->buffer;
- }
-
- _save_reset_vertex( ctx );
- ctx->Driver.SaveNeedFlush = 0;
-}
-
-void _tnl_EndList( GLcontext *ctx )
-{
- (void) ctx;
- assert(TNL_CONTEXT(ctx)->save.vertex_size == 0);
-}
-
-void _tnl_BeginCallList( GLcontext *ctx, struct mesa_display_list *dlist )
-{
- TNLcontext *tnl = TNL_CONTEXT(ctx);
- tnl->save.replay_flags |= dlist->flags;
- tnl->save.replay_flags |= tnl->LoopbackDListCassettes;
-}
-
-void _tnl_EndCallList( GLcontext *ctx )
-{
- TNLcontext *tnl = TNL_CONTEXT(ctx);
-
- if (ctx->ListState.CallDepth == 1)
- tnl->save.replay_flags = 0;
-}
-
-
-static void _tnl_destroy_vertex_list( GLcontext *ctx, void *data )
-{
- struct tnl_vertex_list *node = (struct tnl_vertex_list *)data;
- (void) ctx;
-
- if ( --node->vertex_store->refcount == 0 )
- FREE( node->vertex_store );
-
- if ( --node->prim_store->refcount == 0 )
- FREE( node->prim_store );
-
- if ( node->normal_lengths )
- FREE( node->normal_lengths );
-}
-
-
-static void _tnl_print_vertex_list( GLcontext *ctx, void *data )
-{
- struct tnl_vertex_list *node = (struct tnl_vertex_list *)data;
- GLuint i;
- (void) ctx;
-
- _mesa_debug(NULL, "TNL-VERTEX-LIST, %u vertices %d primitives, %d vertsize\n",
- node->count,
- node->prim_count,
- node->vertex_size);
-
- for (i = 0 ; i < node->prim_count ; i++) {
- struct tnl_prim *prim = &node->prim[i];
- _mesa_debug(NULL, " prim %d: %s %d..%d %s %s\n",
- i,
- _mesa_lookup_enum_by_nr(prim->mode & PRIM_MODE_MASK),
- prim->start,
- prim->start + prim->count,
- (prim->mode & PRIM_BEGIN) ? "BEGIN" : "(wrap)",
- (prim->mode & PRIM_END) ? "END" : "(wrap)");
- }
-}
-
-
-static void _save_current_init( GLcontext *ctx )
-{
- TNLcontext *tnl = TNL_CONTEXT(ctx);
- GLint i;
-
- for (i = 0; i < _TNL_ATTRIB_MAT_FRONT_AMBIENT; i++) {
- ASSERT(i < VERT_ATTRIB_MAX);
- tnl->save.currentsz[i] = &ctx->ListState.ActiveAttribSize[i];
- tnl->save.current[i] = ctx->ListState.CurrentAttrib[i];
- }
-
- for (i = _TNL_FIRST_MAT; i <= _TNL_LAST_MAT; i++) {
- const GLuint j = i - _TNL_FIRST_MAT;
- ASSERT(j < MAT_ATTRIB_MAX);
- tnl->save.currentsz[i] = &ctx->ListState.ActiveMaterialSize[j];
- tnl->save.current[i] = ctx->ListState.CurrentMaterial[j];
- }
-
- tnl->save.currentsz[_TNL_ATTRIB_EDGEFLAG] = &ctx->ListState.ActiveEdgeFlag;
- tnl->save.current[_TNL_ATTRIB_EDGEFLAG] = &tnl->save.CurrentFloatEdgeFlag;
-}
-
-/**
- * Initialize the display list compiler
- */
-void _tnl_save_init( GLcontext *ctx )
-{
- TNLcontext *tnl = TNL_CONTEXT(ctx);
- struct tnl_vertex_arrays *tmp = &tnl->save_inputs;
- GLuint i;
-
-
- for (i = 0; i < _TNL_ATTRIB_MAX; i++)
- _mesa_vector4f_init( &tmp->Attribs[i], 0, NULL);
-
- tnl->save.opcode_vertex_list =
- _mesa_alloc_opcode( ctx,
- sizeof(struct tnl_vertex_list),
- _tnl_playback_vertex_list,
- _tnl_destroy_vertex_list,
- _tnl_print_vertex_list );
-
- ctx->Driver.NotifySaveBegin = _save_NotifyBegin;
-
- _save_vtxfmt_init( ctx );
- _save_current_init( ctx );
-
- /* Hook our array functions into the outside-begin-end vtxfmt in
- * ctx->ListState.
- */
- ctx->ListState.ListVtxfmt.Rectf = _save_OBE_Rectf;
- ctx->ListState.ListVtxfmt.DrawArrays = _save_OBE_DrawArrays;
- ctx->ListState.ListVtxfmt.DrawElements = _save_OBE_DrawElements;
- ctx->ListState.ListVtxfmt.DrawRangeElements = _save_OBE_DrawRangeElements;
- _mesa_install_save_vtxfmt( ctx, &ctx->ListState.ListVtxfmt );
-}
-
-
-/**
- * Deallocate the immediate-mode buffer for the given context, if
- * its reference count goes to zero.
- */
-void _tnl_save_destroy( GLcontext *ctx )
-{
- TNLcontext *tnl = TNL_CONTEXT(ctx);
-
- /* Decrement the refcounts. References may still be held by
- * display lists yet to be destroyed, so it may not yet be time to
- * free these items.
- */
- if (tnl->save.prim_store &&
- --tnl->save.prim_store->refcount == 0 )
- FREE( tnl->save.prim_store );
-
- if (tnl->save.vertex_store &&
- --tnl->save.vertex_store->refcount == 0 )
- FREE( tnl->save.vertex_store );
-}
diff --git a/src/mesa/vbo/vbo_exec_api.c b/src/mesa/vbo/vbo_exec_api.c
index 8d13ef9d081..2d4ded0f984 100644
--- a/src/mesa/vbo/vbo_exec_api.c
+++ b/src/mesa/vbo/vbo_exec_api.c
@@ -43,6 +43,11 @@ USE OR OTHER DEALINGS IN THE SOFTWARE.
#include "vbo_context.h"
+#ifdef ERROR
+#undef ERROR
+#endif
+
+
static void reset_attrfv( struct vbo_exec_context *exec );
diff --git a/src/mesa/vbo/vbo_save_api.c b/src/mesa/vbo/vbo_save_api.c
index c08fd1fe555..e7794c2a6cc 100644
--- a/src/mesa/vbo/vbo_save_api.c
+++ b/src/mesa/vbo/vbo_save_api.c
@@ -80,6 +80,10 @@ USE OR OTHER DEALINGS IN THE SOFTWARE.
#include "vbo_context.h"
+#ifdef ERROR
+#undef ERROR
+#endif
+
/*
* NOTE: Old 'parity' issue is gone, but copying can still be
diff --git a/src/mesa/x86-64/glapi_x86-64.S b/src/mesa/x86-64/glapi_x86-64.S
index eb54ba4848f..75366e4d305 100644
--- a/src/mesa/x86-64/glapi_x86-64.S
+++ b/src/mesa/x86-64/glapi_x86-64.S
@@ -29353,12 +29353,17 @@ GL_PREFIX(_dispatch_stub_771):
.globl GL_PREFIX(VertexAttrib4Nubv) ; .set GL_PREFIX(VertexAttrib4Nubv), GL_PREFIX(VertexAttrib4NubvARB)
.globl GL_PREFIX(VertexAttrib4Nuiv) ; .set GL_PREFIX(VertexAttrib4Nuiv), GL_PREFIX(VertexAttrib4NuivARB)
.globl GL_PREFIX(VertexAttrib4Nusv) ; .set GL_PREFIX(VertexAttrib4Nusv), GL_PREFIX(VertexAttrib4NusvARB)
+ .globl GL_PREFIX(VertexAttrib4bv) ; .set GL_PREFIX(VertexAttrib4bv), GL_PREFIX(VertexAttrib4bvARB)
.globl GL_PREFIX(VertexAttrib4d) ; .set GL_PREFIX(VertexAttrib4d), GL_PREFIX(VertexAttrib4dARB)
.globl GL_PREFIX(VertexAttrib4dv) ; .set GL_PREFIX(VertexAttrib4dv), GL_PREFIX(VertexAttrib4dvARB)
.globl GL_PREFIX(VertexAttrib4f) ; .set GL_PREFIX(VertexAttrib4f), GL_PREFIX(VertexAttrib4fARB)
.globl GL_PREFIX(VertexAttrib4fv) ; .set GL_PREFIX(VertexAttrib4fv), GL_PREFIX(VertexAttrib4fvARB)
+ .globl GL_PREFIX(VertexAttrib4iv) ; .set GL_PREFIX(VertexAttrib4iv), GL_PREFIX(VertexAttrib4ivARB)
.globl GL_PREFIX(VertexAttrib4s) ; .set GL_PREFIX(VertexAttrib4s), GL_PREFIX(VertexAttrib4sARB)
.globl GL_PREFIX(VertexAttrib4sv) ; .set GL_PREFIX(VertexAttrib4sv), GL_PREFIX(VertexAttrib4svARB)
+ .globl GL_PREFIX(VertexAttrib4ubv) ; .set GL_PREFIX(VertexAttrib4ubv), GL_PREFIX(VertexAttrib4ubvARB)
+ .globl GL_PREFIX(VertexAttrib4uiv) ; .set GL_PREFIX(VertexAttrib4uiv), GL_PREFIX(VertexAttrib4uivARB)
+ .globl GL_PREFIX(VertexAttrib4usv) ; .set GL_PREFIX(VertexAttrib4usv), GL_PREFIX(VertexAttrib4usvARB)
.globl GL_PREFIX(VertexAttribPointer) ; .set GL_PREFIX(VertexAttribPointer), GL_PREFIX(VertexAttribPointerARB)
.globl GL_PREFIX(BindBuffer) ; .set GL_PREFIX(BindBuffer), GL_PREFIX(BindBufferARB)
.globl GL_PREFIX(BufferData) ; .set GL_PREFIX(BufferData), GL_PREFIX(BufferDataARB)
diff --git a/src/mesa/x86/common_x86.c b/src/mesa/x86/common_x86.c
index 889b40a89f2..0b2af0a3706 100644
--- a/src/mesa/x86/common_x86.c
+++ b/src/mesa/x86/common_x86.c
@@ -104,12 +104,7 @@ static LONG WINAPI ExceptionFilter(LPEXCEPTION_POINTERS exp)
static void check_os_sse_support( void )
{
-#if defined(__linux__)
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,4,0)
- _mesa_debug(NULL, "Cannot safely enable SSE on pre-2.4 kernels.\n");
- _mesa_x86_cpu_features &= ~(X86_FEATURE_XMM);
-#endif
-#elif defined(__FreeBSD__)
+#if defined(__FreeBSD__)
{
int ret, enabled;
unsigned int len;
@@ -160,7 +155,7 @@ static void check_os_sse_support( void )
/* Do nothing on other platforms for now.
*/
_mesa_debug(NULL, "Not testing OS support for SSE, leaving enabled.\n");
-#endif /* __linux__ */
+#endif /* __FreeBSD__ */
}
#endif /* USE_SSE_ASM */
diff --git a/src/mesa/x86/glapi_x86.S b/src/mesa/x86/glapi_x86.S
index 2ffb21bcf5a..9e19e38697c 100644
--- a/src/mesa/x86/glapi_x86.S
+++ b/src/mesa/x86/glapi_x86.S
@@ -1128,12 +1128,17 @@ GLNAME(gl_dispatch_functions_start):
GL_STUB_ALIAS(VertexAttrib4Nubv, _gloffset_VertexAttrib4NubvARB, VertexAttrib4Nubv@8, VertexAttrib4NubvARB, VertexAttrib4NubvARB@8)
GL_STUB_ALIAS(VertexAttrib4Nuiv, _gloffset_VertexAttrib4NuivARB, VertexAttrib4Nuiv@8, VertexAttrib4NuivARB, VertexAttrib4NuivARB@8)
GL_STUB_ALIAS(VertexAttrib4Nusv, _gloffset_VertexAttrib4NusvARB, VertexAttrib4Nusv@8, VertexAttrib4NusvARB, VertexAttrib4NusvARB@8)
+ GL_STUB_ALIAS(VertexAttrib4bv, _gloffset_VertexAttrib4bvARB, VertexAttrib4bv@8, VertexAttrib4bvARB, VertexAttrib4bvARB@8)
GL_STUB_ALIAS(VertexAttrib4d, _gloffset_VertexAttrib4dARB, VertexAttrib4d@36, VertexAttrib4dARB, VertexAttrib4dARB@36)
GL_STUB_ALIAS(VertexAttrib4dv, _gloffset_VertexAttrib4dvARB, VertexAttrib4dv@8, VertexAttrib4dvARB, VertexAttrib4dvARB@8)
GL_STUB_ALIAS(VertexAttrib4f, _gloffset_VertexAttrib4fARB, VertexAttrib4f@20, VertexAttrib4fARB, VertexAttrib4fARB@20)
GL_STUB_ALIAS(VertexAttrib4fv, _gloffset_VertexAttrib4fvARB, VertexAttrib4fv@8, VertexAttrib4fvARB, VertexAttrib4fvARB@8)
+ GL_STUB_ALIAS(VertexAttrib4iv, _gloffset_VertexAttrib4ivARB, VertexAttrib4iv@8, VertexAttrib4ivARB, VertexAttrib4ivARB@8)
GL_STUB_ALIAS(VertexAttrib4s, _gloffset_VertexAttrib4sARB, VertexAttrib4s@20, VertexAttrib4sARB, VertexAttrib4sARB@20)
GL_STUB_ALIAS(VertexAttrib4sv, _gloffset_VertexAttrib4svARB, VertexAttrib4sv@8, VertexAttrib4svARB, VertexAttrib4svARB@8)
+ GL_STUB_ALIAS(VertexAttrib4ubv, _gloffset_VertexAttrib4ubvARB, VertexAttrib4ubv@8, VertexAttrib4ubvARB, VertexAttrib4ubvARB@8)
+ GL_STUB_ALIAS(VertexAttrib4uiv, _gloffset_VertexAttrib4uivARB, VertexAttrib4uiv@8, VertexAttrib4uivARB, VertexAttrib4uivARB@8)
+ GL_STUB_ALIAS(VertexAttrib4usv, _gloffset_VertexAttrib4usvARB, VertexAttrib4usv@8, VertexAttrib4usvARB, VertexAttrib4usvARB@8)
GL_STUB_ALIAS(VertexAttribPointer, _gloffset_VertexAttribPointerARB, VertexAttribPointer@24, VertexAttribPointerARB, VertexAttribPointerARB@24)
GL_STUB_ALIAS(BindBuffer, _gloffset_BindBufferARB, BindBuffer@8, BindBufferARB, BindBufferARB@8)
GL_STUB_ALIAS(BufferData, _gloffset_BufferDataARB, BufferData@16, BufferDataARB, BufferDataARB@16)
diff --git a/windows/VC6/mesa/mesa/mesa.dsp b/windows/VC6/mesa/mesa/mesa.dsp
index a2f2f2dff4f..7c7f72840dc 100644
--- a/windows/VC6/mesa/mesa/mesa.dsp
+++ b/windows/VC6/mesa/mesa/mesa.dsp
@@ -673,39 +673,15 @@ SOURCE=..\..\..\..\src\mesa\main\stencil.c
# End Source File
# Begin Source File
-SOURCE=..\..\..\..\src\mesa\tnl\t_array_api.c
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\..\..\src\mesa\tnl\t_array_import.c
-# End Source File
-# Begin Source File
-
SOURCE=..\..\..\..\src\mesa\tnl\t_context.c
# End Source File
# Begin Source File
-SOURCE=..\..\..\..\src\mesa\tnl\t_pipeline.c
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\..\..\src\mesa\tnl\t_save_api.c
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\..\..\src\mesa\tnl\t_save_loopback.c
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\..\..\src\mesa\tnl\t_save_playback.c
+SOURCE=..\..\..\..\src\mesa\tnl\t_draw.c
# End Source File
# Begin Source File
-SOURCE=..\..\..\..\src\mesa\tnl\t_vb_arbprogram.c
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\..\..\src\mesa\tnl\t_vb_arbshader.c
+SOURCE=..\..\..\..\src\mesa\tnl\t_pipeline.c
# End Source File
# Begin Source File
@@ -761,22 +737,6 @@ SOURCE=..\..\..\..\src\mesa\tnl\t_vp_build.c
# End Source File
# Begin Source File
-SOURCE=..\..\..\..\src\mesa\tnl\t_vtx_api.c
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\..\..\src\mesa\tnl\t_vtx_eval.c
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\..\..\src\mesa\tnl\t_vtx_exec.c
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\..\..\src\mesa\tnl\t_vtx_generic.c
-# End Source File
-# Begin Source File
-
SOURCE=..\..\..\..\src\mesa\main\texcompress.c
# End Source File
# Begin Source File
diff --git a/windows/VC7/mesa/mesa/mesa.vcproj b/windows/VC7/mesa/mesa/mesa.vcproj
index b63312c8862..a9f285568fe 100644
--- a/windows/VC7/mesa/mesa/mesa.vcproj
+++ b/windows/VC7/mesa/mesa/mesa.vcproj
@@ -498,10 +498,7 @@
RelativePath="..\..\..\..\src\mesa\main\stencil.c">
</File>
<File
- RelativePath="..\..\..\..\src\mesa\tnl\t_array_api.c">
- </File>
- <File
- RelativePath="..\..\..\..\src\mesa\tnl\t_array_import.c">
+ RelativePath="..\..\..\..\src\mesa\tnl\t_draw.c">
</File>
<File
RelativePath="..\..\..\..\src\mesa\tnl\t_context.c">
@@ -510,21 +507,6 @@
RelativePath="..\..\..\..\src\mesa\tnl\t_pipeline.c">
</File>
<File
- RelativePath="..\..\..\..\src\mesa\tnl\t_save_api.c">
- </File>
- <File
- RelativePath="..\..\..\..\src\mesa\tnl\t_save_loopback.c">
- </File>
- <File
- RelativePath="..\..\..\..\src\mesa\tnl\t_save_playback.c">
- </File>
- <File
- RelativePath="..\..\..\..\src\mesa\tnl\t_vb_arbprogram.c">
- </File>
- <File
- RelativePath="..\..\..\..\src\mesa\tnl\t_vb_arbshader.c">
- </File>
- <File
RelativePath="..\..\..\..\src\mesa\tnl\t_vb_cull.c">
</File>
<File
@@ -564,18 +546,6 @@
RelativePath="..\..\..\..\src\mesa\tnl\t_vp_build.c">
</File>
<File
- RelativePath="..\..\..\..\src\mesa\tnl\t_vtx_api.c">
- </File>
- <File
- RelativePath="..\..\..\..\src\mesa\tnl\t_vtx_eval.c">
- </File>
- <File
- RelativePath="..\..\..\..\src\mesa\tnl\t_vtx_exec.c">
- </File>
- <File
- RelativePath="..\..\..\..\src\mesa\tnl\t_vtx_generic.c">
- </File>
- <File
RelativePath="..\..\..\..\src\mesa\main\texcompress.c">
</File>
<File