diff options
author | Eric Anholt <eric@anholt.net> | 2007-06-11 17:33:07 -0700 |
---|---|---|
committer | Eric Anholt <eric@anholt.net> | 2007-06-12 08:43:39 -0700 |
commit | 8d7a0ccd4f674659eb781def2cfdc3a6e5a219ce (patch) | |
tree | d81f31cfa809d4e80683d912e3d64cc2cb668f1e /src/i915_video.c | |
parent | 15caa64a497dcc0eacb0f91166d9b70206a8db35 (diff) |
Clean up some nits in i915_video.c setup.
- The screen dimensions were used for the clipping despite drawing being done
to any pixmap, not necessarily the screen.
- One piece of state setup was not documented anywhere, and isn't used in other
3d hardware paths that also work.
- A 3DSTATE_MODES_1 command (830-class only) was issued even though it no
longer exists.
Diffstat (limited to 'src/i915_video.c')
-rw-r--r-- | src/i915_video.c | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/src/i915_video.c b/src/i915_video.c index e837097d..e4e0f1a4 100644 --- a/src/i915_video.c +++ b/src/i915_video.c @@ -83,7 +83,7 @@ I915DisplayVideoTextured(ScrnInfoPtr pScrn, I830PortPrivPtr pPriv, int id, pI830->last_3d = LAST_3D_VIDEO; - BEGIN_LP_RING(24); + BEGIN_LP_RING(20); /* flush map & render cache */ OUT_RING(MI_FLUSH | MI_WRITE_DIRTY_STATE | MI_INVALIDATE_MAP_CACHE); @@ -94,16 +94,11 @@ I915DisplayVideoTextured(ScrnInfoPtr pScrn, I830PortPrivPtr pPriv, int id, OUT_RING(DRAW_DITHER_OFS_X(pPixmap->drawable.x & 3) | DRAW_DITHER_OFS_Y(pPixmap->drawable.y & 3)); OUT_RING(0x00000000); /* ymin, xmin */ - OUT_RING((pScrn->virtualX - 1) | - (pScrn->virtualY - 1) << 16); /* ymax, xmax */ + OUT_RING((pPixmap->drawable.width - 1) | + (pPixmap->drawable.height - 1) << 16); /* ymax, xmax */ OUT_RING(0x00000000); /* yorigin, xorigin */ OUT_RING(MI_NOOP); - OUT_RING(0x7c000003); /* unknown command */ - OUT_RING(0x7d070000); - OUT_RING(0x00000000); - OUT_RING(0x68000002); - OUT_RING(_3DSTATE_LOAD_STATE_IMMEDIATE_1 | I1_LOAD_S(2) | I1_LOAD_S(4) | I1_LOAD_S(5) | I1_LOAD_S(6) | 3); s2 = S2_TEXCOORD_FMT(0, TEXCOORDFMT_2D); |