[Mesa-dev] [PATCH 09/24] i965/vec4: Remove swizzle/writemask fields from src/dst_reg.
Matt Turner
mattst88 at gmail.com
Mon Nov 2 16:29:19 PST 2015
Also allows us to handle HW_REGs in the swizzle() and writemask()
functions.
---
src/mesa/drivers/dri/i965/brw_ir_vec4.h | 7 +------
src/mesa/drivers/dri/i965/brw_vec4.cpp | 2 --
2 files changed, 1 insertion(+), 8 deletions(-)
diff --git a/src/mesa/drivers/dri/i965/brw_ir_vec4.h b/src/mesa/drivers/dri/i965/brw_ir_vec4.h
index 0b2a925..a19a262 100644
--- a/src/mesa/drivers/dri/i965/brw_ir_vec4.h
+++ b/src/mesa/drivers/dri/i965/brw_ir_vec4.h
@@ -55,8 +55,6 @@ public:
explicit src_reg(const dst_reg ®);
- unsigned swizzle; /**< BRW_SWIZZLE_XYZW macros from brw_reg.h. */
-
src_reg *reladdr;
};
@@ -82,7 +80,6 @@ offset(src_reg reg, unsigned delta)
static inline src_reg
swizzle(src_reg reg, unsigned swizzle)
{
- assert(reg.file != HW_REG);
reg.swizzle = brw_compose_swizzle(swizzle, reg.swizzle);
return reg;
}
@@ -122,8 +119,6 @@ public:
bool equals(const dst_reg &r) const;
- unsigned writemask; /**< Bitfield of WRITEMASK_[XYZW] */
-
src_reg *reladdr;
};
@@ -145,7 +140,7 @@ offset(dst_reg reg, unsigned delta)
static inline dst_reg
writemask(dst_reg reg, unsigned mask)
{
- assert(reg.file != HW_REG && reg.file != IMM);
+ assert(reg.file != IMM);
assert((reg.writemask & mask) != 0);
reg.writemask &= mask;
return reg;
diff --git a/src/mesa/drivers/dri/i965/brw_vec4.cpp b/src/mesa/drivers/dri/i965/brw_vec4.cpp
index ad52c9f..5d63a28 100644
--- a/src/mesa/drivers/dri/i965/brw_vec4.cpp
+++ b/src/mesa/drivers/dri/i965/brw_vec4.cpp
@@ -125,7 +125,6 @@ src_reg::src_reg(struct brw_reg reg) :
this->file = HW_REG;
this->reg = 0;
this->reg_offset = 0;
- this->swizzle = BRW_SWIZZLE_XXXX;
this->reladdr = NULL;
}
@@ -189,7 +188,6 @@ dst_reg::dst_reg(struct brw_reg reg) :
this->file = HW_REG;
this->reg = 0;
this->reg_offset = 0;
- this->writemask = WRITEMASK_XYZW;
this->reladdr = NULL;
}
--
2.4.9
More information about the mesa-dev
mailing list