aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/r600
diff options
context:
space:
mode:
authorKeith Whitwell <[email protected]>2010-11-03 10:31:55 +0000
committerKeith Whitwell <[email protected]>2010-11-03 10:55:22 +0000
commitee07e0e39ad1c4d13d540b23220fecc564d07b16 (patch)
tree3403acd42bb0b9bd2c816d0e34510d0d18f657ca /src/gallium/drivers/r600
parentb3462601cb69f277b9aafc2ee5179a0c2cf6cbcd (diff)
r600g: don't call debug_get_bool_option for tiling more than once
Diffstat (limited to 'src/gallium/drivers/r600')
-rw-r--r--src/gallium/drivers/r600/r600_texture.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/gallium/drivers/r600/r600_texture.c b/src/gallium/drivers/r600/r600_texture.c
index c92f6340047..a63990fbffe 100644
--- a/src/gallium/drivers/r600/r600_texture.c
+++ b/src/gallium/drivers/r600/r600_texture.c
@@ -306,8 +306,14 @@ struct pipe_resource *r600_texture_create(struct pipe_screen *screen,
const struct pipe_resource *templ)
{
unsigned array_mode = 0;
+ static int force_tiling = -1;
- if (debug_get_bool_option("R600_FORCE_TILING", FALSE)) {
+ /* Would like some magic "get_bool_option_once" routine.
+ */
+ if (force_tiling == -1)
+ force_tiling = debug_get_bool_option("R600_FORCE_TILING", FALSE);
+
+ if (force_tiling) {
if (!(templ->flags & R600_RESOURCE_FLAG_TRANSFER) &&
!(templ->bind & PIPE_BIND_SCANOUT)) {
array_mode = V_038000_ARRAY_2D_TILED_THIN1;