summaryrefslogtreecommitdiff
path: root/src/gallium/drivers/softpipe/sp_tex_tile_cache.c
diff options
context:
space:
mode:
authorBrian Paul <brianp@vmware.com>2010-12-14 13:01:00 -0700
committerBrian Paul <brianp@vmware.com>2010-12-14 13:01:03 -0700
commitc62bb90d6a864468fe1a717aebb9c1a9c43bf3c8 (patch)
tree22fef0c50d5e49f8dcf379b224ecf2c023c99492 /src/gallium/drivers/softpipe/sp_tex_tile_cache.c
parentbe2aa81f5f8f44be8c9c8854098d29635352c4f8 (diff)
softpipe: do texture swizzle during texture sampling
Instead of when we read texture tiles. Now swizzling happens after the shadow depth compare step. This fixes the piglit glsl-fs-shadow2d* tests (except for proj+bias because of a GLSL bug).
Diffstat (limited to 'src/gallium/drivers/softpipe/sp_tex_tile_cache.c')
-rw-r--r--src/gallium/drivers/softpipe/sp_tex_tile_cache.c20
1 files changed, 8 insertions, 12 deletions
diff --git a/src/gallium/drivers/softpipe/sp_tex_tile_cache.c b/src/gallium/drivers/softpipe/sp_tex_tile_cache.c
index 1393164150..e5708a1c88 100644
--- a/src/gallium/drivers/softpipe/sp_tex_tile_cache.c
+++ b/src/gallium/drivers/softpipe/sp_tex_tile_cache.c
@@ -279,18 +279,14 @@ sp_find_cached_tile_tex(struct softpipe_tex_tile_cache *tc,
}
/* get tile from the transfer (view into texture) */
- pipe_get_tile_swizzle(tc->pipe,
- tc->tex_trans,
- addr.bits.x * TILE_SIZE,
- addr.bits.y * TILE_SIZE,
- TILE_SIZE,
- TILE_SIZE,
- tc->swizzle_r,
- tc->swizzle_g,
- tc->swizzle_b,
- tc->swizzle_a,
- tc->format,
- (float *) tile->data.color);
+ pipe_get_tile_rgba(tc->pipe,
+ tc->tex_trans,
+ addr.bits.x * TILE_SIZE,
+ addr.bits.y * TILE_SIZE,
+ TILE_SIZE,
+ TILE_SIZE,
+ (float *) tile->data.color);
+
tile->addr = addr;
}