aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/softpipe
diff options
context:
space:
mode:
authorMichal Krol <[email protected]>2010-03-10 16:32:34 +0100
committerMichal Krol <[email protected]>2010-03-10 16:32:34 +0100
commit5d4360d10cd39e28ee3b563e95959f3dd22c5242 (patch)
tree317e6cbd2278ba25b6f9e907f2410f9c7e63fd2c /src/gallium/drivers/softpipe
parent3ce4375912c8ea488460e593e07c5bb15b92dca9 (diff)
gallium: pipe_get_tile_swizzle() accepts format parameter.
Enables casting of texture data.
Diffstat (limited to 'src/gallium/drivers/softpipe')
-rw-r--r--src/gallium/drivers/softpipe/sp_tex_tile_cache.c2
-rw-r--r--src/gallium/drivers/softpipe/sp_tex_tile_cache.h1
2 files changed, 3 insertions, 0 deletions
diff --git a/src/gallium/drivers/softpipe/sp_tex_tile_cache.c b/src/gallium/drivers/softpipe/sp_tex_tile_cache.c
index b9635bee78b..dfa002a79b4 100644
--- a/src/gallium/drivers/softpipe/sp_tex_tile_cache.c
+++ b/src/gallium/drivers/softpipe/sp_tex_tile_cache.c
@@ -150,6 +150,7 @@ sp_tex_tile_cache_set_sampler_view(struct softpipe_tex_tile_cache *tc,
tc->swizzle_g = view->swizzle_g;
tc->swizzle_b = view->swizzle_b;
tc->swizzle_a = view->swizzle_a;
+ tc->format = view->format;
}
/* mark as entries as invalid/empty */
@@ -274,6 +275,7 @@ sp_find_cached_tile_tex(struct softpipe_tex_tile_cache *tc,
tc->swizzle_g,
tc->swizzle_b,
tc->swizzle_a,
+ tc->format,
(float *) tile->data.color);
tile->addr = addr;
}
diff --git a/src/gallium/drivers/softpipe/sp_tex_tile_cache.h b/src/gallium/drivers/softpipe/sp_tex_tile_cache.h
index c562f721be7..f8770409d87 100644
--- a/src/gallium/drivers/softpipe/sp_tex_tile_cache.h
+++ b/src/gallium/drivers/softpipe/sp_tex_tile_cache.h
@@ -87,6 +87,7 @@ struct softpipe_tex_tile_cache
unsigned swizzle_g;
unsigned swizzle_b;
unsigned swizzle_a;
+ unsigned format;
struct softpipe_tex_cached_tile *last_tile; /**< most recently retrieved tile */
};