sw/xlib: Fallback to XPutImage when shmget fails.
authorJosé Fonseca <jfonseca@vmware.com>
Fri, 23 Apr 2010 15:56:55 +0000 (16:56 +0100)
committerJosé Fonseca <jfonseca@vmware.com>
Fri, 23 Apr 2010 16:08:11 +0000 (17:08 +0100)
After continuously running regression tests on Ubuntu for 2 days, shmget
mysteriously starts to fail. Even when the X server is reset.

This allow rendering to proceed, albeit using a slower presentation path.

src/gallium/winsys/sw/xlib/xlib_sw_winsys.c

index ec4f919d08233508a6f9604f31b44991e4faacdd..278a191a0e5029bb2f9d4d39e1683c50e7686fcd 100644 (file)
@@ -385,13 +385,12 @@ xm_displaytarget_create(struct sw_winsys *winsys,
 
    if (!debug_get_bool_option("XLIB_NO_SHM", FALSE))
    {
-      xm_dt->shminfo.shmid = -1;
-      xm_dt->shminfo.shmaddr = (char *) -1;
-      xm_dt->shm = TRUE;
-         
       xm_dt->data = alloc_shm(xm_dt, size);
-      if(!xm_dt->data)
-         goto no_data;
+      if(!xm_dt->data) {
+         xm_dt->shminfo.shmid = -1;
+         xm_dt->shminfo.shmaddr = (char *) -1;
+         xm_dt->shm = TRUE;
+      }
    }
 
    if(!xm_dt->data) {