Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Francisco Jerez <currojerez@riseup.net>
if (file != IMM)
return false;
- return d == 0;
+ switch (type) {
+ case BRW_REGISTER_TYPE_F:
+ return f == 0;
+ case BRW_REGISTER_TYPE_DF:
+ return df == 0;
+ case BRW_REGISTER_TYPE_D:
+ case BRW_REGISTER_TYPE_UD:
+ return d == 0;
+ default:
+ return false;
+ }
}
bool
if (file != IMM)
return false;
- return type == BRW_REGISTER_TYPE_F
- ? f == 1.0
- : d == 1;
+ switch (type) {
+ case BRW_REGISTER_TYPE_F:
+ return f == 1.0f;
+ case BRW_REGISTER_TYPE_DF:
+ return df == 1.0;
+ case BRW_REGISTER_TYPE_D:
+ case BRW_REGISTER_TYPE_UD:
+ return d == 1;
+ default:
+ return false;
+ }
}
bool
switch (type) {
case BRW_REGISTER_TYPE_F:
return f == -1.0;
+ case BRW_REGISTER_TYPE_DF:
+ return df == -1.0;
case BRW_REGISTER_TYPE_D:
return d == -1;
default: