Merge branch 'master' into gallium-0.2
authorKeith Whitwell <keith@tungstengraphics.com>
Mon, 22 Sep 2008 05:30:55 +0000 (22:30 -0700)
committerKeith Whitwell <keith@tungstengraphics.com>
Mon, 22 Sep 2008 05:30:55 +0000 (22:30 -0700)
Conflicts:

src/mesa/glapi/glapi.h
src/mesa/main/api_exec.c
src/mesa/main/attrib.c
src/mesa/main/clear.c
src/mesa/main/context.c
src/mesa/main/mfeatures.h
src/mesa/main/mipmap.c
src/mesa/main/mipmap.h
src/mesa/main/readpix.c
src/mesa/main/sources
src/mesa/main/state.c
src/mesa/main/texformat.c
src/mesa/main/texparam.c
src/mesa/main/texstate.c
src/mesa/vbo/vbo_context.c
src/mesa/x86/common_x86_asm.S

16 files changed:
src/mesa/drivers/dri/i965/brw_vs_tnl.c
src/mesa/main/api_exec.c
src/mesa/main/attrib.c
src/mesa/main/clear.c
src/mesa/main/mfeatures.h
src/mesa/main/mipmap.c
src/mesa/main/mipmap.h
src/mesa/main/readpix.c
src/mesa/main/sources
src/mesa/main/state.c
src/mesa/main/texparam.c
src/mesa/main/texstate.c
src/mesa/main/texstore.c
src/mesa/shader/program.c
src/mesa/shader/shader_api.c
src/mesa/x86/common_x86_asm.S

index aa338493d6226417c5d9f15b764b391e2dbef611..9b04f19112a2e4b2db754d9cf41ca7399e3f26fa 100644 (file)
@@ -35,6 +35,7 @@
 #include "main/enums.h"
 #include "shader/prog_parameter.h"
 #include "shader/prog_print.h"
+#include "shader/prog_statevars.h"
 #include "brw_vs.h"
 #include "brw_state.h"
 
@@ -853,7 +854,7 @@ static struct ureg calculate_light_attenuation( struct tnl_program *p,
     */
    if (!p->state->unit[i].light_spotcutoff_is_180) {
       struct ureg spot_dir_norm = register_param3(p, STATE_INTERNAL,
-                                                 STATE_SPOT_DIR_NORMALIZED, i);
+                                                 STATE_LIGHT_SPOT_DIR_NORMALIZED, i);
       struct ureg spot = get_temp(p);
       struct ureg slt = get_temp(p);
 
@@ -988,7 +989,7 @@ static void build_lighting( struct tnl_program *p )
             * Attenuation never applies to infinite lights.
             */
            VPpli = register_param3(p, STATE_LIGHT, i, 
-                                   STATE_POSITION_NORMALIZED); 
+                                   STATE_LIGHT_POSITION_NORMALIZED);
             if (p->state->light_local_viewer) {
                 struct ureg eye_hat = get_eye_position_normalized(p);
                 half = get_temp(p);
index 0c3c9c4de49f126ab7f4709a50920b52e5567404..8ebe4a3e4a659b225feb5217f76729b62d2384cc 100644 (file)
@@ -74,7 +74,7 @@
 #include "eval.h"
 #endif
 #include "get.h"
-#if FEATURE_feedback
+#if FEATURE_feadback
 #include "feedback.h"
 #endif
 #include "fog.h"
@@ -222,7 +222,7 @@ _mesa_init_exec_table(struct _glapi_table *exec)
    SET_CopyPixels(exec, _mesa_CopyPixels);
    SET_DrawPixels(exec, _mesa_DrawPixels);
 #endif
-#if FEATURE_feedback
+#if FEATURE_feadback
    SET_InitNames(exec, _mesa_InitNames);
    SET_FeedbackBuffer(exec, _mesa_FeedbackBuffer);
    SET_LoadName(exec, _mesa_LoadName);
index 32d86ce149092595b7e183fcefe0798a224263d9..dc85da2518f9b5a842ac6086577f9a40e512388a 100644 (file)
@@ -1110,9 +1110,9 @@ _mesa_PopAttrib(void)
                   _mesa_set_enable(ctx, GL_POINT_SPRITE_NV,point->PointSprite);
                   if (ctx->Extensions.NV_point_sprite)
                      _mesa_PointParameteri(GL_POINT_SPRITE_R_MODE_NV,
-                                          ctx->Point.SpriteRMode);
+                                           ctx->Point.SpriteRMode);
                   _mesa_PointParameterf(GL_POINT_SPRITE_COORD_ORIGIN,
-                                           (GLfloat)ctx->Point.SpriteOrigin);
+                                        (GLfloat)ctx->Point.SpriteOrigin);
                }
             }
             break;
index a6257f9b982da24d97a7ae8a6993e69cefe30fae..63388f42ee46bdb19c6e0f8b9657b342df0694b6 100644 (file)
@@ -114,6 +114,8 @@ _mesa_Clear( GLbitfield mask )
    GET_CURRENT_CONTEXT(ctx);
    ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx);
 
+   FLUSH_CURRENT(ctx, 0);
+
    if (MESA_VERBOSE & VERBOSE_API)
       _mesa_debug(ctx, "glClear 0x%x\n", mask);
 
index b08c017ec8d8fa7434b9a409e37206f57b1e99a3..ed78f57edf6b8c27d82c72c18f0ec2f1e9852a72 100644 (file)
@@ -44,7 +44,6 @@
 #define FEATURE_dlist  _HAVE_FULL_GL
 #define FEATURE_draw_read_buffer  _HAVE_FULL_GL
 #define FEATURE_drawpix  _HAVE_FULL_GL
-#define FEATURE_es2_glsl 0
 #define FEATURE_evaluators  _HAVE_FULL_GL
 #define FEATURE_feedback  _HAVE_FULL_GL
 #define FEATURE_fixedpt 0
@@ -56,6 +55,8 @@
 #define FEATURE_texture_s3tc  _HAVE_FULL_GL
 #define FEATURE_userclip  _HAVE_FULL_GL
 #define FEATURE_vertex_array_byte 0
+#define FEATURE_windowpos  _HAVE_FULL_GL
+#define FEATURE_es2_glsl 0
 
 #define FEATURE_ARB_occlusion_query  _HAVE_FULL_GL
 #define FEATURE_ARB_fragment_program  _HAVE_FULL_GL
index d35fa6734c80e4257e8607ddce58811a22695120..13d90e78fe4f9953a8fd0d7dd59122867357e668 100644 (file)
@@ -446,30 +446,23 @@ make_1d_mipmap(GLenum datatype, GLuint comps, GLint border,
 }
 
 
-/**
- * Strides are in bytes.  If zero, it'll be computed as width * bpp.
- */
 static void
 make_2d_mipmap(GLenum datatype, GLuint comps, GLint border,
                GLint srcWidth, GLint srcHeight,
-               GLint srcRowBytes, const GLubyte *srcPtr,
+              const GLubyte *srcPtr, GLint srcRowStride,
                GLint dstWidth, GLint dstHeight,
-               GLint dstRowBytes, GLubyte *dstPtr)
+              GLubyte *dstPtr, GLint dstRowStride)
 {
    const GLint bpt = bytes_per_pixel(datatype, comps);
    const GLint srcWidthNB = srcWidth - 2 * border;  /* sizes w/out border */
    const GLint dstWidthNB = dstWidth - 2 * border;
    const GLint dstHeightNB = dstHeight - 2 * border;
+   const GLint srcRowBytes = bpt * srcRowStride;
+   const GLint dstRowBytes = bpt * dstRowStride;
    const GLubyte *srcA, *srcB;
    GLubyte *dst;
    GLint row;
 
-   if (!srcRowBytes)
-      srcRowBytes = bpt * srcWidth;
-
-   if (!dstRowBytes)
-      dstRowBytes = bpt * dstWidth;
-
    /* Compute src and dst pointers, skipping any border */
    srcA = srcPtr + border * ((srcWidth + 1) * bpt);
    if (srcHeight > 1) 
@@ -541,11 +534,9 @@ make_2d_mipmap(GLenum datatype, GLuint comps, GLint border,
 static void
 make_3d_mipmap(GLenum datatype, GLuint comps, GLint border,
                GLint srcWidth, GLint srcHeight, GLint srcDepth,
-               GLint srcRowBytes,
-               const GLubyte *srcPtr,
+               const GLubyte *srcPtr, GLint srcRowStride,
                GLint dstWidth, GLint dstHeight, GLint dstDepth,
-               GLint dstRowBytes,
-               GLubyte *dstPtr)
+               GLubyte *dstPtr, GLint dstRowStride)
 {
    const GLint bpt = bytes_per_pixel(datatype, comps);
    const GLint srcWidthNB = srcWidth - 2 * border;  /* sizes w/out border */
@@ -556,6 +547,7 @@ make_3d_mipmap(GLenum datatype, GLuint comps, GLint border,
    GLvoid *tmpRowA, *tmpRowB;
    GLint img, row;
    GLint bytesPerSrcImage, bytesPerDstImage;
+   GLint bytesPerSrcRow, bytesPerDstRow;
    GLint srcImageOffset, srcRowOffset;
 
    (void) srcDepthNB; /* silence warnings */
@@ -573,10 +565,8 @@ make_3d_mipmap(GLenum datatype, GLuint comps, GLint border,
    bytesPerSrcImage = srcWidth * srcHeight * bpt;
    bytesPerDstImage = dstWidth * dstHeight * bpt;
 
-   if (!srcRowBytes)
-      srcRowBytes = srcWidth * bpt;
-   if (!dstRowBytes)
-      dstRowBytes = dstWidth * bpt;
+   bytesPerSrcRow = srcWidth * bpt;
+   bytesPerDstRow = dstWidth * bpt;
 
    /* Offset between adjacent src images to be averaged together */
    srcImageOffset = (srcDepth == dstDepth) ? 0 : bytesPerSrcImage;
@@ -600,13 +590,13 @@ make_3d_mipmap(GLenum datatype, GLuint comps, GLint border,
    for (img = 0; img < dstDepthNB; img++) {
       /* first source image pointer, skipping border */
       const GLubyte *imgSrcA = srcPtr
-         + (bytesPerSrcImage + srcRowBytes + border) * bpt * border
+         + (bytesPerSrcImage + bytesPerSrcRow + border) * bpt * border
          + img * (bytesPerSrcImage + srcImageOffset);
       /* second source image pointer, skipping border */
       const GLubyte *imgSrcB = imgSrcA + srcImageOffset;
       /* address of the dest image, skipping border */
       GLubyte *imgDst = dstPtr
-         + (bytesPerDstImage + dstRowBytes + border) * bpt * border
+         + (bytesPerDstImage + bytesPerDstRow + border) * bpt * border
          + img * bytesPerDstImage;
 
       /* setup the four source row pointers and the dest row pointer */
@@ -627,11 +617,11 @@ make_3d_mipmap(GLenum datatype, GLuint comps, GLint border,
          do_row(datatype, comps, srcWidthNB, tmpRowA, tmpRowB,
                 dstWidthNB, dstImgRow);
          /* advance to next rows */
-         srcImgARowA += srcRowBytes + srcRowOffset;
-         srcImgARowB += srcRowBytes + srcRowOffset;
-         srcImgBRowA += srcRowBytes + srcRowOffset;
-         srcImgBRowB += srcRowBytes + srcRowOffset;
-         dstImgRow += dstRowBytes;
+         srcImgARowA += bytesPerSrcRow + srcRowOffset;
+         srcImgARowB += bytesPerSrcRow + srcRowOffset;
+         srcImgBRowA += bytesPerSrcRow + srcRowOffset;
+         srcImgBRowB += bytesPerSrcRow + srcRowOffset;
+         dstImgRow += bytesPerDstRow;
       }
    }
 
@@ -641,15 +631,13 @@ make_3d_mipmap(GLenum datatype, GLuint comps, GLint border,
    /* Luckily we can leverage the make_2d_mipmap() function here! */
    if (border > 0) {
       /* do front border image */
-      make_2d_mipmap(datatype, comps, 1, srcWidth, srcHeight, 0, srcPtr,
-                     dstWidth, dstHeight, 0, dstPtr);
+      make_2d_mipmap(datatype, comps, 1, srcWidth, srcHeight, srcPtr, srcRowStride,
+                     dstWidth, dstHeight, dstPtr, dstRowStride);
       /* do back border image */
       make_2d_mipmap(datatype, comps, 1, srcWidth, srcHeight,
-                     0, 
-                     srcPtr + bytesPerSrcImage * (srcDepth - 1),
+                     srcPtr + bytesPerSrcImage * (srcDepth - 1), srcRowStride,
                      dstWidth, dstHeight,
-                     0,
-                     dstPtr + bytesPerDstImage * (dstDepth - 1));
+                     dstPtr + bytesPerDstImage * (dstDepth - 1), dstRowStride);
       /* do four remaining border edges that span the image slices */
       if (srcDepth == dstDepth) {
          /* just copy border pixels from src to dst */
@@ -664,9 +652,9 @@ make_3d_mipmap(GLenum datatype, GLuint comps, GLint border,
 
             /* do border along [img][row=dstHeight-1][col=0] */
             src = srcPtr + (img * 2 + 1) * bytesPerSrcImage
-                         + (srcHeight - 1) * srcRowBytes;
+                         + (srcHeight - 1) * bytesPerSrcRow;
             dst = dstPtr + (img + 1) * bytesPerDstImage
-                         + (dstHeight - 1) * dstRowBytes;
+                         + (dstHeight - 1) * bytesPerDstRow;
             MEMCPY(dst, src, bpt);
 
             /* do border along [img][row=0][col=dstWidth-1] */
@@ -698,9 +686,9 @@ make_3d_mipmap(GLenum datatype, GLuint comps, GLint border,
 
             /* do border along [img][row=dstHeight-1][col=0] */
             src = srcPtr + (img * 2 + 1) * bytesPerSrcImage
-                         + (srcHeight - 1) * srcRowBytes;
+                         + (srcHeight - 1) * bytesPerSrcRow;
             dst = dstPtr + (img + 1) * bytesPerDstImage
-                         + (dstHeight - 1) * dstRowBytes;
+                         + (dstHeight - 1) * bytesPerDstRow;
             do_row(datatype, comps, 1, src, src + srcImageOffset, 1, dst);
 
             /* do border along [img][row=0][col=dstWidth-1] */
@@ -724,15 +712,16 @@ make_3d_mipmap(GLenum datatype, GLuint comps, GLint border,
 
 static void
 make_1d_stack_mipmap(GLenum datatype, GLuint comps, GLint border,
-                     GLint srcWidth, const GLubyte *srcPtr,
-                     GLint dstWidth, GLint dstHeight, GLubyte *dstPtr)
+                     GLint srcWidth, const GLubyte *srcPtr, GLuint srcRowStride,
+                     GLint dstWidth, GLint dstHeight,
+                    GLubyte *dstPtr, GLuint dstRowStride )
 {
    const GLint bpt = bytes_per_pixel(datatype, comps);
    const GLint srcWidthNB = srcWidth - 2 * border;  /* sizes w/out border */
    const GLint dstWidthNB = dstWidth - 2 * border;
    const GLint dstHeightNB = dstHeight - 2 * border;
-   const GLint srcRowBytes = bpt * srcRowBytes;
-   const GLint dstRowBytes = bpt * dstRowBytes;
+   const GLint srcRowBytes = bpt * srcRowStride;
+   const GLint dstRowBytes = bpt * dstRowStride;
    const GLubyte *src;
    GLubyte *dst;
    GLint row;
@@ -767,28 +756,22 @@ make_1d_stack_mipmap(GLenum datatype, GLuint comps, GLint border,
 static void
 make_2d_stack_mipmap(GLenum datatype, GLuint comps, GLint border,
                      GLint srcWidth, GLint srcHeight,
-                     GLint srcRowBytes,
-                     const GLubyte *srcPtr,
+                    const GLubyte *srcPtr, GLint srcRowStride,
                      GLint dstWidth, GLint dstHeight, GLint dstDepth,
-                     GLint dstRowBytes,
-                     GLubyte *dstPtr)
+                     GLubyte *dstPtr, GLint dstRowStride)
 {
    const GLint bpt = bytes_per_pixel(datatype, comps);
    const GLint srcWidthNB = srcWidth - 2 * border;  /* sizes w/out border */
    const GLint dstWidthNB = dstWidth - 2 * border;
    const GLint dstHeightNB = dstHeight - 2 * border;
    const GLint dstDepthNB = dstDepth - 2 * border;
+   const GLint srcRowBytes = bpt * srcRowStride;
+   const GLint dstRowBytes = bpt * dstRowStride;
    const GLubyte *srcA, *srcB;
    GLubyte *dst;
    GLint layer;
    GLint row;
 
-   if (!srcRowBytes)
-      srcRowBytes = bpt * srcWidth;
-
-   if (!dstRowBytes)
-      dstRowBytes = bpt * dstWidth;
-
    /* Compute src and dst pointers, skipping any border */
    srcA = srcPtr + border * ((srcWidth + 1) * bpt);
    if (srcHeight > 1) 
@@ -867,12 +850,15 @@ _mesa_generate_mipmap_level(GLenum target,
                             GLenum datatype, GLuint comps,
                             GLint border,
                             GLint srcWidth, GLint srcHeight, GLint srcDepth,
-                            GLint srcRowBytes,
                             const GLubyte *srcData,
+                            GLint srcRowStride,
                             GLint dstWidth, GLint dstHeight, GLint dstDepth,
-                            GLint dstRowBytes,
-                            GLubyte *dstData)
+                            GLubyte *dstData,
+                            GLint dstRowStride)
 {
+   /*
+    * We use simple 2x2 averaging to compute the next mipmap level.
+    */
    switch (target) {
    case GL_TEXTURE_1D:
       make_1d_mipmap(datatype, comps, border,
@@ -887,29 +873,35 @@ _mesa_generate_mipmap_level(GLenum target,
    case GL_TEXTURE_CUBE_MAP_POSITIVE_Z_ARB:
    case GL_TEXTURE_CUBE_MAP_NEGATIVE_Z_ARB:
       make_2d_mipmap(datatype, comps, border,
-                     srcWidth, srcHeight, srcRowBytes, srcData,
-                     dstWidth, dstHeight, dstRowBytes, dstData);
+                     srcWidth, srcHeight, srcData, srcRowStride,
+                     dstWidth, dstHeight, dstData, dstRowStride);
       break;
    case GL_TEXTURE_3D:
       make_3d_mipmap(datatype, comps, border,
-                     srcWidth, srcHeight, srcDepth, srcRowBytes, srcData,
-                     dstWidth, dstHeight, dstDepth, dstRowBytes, dstData);
+                     srcWidth, srcHeight, srcDepth,
+                     srcData, srcRowStride,
+                     dstWidth, dstHeight, dstDepth,
+                     dstData, dstRowStride);
       break;
    case GL_TEXTURE_1D_ARRAY_EXT:
       make_1d_stack_mipmap(datatype, comps, border,
-                           srcWidth, srcData,
-                           dstWidth, dstHeight, dstData);
+                           srcWidth, srcData, srcRowStride,
+                           dstWidth, dstHeight,
+                           dstData, dstRowStride);
       break;
    case GL_TEXTURE_2D_ARRAY_EXT:
       make_2d_stack_mipmap(datatype, comps, border,
-                           srcWidth, srcHeight, srcRowBytes, srcData,
-                           dstWidth, dstHeight, dstDepth, dstRowBytes, dstData);
+                           srcWidth, srcHeight,
+                           srcData, srcRowStride,
+                           dstWidth, dstHeight,
+                           dstDepth, dstData, dstRowStride);
       break;
    case GL_TEXTURE_RECTANGLE_NV:
       /* no mipmaps, do nothing */
       break;
    default:
-      _mesa_problem(NULL, "bad target in _mesa_generate_mipmap_level");
+      _mesa_problem(NULL, "bad dimensions in _mesa_generate_mipmaps");
+      return;
    }
 }
 
@@ -1131,23 +1123,25 @@ _mesa_generate_mipmap(GLcontext *ctx, GLenum target,
          dstData = (GLubyte *) dstImage->Data;
       }
 
-      /* Note, 0 indicates default row strides */
       _mesa_generate_mipmap_level(target, datatype, comps, border,
-                                  srcWidth, srcHeight, srcDepth, 0, srcData,
-                                  dstWidth, dstHeight, dstDepth, 0, dstData);
+                                  srcWidth, srcHeight, srcDepth, 
+                                  srcData, srcImage->RowStride,
+                                  dstWidth, dstHeight, dstDepth, 
+                                  dstData, dstImage->RowStride);
+
 
       if (dstImage->IsCompressed) {
          GLubyte *temp;
          /* compress image from dstData into dstImage->Data */
          const GLenum srcFormat = convertFormat->BaseFormat;
-         GLint dstRowBytes
+         GLint dstRowStride
             = _mesa_compressed_row_stride(dstImage->TexFormat->MesaFormat, dstWidth);
          ASSERT(srcFormat == GL_RGB || srcFormat == GL_RGBA);
          dstImage->TexFormat->StoreImage(ctx, 2, dstImage->_BaseFormat,
                                          dstImage->TexFormat,
                                          dstImage->Data,
                                          0, 0, 0, /* dstX/Y/Zoffset */
-                                         dstRowBytes, 0, /* strides */
+                                         dstRowStride, 0, /* strides */
                                          dstWidth, dstHeight, 1, /* size */
                                          srcFormat, CHAN_TYPE,
                                          dstData, /* src data, actually */
@@ -1172,7 +1166,7 @@ _mesa_generate_mipmap(GLcontext *ctx, GLenum target,
 void
 _mesa_rescale_teximage2d(GLuint bytesPerPixel,
                         GLuint srcStrideInPixels,
-                        GLuint dstRowBytes,
+                        GLuint dstRowStride,
                         GLint srcWidth, GLint srcHeight,
                         GLint dstWidth, GLint dstHeight,
                         const GLvoid *srcImage, GLvoid *dstImage)
@@ -1186,7 +1180,7 @@ _mesa_rescale_teximage2d(GLuint bytesPerPixel,
         GLint srcCol = col WOP wScale;                                 \
         dst[col] = src[srcRow * srcStrideInPixels + srcCol];           \
       }                                                                        \
-      dst = (TYPE *) ((GLubyte *) dst + dstRowBytes);                  \
+      dst = (TYPE *) ((GLubyte *) dst + dstRowStride);                 \
    }                                                                   \
 
 #define RESCALE_IMAGE( TYPE )                                          \
@@ -1244,7 +1238,7 @@ do {                                                                      \
 void
 _mesa_upscale_teximage2d(GLsizei inWidth, GLsizei inHeight,
                          GLsizei outWidth, GLsizei outHeight,
-                         GLint comps, const GLchan *src, GLint srcRowBytes,
+                         GLint comps, const GLchan *src, GLint srcRowStride,
                          GLchan *dest )
 {
    GLint i, j, k;
@@ -1263,7 +1257,7 @@ _mesa_upscale_teximage2d(GLsizei inWidth, GLsizei inHeight,
          const GLint jj = j % inWidth;
          for (k = 0; k < comps; k++) {
             dest[(i * outWidth + j) * comps + k]
-               = src[ii * srcRowBytes + jj * comps + k];
+               = src[ii * srcRowStride + jj * comps + k];
          }
       }
    }
index 44ecdddb27766aad0ca84ed7981f2d3da9740ecf..22094c343729bd17469dc298bb59deef08daac06 100644 (file)
@@ -34,11 +34,11 @@ _mesa_generate_mipmap_level(GLenum target,
                             GLenum datatype, GLuint comps,
                             GLint border,
                             GLint srcWidth, GLint srcHeight, GLint srcDepth,
-                            GLint srcRowStride,
                             const GLubyte *srcData,
+                            GLint srcRowStride,
                             GLint dstWidth, GLint dstHeight, GLint dstDepth,
-                            GLint dstRowStride,
-                            GLubyte *dstData);
+                            GLubyte *dstData,
+                            GLint dstRowStride);
 
 
 extern void
index dc22808e5bbb3254623b0e4352290795f2e6cefb..dfdd297b6e715ed7561b339b89e0a41193dfb7f7 100644 (file)
@@ -105,8 +105,7 @@ _mesa_error_check_format_type(GLcontext *ctx, GLenum format, GLenum type,
       }
       break;
    case GL_DEPTH_COMPONENT:
-      if ((drawing && !_mesa_dest_buffer_exists(ctx, format)) ||
-          (!drawing && !_mesa_source_buffer_exists(ctx, format))) {
+      if ((drawing && !_mesa_dest_buffer_exists(ctx, format))) {
          _mesa_error(ctx, GL_INVALID_OPERATION,
                      "gl%sPixels(no depth buffer)", readDraw);
          return GL_TRUE;
index 468121bd1dcc5ac91c27052d5d8b84e24ad6dc8d..6a165f1ae26656b566ace2d676e09cc78933a4d5 100644 (file)
@@ -78,6 +78,10 @@ vsnprintf.c
 MESA_MAIN_HEADERS = \
 accum.h \
 api_arrayelt.h \
+<<<<<<< HEAD:src/mesa/main/sources
+=======
+api_eval.h \
+>>>>>>> master:src/mesa/main/sources
 api_exec.h \
 api_loopback.h \
 api_noop.h \
index 030c43365fe9f30686e381a79d632c255d6e3ea3..5913019bc1275c7af91d83099cd46ebd9c2ff34e 100644 (file)
@@ -51,8 +51,6 @@
 #include "texstate.h"
 
 
-
-
 static void
 update_separate_specular(GLcontext *ctx)
 {
index 3f3b448dbc649c5cd66aefecb5869723b015f30e..664adadfb9c8c896890c9536d7b8c17154166342 100644 (file)
@@ -324,6 +324,7 @@ _mesa_TexParameterfv( GLenum target, GLenum pname, const GLfloat *params )
          break;
       case GL_GENERATE_MIPMAP_SGIS:
          if (ctx->Extensions.SGIS_generate_mipmap) {
+            FLUSH_VERTICES(ctx, _NEW_TEXTURE);
             texObj->GenerateMipmap = params[0] ? GL_TRUE : GL_FALSE;
          }
          else {
index 86c54aefc021c3e80fa26793912b11a2fab3608b..24ab2ff9e5038d74cd8bff96bd615654bcf74bda 100644 (file)
@@ -819,7 +819,6 @@ _mesa_free_texture_data(GLcontext *ctx)
    for (tgt = 0; tgt < NUM_TEXTURE_TARGETS; tgt++)
       ctx->Driver.DeleteTexture(ctx, ctx->Texture.ProxyTex[tgt]);
 
-
 #if FEATURE_colortable
    {
       GLuint i;
index 57419aa2f3118f4cc39aaac2ab716a3c965e88ec..76b785ab0e00b47aedc4d6b33bb60c430423c7ad 100644 (file)
@@ -2507,7 +2507,8 @@ _mesa_texstore_s8_z24(TEXSTORE_PARAMS)
             dstRow += dstRowStride / sizeof(GLuint);
          }
       }
-   } else {
+   }
+   else {
       for (img = 0; img < srcDepth; img++) {
          GLuint *dstRow = (GLuint *) dstAddr
             + dstImageOffsets[dstZoffset + img]
index 6263fd277f8a2ea1e86ad3d06c14acf79f78fefe..f120c20bdf23695c951fdcb5c5937215d04265ce 100644 (file)
@@ -517,7 +517,7 @@ _mesa_insert_instructions(struct gl_program *prog, GLuint start, GLuint count)
    for (i = 0; i < prog->NumInstructions; i++) {
       struct prog_instruction *inst = prog->Instructions + i;
       if (inst->BranchTarget > 0) {
-         if (inst->BranchTarget >= start) {
+         if ((GLuint)inst->BranchTarget >= start) {
             inst->BranchTarget += count;
          }
       }
index eb7b71341f57d59d4496ef11e1c7acb065f76559..854f8bfdaa61c215edf03c8a46cefe5980a12cf1 100644 (file)
@@ -517,7 +517,7 @@ _mesa_bind_attrib_location(GLcontext *ctx, GLuint program, GLuint index,
 {
    struct gl_shader_program *shProg;
    const GLint size = -1; /* unknown size */
-   GLint i;
+   GLint i, oldIndex;
    GLenum datatype = GL_FLOAT_VEC4;
 
    shProg = _mesa_lookup_shader_program_err(ctx, program,
@@ -540,6 +540,14 @@ _mesa_bind_attrib_location(GLcontext *ctx, GLuint program, GLuint index,
       return;
    }
 
+   if (shProg->LinkStatus) {
+      /* get current index/location for the attribute */
+      oldIndex = _mesa_get_attrib_location(ctx, program, name);
+   }
+   else {
+      oldIndex = -1;
+   }
+
    /* this will replace the current value if it's already in the list */
    i = _mesa_add_attribute(shProg->Attributes, name, size, datatype, index);
    if (i < 0) {
index 09c86b05ba831dc1c8e8fa650a03a065325194a9..a681ff9b9ebfafcc0a93217867c2fb67da08570a 100644 (file)
  * in there will break the build on some platforms.
  */
 
+<<<<<<< HEAD:src/mesa/x86/common_x86_asm.S
+=======
+#include "matypes.h"
+>>>>>>> master:src/mesa/x86/common_x86_asm.S
 #include "assyntax.h"
 #include "common_x86_features.h"