From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Kch8Q-0003cH-4M for qemu-devel@nongnu.org; Mon, 08 Sep 2008 09:50:30 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Kch8M-0003bh-Hk for qemu-devel@nongnu.org; Mon, 08 Sep 2008 09:50:29 -0400 Received: from [199.232.76.173] (port=53626 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Kch8M-0003be-Al for qemu-devel@nongnu.org; Mon, 08 Sep 2008 09:50:26 -0400 Received: from smtp.eu.citrix.com ([62.200.22.115]:30155) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1Kch8L-0004o4-S4 for qemu-devel@nongnu.org; Mon, 08 Sep 2008 09:50:26 -0400 Message-ID: <48C52DD9.7030906@eu.citrix.com> Date: Mon, 08 Sep 2008 14:51:21 +0100 From: Stefano Stabellini MIME-Version: 1.0 Subject: Re: [Qemu-devel] [PATCH] opengl rendering in the sdl window References: <48B81423.9050502@eu.citrix.com> <48BF4F4F.40208@codemonkey.ws> <48BFB318.206@eu.citrix.com> <20080905120214.GD1373@shareable.org> <48C16207.5090808@eu.citrix.com> <20080905165536.GA12606@redhat.com> <48C168CE.5040700@eu.citrix.com> <48C348D3.6070702@codemonkey.ws> <20080908131639.GB4947@shareable.org> In-Reply-To: <20080908131639.GB4947@shareable.org> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Jamie Lokier wrote: > Anthony Liguori wrote: >> I'd like to see if it really makes a difference performance wise to >> render with OpenGL. I've had good results in the past using software >> bilinear interpolation to do scaling. If OpenGL doesn't provide a >> measurable performance advantage, doing it in software may be the right >> thing to do. > > Software interpolation, especially bilinear or other filter, is > relatively slow if you're expanding a lot of pixels e.g. 640x384 to > 1920x1200. OpenGL will surely beat it. > > On the other hand, OpenGL can to be relatively slow (in my experience) > if there is no colour conversion and scaling to do and X11-SHM would > be a straight 2d blit on the server side. > > In principle OpenGL should as fast as the 2d blit or faster on > implementations where the image in client app's memory is a > memory-mapped texture, but that seems to be still a work in progress > on BSD and Linux. DRI2 was dropped this summer because the TTM > texture memory manager was ousted in favour of the GEM texture memory > manager... and they haven't caught up with each other yet. You need > some kind of good shared texture memory to get great speed out of > OpenGL displaying a texture which is being constantly updated by the > client app. > > Imho, if there is an OpenGL backend (overlaid on SDL, Xlib, or > whatever), it should be a switch, for the next few years probably > defaulting to X11-SHM (or plain X11 when remote), and changing the > default to OpenGL in a few years when that's working really well > everywhere. > I agree with you on everything.