[Mesa-dev] [PATCH 27/59] i965/fs: add a stride helper
Samuel Iglesias Gonsálvez
siglesias at igalia.com
Fri Apr 29 11:29:24 UTC 2016
From: Connor Abbott <connor.w.abbott at intel.com>
Similar to retype() and offset().
---
src/mesa/drivers/dri/i965/brw_ir_fs.h | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/src/mesa/drivers/dri/i965/brw_ir_fs.h b/src/mesa/drivers/dri/i965/brw_ir_fs.h
index e4f20f4..abda2c3 100644
--- a/src/mesa/drivers/dri/i965/brw_ir_fs.h
+++ b/src/mesa/drivers/dri/i965/brw_ir_fs.h
@@ -78,6 +78,14 @@ retype(fs_reg reg, enum brw_reg_type type)
}
static inline fs_reg
+stride(fs_reg reg, unsigned stride)
+{
+ if (reg.stride != 0)
+ reg.stride = stride;
+ return reg;
+}
+
+static inline fs_reg
byte_offset(fs_reg reg, unsigned delta)
{
switch (reg.file) {
--
2.5.0
More information about the mesa-dev
mailing list