On 31 July 2013 04:07, Chris Forbes <chr...@ijw.co.nz> wrote: > Signed-off-by: Chris Forbes <chr...@ijw.co.nz> > --- > src/mesa/drivers/dri/i965/brw_context.h | 18 ++++++++++++++++++ > 1 file changed, 18 insertions(+) > > diff --git a/src/mesa/drivers/dri/i965/brw_context.h > b/src/mesa/drivers/dri/i965/brw_context.h > index 7b5fd13..9580f29 100644 > --- a/src/mesa/drivers/dri/i965/brw_context.h > +++ b/src/mesa/drivers/dri/i965/brw_context.h > @@ -420,6 +420,24 @@ struct interpolation_mode_map { > unsigned char mode[BRW_VARYING_SLOT_COUNT]; > }; > > +static inline int brw_any_flat_varyings(struct interpolation_mode_map > *map) > +{ > + for (int i = 0; i < BRW_VARYING_SLOT_COUNT; i++) > + if (map->mode[i] == INTERP_QUALIFIER_FLAT) > + return 1; > + > + return 0; > +} > + > +static inline int brw_any_noperspective_varyings(struct > interpolation_mode_map *map) > +{ > + for (int i = 0; i < BRW_VARYING_SLOT_COUNT; i++) > + if (map->mode[i] == INTERP_QUALIFIER_NOPERSPECTIVE) > + return 1; > + > + return 0; > +} > + >
Can we please make these functions return bool instead of int? Using int instead of bool is dangerous, and has caused real bugs (see https://bugs.freedesktop.org/show_bug.cgi?id=54805 for example). With that fixed, this patch is: Reviewed-by: Paul Berry <stereotype...@gmail.com> > > struct brw_sf_prog_data { > GLuint urb_read_length; > -- > 1.8.3.4 > > _______________________________________________ > mesa-dev mailing list > mesa-dev@lists.freedesktop.org > http://lists.freedesktop.org/mailman/listinfo/mesa-dev >
_______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev