{
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");
}
int i;
+ if (batch->map) {
+ driBOUnmap(batch->buffer);
+ batch->map = NULL;
+ }
+
+
/*
* Get a new, free batchbuffer.
*/
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;
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 )
{
}
}
+
+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 )
{