Mesa (master): intel: Upload batchbuffer contents even if INTEL_NO_HW is set.

Eric Anholt anholt at kemper.freedesktop.org
Fri Sep 2 19:18:31 UTC 2011


Module: Mesa
Branch: master
Commit: 7fdbedac14637b5e8990cb639bd4ddae28c46994
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=7fdbedac14637b5e8990cb639bd4ddae28c46994

Author: Eric Anholt <eric at anholt.net>
Date:   Tue Aug 30 17:36:57 2011 -0700

intel: Upload batchbuffer contents even if INTEL_NO_HW is set.

It is useful for debugging to dump batchbuffers while not actually
executing them.

---

 src/mesa/drivers/dri/intel/intel_batchbuffer.c |   16 ++++++++--------
 1 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/src/mesa/drivers/dri/intel/intel_batchbuffer.c b/src/mesa/drivers/dri/intel/intel_batchbuffer.c
index db4343b..21dd27c 100644
--- a/src/mesa/drivers/dri/intel/intel_batchbuffer.c
+++ b/src/mesa/drivers/dri/intel/intel_batchbuffer.c
@@ -105,6 +105,14 @@ do_flush_locked(struct intel_context *intel)
    struct intel_batchbuffer *batch = &intel->batch;
    int ret = 0;
 
+   ret = drm_intel_bo_subdata(batch->bo, 0, 4*batch->used, batch->map);
+   if (ret == 0 && batch->state_batch_offset != batch->bo->size) {
+      ret = drm_intel_bo_subdata(batch->bo,
+				 batch->state_batch_offset,
+				 batch->bo->size - batch->state_batch_offset,
+				 (char *)batch->map + batch->state_batch_offset);
+   }
+
    if (!intel->intelScreen->no_hw) {
       int ring;
 
@@ -114,14 +122,6 @@ do_flush_locked(struct intel_context *intel)
 	 ring = I915_EXEC_BLT;
       }
 
-      ret = drm_intel_bo_subdata(batch->bo, 0, 4*batch->used, batch->map);
-      if (ret == 0 && batch->state_batch_offset != batch->bo->size) {
-	 ret = drm_intel_bo_subdata(batch->bo,
-				    batch->state_batch_offset,
-				    batch->bo->size - batch->state_batch_offset,
-				    (char *)batch->map + batch->state_batch_offset);
-      }
-
       if (ret == 0)
 	 ret = drm_intel_bo_mrb_exec(batch->bo, 4*batch->used, NULL, 0, 0, ring);
    }




More information about the mesa-commit mailing list