Re: s13d...fb fill_rect accel giving wrong color
From: Kristoffer Ericson <kristoffer.ericson@gmail.com>
Date: 2009-04-21 13:49:21
On Mon, 20 Apr 2009 21:08:21 +0200 Geert Uytterhoeven [off-list ref] wrote:
On Mon, Apr 20, 2009 at 20:22, Kristoffer Ericson [off-list ref] wrote:quoted
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.
Ah, thats about what I guessed.
For hardware accelerated fillrect, I'd expect you just have to write the 16 bit pixel value to your hardware's color register.
I tried that, it works well in console (probably due because it always writes black), in mc though instead of filling the "empty" spaces with blue it fills them with black. cfb_fillrect does not have this issue. Got any idea where I could look? Im basicly down to either rect->color being wrong or that Im writing to the wrong location (which would be odd since everything looks okey aside from the color). *shrug* I also created an copyarea function which works perfectly fine. Any guesses are helpful at this point.
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-- Kristoffer Ericson [off-list ref] ------------------------------------------------------------------------------ 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