summaryrefslogtreecommitdiff
path: root/src/i915_render.c
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2010-05-19 09:30:02 +0100
committerChris Wilson <chris@chris-wilson.co.uk>2010-05-24 09:33:35 +0100
commitdcef703a7cdcf360f12312a338361697acffc3e9 (patch)
tree1ce52897452ddbf7abd6ca82d7adb19f02ecd0f9 /src/i915_render.c
parentbc41f84e01f18548b05c670e1fd0d641adc28d0f (diff)
Kill paranoid assertions on every write into the batchbuffer.
On my PineView box these represent ~5% overhead on x11perf text: Before: 16000000 trep @ 0.0020 msec (495000.0/sec): Char in 80-char aa line (Charter 10) 12000000 trep @ 0.0022 msec (461000.0/sec): Char in 80-char rgb line (Charter 10) After: 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) Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'src/i915_render.c')
-rw-r--r--src/i915_render.c31
1 files changed, 2 insertions, 29 deletions
diff --git a/src/i915_render.c b/src/i915_render.c
index ed7bec5b..87f1ca48 100644
--- a/src/i915_render.c
+++ b/src/i915_render.c
@@ -489,8 +489,6 @@ i915_emit_composite_primitive_constant(PixmapPtr dest,
intel_screen_private *intel = intel_get_screen_private(scrn);
float x, y;
- ATOMIC_BATCH((intel->prim_offset == 0) + 6);
-
if (intel->prim_offset == 0) {
intel->prim_offset = intel->batch_used;
OUT_BATCH(PRIM3D_INLINE | PRIM3D_RECTLIST);
@@ -508,8 +506,6 @@ i915_emit_composite_primitive_constant(PixmapPtr dest,
OUT_BATCH_F(x);
OUT_BATCH_F(y);
-
- ADVANCE_BATCH();
}
static void
@@ -523,8 +519,6 @@ i915_emit_composite_primitive_identity_source(PixmapPtr dest,
intel_screen_private *intel = intel_get_screen_private(scrn);
float dst_x, dst_y, src_x, src_y;
- ATOMIC_BATCH((intel->prim_offset == 0) + 12);
-
if (intel->prim_offset == 0) {
intel->prim_offset = intel->batch_used;
OUT_BATCH(PRIM3D_INLINE | PRIM3D_RECTLIST);
@@ -550,8 +544,6 @@ i915_emit_composite_primitive_identity_source(PixmapPtr dest,
OUT_BATCH_F(dst_y);
OUT_BATCH_F(src_x / intel->scale_units[0][0]);
OUT_BATCH_F(src_y / intel->scale_units[0][1]);
-
- ADVANCE_BATCH();
}
static void
@@ -586,8 +578,6 @@ i915_emit_composite_primitive_affine_source(PixmapPtr dest,
&src_y[2]))
return;
- ATOMIC_BATCH((intel->prim_offset == 0) + 12);
-
if (intel->prim_offset == 0) {
intel->prim_offset = intel->batch_used;
OUT_BATCH(PRIM3D_INLINE | PRIM3D_RECTLIST);
@@ -611,8 +601,6 @@ i915_emit_composite_primitive_affine_source(PixmapPtr dest,
OUT_BATCH_F(y);
OUT_BATCH_F(src_x[0] / intel->scale_units[0][0]);
OUT_BATCH_F(src_y[0] / intel->scale_units[0][1]);
-
- ADVANCE_BATCH();
}
static void
@@ -751,8 +739,6 @@ i915_emit_composite_primitive(PixmapPtr dest,
num_floats = 3 * per_vertex;
- ATOMIC_BATCH(num_floats);
-
intel->prim_count += num_floats;
OUT_BATCH_F(intel->dst_coord_adjust + dstX + w);
@@ -811,8 +797,6 @@ i915_emit_composite_primitive(PixmapPtr dest,
OUT_BATCH_F(mask_w[0]);
}
}
-
- ADVANCE_BATCH();
}
static void i915_emit_composite_setup(ScrnInfoPtr scrn)
@@ -846,14 +830,7 @@ static void i915_emit_composite_setup(ScrnInfoPtr scrn)
tex_count += ! is_solid_src;
tex_count += mask && ! is_solid_mask;
- t = 15;
- if (tex_count)
- t += 6 * tex_count + 4;
- if (is_solid_src)
- t += 2;
- if (mask && is_solid_mask)
- t += 2;
- ATOMIC_BATCH (t);
+ assert(intel->in_batch_atomic);
if (tex_count != 0) {
OUT_BATCH(_3DSTATE_MAP_STATE | (3 * tex_count));
@@ -940,10 +917,8 @@ static void i915_emit_composite_setup(ScrnInfoPtr scrn)
OUT_BATCH(0x00000000);
}
- ADVANCE_BATCH();
-
{
- FS_LOCALS(20);
+ FS_LOCALS();
int src_reg, mask_reg;
FS_BEGIN();
@@ -1076,9 +1051,7 @@ i915_composite(PixmapPtr dest, int srcX, int srcY, int maskX, int maskY,
if (intel->prim_offset == 0) {
intel->prim_offset = intel->batch_used;
- ATOMIC_BATCH(1);
OUT_BATCH(PRIM3D_INLINE | PRIM3D_RECTLIST);
- ADVANCE_BATCH();
}
intel->prim_emit(dest,