i965/vec4: Add is_null() method to dst_reg.

Reviewed-by: Eric Anholt <eric@anholt.net>
This commit is contained in:
Matt Turner 2014-03-13 11:21:36 -07:00
parent 0884ce8f42
commit 10dd6eca89
2 changed files with 10 additions and 0 deletions

View file

@ -212,6 +212,14 @@ dst_reg::dst_reg(src_reg reg)
this->fixed_hw_reg = reg.fixed_hw_reg;
}
bool
dst_reg::is_null() const
{
return file == HW_REG &&
fixed_hw_reg.file == BRW_ARCHITECTURE_REGISTER_FILE &&
fixed_hw_reg.nr == BRW_ARF_NULL;
}
bool
vec4_instruction::is_send_from_grf()
{

View file

@ -194,6 +194,8 @@ public:
explicit dst_reg(src_reg reg);
bool is_null() const;
int writemask; /**< Bitfield of WRITEMASK_[XYZW] */
src_reg *reladdr;