From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Kcggv-0000XI-LD for qemu-devel@nongnu.org; Mon, 08 Sep 2008 09:22:05 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Kcggt-0000Vp-MV for qemu-devel@nongnu.org; Mon, 08 Sep 2008 09:22:04 -0400 Received: from [199.232.76.173] (port=59548 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Kcggt-0000Vh-BY for qemu-devel@nongnu.org; Mon, 08 Sep 2008 09:22:03 -0400 Received: from mail2.shareable.org ([80.68.89.115]:56799) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1Kcggs-0006Sr-Ll for qemu-devel@nongnu.org; Mon, 08 Sep 2008 09:22:03 -0400 Date: Mon, 8 Sep 2008 14:21:57 +0100 From: Jamie Lokier Subject: Re: [Qemu-devel] [PATCH] opengl rendering in the sdl window Message-ID: <20080908132157.GC4947@shareable.org> References: <48B81423.9050502@eu.citrix.com> <20080906232723.GB813@shareable.org> <20080907142236.GD4307@implementation> <200809071536.51498.paul@codesourcery.com> <20080908011833.GA15521@shareable.org> <48C500A4.9090505@eu.citrix.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <48C500A4.9090505@eu.citrix.com> 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 Cc: Samuel Thibault Stefano Stabellini wrote: > > A good quality guest _expects_ that reading its video RAM will be > > slow, and only writes to its video RAM, and possible by preparing images > > off-screen then wide block transfers. :-) > > That is a really good point. > Usually the safe way to handle the video ram VS main memory problem is > to write to main memory then copy the whole buffer to video ram every so > often. > But in our case the guest thinks that he is writing to video ram > already, so in theory he is already using all precautions needed to > handle the latency problem. > It is actually probable that the guest is handling another buffer in his > own memory and syncing that one with what he thinks to be the video ram. Yes, especially with any guest in the last 15 years :-), so I would imagine that mapping to video RAM as directly as you can would give the best results (e.g. using an OpenGL memory-mapped texture or X11 MIT-SHM image if they're possible to protect safely). That's also saving power, by the way, even if your machine is plenty fast enough that extra full-screen image copies aren't humanly visible. That said, numbers talk better than hand-waving. -- Jamie