summaryrefslogtreecommitdiff
path: root/src/nv30_xv_tex.c
diff options
context:
space:
mode:
authorBen Skeggs <skeggsb@gmail.com>2009-03-05 12:11:03 +1100
committerBen Skeggs <skeggsb@gmail.com>2009-03-05 15:52:45 +1000
commit42f99e68940a526f804e2046676c1d06d1bbbb42 (patch)
tree5fba015a9044f89ba2da014197d28ea8a98b6c22 /src/nv30_xv_tex.c
parent56bb8f8e81e9d152217df7863e59781009a9bb77 (diff)
nv30/xv: restore original viewport/clipping after putimage
Fixes two cases of corruption I seen while using the texture adaptors with a composite manager. - desktop getting clipped to video size sometimes - missing fonts on some menu items after xv+compmgr
Diffstat (limited to 'src/nv30_xv_tex.c')
-rw-r--r--src/nv30_xv_tex.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/nv30_xv_tex.c b/src/nv30_xv_tex.c
index 7e41d87..32a001c 100644
--- a/src/nv30_xv_tex.c
+++ b/src/nv30_xv_tex.c
@@ -372,6 +372,17 @@ NV30PutTextureImage(ScrnInfoPtr pScrn, struct nouveau_bo *src, int src_offset,
BEGIN_RING(chan, rankine, NV34TCL_VERTEX_BEGIN_END, 1);
OUT_RING (chan, NV34TCL_VERTEX_BEGIN_END_STOP);
+ if (pNv->NVArch == 0x30) {
+ BEGIN_RING(chan, rankine, NV34TCL_VIEWPORT_HORIZ, 2);
+ OUT_RING (chan, 4096 << 16);
+ OUT_RING (chan, 4096 << 16);
+ BEGIN_RING(chan, rankine, NV34TCL_VIEWPORT_CLIP_HORIZ(0), 2);
+ OUT_RING (chan, 4095 << 16);
+ OUT_RING (chan, 4095 << 16);
+ BEGIN_RING(chan, rankine, NV34TCL_VIEWPORT_TX_ORIGIN, 1);
+ OUT_RING (chan, 0);
+ }
+
FIRE_RING (chan);
return Success;