qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
To: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH] [v2] Update cocoa.m to match new	DisplayState code
Date: Tue, 27 Jan 2009 10:47:53 +0000	[thread overview]
Message-ID: <497EE659.6060207@eu.citrix.com> (raw)
In-Reply-To: <D02DDA5E-CF47-44BC-9F05-06EAEB063985@digitalescape.info>

Samuel Benson wrote:

> Yes it was, but a `make clean` fixed that right up.
> The problem I'm seeing now is an x86 guest on an x86 host at 16 bit color,
> Windows XP at 16bit color on an x86 mac seems to incorrectly read the
> pixel data; 24 bit works
> like a charm. Gentoo in framebuffer mode at 16 bit color renders
> correctly on PPC host, as does
> Windows XP in 16 and 24 bit color. There is no difference in the match
> calculation for 16bit
> color in the host code for PPC or x86, so very odd that only the x86
> version seems corrupt.
> 





As I was telling you before, the guest in 16bpp is one of the "odd"
cases, because everything usually is converted into 32bpp.
It only happen when both host and guest are x86 because the 16bpp
optimization that the displaystate interface change introduced is only
enabled when guest and host have the same endianness.

I think the way you specify bitsPerComponent may be incorrect in the
16bpp case, because the format is actually 565:

red 5 bits
green 6 bits
blue 5 bits

isn't there a way to provide the full color masks like with sdl?

guest_screen = SDL_CreateRGBSurfaceFrom(ds_get_data(ds), ds_get_width(ds), ds_get_height(ds),
                                            ds_get_bits_per_pixel(ds), ds_get_linesize(ds),
                                            ds->surface->pf.rmask, ds->surface->pf.gmask,
                                            ds->surface->pf.bmask, ds->surface->pf.amask);

  reply	other threads:[~2009-01-27 10:55 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-01-25  8:23 [Qemu-devel] [PATCH] [v2] Update cocoa.m to match new DisplayState code Samuel Benson
     [not found] ` <2DDD067A-BDFD-4A05-9022-2FF16F4075C2@hotmail.com>
2009-01-25 22:15   ` C.W. Betts
2009-01-25 22:28     ` Samuel Benson
2009-01-25 22:30     ` Anthony Liguori
2009-01-26 11:05 ` Stefano Stabellini
2009-01-27  3:29   ` Samuel Benson
2009-01-27 10:47     ` Stefano Stabellini [this message]
2009-01-27 21:35       ` Samuel Benson
2009-01-28 10:47         ` Stefano Stabellini
2009-01-26 18:26 ` Stefano Stabellini
2009-01-26 18:26 ` Stefano Stabellini
2009-02-28 15:09 ` Andreas Färber
2009-03-02 11:33   ` Stefano Stabellini
2009-03-03 17:15 ` Anthony Liguori

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=497EE659.6060207@eu.citrix.com \
    --to=stefano.stabellini@eu.citrix.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).