summaryrefslogtreecommitdiff
path: root/src/i830_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/i830_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/i830_render.c')
-rw-r--r--src/i830_render.c12
1 files changed, 3 insertions, 9 deletions
diff --git a/src/i830_render.c b/src/i830_render.c
index d3bc18e2..b0413c58 100644
--- a/src/i830_render.c
+++ b/src/i830_render.c
@@ -302,7 +302,8 @@ static void i830_texture_setup(PicturePtr picture, PixmapPtr pixmap, int unit)
format = i8xx_get_card_format(intel, picture);
- ATOMIC_BATCH(10);
+ assert(intel->in_batch_atomic);
+
OUT_BATCH(_3DSTATE_LOAD_STATE_IMMEDIATE_2 |
LOAD_TEXTURE_MAP(unit) | 4);
OUT_RELOC_PIXMAP(pixmap, I915_GEM_DOMAIN_SAMPLER, 0, 0);
@@ -336,7 +337,6 @@ static void i830_texture_setup(PicturePtr picture, PixmapPtr pixmap, int unit)
ENABLE_TEX_STREAM_COORD_SET |
TEX_STREAM_COORD_SET(unit) |
ENABLE_TEX_STREAM_MAP_IDX | TEX_STREAM_MAP_IDX(unit));
- ADVANCE_BATCH();
}
Bool
@@ -549,7 +549,7 @@ static void i830_emit_composite_state(ScrnInfoPtr scrn)
IntelEmitInvarientState(scrn);
intel->last_3d = LAST_3D_RENDER;
- ATOMIC_BATCH(21);
+ assert(intel->in_batch_atomic);
if (i830_pixmap_tiled(intel->render_dest)) {
tiling_bits = BUF_3D_TILED_SURFACE;
@@ -615,8 +615,6 @@ static void i830_emit_composite_state(ScrnInfoPtr scrn)
}
OUT_BATCH(_3DSTATE_VERTEX_FORMAT_2_CMD | texcoordfmt);
- ADVANCE_BATCH();
-
i830_texture_setup(intel->render_source_picture, intel->render_source, 0);
if (intel->render_mask) {
i830_texture_setup(intel->render_mask_picture,
@@ -756,8 +754,6 @@ i830_emit_composite_primitive(PixmapPtr dest,
num_floats = 3 * per_vertex;
- ATOMIC_BATCH(1 + num_floats);
-
OUT_BATCH(PRIM3D_INLINE | PRIM3D_RECTLIST | (num_floats - 1));
OUT_BATCH_F(dstX + w);
OUT_BATCH_F(dstY + h);
@@ -803,8 +799,6 @@ i830_emit_composite_primitive(PixmapPtr dest,
OUT_BATCH_F(mask_w[0]);
}
}
-
- ADVANCE_BATCH();
}
/**