Mesa (master): softpipe: fix regression with tex tile cache since integer support.

Dave Airlie airlied at kemper.freedesktop.org
Wed Oct 12 00:25:43 PDT 2011


Module: Mesa
Branch: master
Commit: ae1153c4acfb2d70c2c7c9310ca38413aa68f32a
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=ae1153c4acfb2d70c2c7c9310ca38413aa68f32a

Author: Dave Airlie <airlied at redhat.com>
Date:   Wed Oct 12 08:24:32 2011 +0100

softpipe: fix regression with tex tile cache since integer support.

Don't use the uint/int paths for ZS formats for tex tile cache.

fixes: https://bugs.freedesktop.org/show_bug.cgi?id=41695

Signed-off-by: Dave Airlie <airlied at redhat.com>

---

 src/gallium/drivers/softpipe/sp_tex_tile_cache.c |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/src/gallium/drivers/softpipe/sp_tex_tile_cache.c b/src/gallium/drivers/softpipe/sp_tex_tile_cache.c
index 2e665c9..b2e9238 100644
--- a/src/gallium/drivers/softpipe/sp_tex_tile_cache.c
+++ b/src/gallium/drivers/softpipe/sp_tex_tile_cache.c
@@ -229,6 +229,7 @@ sp_find_cached_tile_tex(struct softpipe_tex_tile_cache *tc,
                         union tex_tile_address addr )
 {
    struct softpipe_tex_cached_tile *tile;
+   boolean zs = util_format_is_depth_or_stencil(tc->format);
 
    tile = tc->entries + tex_cache_pos( addr );
 
@@ -291,7 +292,7 @@ sp_find_cached_tile_tex(struct softpipe_tex_tile_cache *tc,
       /* Get tile from the transfer (view into texture), explicitly passing
        * the image format.
        */
-      if (util_format_is_pure_uint(tc->format)) {
+      if (!zs && util_format_is_pure_uint(tc->format)) {
          pipe_get_tile_ui_format(tc->pipe,
                                  tc->tex_trans,
                                  addr.bits.x * TILE_SIZE,
@@ -300,7 +301,7 @@ sp_find_cached_tile_tex(struct softpipe_tex_tile_cache *tc,
                                  TILE_SIZE,
                                  tc->format,
                                  (unsigned *) tile->data.colorui);
-      } else if (util_format_is_pure_sint(tc->format)) {
+      } else if (!zs && util_format_is_pure_sint(tc->format)) {
          pipe_get_tile_i_format(tc->pipe,
                                 tc->tex_trans,
                                 addr.bits.x * TILE_SIZE,



More information about the mesa-commit mailing list