Chris Forbes <chr...@ijw.co.nz> writes: > Next few patches build on this to add other workarounds > for packed formats.
> diff --git a/src/mesa/drivers/dri/i965/brw_vs.h > b/src/mesa/drivers/dri/i965/brw_vs.h > index adeff7f..9da4cb0 100644 > --- a/src/mesa/drivers/dri/i965/brw_vs.h > +++ b/src/mesa/drivers/dri/i965/brw_vs.h > @@ -39,13 +39,21 @@ > #include "brw_program.h" > #include "program/program.h" > > +/* fixup bits for gl_packed_input_flags, > + * to enable various VS workarounds */ > +#define BRW_ATTRIB_WA_COMPONENTS 7 /* mask for GL_FIXED scale channel > count */ > +#define BRW_ATTRIB_WA_NORMALIZE 8 /* normalize in shader */ > +#define BRW_ATTRIB_WA_BGRA 16 /* swap r/b channels in shader */ > +#define BRW_ATTRIB_WA_SIGN 32 /* interpret as signed in shader */ > +#define BRW_ATTRIB_WA_SCALE 64 /* interpret as scaled in shader */ For bitmasks, we usually call a more-than-one-bit mask BRW_WHATEVER_MASK. Perhaps BRW_ATTRIB_GL_FIXED_COMPONENTS_MASK?. For the others, (1 << bit) as the value is preferred. I think BRA_ATTRIB_WA_SCALE whould be BRW_ATTRIB_WA_NORMALIZED, since in our hardware SCALED refers to casting the integer value to a float, and the last thing we need in vertex upload is more confusion about formats! :) Other than that, looks good.
pgpK52dI6EkzB.pgp
Description: PGP signature
_______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev