Contents of /trunk/xorg-server/patches/xorg-server-1.1.1-aiglx-offscreen-pixmaps.patch
Parent Directory | Revision Log
Revision 153 -
(show annotations)
(download)
Tue May 8 20:52:56 2007 UTC (17 years, 4 months ago) by niro
File size: 1548 byte(s)
Tue May 8 20:52:56 2007 UTC (17 years, 4 months ago) by niro
File size: 1548 byte(s)
-import
1 | --- ./hw/xfree86/xaa/xaaInit.c.offscreen-pixmaps 2006-07-05 14:31:42.000000000 -0400 |
2 | +++ ./hw/xfree86/xaa/xaaInit.c 2006-08-30 16:47:29.000000000 -0400 |
3 | @@ -98,6 +98,30 @@ |
4 | xfree(infoRec); |
5 | } |
6 | |
7 | +void |
8 | +XAAEvictPixmaps(void) |
9 | +{ |
10 | + XAAScreenPtr pScreenPriv; |
11 | + XAAInfoRecPtr infoRec; |
12 | + ScreenPtr pScreen; |
13 | + int i; |
14 | + |
15 | + xf86MsgVerb(X_INFO, 3, "XAA: Evicting pixmaps\n"); |
16 | + |
17 | + for (i = 0; i < screenInfo.numScreens; i++) { |
18 | + pScreen = screenInfo.screens[i]; |
19 | + infoRec = GET_XAAINFORECPTR_FROM_SCREEN(pScreen); |
20 | + |
21 | + pScreenPriv = pScreen->devPrivates[XAAScreenIndex].ptr; |
22 | + infoRec = pScreenPriv->AccelInfoRec; |
23 | + |
24 | + infoRec->offscreenDepths = 0; |
25 | + infoRec->Flags &= ~OFFSCREEN_PIXMAPS; |
26 | + |
27 | + XAAMoveOutOffscreenPixmaps(pScreen); |
28 | + XAAInvalidatePixmapCache(pScreen); |
29 | + } |
30 | +} |
31 | |
32 | Bool |
33 | XAAInit(ScreenPtr pScreen, XAAInfoRecPtr infoRec) |
34 | --- ./GL/glx/glxdri.c.offscreen-pixmaps 2006-08-30 16:46:45.000000000 -0400 |
35 | +++ ./GL/glx/glxdri.c 2006-08-30 16:45:52.000000000 -0400 |
36 | @@ -367,6 +367,19 @@ |
37 | int bpp; |
38 | GLenum target, format, type; |
39 | |
40 | + /* When the GLX_EXT_texture_from_pixmap is used, as it's |
41 | + * implemented here, we want to pull pixmap out of video memory |
42 | + * and into host memory. */ |
43 | + { |
44 | + extern void XAAEvictPixmaps(void); |
45 | + static int evictedPixmaps; |
46 | + |
47 | + if (!evictedPixmaps) { |
48 | + XAAEvictPixmaps(); |
49 | + evictedPixmaps = TRUE; |
50 | + } |
51 | + } |
52 | + |
53 | pixmap = (PixmapPtr) glxPixmap->pDraw; |
54 | if (!glxPixmap->pDamage) { |
55 | glxPixmap->pDamage = DamageCreate(NULL, NULL, DamageReportNone, |