i915: Add verbose debuging
authorJakob Bornecrantz <wallbraker@gmail.com>
Wed, 28 Jan 2009 22:24:42 +0000 (23:24 +0100)
committerJakob Bornecrantz <wallbraker@gmail.com>
Wed, 28 Jan 2009 22:28:10 +0000 (23:28 +0100)
Only enabled while in development this commit
will be reverted in the future.

src/gallium/drivers/i915simple/i915_batch.h
src/gallium/winsys/drm/intel/gem/intel_be_batchbuffer.c
src/gallium/winsys/drm/intel/gem/intel_be_context.c

index 45bf4f4028feb6357308fd4e242f497c540699e8..88cfc324fad7b4de0fb297b3744d622a19f42386 100644 (file)
@@ -108,7 +108,8 @@ i915_batchbuffer_flush( struct i915_batchbuffer *batch,
 #define OUT_RELOC( buf, flags, delta ) \
    i915_batchbuffer_reloc( i915->batch, buf, flags, delta )
 
-#define FLUSH_BATCH(fence) do {                        \
+#define FLUSH_BATCH(fence) do {                                \
+   i915_dump_batchbuffer(i915);                                \
    i915->winsys->batch_flush( i915->winsys, fence );   \
    i915->hardware_dirty = ~0;                          \
 } while (0)
index b7bc3ee1c95f1647e6e8ed8f0e5ed5da1f9658f8..6efa68626b6f60a54752af425d577fb6fb2b9753 100644 (file)
@@ -105,10 +105,17 @@ intel_be_batchbuffer_flush(struct intel_be_batchbuffer *batch,
                batch->base.ptr += 8;
        }
 
+       debug_printf("%s\n", __FUNCTION__);
+
        used = batch->base.ptr - batch->base.map;
 
+       debug_printf("   - subdata\n");
        drm_intel_bo_subdata(batch->bo, 0, used, batch->base.map);
+       debug_printf("   - exec\n");
        ret = drm_intel_bo_exec(batch->bo, used, NULL, 0, 0);
+       debug_printf("   - waiting\n");
+       drm_intel_bo_wait_rendering(batch->bo);
+       debug_printf("   - done\n");
 
        assert(ret == 0);
 
index 3e472e1e433cb29a82a5b6d2eff501b841943cba..056a5f050291ea546d75e739cfa64225b11c2071 100644 (file)
@@ -29,15 +29,18 @@ intel_be_batch_reloc(struct i915_winsys *sws,
        }
 
        if (access_flags & I915_BUFFER_ACCESS_READ) {
-               read = I915_GEM_DOMAIN_SAMPLER |
-                      I915_GEM_DOMAIN_VERTEX;
+               read = I915_GEM_DOMAIN_VERTEX;
        }
 
+    debug_printf("%s\n", __FUNCTION__);
+       debug_printf("   - flags: %u, read: %u, write: %u, delta: %p\n", access_flags, read, write, delta);
        ret = intel_be_offset_relocation(intel->batch,
                                         delta,
                                         bo,
                                         read,
                                         write);
+    debug_printf("   - ret = %i\n", ret);
+    assert(ret == 0);
        /* TODO change return type */
        /* return ret; */
 }