summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2009-09-05 09:03:56 +0100
committerChris Wilson <chris@chris-wilson.co.uk>2009-09-05 11:06:11 +0100
commit8863706e25a73f68993d946e2f1c1040bae0f9c5 (patch)
treed5c741ae1077f0330ddcf7be4b795443940bdb7c
parenta9b12111f9787950ad6b8f295a70a872c5933c93 (diff)
i830: Trim composite setup
Remove a couple of redundant NOOPs from the setup and correct the required space checking for atomic batch operation.
-rw-r--r--src/i830_render.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/i830_render.c b/src/i830_render.c
index 5046ad4f..ada2c1f1 100644
--- a/src/i830_render.c
+++ b/src/i830_render.c
@@ -529,14 +529,13 @@ i830_emit_composite_state(ScrnInfoPtr pScrn)
IntelEmitInvarientState(pScrn);
pI830->last_3d = LAST_3D_RENDER;
- BEGIN_BATCH(24);
+ BEGIN_BATCH(22);
OUT_BATCH(_3DSTATE_BUF_INFO_CMD);
OUT_BATCH(BUF_3D_ID_COLOR_BACK| BUF_3D_USE_FENCE |
BUF_3D_PITCH(intel_get_pixmap_pitch(pI830->render_dst)));
OUT_RELOC_PIXMAP(pI830->render_dst,
I915_GEM_DOMAIN_RENDER, I915_GEM_DOMAIN_RENDER, 0);
- OUT_BATCH(MI_NOOP);
OUT_BATCH(_3DSTATE_DST_BUF_VARS_CMD);
OUT_BATCH(pI830->render_dst_format);
@@ -550,20 +549,21 @@ i830_emit_composite_state(ScrnInfoPtr pScrn)
OUT_BATCH(_3DSTATE_LOAD_STATE_IMMEDIATE_1 |
I1_LOAD_S(2) |
- I1_LOAD_S(3) | 1);
+ I1_LOAD_S(3) |
+ I1_LOAD_S(8) |
+ 2);
if (pI830->render_mask)
vf2 = 2 << 12; /* 2 texture coord sets */
else
vf2 = 1 << 12;
OUT_BATCH(vf2); /* TEXCOORDFMT_2D */
OUT_BATCH(S3_CULLMODE_NONE | S3_VERTEXHAS_XY);
-
- OUT_BATCH(_3DSTATE_INDPT_ALPHA_BLEND_CMD | DISABLE_INDPT_ALPHA_BLEND);
- OUT_BATCH(MI_NOOP);
- OUT_BATCH(_3DSTATE_LOAD_STATE_IMMEDIATE_1 | I1_LOAD_S(8) | 0);
OUT_BATCH(S8_ENABLE_COLOR_BLEND | S8_BLENDFUNC_ADD | pI830->s8_blendctl |
S8_ENABLE_COLOR_BUFFER_WRITE);
+ OUT_BATCH(_3DSTATE_INDPT_ALPHA_BLEND_CMD | DISABLE_INDPT_ALPHA_BLEND);
+ OUT_BATCH(0);
+
OUT_BATCH(_3DSTATE_LOAD_STATE_IMMEDIATE_2 |
LOAD_TEXTURE_BLEND_STAGE(0)|1);
OUT_BATCH(pI830->cblend);
@@ -745,9 +745,9 @@ i830_composite(PixmapPtr pDst, int srcX, int srcY, int maskX, int maskY,
intel_batch_start_atomic(pScrn,
58 + /* invarient */
- 24 + /* setup */
+ 22 + /* setup */
20 + /* 2 * setup_texture */
- 6 + 30 /* verts */);
+ 1 + 30 /* verts */);
if (pI830->needs_render_state_emit)
i830_emit_composite_state(pScrn);