Replace glMemoryBarrier with a workaround for ATI/AMD cards instead of generally adding glFlush.