Date: Mon, 6 Mar 2017 00:47:59 -0800 From: David Shao <davshao@gmail.com> To: freebsd-x11@freebsd.org Subject: libdrm atomic_add_unless may reverse meaning Message-ID: <CABZaEK4=d8Aze5ymOxdCaidYKq=zL8DDeP0xxeYPdcWWDwhJ6Q@mail.gmail.com>
next in thread | raw e-mail | index | archive | help
For those who have frustrating glitches with applications such as glxgears on Intel integrated graphics, the following libdrm bug report may be of interest. https://bugs.freedesktop.org/show_bug.cgi?id=100077 "libdrm atomic_add_unless() may reverse return value meaning" A one character patch allows glxgears to run on DragonFly using a hacked version of pkgsrc on an Intel IvyBridge integrated graphics machine. --- xf86atomic.h.orig 2015-09-22 04:34:51.000000000 +0000 +++ xf86atomic.h @@ -111,7 +111,7 @@ static inline int atomic_add_unless(atom c = atomic_read(v); while (c != unless && (old = atomic_cmpxchg(v, c, c + add)) != c) c = old; - return c == unless; + return c != unless; } #endif
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CABZaEK4=d8Aze5ymOxdCaidYKq=zL8DDeP0xxeYPdcWWDwhJ6Q>