Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[xsrc/trunk]: xsrc/external/mit/xf86-video-nv/dist/src for some reason my 680...



details:   https://anonhg.NetBSD.org/xsrc/rev/8f976b4930ce
branches:  trunk
changeset: 9991:8f976b4930ce
user:      macallan <macallan%NetBSD.org@localhost>
date:      Fri Oct 05 01:53:54 2018 +0000

description:
for some reason my 6800 Ultra stalls when drawing *some* off-screen rectangles
as a workaround, draw them by software until I figure out what's going on

diffstat:

 external/mit/xf86-video-nv/dist/src/nv_exa.c |  24 +++++++++++++++++++-----
 1 files changed, 19 insertions(+), 5 deletions(-)

diffs (64 lines):

diff -r 6581069865f1 -r 8f976b4930ce external/mit/xf86-video-nv/dist/src/nv_exa.c
--- a/external/mit/xf86-video-nv/dist/src/nv_exa.c      Fri Sep 21 18:33:08 2018 +0000
+++ b/external/mit/xf86-video-nv/dist/src/nv_exa.c      Fri Oct 05 01:53:54 2018 +0000
@@ -21,7 +21,7 @@
  * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
  */
 
-/* $NetBSD: nv_exa.c,v 1.4 2018/07/26 21:29:16 macallan Exp $ */
+/* $NetBSD: nv_exa.c,v 1.5 2018/10/05 01:53:54 macallan Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include "config.h"
@@ -114,7 +114,7 @@
        NVDmaNext (pNv, (h  << 16) | w);
 
        if((w * h) >= 512)
-               NVDmaKickoff(pNv); 
+               NVDmaKickoff(pNv);
 
        LEAVE;
 }
@@ -141,9 +141,19 @@
        if (pPixmap->drawable.bitsPerPixel != 32)
                xf86Msg(X_ERROR, "%s %d bpp\n", __func__, pPixmap->drawable.bitsPerPixel);
        planemask |= ~0 << pNv->CurrentLayout.depth;
+       off = exaGetPixmapOffset(pPixmap);
+
+       /* 
+        * XXX
+        * on my 6800 Ultra the drawing engine stalls when drawing at least
+        * rectangles into off-screen memory. Draw them by software until I figure out
+        * what's going on
+        */
+       if (off != 0) return FALSE;
+       
+       NVSetRopSolid(pScrn, rop, planemask);
 
        pitch = exaGetPixmapPitch(pPixmap);
-       off = exaGetPixmapOffset(pPixmap);
 
        NVDmaStart(pNv, SURFACE_FORMAT, 4);
        NVDmaNext (pNv, pNv->surfaceFormat);
@@ -154,8 +164,6 @@
        NVDmaStart(pNv, RECT_FORMAT, 1);
        NVDmaNext (pNv, pNv->rectFormat);
 
-       NVSetRopSolid(pScrn, rop, planemask);
-
        NVDmaStart(pNv, RECT_SOLID_COLOR, 1);
        NVDmaNext (pNv, color);
 
@@ -324,6 +332,12 @@
        NVDmaStart(pNv, RECT_FORMAT, 1);
        NVDmaNext (pNv, pNv->rectFormat);
 
+       NVDmaStart(pNv, PATTERN_COLOR_0, 4);
+       NVDmaNext (pNv, 0xffffffff);
+       NVDmaNext (pNv, 0xffffffff);
+       NVDmaNext (pNv, 0xffffffff);
+       NVDmaNext (pNv, 0xffffffff);
+
        pNv->currentRop = ~0;  /* set to something invalid */
        NVSetRopSolid(pScrn, GXcopy, ~0);
 



Home | Main Index | Thread Index | Old Index