[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH] VMware SVGA uses incorrect depth
From: |
andrzej zaborowski |
Subject: |
Re: [Qemu-devel] [PATCH] VMware SVGA uses incorrect depth |
Date: |
Fri, 27 Feb 2009 21:21:10 +0100 |
2009/2/27 Anthony Liguori <address@hidden>:
> Brian Kress wrote:
>>
>> The VMware SVGA adapter is set to a 24 bit depth, where as the display
>> surfaces
>> (and just about everything else) are using a 32 bit depth. So when you
>> use "-vga vmware"
>> in either the sdl or vnc displays, you get some very odd video that has
>> the wrong colors, is
>> repeated and is only over 3/4 of the screen. Fix seems to be to change it
>> to 32 bit. With
>> this patch I can use VMware video in both sdl and vnc and have it display
>> correctly.
>>
>>
>> Signed-off-by: Brian Kress <address@hidden>
>>
>> Index: hw/vmware_vga.c
>> ===================================================================
>> --- hw/vmware_vga.c (revision 6626)
>> +++ hw/vmware_vga.c (working copy)
>> @@ -914,7 +914,7 @@
>> s->width = -1;
>> s->height = -1;
>> s->svgaid = SVGA_ID;
>> - s->depth = 24;
>> + s->depth = 32;
>> s->bypp = (s->depth + 7) >> 3;
>>
>
> I think having:
>
> s->depth = 24;
> s->bypp = 4;
I don't think hardcoding any depth is correct (not counting the
obvious performance disadvantage). The s->depth value is what is
returned by the SVGA_REG_HOST_BITS_PER_PIXEL register, so it should be
the host's color depth if possible (may be impossible for VNC, but
easy with SDL), iirc this broke only recently.
Cheers