summaryrefslogtreecommitdiff
path: root/src/gallium/drivers/r600/r600_texture.c
diff options
context:
space:
mode:
authorDave Airlie <airlied@redhat.com>2010-10-21 13:40:45 +1000
committerDave Airlie <airlied@redhat.com>2010-10-21 13:40:45 +1000
commit089aa0ba247cee908ae689f8e4f3ffc457ce7627 (patch)
treef17b122d71dc085dfa727ca9111d90bfe51b00f6 /src/gallium/drivers/r600/r600_texture.c
parentcdd14668b67d80729c0bb6480dc2317ac4e1cbb9 (diff)
r600g: add texture tiling enable under a debug option.
At the moment you need kernel patches to have texture tiling work with the kernel CS checker, so once they are upstream and the drm version is bumped we can make this enable flip the other way most likely.
Diffstat (limited to 'src/gallium/drivers/r600/r600_texture.c')
-rw-r--r--src/gallium/drivers/r600/r600_texture.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/gallium/drivers/r600/r600_texture.c b/src/gallium/drivers/r600/r600_texture.c
index d7ac74c0f1..4ebd5b754b 100644
--- a/src/gallium/drivers/r600/r600_texture.c
+++ b/src/gallium/drivers/r600/r600_texture.c
@@ -307,6 +307,13 @@ struct pipe_resource *r600_texture_create(struct pipe_screen *screen,
{
unsigned array_mode = 0;
+ if (debug_get_bool_option("R600_FORCE_TILING", FALSE)) {
+ if (!(templ->flags & R600_RESOURCE_FLAG_TRANSFER) &&
+ !(templ->bind & PIPE_BIND_SCANOUT)) {
+ array_mode = V_038000_ARRAY_2D_TILED_THIN1;
+ }
+ }
+
return (struct pipe_resource *)r600_texture_create_object(screen, templ, array_mode,
0, 0, NULL);