configure.ac | 2 - src/nouveau_exa.c | 12 ++++++--- src/nv10_exa.c | 4 +-- src/nv30_exa.c | 6 ++-- src/nv30_xv_tex.c | 2 - src/nv40_exa.c | 6 ++-- src/nv40_xv_tex.c | 2 - src/nv50_accel.h | 12 ++++----- src/nvc0_accel.h | 28 +++++++++++++--------- src/nve0_shader.h | 66 ++++++++++++++++++------------------------------------ 10 files changed, 63 insertions(+), 77 deletions(-)
New commits: commit 0d2b414aff634c996e0468bb0df1894d6c28c09e Author: Ben Skeggs <bske...@redhat.com> Date: Tue Jun 19 10:12:37 2012 +1000 bump version to 1.0.1 diff --git a/configure.ac b/configure.ac index cc8732b..af126fb 100644 --- a/configure.ac +++ b/configure.ac @@ -22,7 +22,7 @@ AC_PREREQ([2.60]) AC_INIT([xf86-video-nouveau], - [1.0.0], + [1.0.1], [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg], [xf86-video-nouveau]) commit f84c28c9e6a0079e527655994689cb9c2ba51999 Author: Ben Skeggs <bske...@redhat.com> Date: Tue Jun 19 09:49:02 2012 +1000 exa: fix remaining signed datatype issues Wasn't expecting this situation, apparently it happens.. Signed-off-by: Ben Skeggs <bske...@redhat.com> diff --git a/src/nv10_exa.c b/src/nv10_exa.c index a3f7df3..cb9eb7c 100644 --- a/src/nv10_exa.c +++ b/src/nv10_exa.c @@ -594,9 +594,9 @@ PUSH_VTX2s(struct nouveau_pushbuf *push, int x1, int y1, int x2, int y2, int dx, int dy) { BEGIN_NV04(push, NV10_3D(VERTEX_TX0_2I), 1); - PUSH_DATA (push, (y1 << 16) | x1); + PUSH_DATA (push, ((y1 & 0xffff) << 16) | (x1 & 0xffff)); BEGIN_NV04(push, NV10_3D(VERTEX_TX1_2I), 1); - PUSH_DATA (push, (y2 << 16) | x2); + PUSH_DATA (push, ((y2 & 0xffff) << 16) | (x2 & 0xffff)); BEGIN_NV04(push, NV10_3D(VERTEX_POS_3F_X), 3); PUSH_DATAf(push, dx); PUSH_DATAf(push, dy); diff --git a/src/nv30_exa.c b/src/nv30_exa.c index 9be52e5..95509bc 100644 --- a/src/nv30_exa.c +++ b/src/nv30_exa.c @@ -545,10 +545,10 @@ PUSH_VTX2s(struct nouveau_pushbuf *push, int x1, int y1, int x2, int y2, int dx, int dy) { BEGIN_NV04(push, NV30_3D(VTX_ATTR_2I(8)), 2); - PUSH_DATA (push, (y1 << 16) | x1); - PUSH_DATA (push, (y2 << 16) | x2); + PUSH_DATA (push, ((y1 & 0xffff) << 16) | (x1 & 0xffff)); + PUSH_DATA (push, ((y2 & 0xffff) << 16) | (x2 & 0xffff)); BEGIN_NV04(push, NV30_3D(VTX_ATTR_2I(0)), 1); - PUSH_DATA (push, (dy << 16) | dx); + PUSH_DATA (push, ((dy & 0xffff) << 16) | (dx & 0xffff)); } void diff --git a/src/nv30_xv_tex.c b/src/nv30_xv_tex.c index 33c5602..bf75cfa 100644 --- a/src/nv30_xv_tex.c +++ b/src/nv30_xv_tex.c @@ -167,7 +167,7 @@ NV30StopTexturedVideo(ScrnInfoPtr pScrn, pointer data, Bool Exit) PUSH_DATAf(push, (sx)); PUSH_DATAf(push, (sy)); \ PUSH_DATAf(push, (sx)/2.0); PUSH_DATAf(push, (sy)/2.0); \ BEGIN_NV04(push, NV30_3D(VTX_ATTR_2I(0)), 1); \ - PUSH_DATA (push, ((dy)<<16)|(dx)); \ + PUSH_DATA (push, (((dy)&0xffff)<<16)|((dx)&0xffff)); \ } while(0) int diff --git a/src/nv40_exa.c b/src/nv40_exa.c index ce0d78a..977c855 100644 --- a/src/nv40_exa.c +++ b/src/nv40_exa.c @@ -527,10 +527,10 @@ PUSH_VTX2s(struct nouveau_pushbuf *push, int x1, int y1, int x2, int y2, int dx, int dy) { BEGIN_NV04(push, NV30_3D(VTX_ATTR_2I(8)), 2); - PUSH_DATA (push, (y1 << 16) | x1); - PUSH_DATA (push, (y2 << 16) | x2); + PUSH_DATA (push, ((y1 & 0xffff) << 16) | (x1 & 0xffff)); + PUSH_DATA (push, ((y2 & 0xffff) << 16) | (x2 & 0xffff)); BEGIN_NV04(push, NV30_3D(VTX_ATTR_2I(0)), 1); - PUSH_DATA (push, (dy << 16) | dx); + PUSH_DATA (push, ((dy & 0xffff) << 16) | (dx & 0xffff)); } void diff --git a/src/nv40_xv_tex.c b/src/nv40_xv_tex.c index 9f2e336..79ef1fc 100644 --- a/src/nv40_xv_tex.c +++ b/src/nv40_xv_tex.c @@ -167,7 +167,7 @@ NV40StopTexturedVideo(ScrnInfoPtr pScrn, pointer data, Bool Exit) PUSH_DATAf(push, (sx)); PUSH_DATAf(push, (sy)); \ PUSH_DATAf(push, (sx)/2.0); PUSH_DATAf(push, (sy)/2.0); \ BEGIN_NV04(push, NV30_3D(VTX_ATTR_2I(0)), 1); \ - PUSH_DATA (push, ((dy)<<16)|(dx)); \ + PUSH_DATA (push, (((dy)&0xffff)<<16)|((dx)&0xffff)); \ } while(0) int diff --git a/src/nv50_accel.h b/src/nv50_accel.h index 24f0fa8..87c88a3 100644 --- a/src/nv50_accel.h +++ b/src/nv50_accel.h @@ -53,20 +53,18 @@ PUSH_VTX1s(struct nouveau_pushbuf *push, float sx, float sy, int dx, int dy) PUSH_DATAf(push, sx); PUSH_DATAf(push, sy); BEGIN_NV04(push, NV50_3D(VTX_ATTR_2I(0)), 1); - PUSH_DATA (push, (dy << 16) | dx); + PUSH_DATA (push, ((dy & 0xffff) << 16) | (dx & 0xffff)); } static __inline__ void PUSH_VTX2s(struct nouveau_pushbuf *push, int x1, int y1, int x2, int y2, int dx, int dy) { - BEGIN_NV04(push, NV50_3D(VTX_ATTR_2F_X(8)), 4); - PUSH_DATAf(push, x1); - PUSH_DATAf(push, y1); - PUSH_DATAf(push, x2); - PUSH_DATAf(push, y2); + BEGIN_NV04(push, NV50_3D(VTX_ATTR_2I(8)), 2); + PUSH_DATA (push, ((y1 & 0xffff) << 16) | (x1 & 0xffff)); + PUSH_DATA (push, ((y2 & 0xffff) << 16) | (x2 & 0xffff)); BEGIN_NV04(push, NV50_3D(VTX_ATTR_2I(0)), 1); - PUSH_DATA (push, (dy << 16) | dx); + PUSH_DATA (push, ((dy & 0xffff) << 16) | (dx & 0xffff)); } static __inline__ void commit 794141f22179a09ba6b2a094ba72316c298fee8b Author: Maarten Maathuis <madman2...@gmail.com> Date: Tue Jun 19 00:28:59 2012 +0200 exa: fix various issues in transfer bo handling Thanks to "Christoph Bumiller <e0425...@student.tuwien.ac.at>" for hinting at the cause of the memory leak. Signed-off-by: Maarten Maathuis <madman2...@gmail.com> Signed-off-by: Ben Skeggs <bske...@redhat.com> diff --git a/src/nouveau_exa.c b/src/nouveau_exa.c index 55dce99..9b6b1f3 100644 --- a/src/nouveau_exa.c +++ b/src/nouveau_exa.c @@ -175,20 +175,24 @@ nouveau_exa_scratch(NVPtr pNv, int size, struct nouveau_bo **pbo, int *off) ret = nouveau_bo_new(pNv->dev, NOUVEAU_BO_GART | NOUVEAU_BO_MAP, 0, NOUVEAU_ALIGN(size, 1 * 1024 * 1024), NULL, &bo); - if (ret == 0) - ret = nouveau_bo_map(bo, NOUVEAU_BO_RDWR, pNv->client); if (ret != 0) return ret; + ret = nouveau_bo_map(bo, NOUVEAU_BO_RDWR, pNv->client); + if (ret != 0) { + nouveau_bo_ref(NULL, &bo); + return ret; + } + nouveau_bo_ref(bo, &pNv->transfer); + nouveau_bo_ref(NULL, &bo); pNv->transfer_offset = 0; } *off = pNv->transfer_offset; *pbo = pNv->transfer; - pNv->transfer_offset += size + 0xff; - pNv->transfer_offset &= ~0xff; + pNv->transfer_offset += size; return 0; } commit 661d0cf42219a063f8faa0518f3490ddd38209ff Author: Christoph Bumiller <e0425...@student.tuwien.ac.at> Date: Mon Jun 18 17:13:55 2012 +0200 nve0: fix and improve NV12 shader Only the 1st set of coordinates is valid. NVC0 was fixed in 9a3e579f637267b32efc46cfce5d1a36a41323b1. diff --git a/src/nve0_shader.h b/src/nve0_shader.h index b727d68..4705075 100644 --- a/src/nve0_shader.h +++ b/src/nve0_shader.h @@ -399,7 +399,7 @@ NVE0FP_NV12[] = { 0x00000000, 0x00000000, 0x80000000, - 0x00000a0a, + 0x0000000a, 0x00000000, 0x00000000, 0x00000000, @@ -413,48 +413,28 @@ NVE0FP_NV12[] = { 0x00000000, 0x0000000f, 0x00000000, - 0xfff09c00, - 0xc07e007c, - 0x10209c00, - 0xc8000000, - 0x0bf01c40, - 0xc07e0080, - 0x0bf05c40, - 0xc07e0084, - 0xfc001e86, - 0x80120000, - 0x00001de6, - 0xf0000000, /* texbar */ - 0x00015c40, - 0x58004000, - 0x1050dc20, - 0x50004000, - 0x20511c20, - 0x50004000, - 0x30515c20, - 0x50004000, - 0x0bf01c40, - 0xc07e0090, - 0x0bf05c40, - 0xc07e0094, - 0xfc001e86, - 0x80130001, - 0x00001de6, - 0xf0000000, /* texbar */ - 0x4000dc40, - 0x30064000, - 0x50011c40, - 0x30084000, - 0x60015c40, - 0x300a4000, - 0x70101c40, - 0x30064000, - 0x90109c40, - 0x300a4000, - 0x80105c40, - 0x30084000, - 0x00001de7, - 0x80000000, + 0xe23282e7, 0x2c220202, /* sched 0x2e 0x28 0x23 0x2e 0x20 0x20 0xc2 */ + 0xfff09c00, 0xc07e007c, /* interp pass f32 $r2 a[0x7c] */ + 0x10209c00, 0xc8000000, /* rcp f32 $r2 $r2 */ + 0x0bf01c40, 0xc07e0080, /* interp mul f32 $r0 a[0x80] $r2 0 */ + 0x0bf05c40, 0xc07e0084, /* interp mul f32 $r1 a[0x84] $r2 0 */ + 0xfc011e86, 0x80120000, /* tex t { # # # $r4 } t2d c[0x0] { $r0 $r1 } */ + 0xfc001f06, 0x80130001, /* tex p { # # $r0 $r1 } t2d c[0x4] { $r0 $r1 } */ + 0x04001de6, 0xf0000000, /* texbar 1 */ + 0x02004287, 0x22004a22, /* sched 0x28 0x4 0x20 0x20 0xa2 0x4 0x20 */ + 0x00415c40, 0x58004000, /* mul ftz rn f32 $r5 $r4 c0[0] */ + 0x1050dc20, 0x50004000, /* add ftz rn f32 $r3 $r5 c0[0x4] */ + 0x20511c20, 0x50004000, /* add ftz rn f32 $r4 $r5 c0[0x8] */ + 0x30515c20, 0x50004000, /* add ftz rn f32 $r5 $r5 c0[0xc] */ + 0x00001de6, 0xf0000000, /* texbar 0 */ + 0x4000dc40, 0x30064000, /* fma ftz rn f32 $r3 $r0 c0[0x10] $r3 */ + 0x50011c40, 0x30084000, /* fma ftz rn f32 $r4 $r0 c0[0x14] $r4 */ + 0x42004287, 0x200002e0, /* sched 0x28 0x4 0x20 0x4 0x2e 0 0 */ + 0x60015c40, 0x300a4000, /* fma ftz rn f32 $r5 $r0 c0[0x18] $r5 */ + 0x70101c40, 0x30064000, /* fma ftz rn f32 $r0 $r1 c0[0x1c] $r3 */ + 0x90109c40, 0x300a4000, /* fma ftz rn f32 $r2 $r1 c0[0x24] $r5 */ + 0x80105c40, 0x30084000, /* fma ftz rn f32 $r1 $r1 c0[0x20] $r4 */ + 0x00001de7, 0x80000000, /* exit */ }; #endif commit a907efe44177298cb1c42a236aab087c14b71657 Author: Christoph Bumiller <e0425...@student.tuwien.ac.at> Date: Mon Jun 18 13:50:27 2012 +0200 nvc0/accel: oops fix method size in previous patch diff --git a/src/nvc0_accel.h b/src/nvc0_accel.h index 9ba8757..38c58fd 100644 --- a/src/nvc0_accel.h +++ b/src/nvc0_accel.h @@ -57,7 +57,7 @@ PUSH_VTX1s(struct nouveau_pushbuf *push, float sx, float sy, int dx, int dy) PUSH_DATA (push, VTX_ATTR(1, 2, FLOAT, 4)); PUSH_DATAf(push, sx); PUSH_DATAf(push, sy); - BEGIN_NVC0(push, NVC0_3D(VTX_ATTR_DEFINE), 2); + BEGIN_NVC0(push, NVC0_3D(VTX_ATTR_DEFINE), 3); PUSH_DATA (push, VTX_ATTR(0, 2, SSCALED, 4)); PUSH_DATA (push, dx); PUSH_DATA (push, dy); commit 8805e20bb9c1cfb7477f3eb7def64c5711fc91ea Author: Christoph Bumiller <e0425...@student.tuwien.ac.at> Date: Mon Jun 18 13:41:43 2012 +0200 nvc0/accel: use correct (signed) vertex data type in PUSH_VTX1/2s Could have kept s16 but decided against mask and shift. diff --git a/src/nvc0_accel.h b/src/nvc0_accel.h index 41cf477..9ba8757 100644 --- a/src/nvc0_accel.h +++ b/src/nvc0_accel.h @@ -58,23 +58,27 @@ PUSH_VTX1s(struct nouveau_pushbuf *push, float sx, float sy, int dx, int dy) PUSH_DATAf(push, sx); PUSH_DATAf(push, sy); BEGIN_NVC0(push, NVC0_3D(VTX_ATTR_DEFINE), 2); - PUSH_DATA (push, VTX_ATTR(0, 2, USCALED, 2)); - PUSH_DATA (push, (dy << 16) | dx); + PUSH_DATA (push, VTX_ATTR(0, 2, SSCALED, 4)); + PUSH_DATA (push, dx); + PUSH_DATA (push, dy); } static __inline__ void PUSH_VTX2s(struct nouveau_pushbuf *push, int x0, int y0, int x1, int y1, int dx, int dy) { - BEGIN_NVC0(push, NVC0_3D(VTX_ATTR_DEFINE), 2); - PUSH_DATA (push, VTX_ATTR(1, 2, USCALED, 2)); - PUSH_DATA (push, (y0 << 16) | x0); - BEGIN_NVC0(push, NVC0_3D(VTX_ATTR_DEFINE), 2); - PUSH_DATA (push, VTX_ATTR(2, 2, USCALED, 2)); - PUSH_DATA (push, (y1 << 16) | x1); - BEGIN_NVC0(push, NVC0_3D(VTX_ATTR_DEFINE), 2); - PUSH_DATA (push, VTX_ATTR(0, 2, USCALED, 2)); - PUSH_DATA (push, (dy << 16) | dx); + BEGIN_NVC0(push, NVC0_3D(VTX_ATTR_DEFINE), 3); + PUSH_DATA (push, VTX_ATTR(1, 2, SSCALED, 4)); + PUSH_DATA (push, x0); + PUSH_DATA (push, y0); + BEGIN_NVC0(push, NVC0_3D(VTX_ATTR_DEFINE), 3); + PUSH_DATA (push, VTX_ATTR(2, 2, SSCALED, 4)); + PUSH_DATA (push, x1); + PUSH_DATA (push, y1); + BEGIN_NVC0(push, NVC0_3D(VTX_ATTR_DEFINE), 3); + PUSH_DATA (push, VTX_ATTR(0, 2, SSCALED, 4)); + PUSH_DATA (push, dx); + PUSH_DATA (push, dy); } static __inline__ void -- To UNSUBSCRIBE, email to debian-x-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/e1sh0jp-0003gg...@vasks.debian.org