summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGeorge Sapountzis <gsap7@yahoo.gr>2006-08-05 03:18:34 +0300
committerGeorge Sapountzis <gsap7@yahoo.gr>2006-08-05 03:18:34 +0300
commita1da2b5e0a38feae01107676a76bdc5c185ad34b (patch)
treee3c894c57c03723ea9e798194fa0135aa1efbf67
parenta66c8d2f9855caa10142b39f155dd8232b1f2389 (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.
-rw-r--r--src/atimach64.c30
-rw-r--r--src/atimach64accel.h4
2 files changed, 25 insertions, 9 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) |
diff --git a/src/atimach64accel.h b/src/atimach64accel.h
index 2917b7a4..973f2ba8 100644
--- a/src/atimach64accel.h
+++ b/src/atimach64accel.h
@@ -29,8 +29,8 @@
#include "xaa.h"
#include "exa.h"
-#define ATIMach64MaxX 8191
-#define ATIMach64MaxY 32767
+#define ATIMach64MaxX 4095
+#define ATIMach64MaxY 16383
#ifdef USE_EXA
extern Bool ATIMach64ExaInit(ScreenPtr);