summaryrefslogtreecommitdiff
path: root/src/i915_render.c
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2010-05-19 10:57:46 +0100
committerChris Wilson <chris@chris-wilson.co.uk>2010-05-24 09:33:37 +0100
commit2b050f330f78d02e7f476e55be29d760271ac61c (patch)
tree7bbaf0b6aa581373e4a212498f11e949aa86d612 /src/i915_render.c
parentdcef703a7cdcf360f12312a338361697acffc3e9 (diff)
Use pwrite to upload the batch buffer
By using pwrite() instead of dri_bo_map() we can write to the batch buffer through the GTT and not be forced to map it back into the CPU domain and out again, eliminating a double clflush. Measing x11perf text performance on PineView: Before: 16000000 trep @ 0.0020 msec (511000.0/sec): Char in 80-char aa line (Charter 10) 16000000 trep @ 0.0021 msec (480000.0/sec): Char in 80-char rgb line (Charter 10) After: 16000000 trep @ 0.0019 msec (532000.0/sec): Char in 80-char aa line (Charter 10) 16000000 trep @ 0.0020 msec (496000.0/sec): Char in 80-char rgb line (Charter 10) Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'src/i915_render.c')
-rw-r--r--src/i915_render.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/i915_render.c b/src/i915_render.c
index 87f1ca48..de68c5c4 100644
--- a/src/i915_render.c
+++ b/src/i915_render.c
@@ -1067,7 +1067,7 @@ void
i915_vertex_flush(intel_screen_private *intel)
{
if (intel->prim_offset) {
- *(uint32_t *) (intel->batch_ptr + intel->prim_offset) |= intel->prim_count - 1;
+ intel->batch_ptr[intel->prim_offset] |= intel->prim_count - 1;
intel->prim_offset = 0;
}
}