The implementations of the ARB_shader_ballot intrinsics will explicitly
read the flag as a source register.
Reviewed-by: Matt Turner <mattst88@gmail.com>
unsigned
fs_inst::flags_read(const gen_device_info *devinfo) const
{
- /* XXX - This doesn't consider explicit uses of the flag register as source
- * region.
- */
if (predicate == BRW_PREDICATE_ALIGN1_ANYV ||
predicate == BRW_PREDICATE_ALIGN1_ALLV) {
/* The vertical predication modes combine corresponding bits from
} else if (predicate) {
return flag_mask(this);
} else {
- return 0;
+ unsigned mask = 0;
+ for (int i = 0; i < sources; i++) {
+ mask |= flag_mask(src[i], size_read(i));
+ }
+ return mask;
}
}