[Mesa-dev] [PATCH 1/3] mesa: Make a shared header for 3D pipeline enum / #defines.

Kenneth Graunke kenneth at whitecape.org
Fri Mar 27 14:15:26 PDT 2015


On Friday, March 27, 2015 04:57:45 PM Ilia Mirkin wrote:
> On Fri, Mar 27, 2015 at 4:54 PM, Eric Anholt <eric at anholt.net> wrote:
[snip]
> > +#ifndef PIPELINE_H
> > +#define PIPELINE_H
> > +
> > +/**
> > + * Bitflags for system values.
> > + */
> > +#define SYSTEM_BIT_SAMPLE_ID BITFIELD64_BIT(SYSTEM_VALUE_SAMPLE_ID)
> > +#define SYSTEM_BIT_SAMPLE_POS BITFIELD64_BIT(SYSTEM_VALUE_SAMPLE_POS)
> > +#define SYSTEM_BIT_SAMPLE_MASK_IN 
BITFIELD64_BIT(SYSTEM_VALUE_SAMPLE_MASK_IN)
> 
> Please include whatever defines BITFIELD64_BIT, otherwise including
> just this file will cause compilation errors.

Which raises an interesting point.  That header is mtypes.h, so how does
splitting this out actually help anything at all?

FWIW, I think moving those declarations to src/util/bitset.h might not
be a crazy plan.  Or, you could always just open code it - it's just
((GLbitfield64)1 << (b)) aka (1ull << b) anyway.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20150327/c6d70874/attachment.sig>


More information about the mesa-dev mailing list