From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Kauvv-0005H6-1e for qemu-devel@nongnu.org; Wed, 03 Sep 2008 12:10:15 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Kauvt-0005Gm-H5 for qemu-devel@nongnu.org; Wed, 03 Sep 2008 12:10:14 -0400 Received: from [199.232.76.173] (port=46470 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Kauvt-0005Gj-C6 for qemu-devel@nongnu.org; Wed, 03 Sep 2008 12:10:13 -0400 Received: from smtp.eu.citrix.com ([62.200.22.115]:56035) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1Kauvt-0002gJ-0d for qemu-devel@nongnu.org; Wed, 03 Sep 2008 12:10:13 -0400 Message-ID: <48BEB743.5050805@eu.citrix.com> Date: Wed, 03 Sep 2008 17:11:47 +0100 From: Stefano Stabellini MIME-Version: 1.0 Subject: Re: [Qemu-devel] [PATCH] sdl shared buffer support References: <48B813FA.7010206@eu.citrix.com> <48BE68E8.7050404@eu.citrix.com> In-Reply-To: <48BE68E8.7050404@eu.citrix.com> 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 Stefano Stabellini wrote: > Blue Swirl wrote: > >> This function is broken if BGR-ness of the display is not equal to >> emulated device BGR-ness. >> > > good catch! > I am going to send an updated version of this and the opengl patch soon > to fix the issue. > I replied to this email a little too fast: reading vga.c and vga_template.h again more carefully it occurred to me that the guest is always RGB, only the host can set the sdl display to BGR. Hence we don't need to handle this case in sdl_setdata, because if there is any difference in depth or subpixel ordering between host and guest, is up to SDL_BlitSurface to solve it. But there is a similar issue that I wasn't handling: guest big endian and host little endian or vice versa. In fact I need to set different colour masks in sdl setdata according to the guest endianness.