ok, let me be a little more specific. from my XFree86.0.log file: (--) Depth 24 pixmap format is 24 bpp
I'm using XFree86 4.2.0. I'm hacking on xc/programs/Xserver/miext/shadow/shpacked.c, which is the code that copies data from the shadow frame buffer in ram to the frame buffer on the video card (/dev/fb0). I have to change the way the pixels are written to /dev/fb0 because my hardware is finicky. I'm having difficulty figuring out how the pixels pointed to by the pointer 'sha' (the ones in the shadow frame buffer in ram) are set up; I will most likely have to re-order them before copying them to the pointer called 'win' (which is a memory-mapped pointer to the frame buffer on my weird video card) Right now, i am just blindly copying them, assuming there are three bytes of colors in each word, with one unused byte. Everything on the screen seems a bit compressed in the horizontal direction, and the colors are pretty gray, so I was thinking my assumptions of the pixel layout are wrong. On Thu, Jun 06, 2002 at 02:22:50PM -0700, Mark Vojkovich wrote: > On Thu, 6 Jun 2002, Kevin Geiss wrote: > > > i'm playing with the shadow frame buffer a bit, and I have a question: > > > > In 24 bit mode, how are the pixels layed out? > > "24 bit" is ambiguous. depth != bpp > > > my output device is expecting each pixel to be contained in a 32 bit word, > > That's 32bpp. > > > with the most significant byte unused, the next most significant byte > > containing the blue, then a red byte, and finally the least significant byte > > containing the green. > > > > But it looks like the shadow frame buffer is different. does it operate on > > a byte basis? with no unused bytes? if so, what order are the red, green, > > and blue in? > > > > Thanks in advance!! > > > The X11 specification makes no requirements on what the internal > format of the framebuffer is and the driver can do whatever it > wants. The default masks for depth 24 have blue in the lsb followed > by green then red. This is regardless of whether it is the 24bpp > or 32bpp variety of depth 24. The driver can advertise something > different but on platforms where XRGB are the norm, clients may > get confused. Clients should not assume a particular ordering, > but many still do. > > > Mark. > > _______________________________________________ > Xpert mailing list > [EMAIL PROTECTED] > http://XFree86.Org/mailman/listinfo/xpert _______________________________________________ Xpert mailing list [EMAIL PROTECTED] http://XFree86.Org/mailman/listinfo/xpert
