Re: [Mesa-dev] [PATCH 08/19] i965/fs: Use a bitfield for fs_inst's bool fields.

2014-02-21 Thread Matt Turner
On Fri, Feb 21, 2014 at 1:50 PM, Philipp Klaus Krause wrote: > Using uint8_t as a bitfield type is non-portable. AFAIK, only int > singed int, unsigned int and bool are mandatory bit-field types in the > C standard. Why not just use > > bool saturate:1; > > and so on? That sounds good. Will do. _

Re: [Mesa-dev] [PATCH 08/19] i965/fs: Use a bitfield for fs_inst's bool fields.

2014-02-21 Thread Philipp Klaus Krause
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Am 20.02.2014 22:41, schrieb Matt Turner: > --- src/mesa/drivers/dri/i965/brw_fs.h | 14 +++--- 1 file > changed, 7 insertions(+), 7 deletions(-) > > diff --git a/src/mesa/drivers/dri/i965/brw_fs.h > b/src/mesa/drivers/dri/i965/brw_fs.h index b

Re: [Mesa-dev] [PATCH 08/19] i965/fs: Use a bitfield for fs_inst's bool fields.

2014-02-21 Thread Matt Turner
On Fri, Feb 21, 2014 at 1:40 PM, Kenneth Graunke wrote: > Please just do: > >unsigned eot:1; For #include struct a { unsigned a:1; unsigned b:1; unsigned c:1; }; struct b { uint8_t a:1; uint8_t b:1; uint8_t c:1; }; void f(struct a a, struct b b) {} pahole says: struct a { unsigned int

Re: [Mesa-dev] [PATCH 08/19] i965/fs: Use a bitfield for fs_inst's bool fields.

2014-02-21 Thread Kenneth Graunke
On 02/20/2014 01:41 PM, Matt Turner wrote: > --- > src/mesa/drivers/dri/i965/brw_fs.h | 14 +++--- > 1 file changed, 7 insertions(+), 7 deletions(-) > > diff --git a/src/mesa/drivers/dri/i965/brw_fs.h > b/src/mesa/drivers/dri/i965/brw_fs.h > index b4e69ba..a1f33e7 100644 > --- a/src/mesa

[Mesa-dev] [PATCH 08/19] i965/fs: Use a bitfield for fs_inst's bool fields.

2014-02-20 Thread Matt Turner
--- src/mesa/drivers/dri/i965/brw_fs.h | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/mesa/drivers/dri/i965/brw_fs.h b/src/mesa/drivers/dri/i965/brw_fs.h index b4e69ba..a1f33e7 100644 --- a/src/mesa/drivers/dri/i965/brw_fs.h +++ b/src/mesa/drivers/dri/i965/