diff options
author | George Sapountzis <gsap7@yahoo.gr> | 2006-08-05 03:18:34 +0300 |
---|---|---|
committer | George Sapountzis <gsap7@yahoo.gr> | 2006-08-05 03:18:34 +0300 |
commit | a1da2b5e0a38feae01107676a76bdc5c185ad34b (patch) | |
tree | e3c894c57c03723ea9e798194fa0135aa1efbf67 /src/atimach64.c | |
parent | a66c8d2f9855caa10142b39f155dd8232b1f2389 (diff) |
[mach64] Halve max w/h for hardware-accelerated operations.
EXA hits these limits for some operations on offscreen pixmaps and GTPRO seems
to support the reduced limits.
Diffstat (limited to 'src/atimach64.c')
-rw-r--r-- | src/atimach64.c | 30 |
1 files changed, 23 insertions, 7 deletions
diff --git a/src/atimach64.c b/src/atimach64.c index 5cb991dd..cc3a3cb0 100644 --- a/src/atimach64.c +++ b/src/atimach64.c @@ -84,7 +84,6 @@ ATIMach64PreInit ) { CARD32 bus_cntl, config_cntl; - int tmp; #ifndef AVOID_CPIO @@ -258,12 +257,29 @@ ATIMach64PreInit pATIHW->src_cntl = SRC_LINE_X_DIR; /* Initialise scissor, allowing for offscreen areas */ - pATIHW->sc_right = (pATI->displayWidth * pATI->XModifier) - 1; - tmp = pATI->displayWidth * pATI->bitsPerPixel; - tmp = (((pScreenInfo->videoRam * (1024 * 8)) + tmp - 1) / tmp) - 1; - if (tmp > ATIMach64MaxY) - tmp = ATIMach64MaxY; - pATIHW->sc_bottom = tmp; +#ifdef USE_XAA + if (!pATI->useEXA) + { + int width, height, total; + + pATIHW->sc_right = (pATI->displayWidth * pATI->XModifier) - 1; + width = pATI->displayWidth * pATI->bitsPerPixel; + total = pScreenInfo->videoRam * (1024 * 8); + height = (total + width - 1) / width; + if (height > ATIMach64MaxY + 1) + height = ATIMach64MaxY + 1; + pATIHW->sc_bottom = height - 1; + } +#endif /* USE_XAA */ + +#ifdef USE_EXA + if (pATI->useEXA) + { + pATIHW->sc_right = ATIMach64MaxX; + pATIHW->sc_bottom = ATIMach64MaxY; + } +#endif /* USE_EXA */ + pATI->sc_left_right = SetWord(pATI->NewHW.sc_right, 1) | SetWord(pATI->NewHW.sc_left, 0); pATI->sc_top_bottom = SetWord(pATI->NewHW.sc_bottom, 1) | |