diff options
author | Matt Turner <[email protected]> | 2013-10-22 12:32:23 -0700 |
---|---|---|
committer | Matt Turner <[email protected]> | 2013-10-30 19:49:27 -0700 |
commit | f768f998e0e5885c36af1efee6ca70fdf90deb96 (patch) | |
tree | c39a8f0b92c3504ed8dfd3a7635ba8f80494d2f0 /src | |
parent | 8dfc9f038ee3f6a57f0a3f3cc641b0866a6111b7 (diff) |
i965/fs: Add is_null() method to fs_reg.
Reviewed-by: Eric Anholt <[email protected]>
Reviewed-by: Paul Berry <[email protected]>
Diffstat (limited to 'src')
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_fs.cpp | 8 | ||||
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_fs.h | 1 |
2 files changed, 9 insertions, 0 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_fs.cpp b/src/mesa/drivers/dri/i965/brw_fs.cpp index 5e95d3a4ce7..69340f0bc9f 100644 --- a/src/mesa/drivers/dri/i965/brw_fs.cpp +++ b/src/mesa/drivers/dri/i965/brw_fs.cpp @@ -467,6 +467,14 @@ fs_reg::is_one() const } bool +fs_reg::is_null() const +{ + return file == HW_REG && + fixed_hw_reg.file == BRW_ARCHITECTURE_REGISTER_FILE && + fixed_hw_reg.nr == BRW_ARF_NULL; +} + +bool fs_reg::is_valid_3src() const { return file == GRF || file == UNIFORM; diff --git a/src/mesa/drivers/dri/i965/brw_fs.h b/src/mesa/drivers/dri/i965/brw_fs.h index a3a4dc0f141..c9b0aa1773c 100644 --- a/src/mesa/drivers/dri/i965/brw_fs.h +++ b/src/mesa/drivers/dri/i965/brw_fs.h @@ -77,6 +77,7 @@ public: bool equals(const fs_reg &r) const; bool is_zero() const; bool is_one() const; + bool is_null() const; bool is_valid_3src() const; fs_reg retype(uint32_t type); |