intel: use pwrite for batch

It's faster. Not only is the memcpy more efficiently performed in the
kernel (making up for the system call overhead), but by not using mmap
we remove the greater overhead of tracking the vma of every batch.

And it means we can read back from the batch buffer without incurring
the cost of a uncached read through the GTT.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
This commit is contained in:
Chris Wilson
2011-02-10 20:25:51 +00:00
parent 3f55683927
commit 8d68a90e22
27 changed files with 219 additions and 302 deletions

View File

@@ -580,7 +580,7 @@ intel_finish_render_texture(struct gl_context * ctx,
* batch. Once again, we wish for a domain tracker in libdrm to cover
* usage inside of a batchbuffer like GEM does in the kernel.
*/
intel_batchbuffer_emit_mi_flush(intel->batch);
intel_batchbuffer_emit_mi_flush(intel);
}
/**