José Fonseca wrote: > On Wed, 2009-09-02 at 07:48 -0700, Brian Paul wrote: >> Module: Mesa >> Branch: master >> Commit: 83e4470d9a3367883b3fe699629f1d8648459a89 >> URL: >> http://cgit.freedesktop.org/mesa/mesa/commit/?id=83e4470d9a3367883b3fe699629f1d8648459a89 >> >> Author: Brian Paul <[email protected]> >> Date: Wed Sep 2 08:45:34 2009 -0600 >> >> mesa: added #ifdef __GNUC__ around GLubyte bitfield usage >> >> It would be nice if there were a #pragma or something to disable the >> warnings: >> >> main/texenvprogram.c:87: warning: type of bit-field ‘Source’ is a GCC >> extension >> main/texenvprogram.c:88: warning: type of bit-field ‘Operand’ is a GCC >> extension >> >> but there doesn't appear to be a way to do that. >> >> --- >> >> src/mesa/main/texenvprogram.c | 5 +++++ >> 1 files changed, 5 insertions(+), 0 deletions(-) >> >> diff --git a/src/mesa/main/texenvprogram.c b/src/mesa/main/texenvprogram.c >> index b16b8dd..770a2c2 100644 >> --- a/src/mesa/main/texenvprogram.c >> +++ b/src/mesa/main/texenvprogram.c >> @@ -82,8 +82,13 @@ texenv_doing_secondary_color(GLcontext *ctx) >> #define DISASSEM (MESA_VERBOSE & VERBOSE_DISASSEM) >> >> struct mode_opt { >> +#ifdef __GNUC__ >> GLubyte Source:4; /**< SRC_x */ >> GLubyte Operand:3; /**< OPR_x */ >> +#else >> + GLubyte Source; /**< SRC_x */ >> + GLubyte Operand; /**< OPR_x */ >> +#endif >> }; >> >> struct state_key { > > The only portable way I know of doing this is doing > > unsigned Source:4; /**< SRC_x */ > unsigned Operand:3; /**< OPR_x */ > > This might work too: > > GLuint Source:4; /**< SRC_x */ > GLuint Operand:3; /**< OPR_x */
That's what we originally had. -Brian ------------------------------------------------------------------------------ Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july _______________________________________________ Mesa3d-dev mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/mesa3d-dev
