summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMarek Olšák <[email protected]>2012-12-21 19:15:20 +0100
committerMarek Olšák <[email protected]>2012-12-21 23:42:23 +0100
commit9b0b4cf05840fd8dcc4973524166024f948a97ec (patch)
treef26ee909822a793a8d441c077091336719bd96c9 /src
parenteccc74f5d3d1fe4cd6c41361519345564d93027a (diff)
winsys/radeon: the env var RADEON_NOOP can be used to skip CS ioctls
Diffstat (limited to 'src')
-rw-r--r--src/gallium/winsys/radeon/drm/radeon_drm_cs.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/gallium/winsys/radeon/drm/radeon_drm_cs.c b/src/gallium/winsys/radeon/drm/radeon_drm_cs.c
index c6498ef7230..f9be96186e6 100644
--- a/src/gallium/winsys/radeon/drm/radeon_drm_cs.c
+++ b/src/gallium/winsys/radeon/drm/radeon_drm_cs.c
@@ -432,6 +432,8 @@ void radeon_drm_cs_sync_flush(struct radeon_drm_cs *cs)
}
}
+DEBUG_GET_ONCE_BOOL_OPTION(noop, "RADEON_NOOP", FALSE)
+
static void radeon_drm_cs_flush(struct radeon_winsys_cs *rcs, unsigned flags)
{
struct radeon_drm_cs *cs = radeon_drm_cs(rcs);
@@ -449,7 +451,8 @@ static void radeon_drm_cs_flush(struct radeon_winsys_cs *rcs, unsigned flags)
cs->cst = tmp;
/* If the CS is not empty or overflowed, emit it in a separate thread. */
- if (cs->base.cdw && cs->base.cdw <= RADEON_MAX_CMDBUF_DWORDS) {
+ if (cs->base.cdw && cs->base.cdw <= RADEON_MAX_CMDBUF_DWORDS &&
+ !debug_get_option_noop()) {
unsigned i, crelocs = cs->cst->crelocs;
cs->cst->chunks[0].length_dw = cs->base.cdw;