summaryrefslogtreecommitdiffstats
path: root/src/gallium
diff options
context:
space:
mode:
authorJakob Bornecrantz <[email protected]>2010-07-03 13:04:10 +0100
committerJakob Bornecrantz <[email protected]>2010-07-04 13:32:02 +0100
commit2d818ed0f86b216774dd4663b12aa0bb3119c215 (patch)
treec5a0d9df9f02d0fd69daf9b415ffe14bd30cdb73 /src/gallium
parent34bd0569d37391569970de81dd687d2d94bc293f (diff)
i915g: Add flag to not send commands to hw
Diffstat (limited to 'src/gallium')
-rw-r--r--src/gallium/winsys/i915/drm/i915_drm_batchbuffer.c5
-rw-r--r--src/gallium/winsys/i915/drm/i915_drm_winsys.c1
-rw-r--r--src/gallium/winsys/i915/drm/i915_drm_winsys.h1
3 files changed, 6 insertions, 1 deletions
diff --git a/src/gallium/winsys/i915/drm/i915_drm_batchbuffer.c b/src/gallium/winsys/i915/drm/i915_drm_batchbuffer.c
index febc00e9217..e50e7801c0a 100644
--- a/src/gallium/winsys/i915/drm/i915_drm_batchbuffer.c
+++ b/src/gallium/winsys/i915/drm/i915_drm_batchbuffer.c
@@ -186,7 +186,10 @@ i915_drm_batchbuffer_flush(struct i915_winsys_batchbuffer *ibatch,
#endif
/* Do the sending to HW */
- ret = drm_intel_bo_exec(batch->bo, used, NULL, 0, 0);
+ if (i915_drm_winsys(ibatch->iws)->send_cmd)
+ ret = drm_intel_bo_exec(batch->bo, used, NULL, 0, 0);
+ else
+ ret = 0;
if (ret != 0 || i915_drm_winsys(ibatch->iws)->dump_cmd) {
#ifdef INTEL_MAP_BATCHBUFFER
diff --git a/src/gallium/winsys/i915/drm/i915_drm_winsys.c b/src/gallium/winsys/i915/drm/i915_drm_winsys.c
index 83651b4c47c..d5916454265 100644
--- a/src/gallium/winsys/i915/drm/i915_drm_winsys.c
+++ b/src/gallium/winsys/i915/drm/i915_drm_winsys.c
@@ -71,6 +71,7 @@ i915_drm_winsys_create(int drmFD)
drm_intel_bufmgr_gem_enable_reuse(idws->pools.gem);
idws->dump_cmd = debug_get_bool_option("INTEL_DUMP_CMD", FALSE);
+ idws->send_cmd = !debug_get_bool_option("INTEL_NO_HW", FALSE);
return &idws->base;
}
diff --git a/src/gallium/winsys/i915/drm/i915_drm_winsys.h b/src/gallium/winsys/i915/drm/i915_drm_winsys.h
index 1b93ddc734c..88a71f2424d 100644
--- a/src/gallium/winsys/i915/drm/i915_drm_winsys.h
+++ b/src/gallium/winsys/i915/drm/i915_drm_winsys.h
@@ -18,6 +18,7 @@ struct i915_drm_winsys
struct i915_winsys base;
boolean dump_cmd;
+ boolean send_cmd;
int fd; /**< Drm file discriptor */