summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/gallium/drivers/i915simple/i915_batch.h3
-rw-r--r--src/gallium/winsys/drm/intel/gem/intel_be_batchbuffer.c7
-rw-r--r--src/gallium/winsys/drm/intel/gem/intel_be_context.c7
3 files changed, 14 insertions, 3 deletions
diff --git a/src/gallium/drivers/i915simple/i915_batch.h b/src/gallium/drivers/i915simple/i915_batch.h
index 45bf4f4028..88cfc324fa 100644
--- a/src/gallium/drivers/i915simple/i915_batch.h
+++ b/src/gallium/drivers/i915simple/i915_batch.h
@@ -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)
diff --git a/src/gallium/winsys/drm/intel/gem/intel_be_batchbuffer.c b/src/gallium/winsys/drm/intel/gem/intel_be_batchbuffer.c
index b7bc3ee1c9..6efa68626b 100644
--- a/src/gallium/winsys/drm/intel/gem/intel_be_batchbuffer.c
+++ b/src/gallium/winsys/drm/intel/gem/intel_be_batchbuffer.c
@@ -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);
diff --git a/src/gallium/winsys/drm/intel/gem/intel_be_context.c b/src/gallium/winsys/drm/intel/gem/intel_be_context.c
index 3e472e1e43..056a5f0502 100644
--- a/src/gallium/winsys/drm/intel/gem/intel_be_context.c
+++ b/src/gallium/winsys/drm/intel/gem/intel_be_context.c
@@ -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; */
}