summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/radeon
diff options
context:
space:
mode:
authorMarek Olšák <[email protected]>2015-08-02 16:22:43 +0200
committerMarek Olšák <[email protected]>2015-08-10 18:26:44 +0200
commit7e5d56394bd53607d0158b49f36ac1428acb7954 (patch)
treee089fd1872feaf78d72b577371d271cda029c0bb /src/gallium/drivers/radeon
parent7bfe8cf4a487aec4870df23f6f72c828f1caaa49 (diff)
gallium/radeon: add a debug flag not to use write combining (v2)
v2: just clear the flag before the allocation Reviewed-by: Michel Dänzer <[email protected]>
Diffstat (limited to 'src/gallium/drivers/radeon')
-rw-r--r--src/gallium/drivers/radeon/r600_buffer_common.c3
-rw-r--r--src/gallium/drivers/radeon/r600_pipe_common.c1
-rw-r--r--src/gallium/drivers/radeon/r600_pipe_common.h1
3 files changed, 5 insertions, 0 deletions
diff --git a/src/gallium/drivers/radeon/r600_buffer_common.c b/src/gallium/drivers/radeon/r600_buffer_common.c
index 5b5c06362a7..0f788b7e23c 100644
--- a/src/gallium/drivers/radeon/r600_buffer_common.c
+++ b/src/gallium/drivers/radeon/r600_buffer_common.c
@@ -161,6 +161,9 @@ bool r600_init_resource(struct r600_common_screen *rscreen,
flags |= RADEON_FLAG_NO_CPU_ACCESS;
}
+ if (rscreen->debug_flags & DBG_NO_WC)
+ flags &= ~RADEON_FLAG_GTT_WC;
+
/* Allocate a new resource. */
new_buf = rscreen->ws->buffer_create(rscreen->ws, size, alignment,
use_reusable_pool,
diff --git a/src/gallium/drivers/radeon/r600_pipe_common.c b/src/gallium/drivers/radeon/r600_pipe_common.c
index 3f1c0f0eae9..c9b89295e83 100644
--- a/src/gallium/drivers/radeon/r600_pipe_common.c
+++ b/src/gallium/drivers/radeon/r600_pipe_common.c
@@ -355,6 +355,7 @@ static const struct debug_named_value common_debug_options[] = {
{ "switch_on_eop", DBG_SWITCH_ON_EOP, "Program WD/IA to switch on end-of-packet." },
{ "forcedma", DBG_FORCE_DMA, "Use asynchronous DMA for all operations when possible." },
{ "precompile", DBG_PRECOMPILE, "Compile one shader variant at shader creation." },
+ { "nowc", DBG_NO_WC, "Disable GTT write combining" },
DEBUG_NAMED_VALUE_END /* must be last */
};
diff --git a/src/gallium/drivers/radeon/r600_pipe_common.h b/src/gallium/drivers/radeon/r600_pipe_common.h
index ce3f396011f..85ac22f3c7e 100644
--- a/src/gallium/drivers/radeon/r600_pipe_common.h
+++ b/src/gallium/drivers/radeon/r600_pipe_common.h
@@ -97,6 +97,7 @@
#define DBG_FORCE_DMA (1llu << 38)
#define DBG_PRECOMPILE (1llu << 39)
#define DBG_INFO (1llu << 40)
+#define DBG_NO_WC (1llu << 41)
#define R600_MAP_BUFFER_ALIGNMENT 64