Re: s13d...fb fill_rect accel giving wrong color
From: Geert Uytterhoeven <geert@linux-m68k.org>
Date: 2009-04-20 19:08:27
On Mon, Apr 20, 2009 at 20:22, Kristoffer Ericson [off-list ref] wrote:
My accelerated fill_rect is working nicely apart from the fact that its giving me the wrong colors. For instance mc has its empty spaces being black when they should be blue.Its doesnt show up in pure console but thats probably since its generally black :) Ive added some debugging code to both cfb_fillrect and my routine and its accessing the same pseudo_palette[x] color. cfb_fillrect uses pixel_to_pat() to get its color value. I havent completely understod whats the purpose of it. I cannot push an 32bit value into my color registers since its only 16bit.
As cfb_fillrect() tries to write using quantities of `unsigned long'
(either 32 or
64 bit), while your pixels are 16 bit, it uses pixel_to_pat() to
duplicate the 16 bit
pixel values to fill an `unsigned long' quantity.
For hardware accelerated fillrect, I'd expect you just have to write
the 16 bit pixel
value to your hardware's color register.
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
------------------------------------------------------------------------------
Stay on top of everything new and different, both inside and
around Java (TM) technology - register by April 22, and save
$200 on the JavaOne (SM) conference, June 2-5, 2009, San Francisco.
300 plus technical and hands-on sessions. Register today.
Use priority code J9JMT32. http://p.sf.net/sfu/p