[Mesa-dev] [PATCH 15/57] i965/fs: Handle fixed HW GRF subnr in reg_offset().
Francisco Jerez
currojerez at riseup.net
Thu Sep 8 01:48:42 UTC 2016
This will be useful later on when we start using reg_offset() on fixed
hardware registers.
---
src/mesa/drivers/dri/i965/brw_ir_fs.h | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/mesa/drivers/dri/i965/brw_ir_fs.h b/src/mesa/drivers/dri/i965/brw_ir_fs.h
index 2e5c8e5..4ac9baa 100644
--- a/src/mesa/drivers/dri/i965/brw_ir_fs.h
+++ b/src/mesa/drivers/dri/i965/brw_ir_fs.h
@@ -187,7 +187,8 @@ static inline unsigned
reg_offset(const fs_reg &r)
{
return (r.file == VGRF || r.file == IMM ? 0 : r.nr) *
- (r.file == UNIFORM ? 4 : REG_SIZE) + r.offset;
+ (r.file == UNIFORM ? 4 : REG_SIZE) + r.offset +
+ (r.file == ARF || r.file == FIXED_GRF ? r.subnr : 0);
}
/**
--
2.9.0
More information about the mesa-dev
mailing list