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

mesa: Changes to 'upstream-experimental'



 Makefile                                         |    9 
 configure.ac                                     |   16 
 docs/download.html                               |    4 
 docs/news.html                                   |    7 
 docs/relnotes-7.3.html                           |   12 
 docs/relnotes-7.4.html                           |   80 ++
 docs/relnotes.html                               |    1 
 docs/xlibdriver.html                             |   16 
 include/GL/gl.h                                  |    2 
 include/GL/glext.h                               |   72 +
 progs/glsl/multitex.c                            |   88 +-
 progs/glsl/multitex.vert                         |   10 
 progs/util/extfuncs.h                            |   15 
 progs/xdemos/glxgears.c                          |   74 +
 progs/xdemos/glxpixmap.c                         |    1 
 progs/xdemos/manywin.c                           |    2 
 src/glx/x11/dri2_glx.c                           |  113 +++
 src/glx/x11/dri_glx.c                            |    2 
 src/glx/x11/glxclient.h                          |    3 
 src/glx/x11/glxcmds.c                            |   24 
 src/mesa/drivers/dri/common/texmem.c             |   10 
 src/mesa/drivers/dri/gamma/gamma_tex.c           |    8 
 src/mesa/drivers/dri/i915/Makefile               |    2 
 src/mesa/drivers/dri/i915/i915_state.c           |   71 +
 src/mesa/drivers/dri/i915/intel_clear.c          |    1 
 src/mesa/drivers/dri/i915/intel_state.c          |   64 -
 src/mesa/drivers/dri/i915/intel_swapbuffers.c    |    1 
 src/mesa/drivers/dri/i915/intel_tris.c           |    4 
 src/mesa/drivers/dri/i965/Makefile               |    3 
 src/mesa/drivers/dri/i965/brw_cc.c               |   67 -
 src/mesa/drivers/dri/i965/brw_clip.c             |   40 -
 src/mesa/drivers/dri/i965/brw_clip_line.c        |   66 +
 src/mesa/drivers/dri/i965/brw_clip_tri.c         |   76 +-
 src/mesa/drivers/dri/i965/brw_context.c          |   29 
 src/mesa/drivers/dri/i965/brw_context.h          |   51 -
 src/mesa/drivers/dri/i965/brw_curbe.c            |   15 
 src/mesa/drivers/dri/i965/brw_draw.c             |   85 +-
 src/mesa/drivers/dri/i965/brw_eu.c               |  123 +++
 src/mesa/drivers/dri/i965/brw_eu.h               |   18 
 src/mesa/drivers/dri/i965/brw_fallback.c         |   16 
 src/mesa/drivers/dri/i965/brw_metaops.c          |  583 ---------------
 src/mesa/drivers/dri/i965/brw_misc_state.c       |   59 +
 src/mesa/drivers/dri/i965/brw_sf.c               |   22 
 src/mesa/drivers/dri/i965/brw_sf_state.c         |   71 -
 src/mesa/drivers/dri/i965/brw_state_upload.c     |   10 
 src/mesa/drivers/dri/i965/brw_tex.c              |    3 
 src/mesa/drivers/dri/i965/brw_vs.c               |   14 
 src/mesa/drivers/dri/i965/brw_vs.h               |    1 
 src/mesa/drivers/dri/i965/brw_vs_constval.c      |    3 
 src/mesa/drivers/dri/i965/brw_vs_emit.c          |   88 +-
 src/mesa/drivers/dri/i965/brw_vs_state.c         |    4 
 src/mesa/drivers/dri/i965/brw_vtbl.c             |    1 
 src/mesa/drivers/dri/i965/brw_wm.c               |   48 -
 src/mesa/drivers/dri/i965/brw_wm.h               |   12 
 src/mesa/drivers/dri/i965/brw_wm_fp.c            |    6 
 src/mesa/drivers/dri/i965/brw_wm_glsl.c          |  105 +-
 src/mesa/drivers/dri/i965/brw_wm_pass0.c         |   14 
 src/mesa/drivers/dri/i965/brw_wm_sampler_state.c |   30 
 src/mesa/drivers/dri/i965/brw_wm_state.c         |   13 
 src/mesa/drivers/dri/i965/brw_wm_surface_state.c |   14 
 src/mesa/drivers/dri/i965/intel_clear.c          |    1 
 src/mesa/drivers/dri/i965/intel_state.c          |   42 -
 src/mesa/drivers/dri/i965/intel_swapbuffers.c    |    1 
 src/mesa/drivers/dri/intel/intel_blit.c          |    2 
 src/mesa/drivers/dri/intel/intel_buffers.c       |  418 -----------
 src/mesa/drivers/dri/intel/intel_buffers.h       |    7 
 src/mesa/drivers/dri/intel/intel_chipset.h       |   11 
 src/mesa/drivers/dri/intel/intel_clear.c         |  393 ++++++++++
 src/mesa/drivers/dri/intel/intel_clear.h         |   38 +
 src/mesa/drivers/dri/intel/intel_context.c       |   49 +
 src/mesa/drivers/dri/intel/intel_context.h       |    9 
 src/mesa/drivers/dri/intel/intel_decode.c        |   47 -
 src/mesa/drivers/dri/intel/intel_fbo.c           |    3 
 src/mesa/drivers/dri/intel/intel_mipmap_tree.c   |    6 
 src/mesa/drivers/dri/intel/intel_mipmap_tree.h   |    3 
 src/mesa/drivers/dri/intel/intel_pixel.c         |    9 
 src/mesa/drivers/dri/intel/intel_pixel.h         |    2 
 src/mesa/drivers/dri/intel/intel_pixel_bitmap.c  |    1 
 src/mesa/drivers/dri/intel/intel_pixel_draw.c    |   26 
 src/mesa/drivers/dri/intel/intel_regions.c       |   12 
 src/mesa/drivers/dri/intel/intel_regions.h       |    3 
 src/mesa/drivers/dri/intel/intel_screen.c        |    5 
 src/mesa/drivers/dri/intel/intel_screen.h        |    9 
 src/mesa/drivers/dri/intel/intel_swapbuffers.c   |  243 ++++++
 src/mesa/drivers/dri/intel/intel_swapbuffers.h   |   52 +
 src/mesa/drivers/dri/intel/intel_tex_image.c     |   19 
 src/mesa/drivers/dri/intel/intel_tex_validate.c  |    3 
 src/mesa/drivers/dri/mga/mga_texstate.c          |    8 
 src/mesa/drivers/dri/r300/r300_render.c          |   16 
 src/mesa/drivers/dri/r300/r300_state.c           |   42 -
 src/mesa/drivers/dri/r300/r300_swtcl.c           |    4 
 src/mesa/drivers/dri/radeon/radeon_chipset.h     |    4 
 src/mesa/drivers/dri/radeon/radeon_screen.c      |   10 
 src/mesa/drivers/dri/s3v/s3v_tex.c               |    8 
 src/mesa/drivers/dri/swrast/swrast.c             |    2 
 src/mesa/drivers/dri/tdfx/tdfx_dd.c              |    8 
 src/mesa/drivers/x11/fakeglx.c                   |   45 -
 src/mesa/drivers/x11/xm_api.c                    |    6 
 src/mesa/drivers/x11/xm_buffer.c                 |    1 
 src/mesa/glapi/glthread.h                        |   12 
 src/mesa/main/api_validate.c                     |   15 
 src/mesa/main/attrib.c                           |   41 -
 src/mesa/main/bufferobj.c                        |   20 
 src/mesa/main/buffers.c                          |    5 
 src/mesa/main/config.h                           |    2 
 src/mesa/main/context.c                          |   83 --
 src/mesa/main/dlopen.c                           |    9 
 src/mesa/main/enable.c                           |    7 
 src/mesa/main/extensions.c                       |    8 
 src/mesa/main/framebuffer.c                      |    1 
 src/mesa/main/get.c                              |   42 -
 src/mesa/main/get_gen.py                         |   14 
 src/mesa/main/getstring.c                        |   13 
 src/mesa/main/hash.c                             |    2 
 src/mesa/main/imports.c                          |   15 
 src/mesa/main/imports.h                          |    6 
 src/mesa/main/mtypes.h                           |   68 +
 src/mesa/main/state.c                            |   96 +-
 src/mesa/main/stencil.c                          |  102 +-
 src/mesa/main/texenv.c                           |  339 +++------
 src/mesa/main/texformat_tmp.h                    |    8 
 src/mesa/main/teximage.c                         |   19 
 src/mesa/main/texobj.c                           |  129 +--
 src/mesa/main/texparam.c                         |  857 +++++++++++++----------
 src/mesa/main/texrender.c                        |   54 +
 src/mesa/main/texstate.c                         |  121 +--
 src/mesa/main/version.h                          |    6 
 src/mesa/shader/prog_instruction.h               |   16 
 src/mesa/shader/prog_print.c                     |   13 
 src/mesa/shader/program.c                        |    9 
 src/mesa/shader/shader_api.c                     |  271 ++++---
 src/mesa/shader/slang/slang_codegen.c            |    4 
 src/mesa/shader/slang/slang_compile.c            |    2 
 src/mesa/shader/slang/slang_emit.c               |   63 +
 src/mesa/shader/slang/slang_link.c               |   38 -
 src/mesa/shader/slang/slang_vartable.c           |   59 -
 src/mesa/swrast/s_fragprog.c                     |   54 -
 src/mesa/swrast/s_span.c                         |   12 
 src/mesa/swrast/s_stencil.c                      |    6 
 src/mesa/swrast/s_triangle.c                     |   21 
 src/mesa/tnl/t_context.c                         |   14 
 src/mesa/vbo/vbo_exec_api.c                      |    5 
 src/mesa/vbo/vbo_exec_draw.c                     |   13 
 src/mesa/vbo/vbo_save_draw.c                     |   18 
 src/mesa/x86/gen_matypes.c                       |    4 
 145 files changed, 3792 insertions(+), 2894 deletions(-)

New commits:
commit 17db2db9dc33e6e11bb5d3e0f4ff82439309dfbc
Author: Brian Paul <brianp@vmware.com>
Date:   Fri Mar 20 17:34:54 2009 -0600

    docs: prep for 7.4 release

diff --git a/docs/download.html b/docs/download.html
index 37b0b3d..697eef5 100644
--- a/docs/download.html
+++ b/docs/download.html
@@ -9,9 +9,9 @@
 <H1>Downloading</H1>
 
 <p>
-Current development release: <b>7.3</b>
+Current stable release: <b>7.4</b>
 <br>
-Last stable release: <b>7.2</b>
+Last unstable/development release: <b>7.3</b>
 </p>
 
 <p>
diff --git a/docs/news.html b/docs/news.html
index b177f3b..8b96ab6 100644
--- a/docs/news.html
+++ b/docs/news.html
@@ -11,6 +11,13 @@
 <H1>News</H1>
 
 
+<h2>March ??, 2009</h2>
+<p>
+<a href="relnotes-7.4.html">Mesa 7.4</a> is released.
+This is a stable release fixing bugs since the 7.3 release.
+</p>
+
+
 <h2>January 22, 2009</h2>
 <p>
 <a href="relnotes-7.3.html">Mesa 7.3</a> is released.

commit dba79af9bc2fd211aa6bac1a85a36c0e851fea32
Author: Brian Paul <brianp@vmware.com>
Date:   Fri Mar 20 17:26:04 2009 -0600

    mesa: prep for 7.4-rc1 release

diff --git a/Makefile b/Makefile
index ee40b75..fd67a95 100644
--- a/Makefile
+++ b/Makefile
@@ -174,10 +174,11 @@ ultrix-gcc:
 
 # Rules for making release tarballs
 
-DIRECTORY = Mesa-7.4
-LIB_NAME = MesaLib-7.4
-DEMO_NAME = MesaDemos-7.4
-GLUT_NAME = MesaGLUT-7.4
+VERSION=7.4-rc1
+DIRECTORY = Mesa-$(VERSION)
+LIB_NAME = MesaLib-$(VERSION)
+DEMO_NAME = MesaDemos-$(VERSION)
+GLUT_NAME = MesaGLUT-$(VERSION)
 
 MAIN_FILES = \
 	$(DIRECTORY)/Makefile*						\
diff --git a/src/mesa/main/version.h b/src/mesa/main/version.h
index 84dcb26..56387b4 100644
--- a/src/mesa/main/version.h
+++ b/src/mesa/main/version.h
@@ -31,7 +31,7 @@
 #define MESA_MAJOR 7
 #define MESA_MINOR 4
 #define MESA_PATCH 0
-#define MESA_VERSION_STRING "7.4"
+#define MESA_VERSION_STRING "7.4-rc1"
 
 /* To make version comparison easy */
 #define MESA_VERSION(a,b,c) (((a) << 16) + ((b) << 8) + (c))

commit b009a32bf428192fef2dc4787d25f022a472854f
Author: Brian Paul <brianp@vmware.com>
Date:   Fri Mar 20 08:49:14 2009 -0600

    r300: don't crash on sw tcl hw if point size vertex attrib is sent
    
    (cherry picked from master, commit 005ad1a71d8de318a69ba18d896677d89602e0db)

diff --git a/src/mesa/drivers/dri/r300/r300_swtcl.c b/src/mesa/drivers/dri/r300/r300_swtcl.c
index b6e7ce1..f021e12 100644
--- a/src/mesa/drivers/dri/r300/r300_swtcl.c
+++ b/src/mesa/drivers/dri/r300/r300_swtcl.c
@@ -129,13 +129,13 @@ static void r300SetVertexFormat( GLcontext *ctx )
 		offset = 4;
 		EMIT_PAD(4 * sizeof(float));
 	}
-
+/*
 	if (RENDERINPUTS_TEST( index_bitset, _TNL_ATTRIB_POINTSIZE )) {
 		EMIT_ATTR( _TNL_ATTRIB_POINTSIZE, EMIT_1F );
 		vap_fmt_0 |=  R300_VAP_OUTPUT_VTX_FMT_0__PT_SIZE_PRESENT;
 		offset += 1;
 	}
-
+*/
 	if (RENDERINPUTS_TEST(index_bitset, _TNL_ATTRIB_COLOR0)) {
 		sz = VB->AttribPtr[VERT_ATTRIB_COLOR0]->size;
 	        rmesa->swtcl.coloroffset = offset;

commit 7122490982f2d22cb276b1c4e393712fa73f004f
Author: Brian Paul <brianp@vmware.com>
Date:   Mon Feb 9 13:58:32 2009 -0700

    mesa: avoid setting texObj->_Complete = GL_FALSE when there's no state change
    
    Avoid a little bit of unneeded state validation and fixes a bug where the
    texture complete flags was set to false, but we didn't signal _NEW_TEXTURE.
    
    Fixes piglit tex1d-2dborder failure.
    (cherry picked from commit aad3f546a046fe40b771e5d5f965b29189821d51)

diff --git a/src/mesa/main/texparam.c b/src/mesa/main/texparam.c
index e3dba60..be4fc1d 100644
--- a/src/mesa/main/texparam.c
+++ b/src/mesa/main/texparam.c
@@ -3,7 +3,7 @@
  * Version:  7.5
  *
  * Copyright (C) 1999-2008  Brian Paul   All Rights Reserved.
- * Copyright (C) 1999-2009  VMware, Inc.  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"),
@@ -125,6 +125,20 @@ get_texobj(GLcontext *ctx, GLenum target)
 }
 
 
+/**
+ * This is called just prior to changing any texture object state.
+ * Any pending rendering will be flushed out, we'll set the _NEW_TEXTURE
+ * state flag and then mark the texture object as 'incomplete' so that any
+ * per-texture derived state gets recomputed.
+ */
+static INLINE void
+flush(GLcontext *ctx, struct gl_texture_object *texObj)
+{
+   FLUSH_VERTICES(ctx, _NEW_TEXTURE);
+   texObj->_Complete = GL_FALSE;
+}
+
+
 /** Set an integer-valued texture parameter */
 static void
 set_tex_parameteri(GLcontext *ctx,
@@ -138,7 +152,7 @@ set_tex_parameteri(GLcontext *ctx,
       switch (params[0]) {
       case GL_NEAREST:
       case GL_LINEAR:
-         FLUSH_VERTICES(ctx, _NEW_TEXTURE);
+         flush(ctx, texObj);
          texObj->MinFilter = params[0];
          return;
       case GL_NEAREST_MIPMAP_NEAREST:
@@ -146,7 +160,7 @@ set_tex_parameteri(GLcontext *ctx,
       case GL_NEAREST_MIPMAP_LINEAR:
       case GL_LINEAR_MIPMAP_LINEAR:
          if (texObj->Target != GL_TEXTURE_RECTANGLE_NV) {
-            FLUSH_VERTICES(ctx, _NEW_TEXTURE);
+            flush(ctx, texObj);
             texObj->MinFilter = params[0];
             return;
          }
@@ -162,7 +176,7 @@ set_tex_parameteri(GLcontext *ctx,
       switch (params[0]) {
       case GL_NEAREST:
       case GL_LINEAR:
-         FLUSH_VERTICES(ctx, _NEW_TEXTURE);
+         flush(ctx, texObj);
          texObj->MagFilter = params[0];
          return;
       default:
@@ -174,7 +188,7 @@ set_tex_parameteri(GLcontext *ctx,
       if (texObj->WrapS == params[0])
          return;
       if (validate_texture_wrap_mode(ctx, texObj->Target, params[0])) {
-         FLUSH_VERTICES(ctx, _NEW_TEXTURE);
+         flush(ctx, texObj);
          texObj->WrapS = params[0];
       }
       return;
@@ -183,7 +197,7 @@ set_tex_parameteri(GLcontext *ctx,
       if (texObj->WrapT == params[0])
          return;
       if (validate_texture_wrap_mode(ctx, texObj->Target, params[0])) {
-         FLUSH_VERTICES(ctx, _NEW_TEXTURE);
+         flush(ctx, texObj);
          texObj->WrapT = params[0];
       }
       return;
@@ -192,7 +206,7 @@ set_tex_parameteri(GLcontext *ctx,
       if (texObj->WrapR == params[0])
          return;
       if (validate_texture_wrap_mode(ctx, texObj->Target, params[0])) {
-         FLUSH_VERTICES(ctx, _NEW_TEXTURE);
+         flush(ctx, texObj);
          texObj->WrapR = params[0];
       }
       return;
@@ -205,7 +219,7 @@ set_tex_parameteri(GLcontext *ctx,
          _mesa_error(ctx, GL_INVALID_VALUE, "glTexParameter(param)");
          return;
       }
-      FLUSH_VERTICES(ctx, _NEW_TEXTURE);
+      flush(ctx, texObj);
       texObj->BaseLevel = params[0];
       return;
 
@@ -216,7 +230,7 @@ set_tex_parameteri(GLcontext *ctx,
          _mesa_error(ctx, GL_INVALID_OPERATION, "glTexParameter(param)");
          return;
       }
-      FLUSH_VERTICES(ctx, _NEW_TEXTURE);
+      flush(ctx, texObj);
       texObj->MaxLevel = params[0];
       return;
 
@@ -247,7 +261,7 @@ set_tex_parameteri(GLcontext *ctx,
    case GL_GENERATE_MIPMAP_SGIS:
       if (ctx->Extensions.SGIS_generate_mipmap) {
          if (texObj->GenerateMipmap != params[0]) {
-            FLUSH_VERTICES(ctx, _NEW_TEXTURE);
+            flush(ctx, texObj);
             texObj->GenerateMipmap = params[0] ? GL_TRUE : GL_FALSE;
          }
       }
@@ -262,7 +276,7 @@ set_tex_parameteri(GLcontext *ctx,
           (params[0] == GL_NONE ||
            params[0] == GL_COMPARE_R_TO_TEXTURE_ARB)) {
          if (texObj->CompareMode != params[0]) {
-            FLUSH_VERTICES(ctx, _NEW_TEXTURE);
+            flush(ctx, texObj);
             texObj->CompareMode = params[0];
          }
       }
@@ -279,7 +293,7 @@ set_tex_parameteri(GLcontext *ctx,
          switch (params[0]) {
          case GL_LEQUAL:
          case GL_GEQUAL:
-            FLUSH_VERTICES(ctx, _NEW_TEXTURE);
+            flush(ctx, texObj);
             texObj->CompareFunc = params[0];
             return;
          case GL_EQUAL:
@@ -289,7 +303,7 @@ set_tex_parameteri(GLcontext *ctx,
          case GL_ALWAYS:
          case GL_NEVER:
             if (ctx->Extensions.EXT_shadow_funcs) {
-               FLUSH_VERTICES(ctx, _NEW_TEXTURE);
+               flush(ctx, texObj);
                texObj->CompareFunc = params[0];
                return;
             }
@@ -310,7 +324,7 @@ set_tex_parameteri(GLcontext *ctx,
            params[0] == GL_INTENSITY ||
            params[0] == GL_ALPHA)) {
          if (texObj->DepthMode != params[0]) {
-            FLUSH_VERTICES(ctx, _NEW_TEXTURE);
+            flush(ctx, texObj);
             texObj->DepthMode = params[0];
          }
       }
@@ -345,19 +359,19 @@ set_tex_parameterf(GLcontext *ctx,
    case GL_TEXTURE_MIN_LOD:
       if (texObj->MinLod == params[0])
          return;
-      FLUSH_VERTICES(ctx, _NEW_TEXTURE);
+      flush(ctx, texObj);
       texObj->MinLod = params[0];
       return;
 
    case GL_TEXTURE_MAX_LOD:
       if (texObj->MaxLod == params[0])
          return;
-      FLUSH_VERTICES(ctx, _NEW_TEXTURE);
+      flush(ctx, texObj);
       texObj->MaxLod = params[0];
       return;
 
    case GL_TEXTURE_PRIORITY:
-      FLUSH_VERTICES(ctx, _NEW_TEXTURE);
+      flush(ctx, texObj);
       texObj->Priority = CLAMP(params[0], 0.0F, 1.0F);
       return;
 
@@ -369,7 +383,7 @@ set_tex_parameterf(GLcontext *ctx,
             _mesa_error(ctx, GL_INVALID_VALUE, "glTexParameter(param)" );
             return;
          }
-         FLUSH_VERTICES(ctx, _NEW_TEXTURE);
+         flush(ctx, texObj);
          /* clamp to max, that's what NVIDIA does */
          texObj->MaxAnisotropy = MIN2(params[0],
                                       ctx->Const.MaxTextureMaxAnisotropy);
@@ -382,9 +396,9 @@ set_tex_parameterf(GLcontext *ctx,
 
    case GL_TEXTURE_COMPARE_FAIL_VALUE_ARB:
       if (ctx->Extensions.SGIX_shadow_ambient) {
-         if (texObj->CompareFailValue != params[0]) {
-            FLUSH_VERTICES(ctx, _NEW_TEXTURE);
-            texObj->CompareFailValue = CLAMP(params[0], 0.0F, 1.0F);
+         if (texObj->ShadowAmbient != params[0]) {
+            flush(ctx, texObj);
+            texObj->ShadowAmbient = CLAMP(params[0], 0.0F, 1.0F);
          }
       }
       else {
@@ -397,14 +411,14 @@ set_tex_parameterf(GLcontext *ctx,
       /* NOTE: this is really part of OpenGL 1.4, not EXT_texture_lod_bias */
       if (ctx->Extensions.EXT_texture_lod_bias) {
          if (texObj->LodBias != params[0]) {
-            FLUSH_VERTICES(ctx, _NEW_TEXTURE);
+            flush(ctx, texObj);
             texObj->LodBias = params[0];
          }
       }
       break;
 
    case GL_TEXTURE_BORDER_COLOR:
-      FLUSH_VERTICES(ctx, _NEW_TEXTURE);
+      flush(ctx, texObj);
       texObj->BorderColor[RCOMP] = params[0];
       texObj->BorderColor[GCOMP] = params[1];
       texObj->BorderColor[BCOMP] = params[2];
@@ -457,8 +471,6 @@ _mesa_TexParameterf(GLenum target, GLenum pname, GLfloat param)
       set_tex_parameterf(ctx, texObj, pname, &param);
    }
 
-   texObj->_Complete = GL_FALSE;
-
    if (ctx->Driver.TexParameter && ctx->ErrorValue == GL_NO_ERROR) {
       ctx->Driver.TexParameter(ctx, target, texObj, pname, &param);
    }
@@ -516,8 +528,6 @@ _mesa_TexParameterfv(GLenum target, GLenum pname, const GLfloat *params)
       set_tex_parameterf(ctx, texObj, pname, params);
    }
 
-   texObj->_Complete = GL_FALSE;
-
    if (ctx->Driver.TexParameter && ctx->ErrorValue == GL_NO_ERROR) {
       ctx->Driver.TexParameter(ctx, target, texObj, pname, params);
    }
@@ -553,8 +563,6 @@ _mesa_TexParameteri(GLenum target, GLenum pname, GLint param)
       set_tex_parameteri(ctx, texObj, pname, &param);
    }
 
-   texObj->_Complete = GL_FALSE;
-
    if (ctx->Driver.TexParameter && ctx->ErrorValue == GL_NO_ERROR) {
       GLfloat fparam = (GLfloat) param;
       ctx->Driver.TexParameter(ctx, target, texObj, pname, &fparam);
@@ -602,8 +610,6 @@ _mesa_TexParameteriv(GLenum target, GLenum pname, const GLint *params)
       set_tex_parameteri(ctx, texObj, pname, params);
    }
 
-   texObj->_Complete = GL_FALSE;
-
    if (ctx->Driver.TexParameter && ctx->ErrorValue == GL_NO_ERROR) {
       GLfloat fparams[4];
       fparams[0] = INT_TO_FLOAT(params[0]);

commit 6ada1d47d9f9ba14f564329af777298eeaa160a1
Author: Brian Paul <brianp@vmware.com>
Date:   Mon Feb 9 13:50:36 2009 -0700

    mesa: add no-change testing for a few more texture parameters
    
    (cherry picked from commit 37c768b36aad22ecad48c7caab272354383e26a7)

diff --git a/src/mesa/main/texparam.c b/src/mesa/main/texparam.c
index 01ded92..e3dba60 100644
--- a/src/mesa/main/texparam.c
+++ b/src/mesa/main/texparam.c
@@ -246,8 +246,10 @@ set_tex_parameteri(GLcontext *ctx,
 
    case GL_GENERATE_MIPMAP_SGIS:
       if (ctx->Extensions.SGIS_generate_mipmap) {
-         FLUSH_VERTICES(ctx, _NEW_TEXTURE);
-         texObj->GenerateMipmap = params[0] ? GL_TRUE : GL_FALSE;
+         if (texObj->GenerateMipmap != params[0]) {
+            FLUSH_VERTICES(ctx, _NEW_TEXTURE);
+            texObj->GenerateMipmap = params[0] ? GL_TRUE : GL_FALSE;
+         }
       }
       else {
          _mesa_error(ctx, GL_INVALID_ENUM,
@@ -259,8 +261,10 @@ set_tex_parameteri(GLcontext *ctx,
       if (ctx->Extensions.ARB_shadow &&
           (params[0] == GL_NONE ||
            params[0] == GL_COMPARE_R_TO_TEXTURE_ARB)) {
-         FLUSH_VERTICES(ctx, _NEW_TEXTURE);
-         texObj->CompareMode = params[0];
+         if (texObj->CompareMode != params[0]) {
+            FLUSH_VERTICES(ctx, _NEW_TEXTURE);
+            texObj->CompareMode = params[0];
+         }
       }
       else {
          _mesa_error(ctx, GL_INVALID_ENUM,
@@ -270,6 +274,8 @@ set_tex_parameteri(GLcontext *ctx,
 
    case GL_TEXTURE_COMPARE_FUNC_ARB:
       if (ctx->Extensions.ARB_shadow) {
+         if (texObj->CompareFunc == params[0])
+            return;
          switch (params[0]) {
          case GL_LEQUAL:
          case GL_GEQUAL:
@@ -303,8 +309,10 @@ set_tex_parameteri(GLcontext *ctx,
           (params[0] == GL_LUMINANCE ||
            params[0] == GL_INTENSITY ||
            params[0] == GL_ALPHA)) {
-         FLUSH_VERTICES(ctx, _NEW_TEXTURE);
-         texObj->DepthMode = params[0];
+         if (texObj->DepthMode != params[0]) {
+            FLUSH_VERTICES(ctx, _NEW_TEXTURE);
+            texObj->DepthMode = params[0];
+         }
       }
       else {
          _mesa_error(ctx, GL_INVALID_ENUM,
@@ -355,6 +363,8 @@ set_tex_parameterf(GLcontext *ctx,
 
    case GL_TEXTURE_MAX_ANISOTROPY_EXT:
       if (ctx->Extensions.EXT_texture_filter_anisotropic) {
+         if (texObj->MaxAnisotropy == params[0])
+            return;
          if (params[0] < 1.0) {
             _mesa_error(ctx, GL_INVALID_VALUE, "glTexParameter(param)" );
             return;
@@ -370,10 +380,12 @@ set_tex_parameterf(GLcontext *ctx,
       }
       return;
 
-   case GL_SHADOW_AMBIENT_SGIX: /* aka GL_TEXTURE_COMPARE_FAIL_VALUE_ARB */
+   case GL_TEXTURE_COMPARE_FAIL_VALUE_ARB:
       if (ctx->Extensions.SGIX_shadow_ambient) {
-         FLUSH_VERTICES(ctx, _NEW_TEXTURE);
-         texObj->ShadowAmbient = CLAMP(params[0], 0.0F, 1.0F);
+         if (texObj->CompareFailValue != params[0]) {
+            FLUSH_VERTICES(ctx, _NEW_TEXTURE);
+            texObj->CompareFailValue = CLAMP(params[0], 0.0F, 1.0F);
+         }
       }
       else {
          _mesa_error(ctx, GL_INVALID_ENUM,

commit 55865335f425ea423fd6e03bb5bd06cfa4ad286a
Author: Robert Ellison <papillo@vmware.com>
Date:   Thu Mar 12 11:46:31 2009 -0600

    i965: fix polygon stipple when rendering to FBO
    
    The polygon stipple pattern, like the viewport and the
    polygon face orientation, must be inverted on the i965
    when rendering to a FBO (which itself has an inverted pixel
    coordinate system compared to raw Mesa).
    
    In addition, the polygon stipple offset, which orients
    the stipple to the window system, disappears when rendering
    to an FBO (because the window system offset doesn't apply,
    and there's no associated FBO offset).
    
    With these fixes, the conform triangle and polygon stipple
    tests pass when rendering to texture.
    (cherry picked from commit 29309b45b011b4c44721b8f7346272fb22a4d4c2)

diff --git a/src/mesa/drivers/dri/i965/brw_misc_state.c b/src/mesa/drivers/dri/i965/brw_misc_state.c
index 9dcdad7..f311663 100644
--- a/src/mesa/drivers/dri/i965/brw_misc_state.c
+++ b/src/mesa/drivers/dri/i965/brw_misc_state.c
@@ -290,8 +290,21 @@ static void upload_polygon_stipple(struct brw_context *brw)
    bps.header.opcode = CMD_POLY_STIPPLE_PATTERN;
    bps.header.length = sizeof(bps)/4-2;
 
-   for (i = 0; i < 32; i++)
-      bps.stipple[i] = ctx->PolygonStipple[31 - i]; /* invert */
+   /* Polygon stipple is provided in OpenGL order, i.e. bottom
+    * row first.  If we're rendering to a window (i.e. the
+    * default frame buffer object, 0), then we need to invert
+    * it to match our pixel layout.  But if we're rendering
+    * to a FBO (i.e. any named frame buffer object), we *don't*
+    * need to invert - we already match the layout.
+    */
+   if (ctx->DrawBuffer->Name == 0) {
+      for (i = 0; i < 32; i++)
+         bps.stipple[i] = ctx->PolygonStipple[31 - i]; /* invert */
+   }
+   else {
+      for (i = 0; i < 32; i++)
+         bps.stipple[i] = ctx->PolygonStipple[i]; /* don't invert */
+   }
 
    BRW_CACHED_BATCH_STRUCT(brw, &bps);
 }
@@ -319,8 +332,22 @@ static void upload_polygon_stipple_offset(struct brw_context *brw)
    bpso.header.opcode = CMD_POLY_STIPPLE_OFFSET;
    bpso.header.length = sizeof(bpso)/4-2;
 
-   bpso.bits0.x_offset = (32 - (dPriv->x & 31)) & 31;
-   bpso.bits0.y_offset = (32 - ((dPriv->y + dPriv->h) & 31)) & 31;
+   /* If we're drawing to a system window (ctx->DrawBuffer->Name == 0),
+    * we have to invert the Y axis in order to match the OpenGL
+    * pixel coordinate system, and our offset must be matched
+    * to the window position.  If we're drawing to a FBO
+    * (ctx->DrawBuffer->Name != 0), then our native pixel coordinate
+    * system works just fine, and there's no window system to
+    * worry about.
+    */
+   if (brw->intel.ctx.DrawBuffer->Name == 0) {
+      bpso.bits0.x_offset = (32 - (dPriv->x & 31)) & 31;
+      bpso.bits0.y_offset = (32 - ((dPriv->y + dPriv->h) & 31)) & 31;
+   }
+   else {
+      bpso.bits0.y_offset = 0;
+      bpso.bits0.x_offset = 0;
+   }
 
    BRW_CACHED_BATCH_STRUCT(brw, &bpso);
 }
diff --git a/src/mesa/main/mtypes.h b/src/mesa/main/mtypes.h
index 5a2603f..a9eb248 100644
--- a/src/mesa/main/mtypes.h
+++ b/src/mesa/main/mtypes.h
@@ -2380,9 +2380,9 @@ struct gl_framebuffer
    /**
     * If zero, this is a window system framebuffer.  If non-zero, this
     * is a FBO framebuffer; note that for some devices (i.e. those with
-    * a natural pixel coordinate system for FBOs that differs from the 
-    * OpenGL/Mesa coordinate system), this means that both the viewport
-    * and polygon face orientation will have to be inverted.
+    * a natural pixel coordinate system for FBOs that differs from the
+    * OpenGL/Mesa coordinate system), this means that the viewport,
+    * polygon face orientation, and polygon stipple will have to be inverted.
     */
    GLuint Name;
 

commit 918e5221efa4d4d0cd60c6446dc0df2b84e44851
Author: Robert Ellison <papillo@vmware.com>
Date:   Wed Mar 11 16:27:38 2009 -0600

    i965: fix polygon face orientation when rendering to FBO
    
    In the i965, the FBO coordinate system is inverted from the standard
    OpenGL/Mesa coordinate system; that means that the viewport and the
    polygon face orientation have to be inverted if rendering to a FBO.
    
    The viewport was already being handled correctly; but polygon face
    was not.  This caused a conform failure when rendering to texture with
    two-sided lighting enabled.
    
    This fixes the problem in the i965 driver, and adds to the comment about
    the gl_framebuffer "Name" field so that this isn't a surprise to other
    driver writers.
    (cherry picked from commit 6dceeb2eb804d708639d68a13a924d65f366458a)

diff --git a/src/mesa/drivers/dri/i965/brw_sf.c b/src/mesa/drivers/dri/i965/brw_sf.c
index 8c17115..c3c8597 100644
--- a/src/mesa/drivers/dri/i965/brw_sf.c
+++ b/src/mesa/drivers/dri/i965/brw_sf.c
@@ -167,8 +167,14 @@ static void upload_sf_prog(struct brw_context *brw)
    key.do_twoside_color = (ctx->Light.Enabled && ctx->Light.Model.TwoSide);
 
    /* _NEW_POLYGON */
-   if (key.do_twoside_color)
-      key.frontface_ccw = (ctx->Polygon.FrontFace == GL_CCW);
+   if (key.do_twoside_color) {
+      /* If we're rendering to a FBO, we have to invert the polygon
+       * face orientation, just as we invert the viewport in
+       * sf_unit_create_from_key().  ctx->DrawBuffer->Name will be
+       * nonzero if we're rendering to such an FBO.
+       */
+      key.frontface_ccw = (ctx->Polygon.FrontFace == GL_CCW) ^ (ctx->DrawBuffer->Name != 0);
+   }
 
    dri_bo_unreference(brw->sf.prog_bo);
    brw->sf.prog_bo = brw_search_cache(&brw->cache, BRW_SF_PROG,
diff --git a/src/mesa/main/mtypes.h b/src/mesa/main/mtypes.h
index 61177ae..5a2603f 100644
--- a/src/mesa/main/mtypes.h
+++ b/src/mesa/main/mtypes.h
@@ -2376,8 +2376,16 @@ struct gl_renderbuffer_attachment
  */
 struct gl_framebuffer
 {
-   _glthread_Mutex Mutex;		   /**< for thread safety */
-   GLuint Name;      /* if zero, this is a window system framebuffer */
+   _glthread_Mutex Mutex;  /**< for thread safety */
+   /**
+    * If zero, this is a window system framebuffer.  If non-zero, this
+    * is a FBO framebuffer; note that for some devices (i.e. those with
+    * a natural pixel coordinate system for FBOs that differs from the 
+    * OpenGL/Mesa coordinate system), this means that both the viewport
+    * and polygon face orientation will have to be inverted.
+    */
+   GLuint Name;
+
    GLint RefCount;
    GLboolean DeletePending;
 

commit 9feb26584a40135f4eaa59e1db9149298f63a869
Author: Brian Paul <brianp@vmware.com>
Date:   Tue Mar 17 10:34:45 2009 -0600

    swrast: use better _swrast_compute_lambda() function
    
    The MAX-based function can produce values that are non-monotonic for a span
    which causes glitches in texture filtering.  The sqrt-based one avoids that.
    
    This is perhaps slightly slower than before, but the difference
    probably isn't noticable given we're doing software mipmap filtering.
    
    Issue reported by Nir Radian <nirr@horizonsemi.com>
    
    (cherry picked from master, commit c334ce273e946733928339b1c7f9a02ccdef1b4b)

diff --git a/src/mesa/swrast/s_span.c b/src/mesa/swrast/s_span.c
index 7f9cc64..e36c1a4 100644
--- a/src/mesa/swrast/s_span.c
+++ b/src/mesa/swrast/s_span.c
@@ -442,11 +442,10 @@ _swrast_span_interpolate_z( const GLcontext *ctx, SWspan *span )
  * Compute mipmap LOD from partial derivatives.
  * This the ideal solution, as given in the OpenGL spec.
  */
-#if 0
-static GLfloat
-compute_lambda(GLfloat dsdx, GLfloat dsdy, GLfloat dtdx, GLfloat dtdy,
-               GLfloat dqdx, GLfloat dqdy, GLfloat texW, GLfloat texH,
-               GLfloat s, GLfloat t, GLfloat q, GLfloat invQ)
+GLfloat
+_swrast_compute_lambda(GLfloat dsdx, GLfloat dsdy, GLfloat dtdx, GLfloat dtdy,
+                       GLfloat dqdx, GLfloat dqdy, GLfloat texW, GLfloat texH,
+                       GLfloat s, GLfloat t, GLfloat q, GLfloat invQ)
 {
    GLfloat dudx = texW * ((s + dsdx) / (q + dqdx) - s * invQ);
    GLfloat dvdx = texH * ((t + dtdx) / (q + dqdx) - t * invQ);
@@ -458,13 +457,13 @@ compute_lambda(GLfloat dsdx, GLfloat dsdy, GLfloat dtdx, GLfloat dtdy,
    GLfloat lambda = LOG2(rho);
    return lambda;
 }
-#endif
 
 
 /**
  * Compute mipmap LOD from partial derivatives.
  * This is a faster approximation than above function.
  */
+#if 0
 GLfloat
 _swrast_compute_lambda(GLfloat dsdx, GLfloat dsdy, GLfloat dtdx, GLfloat dtdy,
                      GLfloat dqdx, GLfloat dqdy, GLfloat texW, GLfloat texH,
@@ -485,6 +484,7 @@ _swrast_compute_lambda(GLfloat dsdx, GLfloat dsdy, GLfloat dtdx, GLfloat dtdy,
    lambda = LOG2(rho);
    return lambda;
 }
+#endif
 
 
 /**

commit a8528a2e8653b5237c1d1d66fe98c6e031d007f9
Author: Ian Romanick <ian.d.romanick@intel.com>
Date:   Mon Mar 16 13:39:32 2009 -0700

    Mark current bits as 2009Q1-RC1 for Intel driver.

diff --git a/src/mesa/drivers/dri/intel/intel_context.c b/src/mesa/drivers/dri/intel/intel_context.c
index 0d55cd6..bf935f1 100644
--- a/src/mesa/drivers/dri/intel/intel_context.c
+++ b/src/mesa/drivers/dri/intel/intel_context.c
@@ -97,7 +97,7 @@ int INTEL_DEBUG = (0);
 
 #include "extension_helper.h"
 
-#define DRIVER_DATE                     "20090114"
+#define DRIVER_DATE                     "20090316 2009Q1 RC1"
 #define DRIVER_DATE_GEM                 "GEM " DRIVER_DATE
 
 static const GLubyte *

commit 119360cccdd49475eed67dde6344bf9f9904bc1b
Author: Brian Paul <brianp@vmware.com>
Date:   Thu Mar 5 15:08:36 2009 -0700

    i965: init dest reg CondMask = COND_TR (the proper default)
    
    Plus fix up a debug printf.
    (cherry picked from commit 20f49252e1fe2e72bb620c26292f33d5315452a1)

diff --git a/src/mesa/drivers/dri/i965/brw_wm_fp.c b/src/mesa/drivers/dri/i965/brw_wm_fp.c
index 4480b4e..baa8bf3 100644
--- a/src/mesa/drivers/dri/i965/brw_wm_fp.c
+++ b/src/mesa/drivers/dri/i965/brw_wm_fp.c
@@ -123,7 +123,7 @@ static struct prog_dst_register dst_reg(GLuint file, GLuint idx)
    reg.Index = idx;
    reg.WriteMask = WRITEMASK_XYZW;
    reg.RelAddr = 0;
-   reg.CondMask = 0;
+   reg.CondMask = COND_TR;
    reg.CondSwizzle = 0;
    reg.CondSrc = 0;
    reg.pad = 0;
@@ -901,8 +901,7 @@ static void print_insns( const struct prog_instruction *insn,
 				     3);
       }
       else 
-	 _mesa_printf("UNKNOWN\n");
-	   
+	 _mesa_printf("965 Opcode %d\n", insn->Opcode);
    }
 }
 

commit ac2216542d4887641b47bb3bd05470b94576cd07
Author: Brian Paul <brianp@vmware.com>
Date:   Fri Feb 20 11:42:28 2009 -0700

    glsl: fix vec4_texp_rect IR code (need projective version) (cherry picked from commit ad2cfa41992d0676881440596c43ab6021c1b025)

diff --git a/src/mesa/shader/slang/slang_codegen.c b/src/mesa/shader/slang/slang_codegen.c
index cfdb868..ac70632 100644
--- a/src/mesa/shader/slang/slang_codegen.c
+++ b/src/mesa/shader/slang/slang_codegen.c
@@ -527,7 +527,7 @@ static slang_asm_info AsmInfo[] = {
    { "vec4_texp3d", IR_TEXP, 1, 2 },  /* 3d w/ projection */
    { "vec4_texcube", IR_TEX, 1, 2 },  /* cubemap */
    { "vec4_tex_rect", IR_TEX, 1, 2 }, /* rectangle */
-   { "vec4_texp_rect", IR_TEX, 1, 2 },/* rectangle w/ projection */
+   { "vec4_texp_rect", IR_TEXP, 1, 2 },/* rectangle w/ projection */
 
    /* unary op */
    { "ivec4_to_vec4", IR_I_TO_F, 1, 1 }, /* int[4] to float[4] */

commit 37e5c057f18ec1796e995c7f7616cb68e289694e
Author: Brian Paul <brianp@vmware.com>
Date:   Fri Mar 6 16:00:25 2009 -0700

    i965: check if we run out of GRF/temp registers
    
    Before this change we would up emitting instructions with invalid register
    numbers.  This typically (but not always) hung the GPU.  For now, just
    prevent emitting bad instructions to avoid hangs.  Still need to do some
    kind of proper error recovery.
    (cherry picked from commit e60b3067d81319236d63ad497e70658fd2e14eb3)

diff --git a/src/mesa/drivers/dri/i965/brw_wm_glsl.c b/src/mesa/drivers/dri/i965/brw_wm_glsl.c
index 963b7e9..11f592d 100644
--- a/src/mesa/drivers/dri/i965/brw_wm_glsl.c
+++ b/src/mesa/drivers/dri/i965/brw_wm_glsl.c
@@ -89,8 +89,14 @@ get_reg(struct brw_wm_compile *c, int file, int index, int component, int nr, GL
 	    break;
 	case PROGRAM_UNDEFINED:
 	    return brw_null_reg();	
-	default:
+	case PROGRAM_TEMPORARY:
+	case PROGRAM_INPUT:
+	case PROGRAM_OUTPUT:
+	case PROGRAM_PAYLOAD:
 	    break;
+	default:
+	    _mesa_problem(NULL, "Unexpected file in get_reg()");
+	    return brw_null_reg();
     }
 
     if(c->wm_regs[file][index][component].inited)
@@ -103,7 +109,20 @@ get_reg(struct brw_wm_compile *c, int file, int index, int component, int nr, GL
 	c->reg_index++;
     }
 
-    if (neg & (1<< component)) {
+    if (c->reg_index >= BRW_WM_MAX_GRF - 12) {
+	/* ran out of temporary registers! */
+#if 1
+        /* This is a big hack for now.
+         * Return bad register index, but don't just crash hange the GPU.
+         */
+        _mesa_fprintf(stderr, "out of regs %d\n", c->reg_index);
+        c->reg_index = BRW_WM_MAX_GRF - 13;
+#else
+	return brw_null_reg();
+#endif
+    }
+ 
+    if (neg & (1 << component)) {
 	reg = negate(reg);
     }
     if (abs)
@@ -2515,6 +2534,11 @@ static void brw_wm_emit_glsl(struct brw_context *brw, struct brw_wm_compile *c)
 	    brw_set_predicate_control(p, BRW_PREDICATE_NONE);
     }
     post_wm_emit(c);
+
+    if (c->reg_index >= BRW_WM_MAX_GRF) {
+        _mesa_problem(NULL, "Ran out of registers in brw_wm_emit_glsl()");
+        /* XXX we need to do some proper error recovery here */
+    }
 }
 
 void brw_wm_glsl_emit(struct brw_context *brw, struct brw_wm_compile *c)

commit 4d9b8e0f938911d6ce8492959b5483467dce83b0
Author: Brian Paul <brianp@vmware.com>
Date:   Thu Jan 22 10:32:08 2009 -0700

    mesa: added _mesa_fprintf() wrapper (cherry picked from commit 596b8fbbbf65cef227ce60216a57d4bbfd627099)

diff --git a/src/mesa/main/imports.c b/src/mesa/main/imports.c
index 5cf1a2b..0c2c894 100644
--- a/src/mesa/main/imports.c
+++ b/src/mesa/main/imports.c
@@ -955,9 +955,22 @@ _mesa_printf( const char *fmtString, ... )
    va_start( args, fmtString );  
    vsnprintf(s, MAXSTRING, fmtString, args);
    va_end( args );
-   fprintf(stderr,"%s", s);
+   fprintf(stderr, "%s", s);
 }
 
+/** Wrapper around fprintf(), using vsprintf() for the formatting. */
+void
+_mesa_fprintf( FILE *f, const char *fmtString, ... )
+{
+   char s[MAXSTRING];
+   va_list args;
+   va_start( args, fmtString );  
+   vsnprintf(s, MAXSTRING, fmtString, args);
+   va_end( args );
+   fprintf(f, "%s", s);
+}
+
+
 /** Wrapper around vsprintf() */
 int
 _mesa_vsprintf( char *str, const char *fmt, va_list args )
diff --git a/src/mesa/main/imports.h b/src/mesa/main/imports.h
index d71d59c..e560bc0 100644
--- a/src/mesa/main/imports.h
+++ b/src/mesa/main/imports.h
@@ -774,6 +774,9 @@ _mesa_snprintf( char *str, size_t size, const char *fmt, ... );


Reply to: