aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/r300/r300_texture.c
diff options
context:
space:
mode:
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 f228220bb54..f3325be87ae 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)
{