I've added your patch to git, thanks!

However, BYTE_ORDER is not always guaranteed
the same as BITFIELD_ORDER.  That was my
point in the previous email.  Nano-X only checks
BIGENDIAN  or not in the config file, and for
now we will assume that the bitfield order also
reverses in each case.  This is not assumed with
the compiler and linux header files.  See
include/linux/byteorder/big_endian.h.

We could move to automatically determining the
byte endianness by examining include files,
but that would break some ports for the time being.
For v0.92 I think we'll leave as is.

Regards,

Greg


: I agree to use MW_CPU_BIG_ENDIAN.
: Because, the microwindow can support various toolchain.
:
: My tested code might be applicable only for arm-linux-gcc.
:
:
: I had tested the following for BIG ENDIAN case.
: 1) compile with -D__ARMEB__ option.
: 2) #include
: 3) conditional compile statement is
: #if __BYTE_ORDER == __LITTLE_ENDIAN
: // littile endian part
: #elif __BYTE_ORDER == __BIG_ENDIAN
: // big endian part
: #endif
:
: My ARM toolchain has "include/endian.h", "incude/bits/endian.h".
: "include/bits/endian.h"'s content is the following.
:
: #ifdef __ARMEB__
: #define __BYTE_ORDER __BIG_ENDIAN
: #else
: #define __BYTE_ORDER __LITTLE_ENDIAN
: #endif
: Regards,
:
: Sung Joo
:
:
: -----Original Message-----
: From: "Greg Haerr"<g...@censoft.com>
: To: "Sung Joo, Byun"<nh...@naver.com>
: Cc: nanogui@linuxhacker.org
: Sent: 10-03-19(금) 04:47:25
: Subject: Re: Re: [nanogui] Re: Re: [FIX] add alpha channel into 
GdDrawImage software handling
:: Your code assumes the same order for declaration
:: of the unsigned char r:5, g:6, b:5 structure.
: Actually I understand now, we'll just use the
: MW_CPU_BIG_ENDIAN flag and assume
: that the C bitfields are allocated MSB->LSB
: in the big endian case, which works without
: requiring a later byte swap.
: I'll apply your patch later this evening!
: Regards,
: Greg
: 


---------------------------------------------------------------------
To unsubscribe, e-mail: nanogui-unsubscr...@linuxhacker.org
For additional commands, e-mail: nanogui-h...@linuxhacker.org

Reply via email to