ChangeLog | 101 +++++++++++++++++++++++++++++ configure.ac | 5 - debian/changelog | 7 ++ debian/patches/02-link-against-libdrm.diff | 42 ------------ debian/patches/series | 1 src/Makefile.am | 20 +++++ src/drmmode_display.c | 52 ++++++++++++-- src/nouveau_xv.c | 36 ++++++++-- src/nv_driver.c | 2 src/nvc0_accel.c | 33 ++++++++- src/shader/Makefile | 15 ++++ src/shader/exac8nvf0.fp | 42 ++++++++++++ src/shader/exac8nvf0.fpc | 28 ++++++++ src/shader/exacanvf0.fp | 43 ++++++++++++ src/shader/exacanvf0.fpc | 30 ++++++++ src/shader/exacmnvf0.fp | 43 ++++++++++++ src/shader/exacmnvf0.fpc | 30 ++++++++ src/shader/exas8nvf0.fp | 38 ++++++++++ src/shader/exas8nvf0.fpc | 20 +++++ src/shader/exasanvf0.fp | 43 ++++++++++++ src/shader/exasanvf0.fpc | 30 ++++++++ src/shader/exascnvf0.fp | 35 ++++++++++ src/shader/exascnvf0.fpc | 14 ++++ src/shader/videonvf0.fp | 47 +++++++++++++ src/shader/videonvf0.fpc | 38 ++++++++++ src/shader/xfrm2nvf0.vp | 82 +++++++++++++++++++++++ src/shader/xfrm2nvf0.vpc | 90 +++++++++++++++++++++++++ 27 files changed, 898 insertions(+), 69 deletions(-)
New commits: commit 0897ccb715da88e1038d80b82928ebeccff8e254 Author: Sven Joachim <[email protected]> Date: Tue Jul 30 08:53:01 2013 +0200 Remove patch 02-link-against-libdrm.diff, applied upstream diff --git a/debian/changelog b/debian/changelog index 47df922..d13c255 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,6 +1,7 @@ xserver-xorg-video-nouveau (1:1.0.9-1) UNRELEASED; urgency=low * New upstream release. + * Remove patch 02-link-against-libdrm.diff, applied upstream. -- Sven Joachim <[email protected]> Tue, 30 Jul 2013 08:47:33 +0200 diff --git a/debian/patches/02-link-against-libdrm.diff b/debian/patches/02-link-against-libdrm.diff deleted file mode 100644 index 602562a..0000000 --- a/debian/patches/02-link-against-libdrm.diff +++ /dev/null @@ -1,42 +0,0 @@ -commit 3a48b65b5bfc9cf4c3049923cfdba18d78097c88 -Author: Sven Joachim <[email protected]> -Date: Thu Jun 13 20:33:28 2013 +0200 - - Link against libdrm - - The DDX uses symbols from libdrm but currently does not link against - it, but rather relies on indirect linkage from libdrm_nouveau. This - could lead to insufficient dependencies in distribution packages, seen - in http://bugs.debian.org/633786. - - Signed-off-by: Sven Joachim <[email protected]> - -diff --git a/configure.ac b/configure.ac -index 6f7f870..b54b8cd 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -80,6 +80,7 @@ XORG_DRIVER_CHECK_EXT(DPMSExtension, xextproto) - XORG_DRIVER_CHECK_EXT(DRI2, [dri2proto >= 2.6]) - - # Checks for pkg-config packages -+PKG_CHECK_MODULES(LIBDRM, [libdrm >= 2.4.17]) - PKG_CHECK_MODULES(LIBDRM_NOUVEAU, [libdrm_nouveau >= 2.4.25]) - AC_SUBST(LIBDRM_NOUVEAU_CFLAGS) - AC_SUBST(LIBDRM_NOUVEAU_LIBS) -diff --git a/src/Makefile.am b/src/Makefile.am -index f54e135..5836ead 100644 ---- a/src/Makefile.am -+++ b/src/Makefile.am -@@ -23,10 +23,10 @@ - # -avoid-version prevents gratuitous .0.0.0 version numbers on the end - # _ladir passes a dummy rpath to libtool so the thing will actually link - # TODO: -nostdlib/-Bstatic/-lgcc platform magic, not installing the .a, etc. --AM_CFLAGS = @XORG_CFLAGS@ @LIBUDEV_CFLAGS@ @LIBDRM_NOUVEAU_CFLAGS@ -+AM_CFLAGS = @XORG_CFLAGS@ @LIBUDEV_CFLAGS@ @LIBDRM_NOUVEAU_CFLAGS@ @LIBDRM_CFLAGS@ - nouveau_drv_la_LTLIBRARIES = nouveau_drv.la - nouveau_drv_la_LDFLAGS = -module -avoid-version @LIBDRM_NOUVEAU_LIBS@ \ -- @LIBUDEV_LIBS@ -+ @LIBUDEV_LIBS@ @LIBDRM_LIBS@ - nouveau_drv_ladir = @moduledir@/drivers - - nouveau_drv_la_SOURCES = \ diff --git a/debian/patches/series b/debian/patches/series index 90907d4..d6892cf 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -1,2 +1 @@ 01-set-NV_DRIVER_DATE-from-ChangeLog.diff -02-link-against-libdrm.diff commit 48b29eedcfcf7ac3ae48e32a844332116e7c15fc Author: Sven Joachim <[email protected]> Date: Tue Jul 30 08:51:03 2013 +0200 New upstream release diff --git a/ChangeLog b/ChangeLog index cb76802..a73b0e1 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,104 @@ +commit 300c5a32d79cf507b5fede96710335bcd316eccb +Author: Dave Airlie <[email protected]> +Date: Tue Jul 30 15:28:06 2013 +1000 + + bump to 1.0.9 for release + + Signed-off-by: Dave Airlie <[email protected]> + +commit be44e7804862b4c276ed4d4717b1212920f428e6 +Author: Dave Airlie <[email protected]> +Date: Tue Jul 30 15:26:46 2013 +1000 + + nouveau: fix crash when xinerama is enabled. + + Signed-off-by: Dave Airlie <[email protected]> + +commit 588252556d1c84bf6793bc22edd48e6650a0f1b9 +Author: Dave Airlie <[email protected]> +Date: Tue Jul 30 15:14:22 2013 +1000 + + fix make distcheck. + + add all the nvf0 stuff. + + Signed-off-by: Dave Airlie <[email protected]> + +commit 29aecda1b5bdb95700894083874492a6d5dfc08a +Author: Dave Airlie <[email protected]> +Date: Tue Jul 30 14:10:51 2013 +1000 + + drmmode: add support for multi-screen reverse optimus + + Initial reverse optimus didn't consider multiple screens, so + this overhauls the code to use the new X server interface, + and allows for multiple outputs on the nvidia to be used with + the intel doing the rendering. + + Signed-off-by: Dave Airlie <[email protected]> + +commit d7ae886260b480da0ea4cad22eb6f7b7d12f07b0 +Author: Ilia Mirkin <[email protected]> +Date: Mon Jul 29 21:03:54 2013 -0400 + + nouveau: use uppercase for chipset name + + Right now the log will output e.g. NVaa instead of NVAA, which is how we + usually talk about it. + + Signed-off-by: Ilia Mirkin <[email protected]> + Signed-off-by: Ben Skeggs <[email protected]> + +commit 4492cf90c2a7fe27badf6f3f0f296755a65e1e83 +Author: Ilia Mirkin <[email protected]> +Date: Mon Jul 29 02:40:39 2013 -0400 + + xv: speed up YV12 -> NV12 conversion using SSE2 if available + + memcpy() goes from taking 45% to 66% of total function time, which + translates to a 30% decrease in NVPutImage runtime. + + Signed-off-by: Ilia Mirkin <[email protected]> + Signed-off-by: Ben Skeggs <[email protected]> + +commit 08c667b06d28756d0d32f82bd736b0bdf2b4448e +Author: Ilia Mirkin <[email protected]> +Date: Mon Jul 29 02:40:38 2013 -0400 + + xv: fix last pixel for big-endian machines in YV12 -> NV12 conversion + + Signed-off-by: Ilia Mirkin <[email protected]> + Signed-off-by: Ben Skeggs <[email protected]> + +commit 8c1c5d4f212958559132506d51dcfeeb17f60371 +Author: Ben Skeggs <[email protected]> +Date: Wed May 15 21:34:13 2013 +1000 + + nvf0: implement EXA and XVideo acceleration + + Signed-off-by: Ben Skeggs <[email protected]> + +commit 779b8d44b5ff84b87b52600a2f010ac19cd396ad +Author: Sven Joachim <[email protected]> +Date: Thu Jun 13 20:41:53 2013 +0200 + + Link against libdrm + + The DDX uses symbols from libdrm but currently does not link against + it, but rather relies on indirect linkage from libdrm_nouveau. This + could lead to insufficient dependencies in distribution packages, seen + in http://bugs.debian.org/633786. + + Signed-off-by: Sven Joachim <[email protected]> + +commit e96ae2b129df2a50d1d3839084df4fb1868d914d +Author: Maarten Lankhorst <[email protected]> +Date: Wed Jun 12 11:05:23 2013 +0200 + + fixup the dri2 check + + Signed-off-by: Maarten Lankhorst <[email protected]> + commit 7f20a6af25ae28452ec9c971bfa2227857e6ee93 Author: Maarten Lankhorst <[email protected]> Date: Wed Jun 12 10:46:39 2013 +0200 diff --git a/debian/changelog b/debian/changelog index 2c27520..47df922 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +xserver-xorg-video-nouveau (1:1.0.9-1) UNRELEASED; urgency=low + + * New upstream release. + + -- Sven Joachim <[email protected]> Tue, 30 Jul 2013 08:47:33 +0200 + xserver-xorg-video-nouveau (1:1.0.8-1) unstable; urgency=low [ Maarten Lankhorst ] commit 300c5a32d79cf507b5fede96710335bcd316eccb Author: Dave Airlie <[email protected]> Date: Tue Jul 30 15:28:06 2013 +1000 bump to 1.0.9 for release Signed-off-by: Dave Airlie <[email protected]> diff --git a/configure.ac b/configure.ac index b54b8cd..eff9087 100644 --- a/configure.ac +++ b/configure.ac @@ -22,7 +22,7 @@ AC_PREREQ([2.60]) AC_INIT([xf86-video-nouveau], - [1.0.8], + [1.0.9], [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg], [xf86-video-nouveau]) commit be44e7804862b4c276ed4d4717b1212920f428e6 Author: Dave Airlie <[email protected]> Date: Tue Jul 30 15:26:46 2013 +1000 nouveau: fix crash when xinerama is enabled. Signed-off-by: Dave Airlie <[email protected]> diff --git a/src/drmmode_display.c b/src/drmmode_display.c index ed9e186..570a9e4 100644 --- a/src/drmmode_display.c +++ b/src/drmmode_display.c @@ -348,7 +348,7 @@ drmmode_set_mode_major(xf86CrtcPtr crtc, DisplayModePtr mode, fb_id = drmmode->fb_id; #ifdef NOUVEAU_PIXMAP_SHARING - if (crtc->randr_crtc->scanout_pixmap) { + if (crtc->randr_crtc && crtc->randr_crtc->scanout_pixmap) { x = drmmode_crtc->scanout_pixmap_x; y = 0; } else commit 588252556d1c84bf6793bc22edd48e6650a0f1b9 Author: Dave Airlie <[email protected]> Date: Tue Jul 30 15:14:22 2013 +1000 fix make distcheck. add all the nvf0 stuff. Signed-off-by: Dave Airlie <[email protected]> diff --git a/src/Makefile.am b/src/Makefile.am index 5836ead..82d7c14 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -70,34 +70,50 @@ EXTRA_DIST = hwdefs/nv_3ddefs.xml.h \ shader/exac8nvc0.fpc \ shader/exac8nve0.fp \ shader/exac8nve0.fpc \ + shader/exac8nvf0.fp \ + shader/exac8nvf0.fpc \ shader/exacanvc0.fp \ shader/exacanvc0.fpc \ shader/exacanve0.fp \ shader/exacanve0.fpc \ + shader/exacanvf0.fp \ + shader/exacanvf0.fpc \ shader/exacmnvc0.fp \ shader/exacmnvc0.fpc \ shader/exacmnve0.fp \ shader/exacmnve0.fpc \ + shader/exacmnvf0.fp \ + shader/exacmnvf0.fpc \ shader/exas8nvc0.fp \ shader/exas8nvc0.fpc \ shader/exas8nve0.fp \ shader/exas8nve0.fpc \ + shader/exas8nvf0.fp \ + shader/exas8nvf0.fpc \ shader/exasanvc0.fp \ shader/exasanvc0.fpc \ shader/exasanve0.fp \ shader/exasanve0.fpc \ + shader/exasanvf0.fp \ + shader/exasanvf0.fpc \ shader/exascnvc0.fp \ shader/exascnvc0.fpc \ shader/exascnve0.fp \ shader/exascnve0.fpc \ + shader/exascnvf0.fp \ + shader/exascnvf0.fpc \ shader/videonvc0.fp \ shader/videonvc0.fpc \ shader/videonve0.fp \ shader/videonve0.fpc \ + shader/videonvf0.fp \ + shader/videonvf0.fpc \ shader/xfrm2nvc0.vp \ shader/xfrm2nvc0.vpc \ shader/xfrm2nve0.vp \ shader/xfrm2nve0.vpc \ + shader/xfrm2nvf0.vp \ + shader/xfrm2nvf0.vpc \ shader/Makefile \ nouveau_local.h \ nv_const.h \ commit 29aecda1b5bdb95700894083874492a6d5dfc08a Author: Dave Airlie <[email protected]> Date: Tue Jul 30 14:10:51 2013 +1000 drmmode: add support for multi-screen reverse optimus Initial reverse optimus didn't consider multiple screens, so this overhauls the code to use the new X server interface, and allows for multiple outputs on the nvidia to be used with the intel doing the rendering. Signed-off-by: Dave Airlie <[email protected]> diff --git a/src/drmmode_display.c b/src/drmmode_display.c index b9b7164..ed9e186 100644 --- a/src/drmmode_display.c +++ b/src/drmmode_display.c @@ -63,6 +63,7 @@ typedef struct { PixmapPtr rotate_pixmap; uint32_t rotate_fb_id; Bool cursor_visible; + int scanout_pixmap_x; } drmmode_crtc_private_rec, *drmmode_crtc_private_ptr; typedef struct { @@ -347,9 +348,10 @@ drmmode_set_mode_major(xf86CrtcPtr crtc, DisplayModePtr mode, fb_id = drmmode->fb_id; #ifdef NOUVEAU_PIXMAP_SHARING - if (crtc->randr_crtc->scanout_pixmap) - x = y = 0; - else + if (crtc->randr_crtc->scanout_pixmap) { + x = drmmode_crtc->scanout_pixmap_x; + y = 0; + } else #endif if (drmmode_crtc->rotate_fb_id) { fb_id = drmmode_crtc->rotate_fb_id; @@ -548,25 +550,57 @@ drmmode_set_scanout_pixmap(xf86CrtcPtr crtc, PixmapPtr ppix) { ScreenPtr screen = xf86ScrnToScreen(crtc->scrn); PixmapPtr screenpix = screen->GetScreenPixmap(screen); - + xf86CrtcConfigPtr xf86_config = XF86_CRTC_CONFIG_PTR(crtc->scrn); + drmmode_crtc_private_ptr drmmode_crtc = crtc->driver_private; + int c, total_width = 0, max_height = 0, this_x = 0; if (!ppix) { if (crtc->randr_crtc->scanout_pixmap) PixmapStopDirtyTracking(crtc->randr_crtc->scanout_pixmap, screenpix); + drmmode_crtc->scanout_pixmap_x = 0; return TRUE; } - if (ppix->drawable.width > screenpix->drawable.width || - ppix->drawable.height > screenpix->drawable.height) { + /* iterate over all the attached crtcs - + work out bounding box */ + for (c = 0; c < xf86_config->num_crtc; c++) { + xf86CrtcPtr iter = xf86_config->crtc[c]; + if (!iter->enabled && iter != crtc) + continue; + if (iter == crtc) { + this_x = total_width; + total_width += ppix->drawable.width; + if (max_height < ppix->drawable.height) + max_height = ppix->drawable.height; + } else { + total_width += iter->mode.HDisplay; + if (max_height < iter->mode.VDisplay) + max_height = iter->mode.VDisplay; + } +#ifndef HAS_DIRTYTRACKING2 + if (iter != crtc) { + ErrorF("Cannot do multiple crtcs without X server dirty tracking 2 interface\n"); + return FALSE; + } +#endif + } + + if (total_width != screenpix->drawable.width || + max_height != screenpix->drawable.height) { Bool ret; - ret = drmmode_xf86crtc_resize(crtc->scrn, ppix->drawable.width, ppix->drawable.height); + ret = drmmode_xf86crtc_resize(crtc->scrn, total_width, max_height); if (ret == FALSE) return FALSE; screenpix = screen->GetScreenPixmap(screen); - screen->width = screenpix->drawable.width = ppix->drawable.width; - screen->height = screenpix->drawable.height = ppix->drawable.height; + screen->width = screenpix->drawable.width = total_width; + screen->height = screenpix->drawable.height = max_height; } + drmmode_crtc->scanout_pixmap_x = this_x; +#ifdef HAS_DIRTYTRACKING2 + PixmapStartDirtyTracking2(ppix, screenpix, 0, 0, this_x, 0); +#else PixmapStartDirtyTracking(ppix, screenpix, 0, 0); +#endif return TRUE; } #endif commit d7ae886260b480da0ea4cad22eb6f7b7d12f07b0 Author: Ilia Mirkin <[email protected]> Date: Mon Jul 29 21:03:54 2013 -0400 nouveau: use uppercase for chipset name Right now the log will output e.g. NVaa instead of NVAA, which is how we usually talk about it. Signed-off-by: Ilia Mirkin <[email protected]> Signed-off-by: Ben Skeggs <[email protected]> diff --git a/src/nv_driver.c b/src/nv_driver.c index b83b822..44e7496 100644 --- a/src/nv_driver.c +++ b/src/nv_driver.c @@ -836,7 +836,7 @@ NVPreInit(ScrnInfoPtr pScrn, int flags) dev = pNv->dev; pScrn->chipset = malloc(sizeof(char) * 25); - sprintf(pScrn->chipset, "NVIDIA NV%02x", dev->chipset); + sprintf(pScrn->chipset, "NVIDIA NV%02X", dev->chipset); xf86DrvMsg(pScrn->scrnIndex, X_PROBED, "Chipset: \"%s\"\n", pScrn->chipset); switch (dev->chipset & 0xf0) { commit 4492cf90c2a7fe27badf6f3f0f296755a65e1e83 Author: Ilia Mirkin <[email protected]> Date: Mon Jul 29 02:40:39 2013 -0400 xv: speed up YV12 -> NV12 conversion using SSE2 if available memcpy() goes from taking 45% to 66% of total function time, which translates to a 30% decrease in NVPutImage runtime. Signed-off-by: Ilia Mirkin <[email protected]> Signed-off-by: Ben Skeggs <[email protected]> diff --git a/src/nouveau_xv.c b/src/nouveau_xv.c index 567e30c..5569b7c 100644 --- a/src/nouveau_xv.c +++ b/src/nouveau_xv.c @@ -25,6 +25,8 @@ #include "config.h" #endif +#include <immintrin.h> + #include "xf86xv.h" #include <X11/extensions/Xv.h> #include "exa.h" @@ -532,30 +534,47 @@ NVCopyNV12ColorPlanes(unsigned char *src1, unsigned char *src2, w >>= 1; h >>= 1; +#ifdef __SSE2__ + l = w >> 3; + e = w & 7; +#else l = w >> 1; e = w & 1; +#endif for (j = 0; j < h; j++) { unsigned char *us = src1; unsigned char *vs = src2; unsigned int *vuvud = (unsigned int *) dst; + unsigned short *vud; for (i = 0; i < l; i++) { -#if X_BYTE_ORDER == X_BIG_ENDIAN +#ifdef __SSE2__ + _mm_storeu_si128( + (void*)vuvud, + _mm_unpacklo_epi8( + _mm_loadl_epi64((void*)vs), + _mm_loadl_epi64((void*)us))); + vuvud+=4; + us+=8; + vs+=8; +#else /* __SSE2__ */ +# if X_BYTE_ORDER == X_BIG_ENDIAN *vuvud++ = (vs[0]<<24) | (us[0]<<16) | (vs[1]<<8) | us[1]; -#else +# else *vuvud++ = vs[0] | (us[0]<<8) | (vs[1]<<16) | (us[1]<<24); -#endif +# endif us+=2; vs+=2; +#endif /* __SSE2__ */ } - if (e) { - unsigned short *vud = (unsigned short *) vuvud; + vud = (unsigned short *)vuvud; + for (i = 0; i < e; i++) { #if X_BYTE_ORDER == X_BIG_ENDIAN - *vud = us[0] | (vs[0]<<8); + vud[i] = us[i] | (vs[i]<<8); #else - *vud = vs[0] | (us[0]<<8); + vud[i] = vs[i] | (us[i]<<8); #endif } commit 08c667b06d28756d0d32f82bd736b0bdf2b4448e Author: Ilia Mirkin <[email protected]> Date: Mon Jul 29 02:40:38 2013 -0400 xv: fix last pixel for big-endian machines in YV12 -> NV12 conversion Signed-off-by: Ilia Mirkin <[email protected]> Signed-off-by: Ben Skeggs <[email protected]> diff --git a/src/nouveau_xv.c b/src/nouveau_xv.c index 8eafcf0..567e30c 100644 --- a/src/nouveau_xv.c +++ b/src/nouveau_xv.c @@ -552,8 +552,11 @@ NVCopyNV12ColorPlanes(unsigned char *src1, unsigned char *src2, if (e) { unsigned short *vud = (unsigned short *) vuvud; - +#if X_BYTE_ORDER == X_BIG_ENDIAN + *vud = us[0] | (vs[0]<<8); +#else *vud = vs[0] | (us[0]<<8); +#endif } dst += dstPitch; commit 8c1c5d4f212958559132506d51dcfeeb17f60371 Author: Ben Skeggs <[email protected]> Date: Wed May 15 21:34:13 2013 +1000 nvf0: implement EXA and XVideo acceleration Signed-off-by: Ben Skeggs <[email protected]> diff --git a/src/nvc0_accel.c b/src/nvc0_accel.c index df6a6b8..0694402 100644 --- a/src/nvc0_accel.c +++ b/src/nvc0_accel.c @@ -43,6 +43,16 @@ #include "shader/exas8nve0.fp" #include "shader/exac8nve0.fp" +#include "shader/xfrm2nvf0.vp" +#include "shader/videonvf0.fp" + +#include "shader/exascnvf0.fp" +#include "shader/exacmnvf0.fp" +#include "shader/exacanvf0.fp" +#include "shader/exasanvf0.fp" +#include "shader/exas8nvf0.fp" +#include "shader/exac8nvf0.fp" + #define NVC0PushProgram(pNv,addr,code) do { \ const unsigned size = sizeof(code) / sizeof(code[0]); \ PUSH_DATAu((pNv)->pushbuf, (pNv)->scratch, (addr), size); \ @@ -136,10 +146,11 @@ NVAccelInitP2MF_NVE0(ScrnInfoPtr pScrn) { NVPtr pNv = NVPTR(pScrn); struct nouveau_pushbuf *push = pNv->pushbuf; + uint32_t class = (pNv->dev->chipset < 0xf0) ? 0xa040 : 0xa140; int ret; - ret = nouveau_object_new(pNv->channel, 0x0000a040, 0xa040, - NULL, 0, &pNv->NvMemFormat); + ret = nouveau_object_new(pNv->channel, class, class, NULL, 0, + &pNv->NvMemFormat); if (ret) return FALSE; @@ -224,9 +235,13 @@ NVAccelInit3D_NVC0(ScrnInfoPtr pScrn) if (pNv->Architecture < NV_ARCH_E0) { class = 0x9097; handle = 0x001f906e; - } else { + } else + if (pNv->dev->chipset < 0xf0) { class = 0xa097; handle = 0x0000906e; + } else { + class = 0xa197; + handle = 0x0000906e; } ret = nouveau_object_new(pNv->channel, class, class, @@ -325,7 +340,8 @@ NVAccelInit3D_NVC0(ScrnInfoPtr pScrn) BEGIN_NVC0(push, NVC0_3D(MEM_BARRIER), 1); PUSH_DATA (push, 0x1111); - } else { + } else + if (pNv->dev->chipset < 0xf0) { NVC0PushProgram(pNv, PVP_PASS, NVE0VP_Transform2); NVC0PushProgram(pNv, PFP_S, NVE0FP_Source); NVC0PushProgram(pNv, PFP_C, NVE0FP_Composite); @@ -334,6 +350,15 @@ NVAccelInit3D_NVC0(ScrnInfoPtr pScrn) NVC0PushProgram(pNv, PFP_S_A8, NVE0FP_Source_A8); NVC0PushProgram(pNv, PFP_C_A8, NVE0FP_Composite_A8); NVC0PushProgram(pNv, PFP_NV12, NVE0FP_NV12); + } else { + NVC0PushProgram(pNv, PVP_PASS, NVF0VP_Transform2); + NVC0PushProgram(pNv, PFP_S, NVF0FP_Source); + NVC0PushProgram(pNv, PFP_C, NVF0FP_Composite); + NVC0PushProgram(pNv, PFP_CCA, NVF0FP_CAComposite); + NVC0PushProgram(pNv, PFP_CCASA, NVF0FP_CACompositeSrcAlpha); + NVC0PushProgram(pNv, PFP_S_A8, NVF0FP_Source_A8); + NVC0PushProgram(pNv, PFP_C_A8, NVF0FP_Composite_A8); + NVC0PushProgram(pNv, PFP_NV12, NVF0FP_NV12); } BEGIN_NVC0(push, NVC0_3D(SP_SELECT(1)), 4); diff --git a/src/shader/Makefile b/src/shader/Makefile index 59e549f..46658e9 100644 --- a/src/shader/Makefile +++ b/src/shader/Makefile @@ -14,8 +14,16 @@ NVE0_SHADERS = xfrm2nve0.vpc \ exas8nve0.fpc \ exac8nve0.fpc \ videonve0.fpc +NVF0_SHADERS = xfrm2nvf0.vpc \ + exascnvf0.fpc \ + exacmnvf0.fpc \ + exacanvf0.fpc \ + exasanvf0.fpc \ + exas8nvf0.fpc \ + exac8nvf0.fpc \ + videonvf0.fpc -SHADERS = $(NVC0_SHADERS) $(NVE0_SHADERS) +SHADERS = $(NVC0_SHADERS) $(NVE0_SHADERS) $(NVF0_SHADERS) all: $(SHADERS) @@ -28,3 +36,8 @@ $(filter %nve0.vpc,$(SHADERS)): %.vpc: %.vp cpp -DENVYAS $< | sed -e '/^#/d' | envyas -w -m nvc0 -V nve4 -o $@ $(filter %nve0.fpc,$(SHADERS)): %.fpc: %.fp cpp -DENVYAS $< | sed -e '/^#/d' | envyas -w -m nvc0 -V nve4 -o $@ + +$(filter %nvf0.vpc,$(SHADERS)): %.vpc: %.vp + cpp -DENVYAS $< | sed -e '/^#/d' | envyas -w -m gk110 -o $@ +$(filter %nvf0.fpc,$(SHADERS)): %.fpc: %.fp + cpp -DENVYAS $< | sed -e '/^#/d' | envyas -w -m gk110 -o $@ diff --git a/src/shader/exac8nvf0.fp b/src/shader/exac8nvf0.fp new file mode 100644 index 0000000..e4a7b04 --- /dev/null +++ b/src/shader/exac8nvf0.fp @@ -0,0 +1,42 @@ +#ifndef ENVYAS +static uint32_t +NVF0FP_Composite_A8[] = { + 0x00001462, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x80000000, + 0x00000a0a, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x0000000f, + 0x00000000, +#include "exac8nvf0.fpc" +}; +#else + +interp pass f32 $r0 a[0x7c] 0x0 0x0 0x0 +rcp f32 $r0 $r0 +interp mul f32 $r3 a[0x94] $r0 0x0 0x0 +interp mul f32 $r2 a[0x90] $r0 0x0 0x0 +tex t lauto #:#:#:$r1 t2d c[0x4] xy__ $r2:$r3 0x0 +interp mul f32 $r3 a[0x84] $r0 0x0 0x0 +interp mul f32 $r2 a[0x80] $r0 0x0 0x0 +tex t lauto #:#:#:$r0 t2d c[0x0] xy__ $r2:$r3 0x0 +texbar 0x0 +mul ftz rn f32 $r3 $r0 $r1 +mov b32 $r2 $r3 +mov b32 $r1 $r3 +mov b32 $r0 $r3 +exit +#endif diff --git a/src/shader/exac8nvf0.fpc b/src/shader/exac8nvf0.fpc new file mode 100644 index 0000000..465cabf --- /dev/null +++ b/src/shader/exac8nvf0.fpc @@ -0,0 +1,28 @@ +0x7f9ffc02, +0x7483fc3e, +0x021c0002, +0x84000000, +0x001ffc0e, +0x74a3fc4a, +0x001ffc0a, +0x74a3fc48, +0x7f9c0805, +0x600080a1, +0x001ffc0e, +0x74a3fc42, +0x001ffc0a, +0x74a3fc40, +0x7f9c0801, +0x600000a1, +0x001c0002, +0x77000000, +0x009c000e, +0xe3408000, +0x019c000a, +0xe4c03c00, +0x019c0006, +0xe4c03c00, +0x019c0002, +0xe4c03c00, +0x001c003c, +0x18000000, diff --git a/src/shader/exacanvf0.fp b/src/shader/exacanvf0.fp new file mode 100644 index 0000000..338a1e1 --- /dev/null +++ b/src/shader/exacanvf0.fp @@ -0,0 +1,43 @@ +#ifndef ENVYAS +static uint32_t +NVF0FP_CAComposite[] = { + 0x00001462, /* 0x0000c000 = USES_KIL, MULTI_COLORS */ + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x80000000, /* FRAG_COORD_UMASK = 0x8 */ + 0x00000a0a, /* FP_INTERP[0x080], 0022 0022 */ + 0x00000000, /* FP_INTERP[0x0c0], 0 = OFF */ + 0x00000000, /* FP_INTERP[0x100], 1 = FLAT */ + 0x00000000, /* FP_INTERP[0x140], 2 = PERSPECTIVE */ + 0x00000000, /* FP_INTERP[0x180], 3 = LINEAR */ + 0x00000000, /* FP_INTERP[0x1c0] */ + 0x00000000, /* FP_INTERP[0x200] */ + 0x00000000, /* FP_INTERP[0x240] */ + 0x00000000, /* FP_INTERP[0x280] */ + 0x00000000, /* FP_INTERP[0x2c0] */ + 0x00000000, /* FP_INTERP[0x300] */ + 0x00000000, + 0x0000000f, /* FP_RESULT_MASK (0x8000 Face ?) */ + 0x00000000, /* 0x2 = FragDepth, 0x1 = SampleMask */ +#include "exacanvf0.fpc" +}; +#else + +interp pass f32 $r0 a[0x7c] 0x0 0x0 0x0 +rcp f32 $r0 $r0 +interp mul f32 $r3 a[0x94] $r0 0x0 0x0 +interp mul f32 $r2 a[0x90] $r0 0x0 0x0 +tex t lauto $r4:$r5:$r6:$r7 t2d c[0x4] xy__ $r2:$r3 0x0 +texbar 0x0 +interp mul f32 $r1 a[0x84] $r0 0x0 0x0 +interp mul f32 $r0 a[0x80] $r0 0x0 0x0 +tex t lauto $r0:$r1:$r2:$r3 t2d c[0x0] xy__ $r0:$r1 0x0 +texbar 0x0 +mul ftz rn f32 $r3 $r3 $r7 +mul ftz rn f32 $r2 $r2 $r6 +mul ftz rn f32 $r1 $r1 $r5 +mul ftz rn f32 $r0 $r0 $r4 +exit +#endif diff --git a/src/shader/exacanvf0.fpc b/src/shader/exacanvf0.fpc new file mode 100644 index 0000000..70dd4b1 --- /dev/null +++ b/src/shader/exacanvf0.fpc @@ -0,0 +1,30 @@ +0x7f9ffc02, +0x7483fc3e, +0x021c0002, +0x84000000, +0x001ffc0e, +0x74a3fc4a, +0x001ffc0a, +0x74a3fc48, +0x7f9c0811, +0x600080bd, +0x001c0002, +0x77000000, +0x001ffc06, +0x74a3fc42, +0x001ffc02, +0x74a3fc40, +0x7f9c0001, +0x600000bd, +0x001c0002, +0x77000000, +0x039c0c0e, +0xe3408000, +0x031c080a, +0xe3408000, +0x029c0406, +0xe3408000, +0x021c0002, +0xe3408000, +0x001c003c, +0x18000000, diff --git a/src/shader/exacmnvf0.fp b/src/shader/exacmnvf0.fp new file mode 100644 index 0000000..787b4f5 --- /dev/null +++ b/src/shader/exacmnvf0.fp @@ -0,0 +1,43 @@ +#ifndef ENVYAS +static uint32_t +NVF0FP_Composite[] = { + 0x00001462, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x80000000, + 0x00000a0a, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x0000000f, + 0x00000000, +#include "exacmnvf0.fpc" +}; +#else + +interp pass f32 $r0 a[0x7c] 0x0 0x0 0x0 +rcp f32 $r0 $r0 +interp mul f32 $r3 a[0x94] $r0 0x0 0x0 +interp mul f32 $r2 a[0x90] $r0 0x0 0x0 +tex t lauto #:#:#:$r4 t2d c[0x4] xy__ $r2:$r3 0x0 +texbar 0x0 +interp mul f32 $r1 a[0x84] $r0 0x0 0x0 +interp mul f32 $r0 a[0x80] $r0 0x0 0x0 +tex t lauto $r0:$r1:$r2:$r3 t2d c[0x0] xy__ $r0:$r1 0x0 +texbar 0x0 +mul ftz rn f32 $r3 $r3 $r4 +mul ftz rn f32 $r2 $r2 $r4 +mul ftz rn f32 $r1 $r1 $r4 +mul ftz rn f32 $r0 $r0 $r4 +exit +#endif diff --git a/src/shader/exacmnvf0.fpc b/src/shader/exacmnvf0.fpc new file mode 100644 index 0000000..b2acf6f --- /dev/null +++ b/src/shader/exacmnvf0.fpc @@ -0,0 +1,30 @@ +0x7f9ffc02, +0x7483fc3e, +0x021c0002, +0x84000000, +0x001ffc0e, +0x74a3fc4a, +0x001ffc0a, +0x74a3fc48, +0x7f9c0811, +0x600080a1, +0x001c0002, +0x77000000, +0x001ffc06, +0x74a3fc42, +0x001ffc02, +0x74a3fc40, +0x7f9c0001, +0x600000bd, +0x001c0002, +0x77000000, +0x021c0c0e, +0xe3408000, +0x021c080a, +0xe3408000, +0x021c0406, +0xe3408000, +0x021c0002, +0xe3408000, +0x001c003c, +0x18000000, diff --git a/src/shader/exas8nvf0.fp b/src/shader/exas8nvf0.fp new file mode 100644 index 0000000..3804b27 --- /dev/null +++ b/src/shader/exas8nvf0.fp @@ -0,0 +1,38 @@ +#ifndef ENVYAS +static uint32_t +NVF0FP_Source_A8[] = { + 0x00001462, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x80000000, + 0x0000000a, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x00000000, + 0x0000000f, + 0x00000000, +#include "exas8nvf0.fpc" +}; +#else + +interp pass f32 $r0 a[0x7c] 0x0 0x0 0x0 +rcp f32 $r0 $r0 +interp mul f32 $r1 a[0x84] $r0 0x0 0x0 +interp mul f32 $r0 a[0x80] $r0 0x0 0x0 +tex t lauto #:#:#:$r0 t2d c[0x0] xy__ $r0:$r1 0x0 +texbar 0x0 +mov b32 $r3 $r0 +mov b32 $r2 $r0 +mov b32 $r1 $r0 +exit +#endif diff --git a/src/shader/exas8nvf0.fpc b/src/shader/exas8nvf0.fpc new file mode 100644 index 0000000..4ec3bb7 --- /dev/null +++ b/src/shader/exas8nvf0.fpc @@ -0,0 +1,20 @@ +0x7f9ffc02, -- To UNSUBSCRIBE, email to [email protected] with a subject of "unsubscribe". Trouble? Contact [email protected] Archive: http://lists.debian.org/[email protected]

