[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

mesa: Changes to 'debian-unstable'



 Makefile                                         |    4 
 debian/changelog                                 |    9 
 docs/news.html                                   |    2 
 docs/relnotes-7.0.1.html                         |    9 
 docs/relnotes-7.0.2.html                         |   72 +++++++
 docs/relnotes.html                               |    1 
 include/GL/glu.h                                 |   27 +-
 src/glu/sgi/libutil/project.c                    |  115 +++++-------
 src/glx/x11/glxext.c                             |    7 
 src/glx/x11/indirect_vertex_array.c              |   14 -
 src/mesa/drivers/dri/common/spantmp2.h           |    2 
 src/mesa/drivers/dri/i810/i810screen.c           |    2 
 src/mesa/drivers/dri/i915/i915_texstate.c        |   19 +
 src/mesa/drivers/dri/i915/intel_context.c        |    8 
 src/mesa/drivers/dri/i915/intel_context.h        |    4 
 src/mesa/drivers/dri/i915/intel_screen.c         |    4 
 src/mesa/drivers/dri/i915/intel_tex.c            |    6 
 src/mesa/drivers/dri/i915tex/i830_vtbl.c         |   10 +
 src/mesa/drivers/dri/i915tex/i915_vtbl.c         |   10 +
 src/mesa/drivers/dri/i915tex/intel_context.c     |   12 +
 src/mesa/drivers/dri/i915tex/intel_context.h     |    4 
 src/mesa/drivers/dri/i915tex/intel_mipmap_tree.c |   16 +
 src/mesa/drivers/dri/i915tex/intel_screen.c      |    4 
 src/mesa/drivers/dri/unichrome/via_context.c     |    9 
 src/mesa/main/api_validate.c                     |  145 ++++++++-------
 src/mesa/main/attrib.c                           |  200 ++++++++++++++-------
 src/mesa/main/attrib.h                           |    4 
 src/mesa/main/context.c                          |   97 ++++++----
 src/mesa/main/dlist.c                            |    6 
 src/mesa/main/fbobject.c                         |   27 +-
 src/mesa/main/framebuffer.c                      |   13 -
 src/mesa/main/image.c                            |    2 
 src/mesa/main/mtypes.h                           |    7 
 src/mesa/main/texobj.c                           |  219 ++++++++++++-----------
 src/mesa/main/texobj.h                           |    4 
 src/mesa/main/texstate.c                         |   93 ++++-----
 src/mesa/shader/atifragshader.c                  |    4 
 src/mesa/shader/shader_api.c                     |    8 
 src/mesa/swrast/s_pointtemp.h                    |    4 
 src/mesa/vbo/vbo_split_copy.c                    |    9 
 src/mesa/x86-64/matypes.h                        |  162 -----------------
 src/mesa/x86/matypes.h                           |  163 -----------------
 42 files changed, 748 insertions(+), 789 deletions(-)

New commits:
commit 369cda37527959ae7e64478f17bbb21243d67135
Author: Julien Cristau <jcristau@debian.org>
Date:   Tue Aug 28 12:11:47 2007 +0200

    Prepare changelog for upload.

diff --git a/debian/changelog b/debian/changelog
index b56407c..b67350d 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,11 +1,11 @@
-mesa (7.0.1-2) UNRELEASED; urgency=low
+mesa (7.0.1-2) unstable; urgency=low
 
   * Update to latest git (from mesa_7_0_branch)
     + adds support for some new intel chipsets (i915 and i915_tex dri drivers)
       (closes: #437333)
     + broken inline asm in dri drivers fixed (closes: #423739)
 
- -- Julien Cristau <jcristau@debian.org>  Tue, 28 Aug 2007 12:06:45 +0200
+ -- Julien Cristau <jcristau@debian.org>  Tue, 28 Aug 2007 12:11:30 +0200
 
 mesa (7.0.1-1) unstable; urgency=low
 

commit 846078d06f8b2dff4fc50d0f3ae2bff71e184c5c
Author: Julien Cristau <jcristau@debian.org>
Date:   Tue Aug 28 12:07:45 2007 +0200

    Delete generated files.

diff --git a/src/mesa/x86-64/matypes.h b/src/mesa/x86-64/matypes.h
deleted file mode 100644
index d0bae3a..0000000
--- a/src/mesa/x86-64/matypes.h
+++ /dev/null
@@ -1,162 +0,0 @@
-/*
- * This file is automatically generated from the Mesa internal type
- * definitions.  Do not edit directly.
- */
-
-#ifndef __ASM_TYPES_H__
-#define __ASM_TYPES_H__
-
-
-
-/* =============================================================
- * Offsets for GLcontext
- */
-
-#define CTX_DRIVER_CTX              	952
-
-#define CTX_LIGHT_ENABLED           	39312
-#define CTX_LIGHT_SHADE_MODEL       	39316
-#define CTX_LIGHT_COLOR_MAT_FACE    	39320
-#define CTX_LIGHT_COLOR_MAT_MODE    	39324
-#define CTX_LIGHT_COLOR_MAT_MASK    	39328
-#define CTX_LIGHT_COLOR_MAT_ENABLED 	39332
-#define CTX_LIGHT_ENABLED_LIST      	39340
-#define CTX_LIGHT_NEED_VERTS        	43701
-#define CTX_LIGHT_FLAGS             	43704
-#define CTX_LIGHT_BASE_COLOR        	43708
-
-
-/* =============================================================
- * Offsets for struct vertex_buffer
- */
-
-#define VB_SIZE                	0
-#define VB_COUNT               	4
-
-#define VB_ELTS                	8
-#define VB_OBJ_PTR             	12
-#define VB_EYE_PTR             	16
-#define VB_CLIP_PTR            	20
-#define VB_PROJ_CLIP_PTR       	24
-#define VB_CLIP_OR_MASK        	28
-#define VB_CLIP_MASK           	32
-#define VB_NORMAL_PTR          	36
-#define VB_EDGE_FLAG           	44
-#define VB_TEX0_COORD_PTR      	48
-#define VB_TEX1_COORD_PTR      	52
-#define VB_TEX2_COORD_PTR      	56
-#define VB_TEX3_COORD_PTR      	60
-#define VB_INDEX_PTR           	80
-#define VB_COLOR_PTR           	88
-#define VB_SECONDARY_COLOR_PTR 	96
-#define VB_FOG_COORD_PTR       	104
-#define VB_PRIMITIVE           	108
-
-
-/*
- * Flags for struct vertex_buffer
- */
-
-#define VERT_BIT_OBJ           	0x1
-#define VERT_BIT_NORM          	0x4
-#define VERT_BIT_RGBA          	0x8
-#define VERT_BIT_SPEC_RGB      	0x10
-#define VERT_BIT_FOG_COORD     	0x20
-#define VERT_BIT_TEX0          	0x100
-#define VERT_BIT_TEX1          	0x200
-#define VERT_BIT_TEX2          	0x400
-#define VERT_BIT_TEX3          	0x800
-
-
-/* =============================================================
- * Offsets for GLvector4f
- */
-
-#define V4F_DATA          	0
-#define V4F_START         	4
-#define V4F_COUNT         	8
-#define V4F_STRIDE        	12
-#define V4F_SIZE          	16
-#define V4F_FLAGS         	20
-
-/*
- * Flags for GLvector4f
- */
-
-#define VEC_MALLOC        	0x10
-#define VEC_NOT_WRITEABLE 	0x40
-#define VEC_BAD_STRIDE    	0x100
-
-#define VEC_SIZE_1        	0x1
-#define VEC_SIZE_2        	0x3
-#define VEC_SIZE_3        	0x7
-#define VEC_SIZE_4        	0xf
-
-
-/* =============================================================
- * Offsets for GLmatrix
- */
-
-#define MATRIX_DATA   	0
-#define MATRIX_INV    	4
-#define MATRIX_FLAGS  	8
-#define MATRIX_TYPE   	12
-
-
-/* =============================================================
- * Offsets for struct gl_light
- */
-
-#define LIGHT_NEXT              	0
-#define LIGHT_PREV              	4
-
-#define LIGHT_AMBIENT           	8
-#define LIGHT_DIFFUSE           	24
-#define LIGHT_SPECULAR          	40
-#define LIGHT_EYE_POSITION      	56
-#define LIGHT_EYE_DIRECTION     	72
-#define LIGHT_SPOT_EXPONENT     	88
-#define LIGHT_SPOT_CUTOFF       	92
-#define LIGHT_COS_CUTOFF        	100
-#define LIGHT_CONST_ATTEN       	104
-#define LIGHT_LINEAR_ATTEN      	108
-#define LIGHT_QUADRATIC_ATTEN   	112
-#define LIGHT_ENABLED           	116
-
-#define LIGHT_FLAGS             	120
-
-#define LIGHT_POSITION          	124
-#define LIGHT_VP_INF_NORM       	140
-#define LIGHT_H_INF_NORM        	152
-#define LIGHT_NORM_DIRECTION    	164
-#define LIGHT_VP_INF_SPOT_ATTEN 	180
-
-#define LIGHT_SPOT_EXP_TABLE    	184
-#define LIGHT_MAT_AMBIENT       	4280
-#define LIGHT_MAT_DIFFUSE       	4304
-#define LIGHT_MAT_SPECULAR      	4328
-
-#define SIZEOF_GL_LIGHT         	4360
-
-/*
- * Flags for struct gl_light
- */
-
-#define LIGHT_SPOT              	0x1
-#define LIGHT_LOCAL_VIEWER      	0x2
-#define LIGHT_POSITIONAL        	0x4
-
-#define LIGHT_NEED_VERTICES     	0x6
-
-
-/* =============================================================
- * Offsets for struct gl_lightmodel
- */
-
-#define LIGHT_MODEL_AMBIENT       	0
-#define LIGHT_MODEL_LOCAL_VIEWER  	16
-#define LIGHT_MODEL_TWO_SIDE      	17
-#define LIGHT_MODEL_COLOR_CONTROL 	20
-
-
-#endif /* __ASM_TYPES_H__ */
diff --git a/src/mesa/x86/matypes.h b/src/mesa/x86/matypes.h
deleted file mode 100644
index 375f882..0000000
--- a/src/mesa/x86/matypes.h
+++ /dev/null
@@ -1,163 +0,0 @@
-/*
- * This file is automatically generated from the Mesa internal type
- * definitions.  Do not edit directly.
- */
-
-#ifndef __ASM_TYPES_H__
-#define __ASM_TYPES_H__
-
-#include "assyntax.h"
-
-
-/* =============================================================
- * Offsets for GLcontext
- */
-
-#define CTX_DRIVER_CTX              	952
-
-#define CTX_LIGHT_ENABLED           	39312
-#define CTX_LIGHT_SHADE_MODEL       	39316
-#define CTX_LIGHT_COLOR_MAT_FACE    	39320
-#define CTX_LIGHT_COLOR_MAT_MODE    	39324
-#define CTX_LIGHT_COLOR_MAT_MASK    	39328
-#define CTX_LIGHT_COLOR_MAT_ENABLED 	39332
-#define CTX_LIGHT_ENABLED_LIST      	39340
-#define CTX_LIGHT_NEED_VERTS        	43701
-#define CTX_LIGHT_FLAGS             	43704
-#define CTX_LIGHT_BASE_COLOR        	43708
-
-
-/* =============================================================
- * Offsets for struct vertex_buffer
- */
-
-#define VB_SIZE                	0
-#define VB_COUNT               	4
-
-#define VB_ELTS                	8
-#define VB_OBJ_PTR             	12
-#define VB_EYE_PTR             	16
-#define VB_CLIP_PTR            	20
-#define VB_PROJ_CLIP_PTR       	24
-#define VB_CLIP_OR_MASK        	28
-#define VB_CLIP_MASK           	32
-#define VB_NORMAL_PTR          	36
-#define VB_EDGE_FLAG           	44
-#define VB_TEX0_COORD_PTR      	48
-#define VB_TEX1_COORD_PTR      	52
-#define VB_TEX2_COORD_PTR      	56
-#define VB_TEX3_COORD_PTR      	60
-#define VB_INDEX_PTR           	80
-#define VB_COLOR_PTR           	88
-#define VB_SECONDARY_COLOR_PTR 	96
-#define VB_FOG_COORD_PTR       	104
-#define VB_PRIMITIVE           	108
-
-
-/*
- * Flags for struct vertex_buffer
- */
-
-#define VERT_BIT_OBJ           	0x1
-#define VERT_BIT_NORM          	0x4
-#define VERT_BIT_RGBA          	0x8
-#define VERT_BIT_SPEC_RGB      	0x10
-#define VERT_BIT_FOG_COORD     	0x20
-#define VERT_BIT_TEX0          	0x100
-#define VERT_BIT_TEX1          	0x200
-#define VERT_BIT_TEX2          	0x400
-#define VERT_BIT_TEX3          	0x800
-
-
-/* =============================================================
- * Offsets for GLvector4f
- */
-
-#define V4F_DATA          	0
-#define V4F_START         	4
-#define V4F_COUNT         	8
-#define V4F_STRIDE        	12
-#define V4F_SIZE          	16
-#define V4F_FLAGS         	20
-
-/*
- * Flags for GLvector4f
- */
-
-#define VEC_MALLOC        	0x10
-#define VEC_NOT_WRITEABLE 	0x40
-#define VEC_BAD_STRIDE    	0x100
-
-#define VEC_SIZE_1        	0x1
-#define VEC_SIZE_2        	0x3
-#define VEC_SIZE_3        	0x7
-#define VEC_SIZE_4        	0xf
-
-
-/* =============================================================
- * Offsets for GLmatrix
- */
-
-#define MATRIX_DATA   	0
-#define MATRIX_INV    	4
-#define MATRIX_FLAGS  	8
-#define MATRIX_TYPE   	12
-
-
-/* =============================================================
- * Offsets for struct gl_light
- */
-
-#define LIGHT_NEXT              	0
-#define LIGHT_PREV              	4
-
-#define LIGHT_AMBIENT           	8
-#define LIGHT_DIFFUSE           	24
-#define LIGHT_SPECULAR          	40
-#define LIGHT_EYE_POSITION      	56
-#define LIGHT_EYE_DIRECTION     	72
-#define LIGHT_SPOT_EXPONENT     	88
-#define LIGHT_SPOT_CUTOFF       	92
-#define LIGHT_COS_CUTOFF        	100
-#define LIGHT_CONST_ATTEN       	104
-#define LIGHT_LINEAR_ATTEN      	108
-#define LIGHT_QUADRATIC_ATTEN   	112
-#define LIGHT_ENABLED           	116
-
-#define LIGHT_FLAGS             	120
-
-#define LIGHT_POSITION          	124
-#define LIGHT_VP_INF_NORM       	140
-#define LIGHT_H_INF_NORM        	152
-#define LIGHT_NORM_DIRECTION    	164
-#define LIGHT_VP_INF_SPOT_ATTEN 	180
-
-#define LIGHT_SPOT_EXP_TABLE    	184
-#define LIGHT_MAT_AMBIENT       	4280
-#define LIGHT_MAT_DIFFUSE       	4304
-#define LIGHT_MAT_SPECULAR      	4328
-
-#define SIZEOF_GL_LIGHT         	4360
-
-/*
- * Flags for struct gl_light
- */
-
-#define LIGHT_SPOT              	0x1
-#define LIGHT_LOCAL_VIEWER      	0x2
-#define LIGHT_POSITIONAL        	0x4
-
-#define LIGHT_NEED_VERTICES     	0x6
-
-
-/* =============================================================
- * Offsets for struct gl_lightmodel
- */
-
-#define LIGHT_MODEL_AMBIENT       	0
-#define LIGHT_MODEL_LOCAL_VIEWER  	16
-#define LIGHT_MODEL_TWO_SIDE      	17
-#define LIGHT_MODEL_COLOR_CONTROL 	20
-
-
-#endif /* __ASM_TYPES_H__ */

commit b18500d56e7ee34f8d3a9b12d82b6e2723ea6b4b
Author: Julien Cristau <jcristau@debian.org>
Date:   Tue Aug 28 11:16:05 2007 +0200

    * Update to latest git (from mesa_7_0_branch)
      + adds support for some new intel chipsets (i915 and i915_tex dri drivers)
        (closes: #437333)
      + broken inline asm in dri drivers fixed (closes: #423739)

diff --git a/debian/changelog b/debian/changelog
index 04740ad..b56407c 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,12 @@
+mesa (7.0.1-2) UNRELEASED; urgency=low
+
+  * Update to latest git (from mesa_7_0_branch)
+    + adds support for some new intel chipsets (i915 and i915_tex dri drivers)
+      (closes: #437333)
+    + broken inline asm in dri drivers fixed (closes: #423739)
+
+ -- Julien Cristau <jcristau@debian.org>  Tue, 28 Aug 2007 12:06:45 +0200
+
 mesa (7.0.1-1) unstable; urgency=low
 
   * New upstream release.

commit d69a5961931fcac4b876c55ebfe0189fd11b8d71
Author: Brian <brian.paul@tungstengraphics.com>
Date:   Mon Aug 27 10:48:31 2007 -0600

    Fixed bugs 6748, 12141

diff --git a/docs/relnotes-7.0.2.html b/docs/relnotes-7.0.2.html
index f1fd3d2..d06171e 100644
--- a/docs/relnotes-7.0.2.html
+++ b/docs/relnotes-7.0.2.html
@@ -31,6 +31,8 @@ Mesa 7.0.2 is a stable release with bug fixes since version 7.0.
 <li>Added checking/support for additional chips in the i915/i945 family
 (see 11978)
 <li>Fixed a blending/banding issue (bug 11931)
+<li>Fixed a GLU matrix inversion bug (#6748)
+<li>Fixed problem with large glDrawArrays calls and indirect rendering (bug 12141)
 </ul>
 
 

commit 8aa4ae638ee5a169f1f0f77c80f2a066d9f50e23
Author: Colin McDonald <cjmcdonald@qinetiq.com>
Date:   Mon Aug 27 10:47:49 2007 -0600

    fixed problem with big glDrawArrays (see bug 12141)

diff --git a/src/glx/x11/indirect_vertex_array.c b/src/glx/x11/indirect_vertex_array.c
index 90ec277..120fd82 100644
--- a/src/glx/x11/indirect_vertex_array.c
+++ b/src/glx/x11/indirect_vertex_array.c
@@ -527,7 +527,7 @@ static GLubyte *
 emit_DrawArrays_header_old( __GLXcontext * gc,
 			    struct array_state_vector * arrays,
 			    size_t * elements_per_request,
-			    size_t * total_requests,
+			    unsigned int * total_requests,
 			    GLenum mode, GLsizei count )
 {
     size_t command_size;
@@ -640,7 +640,7 @@ emit_DrawArrays_old( GLenum mode, GLint first, GLsizei count )
 
     GLubyte * pc;
     size_t elements_per_request;
-    size_t total_requests = 0;
+    unsigned total_requests = 0;
     unsigned i;
     size_t total_sent = 0;
 
@@ -770,9 +770,10 @@ emit_DrawElements_old( GLenum mode, GLsizei count, GLenum type,
 
     GLubyte * pc;
     size_t elements_per_request;
-    size_t total_requests = 0;
+    unsigned total_requests = 0;
     unsigned i;
     unsigned req;
+    unsigned req_element=0;
 
 
     pc = emit_DrawArrays_header_old( gc, arrays, & elements_per_request,
@@ -790,7 +791,7 @@ emit_DrawElements_old( GLenum mode, GLsizei count, GLenum type,
 
 	switch( type ) {
 	case GL_UNSIGNED_INT: {
-	    const GLuint   * ui_ptr = (const GLuint   *) indices;
+	    const GLuint   * ui_ptr = (const GLuint   *) indices + req_element;
 
 	    for ( i = 0 ; i < elements_per_request ; i++ ) {
 		const GLint index = (GLint) *(ui_ptr++);
@@ -799,7 +800,7 @@ emit_DrawElements_old( GLenum mode, GLsizei count, GLenum type,
 	    break;
 	}
 	case GL_UNSIGNED_SHORT: {
-	    const GLushort * us_ptr = (const GLushort *) indices;
+	    const GLushort * us_ptr = (const GLushort *) indices + req_element;
 
 	    for ( i = 0 ; i < elements_per_request ; i++ ) {
 		const GLint index = (GLint) *(us_ptr++);
@@ -808,7 +809,7 @@ emit_DrawElements_old( GLenum mode, GLsizei count, GLenum type,
 	    break;
 	}
 	case GL_UNSIGNED_BYTE: {
-	    const GLubyte  * ub_ptr = (const GLubyte  *) indices;
+	    const GLubyte  * ub_ptr = (const GLubyte  *) indices + req_element;
 
 	    for ( i = 0 ; i < elements_per_request ; i++ ) {
 		const GLint index = (GLint) *(ub_ptr++);
@@ -826,6 +827,7 @@ emit_DrawElements_old( GLenum mode, GLsizei count, GLenum type,
 	}
 
 	count -= elements_per_request;
+	req_element += elements_per_request;
     }
 
 

commit 3069f3484186df09b671c44efdb221f50e5a6a88
Author: Brian <brian.paul@tungstengraphics.com>
Date:   Mon Aug 27 10:36:25 2007 -0600

    new __gluInvertMatrix() function (Mesa bug 6748)

diff --git a/src/glu/sgi/libutil/project.c b/src/glu/sgi/libutil/project.c
index 2b20ad4..d22989c 100644
--- a/src/glu/sgi/libutil/project.c
+++ b/src/glu/sgi/libutil/project.c
@@ -168,74 +168,57 @@ static void __gluMultMatrixVecd(const GLdouble matrix[16], const GLdouble in[4],
 }
 
 /*
-** inverse = invert(src)
-** New, faster implementation by Shan Hao Bo, April 2006.
+** Invert 4x4 matrix.
+** Contributed by David Moore (See Mesa bug #6748)
 */
-static int __gluInvertMatrixd(const GLdouble src[16], GLdouble inverse[16])
+static int __gluInvertMatrixd(const GLdouble m[16], GLdouble inv[16])
 {
-	int i, j, k;
-	double t;
-	GLdouble temp[4][4];
-	 
-	for (i=0; i<4; i++) {
-		for (j=0; j<4; j++) {
-		    temp[i][j] = src[i*4+j];
-		}
-	}
-	__gluMakeIdentityd(inverse);
-	
-	for (i = 0; i < 4; i++) {
-		if (temp[i][i] == 0.0f) {
-		    /*
-		    ** Look for non-zero element in column
-		    */
-		    for (j = i + 1; j < 4; j++) {
-				if (temp[j][i] != 0.0f) {
-				    break;
-				}
-		    }
-		
-		    if (j != 4) {
-				/*
-				 ** Swap rows.
-				 */
-				for (k = 0; k < 4; k++) {
-				    t = temp[i][k];
-				    temp[i][k] = temp[j][k];
-				    temp[j][k] = t;
-			
-				    t = inverse[i*4+k];
-				    inverse[i*4+k] = inverse[j*4+k];
-				    inverse[j*4+k] = t;
-				}
-		    }
-		    else {
-				/*
-				** No non-zero pivot.  The matrix is singular, 
-which shouldn't
-				** happen.  This means the user gave us a bad 
-matrix.
-				*/
-				return GL_FALSE;
-		    }
-		}
-		
-		t = 1.0f / temp[i][i];
-		for (k = 0; k < 4; k++) {
-		    temp[i][k] *= t;
-		    inverse[i*4+k] *= t;
-		}
-		for (j = 0; j < 4; j++) {
-		    if (j != i) {
-				t = temp[j][i];
-				for (k = 0; k < 4; k++) {
-					    temp[j][k] -= temp[i][k]*t;
-					    inverse[j*4+k] -= inverse[i*4+k]*t;
-				}
-		    }
-		}
-	}
-	return GL_TRUE;
+    double det;
+    int i;
+
+    inv[0] =   m[5]*m[10]*m[15] - m[5]*m[11]*m[14] - m[9]*m[6]*m[15]
+             + m[9]*m[7]*m[14] + m[13]*m[6]*m[11] - m[13]*m[7]*m[10];
+    inv[4] =  -m[4]*m[10]*m[15] + m[4]*m[11]*m[14] + m[8]*m[6]*m[15]
+             - m[8]*m[7]*m[14] - m[12]*m[6]*m[11] + m[12]*m[7]*m[10];
+    inv[8] =   m[4]*m[9]*m[15] - m[4]*m[11]*m[13] - m[8]*m[5]*m[15]
+             + m[8]*m[7]*m[13] + m[12]*m[5]*m[11] - m[12]*m[7]*m[9];
+    inv[12] = -m[4]*m[9]*m[14] + m[4]*m[10]*m[13] + m[8]*m[5]*m[14]
+             - m[8]*m[6]*m[13] - m[12]*m[5]*m[10] + m[12]*m[6]*m[9];
+    inv[1] =  -m[1]*m[10]*m[15] + m[1]*m[11]*m[14] + m[9]*m[2]*m[15]
+             - m[9]*m[3]*m[14] - m[13]*m[2]*m[11] + m[13]*m[3]*m[10];
+    inv[5] =   m[0]*m[10]*m[15] - m[0]*m[11]*m[14] - m[8]*m[2]*m[15]
+             + m[8]*m[3]*m[14] + m[12]*m[2]*m[11] - m[12]*m[3]*m[10];
+    inv[9] =  -m[0]*m[9]*m[15] + m[0]*m[11]*m[13] + m[8]*m[1]*m[15]
+             - m[8]*m[3]*m[13] - m[12]*m[1]*m[11] + m[12]*m[3]*m[9];
+    inv[13] =  m[0]*m[9]*m[14] - m[0]*m[10]*m[13] - m[8]*m[1]*m[14]
+             + m[8]*m[2]*m[13] + m[12]*m[1]*m[10] - m[12]*m[2]*m[9];
+    inv[2] =   m[1]*m[6]*m[15] - m[1]*m[7]*m[14] - m[5]*m[2]*m[15]
+             + m[5]*m[3]*m[14] + m[13]*m[2]*m[7] - m[13]*m[3]*m[6];
+    inv[6] =  -m[0]*m[6]*m[15] + m[0]*m[7]*m[14] + m[4]*m[2]*m[15]
+             - m[4]*m[3]*m[14] - m[12]*m[2]*m[7] + m[12]*m[3]*m[6];
+    inv[10] =  m[0]*m[5]*m[15] - m[0]*m[7]*m[13] - m[4]*m[1]*m[15]
+             + m[4]*m[3]*m[13] + m[12]*m[1]*m[7] - m[12]*m[3]*m[5];
+    inv[14] = -m[0]*m[5]*m[14] + m[0]*m[6]*m[13] + m[4]*m[1]*m[14]
+             - m[4]*m[2]*m[13] - m[12]*m[1]*m[6] + m[12]*m[2]*m[5];
+    inv[3] =  -m[1]*m[6]*m[11] + m[1]*m[7]*m[10] + m[5]*m[2]*m[11]
+             - m[5]*m[3]*m[10] - m[9]*m[2]*m[7] + m[9]*m[3]*m[6];
+    inv[7] =   m[0]*m[6]*m[11] - m[0]*m[7]*m[10] - m[4]*m[2]*m[11]
+             + m[4]*m[3]*m[10] + m[8]*m[2]*m[7] - m[8]*m[3]*m[6];
+    inv[11] = -m[0]*m[5]*m[11] + m[0]*m[7]*m[9] + m[4]*m[1]*m[11]
+             - m[4]*m[3]*m[9] - m[8]*m[1]*m[7] + m[8]*m[3]*m[5];
+    inv[15] =  m[0]*m[5]*m[10] - m[0]*m[6]*m[9] - m[4]*m[1]*m[10]
+             + m[4]*m[2]*m[9] + m[8]*m[1]*m[6] - m[8]*m[2]*m[5];
+
+    det = m[0]*inv[0] + m[1]*inv[4] + m[2]*inv[8] + m[3]*inv[12];
+    if (det == 0)
+        return GL_FALSE;
+
+    det = 1.0 / det;
+
+    for (i = 0; i < 16; i++)
+        inv[i] *= det;
+
+    return GL_TRUE;
 }
 
 static void __gluMultMatricesd(const GLdouble a[16], const GLdouble b[16],

commit b3788a0e4f1f9fc06aa9f86c176dbc765194a1f1
Author: Adam Jackson <ajax@kemper.freedesktop.org>
Date:   Fri Aug 24 08:49:59 2007 +0100

    Unbreak Linux builds with -fvisibility=hidden.

diff --git a/include/GL/glu.h b/include/GL/glu.h
index d82103d..7db4b70 100644
--- a/include/GL/glu.h
+++ b/include/GL/glu.h
@@ -44,22 +44,17 @@
 #define GLAPIENTRYP GLAPIENTRY *
 #endif
 
-#ifdef GLAPI
-#undef GLAPI
-#endif
-
-#  if (defined(_MSC_VER) || defined(__MINGW32__)) && defined(BUILD_GLU32)
-#    define GLAPI __declspec(dllexport)
-#  elif (defined(_MSC_VER) || defined(__MINGW32__)) && defined(_DLL) /* tag specifying we're building for DLL runtime support */
-#    define GLAPI __declspec(dllimport)
-#  else /* for use with static link lib build of Win32 edition only */
-#    define GLAPI extern
-#  endif /* _STATIC_MESA support */
-
-
-#ifndef GLAPI
-#define GLAPI
-#endif
+#if (defined(_MSC_VER) || defined(__MINGW32__)) && defined(BUILD_GLU32)
+# undef GLAPI
+# define GLAPI __declspec(dllexport)
+#elif (defined(_MSC_VER) || defined(__MINGW32__)) && defined(_DLL)
+/* tag specifying we're building for DLL runtime support */
+# undef GLAPI
+# define GLAPI __declspec(dllimport)
+#elif !defined(GLAPI)
+/* for use with static link lib build of Win32 edition only */
+# define GLAPI extern
+#endif /* _STATIC_MESA support */
 
 #ifdef __cplusplus
 extern "C" {

commit 582bc029abb7b9b0fd2c6d3c3b131fa72931c4e4
Author: Brian <brian.paul@tungstengraphics.com>
Date:   Fri Aug 24 08:45:27 2007 +0100

    remove CallDepth++/-- accidentally removed in prev commit

diff --git a/src/mesa/main/dlist.c b/src/mesa/main/dlist.c
index 80891b0..844db6b 100644
--- a/src/mesa/main/dlist.c
+++ b/src/mesa/main/dlist.c
@@ -5737,6 +5737,8 @@ execute_list(GLcontext *ctx, GLuint list)
    if (!dlist)
       return;
 
+   ctx->ListState.CallDepth++;
+
    if (ctx->Driver.BeginCallList)
       ctx->Driver.BeginCallList(ctx, dlist);
 
@@ -6626,6 +6628,8 @@ execute_list(GLcontext *ctx, GLuint list)
 
    if (ctx->Driver.EndCallList)
       ctx->Driver.EndCallList(ctx);
+
+   ctx->ListState.CallDepth--;
 }
 
 

commit e9e3099433e45fe24da5bef35b63302f4f17f31a
Author: Brian <brian.paul@tungstengraphics.com>
Date:   Thu Aug 23 08:17:35 2007 +0100

    remove unneeded CallStack array

diff --git a/src/mesa/main/dlist.c b/src/mesa/main/dlist.c
index 7813c7a..80891b0 100644
--- a/src/mesa/main/dlist.c
+++ b/src/mesa/main/dlist.c
@@ -1,6 +1,6 @@
 /*
  * Mesa 3-D graphics library
- * Version:  7.0.1
+ * Version:  7.0.2
  *
  * Copyright (C) 1999-2007  Brian Paul   All Rights Reserved.
  *
@@ -5737,8 +5737,6 @@ execute_list(GLcontext *ctx, GLuint list)
    if (!dlist)
       return;
 
-   ctx->ListState.CallStack[ctx->ListState.CallDepth++] = dlist;
-
    if (ctx->Driver.BeginCallList)
       ctx->Driver.BeginCallList(ctx, dlist);
 
@@ -6628,8 +6626,6 @@ execute_list(GLcontext *ctx, GLuint list)
 
    if (ctx->Driver.EndCallList)
       ctx->Driver.EndCallList(ctx);
-
-   ctx->ListState.CallStack[ctx->ListState.CallDepth--] = NULL;
 }
 
 
diff --git a/src/mesa/main/mtypes.h b/src/mesa/main/mtypes.h
index 1568ab3..d00f2ef 100644
--- a/src/mesa/main/mtypes.h
+++ b/src/mesa/main/mtypes.h
@@ -2842,7 +2842,6 @@ struct mesa_display_list
  */
 struct gl_dlist_state
 {
-   struct mesa_display_list *CallStack[MAX_LIST_NESTING];
    GLuint CallDepth;		/**< Current recursion calling depth */
 
    struct mesa_display_list *CurrentList;

commit 4fc561cc7b60050433093e82625ba6a1f0fd7022
Author: Brian <brian.paul@tungstengraphics.com>
Date:   Mon Aug 20 13:12:10 2007 +0100

    refactor bounds checking code

diff --git a/src/mesa/main/api_validate.c b/src/mesa/main/api_validate.c
index 9c05c36..88a527e 100644
--- a/src/mesa/main/api_validate.c
+++ b/src/mesa/main/api_validate.c
@@ -30,6 +30,55 @@
 #include "state.h"
 
 
+/**
+ * Find the max index in the given element/index buffer
+ */
+static GLuint
+max_buffer_index(GLcontext *ctx, GLuint count, GLenum type,
+                 const void *indices,
+                 struct gl_buffer_object *elementBuf)
+{
+   const GLubyte *map = NULL;
+   GLuint max = 0;
+   GLint i;
+
+   if (elementBuf->Name) {
+      /* elements are in a user-defined buffer object.  need to map it */
+      map = ctx->Driver.MapBuffer(ctx,
+                                  GL_ELEMENT_ARRAY_BUFFER_ARB,
+                                  GL_READ_ONLY,
+                                  elementBuf);
+      /* Actual address is the sum of pointers */
+      indices = (const GLvoid *) ADD_POINTERS(map, (const GLubyte *) indices);
+   }
+
+   if (type == GL_UNSIGNED_INT) {
+      for (i = 0; i < count; i++)
+         if (((GLuint *) indices)[i] > max)
+            max = ((GLuint *) indices)[i];
+   }
+   else if (type == GL_UNSIGNED_SHORT) {
+      for (i = 0; i < count; i++)
+         if (((GLushort *) indices)[i] > max)
+            max = ((GLushort *) indices)[i];
+   }
+   else {
+      ASSERT(type == GL_UNSIGNED_BYTE);
+      for (i = 0; i < count; i++)
+         if (((GLubyte *) indices)[i] > max)
+            max = ((GLubyte *) indices)[i];
+   }
+
+   if (map) {
+      ctx->Driver.UnmapBuffer(ctx,
+                              GL_ELEMENT_ARRAY_BUFFER_ARB,
+                              ctx->Array.ElementArrayBufferObj);
+   }
+
+   return max;
+}
+
+
 GLboolean
 _mesa_validate_DrawElements(GLcontext *ctx,
 			    GLenum mode, GLsizei count, GLenum type,
@@ -61,21 +110,15 @@ _mesa_validate_DrawElements(GLcontext *ctx,
 
    /* Always need vertex positions */
    if (!ctx->Array.ArrayObj->Vertex.Enabled
-       && !(ctx->VertexProgram._Enabled && ctx->Array.ArrayObj->VertexAttrib[0].Enabled))
+       && !(ctx->VertexProgram._Enabled
+            && ctx->Array.ArrayObj->VertexAttrib[0].Enabled))
       return GL_FALSE;
 
    /* Vertex buffer object tests */
    if (ctx->Array.ElementArrayBufferObj->Name) {
-      GLuint indexBytes;
-
       /* use indices in the buffer object */
-      if (!ctx->Array.ElementArrayBufferObj->Size) {
-         _mesa_warning(ctx,
-                       "glDrawElements called with empty array elements buffer");
-         return GL_FALSE;
-      }
+      GLuint indexBytes;
 
-      /* make sure count doesn't go outside buffer bounds */
       if (type == GL_UNSIGNED_INT) {
          indexBytes = count * sizeof(GLuint);
       }
@@ -87,6 +130,7 @@ _mesa_validate_DrawElements(GLcontext *ctx,
          indexBytes = count * sizeof(GLushort);
       }
 
+      /* make sure count doesn't go outside buffer bounds */
       if (indexBytes > ctx->Array.ElementArrayBufferObj->Size) {
          _mesa_warning(ctx, "glDrawElements index out of buffer bounds");
          return GL_FALSE;
@@ -100,39 +144,8 @@ _mesa_validate_DrawElements(GLcontext *ctx,
 
    if (ctx->Const.CheckArrayBounds) {
       /* find max array index */
-      const GLubyte *map;
-      GLuint max = 0;
-      GLint i;
-
-      map = ctx->Driver.MapBuffer(ctx,
-                                  GL_ELEMENT_ARRAY_BUFFER_ARB,
-                                  GL_READ_ONLY,
-                                  ctx->Array.ElementArrayBufferObj);
-
-      /* Actual address is the sum of pointers */
-      indices = (const GLvoid *) ADD_POINTERS(map, (const GLubyte *) indices);
-
-      if (type == GL_UNSIGNED_INT) {
-         for (i = 0; i < count; i++)
-            if (((GLuint *) indices)[i] > max)
-               max = ((GLuint *) indices)[i];
-      }
-      else if (type == GL_UNSIGNED_SHORT) {
-         for (i = 0; i < count; i++)
-            if (((GLushort *) indices)[i] > max)
-               max = ((GLushort *) indices)[i];
-      }
-      else {
-         ASSERT(type == GL_UNSIGNED_BYTE);
-         for (i = 0; i < count; i++)
-            if (((GLubyte *) indices)[i] > max)
-               max = ((GLubyte *) indices)[i];
-      }
-
-      ctx->Driver.UnmapBuffer(ctx,
-                              GL_ELEMENT_ARRAY_BUFFER_ARB,
-                              ctx->Array.ElementArrayBufferObj);
-
+      GLuint max = max_buffer_index(ctx, count, type, indices,
+                                    ctx->Array.ElementArrayBufferObj);
       if (max >= ctx->Array._MaxElement) {
          /* the max element is out of bounds of one or more enabled arrays */
          return GL_FALSE;
@@ -179,41 +192,41 @@ _mesa_validate_DrawRangeElements(GLcontext *ctx, GLenum mode,
 
    /* Always need vertex positions */
    if (!ctx->Array.ArrayObj->Vertex.Enabled
-       && !(ctx->VertexProgram._Enabled && ctx->Array.ArrayObj->VertexAttrib[0].Enabled))
+       && !(ctx->VertexProgram._Enabled
+            && ctx->Array.ArrayObj->VertexAttrib[0].Enabled))
       return GL_FALSE;
 
    /* Vertex buffer object tests */
    if (ctx->Array.ElementArrayBufferObj->Name) {
-      /* XXX re-use code from above? */
+      /* use indices in the buffer object */
+      GLuint indexBytes;
+
+      if (type == GL_UNSIGNED_INT) {
+         indexBytes = count * sizeof(GLuint);
+      }
+      else if (type == GL_UNSIGNED_BYTE) {
+         indexBytes = count * sizeof(GLubyte);
+      }
+      else {
+         ASSERT(type == GL_UNSIGNED_SHORT);
+         indexBytes = count * sizeof(GLushort);
+      }
+
+      /* make sure count doesn't go outside buffer bounds */
+      if (indexBytes > ctx->Array.ElementArrayBufferObj->Size) {
+         _mesa_warning(ctx, "glDrawElements index out of buffer bounds");
+         return GL_FALSE;
+      }
    }
    else {
-      /* not using VBO */
+      /* not using a VBO */
       if (!indices)
          return GL_FALSE;
    }
 
    if (ctx->Const.CheckArrayBounds) {
-      /* Find max array index.
-       * We don't trust the user's start and end values.
-       */
-      GLuint max = 0;
-      GLint i;
-      if (type == GL_UNSIGNED_INT) {
-         for (i = 0; i < count; i++)
-            if (((GLuint *) indices)[i] > max)
-               max = ((GLuint *) indices)[i];
-      }
-      else if (type == GL_UNSIGNED_SHORT) {
-         for (i = 0; i < count; i++)
-            if (((GLushort *) indices)[i] > max)
-               max = ((GLushort *) indices)[i];
-      }
-      else {
-         ASSERT(type == GL_UNSIGNED_BYTE);
-         for (i = 0; i < count; i++)
-            if (((GLubyte *) indices)[i] > max)
-               max = ((GLubyte *) indices)[i];
-      }
+      GLuint max = max_buffer_index(ctx, count, type, indices,
+                                    ctx->Array.ElementArrayBufferObj);
       if (max >= ctx->Array._MaxElement) {



Reply to: