aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/r300
diff options
context:
space:
mode:
authorDave Airlie <[email protected]>2010-04-03 21:52:09 +1000
committerDave Airlie <[email protected]>2010-04-03 21:54:49 +1000
commit4c26cdbe01619abad413b09317f2842dcf1a4d57 (patch)
tree36f99826c58411e1b02c94b4864f325887486aa2 /src/gallium/drivers/r300
parentf618867645b3ce2570958bfacc1faf8c88e7a620 (diff)
r300g: fix color tiling for buffer from X server.
The tiling setup needs a bit of work, but this should be good enough for now, when we get buffers from the kernel we need to store their tiling properties. Signed-off-by: Dave Airlie <[email protected]>
Diffstat (limited to 'src/gallium/drivers/r300')
-rw-r--r--src/gallium/drivers/r300/r300_texture.c1
-rw-r--r--src/gallium/drivers/r300/r300_winsys.h5
2 files changed, 6 insertions, 0 deletions
diff --git a/src/gallium/drivers/r300/r300_texture.c b/src/gallium/drivers/r300/r300_texture.c
index e7bac615dff..a9c9e14ba7c 100644
--- a/src/gallium/drivers/r300/r300_texture.c
+++ b/src/gallium/drivers/r300/r300_texture.c
@@ -909,6 +909,7 @@ static struct pipe_texture*
/* one ref already taken */
tex->buffer = buffer;
+ rws->buffer_get_tiling(rws, buffer, &tex->microtile, &tex->macrotile);
return (struct pipe_texture*)tex;
}
diff --git a/src/gallium/drivers/r300/r300_winsys.h b/src/gallium/drivers/r300/r300_winsys.h
index acfa5dbeb9c..d8d0c609d25 100644
--- a/src/gallium/drivers/r300/r300_winsys.h
+++ b/src/gallium/drivers/r300/r300_winsys.h
@@ -146,6 +146,11 @@ struct r300_winsys_screen {
void (*reset_bos)(struct r300_winsys_screen *winsys);
+ void (*buffer_get_tiling)(struct r300_winsys_screen *winsys,
+ struct r300_winsys_buffer *buffer,
+ enum r300_buffer_tiling *microtiled,
+ enum r300_buffer_tiling *macrotiled);
+
void (*buffer_set_tiling)(struct r300_winsys_screen *winsys,
struct r300_winsys_buffer *buffer,
uint32_t pitch,