This will come in handy when we implement a simd lowering pass in a
follow-up patch.
v2: use byte_offset()
Reviewed-by: Matt Turner <mattst88@gmail.com>
return byte_offset(reg, num_components * type_sz(reg.type) * delta);
}
+static inline src_reg
+horiz_offset(src_reg reg, unsigned delta)
+{
+ return byte_offset(reg, delta * type_sz(reg.type));
+}
+
/**
* Reswizzle a given source register.
* \sa brw_swizzle().
return byte_offset(reg, num_components * type_sz(reg.type) * delta);
}
+static inline dst_reg
+horiz_offset(dst_reg reg, unsigned delta)
+{
+ return byte_offset(reg, delta * type_sz(reg.type));
+}
+
static inline dst_reg
writemask(dst_reg reg, unsigned mask)
{