Xfbdev color problems due to endianess

Leon Ljunggren leon.ljunggren at gmail.com
Thu Sep 11 02:45:02 PDT 2008


On Wed, Sep 10, 2008 at 5:19 PM, Daniel Stone <daniel at fooishbar.org> wrote:
> On Wed, Sep 10, 2008 at 05:06:32PM +0200, Leon Ljunggren wrote:
>> > wfb works everywhere fb does (i.e. everywhere).  fb is the normal
>> > software rasterisation code, which takes a bass address, stride, etc,
>> > and writes directly to that range.  wfb is literally the exact same
>> > codebase as fb, but instead of writing directly to memory, will issue a
>> > function call, if you've set read/write functions, and ask you to please
>> > write this pixel value to this location.  This gives you the opportunity
>> > to mangle it however you please: change the ordering, tile it, whatever.
>> >
>> > So yes, it's completely fine.
>>
>> That sounds good, but I'm afraid I don't understand how I could change
>> from fb to wfb, and how I would then use that to fix the problem.
>
> Change fbScreenInit in hw/kdrive/src/kdrive.c to wfbScreenInit.
> setupWrap tells you which drawable you're going to access, and asks you
> to set up the memory read/write functions, and finishWrap lets you know
> you're done.  So in your setupWrap function, just set pRead and pWrite
> to functions which perform the format conversion, but only if pDraw is
> the front buffer (i.e. == GetScreenPixmap(screenInfo.screens[0])).
>
> Cheers,
> Daniel

I replaced fbFinishScreenInit with wfbFinishScreenInit (couldn't find
fbScreenInit, but from what I understand that function just calls
fbSetupScreen and fbFinishScreenInit while the wfb equivalent calls
fbSetupScreen and wfbFinishScreenInit), setup a skeleton
setupWrap/finishWrap (haven't quite understood what to do with these
yet) and added libwfb.la to the make file lib list. But when I try to
compile I get errors like:

../../../fb/.libs/libwfb.a(libwfb_la-fbscreen.o)(.text+0x304): In
function `wfbSetupScreen':
: undefined reference to `wfbInitializeColormap'
../../../fb/.libs/libwfb.a(libwfb_la-fbscreen.o)(.text+0x30c): In
function `wfbSetupScreen':
: undefined reference to `wfbInstallColormap'

As far as I understand they're supposed to be in libwfb.a?

Thanks
/Leon



More information about the xorg mailing list