xorg-x11-server/xorg-x11-server-1.1.1-offscreen-pixmaps.patch
Adam Jackson 336a7e768b * Mon May 07 2007 Adam Jackson <ajax@redhat.com> 1.3.0.0-4
- xorg-x11-server-1.1.1-offscreen-pixmaps.patch: Fix a crash when activating
  GLX_EXT_texture_from_pixmap without XAA.
- xserver-1.3.0-randr12-config-hack.patch: If a Modes line is given in
  the Screen section, and no PreferredMode option is given for a RANDR 1.2
  monitor, use the first mode in the Modes line as the preferred mode.
  Fixes anaconda ugliness on monitors larger than 800x600. (#238991)
2007-05-07 18:18:16 +00:00

59 lines
1.7 KiB
Diff

--- xorg-server-1.3.0.0/GL/glx/glxdri.c.offscreen-pixmaps 2007-04-09 15:59:09.000000000 -0400
+++ xorg-server-1.3.0.0/GL/glx/glxdri.c 2007-05-07 11:35:04.000000000 -0400
@@ -327,6 +327,22 @@
int bpp;
GLenum target, format, type;
+ /* When the GLX_EXT_texture_from_pixmap is used, as it's
+ * implemented here, we want to pull pixmap out of video memory
+ * and into host memory. */
+ {
+ extern void XAAEvictPixmaps(void);
+ static int evictedPixmaps = 0;
+
+ if (!evictedPixmaps) {
+ __glXDRIenterServer();
+ if (dlsym(RTLD_DEFAULT, "XAAEvictPixmaps"))
+ XAAEvictPixmaps();
+ __glXDRIleaveServer();
+ evictedPixmaps = TRUE;
+ }
+ }
+
pixmap = (PixmapPtr) glxPixmap->pDraw;
if (!glxPixmap->pDamage) {
glxPixmap->pDamage = DamageCreate(NULL, NULL, DamageReportNone,
--- xorg-server-1.3.0.0/hw/xfree86/xaa/xaaInit.c.offscreen-pixmaps 2006-09-18 02:04:18.000000000 -0400
+++ xorg-server-1.3.0.0/hw/xfree86/xaa/xaaInit.c 2007-05-07 11:25:56.000000000 -0400
@@ -97,6 +97,30 @@
xfree(infoRec);
}
+void
+XAAEvictPixmaps(void)
+{
+ XAAScreenPtr pScreenPriv;
+ XAAInfoRecPtr infoRec;
+ ScreenPtr pScreen;
+ int i;
+
+ xf86MsgVerb(X_INFO, 3, "XAA: Evicting pixmaps\n");
+
+ for (i = 0; i < screenInfo.numScreens; i++) {
+ pScreen = screenInfo.screens[i];
+ infoRec = GET_XAAINFORECPTR_FROM_SCREEN(pScreen);
+
+ pScreenPriv = pScreen->devPrivates[XAAScreenIndex].ptr;
+ infoRec = pScreenPriv->AccelInfoRec;
+
+ infoRec->offscreenDepths = 0;
+ infoRec->Flags &= ~OFFSCREEN_PIXMAPS;
+
+ XAAMoveOutOffscreenPixmaps(pScreen);
+ XAAInvalidatePixmapCache(pScreen);
+ }
+}
Bool
XAAInit(ScreenPtr pScreen, XAAInfoRecPtr infoRec)