[Mesa-dev] [PATCH 05/12] i965/vec4: Add is_null() method to dst_reg.
Matt Turner
mattst88 at gmail.com
Tue Mar 18 20:23:26 PDT 2014
---
src/mesa/drivers/dri/i965/brw_vec4.cpp | 8 ++++++++
src/mesa/drivers/dri/i965/brw_vec4.h | 2 ++
2 files changed, 10 insertions(+)
diff --git a/src/mesa/drivers/dri/i965/brw_vec4.cpp b/src/mesa/drivers/dri/i965/brw_vec4.cpp
index 702b182..62c2314 100644
--- a/src/mesa/drivers/dri/i965/brw_vec4.cpp
+++ b/src/mesa/drivers/dri/i965/brw_vec4.cpp
@@ -213,6 +213,14 @@ dst_reg::dst_reg(src_reg 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()
{
switch (opcode) {
diff --git a/src/mesa/drivers/dri/i965/brw_vec4.h b/src/mesa/drivers/dri/i965/brw_vec4.h
index 5e5ef03..159a5bd 100644
--- a/src/mesa/drivers/dri/i965/brw_vec4.h
+++ b/src/mesa/drivers/dri/i965/brw_vec4.h
@@ -194,6 +194,8 @@ public:
explicit dst_reg(src_reg reg);
+ bool is_null() const;
+
int writemask; /**< Bitfield of WRITEMASK_[XYZW] */
src_reg *reladdr;
--
1.8.3.2
More information about the mesa-dev
mailing list