summaryrefslogtreecommitdiff
path: root/src/gallium/drivers/r300/r300_texture.c
diff options
context:
space:
mode:
authorMarek Olšák <maraeo@gmail.com>2010-02-14 04:57:03 +0100
committerMarek Olšák <maraeo@gmail.com>2010-02-14 18:15:13 +0100
commitf22ddd8e4743dbbfea2fac6c54837b30cbb1eb0e (patch)
tree6183b6b15cad19ea0661e05dabf9dc09f8544acc /src/gallium/drivers/r300/r300_texture.c
parent2523172a5e9b60a1075ed0b67b9c6935d8feeeb7 (diff)
r300g: accelerate blitting for all formats by faking the texture format
Diffstat (limited to 'src/gallium/drivers/r300/r300_texture.c')
-rw-r--r--src/gallium/drivers/r300/r300_texture.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/gallium/drivers/r300/r300_texture.c b/src/gallium/drivers/r300/r300_texture.c
index f228220bb5..f3325be87a 100644
--- a/src/gallium/drivers/r300/r300_texture.c
+++ b/src/gallium/drivers/r300/r300_texture.c
@@ -85,6 +85,20 @@ static void r300_setup_texture_state(struct r300_screen* screen, struct r300_tex
pt->width0, pt->height0, pt->last_level);
}
+void r300_texture_reinterpret_format(struct pipe_screen *screen,
+ struct pipe_texture *tex,
+ enum pipe_format new_format)
+{
+ struct r300_screen *r300screen = r300_screen(screen);
+
+ SCREEN_DBG(r300screen, DBG_TEX, "r300: Reinterpreting format: %s -> %s\n",
+ util_format_name(tex->format), util_format_name(new_format));
+
+ tex->format = new_format;
+
+ r300_setup_texture_state(r300_screen(screen), (struct r300_texture*)tex);
+}
+
unsigned r300_texture_get_offset(struct r300_texture* tex, unsigned level,
unsigned zslice, unsigned face)
{