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

mesa: Changes to 'upstream-unstable'



 Makefile                                           |    3 
 bin/mklib                                          |    1 
 configure.ac                                       |   16 +
 docs/contents.html                                 |    2 
 docs/download.html                                 |   10 
 docs/faq.html                                      |   13 
 docs/news.html                                     |    7 
 docs/precompiled.html                              |   12 
 docs/relnotes-7.5.1.html                           |   20 +
 docs/relnotes-7.5.html                             |   10 
 progs/demos/fbotexture.c                           |   28 +
 progs/glsl/Makefile                                |    4 
 progs/glsl/samplers.c                              |   16 -
 progs/tests/fbotest1.c                             |    2 
 progs/tests/texwrap.c                              |   18 +
 progs/trivial/.gitignore                           |   15 +
 progs/trivial/Makefile                             |    8 
 progs/xdemos/glxcontexts.c                         |    3 
 progs/xdemos/glxswapcontrol.c                      |    5 
 src/egl/drivers/demo/Makefile                      |    2 
 src/egl/main/Makefile                              |    2 
 src/gallium/auxiliary/draw/draw_pipe.c             |   78 +++--
 src/gallium/auxiliary/tgsi/tgsi_build.c            |    2 
 src/gallium/auxiliary/tgsi/tgsi_exec.c             |   50 ++-
 src/gallium/auxiliary/tgsi/tgsi_exec.h             |    4 
 src/gallium/auxiliary/tgsi/tgsi_parse.h            |    1 
 src/gallium/auxiliary/tgsi/tgsi_ppc.c              |    9 
 src/gallium/auxiliary/tgsi/tgsi_sse2.c             |    8 
 src/gallium/auxiliary/util/u_blit.c                |  137 +++++++--
 src/gallium/auxiliary/util/u_blit.h                |   11 
 src/gallium/auxiliary/util/u_debug.c               |    2 
 src/gallium/auxiliary/util/u_gen_mipmap.c          |   10 
 src/gallium/auxiliary/util/u_simple_shaders.c      |   45 ++-
 src/gallium/auxiliary/util/u_simple_shaders.h      |    4 
 src/gallium/auxiliary/util/u_surface.h             |   17 +
 src/gallium/auxiliary/util/u_tile.c                |  198 +++++++++++++
 src/gallium/auxiliary/util/u_upload_mgr.c          |    8 
 src/gallium/drivers/softpipe/sp_texture.c          |    1 
 src/gallium/drivers/trace/tr_dump.c                |    2 
 src/gallium/include/pipe/p_inlines.h               |    7 
 src/gallium/state_trackers/glx/xlib/xm_api.c       |    2 
 src/gallium/state_trackers/python/retrace/parse.py |    2 
 src/gallium/winsys/xlib/xlib_brw_screen.c          |    2 
 src/gallium/winsys/xlib/xlib_softpipe.c            |    1 
 src/glx/x11/dri2_glx.c                             |    2 
 src/glx/x11/dri_glx.c                              |    2 
 src/glx/x11/drisw_glx.c                            |    2 
 src/glx/x11/glxclient.h                            |    2 
 src/glx/x11/glxcmds.c                              |   28 +
 src/glx/x11/glxext.c                               |    6 
 src/mesa/drivers/dri/common/dri_util.c             |    2 
 src/mesa/drivers/dri/intel/intel_batchbuffer.c     |    5 
 src/mesa/drivers/dri/intel/intel_context.c         |   27 +
 src/mesa/drivers/dri/intel/intel_context.h         |    1 
 src/mesa/drivers/dri/intel/intel_screen.c          |    8 
 src/mesa/drivers/windows/gdi/mesa.def              |    1 
 src/mesa/main/compiler.h                           |    8 
 src/mesa/main/config.h                             |    9 
 src/mesa/main/dlist.c                              |  302 +++++++++++----------
 src/mesa/main/extensions.c                         |    1 
 src/mesa/main/fbobject.c                           |   20 -
 src/mesa/main/ffvertex_prog.c                      |    2 
 src/mesa/main/fog.c                                |    2 
 src/mesa/main/image.c                              |  178 ++++++++++++
 src/mesa/main/image.h                              |    6 
 src/mesa/main/light.c                              |    8 
 src/mesa/main/state.c                              |    3 
 src/mesa/main/texenvprogram.c                      |   26 +
 src/mesa/shader/arbprogparse.c                     |    1 
 src/mesa/shader/arbprogram.c                       |    3 
 src/mesa/shader/prog_print.c                       |   18 -
 src/mesa/shader/shader_api.c                       |   33 +-
 src/mesa/shader/slang/slang_builtin.c              |    2 
 src/mesa/state_tracker/st_cb_bitmap.c              |   16 -
 src/mesa/state_tracker/st_cb_blit.c                |   97 +++++-
 src/mesa/state_tracker/st_cb_clear.c               |   24 +
 src/mesa/state_tracker/st_cb_drawpixels.c          |    4 
 src/mesa/state_tracker/st_cb_flush.c               |   12 
 src/mesa/state_tracker/st_cb_texture.c             |   72 +++--
 src/mesa/state_tracker/st_extensions.c             |    4 
 src/mesa/swrast/s_blit.c                           |  183 ------------
 src/mesa/swrast/s_context.c                        |    3 
 src/mesa/swrast/s_feedback.c                       |    4 
 src/mesa/swrast/s_triangle.c                       |   12 
 src/mesa/vbo/vbo_exec_draw.c                       |    2 
 src/mesa/x86/Makefile                              |    2 
 windows/VC8/mesa/mesa/mesa.vcproj                  |   52 ++-
 windows/VC8/mesa/osmesa/osmesa.vcproj              |    4 
 88 files changed, 1449 insertions(+), 548 deletions(-)

New commits:
commit 7d3af894d692e1b4c39eb6b24210bd53993723d7
Author: Brian Paul <brianp@vmware.com>
Date:   Thu Sep 3 15:44:49 2009 -0600

    docs: point to fd.o for downloads instead of SourceForge

diff --git a/docs/download.html b/docs/download.html
index cf1cc21..3cb9423 100644
--- a/docs/download.html
+++ b/docs/download.html
@@ -9,14 +9,14 @@
 <H1>Downloading</H1>
 
 <p>
-Primary download site:
-<a href="http://sourceforge.net/project/showfiles.php?group_id=3";
-target="_parent">SourceForge</a>
+Primary Mesa download site:
+<a href="ftp://ftp.freedesktop.org/pub/mesa/";
+target="_parent">freedesktop.org</a> (FTP)
 </p>
 
 <p>
-When a new release is coming, release candidates (betas) can be found
-<a href="http://www.mesa3d.org/beta/";>here</a>.
+When a new release is coming, release candidates (betas) may be found
+<a href="ftp://ftp.freedesktop.org/pub/mesa/beta/"; target="_parent">here</a>.
 </p>
 
 

commit 32156f3a1165624cd4e2d0d337809fb046bd9285
Author: Brian Paul <brianp@vmware.com>
Date:   Thu Sep 3 15:44:22 2009 -0600

    gallium/xlib: silence unitialized var warning

diff --git a/src/gallium/state_trackers/glx/xlib/xm_api.c b/src/gallium/state_trackers/glx/xlib/xm_api.c
index a3d1651..45ad694 100644
--- a/src/gallium/state_trackers/glx/xlib/xm_api.c
+++ b/src/gallium/state_trackers/glx/xlib/xm_api.c
@@ -743,7 +743,7 @@ XMesaContext XMesaCreateContext( XMesaVisual v, XMesaContext share_list )
 {
    static GLboolean firstTime = GL_TRUE;
    struct pipe_screen *screen;
-   struct pipe_context *pipe;
+   struct pipe_context *pipe = NULL;
    XMesaContext c;
    GLcontext *mesaCtx;
    uint pf;

commit 1c32caf075ce4015ba50d0aa9f0a2ff924c21970
Author: Brian Paul <brianp@vmware.com>
Date:   Thu Sep 3 15:23:15 2009 -0600

    gallium/xlib: silence uninitialized var warning

diff --git a/src/gallium/winsys/xlib/xlib_brw_screen.c b/src/gallium/winsys/xlib/xlib_brw_screen.c
index fe8dfff..a78efb1 100644
--- a/src/gallium/winsys/xlib/xlib_brw_screen.c
+++ b/src/gallium/winsys/xlib/xlib_brw_screen.c
@@ -364,7 +364,7 @@ void xlib_brw_buffer_subdata_typed( struct pipe_winsys *pws,
                                     unsigned data_type )
 {
    unsigned aub_type = DW_GENERAL_STATE;
-   unsigned aub_sub_type;
+   unsigned aub_sub_type = 0;
 
    switch (data_type) {
    case BRW_CC_VP:

commit 67c286d20e6f1256950d81aab3f6b54cd4926602
Author: Brian Paul <brianp@vmware.com>
Date:   Thu Sep 3 15:04:49 2009 -0600

    st/mesa: silence uninitialized var warnings

diff --git a/src/mesa/state_tracker/st_cb_texture.c b/src/mesa/state_tracker/st_cb_texture.c
index 2d37d24..2db28ef 100644
--- a/src/mesa/state_tracker/st_cb_texture.c
+++ b/src/mesa/state_tracker/st_cb_texture.c
@@ -526,9 +526,9 @@ st_TexImage(GLcontext * ctx,
    struct st_texture_image *stImage = st_texture_image(texImage);
    GLint postConvWidth, postConvHeight;
    GLint texelBytes, sizeInBytes;
-   GLuint dstRowStride;
+   GLuint dstRowStride = 0;
    struct gl_pixelstore_attrib unpackNB;
-   enum pipe_transfer_usage transfer_usage;
+   enum pipe_transfer_usage transfer_usage = 0;
 
    DBG("%s target %s level %d %dx%dx%d border %d\n", __FUNCTION__,
        _mesa_lookup_enum_by_nr(target), level, width, height, depth, border);

commit 0b4e835b13fb240f9c8f9fdc994cb80b99265845
Author: Brian Paul <brianp@vmware.com>
Date:   Thu Sep 3 14:57:30 2009 -0600

    docs: prep for 7.5.1 release

diff --git a/docs/relnotes-7.5.1.html b/docs/relnotes-7.5.1.html
index 320e531..c65fb85 100644
--- a/docs/relnotes-7.5.1.html
+++ b/docs/relnotes-7.5.1.html
@@ -8,7 +8,7 @@
 
 <body bgcolor="#eeeeee">
 
-<H1>Mesa 7.5.1 Release Notes / (date TBD)</H1>
+<H1>Mesa 7.5.1 Release Notes, 3 September 2009</H1>
 
 <p>
 Mesa 7.5.1 is a bug-fix release fixing issues found since the 7.5 release.
@@ -56,12 +56,9 @@ tbd
 <li>Selection/Feedback mode didn't handle polygon culling correctly (bug 16866)
 <li>Fixed 32/64-bit cross compilation issue in gen_matypes.c
 <li>Fixed glXCreateGLXPixmap() for direct rendering.
+<li>Fixed Gallium glCopyPixels(GL_STENCIL_INDEX) mispositioned image bug.
 </ul>
 
 
-<h2>Changes</h2>
-<ul>
-</ul>
-
 </body>
 </html>

commit 08575509e4d3ac152ebf18a6dc944f233d9a62b0
Author: Brian Paul <brianp@vmware.com>
Date:   Thu Sep 3 14:57:16 2009 -0600

    docs: added news entry for 7.5.1

diff --git a/docs/news.html b/docs/news.html
index 712eced..07ad42e 100644
--- a/docs/news.html
+++ b/docs/news.html
@@ -11,6 +11,13 @@
 <H1>News</H1>
 
 
+<h2>September 3, 2009</h2>
+<p>
+<a href="relnotes-7.5.1.html">Mesa 7.5.1</a> is released.
+This is a bug-fix release which fixes bugs found in version 7.5.
+</p>
+
+
 <h2>July 17, 2009</h2>
 <p>
 <a href="relnotes-7.5.html">Mesa 7.5</a> is released.

commit ccb081414ba46a6e2d29bcc3c675e875717a8165
Author: Brian Paul <brianp@vmware.com>
Date:   Thu Sep 3 14:57:04 2009 -0600

    docs: update precompiled libs info

diff --git a/docs/precompiled.html b/docs/precompiled.html
index 166d33d..50cb2af 100644
--- a/docs/precompiled.html
+++ b/docs/precompiled.html
@@ -9,17 +9,11 @@
 <H1>Precompiled Libraries</H1>
 
 <p>
-In general, precompiled libraries are not available.
-However, people occasionally prepare packages of precompiled libraries
-for some systems.
+In general, precompiled Mesa libraries are not available.
 </p>
-
-<H2>Mesa-6.0 for Solaris</H2>
-
 <p>
-Steve Christensen has submitted precompiled Mesa-6.0 libraries for
-Solaris at <a href="http://sunfreeware.com/"; target="_parent">
-sunfreeware.com</a>.
+However, some Linux distros (such as Ubuntu) seem to closely track
+Mesa and often have the latest Mesa release available as an update.
 </p>
 
 </BODY>

commit 47df7900fd37f71bca0f3c4ae19d98866023a6c3
Author: Brian Paul <brianp@vmware.com>
Date:   Thu Sep 3 14:56:50 2009 -0600

    docs: move SGI GLU link

diff --git a/docs/contents.html b/docs/contents.html
index 1dca3a2..d15e6c1 100644
--- a/docs/contents.html
+++ b/docs/contents.html
@@ -39,7 +39,6 @@ a:visited {
 <ul>
 <li><a href="download.html" target="MainFrame">Downloading / Unpacking</a>
 <li><a href="install.html" target="MainFrame">Compiling / Installing</a>
-<li><a href="glu.html" target="MainFrame">SGI's GLU</a>
 <li><a href="precompiled.html" target="MainFrame">Precompiled Libraries</a>
 </ul>
 
@@ -68,6 +67,7 @@ a:visited {
 <li><a href="repository.html" target="MainFrame">Source Code Repository</a>
 <li><a href="memory.html" target="MainFrame">DRI Memory Management</a>
 <li><a href="shading.html" target="MainFrame">Shading Language</a>
+<li><a href="glu.html" target="MainFrame">SGI's GLU</a>
 <li><a href="utilities.html" target="MainFrame">Utilities</a>
 <li><a href="helpwanted.html" target="MainFrame">Help Wanted</a>
 <li><a href="devinfo.html" target="MainFrame">Development Notes</a>

commit c3a0624ef01c3b347ed8a9fd3bab578b52bd9130
Author: Brian Paul <brianp@vmware.com>
Date:   Thu Sep 3 14:39:53 2009 -0600

    st/mesa: fix glCopyPixels(GL_STENCIL_INDEX) inverted position
    
    If the renderbuffer orientation is Y=0=TOP we need to invert the dstY
    position.

diff --git a/src/mesa/state_tracker/st_cb_drawpixels.c b/src/mesa/state_tracker/st_cb_drawpixels.c
index 8b5094a..adb349c 100644
--- a/src/mesa/state_tracker/st_cb_drawpixels.c
+++ b/src/mesa/state_tracker/st_cb_drawpixels.c
@@ -842,6 +842,10 @@ copy_stencil_pixels(GLcontext *ctx, GLint srcx, GLint srcy,
    else
       usage = PIPE_TRANSFER_WRITE;
    
+   if (st_fb_orientation(ctx->DrawBuffer) == Y_0_TOP) {
+      dsty = rbDraw->Base.Height - dsty - height;
+   }
+
    ptDraw = st_cond_flush_get_tex_transfer(st_context(ctx),
 					   rbDraw->texture, 0, 0, 0,
 					   usage, dstx, dsty,

commit e79054cc4090a2be346236236c9e18ae85cad43d
Author: Keith Whitwell <keithw@vmware.com>
Date:   Wed Sep 2 18:30:11 2009 +0100

    st/mesa: Do GL_RGBA->GL_RGB texsubimage on hardware
    
    State tracker currently backs GL_RGB textures with RGBA almost always.
    This means we need to maintain A==1 in these textures to give correct GL_RGB
    sampling results.
    
    This change offloads the RGBA->RGB copy to hardware using the new writemask
    version of u_blit_pixels.
    
    More src/dstLogical/dstActual triples could be shifted to hardware by
    this technique in future patches.

diff --git a/src/mesa/state_tracker/st_cb_texture.c b/src/mesa/state_tracker/st_cb_texture.c
index ee71c01..2d37d24 100644
--- a/src/mesa/state_tracker/st_cb_texture.c
+++ b/src/mesa/state_tracker/st_cb_texture.c
@@ -56,6 +56,7 @@
 #include "pipe/p_context.h"
 #include "pipe/p_defines.h"
 #include "pipe/p_inlines.h"
+#include "pipe/p_shader_tokens.h"
 #include "util/u_tile.h"
 #include "util/u_blit.h"
 #include "util/u_surface.h"
@@ -1396,6 +1397,36 @@ fallback_copy_texsubimage(GLcontext *ctx, GLenum target, GLint level,
 }
 
 
+static unsigned
+compatible_src_dst_formats(const struct gl_renderbuffer *src,
+                           const struct gl_texture_image *dst)
+{
+   const GLenum srcFormat = src->_BaseFormat;
+   const GLenum dstLogicalFormat = dst->_BaseFormat;
+
+   if (srcFormat == dstLogicalFormat) {
+      /* This is the same as matching_base_formats, which should
+       * always pass, as it did previously.
+       */
+      return TGSI_WRITEMASK_XYZW;
+   }
+   else if (srcFormat == GL_RGBA &&
+            dstLogicalFormat == GL_RGB) {
+      /* Add a single special case to cope with RGBA->RGB transfers,
+       * setting A to 1.0 to cope with situations where the RGB
+       * destination is actually stored as RGBA.
+       */
+      return TGSI_WRITEMASK_XYZ; /* A ==> 1.0 */
+   }
+   else {
+      /* Otherwise fail.
+       */
+      return 0;
+   }
+}
+
+
+
 /**
  * Do a CopyTex[Sub]Image1/2/3D() using a hardware (blit) path if possible.
  * Note that the region to copy has already been clipped so we know we
@@ -1425,6 +1456,9 @@ st_copy_texsubimage(GLcontext *ctx,
    enum pipe_format dest_format, src_format;
    GLboolean use_fallback = GL_TRUE;
    GLboolean matching_base_formats;
+   GLuint format_writemask;
+   struct pipe_surface *dest_surface = NULL;
+   GLboolean do_flip = (st_fb_orientation(ctx->ReadBuffer) == Y_0_TOP);
 
    /* any rendering in progress must flushed before we grab the fb image */
    st_flush(ctx->st, PIPE_FLUSH_RENDER_CACHE, NULL);
@@ -1495,13 +1529,14 @@ st_copy_texsubimage(GLcontext *ctx,
     * textured-quad paths.
     */
    matching_base_formats = (strb->Base._BaseFormat == texImage->_BaseFormat);
+   format_writemask = compatible_src_dst_formats(&strb->Base, texImage);
 
-   if (matching_base_formats && ctx->_ImageTransferState == 0x0) {
-      /* try potential hardware path */
-      struct pipe_surface *dest_surface = NULL;
-      boolean do_flip = (st_fb_orientation(ctx->ReadBuffer) == Y_0_TOP);
+   if (ctx->_ImageTransferState == 0x0) {
 
-      if (src_format == dest_format && !do_flip) {
+      if (matching_base_formats && 
+          src_format == dest_format &&
+          !do_flip) 
+      {
          /* use surface_copy() / blit */
 
          dest_surface = screen->get_tex_surface(screen, stImage->pt,
@@ -1521,7 +1556,8 @@ st_copy_texsubimage(GLcontext *ctx,
                             width, height);
          use_fallback = GL_FALSE;
       }
-      else if (screen->is_format_supported(screen, src_format,
+      else if (format_writemask &&
+               screen->is_format_supported(screen, src_format,
                                            PIPE_TEXTURE_2D, 
                                            PIPE_TEXTURE_USAGE_SAMPLER,
                                            0) &&
@@ -1545,14 +1581,15 @@ st_copy_texsubimage(GLcontext *ctx,
             srcY0 = srcY;
             srcY1 = srcY0 + height;
          }
-         util_blit_pixels(ctx->st->blit,
-                          strb->surface,
-                          srcX, srcY0,
-                          srcX + width, srcY1,
-                          dest_surface,
-                          destX, destY,
-                          destX + width, destY + height,
-                          0.0, PIPE_TEX_MIPFILTER_NEAREST);
+         util_blit_pixels_writemask(ctx->st->blit,
+                                    strb->surface,
+                                    srcX, srcY0,
+                                    srcX + width, srcY1,
+                                    dest_surface,
+                                    destX, destY,
+                                    destX + width, destY + height,
+                                    0.0, PIPE_TEX_MIPFILTER_NEAREST,
+                                    format_writemask);
          use_fallback = GL_FALSE;
       }
 

commit de343680a3e6b2a588f8b3c844828b8d9e6cb6a5
Author: Keith Whitwell <keithw@vmware.com>
Date:   Wed Sep 2 17:58:52 2009 +0100

    util: add version of u_blit_pixels which takes a writemask
    
    Values outside the writemask are set in the destination to {0,0,0,1}

diff --git a/src/gallium/auxiliary/util/u_blit.c b/src/gallium/auxiliary/util/u_blit.c
index cda6dbd..c516317 100644
--- a/src/gallium/auxiliary/util/u_blit.c
+++ b/src/gallium/auxiliary/util/u_blit.c
@@ -62,7 +62,7 @@ struct blit_state
    struct pipe_viewport_state viewport;
 
    void *vs;
-   void *fs;
+   void *fs[TGSI_WRITEMASK_XYZW + 1];
 
    struct pipe_buffer *vbuf;  /**< quad vertices */
    unsigned vbuf_slot;
@@ -125,7 +125,7 @@ util_create_blit(struct pipe_context *pipe, struct cso_context *cso)
    }
 
    /* fragment shader */
-   ctx->fs = util_make_fragment_tex_shader(pipe);
+   ctx->fs[TGSI_WRITEMASK_XYZW] = util_make_fragment_tex_shader(pipe);
    ctx->vbuf = NULL;
 
    /* init vertex data that doesn't change */
@@ -146,9 +146,13 @@ void
 util_destroy_blit(struct blit_state *ctx)
 {
    struct pipe_context *pipe = ctx->pipe;
+   unsigned i;
 
    pipe->delete_vs_state(pipe, ctx->vs);
-   pipe->delete_fs_state(pipe, ctx->fs);
+
+   for (i = 0; i < Elements(ctx->fs); i++)
+      if (ctx->fs[i])
+         pipe->delete_fs_state(pipe, ctx->fs[i]);
 
    pipe_buffer_reference(&ctx->vbuf, NULL);
 
@@ -299,14 +303,15 @@ regions_overlap(int srcX0, int srcY0,
  * XXX need some control over blitting Z and/or stencil.
  */
 void
-util_blit_pixels(struct blit_state *ctx,
-                 struct pipe_surface *src,
-                 int srcX0, int srcY0,
-                 int srcX1, int srcY1,
-                 struct pipe_surface *dst,
-                 int dstX0, int dstY0,
-                 int dstX1, int dstY1,
-                 float z, uint filter)
+util_blit_pixels_writemask(struct blit_state *ctx,
+                           struct pipe_surface *src,
+                           int srcX0, int srcY0,
+                           int srcX1, int srcY1,
+                           struct pipe_surface *dst,
+                           int dstX0, int dstY0,
+                           int dstX1, int dstY1,
+                           float z, uint filter,
+                           uint writemask)
 {
    struct pipe_context *pipe = ctx->pipe;
    struct pipe_screen *screen = pipe->screen;
@@ -426,8 +431,11 @@ util_blit_pixels(struct blit_state *ctx,
    /* texture */
    cso_set_sampler_textures(ctx->cso, 1, &tex);
 
+   if (ctx->fs[writemask] == NULL)
+      ctx->fs[writemask] = util_make_fragment_tex_shader_writemask(pipe, writemask);
+
    /* shaders */
-   cso_set_fragment_shader_handle(ctx->cso, ctx->fs);
+   cso_set_fragment_shader_handle(ctx->cso, ctx->fs[writemask]);
    cso_set_vertex_shader_handle(ctx->cso, ctx->vs);
 
    /* drawing dest */
@@ -462,6 +470,27 @@ util_blit_pixels(struct blit_state *ctx,
 }
 
 
+void
+util_blit_pixels(struct blit_state *ctx,
+                 struct pipe_surface *src,
+                 int srcX0, int srcY0,
+                 int srcX1, int srcY1,
+                 struct pipe_surface *dst,
+                 int dstX0, int dstY0,
+                 int dstX1, int dstY1,
+                 float z, uint filter )
+{
+   util_blit_pixels_writemask( ctx, src, 
+                               srcX0, srcY0,
+                               srcX1, srcY1,
+                               dst,
+                               dstX0, dstY0,
+                               dstX1, dstY1,
+                               z, filter,
+                               TGSI_WRITEMASK_XYZW );
+}
+
+
 /* Release vertex buffer at end of frame to avoid synchronous
  * rendering.
  */
@@ -535,7 +564,7 @@ util_blit_pixels_tex(struct blit_state *ctx,
    cso_set_sampler_textures(ctx->cso, 1, &tex);
 
    /* shaders */
-   cso_set_fragment_shader_handle(ctx->cso, ctx->fs);
+   cso_set_fragment_shader_handle(ctx->cso, ctx->fs[TGSI_WRITEMASK_XYZW]);
    cso_set_vertex_shader_handle(ctx->cso, ctx->vs);
 
    /* drawing dest */
diff --git a/src/gallium/auxiliary/util/u_blit.h b/src/gallium/auxiliary/util/u_blit.h
index c35bece..a102021 100644
--- a/src/gallium/auxiliary/util/u_blit.h
+++ b/src/gallium/auxiliary/util/u_blit.h
@@ -60,6 +60,17 @@ util_blit_pixels(struct blit_state *ctx,
                  int dstX1, int dstY1,
                  float z, uint filter);
 
+void
+util_blit_pixels_writemask(struct blit_state *ctx,
+                           struct pipe_surface *src,
+                           int srcX0, int srcY0,
+                           int srcX1, int srcY1,
+                           struct pipe_surface *dst,
+                           int dstX0, int dstY0,
+                           int dstX1, int dstY1,
+                           float z, uint filter,
+                           uint writemask);
+
 extern void
 util_blit_pixels_tex(struct blit_state *ctx,
                      struct pipe_texture *tex,
diff --git a/src/gallium/auxiliary/util/u_simple_shaders.c b/src/gallium/auxiliary/util/u_simple_shaders.c
index e519c35..acc5b83 100644
--- a/src/gallium/auxiliary/util/u_simple_shaders.c
+++ b/src/gallium/auxiliary/util/u_simple_shaders.c
@@ -152,11 +152,14 @@ util_make_vertex_passthrough_shader(struct pipe_context *pipe,
 
 /**
  * Make simple fragment texture shader:
- *  TEX OUT[0], IN[0], SAMP[0], 2D;
+ *  IMM {0,0,0,1}                         // (if writemask != 0xf)
+ *  MOV OUT[0], IMM[0]                    // (if writemask != 0xf)
+ *  TEX OUT[0].writemask, IN[0], SAMP[0], 2D;
  *  END;
  */
 void *
-util_make_fragment_tex_shader(struct pipe_context *pipe)
+util_make_fragment_tex_shader_writemask(struct pipe_context *pipe,
+                                        unsigned writemask )
 {
    struct pipe_shader_state shader;
    struct tgsi_token tokens[100];
@@ -217,12 +220,43 @@ util_make_fragment_tex_shader(struct pipe_context *pipe)
                                      header,
                                      Elements(tokens) - ti);
 
+
+   if (writemask != TGSI_WRITEMASK_XYZW) {
+      struct tgsi_full_immediate imm;
+      static const float value[4] = { 0, 0, 0, 1 };
+
+      imm = tgsi_default_full_immediate();
+      imm.Immediate.NrTokens += 4;
+      imm.Immediate.DataType = TGSI_IMM_FLOAT32;
+      imm.u.Pointer = value;
+
+      ti += tgsi_build_full_immediate(&imm,
+                                      &tokens[ti],
+                                      header,
+                                      Elements(tokens) - ti );
+
+      /* MOV instruction */
+      inst = tgsi_default_full_instruction();
+      inst.Instruction.Opcode = TGSI_OPCODE_MOV;
+      inst.Instruction.NumDstRegs = 1;
+      inst.FullDstRegisters[0].DstRegister.File = TGSI_FILE_OUTPUT;
+      inst.FullDstRegisters[0].DstRegister.Index = 0;
+      inst.Instruction.NumSrcRegs = 1;
+      inst.FullSrcRegisters[0].SrcRegister.File = TGSI_FILE_IMMEDIATE;
+      inst.FullSrcRegisters[0].SrcRegister.Index = 0;
+      ti += tgsi_build_full_instruction(&inst,
+                                        &tokens[ti],
+                                        header,
+                                        Elements(tokens) - ti );
+   }
+
    /* TEX instruction */
    inst = tgsi_default_full_instruction();
    inst.Instruction.Opcode = TGSI_OPCODE_TEX;
    inst.Instruction.NumDstRegs = 1;
    inst.FullDstRegisters[0].DstRegister.File = TGSI_FILE_OUTPUT;
    inst.FullDstRegisters[0].DstRegister.Index = 0;
+   inst.FullDstRegisters[0].DstRegister.WriteMask = writemask;
    inst.Instruction.NumSrcRegs = 2;
    inst.InstructionExtTexture.Texture = TGSI_TEXTURE_2D;
    inst.FullSrcRegisters[0].SrcRegister.File = TGSI_FILE_INPUT;
@@ -253,6 +287,13 @@ util_make_fragment_tex_shader(struct pipe_context *pipe)
    return pipe->create_fs_state(pipe, &shader);
 }
 
+void *
+util_make_fragment_tex_shader(struct pipe_context *pipe )
+{
+   return util_make_fragment_tex_shader_writemask( pipe,
+                                                   TGSI_WRITEMASK_XYZW );
+}
+
 
 
 
diff --git a/src/gallium/auxiliary/util/u_simple_shaders.h b/src/gallium/auxiliary/util/u_simple_shaders.h
index 6f8d96a..d2e80d6 100644
--- a/src/gallium/auxiliary/util/u_simple_shaders.h
+++ b/src/gallium/auxiliary/util/u_simple_shaders.h
@@ -50,6 +50,10 @@ util_make_vertex_passthrough_shader(struct pipe_context *pipe,
 
 
 extern void *
+util_make_fragment_tex_shader_writemask(struct pipe_context *pipe, 
+                                        unsigned writemask );
+
+extern void *
 util_make_fragment_tex_shader(struct pipe_context *pipe);
 
 

commit 1d7a989b104f02042fadfeec5bd20654bbb6fea6
Author: Keith Whitwell <keithw@vmware.com>
Date:   Tue Sep 1 11:11:28 2009 +0100

    draw: remove unused variable

diff --git a/src/gallium/auxiliary/draw/draw_pipe.c b/src/gallium/auxiliary/draw/draw_pipe.c
index be2f0f2..3cfae2d 100644
--- a/src/gallium/auxiliary/draw/draw_pipe.c
+++ b/src/gallium/auxiliary/draw/draw_pipe.c
@@ -232,7 +232,6 @@ void draw_pipeline_run( struct draw_context *draw,
                         unsigned count )
 {
    char *verts = (char *)vertices;
-   unsigned i;
 
    draw->pipeline.verts = verts;
    draw->pipeline.vertex_stride = stride;

commit d9b7d7875b0c114d2fa4956b2bffbe809e5b5a44
Author: Brian Paul <brianp@vmware.com>
Date:   Tue Sep 1 08:53:31 2009 -0600

    progs/tests: re-enable exit() call
    
    See bug 21267.

diff --git a/progs/tests/fbotest1.c b/progs/tests/fbotest1.c
index 8dac214..0cd7f95 100644
--- a/progs/tests/fbotest1.c
+++ b/progs/tests/fbotest1.c
@@ -127,7 +127,7 @@ Init( void )
 
    if (!glutExtensionSupported("GL_EXT_framebuffer_object")) {
       printf("GL_EXT_framebuffer_object not found!\n");
-      /*exit(0);*/
+      exit(0);
    }
    printf("GL_RENDERER = %s\n", (char *) glGetString(GL_RENDERER));
 

commit 3f785080db33d437893564dded325452770699be
Author: Brian Paul <brianp@vmware.com>
Date:   Mon Aug 31 17:54:46 2009 -0600

    swrast: fix selection/feedback regression
    
    This fixes a conform selection/feedback regression introduced by commit
    8f4d66c5f893b49eb3973aa3b31a856314c045c7

diff --git a/src/mesa/swrast/s_triangle.c b/src/mesa/swrast/s_triangle.c
index 1d2fed7..1ab0e19 100644
--- a/src/mesa/swrast/s_triangle.c
+++ b/src/mesa/swrast/s_triangle.c
@@ -61,7 +61,7 @@ _swrast_culltriangle( GLcontext *ctx,
    GLfloat fy = v2->attrib[FRAG_ATTRIB_WPOS][1] - v0->attrib[FRAG_ATTRIB_WPOS][1];
    GLfloat c = ex*fy-ey*fx;
 
-   if (c * swrast->_BackfaceSign * swrast->_BackfaceCullSign < 0.0F)
+   if (c * swrast->_BackfaceSign * swrast->_BackfaceCullSign <= 0.0F)
       return GL_FALSE;
 
    return GL_TRUE;

commit fcf0804c05faefd196ed5525c068ee4cd30c5312
Author: Brian Paul <brianp@vmware.com>
Date:   Mon Aug 31 13:28:31 2009 -0600

    swrast: can't use deferred texture/shading if using KIL instruction
    
    If the fragment program uses KIL, we have to execute it before z/stencil
    testing.  Otherwise, deferred texture/shading lets us skip shading for
    pixels that fail z/stencil testing.

diff --git a/src/mesa/swrast/s_context.c b/src/mesa/swrast/s_context.c
index e7c2ace..abf0008 100644
--- a/src/mesa/swrast/s_context.c
+++ b/src/mesa/swrast/s_context.c
@@ -220,6 +220,9 @@ _swrast_update_deferred_texture(GLcontext *ctx)
          /* Z comes from fragment program/shader */
          swrast->_DeferredTexture = GL_FALSE;
       }
+      else if (fprog && fprog->UsesKill) {
+         swrast->_DeferredTexture = GL_FALSE;
+      }
       else if (ctx->Query.CurrentOcclusionObject) {
          /* occlusion query depends on shader discard/kill results */
          swrast->_DeferredTexture = GL_FALSE;

commit 9f36473a8ecc9c3358ae99651f511725344f22cc
Author: Brian Paul <brianp@vmware.com>
Date:   Mon Aug 31 11:17:59 2009 -0600

    mesa: added const qualifiers, move local var

diff --git a/src/mesa/main/texenvprogram.c b/src/mesa/main/texenvprogram.c
index 050a3a9..454d975 100644
--- a/src/mesa/main/texenvprogram.c
+++ b/src/mesa/main/texenvprogram.c
@@ -936,7 +936,7 @@ static struct ureg emit_combine_source( struct texenv_fragment_program *p,
    }
 }
 
-static GLboolean args_match( struct state_key *key, GLuint unit )
+static GLboolean args_match( const struct state_key *key, GLuint unit )
 {
    GLuint i, nr = key->unit[unit].NumArgsRGB;
 
@@ -1096,11 +1096,10 @@ static struct ureg emit_combine( struct texenv_fragment_program *p,
 static struct ureg
 emit_texenv(struct texenv_fragment_program *p, GLuint unit)
 {
-   struct state_key *key = p->state;
+   const struct state_key *key = p->state;
    GLboolean saturate;
    GLuint rgb_shift, alpha_shift;
-   struct ureg out, shift;
-   struct ureg dest;
+   struct ureg out, dest;
 
    if (!key->unit[unit].enabled) {
       return get_source(p, SRC_PREVIOUS, 0);
@@ -1152,7 +1151,6 @@ emit_texenv(struct texenv_fragment_program *p, GLuint unit)
    }
    else if (key->unit[unit].ModeRGB == MODE_DOT3_RGBA_EXT ||
 	    key->unit[unit].ModeRGB == MODE_DOT3_RGBA) {
-
       out = emit_combine( p, dest, WRITEMASK_XYZW, saturate,
 			  unit,
 			  key->unit[unit].NumArgsRGB,
@@ -1178,7 +1176,10 @@ emit_texenv(struct texenv_fragment_program *p, GLuint unit)
    /* Deal with the final shift:
     */
    if (alpha_shift || rgb_shift) {
+      struct ureg shift;
+
       saturate = GL_TRUE;  /* always saturate at this point */
+
       if (rgb_shift == alpha_shift) {
 	 shift = register_scalar_const(p, (GLfloat)(1<<rgb_shift));
       }
@@ -1278,7 +1279,7 @@ static GLboolean load_texenv_source( struct texenv_fragment_program *p,
 static GLboolean
 load_texunit_sources( struct texenv_fragment_program *p, int unit )
 {
-   struct state_key *key = p->state;
+   const struct state_key *key = p->state;
    GLuint i;
 
    for (i = 0; i < key->unit[unit].NumArgsRGB; i++) {
@@ -1298,7 +1299,7 @@ load_texunit_sources( struct texenv_fragment_program *p, int unit )
 static GLboolean
 load_texunit_bumpmap( struct texenv_fragment_program *p, int unit )
 {
-   struct state_key *key = p->state;
+   const struct state_key *key = p->state;
    GLuint bumpedUnitNr = key->unit[unit].OptRGB[1].Source - SRC_TEXTURE0;
    struct ureg texcDst, bumpMapRes;
    struct ureg constdudvcolor = register_const4f(p, 0.0, 0.0, 0.0, 1.0);

commit 2241665dc6d77a992edfc49a9d9d9ed8d1b52e60
Author: Brian Paul <brianp@vmware.com>
Date:   Mon Aug 31 11:14:16 2009 -0600

    mesa: fix saturation logic in emit_texenv()
    
    We need to clamp/saturate after each texenv stage, not just the last one.
    Fixes glean texEnv failure for softpipe (and probably other fragment program-
    based drivers).

diff --git a/src/mesa/main/texenvprogram.c b/src/mesa/main/texenvprogram.c
index 3ff3005..050a3a9 100644
--- a/src/mesa/main/texenvprogram.c
+++ b/src/mesa/main/texenvprogram.c
@@ -1097,7 +1097,7 @@ static struct ureg
 emit_texenv(struct texenv_fragment_program *p, GLuint unit)
 {
    struct state_key *key = p->state;
-   GLboolean saturate = (unit < p->last_tex_stage);
+   GLboolean saturate;
    GLuint rgb_shift, alpha_shift;
    struct ureg out, shift;
    struct ureg dest;
@@ -1125,6 +1125,11 @@ emit_texenv(struct texenv_fragment_program *p, GLuint unit)
       break;
    }
    
+   /* If we'll do rgb/alpha shifting don't saturate in emit_combine().
+    * We don't want to clamp twice.
+    */
+   saturate = !(rgb_shift || alpha_shift);
+
    /* If this is the very last calculation, emit direct to output reg:
     */
    if (key->separate_specular ||
@@ -1173,6 +1178,7 @@ emit_texenv(struct texenv_fragment_program *p, GLuint unit)
    /* Deal with the final shift:
     */
    if (alpha_shift || rgb_shift) {
+      saturate = GL_TRUE;  /* always saturate at this point */
       if (rgb_shift == alpha_shift) {
 	 shift = register_scalar_const(p, (GLfloat)(1<<rgb_shift));
       }

commit 6bf86681f5903a06f98cc32ddf5715706de97c4a
Author: Brian Paul <brianp@vmware.com>
Date:   Mon Aug 31 10:32:56 2009 -0600

    docs: fixed glXCreateGLXPixmap() for direct rendering

diff --git a/docs/relnotes-7.5.1.html b/docs/relnotes-7.5.1.html
index 8ac2e63..320e531 100644
--- a/docs/relnotes-7.5.1.html
+++ b/docs/relnotes-7.5.1.html
@@ -55,6 +55,7 @@ tbd
 <li>Setting arrays of sampler uniforms did not work
 <li>Selection/Feedback mode didn't handle polygon culling correctly (bug 16866)
 <li>Fixed 32/64-bit cross compilation issue in gen_matypes.c
+<li>Fixed glXCreateGLXPixmap() for direct rendering.
 </ul>
 
 

commit f7654faf16431d9749fa9f3a8720b4b7fc5c8445
Author: Brian Paul <brianp@vmware.com>
Date:   Mon Aug 31 10:31:45 2009 -0600

    docs/: document cross-compile fix

diff --git a/docs/relnotes-7.5.1.html b/docs/relnotes-7.5.1.html
index df06302..8ac2e63 100644
--- a/docs/relnotes-7.5.1.html
+++ b/docs/relnotes-7.5.1.html
@@ -54,6 +54,7 @@ tbd
 <li>Fixed Gallium glBitmap() Z position bug
 <li>Setting arrays of sampler uniforms did not work
 <li>Selection/Feedback mode didn't handle polygon culling correctly (bug 16866)
+<li>Fixed 32/64-bit cross compilation issue in gen_matypes.c
 </ul>
 
 

commit a48ee529a256611676884262ced218ad6c05f961
Author: Marc Dietrich <marvin24@gmx.de>
Date:   Mon Aug 31 08:56:33 2009 -0700

    mesa: fix 32bit cross compilation on a 64bit machine
    
    When cross compiling on a 64bit machine, gen_matypes.c is build
    for the host machine (64bit) but must generates code for the target
    machine (32bit). This causes wrong offsets all over the place and
    crashes googleearth on my machine. Solution is to add -m32 when
    cross compiling.
    
    Attached patch is compatible with linux-x86-32 and autoconf based
    builds.

diff --git a/configure.ac b/configure.ac
index 8607ff1..63cc27e 100644
--- a/configure.ac
+++ b/configure.ac
@@ -121,6 +121,7 @@ AC_ARG_ENABLE([32-bit],
 if test "x$enable_32bit" = xyes; then
     if test "x$GCC" = xyes; then
         CFLAGS="$CFLAGS -m32"
+        ARCH_FLAGS="$ARCH_FLAGS -m32"
     fi
     if test "x$GXX" = xyes; then
         CXXFLAGS="$CXXFLAGS -m32"
diff --git a/src/mesa/x86/Makefile b/src/mesa/x86/Makefile
index aa49a91..69122c1 100644
--- a/src/mesa/x86/Makefile
+++ b/src/mesa/x86/Makefile
@@ -21,7 +21,7 @@ clean:
 
 
 gen_matypes: gen_matypes.c
-	$(HOST_CC) $(INCLUDE_DIRS) $(HOST_CFLAGS) gen_matypes.c -o gen_matypes
+	$(HOST_CC) $(ARCH_FLAGS) $(INCLUDE_DIRS) $(HOST_CFLAGS) gen_matypes.c -o gen_matypes
 
 # need some special rules here, unfortunately
 matypes.h: ../main/mtypes.h ../tnl/t_context.h gen_matypes

commit edb117879846155632aaeb66483a3085c7a78815
Author: Michel Dänzer <daenzer@vmware.com>
Date:   Sun Aug 30 12:43:37 2009 +0200

    glx/x11: Fix glXCreateGLXPixmap for direct rendering.
    
    Fixes progs/xdemos/glxpixmap modified to use direct rendering.

diff --git a/src/glx/x11/glxcmds.c b/src/glx/x11/glxcmds.c
index 820d8b9..3242ac7 100644
--- a/src/glx/x11/glxcmds.c
+++ b/src/glx/x11/glxcmds.c
@@ -845,6 +845,34 @@ PUBLIC GLXPixmap glXCreateGLXPixmap(Display *dpy, XVisualInfo *vis,
     req->glxpixmap = xid = XAllocID(dpy);
     UnlockDisplay(dpy);
     SyncHandle();
+
+#ifdef GLX_DIRECT_RENDERING
+    do {
+	/* FIXME: Maybe delay __DRIdrawable creation until the drawable
+	 * is actually bound to a context... */
+
+	__GLXdisplayPrivate *const priv = __glXInitialize(dpy);


Reply to: