[Mesa-dev] [PATCH 08/19] i965/fs: Use a bitfield for fs_inst's bool fields.
Philipp Klaus Krause
pkk at spth.de
Fri Feb 21 13:50:38 PST 2014
-----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 b4e69ba..a1f33e7 100644
> --- a/src/mesa/drivers/dri/i965/brw_fs.h +++
> b/src/mesa/drivers/dri/i965/brw_fs.h @@ -203,7 +203,6 @@ public:
> uint32_t texture_offset; /**< Texture offset bitfield */ uint32_t
> offset; /* spill/unspill offset */
>
> - bool saturate; uint8_t conditional_mod; /**< BRW_CONDITIONAL_*
> */
>
> /* Chooses which flag subregister (f0.0 or f0.1) is used for
> conditional @@ -216,12 +215,13 @@ public: int8_t base_mrf; /**<
> First MRF in the SEND message, if mlen is nonzero. */ uint8_t
> sampler; uint8_t target; /**< MRT target. */ - bool eot; - bool
> header_present; - bool shadow_compare; - bool
> force_uncompressed; - bool force_sechalf; - bool
> force_writemask_all; + uint8_t saturate:1; + uint8_t eot:1; +
> uint8_t header_present:1; + uint8_t shadow_compare:1; + uint8_t
> force_uncompressed:1; + uint8_t force_sechalf:1; + uint8_t
> force_writemask_all:1; };
>
> /**
>
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?
Philipp
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1
Comment: Using GnuPG with Icedove - http://www.enigmail.net/
iEYEARECAAYFAlMHyisACgkQbtUV+xsoLprRigCgwitf726QNhckgmMHvSoxeDjk
BvEAoIxPAoGZVsIXVbrkxnkz9e0MQv2s
=4Bc2
-----END PGP SIGNATURE-----
More information about the mesa-dev
mailing list