i965: Add helper functions for interpolation map

V6: real bools

Signed-off-by: Chris Forbes <chrisf@ijw.co.nz>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
This commit is contained in:
Chris Forbes 2013-07-31 22:28:13 +12:00
parent 9f51499d28
commit 3b5fe704e1

View file

@ -420,6 +420,24 @@ struct interpolation_mode_map {
unsigned char mode[BRW_VARYING_SLOT_COUNT];
};
static inline bool 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 true;
return false;
}
static inline bool 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 true;
return false;
}
struct brw_sf_prog_data {
GLuint urb_read_length;