+Mesa 7.2 is a stable release fixing bugs found in 7.1, which was a
+new development release.
+
+
+Mesa 7.2 implements the OpenGL 2.1 API, but the version reported by
+glGetString(GL_VERSION) depends on the particular driver being used.
+Some drivers don't support all the features required in OpenGL 2.1.
+
+
+Note that this version of Mesa does not use the GEM memory manager.
+The master branch of git uses GEM.
+The prototype DRI2 code that was in 7.1 has also been removed.
+
i965 driver: added support for G41 chipset (Intel)
+
+
+
+
Bug fixes
+
+
Fixed display list bug involving primitives split across lists (bug 17564)
+
Fixed some issues with glBindAttribLocation()
+
Fixed crash in _tnl_InvalidateState() found with Amira (bug 15834)
+
Assorted bug fixes for Ming build
+
Fixed some vertex/pixel buffer object reference counting bugs
+
Fixed depth/stencil bug in i915/945 driver
+
Fixed some shader flow control bugs in i965 driver
+
Fixed a few tdfx driver bugs which prevented driver from working
+
Fixed multisample enable/disable bug
+
+
+
Changes
+
+
Updated SGI header files with new license terms.
+
+
+
+
+
To Do (someday) items
+
+
Remove the MEMCPY() and _mesa_memcpy() wrappers and just use memcpy().
+Probably do the same for malloc, calloc, etc.
+The wrappers were useful in the past for memory debugging but now we
+have valgrind. Not worried about SunOS 4 support anymore either...
+
Switch to freeglut
+
Fix linux-glide target/driver.
+
Improved lambda and derivative calculation for frag progs.
+
+
+
+
Driver Status
+
+
+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
+
+Mesa 7.3 is a new development release.
+Users especially concerned with stability should stick with latest
+stable release: version 7.2.
+
+
+Mesa 7.3 implements the OpenGL 2.1 API, but the version reported by
+glGetString(GL_VERSION) depends on the particular driver being used.
+Some drivers don't support all the features required in OpenGL 2.1.
+
+
+
+DRM version 2.4.2 or later should be used with Mesa 7.3
+
+
+
+
MD5 checksums
+
+tbd
+
+
+
+
New features
+
+
Support for GLSL 1.20
+
Intel DRI drivers now use GEM and DRI2
+
+
+
+
Bug fixes
+
+
Assorted GLSL bug fixes
+
Assorted i965 driver fixes
+
+
+
Changes
+
+
+
+
+
+
Driver Status
+
+
+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
+
+
+
+
diff --git a/docs/relnotes.html b/docs/relnotes.html
index e3059771638..020e48551ec 100644
--- a/docs/relnotes.html
+++ b/docs/relnotes.html
@@ -20,6 +20,8 @@ The release notes summarize what's new or changed in each Mesa release.
+Mesa 7.3 is released.
+This is a new development release.
+
+
+
+
September 20, 2008
+
+Mesa 7.2 is released.
+This is a stable, bug-fix release.
+
+
+
August 26, 2008
Mesa 7.1 is released.
--
cgit v1.2.3
From 2c0ce92e8af4aab75f9a69a7913a1bec705220f3 Mon Sep 17 00:00:00 2001
From: Brian Paul
Date: Thu, 8 Jan 2009 16:15:31 -0700
Subject: docs: updated Cell docs, from gallium-0.2 branch
---
docs/cell.html | 72 ++++++++++++++++++++++++++++++++++++++++++++++------------
1 file changed, 57 insertions(+), 15 deletions(-)
diff --git a/docs/cell.html b/docs/cell.html
index f9915d67e54..7fbbba7c7e0 100644
--- a/docs/cell.html
+++ b/docs/cell.html
@@ -6,7 +6,7 @@
-
Mesa Cell Driver
+
Mesa/Gallium Cell Driver
The Mesa
@@ -23,18 +23,19 @@ Two phases are planned.
First, to implement the framework for parallel rasterization using the Cell
SPEs, including texture mapping.
Second, to implement a full-featured OpenGL driver with support for GLSL, etc.
+The second phase is now underway.
Source Code
-The Cell driver source code is on the gallium-0.1 branch of the
-git repository.
+The latest Cell driver source code is on the gallium-0.2 branch
+of the Mesa git repository.
After you've cloned the repository, check out the branch with:
To build the driver you'll need the IBM Cell SDK (version 2.1 or 3.0).
@@ -43,12 +44,13 @@ or the Cell Simulator (untested, though).
-If using Cell SDK 3.0, first edit configs/linux-cell and add
--DSPU_MAIN_PARAM_LONG_LONG to the SPU_CFLAGS.
+If using Cell SDK 2.1, see the configs/linux-cell file for some
+special changes.
To compile the code, run make linux-cell.
+To build in debug mode, run make linux-cell-debug.
@@ -60,7 +62,7 @@ directory that contains libGL.so.
Verify that the Cell driver is being used by running glxinfo
and looking for:
- OpenGL renderer string: Gallium 0.1, Cell on Xlib
+ OpenGL renderer string: Gallium 0.2, Cell on Xlib
@@ -77,21 +79,61 @@ SPU local store as needed.
Similarly, textures are tiled and brought into local store as needed.
+
+
Status
+
+
+As of October 2008, the driver runs quite a few OpenGL demos.
+Features that work include:
+
+
+
Point/line/triangle rendering, glDrawPixels
+
2D, NPOT and cube texture maps with nearest/linear/mipmap filtering
+
Dynamic SPU code generation for fragment shaders, but not complete
+
Dynamic SPU code generation for fragment ops (blend, Z-test, etc), but not complete
+
Dynamic PPU/PPC code generation for vertex shaders, but not complete
+
-More recently, vertex transformation has been parallelized across the SPUs
-as well.
+Performance has recently improved with the addition of PPC code generation
+for vertex shaders, but the code quality isn't too great yet.
+
+
+Another bottleneck is SwapBuffers. It may be the limiting factor for
+many simple GL tests.
-
Status
+
+
Debug Options
-As of February 2008 the driver supports smooth/flat shaded triangle rendering
-with Z testing and simple texture mapping.
-Simple demos like gears run successfully.
-To test texture mapping, try progs/demos/texcyl (press right mouse button for
-rendering options).
+The CELL_DEBUG env var can be set to a comma-separated list of one or
+more of the following debug options:
+
+
checker - use a different background clear color for each SPU.
+ This lets you see which SPU is rendering which screen tiles.
+
sync - wait/synchronize after each DMA transfer
+
asm - print generated SPU assembly code to stdout
+
fragops - emit fragment ops debug messages
+
fragopfallback - don't use codegen for fragment ops
+
cmd - print SPU commands as their received
+
cache - print texture cache statistics when program exits
+
+
+Note that some of these options may only work for linux-cell-debug builds.
+
+
+
+If the GALLIUM_NOPPC env var is set, PPC code generation will not be used
+and vertex shaders will be run with the TGSI interpreter.
+
+
+If the GALLIUM_NOCELL env var is set, the softpipe driver will be used
+intead of the Cell driver.
+This is useful for comparison/validation.
+
+
Contributing
--
cgit v1.2.3
From 0713e9da73cebfc35550ab192f385b955eb8ebcd Mon Sep 17 00:00:00 2001
From: Brian Paul
Date: Thu, 8 Jan 2009 16:16:36 -0700
Subject: mesa: set version string to 7.3-rc1
---
src/mesa/main/version.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/mesa/main/version.h b/src/mesa/main/version.h
index 81034a35d1e..83aefe685ad 100644
--- a/src/mesa/main/version.h
+++ b/src/mesa/main/version.h
@@ -31,7 +31,7 @@
#define MESA_MAJOR 7
#define MESA_MINOR 3
#define MESA_PATCH 0
-#define MESA_VERSION_STRING "7.3-devel"
+#define MESA_VERSION_STRING "7.3-rc1"
/* To make version comparison easy */
#define MESA_VERSION(a,b,c) (((a) << 16) + ((b) << 8) + (c))
--
cgit v1.2.3
From acd99f67cc04ae249e35a9d80de12c0af012e4fc Mon Sep 17 00:00:00 2001
From: Brian Paul
Date: Thu, 8 Jan 2009 17:07:28 -0700
Subject: glsl: fix typo in the vec2 += operator function
---
src/mesa/shader/slang/library/slang_core.gc | 2 +-
src/mesa/shader/slang/library/slang_core_gc.h | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/mesa/shader/slang/library/slang_core.gc b/src/mesa/shader/slang/library/slang_core.gc
index 748add4bc8f..0a0d15903bc 100644
--- a/src/mesa/shader/slang/library/slang_core.gc
+++ b/src/mesa/shader/slang/library/slang_core.gc
@@ -1344,7 +1344,7 @@ float __operator /= (inout float a, const float b)
vec2 __operator += (inout vec2 v, const vec2 u)
{
- v + v + u;
+ v = v + u;
return v;
}
diff --git a/src/mesa/shader/slang/library/slang_core_gc.h b/src/mesa/shader/slang/library/slang_core_gc.h
index 76344c68243..b3d3e87cf42 100644
--- a/src/mesa/shader/slang/library/slang_core_gc.h
+++ b/src/mesa/shader/slang/library/slang_core_gc.h
@@ -408,7 +408,7 @@
18,97,0,18,97,0,18,98,0,47,20,0,8,18,97,0,0,0,1,90,95,0,0,9,0,2,3,1,0,2,0,9,0,97,0,0,1,1,0,0,9,0,
98,0,0,0,1,9,18,97,0,18,97,0,18,98,0,48,20,0,8,18,97,0,0,0,1,90,95,0,0,9,0,2,4,1,0,2,0,9,0,97,0,0,
1,1,0,0,9,0,98,0,0,0,1,9,18,97,0,18,97,0,18,98,0,49,20,0,8,18,97,0,0,0,1,90,95,0,0,10,0,2,1,1,0,2,
-0,10,0,118,0,0,1,1,0,0,10,0,117,0,0,0,1,9,18,118,0,18,118,0,46,18,117,0,46,0,8,18,118,0,0,0,1,90,
+0,10,0,118,0,0,1,1,0,0,10,0,117,0,0,0,1,9,18,118,0,18,118,0,18,117,0,46,20,0,8,18,118,0,0,0,1,90,
95,0,0,10,0,2,2,1,0,2,0,10,0,118,0,0,1,1,0,0,10,0,117,0,0,0,1,9,18,118,0,18,118,0,18,117,0,47,20,0,
8,18,118,0,0,0,1,90,95,0,0,10,0,2,3,1,0,2,0,10,0,118,0,0,1,1,0,0,10,0,117,0,0,0,1,9,18,118,0,18,
118,0,18,117,0,48,20,0,8,18,118,0,0,0,1,90,95,0,0,10,0,2,4,1,0,2,0,10,0,118,0,0,1,1,0,0,10,0,117,0,
--
cgit v1.2.3
From d0c2cbd2571dba66463a37222d058f4394ba0918 Mon Sep 17 00:00:00 2001
From: Brian Paul
Date: Thu, 8 Jan 2009 17:19:51 -0700
Subject: docs: dri2proto, libdrm tweaks
---
docs/install.html | 2 +-
docs/relnotes-7.3.html | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/docs/install.html b/docs/install.html
index 2d72506f67d..d740477c13f 100644
--- a/docs/install.html
+++ b/docs/install.html
@@ -38,7 +38,7 @@ The following are required for DRI-based hardware acceleration with Mesa 7.3:
Xorg server version 1.4 or 1.5.
diff --git a/docs/relnotes-7.3.html b/docs/relnotes-7.3.html
index 2be762d91db..5cb7dc20fda 100644
--- a/docs/relnotes-7.3.html
+++ b/docs/relnotes-7.3.html
@@ -22,7 +22,7 @@ Some drivers don't support all the features required in OpenGL 2.1.
-DRM version 2.4.2 or later should be used with Mesa 7.3
+DRM version 2.4.3 or later should be used with Mesa 7.3
--
cgit v1.2.3
From 08fdc741bc509c284532d0e2fec32980c3047aec Mon Sep 17 00:00:00 2001
From: Brian Paul
Date: Thu, 8 Jan 2009 17:20:18 -0700
Subject: mesa: import glext.h version 44
---
include/GL/glext.h | 68 ++++++++++++++++++++++++++++++++++++++++++++++++++++--
1 file changed, 66 insertions(+), 2 deletions(-)
diff --git a/include/GL/glext.h b/include/GL/glext.h
index 4255fa8639e..c0941aa8044 100644
--- a/include/GL/glext.h
+++ b/include/GL/glext.h
@@ -46,9 +46,9 @@ extern "C" {
/*************************************************************/
/* Header file version number, required by OpenGL ABI for Linux */
-/* glext.h last updated 2008/10/09 */
+/* glext.h last updated 2008/11/14 */
/* Current version at http://www.opengl.org/registry/ */
-#define GL_GLEXT_VERSION 43
+#define GL_GLEXT_VERSION 44
#ifndef GL_VERSION_1_2
#define GL_UNSIGNED_BYTE_3_3_2 0x8032
@@ -3834,6 +3834,34 @@ extern "C" {
/* reuse GL_BGRA */
#endif
+#ifndef GL_EXT_texture_swizzle
+#define GL_TEXTURE_SWIZZLE_R_EXT 0x8E42
+#define GL_TEXTURE_SWIZZLE_G_EXT 0x8E43
+#define GL_TEXTURE_SWIZZLE_B_EXT 0x8E44
+#define GL_TEXTURE_SWIZZLE_A_EXT 0x8E45
+#define GL_TEXTURE_SWIZZLE_RGBA_EXT 0x8E46
+#endif
+
+#ifndef GL_NV_explicit_multisample
+#define GL_SAMPLE_POSITION_NV 0x8E50
+#define GL_SAMPLE_MASK_NV 0x8E51
+#define GL_SAMPLE_MASK_VALUE_NV 0x8E52
+#define GL_TEXTURE_BINDING_RENDERBUFFER_NV 0x8E53
+#define GL_TEXTURE_RENDERBUFFER_DATA_STORE_BINDING_NV 0x8E54
+#define GL_MAX_SAMPLE_MASK_WORDS_NV 0x8E59
+#define GL_TEXTURE_RENDERBUFFER_NV 0x8E55
+#define GL_SAMPLER_RENDERBUFFER_NV 0x8E56
+#define GL_INT_SAMPLER_RENDERBUFFER_NV 0x8E57
+#define GL_UNSIGNED_INT_SAMPLER_RENDERBUFFER_NV 0x8E58
+#endif
+
+#ifndef GL_NV_transform_feedback2
+#define GL_TRANSFORM_FEEDBACK_NV 0x8E22
+#define GL_TRANSFORM_FEEDBACK_BUFFER_PAUSED_NV 0x8E23
+#define GL_TRANSFORM_FEEDBACK_BUFFER_ACTIVE_NV 0x8E24
+#define GL_TRANSFORM_FEEDBACK_BINDING_NV 0x8E25
+#endif
+
/*************************************************************/
@@ -8387,6 +8415,42 @@ typedef void (APIENTRYP PFNGLMULTITEXRENDERBUFFEREXTPROC) (GLenum texunit, GLenu
#define GL_EXT_vertex_array_bgra 1
#endif
+#ifndef GL_EXT_texture_swizzle
+#define GL_EXT_texture_swizzle 1
+#endif
+
+#ifndef GL_NV_explicit_multisample
+#define GL_NV_explicit_multisample 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI void APIENTRY glGetMultisamplefvNV (GLenum, GLuint, GLfloat *);
+GLAPI void APIENTRY glSampleMaskIndexedNV (GLuint, GLbitfield);
+GLAPI void APIENTRY glTexRenderbufferNV (GLenum, GLuint);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef void (APIENTRYP PFNGLGETMULTISAMPLEFVNVPROC) (GLenum pname, GLuint index, GLfloat *val);
+typedef void (APIENTRYP PFNGLSAMPLEMASKINDEXEDNVPROC) (GLuint index, GLbitfield mask);
+typedef void (APIENTRYP PFNGLTEXRENDERBUFFERNVPROC) (GLenum target, GLuint renderbuffer);
+#endif
+
+#ifndef GL_NV_transform_feedback2
+#define GL_NV_transform_feedback2 1
+#ifdef GL_GLEXT_PROTOTYPES
+GLAPI void APIENTRY glBindTransformFeedbackNV (GLenum, GLuint);
+GLAPI void APIENTRY glDeleteTransformFeedbacksNV (GLsizei, const GLuint *);
+GLAPI void APIENTRY glGenTransformFeedbacksNV (GLsizei, GLuint *);
+GLAPI GLboolean APIENTRY glIsTransformFeedbackNV (GLuint);
+GLAPI void APIENTRY glPauseTransformFeedbackNV (void);
+GLAPI void APIENTRY glResumeTransformFeedbackNV (void);
+GLAPI void APIENTRY glDrawTransformFeedbackNV (GLenum, GLuint);
+#endif /* GL_GLEXT_PROTOTYPES */
+typedef void (APIENTRYP PFNGLBINDTRANSFORMFEEDBACKNVPROC) (GLenum target, GLuint id);
+typedef void (APIENTRYP PFNGLDELETETRANSFORMFEEDBACKSNVPROC) (GLsizei n, const GLuint *ids);
+typedef void (APIENTRYP PFNGLGENTRANSFORMFEEDBACKSNVPROC) (GLsizei n, GLuint *ids);
+typedef GLboolean (APIENTRYP PFNGLISTRANSFORMFEEDBACKNVPROC) (GLuint id);
+typedef void (APIENTRYP PFNGLPAUSETRANSFORMFEEDBACKNVPROC) (void);
+typedef void (APIENTRYP PFNGLRESUMETRANSFORMFEEDBACKNVPROC) (void);
+typedef void (APIENTRYP PFNGLDRAWTRANSFORMFEEDBACKNVPROC) (GLenum mode, GLuint id);
+#endif
+
#ifdef __cplusplus
}
--
cgit v1.2.3
From f7b4c2cca9ea9013f527b25ae45605047c58d64c Mon Sep 17 00:00:00 2001
From: Brian Paul
Date: Thu, 8 Jan 2009 17:20:41 -0700
Subject: mesa: latest glxext.h header, no version change
---
include/GL/glxext.h | 32 ++++++++++++++++----------------
1 file changed, 16 insertions(+), 16 deletions(-)
diff --git a/include/GL/glxext.h b/include/GL/glxext.h
index 71cf0469e38..536fb25a76e 100644
--- a/include/GL/glxext.h
+++ b/include/GL/glxext.h
@@ -127,6 +127,14 @@ extern "C" {
#define GLX_RGBA_FLOAT_BIT_ARB 0x00000004
#endif
+#ifndef GLX_ARB_create_context
+#define GLX_CONTEXT_DEBUG_BIT_ARB 0x00000001
+#define GLX_CONTEXT_FORWARD_COMPATIBLE_BIT_ARB 0x00000002
+#define GLX_CONTEXT_MAJOR_VERSION_ARB 0x2091
+#define GLX_CONTEXT_MINOR_VERSION_ARB 0x2092
+#define GLX_CONTEXT_FLAGS_ARB 0x2094
+#endif
+
#ifndef GLX_SGIS_multisample
#define GLX_SAMPLE_BUFFERS_SGIS 100000
#define GLX_SAMPLES_SGIS 100001
@@ -366,14 +374,6 @@ extern "C" {
#ifndef GLX_NV_swap_group
#endif
-#ifndef GLX_ARB_create_context
-#define GLX_CONTEXT_DEBUG_BIT_ARB 0x00000001
-#define GLX_CONTEXT_FORWARD_COMPATIBLE_BIT_ARB 0x00000002
-#define GLX_CONTEXT_MAJOR_VERSION_ARB 0x2091
-#define GLX_CONTEXT_MINOR_VERSION_ARB 0x2092
-#define GLX_CONTEXT_FLAGS_ARB 0x2094
-#endif
-
/*************************************************************/
@@ -510,6 +510,14 @@ typedef __GLXextFuncPtr ( * PFNGLXGETPROCADDRESSARBPROC) (const GLubyte *procNam
#define GLX_ARB_fbconfig_float 1
#endif
+#ifndef GLX_ARB_create_context
+#define GLX_ARB_create_context 1
+#ifdef GLX_GLXEXT_PROTOTYPES
+extern GLXContext glXCreateContextAttribsARB (Display *, GLXFBConfig, GLXContext, Bool, const int *);
+#endif /* GLX_GLXEXT_PROTOTYPES */
+typedef GLXContext ( * PFNGLXCREATECONTEXTATTRIBSARBPROC) (Display *dpy, GLXFBConfig config, GLXContext share_context, Bool direct, const int *attrib_list);
+#endif
+
#ifndef GLX_SGIS_multisample
#define GLX_SGIS_multisample 1
#endif
@@ -817,14 +825,6 @@ typedef void ( * PFNGLXRELEASETEXIMAGEEXTPROC) (Display *dpy, GLXDrawable drawab
#define GLX_NV_swap_group 1
#endif
-#ifndef GLX_ARB_create_context
-#define GLX_ARB_create_context 1
-#ifdef GLX_GLXEXT_PROTOTYPES
-extern GLXContext glXCreateContextAttribsARB (Display *, GLXFBConfig, GLXContext, Bool, const int *);
-#endif /* GLX_GLXEXT_PROTOTYPES */
-typedef GLXContext ( * PFNGLXCREATECONTEXTATTRIBSARBPROC) (Display *dpy, GLXFBConfig config, GLXContext share_context, Bool direct, const int *attrib_list);
-#endif
-
#ifdef __cplusplus
}
--
cgit v1.2.3
From 4497a5a57d0fdb5c5ec15750e477aeb49f5e453d Mon Sep 17 00:00:00 2001
From: Brian Paul
Date: Thu, 8 Jan 2009 17:21:20 -0700
Subject: mesa: 7.3-rc-1 Makefile changes
---
Makefile | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/Makefile b/Makefile
index c92b4867f7e..dbe444d2941 100644
--- a/Makefile
+++ b/Makefile
@@ -174,10 +174,10 @@ ultrix-gcc:
# Rules for making release tarballs
-DIRECTORY = Mesa-7.1-rc4
-LIB_NAME = MesaLib-7.1-rc4
-DEMO_NAME = MesaDemos-7.1-rc4
-GLUT_NAME = MesaGLUT-7.1-rc4
+DIRECTORY = Mesa-7.3-rc1
+LIB_NAME = MesaLib-7.3-rc1
+DEMO_NAME = MesaDemos-7.3-rc1
+GLUT_NAME = MesaGLUT-7.3-rc1
MAIN_FILES = \
$(DIRECTORY)/Makefile* \
--
cgit v1.2.3
From ca03e881a8d8fa3e36a601238559c20311373633 Mon Sep 17 00:00:00 2001
From: Brian Paul
Date: Fri, 9 Jan 2009 09:59:49 -0700
Subject: glsl: make minimum struct size = 2, not 1
1-component structs such as "struct foo { float x; }" could get placed at
any position within a register. This caused some trouble computing the
field offset which assumed all struct objects were placed at R.x.
It would be unusual to hit this case in normal shaders.
---
src/mesa/shader/slang/slang_codegen.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/mesa/shader/slang/slang_codegen.c b/src/mesa/shader/slang/slang_codegen.c
index ba1c955a1ae..f5c5cbdd484 100644
--- a/src/mesa/shader/slang/slang_codegen.c
+++ b/src/mesa/shader/slang/slang_codegen.c
@@ -228,7 +228,14 @@ _slang_sizeof_type_specifier(const slang_type_specifier *spec)
break;
case SLANG_SPEC_STRUCT:
sz = _slang_field_offset(spec, 0); /* special use */
- if (sz > 4) {
+ if (sz == 1) {
+ /* 1-float structs are actually troublesome to deal with since they
+ * might get placed at R.x, R.y, R.z or R.z. Return size=2 to
+ * ensure the object is placed at R.x
+ */
+ sz = 2;
+ }
+ else if (sz > 4) {
sz = (sz + 3) & ~0x3; /* round up to multiple of four */
}
break;
--
cgit v1.2.3
From 9939a306f7dc109d301e7b2d6abf4f2ab019bde0 Mon Sep 17 00:00:00 2001
From: Ian Romanick
Date: Fri, 9 Jan 2009 13:56:44 -0800
Subject: swrast: Fix GL_ATI_separate_stencil
GL_ATI_separate_stencil is enabled by default for software
rasterizers, but the extension functions weren't hooked up to the
dispatch table.
---
src/mesa/drivers/dri/swrast/swrast.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/src/mesa/drivers/dri/swrast/swrast.c b/src/mesa/drivers/dri/swrast/swrast.c
index 49f1b8b9ee7..15b57244dcd 100644
--- a/src/mesa/drivers/dri/swrast/swrast.c
+++ b/src/mesa/drivers/dri/swrast/swrast.c
@@ -66,6 +66,7 @@
#define need_GL_ARB_vertex_program
#define need_GL_APPLE_vertex_array_object
#define need_GL_ATI_fragment_shader
+#define need_GL_ATI_separate_stencil
#define need_GL_EXT_depth_bounds_test
#define need_GL_EXT_framebuffer_object
#define need_GL_EXT_framebuffer_blit
@@ -96,6 +97,7 @@ const struct dri_extension card_extensions[] =
{ "GL_ARB_vertex_program", GL_ARB_vertex_program_functions },
{ "GL_APPLE_vertex_array_object", GL_APPLE_vertex_array_object_functions },
{ "GL_ATI_fragment_shader", GL_ATI_fragment_shader_functions },
+ { "GL_ATI_separate_stencil", GL_ATI_separate_stencil_functions },
{ "GL_EXT_depth_bounds_test", GL_EXT_depth_bounds_test_functions },
{ "GL_EXT_framebuffer_object", GL_EXT_framebuffer_object_functions },
{ "GL_EXT_framebuffer_blit", GL_EXT_framebuffer_blit_functions },
--
cgit v1.2.3
From 1d352b42a106ed0c3cd0831fa681d07794b7ff3d Mon Sep 17 00:00:00 2001
From: Brian Paul
Date: Sat, 10 Jan 2009 11:39:05 -0700
Subject: glsl: replace 0/1 with GL_FALSE/GL_TRUE
---
src/mesa/shader/slang/slang_compile.c | 36 +++++++++++++++++------------------
1 file changed, 18 insertions(+), 18 deletions(-)
diff --git a/src/mesa/shader/slang/slang_compile.c b/src/mesa/shader/slang/slang_compile.c
index c150931ead8..ec27fc69dff 100644
--- a/src/mesa/shader/slang/slang_compile.c
+++ b/src/mesa/shader/slang/slang_compile.c
@@ -1005,7 +1005,7 @@ parse_statement(slang_parse_ctx * C, slang_output_ctx * O,
/* parse child statements, do not create new variable scope */
oper->type = SLANG_OPER_BLOCK_NO_NEW_SCOPE;
while (*C->I != OP_END)
- if (!parse_child_operation(C, O, oper, 1))
+ if (!parse_child_operation(C, O, oper, GL_TRUE))
RETURN0;
C->I++;
break;
@@ -1017,7 +1017,7 @@ parse_statement(slang_parse_ctx * C, slang_output_ctx * O,
oper->type = SLANG_OPER_BLOCK_NEW_SCOPE;
o.vars = oper->locals;
while (*C->I != OP_END)
- if (!parse_child_operation(C, &o, oper, 1))
+ if (!parse_child_operation(C, &o, oper, GL_TRUE))
RETURN0;
C->I++;
}
@@ -1074,7 +1074,7 @@ parse_statement(slang_parse_ctx * C, slang_output_ctx * O,
if (oper->a_id == SLANG_ATOM_NULL)
RETURN0;
while (*C->I != OP_END) {
- if (!parse_child_operation(C, O, oper, 0))
+ if (!parse_child_operation(C, O, oper, GL_FALSE))
RETURN0;
}
C->I++;
@@ -1090,21 +1090,21 @@ parse_statement(slang_parse_ctx * C, slang_output_ctx * O,
break;
case OP_RETURN:
oper->type = SLANG_OPER_RETURN;
- if (!parse_child_operation(C, O, oper, 0))
+ if (!parse_child_operation(C, O, oper, GL_FALSE))
RETURN0;
break;
case OP_EXPRESSION:
oper->type = SLANG_OPER_EXPRESSION;
- if (!parse_child_operation(C, O, oper, 0))
+ if (!parse_child_operation(C, O, oper, GL_FALSE))
RETURN0;
break;
case OP_IF:
oper->type = SLANG_OPER_IF;
- if (!parse_child_operation(C, O, oper, 0))
+ if (!parse_child_operation(C, O, oper, GL_FALSE))
RETURN0;
- if (!parse_child_operation(C, O, oper, 1))
+ if (!parse_child_operation(C, O, oper, GL_TRUE))
RETURN0;
- if (!parse_child_operation(C, O, oper, 1))
+ if (!parse_child_operation(C, O, oper, GL_TRUE))
RETURN0;
break;
case OP_WHILE:
@@ -1113,17 +1113,17 @@ parse_statement(slang_parse_ctx * C, slang_output_ctx * O,
oper->type = SLANG_OPER_WHILE;
o.vars = oper->locals;
- if (!parse_child_operation(C, &o, oper, 1))
+ if (!parse_child_operation(C, &o, oper, GL_TRUE))
RETURN0;
- if (!parse_child_operation(C, &o, oper, 1))
+ if (!parse_child_operation(C, &o, oper, GL_TRUE))
RETURN0;
}
break;
case OP_DO:
oper->type = SLANG_OPER_DO;
- if (!parse_child_operation(C, O, oper, 1))
+ if (!parse_child_operation(C, O, oper, GL_TRUE))
RETURN0;
- if (!parse_child_operation(C, O, oper, 0))
+ if (!parse_child_operation(C, O, oper, GL_FALSE))
RETURN0;
break;
case OP_FOR:
@@ -1132,13 +1132,13 @@ parse_statement(slang_parse_ctx * C, slang_output_ctx * O,
oper->type = SLANG_OPER_FOR;
o.vars = oper->locals;
- if (!parse_child_operation(C, &o, oper, 1))
+ if (!parse_child_operation(C, &o, oper, GL_TRUE))
RETURN0;
- if (!parse_child_operation(C, &o, oper, 1))
+ if (!parse_child_operation(C, &o, oper, GL_TRUE))
RETURN0;
- if (!parse_child_operation(C, &o, oper, 0))
+ if (!parse_child_operation(C, &o, oper, GL_FALSE))
RETURN0;
- if (!parse_child_operation(C, &o, oper, 1))
+ if (!parse_child_operation(C, &o, oper, GL_TRUE))
RETURN0;
}
break;
@@ -1429,7 +1429,7 @@ parse_expression(slang_parse_ctx * C, slang_output_ctx * O,
C->I++;
while (*C->I != OP_END)
- if (!parse_child_operation(C, O, op, 0))
+ if (!parse_child_operation(C, O, op, GL_FALSE))
RETURN0;
C->I++;
#if 0
@@ -1494,7 +1494,7 @@ parse_expression(slang_parse_ctx * C, slang_output_ctx * O,
RETURN0;
}
while (*C->I != OP_END)
- if (!parse_child_operation(C, O, op, 0))
+ if (!parse_child_operation(C, O, op, GL_FALSE))
RETURN0;
C->I++;
--
cgit v1.2.3
From 6333005f7aea3e5d1d86a5c47b3fa2a1ed2f3ff0 Mon Sep 17 00:00:00 2001
From: Brian Paul
Date: Sat, 10 Jan 2009 11:40:20 -0700
Subject: glsl: force creation of new scope for for-loop body
Fixes regression in progs/demos/convolution.c due to loop unrolling.
This also allows the following to be compiled correctly:
for (int i = 0; i < n; i++) {
int i;
...
}
This fix is a bit of a hack, however. The better fix would be to change
the slang_shader.syn grammar. Will revisit that...
---
src/mesa/shader/slang/slang_compile.c | 18 ++++++++++++++++++
1 file changed, 18 insertions(+)
diff --git a/src/mesa/shader/slang/slang_compile.c b/src/mesa/shader/slang/slang_compile.c
index ec27fc69dff..add8594ff95 100644
--- a/src/mesa/shader/slang/slang_compile.c
+++ b/src/mesa/shader/slang/slang_compile.c
@@ -1138,8 +1138,26 @@ parse_statement(slang_parse_ctx * C, slang_output_ctx * O,
RETURN0;
if (!parse_child_operation(C, &o, oper, GL_FALSE))
RETURN0;
+#if 0
if (!parse_child_operation(C, &o, oper, GL_TRUE))
RETURN0;
+#else
+ /* force creation of new scope for loop body */
+ {
+ slang_operation *ch;
+ slang_output_ctx oo = o;
+
+ /* grow child array */
+ ch = slang_operation_grow(&oper->num_children, &oper->children);
+ ch->type = SLANG_OPER_BLOCK_NEW_SCOPE;
+
+ ch->locals->outer_scope = o.vars;
+ oo.vars = ch->locals;
+
+ if (!parse_child_operation(C, &oo, ch, GL_TRUE))
+ RETURN0;
+ }
+#endif
}
break;
case OP_PRECISION:
--
cgit v1.2.3
From 2c56dd775771d9d5ea2e22cf4ee4b5dbbbb2a03d Mon Sep 17 00:00:00 2001
From: Brian Paul
Date: Sat, 10 Jan 2009 11:52:55 -0700
Subject: docs: prerequisite updates
---
docs/install.html | 5 +++--
docs/relnotes-7.3.html | 4 ++--
2 files changed, 5 insertions(+), 4 deletions(-)
diff --git a/docs/install.html b/docs/install.html
index d740477c13f..be61ef30433 100644
--- a/docs/install.html
+++ b/docs/install.html
@@ -39,9 +39,10 @@ The following are required for DRI-based hardware acceleration with Mesa 7.3:
diff --git a/docs/relnotes-7.3.html b/docs/relnotes-7.3.html
index 5cb7dc20fda..c00e5fe2f80 100644
--- a/docs/relnotes-7.3.html
+++ b/docs/relnotes-7.3.html
@@ -21,8 +21,8 @@ glGetString(GL_VERSION) depends on the particular driver being used.
Some drivers don't support all the features required in OpenGL 2.1.
-
-DRM version 2.4.3 or later should be used with Mesa 7.3
+See the Compiling/Installing page for prerequisites
+for DRI ardware acceleration.
--
cgit v1.2.3
From 1636328b0adefcebcc204d63980184a6d592efae Mon Sep 17 00:00:00 2001
From: Brian Paul
Date: Sat, 10 Jan 2009 11:57:13 -0700
Subject: xmesa: deprecate the "XMesa" interface
Move the include/GL/xmesa*.h files to src/mesa/drivers/x11/ so they're no
longer considered public.
---
include/GL/xmesa.h | 424 --------------------------------------
include/GL/xmesa_x.h | 86 --------
include/GL/xmesa_xf86.h | 198 ------------------
src/mesa/drivers/x11/fakeglx.c | 1 -
src/mesa/drivers/x11/xm_api.c | 1 -
src/mesa/drivers/x11/xm_buffer.c | 1 -
src/mesa/drivers/x11/xmesa.h | 424 ++++++++++++++++++++++++++++++++++++++
src/mesa/drivers/x11/xmesaP.h | 2 +-
src/mesa/drivers/x11/xmesa_x.h | 86 ++++++++
src/mesa/drivers/x11/xmesa_xf86.h | 198 ++++++++++++++++++
10 files changed, 709 insertions(+), 712 deletions(-)
delete mode 100644 include/GL/xmesa.h
delete mode 100644 include/GL/xmesa_x.h
delete mode 100644 include/GL/xmesa_xf86.h
create mode 100644 src/mesa/drivers/x11/xmesa.h
create mode 100644 src/mesa/drivers/x11/xmesa_x.h
create mode 100644 src/mesa/drivers/x11/xmesa_xf86.h
diff --git a/include/GL/xmesa.h b/include/GL/xmesa.h
deleted file mode 100644
index 98139af8336..00000000000
--- a/include/GL/xmesa.h
+++ /dev/null
@@ -1,424 +0,0 @@
-/*
- * Mesa 3-D graphics library
- * Version: 7.1
- *
- * 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"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included
- * in all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
- * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- */
-
-
-/*
- * Mesa/X11 interface. This header file serves as the documentation for
- * the Mesa/X11 interface functions.
- *
- * Note: this interface isn't intended for user programs. It's primarily
- * just for implementing the pseudo-GLX interface.
- */
-
-
-/* Sample Usage:
-
-In addition to the usual X calls to select a visual, create a colormap
-and create a window, you must do the following to use the X/Mesa interface:
-
-1. Call XMesaCreateVisual() to make an XMesaVisual from an XVisualInfo.
-
-2. Call XMesaCreateContext() to create an X/Mesa rendering context, given
- the XMesaVisual.
-
-3. Call XMesaCreateWindowBuffer() to create an XMesaBuffer from an X window
- and XMesaVisual.
-
-4. Call XMesaMakeCurrent() to bind the XMesaBuffer to an XMesaContext and
- to make the context the current one.
-
-5. Make gl* calls to render your graphics.
-
-6. Use XMesaSwapBuffers() when double buffering to swap front/back buffers.
-
-7. Before the X window is destroyed, call XMesaDestroyBuffer().
-
-8. Before exiting, call XMesaDestroyVisual and XMesaDestroyContext.
-
-*/
-
-
-
-
-#ifndef XMESA_H
-#define XMESA_H
-
-#ifdef __VMS
-#include
-#endif
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#ifdef XFree86Server
-#include "xmesa_xf86.h"
-#else
-#include
-#include
-#include "xmesa_x.h"
-#endif
-#include "GL/gl.h"
-
-#ifdef AMIWIN
-#include
-extern struct Library *XLibBase;
-#endif
-
-
-#define XMESA_MAJOR_VERSION 6
-#define XMESA_MINOR_VERSION 3
-
-
-
-/*
- * Values passed to XMesaGetString:
- */
-#define XMESA_VERSION 1
-#define XMESA_EXTENSIONS 2
-
-
-/*
- * Values passed to XMesaSetFXmode:
- */
-#define XMESA_FX_WINDOW 1
-#define XMESA_FX_FULLSCREEN 2
-
-
-
-typedef struct xmesa_context *XMesaContext;
-
-typedef struct xmesa_visual *XMesaVisual;
-
-typedef struct xmesa_buffer *XMesaBuffer;
-
-
-
-/*
- * Create a new X/Mesa visual.
- * Input: display - X11 display
- * visinfo - an XVisualInfo pointer
- * rgb_flag - GL_TRUE = RGB mode,
- * GL_FALSE = color index mode
- * alpha_flag - alpha buffer requested?
- * db_flag - GL_TRUE = double-buffered,
- * GL_FALSE = single buffered
- * stereo_flag - stereo visual?
- * ximage_flag - GL_TRUE = use an XImage for back buffer,
- * GL_FALSE = use an off-screen pixmap for back buffer
- * depth_size - requested bits/depth values, or zero
- * stencil_size - requested bits/stencil values, or zero
- * accum_red_size - requested bits/red accum values, or zero
- * accum_green_size - requested bits/green accum values, or zero
- * accum_blue_size - requested bits/blue accum values, or zero
- * accum_alpha_size - requested bits/alpha accum values, or zero
- * num_samples - number of samples/pixel if multisampling, or zero
- * level - visual level, usually 0
- * visualCaveat - ala the GLX extension, usually GLX_NONE_EXT
- * Return; a new XMesaVisual or 0 if error.
- */
-extern XMesaVisual XMesaCreateVisual( XMesaDisplay *display,
- XMesaVisualInfo visinfo,
- GLboolean rgb_flag,
- GLboolean alpha_flag,
- GLboolean db_flag,
- GLboolean stereo_flag,
- GLboolean ximage_flag,
- GLint depth_size,
- GLint stencil_size,
- GLint accum_red_size,
- GLint accum_green_size,
- GLint accum_blue_size,
- GLint accum_alpha_size,
- GLint num_samples,
- GLint level,
- GLint visualCaveat );
-
-/*
- * Destroy an XMesaVisual, but not the associated XVisualInfo.
- */
-extern void XMesaDestroyVisual( XMesaVisual v );
-
-
-
-/*
- * Create a new XMesaContext for rendering into an X11 window.
- *
- * Input: visual - an XMesaVisual
- * share_list - another XMesaContext with which to share display
- * lists or NULL if no sharing is wanted.
- * Return: an XMesaContext or NULL if error.
- */
-extern XMesaContext XMesaCreateContext( XMesaVisual v,
- XMesaContext share_list );
-
-
-/*
- * Destroy a rendering context as returned by XMesaCreateContext()
- */
-extern void XMesaDestroyContext( XMesaContext c );
-
-
-#ifdef XFree86Server
-/*
- * These are the extra routines required for integration with XFree86.
- * None of these routines should be user visible. -KEM
- */
-extern GLboolean XMesaForceCurrent( XMesaContext c );
-
-extern GLboolean XMesaLoseCurrent( XMesaContext c );
-
-extern GLboolean XMesaCopyContext( XMesaContext src,
- XMesaContext dst,
- GLuint mask );
-#endif /* XFree86Server */
-
-
-/*
- * Create an XMesaBuffer from an X window.
- */
-extern XMesaBuffer XMesaCreateWindowBuffer( XMesaVisual v, XMesaWindow w );
-
-
-/*
- * Create an XMesaBuffer from an X pixmap.
- */
-extern XMesaBuffer XMesaCreatePixmapBuffer( XMesaVisual v,
- XMesaPixmap p,
- XMesaColormap cmap );
-
-
-/*
- * Destroy an XMesaBuffer, but not the corresponding window or pixmap.
- */
-extern void XMesaDestroyBuffer( XMesaBuffer b );
-
-
-/*
- * Return the XMesaBuffer handle which corresponds to an X drawable, if any.
- *
- * New in Mesa 2.3.
- */
-extern XMesaBuffer XMesaFindBuffer( XMesaDisplay *dpy,
- XMesaDrawable d );
-
-
-
-/*
- * Bind a buffer to a context and make the context the current one.
- */
-extern GLboolean XMesaMakeCurrent( XMesaContext c,
- XMesaBuffer b );
-
-
-/*
- * Bind two buffers (read and draw) to a context and make the
- * context the current one.
- * New in Mesa 3.3
- */
-extern GLboolean XMesaMakeCurrent2( XMesaContext c,
- XMesaBuffer drawBuffer,
- XMesaBuffer readBuffer );
-
-
-/*
- * Unbind the current context from its buffer.
- */
-extern GLboolean XMesaUnbindContext( XMesaContext c );
-
-
-/*
- * Return a handle to the current context.
- */
-extern XMesaContext XMesaGetCurrentContext( void );
-
-
-/*
- * Return handle to the current (draw) buffer.
- */
-extern XMesaBuffer XMesaGetCurrentBuffer( void );
-
-
-/*
- * Return handle to the current read buffer.
- * New in Mesa 3.3
- */
-extern XMesaBuffer XMesaGetCurrentReadBuffer( void );
-
-
-/*
- * Swap the front and back buffers for the given buffer. No action is
- * taken if the buffer is not double buffered.
- */
-extern void XMesaSwapBuffers( XMesaBuffer b );
-
-
-/*
- * Copy a sub-region of the back buffer to the front buffer.
- *
- * New in Mesa 2.6
- */
-extern void XMesaCopySubBuffer( XMesaBuffer b,
- int x,
- int y,
- int width,
- int height );
-
-
-/*
- * Return a pointer to the the Pixmap or XImage being used as the back
- * color buffer of an XMesaBuffer. This function is a way to get "under
- * the hood" of X/Mesa so one can manipulate the back buffer directly.
- * Input: b - the XMesaBuffer
- * Output: pixmap - pointer to back buffer's Pixmap, or 0
- * ximage - pointer to back buffer's XImage, or NULL
- * Return: GL_TRUE = context is double buffered
- * GL_FALSE = context is single buffered
- */
-extern GLboolean XMesaGetBackBuffer( XMesaBuffer b,
- XMesaPixmap *pixmap,
- XMesaImage **ximage );
-
-
-
-/*
- * Return the depth buffer associated with an XMesaBuffer.
- * Input: b - the XMesa buffer handle
- * Output: width, height - size of buffer in pixels
- * bytesPerValue - bytes per depth value (2 or 4)
- * buffer - pointer to depth buffer values
- * Return: GL_TRUE or GL_FALSE to indicate success or failure.
- *
- * New in Mesa 2.4.
- */
-extern GLboolean XMesaGetDepthBuffer( XMesaBuffer b,
- GLint *width,
- GLint *height,
- GLint *bytesPerValue,
- void **buffer );
-
-
-
-/*
- * Flush/sync a context
- */
-extern void XMesaFlush( XMesaContext c );
-
-
-
-/*
- * Get an X/Mesa-specific string.
- * Input: name - either XMESA_VERSION or XMESA_EXTENSIONS
- */
-extern const char *XMesaGetString( XMesaContext c, int name );
-
-
-
-/*
- * Scan for XMesaBuffers whose window/pixmap has been destroyed, then free
- * any memory used by that buffer.
- *
- * New in Mesa 2.3.
- */
-extern void XMesaGarbageCollect( void );
-
-
-
-/*
- * Return a dithered pixel value.
- * Input: c - XMesaContext
- * x, y - window coordinate
- * red, green, blue, alpha - color components in [0,1]
- * Return: pixel value
- *
- * New in Mesa 2.3.
- */
-extern unsigned long XMesaDitherColor( XMesaContext xmesa,
- GLint x,
- GLint y,
- GLfloat red,
- GLfloat green,
- GLfloat blue,
- GLfloat alpha );
-
-
-
-/*
- * 3Dfx Glide driver only!
- * Set 3Dfx/Glide full-screen or window rendering mode.
- * Input: mode - either XMESA_FX_WINDOW (window rendering mode) or
- * XMESA_FX_FULLSCREEN (full-screen rendering mode)
- * Return: GL_TRUE if success
- * GL_FALSE if invalid mode or if not using 3Dfx driver
- *
- * New in Mesa 2.6.
- */
-extern GLboolean XMesaSetFXmode( GLint mode );
-
-
-
-/*
- * Reallocate the back/depth/stencil/accum/etc/ buffers associated with
- * buffer if its size has changed.
- *
- * New in Mesa 4.0.2
- */
-extern void XMesaResizeBuffers( XMesaBuffer b );
-
-
-
-/*
- * Create a pbuffer.
- * New in Mesa 4.1
- */
-extern XMesaBuffer XMesaCreatePBuffer(XMesaVisual v, XMesaColormap cmap,
- unsigned int width, unsigned int height);
-
-
-
-/*
- * Texture from Pixmap
- * New in Mesa 7.1
- */
-extern void
-XMesaBindTexImage(XMesaDisplay *dpy, XMesaBuffer drawable, int buffer,
- const int *attrib_list);
-
-extern void
-XMesaReleaseTexImage(XMesaDisplay *dpy, XMesaBuffer drawable, int buffer);
-
-
-extern XMesaBuffer
-XMesaCreatePixmapTextureBuffer(XMesaVisual v, XMesaPixmap p,
- XMesaColormap cmap,
- int format, int target, int mipmap);
-
-
-
-#ifdef __cplusplus
-}
-#endif
-
-
-#endif
diff --git a/include/GL/xmesa_x.h b/include/GL/xmesa_x.h
deleted file mode 100644
index 865bab4313b..00000000000
--- a/include/GL/xmesa_x.h
+++ /dev/null
@@ -1,86 +0,0 @@
-
-/**************************************************************************
-
-Copyright 1998-1999 Precision Insight, Inc., Cedar Park, Texas.
-All Rights Reserved.
-
-Permission is hereby granted, free of charge, to any person obtaining a
-copy of this software and associated documentation files (the
-"Software"), to deal in the Software without restriction, including
-without limitation the rights to use, copy, modify, merge, publish,
-distribute, sub license, and/or sell copies of the Software, and to
-permit persons to whom the Software is furnished to do so, subject to
-the following conditions:
-
-The above copyright notice and this permission notice (including the
-next paragraph) shall be included in all copies or substantial portions
-of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
-OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
-IN NO EVENT SHALL PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR
-ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
-TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
-SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
-**************************************************************************/
-
-/*
- * Authors:
- * Kevin E. Martin
- *
- * When we're building the XMesa driver for stand-alone Mesa we
- * include this file when building the xm_*.c files.
- * We need to define some types and macros differently when building
- * in the Xserver vs. stand-alone Mesa.
- */
-
-#ifndef _XMESA_X_H_
-#define _XMESA_X_H_
-
-typedef Display XMesaDisplay;
-typedef Pixmap XMesaPixmap;
-typedef Colormap XMesaColormap;
-typedef Drawable XMesaDrawable;
-typedef Window XMesaWindow;
-typedef GC XMesaGC;
-typedef XVisualInfo *XMesaVisualInfo;
-typedef XImage XMesaImage;
-typedef XPoint XMesaPoint;
-typedef XColor XMesaColor;
-
-#define XMesaDestroyImage XDestroyImage
-
-#define XMesaPutPixel XPutPixel
-#define XMesaGetPixel XGetPixel
-
-#define XMesaSetForeground XSetForeground
-#define XMesaSetBackground XSetBackground
-#define XMesaSetPlaneMask XSetPlaneMask
-#define XMesaSetFunction XSetFunction
-#define XMesaSetFillStyle XSetFillStyle
-#define XMesaSetTile XSetTile
-
-#define XMesaDrawPoint XDrawPoint
-#define XMesaDrawPoints XDrawPoints
-#define XMesaDrawLine XDrawLine
-#define XMesaFillRectangle XFillRectangle
-#define XMesaGetImage XGetImage
-#define XMesaPutImage XPutImage
-#define XMesaCopyArea XCopyArea
-
-#define XMesaCreatePixmap XCreatePixmap
-#define XMesaFreePixmap XFreePixmap
-#define XMesaFreeGC XFreeGC
-
-#define GET_COLORMAP_SIZE(__v) __v->visinfo->colormap_size
-#define GET_REDMASK(__v) __v->mesa_visual.redMask
-#define GET_GREENMASK(__v) __v->mesa_visual.greenMask
-#define GET_BLUEMASK(__v) __v->mesa_visual.blueMask
-#define GET_VISUAL_DEPTH(__v) __v->visinfo->depth
-#define GET_BLACK_PIXEL(__v) BlackPixel(__v->display, __v->mesa_visual.screen)
-#define CHECK_BYTE_ORDER(__v) host_byte_order()==ImageByteOrder(__v->display)
-#define CHECK_FOR_HPCR(__v) XInternAtom(__v->display, "_HP_RGB_SMOOTH_MAP_LIST", True)
-
-#endif
diff --git a/include/GL/xmesa_xf86.h b/include/GL/xmesa_xf86.h
deleted file mode 100644
index 10f93c3ab62..00000000000
--- a/include/GL/xmesa_xf86.h
+++ /dev/null
@@ -1,198 +0,0 @@
-
-/**************************************************************************
-
-Copyright 1998-1999 Precision Insight, Inc., Cedar Park, Texas.
-All Rights Reserved.
-
-Permission is hereby granted, free of charge, to any person obtaining a
-copy of this software and associated documentation files (the
-"Software"), to deal in the Software without restriction, including
-without limitation the rights to use, copy, modify, merge, publish,
-distribute, sub license, and/or sell copies of the Software, and to
-permit persons to whom the Software is furnished to do so, subject to
-the following conditions:
-
-The above copyright notice and this permission notice (including the
-next paragraph) shall be included in all copies or substantial portions
-of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
-OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
-IN NO EVENT SHALL PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR
-ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
-TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
-SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
-**************************************************************************/
-
-/*
- * Authors:
- * Kevin E. Martin
- *
- * When we're building the XMesa driver for use in the X server (as the
- * indirect render) we include this file when building the xm_*.c files.
- * We need to define some types and macros differently when building
- * in the Xserver vs. stand-alone Mesa.
- */
-
-#ifndef _XMESA_XF86_H_
-#define _XMESA_XF86_H_
-
-#include "GL/glxtokens.h"
-#include "scrnintstr.h"
-#include "pixmapstr.h"
-#include "gcstruct.h"
-#include "servermd.h"
-
-
-typedef struct _XMesaImageRec {
- int width, height;
- char *data;
- int bytes_per_line; /* Padded to 32 bits */
- int bits_per_pixel;
-} XMesaImage;
-
-typedef ScreenRec XMesaDisplay;
-typedef PixmapPtr XMesaPixmap;
-typedef ColormapPtr XMesaColormap;
-typedef DrawablePtr XMesaDrawable;
-typedef WindowPtr XMesaWindow;
-typedef GCPtr XMesaGC;
-typedef VisualPtr XMesaVisualInfo;
-typedef DDXPointRec XMesaPoint;
-typedef xColorItem XMesaColor;
-
-#define XMesaSetGeneric(__d,__gc,__val,__mask) \
-do { \
- CARD32 __v[1]; \
- (void) __d; \
- __v[0] = __val; \
- dixChangeGC(NullClient, __gc, __mask, __v, NULL); \
-} while (0)
-
-#define XMesaSetGenericPtr(__d,__gc,__pval,__mask) \
-do { \
- ChangeGCVal __v[1]; \
- (void) __d; \
- __v[0].ptr = __pval; \
- dixChangeGC(NullClient, __gc, __mask, NULL, __v); \
-} while (0)
-
-#define XMesaSetForeground(d,gc,v) XMesaSetGeneric(d,gc,v,GCForeground)
-#define XMesaSetBackground(d,gc,v) XMesaSetGeneric(d,gc,v,GCBackground)
-#define XMesaSetPlaneMask(d,gc,v) XMesaSetGeneric(d,gc,v,GCPlaneMask)
-#define XMesaSetFunction(d,gc,v) XMesaSetGeneric(d,gc,v,GCFunction)
-#define XMesaSetFillStyle(d,gc,v) XMesaSetGeneric(d,gc,v,GCFillStyle)
-
-#define XMesaSetTile(d,gc,v) XMesaSetGenericPtr(d,gc,v,GCTile)
-
-#define XMesaDrawPoint(__d,__b,__gc,__x,__y) \
-do { \
- XMesaPoint __p[1]; \
- (void) __d; \
- __p[0].x = __x; \
- __p[0].y = __y; \
- ValidateGC(__b, __gc); \
- (*gc->ops->PolyPoint)(__b, __gc, CoordModeOrigin, 1, __p); \
-} while (0)
-
-#define XMesaDrawPoints(__d,__b,__gc,__p,__n,__m) \
-do { \
- (void) __d; \
- ValidateGC(__b, __gc); \
- (*gc->ops->PolyPoint)(__b, __gc, __m, __n, __p); \
-} while (0)
-
-#define XMesaDrawLine(__d, __b, __gc, __x0, __y0, __x1, __y1) \
-do { \
- XMesaPoint __p[2]; \
- (void) __d; \
- __p[0].x = __x0; \
- __p[0].y = __y0; \
- __p[1].x = __x1; \
- __p[1].y = __y1; \
- ValidateGC(__b, __gc); \
- (*gc->ops->PolyLines)(__b, __gc, CoordModeOrigin, 2, __p); \
-} while (0)
-
-#define XMesaFillRectangle(__d,__b,__gc,__x,__y,__w,__h) \
-do { \
- xRectangle __r[1]; \
- (void) __d; \
- ValidateGC((DrawablePtr)__b, __gc); \
- __r[0].x = __x; \
- __r[0].y = __y; \
- __r[0].width = __w; \
- __r[0].height = __h; \
- (*__gc->ops->PolyFillRect)((DrawablePtr)__b, __gc, 1, __r); \
-} while (0)
-
-static _X_INLINE XMesaImage *XMesaGetImage(XMesaDisplay *dpy, PixmapPtr p, int x,
- int y, unsigned int width,
- unsigned int height,
- unsigned long plane_mask, int format)
-{
- XMesaImage *img = Xcalloc(sizeof(*img));
-
- img->width = p->drawable.width;
- img->height = p->drawable.height;
- img->bits_per_pixel = p->drawable.bitsPerPixel;
- img->bytes_per_line = PixmapBytePad(width, p->drawable.depth);
- img->data = malloc(height * img->bytes_per_line);
-
- /* Assumes: Images are always in ZPixmap format */
- (*p->drawable.pScreen->GetImage)(&p->drawable, x, y, width, height,
- plane_mask, ZPixmap, img->data);
-
- return img;
-}
-
-#define XMesaPutImage(__d,__b,__gc,__i,__sx,__sy,__x,__y,__w,__h) \
-do { \
- /* Assumes: Images are always in ZPixmap format */ \
- (void) __d; \
- ASSERT(!__sx && !__sy); /* The SubImage case */ \
- ValidateGC(__b, __gc); \
- (*__gc->ops->PutImage)(__b, __gc, ((XMesaDrawable)(__b))->depth, \
- __x, __y, __w, __h, 0, ZPixmap, \
- ((XMesaImage *)(__i))->data); \
-} while (0)
-
-#define XMesaCopyArea(__d,__sb,__db,__gc,__sx,__sy,__w,__h,__x,__y) \
-do { \
- (void) __d; \
- ValidateGC(__db, __gc); \
- (*__gc->ops->CopyArea)((DrawablePtr)__sb, __db, __gc, \
- __sx, __sy, __w, __h, __x, __y); \
-} while (0)
-
-
-/* CreatePixmap returns a PixmapPtr; so, it cannot be inside braces */
-#ifdef CREATE_PIXMAP_USAGE_SCRATCH
-#define XMesaCreatePixmap(__d,__b,__w,__h,__depth) \
- (*__d->CreatePixmap)(__d, __w, __h, __depth, 0)
-#else
-#define XMesaCreatePixmap(__d,__b,__w,__h,__depth) \
- (*__d->CreatePixmap)(__d, __w, __h, __depth)
-#endif
-
-#define XMesaFreePixmap(__d,__b) \
- (*__d->DestroyPixmap)(__b)
-
-#define XMesaFreeGC(__d,__gc) \
-do { \
- (void) __d; \
- FreeScratchGC(__gc); \
-} while (0)
-
-#define GET_COLORMAP_SIZE(__v) __v->ColormapEntries
-#define GET_REDMASK(__v) __v->mesa_visual.redMask
-#define GET_GREENMASK(__v) __v->mesa_visual.greenMask
-#define GET_BLUEMASK(__v) __v->mesa_visual.blueMask
-#define GET_VISUAL_DEPTH(__v) __v->nplanes
-#define GET_BLACK_PIXEL(__v) __v->display->blackPixel
-#define CHECK_BYTE_ORDER(__v) GL_TRUE
-#define CHECK_FOR_HPCR(__v) GL_FALSE
-
-#endif
diff --git a/src/mesa/drivers/x11/fakeglx.c b/src/mesa/drivers/x11/fakeglx.c
index 827d39f9957..ea3585258d8 100644
--- a/src/mesa/drivers/x11/fakeglx.c
+++ b/src/mesa/drivers/x11/fakeglx.c
@@ -42,7 +42,6 @@
#include "glxheader.h"
#include "glxapi.h"
-#include "GL/xmesa.h"
#include "main/context.h"
#include "main/config.h"
#include "main/macros.h"
diff --git a/src/mesa/drivers/x11/xm_api.c b/src/mesa/drivers/x11/xm_api.c
index c9009bad031..18aa8bcc096 100644
--- a/src/mesa/drivers/x11/xm_api.c
+++ b/src/mesa/drivers/x11/xm_api.c
@@ -63,7 +63,6 @@
#endif
#include "glxheader.h"
-#include "GL/xmesa.h"
#include "xmesaP.h"
#include "main/context.h"
#include "main/extensions.h"
diff --git a/src/mesa/drivers/x11/xm_buffer.c b/src/mesa/drivers/x11/xm_buffer.c
index f104d44d051..7ad67bc34da 100644
--- a/src/mesa/drivers/x11/xm_buffer.c
+++ b/src/mesa/drivers/x11/xm_buffer.c
@@ -30,7 +30,6 @@
#include "glxheader.h"
-#include "GL/xmesa.h"
#include "xmesaP.h"
#include "main/imports.h"
#include "main/framebuffer.h"
diff --git a/src/mesa/drivers/x11/xmesa.h b/src/mesa/drivers/x11/xmesa.h
new file mode 100644
index 00000000000..98139af8336
--- /dev/null
+++ b/src/mesa/drivers/x11/xmesa.h
@@ -0,0 +1,424 @@
+/*
+ * Mesa 3-D graphics library
+ * Version: 7.1
+ *
+ * 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"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included
+ * in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+ * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+
+/*
+ * Mesa/X11 interface. This header file serves as the documentation for
+ * the Mesa/X11 interface functions.
+ *
+ * Note: this interface isn't intended for user programs. It's primarily
+ * just for implementing the pseudo-GLX interface.
+ */
+
+
+/* Sample Usage:
+
+In addition to the usual X calls to select a visual, create a colormap
+and create a window, you must do the following to use the X/Mesa interface:
+
+1. Call XMesaCreateVisual() to make an XMesaVisual from an XVisualInfo.
+
+2. Call XMesaCreateContext() to create an X/Mesa rendering context, given
+ the XMesaVisual.
+
+3. Call XMesaCreateWindowBuffer() to create an XMesaBuffer from an X window
+ and XMesaVisual.
+
+4. Call XMesaMakeCurrent() to bind the XMesaBuffer to an XMesaContext and
+ to make the context the current one.
+
+5. Make gl* calls to render your graphics.
+
+6. Use XMesaSwapBuffers() when double buffering to swap front/back buffers.
+
+7. Before the X window is destroyed, call XMesaDestroyBuffer().
+
+8. Before exiting, call XMesaDestroyVisual and XMesaDestroyContext.
+
+*/
+
+
+
+
+#ifndef XMESA_H
+#define XMESA_H
+
+#ifdef __VMS
+#include
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#ifdef XFree86Server
+#include "xmesa_xf86.h"
+#else
+#include
+#include
+#include "xmesa_x.h"
+#endif
+#include "GL/gl.h"
+
+#ifdef AMIWIN
+#include
+extern struct Library *XLibBase;
+#endif
+
+
+#define XMESA_MAJOR_VERSION 6
+#define XMESA_MINOR_VERSION 3
+
+
+
+/*
+ * Values passed to XMesaGetString:
+ */
+#define XMESA_VERSION 1
+#define XMESA_EXTENSIONS 2
+
+
+/*
+ * Values passed to XMesaSetFXmode:
+ */
+#define XMESA_FX_WINDOW 1
+#define XMESA_FX_FULLSCREEN 2
+
+
+
+typedef struct xmesa_context *XMesaContext;
+
+typedef struct xmesa_visual *XMesaVisual;
+
+typedef struct xmesa_buffer *XMesaBuffer;
+
+
+
+/*
+ * Create a new X/Mesa visual.
+ * Input: display - X11 display
+ * visinfo - an XVisualInfo pointer
+ * rgb_flag - GL_TRUE = RGB mode,
+ * GL_FALSE = color index mode
+ * alpha_flag - alpha buffer requested?
+ * db_flag - GL_TRUE = double-buffered,
+ * GL_FALSE = single buffered
+ * stereo_flag - stereo visual?
+ * ximage_flag - GL_TRUE = use an XImage for back buffer,
+ * GL_FALSE = use an off-screen pixmap for back buffer
+ * depth_size - requested bits/depth values, or zero
+ * stencil_size - requested bits/stencil values, or zero
+ * accum_red_size - requested bits/red accum values, or zero
+ * accum_green_size - requested bits/green accum values, or zero
+ * accum_blue_size - requested bits/blue accum values, or zero
+ * accum_alpha_size - requested bits/alpha accum values, or zero
+ * num_samples - number of samples/pixel if multisampling, or zero
+ * level - visual level, usually 0
+ * visualCaveat - ala the GLX extension, usually GLX_NONE_EXT
+ * Return; a new XMesaVisual or 0 if error.
+ */
+extern XMesaVisual XMesaCreateVisual( XMesaDisplay *display,
+ XMesaVisualInfo visinfo,
+ GLboolean rgb_flag,
+ GLboolean alpha_flag,
+ GLboolean db_flag,
+ GLboolean stereo_flag,
+ GLboolean ximage_flag,
+ GLint depth_size,
+ GLint stencil_size,
+ GLint accum_red_size,
+ GLint accum_green_size,
+ GLint accum_blue_size,
+ GLint accum_alpha_size,
+ GLint num_samples,
+ GLint level,
+ GLint visualCaveat );
+
+/*
+ * Destroy an XMesaVisual, but not the associated XVisualInfo.
+ */
+extern void XMesaDestroyVisual( XMesaVisual v );
+
+
+
+/*
+ * Create a new XMesaContext for rendering into an X11 window.
+ *
+ * Input: visual - an XMesaVisual
+ * share_list - another XMesaContext with which to share display
+ * lists or NULL if no sharing is wanted.
+ * Return: an XMesaContext or NULL if error.
+ */
+extern XMesaContext XMesaCreateContext( XMesaVisual v,
+ XMesaContext share_list );
+
+
+/*
+ * Destroy a rendering context as returned by XMesaCreateContext()
+ */
+extern void XMesaDestroyContext( XMesaContext c );
+
+
+#ifdef XFree86Server
+/*
+ * These are the extra routines required for integration with XFree86.
+ * None of these routines should be user visible. -KEM
+ */
+extern GLboolean XMesaForceCurrent( XMesaContext c );
+
+extern GLboolean XMesaLoseCurrent( XMesaContext c );
+
+extern GLboolean XMesaCopyContext( XMesaContext src,
+ XMesaContext dst,
+ GLuint mask );
+#endif /* XFree86Server */
+
+
+/*
+ * Create an XMesaBuffer from an X window.
+ */
+extern XMesaBuffer XMesaCreateWindowBuffer( XMesaVisual v, XMesaWindow w );
+
+
+/*
+ * Create an XMesaBuffer from an X pixmap.
+ */
+extern XMesaBuffer XMesaCreatePixmapBuffer( XMesaVisual v,
+ XMesaPixmap p,
+ XMesaColormap cmap );
+
+
+/*
+ * Destroy an XMesaBuffer, but not the corresponding window or pixmap.
+ */
+extern void XMesaDestroyBuffer( XMesaBuffer b );
+
+
+/*
+ * Return the XMesaBuffer handle which corresponds to an X drawable, if any.
+ *
+ * New in Mesa 2.3.
+ */
+extern XMesaBuffer XMesaFindBuffer( XMesaDisplay *dpy,
+ XMesaDrawable d );
+
+
+
+/*
+ * Bind a buffer to a context and make the context the current one.
+ */
+extern GLboolean XMesaMakeCurrent( XMesaContext c,
+ XMesaBuffer b );
+
+
+/*
+ * Bind two buffers (read and draw) to a context and make the
+ * context the current one.
+ * New in Mesa 3.3
+ */
+extern GLboolean XMesaMakeCurrent2( XMesaContext c,
+ XMesaBuffer drawBuffer,
+ XMesaBuffer readBuffer );
+
+
+/*
+ * Unbind the current context from its buffer.
+ */
+extern GLboolean XMesaUnbindContext( XMesaContext c );
+
+
+/*
+ * Return a handle to the current context.
+ */
+extern XMesaContext XMesaGetCurrentContext( void );
+
+
+/*
+ * Return handle to the current (draw) buffer.
+ */
+extern XMesaBuffer XMesaGetCurrentBuffer( void );
+
+
+/*
+ * Return handle to the current read buffer.
+ * New in Mesa 3.3
+ */
+extern XMesaBuffer XMesaGetCurrentReadBuffer( void );
+
+
+/*
+ * Swap the front and back buffers for the given buffer. No action is
+ * taken if the buffer is not double buffered.
+ */
+extern void XMesaSwapBuffers( XMesaBuffer b );
+
+
+/*
+ * Copy a sub-region of the back buffer to the front buffer.
+ *
+ * New in Mesa 2.6
+ */
+extern void XMesaCopySubBuffer( XMesaBuffer b,
+ int x,
+ int y,
+ int width,
+ int height );
+
+
+/*
+ * Return a pointer to the the Pixmap or XImage being used as the back
+ * color buffer of an XMesaBuffer. This function is a way to get "under
+ * the hood" of X/Mesa so one can manipulate the back buffer directly.
+ * Input: b - the XMesaBuffer
+ * Output: pixmap - pointer to back buffer's Pixmap, or 0
+ * ximage - pointer to back buffer's XImage, or NULL
+ * Return: GL_TRUE = context is double buffered
+ * GL_FALSE = context is single buffered
+ */
+extern GLboolean XMesaGetBackBuffer( XMesaBuffer b,
+ XMesaPixmap *pixmap,
+ XMesaImage **ximage );
+
+
+
+/*
+ * Return the depth buffer associated with an XMesaBuffer.
+ * Input: b - the XMesa buffer handle
+ * Output: width, height - size of buffer in pixels
+ * bytesPerValue - bytes per depth value (2 or 4)
+ * buffer - pointer to depth buffer values
+ * Return: GL_TRUE or GL_FALSE to indicate success or failure.
+ *
+ * New in Mesa 2.4.
+ */
+extern GLboolean XMesaGetDepthBuffer( XMesaBuffer b,
+ GLint *width,
+ GLint *height,
+ GLint *bytesPerValue,
+ void **buffer );
+
+
+
+/*
+ * Flush/sync a context
+ */
+extern void XMesaFlush( XMesaContext c );
+
+
+
+/*
+ * Get an X/Mesa-specific string.
+ * Input: name - either XMESA_VERSION or XMESA_EXTENSIONS
+ */
+extern const char *XMesaGetString( XMesaContext c, int name );
+
+
+
+/*
+ * Scan for XMesaBuffers whose window/pixmap has been destroyed, then free
+ * any memory used by that buffer.
+ *
+ * New in Mesa 2.3.
+ */
+extern void XMesaGarbageCollect( void );
+
+
+
+/*
+ * Return a dithered pixel value.
+ * Input: c - XMesaContext
+ * x, y - window coordinate
+ * red, green, blue, alpha - color components in [0,1]
+ * Return: pixel value
+ *
+ * New in Mesa 2.3.
+ */
+extern unsigned long XMesaDitherColor( XMesaContext xmesa,
+ GLint x,
+ GLint y,
+ GLfloat red,
+ GLfloat green,
+ GLfloat blue,
+ GLfloat alpha );
+
+
+
+/*
+ * 3Dfx Glide driver only!
+ * Set 3Dfx/Glide full-screen or window rendering mode.
+ * Input: mode - either XMESA_FX_WINDOW (window rendering mode) or
+ * XMESA_FX_FULLSCREEN (full-screen rendering mode)
+ * Return: GL_TRUE if success
+ * GL_FALSE if invalid mode or if not using 3Dfx driver
+ *
+ * New in Mesa 2.6.
+ */
+extern GLboolean XMesaSetFXmode( GLint mode );
+
+
+
+/*
+ * Reallocate the back/depth/stencil/accum/etc/ buffers associated with
+ * buffer if its size has changed.
+ *
+ * New in Mesa 4.0.2
+ */
+extern void XMesaResizeBuffers( XMesaBuffer b );
+
+
+
+/*
+ * Create a pbuffer.
+ * New in Mesa 4.1
+ */
+extern XMesaBuffer XMesaCreatePBuffer(XMesaVisual v, XMesaColormap cmap,
+ unsigned int width, unsigned int height);
+
+
+
+/*
+ * Texture from Pixmap
+ * New in Mesa 7.1
+ */
+extern void
+XMesaBindTexImage(XMesaDisplay *dpy, XMesaBuffer drawable, int buffer,
+ const int *attrib_list);
+
+extern void
+XMesaReleaseTexImage(XMesaDisplay *dpy, XMesaBuffer drawable, int buffer);
+
+
+extern XMesaBuffer
+XMesaCreatePixmapTextureBuffer(XMesaVisual v, XMesaPixmap p,
+ XMesaColormap cmap,
+ int format, int target, int mipmap);
+
+
+
+#ifdef __cplusplus
+}
+#endif
+
+
+#endif
diff --git a/src/mesa/drivers/x11/xmesaP.h b/src/mesa/drivers/x11/xmesaP.h
index 98867ac7106..6a6c9ef6004 100644
--- a/src/mesa/drivers/x11/xmesaP.h
+++ b/src/mesa/drivers/x11/xmesaP.h
@@ -27,7 +27,7 @@
#define XMESAP_H
-#include "GL/xmesa.h"
+#include "xmesa.h"
#include "main/mtypes.h"
#if defined(FX)
#include "GL/fxmesa.h"
diff --git a/src/mesa/drivers/x11/xmesa_x.h b/src/mesa/drivers/x11/xmesa_x.h
new file mode 100644
index 00000000000..865bab4313b
--- /dev/null
+++ b/src/mesa/drivers/x11/xmesa_x.h
@@ -0,0 +1,86 @@
+
+/**************************************************************************
+
+Copyright 1998-1999 Precision Insight, Inc., Cedar Park, Texas.
+All Rights Reserved.
+
+Permission is hereby granted, free of charge, to any person obtaining a
+copy of this software and associated documentation files (the
+"Software"), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sub license, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice (including the
+next paragraph) shall be included in all copies or substantial portions
+of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
+IN NO EVENT SHALL PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR
+ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+**************************************************************************/
+
+/*
+ * Authors:
+ * Kevin E. Martin
+ *
+ * When we're building the XMesa driver for stand-alone Mesa we
+ * include this file when building the xm_*.c files.
+ * We need to define some types and macros differently when building
+ * in the Xserver vs. stand-alone Mesa.
+ */
+
+#ifndef _XMESA_X_H_
+#define _XMESA_X_H_
+
+typedef Display XMesaDisplay;
+typedef Pixmap XMesaPixmap;
+typedef Colormap XMesaColormap;
+typedef Drawable XMesaDrawable;
+typedef Window XMesaWindow;
+typedef GC XMesaGC;
+typedef XVisualInfo *XMesaVisualInfo;
+typedef XImage XMesaImage;
+typedef XPoint XMesaPoint;
+typedef XColor XMesaColor;
+
+#define XMesaDestroyImage XDestroyImage
+
+#define XMesaPutPixel XPutPixel
+#define XMesaGetPixel XGetPixel
+
+#define XMesaSetForeground XSetForeground
+#define XMesaSetBackground XSetBackground
+#define XMesaSetPlaneMask XSetPlaneMask
+#define XMesaSetFunction XSetFunction
+#define XMesaSetFillStyle XSetFillStyle
+#define XMesaSetTile XSetTile
+
+#define XMesaDrawPoint XDrawPoint
+#define XMesaDrawPoints XDrawPoints
+#define XMesaDrawLine XDrawLine
+#define XMesaFillRectangle XFillRectangle
+#define XMesaGetImage XGetImage
+#define XMesaPutImage XPutImage
+#define XMesaCopyArea XCopyArea
+
+#define XMesaCreatePixmap XCreatePixmap
+#define XMesaFreePixmap XFreePixmap
+#define XMesaFreeGC XFreeGC
+
+#define GET_COLORMAP_SIZE(__v) __v->visinfo->colormap_size
+#define GET_REDMASK(__v) __v->mesa_visual.redMask
+#define GET_GREENMASK(__v) __v->mesa_visual.greenMask
+#define GET_BLUEMASK(__v) __v->mesa_visual.blueMask
+#define GET_VISUAL_DEPTH(__v) __v->visinfo->depth
+#define GET_BLACK_PIXEL(__v) BlackPixel(__v->display, __v->mesa_visual.screen)
+#define CHECK_BYTE_ORDER(__v) host_byte_order()==ImageByteOrder(__v->display)
+#define CHECK_FOR_HPCR(__v) XInternAtom(__v->display, "_HP_RGB_SMOOTH_MAP_LIST", True)
+
+#endif
diff --git a/src/mesa/drivers/x11/xmesa_xf86.h b/src/mesa/drivers/x11/xmesa_xf86.h
new file mode 100644
index 00000000000..10f93c3ab62
--- /dev/null
+++ b/src/mesa/drivers/x11/xmesa_xf86.h
@@ -0,0 +1,198 @@
+
+/**************************************************************************
+
+Copyright 1998-1999 Precision Insight, Inc., Cedar Park, Texas.
+All Rights Reserved.
+
+Permission is hereby granted, free of charge, to any person obtaining a
+copy of this software and associated documentation files (the
+"Software"), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sub license, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice (including the
+next paragraph) shall be included in all copies or substantial portions
+of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
+IN NO EVENT SHALL PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR
+ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+**************************************************************************/
+
+/*
+ * Authors:
+ * Kevin E. Martin
+ *
+ * When we're building the XMesa driver for use in the X server (as the
+ * indirect render) we include this file when building the xm_*.c files.
+ * We need to define some types and macros differently when building
+ * in the Xserver vs. stand-alone Mesa.
+ */
+
+#ifndef _XMESA_XF86_H_
+#define _XMESA_XF86_H_
+
+#include "GL/glxtokens.h"
+#include "scrnintstr.h"
+#include "pixmapstr.h"
+#include "gcstruct.h"
+#include "servermd.h"
+
+
+typedef struct _XMesaImageRec {
+ int width, height;
+ char *data;
+ int bytes_per_line; /* Padded to 32 bits */
+ int bits_per_pixel;
+} XMesaImage;
+
+typedef ScreenRec XMesaDisplay;
+typedef PixmapPtr XMesaPixmap;
+typedef ColormapPtr XMesaColormap;
+typedef DrawablePtr XMesaDrawable;
+typedef WindowPtr XMesaWindow;
+typedef GCPtr XMesaGC;
+typedef VisualPtr XMesaVisualInfo;
+typedef DDXPointRec XMesaPoint;
+typedef xColorItem XMesaColor;
+
+#define XMesaSetGeneric(__d,__gc,__val,__mask) \
+do { \
+ CARD32 __v[1]; \
+ (void) __d; \
+ __v[0] = __val; \
+ dixChangeGC(NullClient, __gc, __mask, __v, NULL); \
+} while (0)
+
+#define XMesaSetGenericPtr(__d,__gc,__pval,__mask) \
+do { \
+ ChangeGCVal __v[1]; \
+ (void) __d; \
+ __v[0].ptr = __pval; \
+ dixChangeGC(NullClient, __gc, __mask, NULL, __v); \
+} while (0)
+
+#define XMesaSetForeground(d,gc,v) XMesaSetGeneric(d,gc,v,GCForeground)
+#define XMesaSetBackground(d,gc,v) XMesaSetGeneric(d,gc,v,GCBackground)
+#define XMesaSetPlaneMask(d,gc,v) XMesaSetGeneric(d,gc,v,GCPlaneMask)
+#define XMesaSetFunction(d,gc,v) XMesaSetGeneric(d,gc,v,GCFunction)
+#define XMesaSetFillStyle(d,gc,v) XMesaSetGeneric(d,gc,v,GCFillStyle)
+
+#define XMesaSetTile(d,gc,v) XMesaSetGenericPtr(d,gc,v,GCTile)
+
+#define XMesaDrawPoint(__d,__b,__gc,__x,__y) \
+do { \
+ XMesaPoint __p[1]; \
+ (void) __d; \
+ __p[0].x = __x; \
+ __p[0].y = __y; \
+ ValidateGC(__b, __gc); \
+ (*gc->ops->PolyPoint)(__b, __gc, CoordModeOrigin, 1, __p); \
+} while (0)
+
+#define XMesaDrawPoints(__d,__b,__gc,__p,__n,__m) \
+do { \
+ (void) __d; \
+ ValidateGC(__b, __gc); \
+ (*gc->ops->PolyPoint)(__b, __gc, __m, __n, __p); \
+} while (0)
+
+#define XMesaDrawLine(__d, __b, __gc, __x0, __y0, __x1, __y1) \
+do { \
+ XMesaPoint __p[2]; \
+ (void) __d; \
+ __p[0].x = __x0; \
+ __p[0].y = __y0; \
+ __p[1].x = __x1; \
+ __p[1].y = __y1; \
+ ValidateGC(__b, __gc); \
+ (*gc->ops->PolyLines)(__b, __gc, CoordModeOrigin, 2, __p); \
+} while (0)
+
+#define XMesaFillRectangle(__d,__b,__gc,__x,__y,__w,__h) \
+do { \
+ xRectangle __r[1]; \
+ (void) __d; \
+ ValidateGC((DrawablePtr)__b, __gc); \
+ __r[0].x = __x; \
+ __r[0].y = __y; \
+ __r[0].width = __w; \
+ __r[0].height = __h; \
+ (*__gc->ops->PolyFillRect)((DrawablePtr)__b, __gc, 1, __r); \
+} while (0)
+
+static _X_INLINE XMesaImage *XMesaGetImage(XMesaDisplay *dpy, PixmapPtr p, int x,
+ int y, unsigned int width,
+ unsigned int height,
+ unsigned long plane_mask, int format)
+{
+ XMesaImage *img = Xcalloc(sizeof(*img));
+
+ img->width = p->drawable.width;
+ img->height = p->drawable.height;
+ img->bits_per_pixel = p->drawable.bitsPerPixel;
+ img->bytes_per_line = PixmapBytePad(width, p->drawable.depth);
+ img->data = malloc(height * img->bytes_per_line);
+
+ /* Assumes: Images are always in ZPixmap format */
+ (*p->drawable.pScreen->GetImage)(&p->drawable, x, y, width, height,
+ plane_mask, ZPixmap, img->data);
+
+ return img;
+}
+
+#define XMesaPutImage(__d,__b,__gc,__i,__sx,__sy,__x,__y,__w,__h) \
+do { \
+ /* Assumes: Images are always in ZPixmap format */ \
+ (void) __d; \
+ ASSERT(!__sx && !__sy); /* The SubImage case */ \
+ ValidateGC(__b, __gc); \
+ (*__gc->ops->PutImage)(__b, __gc, ((XMesaDrawable)(__b))->depth, \
+ __x, __y, __w, __h, 0, ZPixmap, \
+ ((XMesaImage *)(__i))->data); \
+} while (0)
+
+#define XMesaCopyArea(__d,__sb,__db,__gc,__sx,__sy,__w,__h,__x,__y) \
+do { \
+ (void) __d; \
+ ValidateGC(__db, __gc); \
+ (*__gc->ops->CopyArea)((DrawablePtr)__sb, __db, __gc, \
+ __sx, __sy, __w, __h, __x, __y); \
+} while (0)
+
+
+/* CreatePixmap returns a PixmapPtr; so, it cannot be inside braces */
+#ifdef CREATE_PIXMAP_USAGE_SCRATCH
+#define XMesaCreatePixmap(__d,__b,__w,__h,__depth) \
+ (*__d->CreatePixmap)(__d, __w, __h, __depth, 0)
+#else
+#define XMesaCreatePixmap(__d,__b,__w,__h,__depth) \
+ (*__d->CreatePixmap)(__d, __w, __h, __depth)
+#endif
+
+#define XMesaFreePixmap(__d,__b) \
+ (*__d->DestroyPixmap)(__b)
+
+#define XMesaFreeGC(__d,__gc) \
+do { \
+ (void) __d; \
+ FreeScratchGC(__gc); \
+} while (0)
+
+#define GET_COLORMAP_SIZE(__v) __v->ColormapEntries
+#define GET_REDMASK(__v) __v->mesa_visual.redMask
+#define GET_GREENMASK(__v) __v->mesa_visual.greenMask
+#define GET_BLUEMASK(__v) __v->mesa_visual.blueMask
+#define GET_VISUAL_DEPTH(__v) __v->nplanes
+#define GET_BLACK_PIXEL(__v) __v->display->blackPixel
+#define CHECK_BYTE_ORDER(__v) GL_TRUE
+#define CHECK_FOR_HPCR(__v) GL_FALSE
+
+#endif
--
cgit v1.2.3
From d25cc16efa356a92f61f0b4836bcbd0b4cb606d2 Mon Sep 17 00:00:00 2001
From: Brian Paul
Date: Sat, 10 Jan 2009 12:00:27 -0700
Subject: mesa: remove the ancient include/GL/ugl*.h headers
---
include/GL/uglglutshapes.h | 45 -------------
include/GL/uglmesa.h | 155 ---------------------------------------------
2 files changed, 200 deletions(-)
delete mode 100644 include/GL/uglglutshapes.h
delete mode 100644 include/GL/uglmesa.h
diff --git a/include/GL/uglglutshapes.h b/include/GL/uglglutshapes.h
deleted file mode 100644
index 28192de2d52..00000000000
--- a/include/GL/uglglutshapes.h
+++ /dev/null
@@ -1,45 +0,0 @@
-/* uglglutshapes.h - Public header GLUT Shapes */
-
-/* Copyright (c) Mark J. Kilgard, 1994, 1995, 1996, 1998. */
-
-/* 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. */
-
-#ifndef GLUTSHAPES_H
-#define GLUTSHAPES_H
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#include
-
-void glutWireSphere (GLdouble radius, GLint slices, GLint stacks);
-void glutSolidSphere (GLdouble radius, GLint slices, GLint stacks);
-void glutWireCone (GLdouble base, GLdouble height,
- GLint slices, GLint stacks);
-void glutSolidCone (GLdouble base, GLdouble height,
- GLint slices, GLint stacks);
-void glutWireCube (GLdouble size);
-void glutSolidCube (GLdouble size);
-void glutWireTorus (GLdouble innerRadius, GLdouble outerRadius,
- GLint sides, GLint rings);
-void glutSolidTorus (GLdouble innerRadius, GLdouble outerRadius,
- GLint sides, GLint rings);
-void glutWireDodecahedron (void);
-void glutSolidDodecahedron (void);
-void glutWireOctahedron (void);
-void glutSolidOctahedron (void);
-void glutWireTetrahedron (void);
-void glutSolidTetrahedron (void);
-void glutWireIcosahedron (void);
-void glutSolidIcosahedron (void);
-void glutWireTeapot (GLdouble size);
-void glutSolidTeapot (GLdouble size);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
diff --git a/include/GL/uglmesa.h b/include/GL/uglmesa.h
deleted file mode 100644
index 7ef5843504e..00000000000
--- a/include/GL/uglmesa.h
+++ /dev/null
@@ -1,155 +0,0 @@
-/* uglmesa.h - Public header UGL/Mesa */
-
-/* Copyright (C) 2001 by Wind River Systems, Inc */
-
-/*
- * Mesa 3-D graphics library
- * Version: 4.0
- *
- * The MIT License
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included
- * in all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
- * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * THE AUTHORS OR COPYRIGHT BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
- * DEALINGS IN THE SOFTWARE.
- */
-
-/*
- * Author:
- * Stephane Raimbault
- */
-
-#ifndef UGLMESA_H
-#define UGLMESA_H
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#define UGL_MESA_MAJOR_VERSION 4
-#define UGL_MESA_MINOR_VERSION 0
-
-#include
-#include
-
-/*
- * Values for display mode of uglMesaCreateContext ()
- */
-
-/*
- * With these mask values, it's possible to test double buffer mode
- * with UGL_MESA_DOUBLE mask
- *
- * SINGLE 0000 0001
- * DOUBLE 0000 0110
- * - SOFT 0000 0010
- * - HARD 0000 0100
- * WINDML 0001 0000
- *
- *
- */
-#define UGL_MESA_SINGLE 0x01
-#define UGL_MESA_DOUBLE 0x06
-#define UGL_MESA_DOUBLE_SOFTWARE 0x02
-#define UGL_MESA_DOUBLE_HARDWARE 0x04
-
-#define UGL_MESA_WINDML_EXCLUSIVE 0x10
-
-#define UGL_MESA_FULLSCREEN_WIDTH 0x0
-#define UGL_MESA_FULLSCREEN_HEIGHT 0x0
-
-/*
- * uglMesaPixelStore() parameters:
- */
-
-#define UGL_MESA_ROW_LENGTH 0x20
-#define UGL_MESA_Y_UP 0x21
-
-/*
- * Accepted by uglMesaGetIntegerv:
- */
-
-#define UGL_MESA_LEFT_X 0x01
-#define UGL_MESA_TOP_Y 0x02
-#define UGL_MESA_WIDTH 0x03
-#define UGL_MESA_HEIGHT 0x04
-#define UGL_MESA_DISPLAY_WIDTH 0x05
-#define UGL_MESA_DISPLAY_HEIGHT 0x06
-#define UGL_MESA_COLOR_FORMAT 0x07
-#define UGL_MESA_COLOR_MODEL 0x08
-#define UGL_MESA_PIXEL_FORMAT 0x09
-#define UGL_MESA_TYPE 0x0A
-#define UGL_MESA_RGB 0x0B
-#define UGL_MESA_COLOR_INDEXED 0x0C
-#define UGL_MESA_SINGLE_BUFFER 0x0D
-#define UGL_MESA_DOUBLE_BUFFER 0x0E
-#define UGL_MESA_DOUBLE_BUFFER_SOFTWARE 0x0F
-#define UGL_MESA_DOUBLE_BUFFER_HARDWARE 0x10
-
-/*
- * typedefs
- */
-
-typedef struct uglMesaContext * UGL_MESA_CONTEXT;
-
-UGL_MESA_CONTEXT uglMesaCreateNewContext (GLenum mode,
- UGL_MESA_CONTEXT share_list);
-
-UGL_MESA_CONTEXT uglMesaCreateNewContextExt (GLenum mode,
- GLint depth_bits,
- GLint stencil_bits,
- GLint accum_red_bits,
- GLint accum_green_bits,
- GLint accum_blue_bits,
- GLint accum_alpha_bits,
- UGL_MESA_CONTEXT share_list);
-
-GLboolean uglMesaMakeCurrentContext (UGL_MESA_CONTEXT umc,
- GLsizei left, GLsizei top,
- GLsizei width, GLsizei height);
-
-GLboolean uglMesaMoveWindow (GLsizei dx, GLsizei dy);
-
-GLboolean uglMesaMoveToWindow (GLsizei left, GLsizei top);
-
-GLboolean uglMesaResizeWindow (GLsizei dw, GLsizei dh);
-
-GLboolean uglMesaResizeToWindow (GLsizei width, GLsizei height);
-
-void uglMesaDestroyContext (void);
-
-UGL_MESA_CONTEXT uglMesaGetCurrentContext (void);
-
-void uglMesaSwapBuffers (void);
-
-void uglMesaPixelStore (GLint pname, GLint value);
-
-void uglMesaGetIntegerv (GLint pname, GLint *value);
-
-GLboolean uglMesaGetDepthBuffer (GLint *width, GLint *height,
- GLint *bytesPerValue, void **buffer);
-
-GLboolean uglMesaGetColorBuffer (GLint *width, GLint *height,
- GLint *format, void **buffer);
-
-GLboolean uglMesaSetColor (GLubyte index, GLfloat red,
- GLfloat green, GLfloat blue);
-
-#ifdef __cplusplus
-}
-#endif
-
-
-#endif
--
cgit v1.2.3
From f5979b0c159d1d3839caf86072639f5d96a5b0b5 Mon Sep 17 00:00:00 2001
From: Brian Paul
Date: Sat, 10 Jan 2009 12:01:40 -0700
Subject: mesa: deprecate the GL/fxmesa.h header
---
include/GL/fxmesa.h | 103 ------------------------------------------
src/mesa/drivers/x11/fxmesa.h | 103 ++++++++++++++++++++++++++++++++++++++++++
src/mesa/drivers/x11/xmesaP.h | 2 +-
3 files changed, 104 insertions(+), 104 deletions(-)
delete mode 100644 include/GL/fxmesa.h
create mode 100644 src/mesa/drivers/x11/fxmesa.h
diff --git a/include/GL/fxmesa.h b/include/GL/fxmesa.h
deleted file mode 100644
index f8e9661f9cc..00000000000
--- a/include/GL/fxmesa.h
+++ /dev/null
@@ -1,103 +0,0 @@
-/*
- * Mesa 3-D graphics library
- * Version: 4.0
- * Copyright (C) 1995-2001 Brian Paul
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Library General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public
- * License along with this library; if not, write to the Free
- * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- */
-
-
-/*
- * FXMesa - 3Dfx Glide driver for Mesa. Contributed by David Bucciarelli
- *
- * NOTE: This version requires Glide3 (http://sourceforge.net/projects/glide)
- */
-
-
-#ifndef FXMESA_H
-#define FXMESA_H
-
-
-#include
-
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-
-#define FXMESA_MAJOR_VERSION 6
-#define FXMESA_MINOR_VERSION 3
-
-
-/*
- * Values for attribList parameter to fxMesaCreateContext():
- */
-#define FXMESA_NONE 0 /* to terminate attribList */
-#define FXMESA_DOUBLEBUFFER 10
-#define FXMESA_ALPHA_SIZE 11 /* followed by an integer */
-#define FXMESA_DEPTH_SIZE 12 /* followed by an integer */
-#define FXMESA_STENCIL_SIZE 13 /* followed by an integer */
-#define FXMESA_ACCUM_SIZE 14 /* followed by an integer */
-#define FXMESA_COLORDEPTH 20 /* followed by an integer */
-#define FXMESA_SHARE_CONTEXT 990099 /* keep in sync with xmesa1.c! */
-
-
-
-typedef struct tfxMesaContext *fxMesaContext;
-
-
-#if defined (__BEOS__)
-#pragma export on
-#endif
-
-
-GLAPI fxMesaContext GLAPIENTRY fxMesaCreateContext(GLuint win, GrScreenResolution_t,
- GrScreenRefresh_t,
- const GLint attribList[]);
-
-GLAPI fxMesaContext GLAPIENTRY fxMesaCreateBestContext(GLuint win,
- GLint width, GLint height,
- const GLint attribList[]);
-GLAPI void GLAPIENTRY fxMesaDestroyContext(fxMesaContext ctx);
-
-GLAPI GLint GLAPIENTRY fxMesaSelectCurrentBoard(int n);
-
-GLAPI void GLAPIENTRY fxMesaMakeCurrent(fxMesaContext ctx);
-
-GLAPI fxMesaContext GLAPIENTRY fxMesaGetCurrentContext(void);
-
-GLAPI void GLAPIENTRY fxMesaSwapBuffers(void);
-
-GLAPI void GLAPIENTRY fxMesaSetNearFar(GLfloat nearVal, GLfloat farVal);
-
-GLAPI void GLAPIENTRY fxMesaUpdateScreenSize(fxMesaContext ctx);
-
-GLAPI void GLAPIENTRY fxCloseHardware(void);
-
-GLAPI void GLAPIENTRY fxGetScreenGeometry (GLint *w, GLint *h);
-
-
-#if defined (__BEOS__)
-#pragma export off
-#endif
-
-
-#ifdef __cplusplus
-}
-#endif
-
-
-#endif
diff --git a/src/mesa/drivers/x11/fxmesa.h b/src/mesa/drivers/x11/fxmesa.h
new file mode 100644
index 00000000000..f8e9661f9cc
--- /dev/null
+++ b/src/mesa/drivers/x11/fxmesa.h
@@ -0,0 +1,103 @@
+/*
+ * Mesa 3-D graphics library
+ * Version: 4.0
+ * Copyright (C) 1995-2001 Brian Paul
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+
+/*
+ * FXMesa - 3Dfx Glide driver for Mesa. Contributed by David Bucciarelli
+ *
+ * NOTE: This version requires Glide3 (http://sourceforge.net/projects/glide)
+ */
+
+
+#ifndef FXMESA_H
+#define FXMESA_H
+
+
+#include
+
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
+#define FXMESA_MAJOR_VERSION 6
+#define FXMESA_MINOR_VERSION 3
+
+
+/*
+ * Values for attribList parameter to fxMesaCreateContext():
+ */
+#define FXMESA_NONE 0 /* to terminate attribList */
+#define FXMESA_DOUBLEBUFFER 10
+#define FXMESA_ALPHA_SIZE 11 /* followed by an integer */
+#define FXMESA_DEPTH_SIZE 12 /* followed by an integer */
+#define FXMESA_STENCIL_SIZE 13 /* followed by an integer */
+#define FXMESA_ACCUM_SIZE 14 /* followed by an integer */
+#define FXMESA_COLORDEPTH 20 /* followed by an integer */
+#define FXMESA_SHARE_CONTEXT 990099 /* keep in sync with xmesa1.c! */
+
+
+
+typedef struct tfxMesaContext *fxMesaContext;
+
+
+#if defined (__BEOS__)
+#pragma export on
+#endif
+
+
+GLAPI fxMesaContext GLAPIENTRY fxMesaCreateContext(GLuint win, GrScreenResolution_t,
+ GrScreenRefresh_t,
+ const GLint attribList[]);
+
+GLAPI fxMesaContext GLAPIENTRY fxMesaCreateBestContext(GLuint win,
+ GLint width, GLint height,
+ const GLint attribList[]);
+GLAPI void GLAPIENTRY fxMesaDestroyContext(fxMesaContext ctx);
+
+GLAPI GLint GLAPIENTRY fxMesaSelectCurrentBoard(int n);
+
+GLAPI void GLAPIENTRY fxMesaMakeCurrent(fxMesaContext ctx);
+
+GLAPI fxMesaContext GLAPIENTRY fxMesaGetCurrentContext(void);
+
+GLAPI void GLAPIENTRY fxMesaSwapBuffers(void);
+
+GLAPI void GLAPIENTRY fxMesaSetNearFar(GLfloat nearVal, GLfloat farVal);
+
+GLAPI void GLAPIENTRY fxMesaUpdateScreenSize(fxMesaContext ctx);
+
+GLAPI void GLAPIENTRY fxCloseHardware(void);
+
+GLAPI void GLAPIENTRY fxGetScreenGeometry (GLint *w, GLint *h);
+
+
+#if defined (__BEOS__)
+#pragma export off
+#endif
+
+
+#ifdef __cplusplus
+}
+#endif
+
+
+#endif
diff --git a/src/mesa/drivers/x11/xmesaP.h b/src/mesa/drivers/x11/xmesaP.h
index 6a6c9ef6004..65e747d7b9d 100644
--- a/src/mesa/drivers/x11/xmesaP.h
+++ b/src/mesa/drivers/x11/xmesaP.h
@@ -30,7 +30,7 @@
#include "xmesa.h"
#include "main/mtypes.h"
#if defined(FX)
-#include "GL/fxmesa.h"
+#include "fxmesa.h"
#include "xm_glide.h"
#endif
#ifdef XFree86Server
--
cgit v1.2.3
From 287102ddcc72ae19f7e6b912205805c5e78771f7 Mon Sep 17 00:00:00 2001
From: Brian Paul
Date: Sat, 10 Jan 2009 12:04:39 -0700
Subject: mesa: deprecate GL/amesa.h header (allegro driver)
---
include/GL/amesa.h | 65 ----------------------------------------
src/mesa/drivers/allegro/amesa.c | 2 +-
src/mesa/drivers/allegro/amesa.h | 65 ++++++++++++++++++++++++++++++++++++++++
3 files changed, 66 insertions(+), 66 deletions(-)
delete mode 100644 include/GL/amesa.h
create mode 100644 src/mesa/drivers/allegro/amesa.h
diff --git a/include/GL/amesa.h b/include/GL/amesa.h
deleted file mode 100644
index 852d34cf4f5..00000000000
--- a/include/GL/amesa.h
+++ /dev/null
@@ -1,65 +0,0 @@
-/*
- * Mesa 3-D graphics library
- * Version: 3.3
- *
- * Copyright (C) 1999-2000 Brian Paul All Rights Reserved.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a
- * copy of this software and associated documentation files (the "Software"),
- * to deal in the Software without restriction, including without limitation
- * the rights to use, copy, modify, merge, publish, distribute, sublicense,
- * and/or sell copies of the Software, and to permit persons to whom the
- * Software is furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included
- * in all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
- * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
- * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
- * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- */
-
-
-/* Allegro (DJGPP) driver by Bernhard Tschirren (bernie-t@geocities.com) */
-
-
-#ifndef AMESA_H
-#define AMESA_H
-
-
-#define AMESA_MAJOR_VERSION 3
-#define AMESA_MINOR_VERSION 3
-
-
-typedef struct amesa_visual *AMesaVisual;
-typedef struct amesa_buffer *AMesaBuffer;
-typedef struct amesa_context *AMesaContext;
-
-
-extern AMesaVisual AMesaCreateVisual(GLboolean dbFlag, GLint depth,
- GLint depthSize,
- GLint stencilSize,
- GLint accumSize);
-
-extern void AMesaDestroyVisual(AMesaVisual visual);
-
-extern AMesaBuffer AMesaCreateBuffer(AMesaVisual visual,
- GLint width, GLint height);
-
-extern void AMesaDestroyBuffer(AMesaBuffer buffer);
-
-
-extern AMesaContext AMesaCreateContext(AMesaVisual visual,
- AMesaContext sharelist);
-
-extern void AMesaDestroyContext(AMesaContext context);
-
-extern GLboolean AMesaMakeCurrent(AMesaContext context, AMesaBuffer buffer);
-
-extern void AMesaSwapBuffers(AMesaBuffer buffer);
-
-
-#endif /* AMESA_H */
diff --git a/src/mesa/drivers/allegro/amesa.c b/src/mesa/drivers/allegro/amesa.c
index ade62518489..a9d8f62f92d 100644
--- a/src/mesa/drivers/allegro/amesa.c
+++ b/src/mesa/drivers/allegro/amesa.c
@@ -26,7 +26,7 @@
#include "main/imports.h"
#include "main/matrix.h"
#include "main/mtypes.h"
-#include "GL/amesa.h"
+#include "amesa.h"
struct amesa_visual
diff --git a/src/mesa/drivers/allegro/amesa.h b/src/mesa/drivers/allegro/amesa.h
new file mode 100644
index 00000000000..852d34cf4f5
--- /dev/null
+++ b/src/mesa/drivers/allegro/amesa.h
@@ -0,0 +1,65 @@
+/*
+ * Mesa 3-D graphics library
+ * Version: 3.3
+ *
+ * Copyright (C) 1999-2000 Brian Paul All Rights Reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included
+ * in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+ * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+
+/* Allegro (DJGPP) driver by Bernhard Tschirren (bernie-t@geocities.com) */
+
+
+#ifndef AMESA_H
+#define AMESA_H
+
+
+#define AMESA_MAJOR_VERSION 3
+#define AMESA_MINOR_VERSION 3
+
+
+typedef struct amesa_visual *AMesaVisual;
+typedef struct amesa_buffer *AMesaBuffer;
+typedef struct amesa_context *AMesaContext;
+
+
+extern AMesaVisual AMesaCreateVisual(GLboolean dbFlag, GLint depth,
+ GLint depthSize,
+ GLint stencilSize,
+ GLint accumSize);
+
+extern void AMesaDestroyVisual(AMesaVisual visual);
+
+extern AMesaBuffer AMesaCreateBuffer(AMesaVisual visual,
+ GLint width, GLint height);
+
+extern void AMesaDestroyBuffer(AMesaBuffer buffer);
+
+
+extern AMesaContext AMesaCreateContext(AMesaVisual visual,
+ AMesaContext sharelist);
+
+extern void AMesaDestroyContext(AMesaContext context);
+
+extern GLboolean AMesaMakeCurrent(AMesaContext context, AMesaBuffer buffer);
+
+extern void AMesaSwapBuffers(AMesaBuffer buffer);
+
+
+#endif /* AMESA_H */
--
cgit v1.2.3
From c3a00a728b15a13a33a38c8687ed6732c98d2260 Mon Sep 17 00:00:00 2001
From: Brian Paul
Date: Sat, 10 Jan 2009 12:06:29 -0700
Subject: mesa: remove deprecated headers from Makefile.am
---
include/GL/Makefile.am | 11 +++--------
1 file changed, 3 insertions(+), 8 deletions(-)
diff --git a/include/GL/Makefile.am b/include/GL/Makefile.am
index 199bd5c8f3c..ca528f606df 100644
--- a/include/GL/Makefile.am
+++ b/include/GL/Makefile.am
@@ -2,17 +2,12 @@
GLincludedir = $(includedir)/GL
-INC_FX = fxmesa.h
INC_GGI = ggimesa.h
INC_OSMESA = osmesa.h
INC_SVGA = svgamesa.h
-INC_X11 = glx.h glxext.h glx_mangle.h xmesa.h xmesa_x.h xmesa_xf86.h
+INC_X11 = glx.h glxext.h glx_mangle.h
INC_GLUT = glut.h glutf90.h
-if HAVE_FX
-sel_inc_fx = $(INC_FX)
-endif
-
if HAVE_GGI
sel_inc_ggi = $(INC_GGI)
endif
@@ -35,9 +30,9 @@ endif
EXTRA_HEADERS = amesa.h dosmesa.h foomesa.h glut_h.dja mesa_wgl.h mglmesa.h \
vms_x_fix.h wmesa.h \
- $(INC_FX) $(INC_GGI) $(INC_OSMESA) $(INC_SVGA) $(INC_X11) $(INC_GLUT)
+ $(INC_GGI) $(INC_OSMESA) $(INC_SVGA) $(INC_X11) $(INC_GLUT)
GLinclude_HEADERS = gl.h glext.h gl_mangle.h glu.h glu_mangle.h \
- $(sel_inc_fx) $(sel_inc_ggi) $(sel_inc_osmesa) $(sel_inc_svga) \
+ $(sel_inc_ggi) $(sel_inc_osmesa) $(sel_inc_svga) \
$(sel_inc_x11) $(sel_inc_glut)
include $(top_srcdir)/common_rules.make
--
cgit v1.2.3
From ef193c10e7b3f048abf5fce0d7dc4d72d94ba123 Mon Sep 17 00:00:00 2001
From: Brian Paul
Date: Sat, 10 Jan 2009 12:07:58 -0700
Subject: mesa: remove old GLView.h header for BeOS
---
include/GLView.h | 192 -------------------------------------------------------
1 file changed, 192 deletions(-)
delete mode 100644 include/GLView.h
diff --git a/include/GLView.h b/include/GLView.h
deleted file mode 100644
index 8d9d25bb1cb..00000000000
--- a/include/GLView.h
+++ /dev/null
@@ -1,192 +0,0 @@
-/*******************************************************************************
-/
-/ File: GLView.h
-/
-/ Copyright 1993-98, Be Incorporated, All Rights Reserved.
-/
-*******************************************************************************/
-
-#ifndef BGLVIEW_H
-#define BGLVIEW_H
-
-#include
-
-#define BGL_RGB 0
-#define BGL_INDEX 1
-#define BGL_SINGLE 0
-#define BGL_DOUBLE 2
-#define BGL_DIRECT 0
-#define BGL_INDIRECT 4
-#define BGL_ACCUM 8
-#define BGL_ALPHA 16
-#define BGL_DEPTH 32
-#define BGL_OVERLAY 64
-#define BGL_UNDERLAY 128
-#define BGL_STENCIL 512
-
-#ifdef __cplusplus
-
-
-#include
-#include
-#include
-#include
-#include
-#include
-
-class BGLView : public BView {
-public:
-
- BGLView(BRect rect, char *name,
- ulong resizingMode, ulong mode,
- ulong options);
-virtual ~BGLView();
-
- void LockGL();
- void UnlockGL();
- void SwapBuffers();
- void SwapBuffers( bool vSync );
- BView * EmbeddedView();
- status_t CopyPixelsOut(BPoint source, BBitmap *dest);
- status_t CopyPixelsIn(BBitmap *source, BPoint dest);
-virtual void ErrorCallback(unsigned long errorCode); // Mesa's GLenum is uint where Be's ones was ulong!
-
-virtual void Draw(BRect updateRect);
-
-virtual void AttachedToWindow();
-virtual void AllAttached();
-virtual void DetachedFromWindow();
-virtual void AllDetached();
-
-virtual void FrameResized(float width, float height);
-virtual status_t Perform(perform_code d, void *arg);
-
- /* The public methods below, for the moment,
- are just pass-throughs to BView */
-
-virtual status_t Archive(BMessage *data, bool deep = true) const;
-
-virtual void MessageReceived(BMessage *msg);
-virtual void SetResizingMode(uint32 mode);
-
-virtual void Show();
-virtual void Hide();
-
-virtual BHandler *ResolveSpecifier(BMessage *msg, int32 index,
- BMessage *specifier, int32 form,
- const char *property);
-virtual status_t GetSupportedSuites(BMessage *data);
-
-/* New public functions */
- void DirectConnected( direct_buffer_info *info );
- void EnableDirectMode( bool enabled );
-
- void * getGC() { return m_gc; }
-
-private:
-
-virtual void _ReservedGLView1();
-virtual void _ReservedGLView2();
-virtual void _ReservedGLView3();
-virtual void _ReservedGLView4();
-virtual void _ReservedGLView5();
-virtual void _ReservedGLView6();
-virtual void _ReservedGLView7();
-virtual void _ReservedGLView8();
-
- BGLView(const BGLView &);
- BGLView &operator=(const BGLView &);
-
- void dither_front();
- bool confirm_dither();
- void draw(BRect r);
-
- void * m_gc;
- uint32 m_options;
- uint32 m_ditherCount;
- BLocker m_drawLock;
- BLocker m_displayLock;
- void * m_clip_info;
- void * _Unused1;
-
- BBitmap * m_ditherMap;
- BRect m_bounds;
- int16 * m_errorBuffer[2];
- uint64 _reserved[8];
-
- /* Direct Window stuff */
-private:
- void drawScanline( int x1, int x2, int y, void *data );
-static void scanlineHandler(struct rasStateRec *state, GLint x1, GLint x2);
-
- void lock_draw();
- void unlock_draw();
- bool validateView();
-};
-
-
-
-class BGLScreen : public BWindowScreen {
-public:
- BGLScreen(char *name,
- ulong screenMode, ulong options,
- status_t *error, bool debug=false);
- ~BGLScreen();
-
- void LockGL();
- void UnlockGL();
- void SwapBuffers();
- virtual void ErrorCallback(GLenum errorCode);
-
- virtual void ScreenConnected(bool connected);
- virtual void FrameResized(float width, float height);
- virtual status_t Perform(perform_code d, void *arg);
-
- /* The public methods below, for the moment,
- are just pass-throughs to BWindowScreen */
-
- virtual status_t Archive(BMessage *data, bool deep = true) const;
- virtual void MessageReceived(BMessage *msg);
-
- virtual void Show();
- virtual void Hide();
-
- virtual BHandler *ResolveSpecifier(BMessage *msg,
- int32 index,
- BMessage *specifier,
- int32 form,
- const char *property);
- virtual status_t GetSupportedSuites(BMessage *data);
-
-private:
-
- virtual void _ReservedGLScreen1();
- virtual void _ReservedGLScreen2();
- virtual void _ReservedGLScreen3();
- virtual void _ReservedGLScreen4();
- virtual void _ReservedGLScreen5();
- virtual void _ReservedGLScreen6();
- virtual void _ReservedGLScreen7();
- virtual void _ReservedGLScreen8();
-
- BGLScreen(const BGLScreen &);
- BGLScreen &operator=(const BGLScreen &);
-
- void * m_gc;
- long m_options;
- BLocker m_drawLock;
-
- int32 m_colorSpace;
- uint32 m_screen_mode;
-
- uint64 _reserved[7];
-};
-
-#endif // __cplusplus
-
-#endif // BGLVIEW_H
-
-
-
-
-
--
cgit v1.2.3
From 834db8215362ca859ad4ef18441936238d1b6670 Mon Sep 17 00:00:00 2001
From: Brian Paul
Date: Sat, 10 Jan 2009 12:09:08 -0700
Subject: docs: document deprecated/removed headers/interfaces
---
docs/relnotes-7.3.html | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/docs/relnotes-7.3.html b/docs/relnotes-7.3.html
index c00e5fe2f80..c4866140115 100644
--- a/docs/relnotes-7.3.html
+++ b/docs/relnotes-7.3.html
@@ -47,6 +47,11 @@ tbd
Changes
+
Deprecated the "XMesa" interface (include/GL/xmesa*.h files)
+
Deprecated the "FXMesa" interface (include/GL/fxmesa.h file)
+
Deprecated the "Allegro" interface (include/GL/amesa.h file)
+
Removed include/GL/uglmesa.h header
+
Removed include/GLView.h header for BeOS
--
cgit v1.2.3
From f1455ca5f411ee8f7d992682e3e9c55d82e75715 Mon Sep 17 00:00:00 2001
From: Brian Paul
Date: Sat, 10 Jan 2009 12:21:37 -0700
Subject: mesa: omit old headers from tarball
---
Makefile | 7 -------
1 file changed, 7 deletions(-)
diff --git a/Makefile b/Makefile
index dbe444d2941..5a473757662 100644
--- a/Makefile
+++ b/Makefile
@@ -200,9 +200,7 @@ MAIN_FILES = \
$(DIRECTORY)/docs/RELNOTES* \
$(DIRECTORY)/docs/*.spec \
$(DIRECTORY)/include/GL/internal/glcore.h \
- $(DIRECTORY)/include/GL/amesa.h \
$(DIRECTORY)/include/GL/dmesa.h \
- $(DIRECTORY)/include/GL/fxmesa.h \
$(DIRECTORY)/include/GL/ggimesa.h \
$(DIRECTORY)/include/GL/gl.h \
$(DIRECTORY)/include/GL/glext.h \
@@ -217,13 +215,8 @@ MAIN_FILES = \
$(DIRECTORY)/include/GL/mglmesa.h \
$(DIRECTORY)/include/GL/osmesa.h \
$(DIRECTORY)/include/GL/svgamesa.h \
- $(DIRECTORY)/include/GL/ugl*.h \
$(DIRECTORY)/include/GL/vms_x_fix.h \
$(DIRECTORY)/include/GL/wmesa.h \
- $(DIRECTORY)/include/GL/xmesa.h \
- $(DIRECTORY)/include/GL/xmesa_x.h \
- $(DIRECTORY)/include/GL/xmesa_xf86.h \
- $(DIRECTORY)/include/GLView.h \
$(DIRECTORY)/src/Makefile \
$(DIRECTORY)/src/descrip.mms \
$(DIRECTORY)/src/mesa/Makefile* \
--
cgit v1.2.3
From 44557bf065b89abc45c24829c6ba7395925463e8 Mon Sep 17 00:00:00 2001
From: Brian
Date: Sat, 10 Jan 2009 16:32:32 -0700
Subject: mesa: require libdrm 2.4.3 in configure.ac
---
configure.ac | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/configure.ac b/configure.ac
index 97cb298d399..d3a93645e80 100644
--- a/configure.ac
+++ b/configure.ac
@@ -22,7 +22,7 @@ AC_CONFIG_AUX_DIR([bin])
AC_CANONICAL_HOST
dnl Versions for external dependencies
-LIBDRM_REQUIRED=2.3.1
+LIBDRM_REQUIRED=2.4.3
DRI2PROTO_REQUIRED=1.99.3
dnl Check for progs
--
cgit v1.2.3
From 297a9606ead4400a60a1b5106327c226db4b3474 Mon Sep 17 00:00:00 2001
From: Matthieu Herrb
Date: Sat, 13 Sep 2008 19:07:28 +0200
Subject: __builtin_expect is a gcc 3.x feature. define it out for gcc 2.95.
Patch suggested by miod@. Thanks.
---
src/mesa/glapi/glthread.h | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/src/mesa/glapi/glthread.h b/src/mesa/glapi/glthread.h
index e2765cebb10..27ccd2e2e7b 100644
--- a/src/mesa/glapi/glthread.h
+++ b/src/mesa/glapi/glthread.h
@@ -298,6 +298,10 @@ _glthread_GetTSD(_glthread_TSD *);
extern void
_glthread_SetTSD(_glthread_TSD *, void *);
+#if !defined __GNUC__ || __GNUC__ < 3
+# define __builtin_expect(x, y) x
+#endif
+
#if defined(GLX_USE_TLS)
extern __thread struct _glapi_table * _glapi_tls_Dispatch
--
cgit v1.2.3
From b4866f8a5229d4769a49b4c54a1675a61497d206 Mon Sep 17 00:00:00 2001
From: "Owain G. Ainsworth"
Date: Sun, 11 Jan 2009 20:40:07 +0000
Subject: Fix build with GCC 2.95.
---
src/glx/x11/glx_pbuffer.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/glx/x11/glx_pbuffer.c b/src/glx/x11/glx_pbuffer.c
index c63d53439d5..a602cd28817 100644
--- a/src/glx/x11/glx_pbuffer.c
+++ b/src/glx/x11/glx_pbuffer.c
@@ -220,14 +220,14 @@ GetDrawableAttribute(Display * dpy, GLXDrawable drawable,
unsigned int length;
unsigned int i;
unsigned int num_attributes;
+ GLboolean use_glx_1_3;
if ((dpy == NULL) || (drawable == 0)) {
return 0;
}
priv = __glXInitialize(dpy);
- GLboolean use_glx_1_3 = ((priv->majorVersion > 1)
- || (priv->minorVersion >= 3));
+ use_glx_1_3 = ((priv->majorVersion > 1) || (priv->minorVersion >= 3));
*value = 0;
--
cgit v1.2.3
From 356428d4e4dba433b405f63ff918d76eaf4b4215 Mon Sep 17 00:00:00 2001
From: Matthieu Herrb
Date: Sun, 14 Sep 2008 20:58:29 +0200
Subject: replace nearbyint() by rint() for now.
---
src/mesa/drivers/dri/i965/brw_sf_state.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/mesa/drivers/dri/i965/brw_sf_state.c b/src/mesa/drivers/dri/i965/brw_sf_state.c
index 506126fcfb0..741a7c53c47 100644
--- a/src/mesa/drivers/dri/i965/brw_sf_state.c
+++ b/src/mesa/drivers/dri/i965/brw_sf_state.c
@@ -229,7 +229,7 @@ sf_unit_create_from_key(struct brw_context *brw, struct brw_sf_unit_key *key,
/* XXX clamp max depends on AA vs. non-AA */
sf.sf7.sprite_point = key->point_sprite;
- sf.sf7.point_size = CLAMP(nearbyint(key->point_size), 1, 255) * (1<<3);
+ sf.sf7.point_size = CLAMP(rint(key->point_size), 1, 255) * (1<<3);
sf.sf7.use_point_size_state = !key->point_attenuated;
sf.sf7.aa_line_distance_mode = 0;
--
cgit v1.2.3
From 33f6dc3c334cc065d7c98d0481be19b208e1837d Mon Sep 17 00:00:00 2001
From: Matthieu Herrb
Date: Sun, 21 Sep 2008 10:56:57 +0200
Subject: build fix on big endian OpenBSD architectures.
---
src/mesa/drivers/dri/mach64/mach64_context.h | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/src/mesa/drivers/dri/mach64/mach64_context.h b/src/mesa/drivers/dri/mach64/mach64_context.h
index 55e0618ff80..854751626d0 100644
--- a/src/mesa/drivers/dri/mach64/mach64_context.h
+++ b/src/mesa/drivers/dri/mach64/mach64_context.h
@@ -294,7 +294,13 @@ extern GLboolean mach64UnbindContext( __DRIcontextPrivate *driContextPriv );
#define LE32_OUT( x, y ) do { *(GLuint *)(x) = (y); } while (0)
#define LE32_OUT_FLOAT( x, y ) do { *(GLfloat *)(x) = (y); } while (0)
#else
+#ifndef __OpenBSD__
#include
+#else
+#include
+#define bswap_32 bswap32
+#endif
+
#define LE32_IN( x ) bswap_32( *(GLuint *)(x) )
#define LE32_IN_FLOAT( x ) \
({ \
--
cgit v1.2.3
From 0f0922f93cbe997a95575c955ab1544bb5cd1d7d Mon Sep 17 00:00:00 2001
From: Matthieu Herrb
Date: Sat, 11 Oct 2008 08:51:43 +0200
Subject: Big endian fixes.
---
src/mesa/main/glheader.h | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/mesa/main/glheader.h b/src/mesa/main/glheader.h
index 1d0f178dc4a..626806d35f6 100644
--- a/src/mesa/main/glheader.h
+++ b/src/mesa/main/glheader.h
@@ -146,7 +146,8 @@
#include
#define CPU_TO_LE32( x ) bswap_32( x )
#else /*__linux__*/
-#define CPU_TO_LE32( x ) ( x ) /* fix me for non-Linux big-endian! */
+#include
+#define CPU_TO_LE32( x ) bswap32( x )
#endif /*__linux__*/
#define MESA_BIG_ENDIAN 1
#else
--
cgit v1.2.3
From 436024561aa6d78f78601f690803bd3845d225e7 Mon Sep 17 00:00:00 2001
From: Matthieu Herrb
Date: Sun, 11 Jan 2009 16:56:34 -0700
Subject: Build fixes for gcc 2.95
---
src/glx/x11/drisw_glx.c | 6 +++---
src/glx/x11/glxcurrent.c | 5 ++---
2 files changed, 5 insertions(+), 6 deletions(-)
diff --git a/src/glx/x11/drisw_glx.c b/src/glx/x11/drisw_glx.c
index fee45952b38..35bbd9151ca 100644
--- a/src/glx/x11/drisw_glx.c
+++ b/src/glx/x11/drisw_glx.c
@@ -113,7 +113,7 @@ swrastGetDrawableInfo(__DRIdrawable * draw,
int *x, int *y, int *w, int *h, void *loaderPrivate)
{
__GLXDRIdrawablePrivate *pdp = loaderPrivate;
- __GLXDRIdrawable *pdraw = &(pdp->base);;
+ __GLXDRIdrawable *pdraw = &(pdp->base);
Display *dpy = pdraw->psc->dpy;
Drawable drawable;
@@ -141,7 +141,7 @@ swrastPutImage(__DRIdrawable * draw, int op,
int x, int y, int w, int h, char *data, void *loaderPrivate)
{
__GLXDRIdrawablePrivate *pdp = loaderPrivate;
- __GLXDRIdrawable *pdraw = &(pdp->base);;
+ __GLXDRIdrawable *pdraw = &(pdp->base);
Display *dpy = pdraw->psc->dpy;
Drawable drawable;
XImage *ximage;
@@ -176,7 +176,7 @@ swrastGetImage(__DRIdrawable * draw,
int x, int y, int w, int h, char *data, void *loaderPrivate)
{
__GLXDRIdrawablePrivate *pdp = loaderPrivate;
- __GLXDRIdrawable *pdraw = &(pdp->base);;
+ __GLXDRIdrawable *pdraw = &(pdp->base);
Display *dpy = pdraw->psc->dpy;
Drawable drawable;
XImage *ximage;
diff --git a/src/glx/x11/glxcurrent.c b/src/glx/x11/glxcurrent.c
index f3eb045d9f9..5af46cf0ba7 100644
--- a/src/glx/x11/glxcurrent.c
+++ b/src/glx/x11/glxcurrent.c
@@ -365,7 +365,7 @@ MakeContextCurrent(Display * dpy, GLXDrawable draw,
const CARD8 oldOpcode = ((gc == oldGC) || (oldGC == &dummyContext))
? opcode : __glXSetupForCommand(oldGC->currentDpy);
Bool bindReturnValue;
-
+ __GLXattribute *state;
if (!opcode || !oldOpcode) {
return GL_FALSE;
@@ -489,8 +489,7 @@ MakeContextCurrent(Display * dpy, GLXDrawable draw,
} while (0);
#endif
- __GLXattribute *state =
- (__GLXattribute *) (gc->client_state_private);
+ state = (__GLXattribute *) (gc->client_state_private);
gc->currentContextTag = reply.contextTag;
if (state->array_state == NULL) {
--
cgit v1.2.3
From 1598be5083758c1c289be16ee01665865ed0fb62 Mon Sep 17 00:00:00 2001
From: Brian Paul
Date: Mon, 12 Jan 2009 07:55:14 -0700
Subject: mesa: add osmesa.pc.in to tarball list
---
Makefile | 1 +
1 file changed, 1 insertion(+)
diff --git a/Makefile b/Makefile
index 5a473757662..5197e4967b3 100644
--- a/Makefile
+++ b/Makefile
@@ -223,6 +223,7 @@ MAIN_FILES = \
$(DIRECTORY)/src/mesa/sources \
$(DIRECTORY)/src/mesa/descrip.mms \
$(DIRECTORY)/src/mesa/gl.pc.in \
+ $(DIRECTORY)/src/mesa/osmesa.pc.in \
$(DIRECTORY)/src/mesa/depend \
$(DIRECTORY)/src/mesa/main/*.[chS] \
$(DIRECTORY)/src/mesa/main/descrip.mms \
--
cgit v1.2.3
From 88fdddcbbe690c52f91f76216298700c370f9650 Mon Sep 17 00:00:00 2001
From: Brian Paul
Date: Mon, 12 Jan 2009 08:35:53 -0700
Subject: windows: added new sources for 7.3 (may be more, needs testing)
---
windows/VC8/mesa/mesa/mesa.vcproj | 40 +++++++++++++++++++++++++++++++++++++++
1 file changed, 40 insertions(+)
diff --git a/windows/VC8/mesa/mesa/mesa.vcproj b/windows/VC8/mesa/mesa/mesa.vcproj
index 91e1849669d..9b11098d543 100644
--- a/windows/VC8/mesa/mesa/mesa.vcproj
+++ b/windows/VC8/mesa/mesa/mesa.vcproj
@@ -179,6 +179,10 @@
RelativePath="..\..\..\..\src\mesa\main\api_arrayelt.c"
>
+
+
@@ -327,6 +331,10 @@
/>
+
+
@@ -465,6 +473,10 @@
RelativePath="..\..\..\..\src\mesa\main\mm.c"
>
+
+
@@ -481,6 +493,10 @@
RelativePath="..\..\..\..\src\mesa\main\pixel.c"
>
+
+
@@ -857,6 +873,10 @@
RelativePath="..\..\..\..\src\mesa\tnl\t_pipeline.c"
>
+
+
@@ -921,6 +941,10 @@
RelativePath="..\..\..\..\src\mesa\main\texcompress_s3tc.c"
>
+
+
@@ -929,6 +953,10 @@
RelativePath="..\..\..\..\src\mesa\main\texformat.c"
>
+
+
@@ -937,6 +965,10 @@
RelativePath="..\..\..\..\src\mesa\main\texobj.c"
>
+
+
@@ -1346,6 +1378,10 @@
RelativePath="..\..\..\..\src\mesa\main\polygon.h"
>
+
+
@@ -1522,6 +1558,10 @@
RelativePath="..\..\..\..\src\mesa\shader\shader_api.h"
>
+
+
--
cgit v1.2.3
From 06fdb6a74cfdddb5f598ddfeab890c59f176dab8 Mon Sep 17 00:00:00 2001
From: Brian Paul
Date: Mon, 12 Jan 2009 08:52:54 -0700
Subject: glsl: better fix for for-loop scope issue (commit
6333005f7aea3e5d1d86a5c47b3fa2a1ed2f3ff0)
---
src/mesa/shader/slang/library/slang_shader.syn | 13 +++----------
src/mesa/shader/slang/library/slang_shader_syn.h | 4 +---
src/mesa/shader/slang/slang_compile.c | 18 ------------------
3 files changed, 4 insertions(+), 31 deletions(-)
diff --git a/src/mesa/shader/slang/library/slang_shader.syn b/src/mesa/shader/slang/library/slang_shader.syn
index 0ad4a1cba62..cc5c70a02f8 100644
--- a/src/mesa/shader/slang/library/slang_shader.syn
+++ b/src/mesa/shader/slang/library/slang_shader.syn
@@ -1161,13 +1161,6 @@ compound_statement_2
compound_statement_3
lbrace .and statement_list .and rbrace;
-/*
- * ::=
- * |
- */
-statement_no_new_scope
- compound_statement_no_new_scope .or simple_statement;
-
/*
* ::= "{" "}"
* | "{" "}"
@@ -1181,6 +1174,7 @@ compound_statement_no_new_scope_2
compound_statement_no_new_scope_3
lbrace .and statement_list .and rbrace;
+
/*
* ::=
* |
@@ -1242,8 +1236,7 @@ condition_3
/*
* ::= "while" "(" ")"
* | "do" "while" "(" ")" ";"
- * | "for" "(" ")"
- *
+ * | "for" "(" ")"
*/
iteration_statement
iteration_statement_1 .or iteration_statement_2 .or iteration_statement_3;
@@ -1255,7 +1248,7 @@ iteration_statement_2
expression .and rparen .error RPAREN_EXPECTED .emit OP_END .and semicolon;
iteration_statement_3
"for" .emit OP_FOR .and lparen .error LPAREN_EXPECTED .and for_init_statement .and
- for_rest_statement .and rparen .error RPAREN_EXPECTED .and statement_no_new_scope;
+ for_rest_statement .and rparen .error RPAREN_EXPECTED .and statement;
/*
* ::=
diff --git a/src/mesa/shader/slang/library/slang_shader_syn.h b/src/mesa/shader/slang/library/slang_shader_syn.h
index e1705dfe193..6a382970e1a 100644
--- a/src/mesa/shader/slang/library/slang_shader_syn.h
+++ b/src/mesa/shader/slang/library/slang_shader_syn.h
@@ -566,8 +566,6 @@
" lbrace .and rbrace;\n"
"compound_statement_3\n"
" lbrace .and statement_list .and rbrace;\n"
-"statement_no_new_scope\n"
-" compound_statement_no_new_scope .or simple_statement;\n"
"compound_statement_no_new_scope\n"
" compound_statement_no_new_scope_1 .emit OP_BLOCK_BEGIN_NO_NEW_SCOPE .and .true .emit OP_END;\n"
"compound_statement_no_new_scope_1\n"
@@ -617,7 +615,7 @@
" expression .and rparen .error RPAREN_EXPECTED .emit OP_END .and semicolon;\n"
"iteration_statement_3\n"
" \"for\" .emit OP_FOR .and lparen .error LPAREN_EXPECTED .and for_init_statement .and\n"
-" for_rest_statement .and rparen .error RPAREN_EXPECTED .and statement_no_new_scope;\n"
+" for_rest_statement .and rparen .error RPAREN_EXPECTED .and statement;\n"
"for_init_statement\n"
" expression_statement .emit OP_EXPRESSION .or declaration_statement .emit OP_DECLARE;\n"
"conditionopt\n"
diff --git a/src/mesa/shader/slang/slang_compile.c b/src/mesa/shader/slang/slang_compile.c
index add8594ff95..ec27fc69dff 100644
--- a/src/mesa/shader/slang/slang_compile.c
+++ b/src/mesa/shader/slang/slang_compile.c
@@ -1138,26 +1138,8 @@ parse_statement(slang_parse_ctx * C, slang_output_ctx * O,
RETURN0;
if (!parse_child_operation(C, &o, oper, GL_FALSE))
RETURN0;
-#if 0
if (!parse_child_operation(C, &o, oper, GL_TRUE))
RETURN0;
-#else
- /* force creation of new scope for loop body */
- {
- slang_operation *ch;
- slang_output_ctx oo = o;
-
- /* grow child array */
- ch = slang_operation_grow(&oper->num_children, &oper->children);
- ch->type = SLANG_OPER_BLOCK_NEW_SCOPE;
-
- ch->locals->outer_scope = o.vars;
- oo.vars = ch->locals;
-
- if (!parse_child_operation(C, &oo, ch, GL_TRUE))
- RETURN0;
- }
-#endif
}
break;
case OP_PRECISION:
--
cgit v1.2.3
From a0318d7f8eea286a99c8fd6afb4d71b66d2b341c Mon Sep 17 00:00:00 2001
From: Thomas Henn
Date: Mon, 12 Jan 2009 10:56:42 -0700
Subject: windows: updated VC8 project files
---
windows/VC8/mesa/mesa/mesa.vcproj | 97 +++++++++++++++++++++++++++++++++++---
windows/VC8/progs/glut/glut.vcproj | 9 +++-
2 files changed, 99 insertions(+), 7 deletions(-)
diff --git a/windows/VC8/mesa/mesa/mesa.vcproj b/windows/VC8/mesa/mesa/mesa.vcproj
index 9b11098d543..88cc2fc6b85 100644
--- a/windows/VC8/mesa/mesa/mesa.vcproj
+++ b/windows/VC8/mesa/mesa/mesa.vcproj
@@ -1,9 +1,10 @@
+
+
@@ -263,6 +268,10 @@
RelativePath="..\..\..\..\src\mesa\main\dlist.c"
>
+
+
@@ -295,6 +304,10 @@
RelativePath="..\..\..\..\src\mesa\main\feedback.c"
>
+
+
@@ -505,6 +518,10 @@
RelativePath="..\..\..\..\src\mesa\main\polygon.c"
>
+
+
@@ -573,6 +590,10 @@
RelativePath="..\..\..\..\src\mesa\main\rbadaptors.c"
>
+
+
@@ -693,6 +714,10 @@
RelativePath="..\..\..\..\src\mesa\swrast\s_zoom.c"
>
+
+
@@ -861,6 +886,10 @@
RelativePath="..\..\..\..\src\mesa\main\stencil.c"
>
+
+
@@ -1082,6 +1111,10 @@
RelativePath="..\..\..\..\src\mesa\main\api_eval.h"
>
+
+
@@ -1106,6 +1139,10 @@
RelativePath="..\..\..\..\src\mesa\shader\arbprogram_syn.h"
>
+
+
@@ -1114,6 +1151,10 @@
RelativePath="..\..\..\..\src\mesa\main\attrib.h"
>
+
+
@@ -1126,6 +1167,10 @@
RelativePath="..\..\..\..\src\mesa\main\buffers.h"
>
+
+
@@ -1170,6 +1215,10 @@
RelativePath="..\..\..\..\src\mesa\main\dlist.h"
>
+
+
@@ -1198,6 +1247,10 @@
RelativePath="..\..\..\..\src\mesa\main\feedback.h"
>
+
+
@@ -1346,6 +1399,18 @@
RelativePath="..\..\..\..\src\mesa\main\matrix.h"
>
+
+
+
+
+
+
@@ -1354,6 +1419,10 @@
RelativePath="..\..\..\..\src\mesa\main\mtypes.h"
>
+
+
@@ -1371,15 +1440,15 @@
>
+
+
@@ -1555,11 +1628,11 @@
>
+
+
@@ -1726,6 +1803,10 @@
RelativePath="..\..\..\..\src\mesa\main\texformat_tmp.h"
>
+
+
@@ -1734,6 +1815,10 @@
RelativePath="..\..\..\..\src\mesa\main\texobj.h"
>
+
+
diff --git a/windows/VC8/progs/glut/glut.vcproj b/windows/VC8/progs/glut/glut.vcproj
index 72b3266b1e1..8d03c378412 100644
--- a/windows/VC8/progs/glut/glut.vcproj
+++ b/windows/VC8/progs/glut/glut.vcproj
@@ -1,9 +1,10 @@
@@ -324,6 +327,10 @@
RelativePath="..\..\..\..\src\glut\glx\glut_overlay.c"
>
+
+
--
cgit v1.2.3
From 7f7fc3e3af6471a224a10bf3d2cd6ddd7a96d334 Mon Sep 17 00:00:00 2001
From: Julien Cristau
Date: Mon, 12 Jan 2009 16:04:32 +0100
Subject: mesa: match against *-gnu* instead of *-gnu in configure.ac
Fixes build on arm-linux-gnueabi
---
configure.ac | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/configure.ac b/configure.ac
index d3a93645e80..6a99f3031e2 100644
--- a/configure.ac
+++ b/configure.ac
@@ -83,7 +83,7 @@ dnl Compiler macros
DEFINES=""
AC_SUBST([DEFINES])
case "$host_os" in
-*-gnu)
+*-gnu*)
if test "x$GCC" = xyes; then
DEFINES="$DEFINES -D_POSIX_SOURCE -D_POSIX_C_SOURCE=199309L -D_BSD_SOURCE"
fi
--
cgit v1.2.3
From 29f603a270da711a2a980cc9896e5883e59227cd Mon Sep 17 00:00:00 2001
From: Dan Nicholson
Date: Mon, 12 Jan 2009 11:10:31 -0800
Subject: autoconf: Only _GNU_SOURCE feature test macro needed on gnu systems
According to feature_test_macros(7), _GNU_SOURCE encompasses all the
other feature macros we were setting, so we can just dispose of them.
---
configure.ac | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/configure.ac b/configure.ac
index 6a99f3031e2..33c107266a2 100644
--- a/configure.ac
+++ b/configure.ac
@@ -84,10 +84,7 @@ DEFINES=""
AC_SUBST([DEFINES])
case "$host_os" in
*-gnu*)
-if test "x$GCC" = xyes; then
- DEFINES="$DEFINES -D_POSIX_SOURCE -D_POSIX_C_SOURCE=199309L -D_BSD_SOURCE"
-fi
- DEFINES="$DEFINES -D_SVID_SOURCE -D_GNU_SOURCE -DPTHREADS"
+ DEFINES="$DEFINES -D_GNU_SOURCE -DPTHREADS"
;;
solaris*)
DEFINES="$DEFINES -DPTHREADS -DSVR4"
--
cgit v1.2.3
From de35989cdec9807c60b2b4389e5988037ce23d95 Mon Sep 17 00:00:00 2001
From: Brian Paul
Date: Fri, 9 Jan 2009 15:52:04 -0700
Subject: i965: fix broken ARB fp fog options
Just call _mesa_append_fog_code() if the fragment program's FogOption is
not GL_NONE.
This allows us to remove some unnecessary i965 fog code.
Note, the arbfplight.c demo can be used to test this (see DO_FRAGMENT_FOG).
---
src/mesa/drivers/dri/i965/brw_program.c | 6 ++++
src/mesa/drivers/dri/i965/brw_wm_fp.c | 52 ---------------------------------
2 files changed, 6 insertions(+), 52 deletions(-)
diff --git a/src/mesa/drivers/dri/i965/brw_program.c b/src/mesa/drivers/dri/i965/brw_program.c
index a18dee85e80..0c86911044b 100644
--- a/src/mesa/drivers/dri/i965/brw_program.c
+++ b/src/mesa/drivers/dri/i965/brw_program.c
@@ -111,9 +111,15 @@ static void brwProgramStringNotify( GLcontext *ctx,
struct gl_program *prog )
{
if (target == GL_FRAGMENT_PROGRAM_ARB) {
+ struct gl_fragment_program *fprog = (struct gl_fragment_program *) prog;
struct brw_context *brw = brw_context(ctx);
struct brw_fragment_program *p = (struct brw_fragment_program *)prog;
struct brw_fragment_program *fp = (struct brw_fragment_program *)brw->fragment_program;
+ if (fprog->FogOption) {
+ _mesa_append_fog_code(ctx, fprog);
+ fprog->FogOption = GL_NONE;
+ }
+
if (p == fp)
brw->state.dirty.brw |= BRW_NEW_FRAGMENT_PROGRAM;
p->id = brw->program_id++;
diff --git a/src/mesa/drivers/dri/i965/brw_wm_fp.c b/src/mesa/drivers/dri/i965/brw_wm_fp.c
index f4583877aa5..1a00b698256 100644
--- a/src/mesa/drivers/dri/i965/brw_wm_fp.c
+++ b/src/mesa/drivers/dri/i965/brw_wm_fp.c
@@ -811,57 +811,6 @@ static void precalc_txp( struct brw_wm_compile *c,
-
-
-/***********************************************************************
- * Add instructions to perform fog blending
- */
-
-static void fog_blend( struct brw_wm_compile *c,
- struct prog_src_register fog_factor )
-{
- struct prog_dst_register outcolor = dst_reg(PROGRAM_OUTPUT, FRAG_RESULT_COLR);
- struct prog_src_register fogcolor = search_or_add_param5( c, STATE_FOG_COLOR, 0,0,0,0 );
-
- /* color.xyz = LRP fog_factor.xxxx, output_color, fog_color */
-
- emit_op(c,
- OPCODE_LRP,
- dst_mask(outcolor, WRITEMASK_XYZ),
- 0, 0, 0,
- fog_factor,
- src_reg_from_dst(outcolor),
- fogcolor);
-}
-
-
-
-/* This one is simple - just take the interpolated fog coordinate and
- * use it as the fog blend factor.
- */
-static void fog_interpolated( struct brw_wm_compile *c )
-{
- struct prog_src_register fogc = src_reg(PROGRAM_INPUT, FRAG_ATTRIB_FOGC);
-
- if (!(c->fp_interp_emitted & (1<fp->program.FogOption)
- return;
-
- if (1)
- fog_interpolated( c );
- else {
- /* TODO: per-pixel fog */
- assert(0);
- }
-}
-
static void emit_fb_write( struct brw_wm_compile *c )
{
struct prog_src_register payload_r0_depth = src_reg(PROGRAM_PAYLOAD, PAYLOAD_DEPTH);
@@ -1059,7 +1008,6 @@ void brw_wm_pass_fp( struct brw_wm_compile *c )
emit_ddy(c, inst);
break;
case OPCODE_END:
- emit_fog(c);
emit_fb_write(c);
break;
case OPCODE_PRINT:
--
cgit v1.2.3
From 3a5463d158eff483a992c9792d771fb80db9aed0 Mon Sep 17 00:00:00 2001
From: Brian Paul
Date: Mon, 12 Jan 2009 15:43:54 -0700
Subject: i965: fix broken glBitmap + depth test
When we use the do_blit_bitmap() function, it seems the fragment Z is always
1.0. If depth testing is on, that means that bitmap fragments are often
occluded by other rendering. So, the bitmap doesn't appear even if
rasterpos.Z==0.
The fix is to use the intel_texture_bitmap() path when depth testing is on.
Also, fix the incorrect Z coordinate. It needs to be an NDC value in [-1,1].
---
src/mesa/drivers/dri/intel/intel_pixel_bitmap.c | 20 ++++++++++++++++----
1 file changed, 16 insertions(+), 4 deletions(-)
diff --git a/src/mesa/drivers/dri/intel/intel_pixel_bitmap.c b/src/mesa/drivers/dri/intel/intel_pixel_bitmap.c
index 1d7f15f10a5..3a01f63dc72 100644
--- a/src/mesa/drivers/dri/intel/intel_pixel_bitmap.c
+++ b/src/mesa/drivers/dri/intel/intel_pixel_bitmap.c
@@ -204,6 +204,14 @@ do_blit_bitmap( GLcontext *ctx,
/* Update draw buffer bounds */
_mesa_update_state(ctx);
+ if (ctx->Depth.Test) {
+ /* The blit path produces incorrect results when depth testing is on.
+ * It seems the blit Z coord is always 1.0 (the far plane) so fragments
+ * will likely be obscured by other, closer geometry.
+ */
+ return GL_FALSE;
+ }
+
if (!dst)
return GL_FALSE;
@@ -357,6 +365,7 @@ intel_texture_bitmap(GLcontext * ctx,
GLubyte *unpacked_bitmap;
GLubyte *a8_bitmap;
int x, y;
+ GLfloat dst_z;
/* We need a fragment program for the KIL effect */
if (!ctx->Extensions.ARB_fragment_program ||
@@ -456,21 +465,24 @@ intel_texture_bitmap(GLcontext * ctx,
intel_meta_set_passthrough_vertex_program(intel);
intel_meta_set_passthrough_transform(intel);
+ /* convert rasterpos Z from [0,1] to NDC coord in [-1,1] */
+ dst_z = -1.0 + 2.0 * ctx->Current.RasterPos[2];
+
vertices[0][0] = dst_x;
vertices[0][1] = dst_y;
- vertices[0][2] = ctx->Current.RasterPos[2];
+ vertices[0][2] = dst_z;
vertices[0][3] = 1.0;
vertices[1][0] = dst_x + width;
vertices[1][1] = dst_y;
- vertices[1][2] = ctx->Current.RasterPos[2];
+ vertices[1][2] = dst_z;
vertices[1][3] = 1.0;
vertices[2][0] = dst_x + width;
vertices[2][1] = dst_y + height;
- vertices[2][2] = ctx->Current.RasterPos[2];
+ vertices[2][2] = dst_z;
vertices[2][3] = 1.0;
vertices[3][0] = dst_x;
vertices[3][1] = dst_y + height;
- vertices[3][2] = ctx->Current.RasterPos[2];
+ vertices[3][2] = dst_z;
vertices[3][3] = 1.0;
texcoords[0][0] = 0.0;
--
cgit v1.2.3
From eeeed45c2cf6c876d79ae20a9a96172ece8642fe Mon Sep 17 00:00:00 2001
From: Brian Paul
Date: Mon, 12 Jan 2009 15:47:36 -0700
Subject: i965: fix glDrawPixels Z coordinate in intel_texture_drawpixels().
As for glBitmap, it needs to be an NDC coord in [-1,1].
---
src/mesa/drivers/dri/intel/intel_pixel_draw.c | 12 ++++++++----
1 file changed, 8 insertions(+), 4 deletions(-)
diff --git a/src/mesa/drivers/dri/intel/intel_pixel_draw.c b/src/mesa/drivers/dri/intel/intel_pixel_draw.c
index 2af839b8031..0e83afa6451 100644
--- a/src/mesa/drivers/dri/intel/intel_pixel_draw.c
+++ b/src/mesa/drivers/dri/intel/intel_pixel_draw.c
@@ -71,6 +71,7 @@ intel_texture_drawpixels(GLcontext * ctx,
GLuint texname;
GLfloat vertices[4][4];
GLfloat texcoords[4][2];
+ GLfloat z;
/* We're going to mess with texturing with no regard to existing texture
* state, so if there is some set up we have to bail.
@@ -140,6 +141,9 @@ intel_texture_drawpixels(GLcontext * ctx,
intel_meta_set_passthrough_transform(intel);
+ /* convert rasterpos Z from [0,1] to NDC coord in [-1,1] */
+ z = -1.0 + 2.0 * ctx->Current.RasterPos[2];
+
/* Create the vertex buffer based on the current raster pos. The x and y
* we're handed are ctx->Current.RasterPos[0,1] rounded to integers.
* We also apply the depth. However, the W component is already multiplied
@@ -147,19 +151,19 @@ intel_texture_drawpixels(GLcontext * ctx,
*/
vertices[0][0] = x;
vertices[0][1] = y;
- vertices[0][2] = ctx->Current.RasterPos[2];
+ vertices[0][2] = z;
vertices[0][3] = 1.0;
vertices[1][0] = x + width * ctx->Pixel.ZoomX;
vertices[1][1] = y;
- vertices[1][2] = ctx->Current.RasterPos[2];
+ vertices[1][2] = z;
vertices[1][3] = 1.0;
vertices[2][0] = x + width * ctx->Pixel.ZoomX;
vertices[2][1] = y + height * ctx->Pixel.ZoomY;
- vertices[2][2] = ctx->Current.RasterPos[2];
+ vertices[2][2] = z;
vertices[2][3] = 1.0;
vertices[3][0] = x;
vertices[3][1] = y + height * ctx->Pixel.ZoomY;
- vertices[3][2] = ctx->Current.RasterPos[2];
+ vertices[3][2] = z;
vertices[3][3] = 1.0;
texcoords[0][0] = 0.0;
--
cgit v1.2.3
From 00c02626d8087cab0cf5581911c4e68f7b32eb6e Mon Sep 17 00:00:00 2001
From: Karl Schultz
Date: Tue, 13 Jan 2009 09:01:34 -0700
Subject: windows: try to create a context in wglCreateLayerContext()
---
src/mesa/drivers/windows/gdi/wgl.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/mesa/drivers/windows/gdi/wgl.c b/src/mesa/drivers/windows/gdi/wgl.c
index 9f0bb9122a9..8d8087067f5 100644
--- a/src/mesa/drivers/windows/gdi/wgl.c
+++ b/src/mesa/drivers/windows/gdi/wgl.c
@@ -601,8 +601,9 @@ WINGDIAPI BOOL GLAPIENTRY wglCopyContext(HGLRC hglrcSrc,
WINGDIAPI HGLRC GLAPIENTRY wglCreateLayerContext(HDC hdc,
int iLayerPlane)
{
- (void) hdc; (void) iLayerPlane;
SetLastError(0);
+ if (iLayerPlane == 0)
+ return wglCreateContext( hdc );
return(NULL);
}
--
cgit v1.2.3
From 34500a6da565f769e55babc6d28c14f606e2d52a Mon Sep 17 00:00:00 2001
From: Brian Paul
Date: Tue, 13 Jan 2009 09:03:43 -0700
Subject: docs: fixes since 7.3-rc1
---
docs/relnotes-7.3.html | 2 ++
1 file changed, 2 insertions(+)
diff --git a/docs/relnotes-7.3.html b/docs/relnotes-7.3.html
index c4866140115..b6c2463b811 100644
--- a/docs/relnotes-7.3.html
+++ b/docs/relnotes-7.3.html
@@ -43,6 +43,8 @@ tbd
Assorted GLSL bug fixes
Assorted i965 driver fixes
+
Fix for wglCreateLayerContext() in WGL/Windows driver
+
Build fixes for OpenBSD and gcc 2.95
Changes
--
cgit v1.2.3
From 1f47388dfebf15f610993f046e1f945024c8fc3c Mon Sep 17 00:00:00 2001
From: Ian Romanick
Date: Fri, 9 Jan 2009 18:28:38 -0800
Subject: Add language about implicit flush and command completion
Copied language from the glXSwapBuffers manual page about the implicit
glFlush and expected command completion. This just codifies what
people already expect from glXCopySubBufferMESA. The intention of
this command is to work like glXSwapBuffers but on a sub-rectangle of
the drawable.
Acked-by: Brian Paul
---
docs/MESA_copy_sub_buffer.spec | 12 ++++++++++--
1 file changed, 10 insertions(+), 2 deletions(-)
diff --git a/docs/MESA_copy_sub_buffer.spec b/docs/MESA_copy_sub_buffer.spec
index 43424a5f46b..752a014b352 100644
--- a/docs/MESA_copy_sub_buffer.spec
+++ b/docs/MESA_copy_sub_buffer.spec
@@ -16,7 +16,7 @@ Status
Version
- Last Modified Date: 8 June 2000
+ Last Modified Date: 12 January 2009
Number
@@ -69,6 +69,12 @@ Additions to Chapter 3 of the GLX 1.3 Specification (Functions and Errors)
and indicate the size in pixels. Coordinate (0,0)
corresponds to the lower-left pixel of the window, like glReadPixels.
+ If dpy and drawable are the display and drawable for the calling
+ thread's current context, glXCopySubBufferMESA performs an
+ implicit glFlush before it returns. Subsequent OpenGL commands
+ may be issued immediately after calling glXCopySubBufferMESA, but
+ are not executed until the copy is completed.
+
GLX Protocol
None at this time. The extension is implemented in terms of ordinary
@@ -84,5 +90,7 @@ New State
Revision History
- 8 June 2000 - initial specification
+ 12 January 2009 Ian Romanick - Added language about implicit flush
+ and command completion.
+ 8 June 2000 Brian Paul - initial specification
--
cgit v1.2.3
From 01a0938776ad12e6560a17163bb7a6a3da9e9820 Mon Sep 17 00:00:00 2001
From: Brian Paul
Date: Tue, 13 Jan 2009 15:06:52 -0700
Subject: glsl: add preprocessor support for #pragma
Two forms are supported:
Pragmas are silently ignored at this time.
---
.../shader/slang/library/slang_pp_directives.syn | 20 ++++++++++
.../shader/slang/library/slang_pp_directives_syn.h | 11 ++++++
src/mesa/shader/slang/slang_preprocess.c | 44 +++++++++++++++++++++-
3 files changed, 74 insertions(+), 1 deletion(-)
diff --git a/src/mesa/shader/slang/library/slang_pp_directives.syn b/src/mesa/shader/slang/library/slang_pp_directives.syn
index d4a321034d1..b51d168cc03 100644
--- a/src/mesa/shader/slang/library/slang_pp_directives.syn
+++ b/src/mesa/shader/slang/library/slang_pp_directives.syn
@@ -79,6 +79,12 @@
.emtcode BEHAVIOR_WARN 3
.emtcode BEHAVIOR_DISABLE 4
+/*
+ * The PRAGMA_* symbols follow TOKEN_PRAGMA
+ */
+.emtcode PRAGMA_NO_PARAM 0
+.emtcode PRAGMA_PARAM 1
+
source
optional_directive .and .loop source_element .and '\0' .emit ESCAPE_TOKEN .emit TOKEN_END;
@@ -153,6 +159,7 @@ directive
dir_elif .emit TOKEN_ELIF .or
dir_endif .emit TOKEN_ENDIF .or
dir_ext .emit TOKEN_EXTENSION .or
+ dir_pragma .emit TOKEN_PRAGMA .or
dir_line .emit TOKEN_LINE;
dir_define
@@ -187,6 +194,19 @@ dir_ext
dir_line
optional_space .and '#' .and optional_space .and "line" .and expression;
+dir_pragma
+ optional_space .and '#' .and optional_space .and "pragma" .and symbol .and opt_pragma_param;
+
+
+opt_pragma_param
+ pragma_param .or .true .emit PRAGMA_NO_PARAM;
+
+pragma_param
+ optional_space .and '(' .emit PRAGMA_PARAM .and optional_space .and symbol_no_space .and optional_space .and ')';
+
+symbol_no_space
+ symbol_character .emit * .and .loop symbol_character2 .emit * .and .true .emit '\0';
+
symbol
space .and symbol_character .emit * .and .loop symbol_character2 .emit * .and .true .emit '\0';
diff --git a/src/mesa/shader/slang/library/slang_pp_directives_syn.h b/src/mesa/shader/slang/library/slang_pp_directives_syn.h
index 35e7bc27616..430f8d8217c 100644
--- a/src/mesa/shader/slang/library/slang_pp_directives_syn.h
+++ b/src/mesa/shader/slang/library/slang_pp_directives_syn.h
@@ -20,6 +20,8 @@
".emtcode BEHAVIOR_ENABLE 2\n"
".emtcode BEHAVIOR_WARN 3\n"
".emtcode BEHAVIOR_DISABLE 4\n"
+".emtcode PRAGMA_NO_PARAM 0\n"
+".emtcode PRAGMA_PARAM 1\n"
"source\n"
" optional_directive .and .loop source_element .and '\\0' .emit ESCAPE_TOKEN .emit TOKEN_END;\n"
"source_element\n"
@@ -76,6 +78,7 @@
" dir_elif .emit TOKEN_ELIF .or\n"
" dir_endif .emit TOKEN_ENDIF .or\n"
" dir_ext .emit TOKEN_EXTENSION .or\n"
+" dir_pragma .emit TOKEN_PRAGMA .or\n"
" dir_line .emit TOKEN_LINE;\n"
"dir_define\n"
" optional_space .and '#' .and optional_space .and \"define\" .and symbol .and opt_parameters .and\n"
@@ -99,6 +102,14 @@
" optional_space .and ':' .and optional_space .and extension_behavior;\n"
"dir_line\n"
" optional_space .and '#' .and optional_space .and \"line\" .and expression;\n"
+"dir_pragma\n"
+" optional_space .and '#' .and optional_space .and \"pragma\" .and symbol .and opt_pragma_param;\n"
+"opt_pragma_param\n"
+" pragma_param .or .true .emit PRAGMA_NO_PARAM;\n"
+"pragma_param\n"
+" optional_space .and '(' .emit PRAGMA_PARAM .and optional_space .and symbol_no_space .and optional_space .and ')';\n"
+"symbol_no_space\n"
+" symbol_character .emit * .and .loop symbol_character2 .emit * .and .true .emit '\\0';\n"
"symbol\n"
" space .and symbol_character .emit * .and .loop symbol_character2 .emit * .and .true .emit '\\0';\n"
"opt_parameters\n"
diff --git a/src/mesa/shader/slang/slang_preprocess.c b/src/mesa/shader/slang/slang_preprocess.c
index 76e757cb381..244a09171c7 100644
--- a/src/mesa/shader/slang/slang_preprocess.c
+++ b/src/mesa/shader/slang/slang_preprocess.c
@@ -51,6 +51,9 @@ grammar_error_to_log (slang_info_log *log)
GLint pos;
grammar_get_last_error ((byte *) (buf), sizeof (buf), &pos);
+ if (buf[0] == 0) {
+ _mesa_snprintf(buf, sizeof(buf), "Preprocessor error");
+ }
slang_info_log_error (log, buf);
}
@@ -528,6 +531,20 @@ pp_ext_set(pp_ext *self, const char *name, GLboolean enable)
}
+/**
+ * Called in response to #pragma. For example, "#pragma debug(on)" would
+ * call this function as pp_pragma("debug", "on").
+ * At this time, pragmas are silently ignored.
+ */
+static void
+pp_pragma(const char *pragma, const char *param)
+{
+#if 0
+ printf("#pragma %s %s\n", pragma, param);
+#endif
+}
+
+
/**
* The state of preprocessor: current line, file and version number, list
* of all defined macros and the #if/#endif context.
@@ -862,6 +879,10 @@ parse_if (slang_string *output, const byte *prod, GLuint *pi, GLint *result, pp_
#define BEHAVIOR_WARN 3
#define BEHAVIOR_DISABLE 4
+#define PRAGMA_NO_PARAM 0
+#define PRAGMA_PARAM 1
+
+
static GLboolean
preprocess_source (slang_string *output, const char *source,
grammar pid, grammar eid,
@@ -940,9 +961,11 @@ preprocess_source (slang_string *output, const char *source,
else {
const char *id;
GLuint idlen;
+ GLubyte token;
i++;
- switch (prod[i++]) {
+ token = prod[i++];
+ switch (token) {
case TOKEN_END:
/* End of source string.
@@ -1159,6 +1182,25 @@ preprocess_source (slang_string *output, const char *source,
}
break;
+ case TOKEN_PRAGMA:
+ {
+ GLint have_param;
+ const char *pragma, *param;
+
+ pragma = (const char *) (&prod[i]);
+ i += _mesa_strlen(pragma) + 1;
+ have_param = (prod[i++] == PRAGMA_PARAM);
+ if (have_param) {
+ param = (const char *) (&prod[i]);
+ i += _mesa_strlen(param) + 1;
+ }
+ else {
+ param = NULL;
+ }
+ pp_pragma(pragma, param);
+ }
+ break;
+
case TOKEN_LINE:
id = (const char *) (&prod[i]);
i += _mesa_strlen (id) + 1;
--
cgit v1.2.3
From 34d17d2bdc3da2fe8b669adc166f3ee07ad11391 Mon Sep 17 00:00:00 2001
From: Brian Paul
Date: Tue, 13 Jan 2009 15:09:13 -0700
Subject: docs: #pragma now handled
---
docs/relnotes-7.3.html | 1 +
1 file changed, 1 insertion(+)
diff --git a/docs/relnotes-7.3.html b/docs/relnotes-7.3.html
index b6c2463b811..69f335f2d8b 100644
--- a/docs/relnotes-7.3.html
+++ b/docs/relnotes-7.3.html
@@ -45,6 +45,7 @@ tbd
Assorted i965 driver fixes
Fix for wglCreateLayerContext() in WGL/Windows driver
Build fixes for OpenBSD and gcc 2.95
+
GLSL preprocessor handles #pragma now
Changes
--
cgit v1.2.3
From ef0e0f2550b8bc63972ee53a80578b19ff2a5bbc Mon Sep 17 00:00:00 2001
From: Alan Hourihane
Date: Tue, 13 Jan 2009 23:54:46 +0000
Subject: glsl: support sampler arrays.
---
src/mesa/shader/slang/slang_codegen.c | 33 +++++++++++++++++++++++++++++----
src/mesa/shader/slang/slang_emit.c | 17 ++++++++++++++---
src/mesa/shader/slang/slang_link.c | 10 ++++++----
3 files changed, 49 insertions(+), 11 deletions(-)
diff --git a/src/mesa/shader/slang/slang_codegen.c b/src/mesa/shader/slang/slang_codegen.c
index f5c5cbdd484..20946650293 100644
--- a/src/mesa/shader/slang/slang_codegen.c
+++ b/src/mesa/shader/slang/slang_codegen.c
@@ -4261,10 +4261,14 @@ _slang_codegen_global_variable(slang_assemble_ctx *A, slang_variable *var,
slang_ir_storage *store = NULL;
int dbg = 0;
const GLenum datatype = _slang_gltype_from_specifier(&var->type.specifier);
- const GLint texIndex = sampler_to_texture_index(var->type.specifier.type);
const GLint size = _slang_sizeof_type_specifier(&var->type.specifier);
const GLint arrayLen = _slang_array_length(var);
const GLint totalSize = _slang_array_size(size, arrayLen);
+ GLint texIndex = sampler_to_texture_index(var->type.specifier.type);
+
+ /* check for sampler2D arrays */
+ if (texIndex == -1 && var->type.specifier._array)
+ texIndex = sampler_to_texture_index(var->type.specifier._array->type);
if (texIndex != -1) {
/* This is a texture sampler variable...
@@ -4278,15 +4282,36 @@ _slang_codegen_global_variable(slang_assemble_ctx *A, slang_variable *var,
}
#if FEATURE_es2_glsl /* XXX should use FEATURE_texture_rect */
/* disallow rect samplers */
- if (var->type.specifier.type == SLANG_SPEC_SAMPLER2DRECT ||
- var->type.specifier.type == SLANG_SPEC_SAMPLER2DRECTSHADOW) {
+ if ((var->type.specifier._array &&
+ (var->type.specifier._array->type == SLANG_SPEC_SAMPLER2DRECT ||
+ var->type.specifier._array->type == SLANG_SPEC_SAMPLER2DRECTSHADOW)) ||
+ (var->type.specifier.type == SLANG_SPEC_SAMPLER2DRECT ||
+ var->type.specifier.type == SLANG_SPEC_SAMPLER2DRECTSHADOW)) {
slang_info_log_error(A->log, "invalid sampler type for '%s'", varName);
return GL_FALSE;
}
#endif
{
+ const GLuint swizzle = _slang_var_swizzle(totalSize, 0);
GLint sampNum = _mesa_add_sampler(prog->Parameters, varName, datatype);
- store = _slang_new_ir_storage(PROGRAM_SAMPLER, sampNum, texIndex);
+ store = _slang_new_ir_storage_swz(PROGRAM_SAMPLER, sampNum,
+ totalSize, swizzle);
+
+ /* If we have a sampler array, then we need to allocate the
+ * additional samplers to ensure we don't allocate them elsewhere.
+ * We can't directly use _mesa_add_sampler() as that checks the
+ * varName and gets a match, so we call _mesa_add_parameter()
+ * directly and use the last sampler number for the call above.
+ */
+ if (arrayLen > 0) {
+ GLint a = arrayLen - 1;
+ GLint i;
+ for (i = 0; i < a; i++) {
+ GLfloat value = (GLfloat)(i + sampNum + 1);
+ (void) _mesa_add_parameter(prog->Parameters, PROGRAM_SAMPLER,
+ varName, 1, datatype, &value, NULL, 0x0);
+ }
+ }
}
if (dbg) printf("SAMPLER ");
}
diff --git a/src/mesa/shader/slang/slang_emit.c b/src/mesa/shader/slang/slang_emit.c
index d3b4e64b78d..08b7d519a57 100644
--- a/src/mesa/shader/slang/slang_emit.c
+++ b/src/mesa/shader/slang/slang_emit.c
@@ -1271,6 +1271,20 @@ emit_tex(slang_emit_info *emitInfo, slang_ir_node *n)
opcode = OPCODE_TXP;
}
+ if (n->Children[0]->Opcode == IR_ELEMENT) {
+ /* array is the sampler (a uniform which'll indicate the texture unit) */
+ assert(n->Children[0]->Children[0]->Store);
+ assert(n->Children[0]->Children[0]->Store->File == PROGRAM_SAMPLER);
+
+ emit(emitInfo, n->Children[0]);
+
+ n->Children[0]->Var = n->Children[0]->Children[0]->Var;
+ } else {
+ /* this is the sampler (a uniform which'll indicate the texture unit) */
+ assert(n->Children[0]->Store);
+ assert(n->Children[0]->Store->File == PROGRAM_SAMPLER);
+ }
+
/* emit code for the texcoord operand */
(void) emit(emitInfo, n->Children[1]);
@@ -1286,9 +1300,6 @@ emit_tex(slang_emit_info *emitInfo, slang_ir_node *n)
NULL,
NULL);
- /* Child[0] is the sampler (a uniform which'll indicate the texture unit) */
- assert(n->Children[0]->Store);
- assert(n->Children[0]->Store->File == PROGRAM_SAMPLER);
/* Store->Index is the sampler index */
assert(n->Children[0]->Store->Index >= 0);
/* Store->Size is the texture target */
diff --git a/src/mesa/shader/slang/slang_link.c b/src/mesa/shader/slang/slang_link.c
index 26f5d61e048..05a3e2dee07 100644
--- a/src/mesa/shader/slang/slang_link.c
+++ b/src/mesa/shader/slang/slang_link.c
@@ -282,12 +282,14 @@ link_uniform_vars(GLcontext *ctx,
for (i = 0; i < prog->NumInstructions; i++) {
struct prog_instruction *inst = prog->Instructions + i;
if (_mesa_is_tex_instruction(inst->Opcode)) {
- /*
+ const GLint oldSampNum = inst->TexSrcUnit;
+
+#if 0
printf("====== remap sampler from %d to %d\n",
- inst->Sampler, map[ inst->Sampler ]);
- */
+ inst->TexSrcUnit, samplerMap[ inst->TexSrcUnit ]);
+#endif
+
/* here, texUnit is really samplerUnit */
- const GLint oldSampNum = inst->TexSrcUnit;
if (oldSampNum < Elements(samplerMap)) {
const GLuint newSampNum = samplerMap[oldSampNum];
inst->TexSrcUnit = newSampNum;
--
cgit v1.2.3
From 14eca6b573f70485feb6dc6bc048843e1b65e780 Mon Sep 17 00:00:00 2001
From: Alan Hourihane
Date: Tue, 13 Jan 2009 23:59:18 +0000
Subject: glsl: fix a comment typo
---
src/mesa/shader/slang/slang_codegen.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/mesa/shader/slang/slang_codegen.c b/src/mesa/shader/slang/slang_codegen.c
index 20946650293..a19fc0b1062 100644
--- a/src/mesa/shader/slang/slang_codegen.c
+++ b/src/mesa/shader/slang/slang_codegen.c
@@ -4301,7 +4301,7 @@ _slang_codegen_global_variable(slang_assemble_ctx *A, slang_variable *var,
* additional samplers to ensure we don't allocate them elsewhere.
* We can't directly use _mesa_add_sampler() as that checks the
* varName and gets a match, so we call _mesa_add_parameter()
- * directly and use the last sampler number for the call above.
+ * directly and use the last sampler number from the call above.
*/
if (arrayLen > 0) {
GLint a = arrayLen - 1;
--
cgit v1.2.3
From c157a5bb9131dc95f2e5519fda19cf8c3567543a Mon Sep 17 00:00:00 2001
From: "Xiang, Haihao"
Date: Wed, 14 Jan 2009 09:32:55 +0800
Subject: intel: bump driver date
---
src/mesa/drivers/dri/intel/intel_context.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/mesa/drivers/dri/intel/intel_context.c b/src/mesa/drivers/dri/intel/intel_context.c
index 44b276a123e..7b7f7d8c145 100644
--- a/src/mesa/drivers/dri/intel/intel_context.c
+++ b/src/mesa/drivers/dri/intel/intel_context.c
@@ -95,7 +95,7 @@ int INTEL_DEBUG = (0);
#include "extension_helper.h"
-#define DRIVER_DATE "20080716"
+#define DRIVER_DATE "20090114"
#define DRIVER_DATE_GEM "GEM " DRIVER_DATE
static const GLubyte *
--
cgit v1.2.3
From d687476eddf96ba172d6d63b9cb4a091ce358b1a Mon Sep 17 00:00:00 2001
From: Brian Paul
Date: Tue, 13 Jan 2009 10:09:02 -0700
Subject: i965: fix indentation
---
src/mesa/drivers/dri/i965/brw_wm_glsl.c | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/src/mesa/drivers/dri/i965/brw_wm_glsl.c b/src/mesa/drivers/dri/i965/brw_wm_glsl.c
index 942ebe1ed4e..22a8cb833fc 100644
--- a/src/mesa/drivers/dri/i965/brw_wm_glsl.c
+++ b/src/mesa/drivers/dri/i965/brw_wm_glsl.c
@@ -894,13 +894,13 @@ static void emit_lrp(struct brw_wm_compile *c,
static void emit_kil(struct brw_wm_compile *c)
{
- struct brw_compile *p = &c->func;
- struct brw_reg depth = retype(brw_vec1_grf(0, 0), BRW_REGISTER_TYPE_UW);
- brw_push_insn_state(p);
- brw_set_mask_control(p, BRW_MASK_DISABLE);
- brw_NOT(p, c->emit_mask_reg, brw_mask_reg(1)); //IMASK
- brw_AND(p, depth, c->emit_mask_reg, depth);
- brw_pop_insn_state(p);
+ struct brw_compile *p = &c->func;
+ struct brw_reg depth = retype(brw_vec1_grf(0, 0), BRW_REGISTER_TYPE_UW);
+ brw_push_insn_state(p);
+ brw_set_mask_control(p, BRW_MASK_DISABLE);
+ brw_NOT(p, c->emit_mask_reg, brw_mask_reg(1)); //IMASK
+ brw_AND(p, depth, c->emit_mask_reg, depth);
+ brw_pop_insn_state(p);
}
static void emit_mad(struct brw_wm_compile *c,
--
cgit v1.2.3
From 8f7349dbb46e1ec6d8194a42753e83c1913944bc Mon Sep 17 00:00:00 2001
From: Brian Paul
Date: Tue, 13 Jan 2009 10:20:15 -0700
Subject: mesa: put _NV suffix on a few opcodes
---
src/mesa/shader/prog_instruction.c | 11 ++++++-----
1 file changed, 6 insertions(+), 5 deletions(-)
diff --git a/src/mesa/shader/prog_instruction.c b/src/mesa/shader/prog_instruction.c
index f5c0a498fb0..4a6d0d670ac 100644
--- a/src/mesa/shader/prog_instruction.c
+++ b/src/mesa/shader/prog_instruction.c
@@ -1,8 +1,9 @@
/*
* Mesa 3-D graphics library
- * Version: 6.5.3
+ * Version: 7.3
*
- * Copyright (C) 1999-2005 Brian Paul All Rights Reserved.
+ * Copyright (C) 1999-2008 Brian Paul All Rights Reserved.
+ * Copyright (C) 1999-2009 VMware, Inc. All Rights Reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
@@ -157,7 +158,7 @@ static const struct instruction_info InstInfo[MAX_OPCODE] = {
{ OPCODE_AND, "AND", 2, 1 },
{ OPCODE_ARA, "ARA", 1, 1 },
{ OPCODE_ARL, "ARL", 1, 1 },
- { OPCODE_ARL_NV, "ARL", 1, 1 },
+ { OPCODE_ARL_NV, "ARL_NV", 1, 1 },
{ OPCODE_ARR, "ARL", 1, 1 },
{ OPCODE_BGNLOOP,"BGNLOOP", 0, 0 },
{ OPCODE_BGNSUB, "BGNSUB", 0, 0 },
@@ -186,7 +187,7 @@ static const struct instruction_info InstInfo[MAX_OPCODE] = {
{ OPCODE_FRC, "FRC", 1, 1 },
{ OPCODE_IF, "IF", 1, 0 },
{ OPCODE_KIL, "KIL", 1, 0 },
- { OPCODE_KIL_NV, "KIL", 0, 0 },
+ { OPCODE_KIL_NV, "KIL_NV", 0, 0 },
{ OPCODE_LG2, "LG2", 1, 1 },
{ OPCODE_LIT, "LIT", 1, 1 },
{ OPCODE_LOG, "LOG", 1, 1 },
@@ -235,7 +236,7 @@ static const struct instruction_info InstInfo[MAX_OPCODE] = {
{ OPCODE_TXD, "TXD", 3, 1 },
{ OPCODE_TXL, "TXL", 1, 1 },
{ OPCODE_TXP, "TXP", 1, 1 },
- { OPCODE_TXP_NV, "TXP", 1, 1 },
+ { OPCODE_TXP_NV, "TXP_NV", 1, 1 },
{ OPCODE_TRUNC, "TRUNC", 1, 1 },
{ OPCODE_UP2H, "UP2H", 1, 1 },
{ OPCODE_UP2US, "UP2US", 1, 1 },
--
cgit v1.2.3
From 658ab3c3ae4c99e841a6639f6d012c23deeb5371 Mon Sep 17 00:00:00 2001
From: Brian Paul
Date: Tue, 13 Jan 2009 10:26:25 -0700
Subject: i965: comment for emit_kil()
---
src/mesa/drivers/dri/i965/brw_wm_glsl.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/src/mesa/drivers/dri/i965/brw_wm_glsl.c b/src/mesa/drivers/dri/i965/brw_wm_glsl.c
index 22a8cb833fc..8fd776ac393 100644
--- a/src/mesa/drivers/dri/i965/brw_wm_glsl.c
+++ b/src/mesa/drivers/dri/i965/brw_wm_glsl.c
@@ -892,6 +892,10 @@ static void emit_lrp(struct brw_wm_compile *c,
}
}
+/**
+ * For GLSL shaders, this KIL will be unconditional.
+ * It may be contained inside an IF/ENDIF structure of course.
+ */
static void emit_kil(struct brw_wm_compile *c)
{
struct brw_compile *p = &c->func;
--
cgit v1.2.3
From d911e3e24fbfb5cd28cabb92f952775b7eb1d1d9 Mon Sep 17 00:00:00 2001
From: Brian Paul
Date: Tue, 13 Jan 2009 10:38:15 -0700
Subject: i965: fix indentation
---
src/mesa/drivers/dri/i965/brw_sf.c | 11 ++++++-----
1 file changed, 6 insertions(+), 5 deletions(-)
diff --git a/src/mesa/drivers/dri/i965/brw_sf.c b/src/mesa/drivers/dri/i965/brw_sf.c
index 9dce6cd8e6c..1a11d546210 100644
--- a/src/mesa/drivers/dri/i965/brw_sf.c
+++ b/src/mesa/drivers/dri/i965/brw_sf.c
@@ -73,10 +73,12 @@ static void compile_sf_prog( struct brw_context *brw,
c.attr_to_idx[i] = idx;
c.idx_to_attr[idx] = i;
if (i >= VERT_RESULT_TEX0 && i <= VERT_RESULT_TEX7) {
- c.point_attrs[i].CoordReplace =
- brw->attribs.Point->CoordReplace[i - VERT_RESULT_TEX0];
- } else
- c.point_attrs[i].CoordReplace = GL_FALSE;
+ c.point_attrs[i].CoordReplace =
+ brw->attribs.Point->CoordReplace[i - VERT_RESULT_TEX0];
+ }
+ else {
+ c.point_attrs[i].CoordReplace = GL_FALSE;
+ }
idx++;
}
@@ -106,7 +108,6 @@ static void compile_sf_prog( struct brw_context *brw,
assert(0);
return;
}
-
/* get the program
*/
--
cgit v1.2.3
From 49b53407c7c4f08b5e13591fd04080ca602fba40 Mon Sep 17 00:00:00 2001
From: Brian Paul
Date: Tue, 13 Jan 2009 10:40:19 -0700
Subject: i965: allow larger AA points on fallback path
---
src/mesa/drivers/dri/i965/brw_context.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/src/mesa/drivers/dri/i965/brw_context.c b/src/mesa/drivers/dri/i965/brw_context.c
index a415e378fff..d7a2bd95ee2 100644
--- a/src/mesa/drivers/dri/i965/brw_context.c
+++ b/src/mesa/drivers/dri/i965/brw_context.c
@@ -143,6 +143,9 @@ GLboolean brwCreateContext( const __GLcontextModes *mesaVis,
ctx->Const.MaxCubeTextureLevels = 12;
ctx->Const.MaxTextureRectSize = (1<<11);
+ /* if conformance mode is set, swrast can handle any size AA point */
+ ctx->Const.MaxPointSizeAA = 255.0;
+
/* ctx->Const.MaxNativeVertexProgramTemps = 32; */
brw_init_attribs( brw );
--
cgit v1.2.3
From 1b3e3e6b841535b78ff4fa1d3861e9d8cdeff972 Mon Sep 17 00:00:00 2001
From: Brian Paul
Date: Wed, 14 Jan 2009 08:33:45 -0700
Subject: i965: indentation fixes
---
src/mesa/drivers/dri/i965/brw_wm_sampler_state.c | 2 +-
src/mesa/drivers/dri/i965/brw_wm_surface_state.c | 22 ++++++++++++++--------
2 files changed, 15 insertions(+), 9 deletions(-)
diff --git a/src/mesa/drivers/dri/i965/brw_wm_sampler_state.c b/src/mesa/drivers/dri/i965/brw_wm_sampler_state.c
index f12ef47a7d7..8c9cb789453 100644
--- a/src/mesa/drivers/dri/i965/brw_wm_sampler_state.c
+++ b/src/mesa/drivers/dri/i965/brw_wm_sampler_state.c
@@ -244,7 +244,7 @@ brw_wm_sampler_populate_key(struct brw_context *brw,
entry->minfilter = texObj->MinFilter;
entry->magfilter = texObj->MagFilter;
entry->comparemode = texObj->CompareMode;
- entry->comparefunc = texObj->CompareFunc;
+ entry->comparefunc = texObj->CompareFunc;
dri_bo_unreference(brw->wm.sdc_bo[unit]);
if (firstImage->_BaseFormat == GL_DEPTH_COMPONENT) {
diff --git a/src/mesa/drivers/dri/i965/brw_wm_surface_state.c b/src/mesa/drivers/dri/i965/brw_wm_surface_state.c
index 63e14cc3900..06e71e6d694 100644
--- a/src/mesa/drivers/dri/i965/brw_wm_surface_state.c
+++ b/src/mesa/drivers/dri/i965/brw_wm_surface_state.c
@@ -192,21 +192,27 @@ brw_create_texture_surface( struct brw_context *brw,
if (key->bo)
surf.ss0.surface_format = translate_tex_format(key->format, key->depthmode);
else {
- switch(key->depth) {
- case 32: surf.ss0.surface_format = BRW_SURFACEFORMAT_B8G8R8A8_UNORM; break;
- default:
- case 24: surf.ss0.surface_format = BRW_SURFACEFORMAT_B8G8R8X8_UNORM; break;
- case 16: surf.ss0.surface_format = BRW_SURFACEFORMAT_B5G6R5_UNORM; break;
- }
+ switch (key->depth) {
+ case 32:
+ surf.ss0.surface_format = BRW_SURFACEFORMAT_B8G8R8A8_UNORM;
+ break;
+ default:
+ case 24:
+ surf.ss0.surface_format = BRW_SURFACEFORMAT_B8G8R8X8_UNORM;
+ break;
+ case 16:
+ surf.ss0.surface_format = BRW_SURFACEFORMAT_B5G6R5_UNORM;
+ break;
+ }
}
/* This is ok for all textures with channel width 8bit or less:
*/
/* surf.ss0.data_return_format = BRW_SURFACERETURNFORMAT_S1; */
if (key->bo)
- surf.ss1.base_addr = key->bo->offset; /* reloc */
+ surf.ss1.base_addr = key->bo->offset; /* reloc */
else
- surf.ss1.base_addr = key->offset;
+ surf.ss1.base_addr = key->offset;
surf.ss2.mip_count = key->last_level - key->first_level;
surf.ss2.width = key->width - 1;
--
cgit v1.2.3
From a98dccca36027fc0ed333075ab30176144e6c475 Mon Sep 17 00:00:00 2001
From: Alan Hourihane
Date: Wed, 14 Jan 2009 16:32:44 +0000
Subject: glsl: fix regression from sampler arrays commit
---
src/mesa/shader/slang/slang_codegen.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/src/mesa/shader/slang/slang_codegen.c b/src/mesa/shader/slang/slang_codegen.c
index a19fc0b1062..b046cc2402a 100644
--- a/src/mesa/shader/slang/slang_codegen.c
+++ b/src/mesa/shader/slang/slang_codegen.c
@@ -4292,10 +4292,8 @@ _slang_codegen_global_variable(slang_assemble_ctx *A, slang_variable *var,
}
#endif
{
- const GLuint swizzle = _slang_var_swizzle(totalSize, 0);
GLint sampNum = _mesa_add_sampler(prog->Parameters, varName, datatype);
- store = _slang_new_ir_storage_swz(PROGRAM_SAMPLER, sampNum,
- totalSize, swizzle);
+ store = _slang_new_ir_storage(PROGRAM_SAMPLER, sampNum, texIndex);
/* If we have a sampler array, then we need to allocate the
* additional samplers to ensure we don't allocate them elsewhere.
--
cgit v1.2.3
From 2549c26a8b1eec21bdd8f45d3b3dd06e17ac82ae Mon Sep 17 00:00:00 2001
From: Ian Romanick
Date: Wed, 14 Jan 2009 10:05:40 -0800
Subject: Treat image units and coordinate units differently.
Previously MaxTextureUnits was used to validate both texture image
units and texture coordinate units in fragment programs. Instead, use
MaxTextureCoordUnits for texture coordinate units and
MaxTextureImageUnits for texture image units.
Fixes bugzilla #19468.
Signed-off-by: Ian Romanick
Reviewed-by: Brian Paul
---
src/mesa/shader/arbprogparse.c | 31 ++++++++++++++++++++++++++++---
1 file changed, 28 insertions(+), 3 deletions(-)
diff --git a/src/mesa/shader/arbprogparse.c b/src/mesa/shader/arbprogparse.c
index 39988b5fca6..a3a75c3b0a6 100644
--- a/src/mesa/shader/arbprogparse.c
+++ b/src/mesa/shader/arbprogparse.c
@@ -963,6 +963,8 @@ parse_output_color_num (GLcontext * ctx, const GLubyte ** inst,
/**
+ * Validate the index of a texture coordinate
+ *
* \param coord The texture unit index
* \return 0 on sucess, 1 on error
*/
@@ -972,8 +974,30 @@ parse_texcoord_num (GLcontext * ctx, const GLubyte ** inst,
{
GLint i = parse_integer (inst, Program);
- if ((i < 0) || (i >= (int)ctx->Const.MaxTextureUnits)) {
- program_error(ctx, Program->Position, "Invalid texture unit index");
+ if ((i < 0) || (i >= (int)ctx->Const.MaxTextureCoordUnits)) {
+ program_error(ctx, Program->Position, "Invalid texture coordinate index");
+ return 1;
+ }
+
+ *coord = (GLuint) i;
+ return 0;
+}
+
+
+/**
+ * Validate the index of a texture image unit
+ *
+ * \param coord The texture unit index
+ * \return 0 on sucess, 1 on error
+ */
+static GLuint
+parse_teximage_num (GLcontext * ctx, const GLubyte ** inst,
+ struct arb_program *Program, GLuint * coord)
+{
+ GLint i = parse_integer (inst, Program);
+
+ if ((i < 0) || (i >= (int)ctx->Const.MaxTextureImageUnits)) {
+ program_error(ctx, Program->Position, "Invalid texture image index");
return 1;
}
@@ -981,6 +1005,7 @@ parse_texcoord_num (GLcontext * ctx, const GLubyte ** inst,
return 0;
}
+
/**
* \param coord The weight index
* \return 0 on sucess, 1 on error
@@ -3003,7 +3028,7 @@ parse_fp_instruction (GLcontext * ctx, const GLubyte ** inst,
return 1;
/* texImageUnit */
- if (parse_texcoord_num (ctx, inst, Program, &texcoord))
+ if (parse_teximage_num (ctx, inst, Program, &texcoord))
return 1;
fp->TexSrcUnit = texcoord;
--
cgit v1.2.3
From c12d24b513a67648c30bf892964f887fad71e103 Mon Sep 17 00:00:00 2001
From: Brian Paul
Date: Wed, 14 Jan 2009 11:50:32 -0700
Subject: mesa: fix incorrect transformation of GL_SPOT_DIRECTION
This was changed between GL 1.0 and 1.1. Mesa still had the 1.0 behaviour.
---
docs/relnotes-7.3.html | 1 +
src/mesa/main/light.c | 3 ++-
src/mesa/math/m_matrix.h | 12 ++++++++++++
3 files changed, 15 insertions(+), 1 deletion(-)
diff --git a/docs/relnotes-7.3.html b/docs/relnotes-7.3.html
index 69f335f2d8b..d46a5098842 100644
--- a/docs/relnotes-7.3.html
+++ b/docs/relnotes-7.3.html
@@ -46,6 +46,7 @@ tbd
Fix for wglCreateLayerContext() in WGL/Windows driver
Build fixes for OpenBSD and gcc 2.95
GLSL preprocessor handles #pragma now
+
Fix incorrect transformation of GL_SPOT_DIRECTION
Changes
diff --git a/src/mesa/main/light.c b/src/mesa/main/light.c
index 10ee088a2da..ce50224d30a 100644
--- a/src/mesa/main/light.c
+++ b/src/mesa/main/light.c
@@ -208,7 +208,8 @@ _mesa_Lightfv( GLenum light, GLenum pname, const GLfloat *params )
if (_math_matrix_is_dirty(ctx->ModelviewMatrixStack.Top)) {
_math_matrix_analyse(ctx->ModelviewMatrixStack.Top);
}
- TRANSFORM_NORMAL(temp, params, ctx->ModelviewMatrixStack.Top->inv);
+ TRANSFORM_DIRECTION(temp, params, ctx->ModelviewMatrixStack.Top->m);
+ NORMALIZE_3FV(temp);
params = temp;
break;
case GL_SPOT_EXPONENT:
diff --git a/src/mesa/math/m_matrix.h b/src/mesa/math/m_matrix.h
index e8303f3ac5c..a8d9000e89b 100644
--- a/src/mesa/math/m_matrix.h
+++ b/src/mesa/math/m_matrix.h
@@ -189,6 +189,18 @@ do { \
} while (0)
+/**
+ * Transform a direction by a matrix.
+ */
+#define TRANSFORM_DIRECTION( TO, DIR, MAT ) \
+do { \
+ TO[0] = DIR[0] * MAT[0] + DIR[1] * MAT[4] + DIR[2] * MAT[8]; \
+ TO[1] = DIR[0] * MAT[1] + DIR[1] * MAT[5] + DIR[2] * MAT[9]; \
+ TO[2] = DIR[0] * MAT[2] + DIR[1] * MAT[6] + DIR[2] * MAT[10];\
+} while (0)
+
+
+
/*@}*/
--
cgit v1.2.3
From b5f89e5f17bdf718d1f1f29e7a10dee3809c9f29 Mon Sep 17 00:00:00 2001
From: Brian Paul
Date: Wed, 14 Jan 2009 11:58:45 -0700
Subject: glsl: simplify IR storage for samplers
Don't overload the Size field with the texture target, to avoid confusion.
---
src/mesa/shader/slang/slang_codegen.c | 2 +-
src/mesa/shader/slang/slang_emit.c | 10 +++-------
src/mesa/shader/slang/slang_ir.c | 22 +++++++++++++++++++++-
src/mesa/shader/slang/slang_ir.h | 13 +++++++++----
4 files changed, 34 insertions(+), 13 deletions(-)
diff --git a/src/mesa/shader/slang/slang_codegen.c b/src/mesa/shader/slang/slang_codegen.c
index b046cc2402a..211260449a0 100644
--- a/src/mesa/shader/slang/slang_codegen.c
+++ b/src/mesa/shader/slang/slang_codegen.c
@@ -4293,7 +4293,7 @@ _slang_codegen_global_variable(slang_assemble_ctx *A, slang_variable *var,
#endif
{
GLint sampNum = _mesa_add_sampler(prog->Parameters, varName, datatype);
- store = _slang_new_ir_storage(PROGRAM_SAMPLER, sampNum, texIndex);
+ store = _slang_new_ir_storage_sampler(sampNum, texIndex, totalSize);
/* If we have a sampler array, then we need to allocate the
* additional samplers to ensure we don't allocate them elsewhere.
diff --git a/src/mesa/shader/slang/slang_emit.c b/src/mesa/shader/slang/slang_emit.c
index 08b7d519a57..414d3e639bf 100644
--- a/src/mesa/shader/slang/slang_emit.c
+++ b/src/mesa/shader/slang/slang_emit.c
@@ -1300,14 +1300,10 @@ emit_tex(slang_emit_info *emitInfo, slang_ir_node *n)
NULL,
NULL);
- /* Store->Index is the sampler index */
+ /* Store->Index is the uniform/sampler index */
assert(n->Children[0]->Store->Index >= 0);
- /* Store->Size is the texture target */
- assert(n->Children[0]->Store->Size >= TEXTURE_1D_INDEX);
- assert(n->Children[0]->Store->Size <= TEXTURE_RECT_INDEX);
-
- inst->TexSrcTarget = n->Children[0]->Store->Size;
- inst->TexSrcUnit = n->Children[0]->Store->Index; /* i.e. uniform's index */
+ inst->TexSrcUnit = n->Children[0]->Store->Index;
+ inst->TexSrcTarget = n->Children[0]->Store->TexTarget;
/* mark the sampler as being used */
_mesa_use_uniform(emitInfo->prog->Parameters,
diff --git a/src/mesa/shader/slang/slang_ir.c b/src/mesa/shader/slang/slang_ir.c
index c33c80da999..e4c6e0ea516 100644
--- a/src/mesa/shader/slang/slang_ir.c
+++ b/src/mesa/shader/slang/slang_ir.c
@@ -1,8 +1,8 @@
/*
* Mesa 3-D graphics library
- * Version: 7.1
*
* Copyright (C) 2005-2008 Brian Paul All Rights Reserved.
+ * Copyright (C) 2009 VMware, Inc. All Rights Reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
@@ -216,6 +216,26 @@ _slang_new_ir_storage_indirect(enum register_file file,
}
+/**
+ * Allocate IR storage for a texture sampler.
+ * \param sampNum the sampler number/index
+ * \param texTarget one of TEXTURE_x_INDEX values
+ * \param size number of samplers (in case of sampler array)
+ */
+slang_ir_storage *
+_slang_new_ir_storage_sampler(GLint sampNum, GLuint texTarget, GLint size)
+{
+ slang_ir_storage *st;
+ assert(texTarget < NUM_TEXTURE_TARGETS);
+ st = _slang_new_ir_storage(PROGRAM_SAMPLER, sampNum, size);
+ if (st) {
+ st->TexTarget = texTarget;
+ }
+ return st;
+}
+
+
+
/* XXX temporary function */
void
_slang_copy_ir_storage(slang_ir_storage *dst, const slang_ir_storage *src)
diff --git a/src/mesa/shader/slang/slang_ir.h b/src/mesa/shader/slang/slang_ir.h
index a258e92e06f..644269d491c 100644
--- a/src/mesa/shader/slang/slang_ir.h
+++ b/src/mesa/shader/slang/slang_ir.h
@@ -1,8 +1,8 @@
/*
* Mesa 3-D graphics library
- * Version: 6.5.3
*
- * Copyright (C) 2005-2007 Brian Paul All Rights Reserved.
+ * Copyright (C) 2005-2008 Brian Paul All Rights Reserved.
+ * Copyright (C) 2009 VMware, Inc. All Rights Reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
@@ -168,8 +168,8 @@ typedef enum
struct slang_ir_storage_
{
enum register_file File; /**< PROGRAM_TEMPORARY, PROGRAM_INPUT, etc */
- GLint Index; /**< -1 means unallocated */
- GLint Size; /**< number of floats */
+ GLint Index; /**< -1 means unallocated */
+ GLint Size; /**< number of floats or ints */
GLuint Swizzle; /**< Swizzle AND writemask info */
GLint RefCount; /**< Used during IR tree delete */
@@ -179,6 +179,7 @@ struct slang_ir_storage_
enum register_file IndirectFile;
GLint IndirectIndex;
GLuint IndirectSwizzle;
+ GLuint TexTarget; /**< If File==PROGRAM_SAMPLER, one of TEXTURE_x_INDEX */
/** If Parent is non-null, Index is relative to parent.
* The other fields are ignored.
@@ -254,6 +255,10 @@ _slang_new_ir_storage_indirect(enum register_file file,
GLint indirectIndex,
GLuint indirectSwizzle);
+extern slang_ir_storage *
+_slang_new_ir_storage_sampler(GLint sampNum, GLuint texTarget, GLint size);
+
+
extern void
_slang_copy_ir_storage(slang_ir_storage *dst, const slang_ir_storage *src);
--
cgit v1.2.3
From aac4a0509e6a5d8e3c8f8179519bcd21364ae18e Mon Sep 17 00:00:00 2001
From: Brian Paul
Date: Wed, 14 Jan 2009 12:07:25 -0700
Subject: windows: remove reference to swizzle.c file
---
windows/VC8/mesa/mesa/mesa.vcproj | 4 ----
1 file changed, 4 deletions(-)
diff --git a/windows/VC8/mesa/mesa/mesa.vcproj b/windows/VC8/mesa/mesa/mesa.vcproj
index 88cc2fc6b85..13029af1437 100644
--- a/windows/VC8/mesa/mesa/mesa.vcproj
+++ b/windows/VC8/mesa/mesa/mesa.vcproj
@@ -886,10 +886,6 @@
RelativePath="..\..\..\..\src\mesa\main\stencil.c"
>
-
-
--
cgit v1.2.3
From fae9604727c048834a7d5a90f8a652c86cff057a Mon Sep 17 00:00:00 2001
From: Brian Paul
Date: Wed, 14 Jan 2009 12:16:00 -0700
Subject: glsl: propagate pragma info down into compiler from preprocessor
---
src/mesa/main/mtypes.h | 13 ++++++--
src/mesa/shader/slang/slang_codegen.c | 4 +--
src/mesa/shader/slang/slang_codegen.h | 1 +
src/mesa/shader/slang/slang_compile.c | 16 +++++++---
src/mesa/shader/slang/slang_emit.c | 16 ++++++++--
src/mesa/shader/slang/slang_emit.h | 4 ++-
src/mesa/shader/slang/slang_preprocess.c | 53 +++++++++++++++++++++++++++-----
src/mesa/shader/slang/slang_preprocess.h | 7 +++--
8 files changed, 90 insertions(+), 24 deletions(-)
diff --git a/src/mesa/main/mtypes.h b/src/mesa/main/mtypes.h
index 3eca8a85f95..2014745a7a8 100644
--- a/src/mesa/main/mtypes.h
+++ b/src/mesa/main/mtypes.h
@@ -2094,6 +2094,13 @@ struct gl_query_state
};
+/** Set by #pragma directives */
+struct gl_sl_pragmas
+{
+ GLboolean Optimize; /**< defaults on */
+ GLboolean Debug; /**< defaults off */
+};
+
/**
* A GLSL vertex or fragment shader object.
@@ -2104,12 +2111,12 @@ struct gl_shader
GLuint Name; /**< AKA the handle */
GLint RefCount; /**< Reference count */
GLboolean DeletePending;
-
- const GLchar *Source; /**< Source code string */
GLboolean CompileStatus;
+ GLboolean Main; /**< shader defines main() */
+ const GLchar *Source; /**< Source code string */
struct gl_program *Program; /**< Post-compile assembly code */
GLchar *InfoLog;
- GLboolean Main; /**< shader defines main() */
+ struct gl_sl_pragmas Pragmas;
};
diff --git a/src/mesa/shader/slang/slang_codegen.c b/src/mesa/shader/slang/slang_codegen.c
index 211260449a0..51eb4c9c112 100644
--- a/src/mesa/shader/slang/slang_codegen.c
+++ b/src/mesa/shader/slang/slang_codegen.c
@@ -4493,7 +4493,7 @@ _slang_codegen_global_variable(slang_assemble_ctx *A, slang_variable *var,
n = _slang_gen_var_decl(A, var, var->initializer);
/* emit GPU instructions */
- success = _slang_emit_code(n, A->vartable, A->program, GL_FALSE, A->log);
+ success = _slang_emit_code(n, A->vartable, A->program, A->pragmas, GL_FALSE, A->log);
_slang_free_ir_tree(n);
}
@@ -4603,7 +4603,7 @@ _slang_codegen_function(slang_assemble_ctx * A, slang_function * fun)
#endif
/* Emit program instructions */
- success = _slang_emit_code(n, A->vartable, A->program, GL_TRUE, A->log);
+ success = _slang_emit_code(n, A->vartable, A->program, A->pragmas, GL_TRUE, A->log);
_slang_free_ir_tree(n);
/* free codegen context */
diff --git a/src/mesa/shader/slang/slang_codegen.h b/src/mesa/shader/slang/slang_codegen.h
index 9489033d7b8..f2daa034e4f 100644
--- a/src/mesa/shader/slang/slang_codegen.h
+++ b/src/mesa/shader/slang/slang_codegen.h
@@ -36,6 +36,7 @@ typedef struct slang_assemble_ctx_
slang_atom_pool *atoms;
slang_name_space space;
struct gl_program *program;
+ struct gl_sl_pragmas *pragmas;
slang_var_table *vartable;
slang_info_log *log;
struct slang_label_ *curFuncEndLabel;
diff --git a/src/mesa/shader/slang/slang_compile.c b/src/mesa/shader/slang/slang_compile.c
index ec27fc69dff..04fa2e0f931 100644
--- a/src/mesa/shader/slang/slang_compile.c
+++ b/src/mesa/shader/slang/slang_compile.c
@@ -144,6 +144,7 @@ typedef struct slang_output_ctx_
slang_function_scope *funs;
slang_struct_scope *structs;
struct gl_program *program;
+ struct gl_sl_pragmas *pragmas;
slang_var_table *vartable;
GLuint default_precision[TYPE_SPECIFIER_COUNT];
GLboolean allow_precision;
@@ -2059,6 +2060,7 @@ parse_init_declarator(slang_parse_ctx * C, slang_output_ctx * O,
A.space.structs = O->structs;
A.space.vars = O->vars;
A.program = O->program;
+ A.pragmas = O->pragmas;
A.vartable = O->vartable;
A.log = C->L;
A.curFuncEndLabel = NULL;
@@ -2349,6 +2351,7 @@ parse_code_unit(slang_parse_ctx * C, slang_code_unit * unit,
o.structs = &unit->structs;
o.vars = &unit->vars;
o.program = shader ? shader->Program : NULL;
+ o.pragmas = shader ? &shader->Pragmas : NULL;
o.vartable = _slang_new_var_table(maxRegs);
_slang_push_var_table(o.vartable);
@@ -2417,6 +2420,7 @@ parse_code_unit(slang_parse_ctx * C, slang_code_unit * unit,
A.space.structs = o.structs;
A.space.vars = o.vars;
A.program = o.program;
+ A.pragmas = &shader->Pragmas;
A.vartable = o.vartable;
A.log = C->L;
@@ -2475,7 +2479,8 @@ compile_with_grammar(grammar id, const char *source, slang_code_unit * unit,
slang_unit_type type, slang_info_log * infolog,
slang_code_unit * builtin,
struct gl_shader *shader,
- const struct gl_extensions *extensions)
+ const struct gl_extensions *extensions,
+ struct gl_sl_pragmas *pragmas)
{
byte *prod;
GLuint size, start, version;
@@ -2504,7 +2509,7 @@ compile_with_grammar(grammar id, const char *source, slang_code_unit * unit,
/* Now preprocess the source string. */
slang_string_init(&preprocessed);
if (!_slang_preprocess_directives(&preprocessed, &source[start],
- infolog, extensions)) {
+ infolog, extensions, pragmas)) {
slang_string_free(&preprocessed);
slang_info_log_error(infolog, "failed to preprocess the source.");
return GL_FALSE;
@@ -2578,7 +2583,8 @@ static GLboolean
compile_object(grammar * id, const char *source, slang_code_object * object,
slang_unit_type type, slang_info_log * infolog,
struct gl_shader *shader,
- const struct gl_extensions *extensions)
+ const struct gl_extensions *extensions,
+ struct gl_sl_pragmas *pragmas)
{
slang_code_unit *builtins = NULL;
GLuint base_version = 110;
@@ -2677,7 +2683,7 @@ compile_object(grammar * id, const char *source, slang_code_object * object,
/* compile the actual shader - pass-in built-in library for external shader */
return compile_with_grammar(*id, source, &object->unit, type, infolog,
- builtins, shader, extensions);
+ builtins, shader, extensions, pragmas);
}
@@ -2701,7 +2707,7 @@ compile_shader(GLcontext *ctx, slang_code_object * object,
_slang_code_object_ctr(object);
success = compile_object(&id, shader->Source, object, type, infolog, shader,
- &ctx->Extensions);
+ &ctx->Extensions, &shader->Pragmas);
if (id != 0)
grammar_destroy(id);
if (!success)
diff --git a/src/mesa/shader/slang/slang_emit.c b/src/mesa/shader/slang/slang_emit.c
index 414d3e639bf..6b744d72c82 100644
--- a/src/mesa/shader/slang/slang_emit.c
+++ b/src/mesa/shader/slang/slang_emit.c
@@ -2377,10 +2377,20 @@ _slang_resolve_subroutines(slang_emit_info *emitInfo)
-
+/**
+ * Convert the IR tree into GPU instructions.
+ * \param n root of IR tree
+ * \param vt variable table
+ * \param prog program to put GPU instructions into
+ * \param pragmas controls codegen options
+ * \param withEnd if true, emit END opcode at end
+ * \param log log for emitting errors/warnings/info
+ */
GLboolean
_slang_emit_code(slang_ir_node *n, slang_var_table *vt,
- struct gl_program *prog, GLboolean withEnd,
+ struct gl_program *prog,
+ const struct gl_sl_pragmas *pragmas,
+ GLboolean withEnd,
slang_info_log *log)
{
GET_CURRENT_CONTEXT(ctx);
@@ -2397,7 +2407,7 @@ _slang_emit_code(slang_ir_node *n, slang_var_table *vt,
emitInfo.EmitHighLevelInstructions = ctx->Shader.EmitHighLevelInstructions;
emitInfo.EmitCondCodes = ctx->Shader.EmitCondCodes;
- emitInfo.EmitComments = ctx->Shader.EmitComments;
+ emitInfo.EmitComments = ctx->Shader.EmitComments || pragmas->Debug;
emitInfo.EmitBeginEndSub = GL_TRUE;
if (!emitInfo.EmitCondCodes) {
diff --git a/src/mesa/shader/slang/slang_emit.h b/src/mesa/shader/slang/slang_emit.h
index 59fb2fa890d..8ff52bf605d 100644
--- a/src/mesa/shader/slang/slang_emit.h
+++ b/src/mesa/shader/slang/slang_emit.h
@@ -46,7 +46,9 @@ _slang_var_swizzle(GLint size, GLint comp);
extern GLboolean
_slang_emit_code(slang_ir_node *n, slang_var_table *vartable,
- struct gl_program *prog, GLboolean withEnd,
+ struct gl_program *prog,
+ const struct gl_sl_pragmas *pragmas,
+ GLboolean withEnd,
slang_info_log *log);
diff --git a/src/mesa/shader/slang/slang_preprocess.c b/src/mesa/shader/slang/slang_preprocess.c
index 244a09171c7..cd79c8b94a6 100644
--- a/src/mesa/shader/slang/slang_preprocess.c
+++ b/src/mesa/shader/slang/slang_preprocess.c
@@ -531,17 +531,53 @@ pp_ext_set(pp_ext *self, const char *name, GLboolean enable)
}
+static void
+pp_pragmas_init(struct gl_sl_pragmas *pragmas)
+{
+ pragmas->Optimize = GL_TRUE;
+ pragmas->Debug = GL_FALSE;
+}
+
+
/**
* Called in response to #pragma. For example, "#pragma debug(on)" would
* call this function as pp_pragma("debug", "on").
- * At this time, pragmas are silently ignored.
+ * \return GL_TRUE if pragma is valid, GL_FALSE if invalid
*/
-static void
-pp_pragma(const char *pragma, const char *param)
+static GLboolean
+pp_pragma(struct gl_sl_pragmas *pragmas, const char *pragma, const char *param)
{
#if 0
printf("#pragma %s %s\n", pragma, param);
#endif
+ if (_mesa_strcmp(pragma, "optimize") == 0) {
+ if (!param)
+ return GL_FALSE; /* missing required param */
+ if (_mesa_strcmp(param, "on") == 0) {
+ pragmas->Optimize = GL_TRUE;
+ }
+ else if (_mesa_strcmp(param, "off") == 0) {
+ pragmas->Optimize = GL_FALSE;
+ }
+ else {
+ return GL_FALSE; /* invalid param */
+ }
+ }
+ else if (_mesa_strcmp(pragma, "debug") == 0) {
+ if (!param)
+ return GL_FALSE; /* missing required param */
+ if (_mesa_strcmp(param, "on") == 0) {
+ pragmas->Debug = GL_TRUE;
+ }
+ else if (_mesa_strcmp(param, "off") == 0) {
+ pragmas->Debug = GL_FALSE;
+ }
+ else {
+ return GL_FALSE; /* invalid param */
+ }
+ }
+ /* all other pragmas are silently ignored */
+ return GL_TRUE;
}
@@ -887,7 +923,8 @@ static GLboolean
preprocess_source (slang_string *output, const char *source,
grammar pid, grammar eid,
slang_info_log *elog,
- const struct gl_extensions *extensions)
+ const struct gl_extensions *extensions,
+ struct gl_sl_pragmas *pragmas)
{
static const char *predefined[] = {
"__FILE__",
@@ -909,6 +946,7 @@ preprocess_source (slang_string *output, const char *source,
}
pp_state_init (&state, elog, extensions);
+ pp_pragmas_init (pragmas);
/* add the predefined symbols to the symbol table */
for (i = 0; predefined[i]; i++) {
@@ -1197,7 +1235,7 @@ preprocess_source (slang_string *output, const char *source,
else {
param = NULL;
}
- pp_pragma(pragma, param);
+ pp_pragma(pragmas, pragma, param);
}
break;
@@ -1265,7 +1303,8 @@ GLboolean
_slang_preprocess_directives(slang_string *output,
const char *input,
slang_info_log *elog,
- const struct gl_extensions *extensions)
+ const struct gl_extensions *extensions,
+ struct gl_sl_pragmas *pragmas)
{
grammar pid, eid;
GLboolean success;
@@ -1281,7 +1320,7 @@ _slang_preprocess_directives(slang_string *output,
grammar_destroy (pid);
return GL_FALSE;
}
- success = preprocess_source (output, input, pid, eid, elog, extensions);
+ success = preprocess_source (output, input, pid, eid, elog, extensions, pragmas);
grammar_destroy (eid);
grammar_destroy (pid);
return success;
diff --git a/src/mesa/shader/slang/slang_preprocess.h b/src/mesa/shader/slang/slang_preprocess.h
index dd996a6314b..f344820daef 100644
--- a/src/mesa/shader/slang/slang_preprocess.h
+++ b/src/mesa/shader/slang/slang_preprocess.h
@@ -1,8 +1,8 @@
/*
* Mesa 3-D graphics library
- * Version: 6.5.3
*
- * Copyright (C) 2005-2007 Brian Paul All Rights Reserved.
+ * Copyright (C) 2005-2008 Brian Paul All Rights Reserved.
+ * Copyright (C) 2009 VMware, Inc. All Rights Reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
@@ -35,6 +35,7 @@ _slang_preprocess_version (const char *, GLuint *, GLuint *, slang_info_log *);
extern GLboolean
_slang_preprocess_directives(slang_string *output, const char *input,
slang_info_log *,
- const struct gl_extensions *extensions);
+ const struct gl_extensions *extensions,
+ struct gl_sl_pragmas *pragmas);
#endif /* SLANG_PREPROCESS_H */
--
cgit v1.2.3
From 03188b09e071ace9d9e21ccc56c01e90c0fa8639 Mon Sep 17 00:00:00 2001
From: Ian Romanick
Date: Wed, 14 Jan 2009 12:46:06 -0800
Subject: intel: SW fallback maps texture images, not texture coordinates
---
src/mesa/drivers/dri/intel/intel_span.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/mesa/drivers/dri/intel/intel_span.c b/src/mesa/drivers/dri/intel/intel_span.c
index 8f4e681ffea..d9315043e6e 100644
--- a/src/mesa/drivers/dri/intel/intel_span.c
+++ b/src/mesa/drivers/dri/intel/intel_span.c
@@ -633,7 +633,7 @@ intelSpanRenderStart(GLcontext * ctx)
intelFlush(&intel->ctx);
LOCK_HARDWARE(intel);
- for (i = 0; i < ctx->Const.MaxTextureCoordUnits; i++) {
+ for (i = 0; i < ctx->Const.MaxTextureImageUnits; i++) {
if (ctx->Texture.Unit[i]._ReallyEnabled) {
struct gl_texture_object *texObj = ctx->Texture.Unit[i]._Current;
intel_tex_map_images(intel, intel_texture_object(texObj));
@@ -655,7 +655,7 @@ intelSpanRenderFinish(GLcontext * ctx)
_swrast_flush(ctx);
- for (i = 0; i < ctx->Const.MaxTextureCoordUnits; i++) {
+ for (i = 0; i < ctx->Const.MaxTextureImageUnits; i++) {
if (ctx->Texture.Unit[i]._ReallyEnabled) {
struct gl_texture_object *texObj = ctx->Texture.Unit[i]._Current;
intel_tex_unmap_images(intel, intel_texture_object(texObj));
--
cgit v1.2.3