From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Kcgbq-0005s7-Pn for qemu-devel@nongnu.org; Mon, 08 Sep 2008 09:16:50 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Kcgbo-0005rv-DH for qemu-devel@nongnu.org; Mon, 08 Sep 2008 09:16:49 -0400 Received: from [199.232.76.173] (port=36459 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Kcgbo-0005rs-8a for qemu-devel@nongnu.org; Mon, 08 Sep 2008 09:16:48 -0400 Received: from mail2.shareable.org ([80.68.89.115]:39066) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1Kcgbn-0005Wr-Pj for qemu-devel@nongnu.org; Mon, 08 Sep 2008 09:16:48 -0400 Received: from jamie by mail2.shareable.org with local (Exim 4.63) (envelope-from ) id 1Kcgbg-0001VS-3u for qemu-devel@nongnu.org; Mon, 08 Sep 2008 14:16:40 +0100 Date: Mon, 8 Sep 2008 14:16:39 +0100 From: Jamie Lokier Subject: Re: [Qemu-devel] [PATCH] opengl rendering in the sdl window Message-ID: <20080908131639.GB4947@shareable.org> 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> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <48C348D3.6070702@codemonkey.ws> 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 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. -- Jamie