summaryrefslogtreecommitdiff
path: root/src/mesa
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa')
-rw-r--r--src/mesa/drivers/dri/intel_winsys/intel_batchbuffer.c12
-rw-r--r--src/mesa/drivers/dri/intel_winsys/intel_pipe_i915simple.c21
2 files changed, 22 insertions, 11 deletions
diff --git a/src/mesa/drivers/dri/intel_winsys/intel_batchbuffer.c b/src/mesa/drivers/dri/intel_winsys/intel_batchbuffer.c
index 80a3163d55..d1fb2907a9 100644
--- a/src/mesa/drivers/dri/intel_winsys/intel_batchbuffer.c
+++ b/src/mesa/drivers/dri/intel_winsys/intel_batchbuffer.c
@@ -72,9 +72,9 @@ intel_dump_batchbuffer(GLuint offset, GLuint * ptr, GLuint count)
{
int i;
fprintf(stderr, "\n\n\nSTART BATCH (%d dwords):\n", count / 4);
- for (i = 0; i < count / 4; i += 4)
- fprintf(stderr, "0x%x:\t0x%08x 0x%08x 0x%08x 0x%08x\n",
- offset + i * 4, ptr[i], ptr[i + 1], ptr[i + 2], ptr[i + 3]);
+ for (i = 0; i < count / 4; i += 1)
+ fprintf(stderr, "\t0x%08x\n",
+ ptr[i]);
fprintf(stderr, "END BATCH\n\n\n");
}
@@ -84,6 +84,12 @@ intel_batchbuffer_reset(struct intel_batchbuffer *batch)
int i;
+ if (batch->map) {
+ driBOUnmap(batch->buffer);
+ batch->map = NULL;
+ }
+
+
/*
* Get a new, free batchbuffer.
*/
diff --git a/src/mesa/drivers/dri/intel_winsys/intel_pipe_i915simple.c b/src/mesa/drivers/dri/intel_winsys/intel_pipe_i915simple.c
index 244e32c885..98d446ba90 100644
--- a/src/mesa/drivers/dri/intel_winsys/intel_pipe_i915simple.c
+++ b/src/mesa/drivers/dri/intel_winsys/intel_pipe_i915simple.c
@@ -171,8 +171,7 @@ static unsigned *intel_i915_batch_start( struct i915_winsys *sws,
if (intel_batchbuffer_space( intel->batch ) >= dwords * 4) {
/* XXX: Hmm, the driver can't really do much with this pointer:
*/
- //return intel->batch->ptr;
- return (unsigned *)~0;
+ return intel->batch->ptr;
}
else
return NULL;
@@ -210,12 +209,6 @@ static void intel_i915_batch_reloc( struct i915_winsys *sws,
delta );
}
-static void intel_i915_batch_flush( struct i915_winsys *sws )
-{
- struct intel_context *intel = intel_i915_winsys(sws)->intel;
-
- intel_batchbuffer_flush( intel->batch );
-}
static void intel_i915_batch_wait_idle( struct i915_winsys *sws )
{
@@ -229,6 +222,18 @@ static void intel_i915_batch_wait_idle( struct i915_winsys *sws )
}
}
+
+static void intel_i915_batch_flush( struct i915_winsys *sws )
+{
+ struct intel_context *intel = intel_i915_winsys(sws)->intel;
+
+ _mesa_printf("%s: start\n");
+ intel_batchbuffer_flush( intel->batch );
+ intel_i915_batch_wait_idle( sws );
+ _mesa_printf("%s: done\n");
+}
+
+
struct pipe_context *
intel_create_i915simple( struct intel_context *intel )
{