[Mesa-dev] [PATCH 1/4] i965/brw_reg: Add a brw_VxH_indirect helper

Kenneth Graunke kenneth at whitecape.org
Sat Nov 7 21:03:57 PST 2015


From: Jason Ekstrand <jason.ekstrand at intel.com>

Reviewed-by: Kenneth Graunke <kenneth at whitecape.org>
---
 src/mesa/drivers/dri/i965/brw_reg.h | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/src/mesa/drivers/dri/i965/brw_reg.h b/src/mesa/drivers/dri/i965/brw_reg.h
index 083c46a..c3f77c0 100644
--- a/src/mesa/drivers/dri/i965/brw_reg.h
+++ b/src/mesa/drivers/dri/i965/brw_reg.h
@@ -995,6 +995,17 @@ brw_vec1_indirect(unsigned subnr, int offset)
 }
 
 static inline struct brw_reg
+brw_VxH_indirect(unsigned subnr, int offset)
+{
+   struct brw_reg reg = brw_vec1_grf(0, 0);
+   reg.vstride = BRW_VERTICAL_STRIDE_ONE_DIMENSIONAL;
+   reg.subnr = subnr;
+   reg.address_mode = BRW_ADDRESS_REGISTER_INDIRECT_REGISTER;
+   reg.dw1.bits.indirect_offset = offset;
+   return reg;
+}
+
+static inline struct brw_reg
 deref_4f(struct brw_indirect ptr, int offset)
 {
    return brw_vec4_indirect(ptr.addr_subnr, ptr.addr_offset + offset);
-- 
2.6.2



More information about the mesa-dev mailing list