[Mesa-dev] [PATCH 34/59] i965/fs: handle uniforms in byte_offset()
Samuel Iglesias Gonsálvez
siglesias at igalia.com
Fri Apr 29 11:29:31 UTC 2016
From: Connor Abbott <connor.w.abbott at intel.com>
v2: Do it only for uniforms (Iago)
Signed-off-by: Iago Toral Quiroga <itoral at igalia.com>
---
src/mesa/drivers/dri/i965/brw_ir_fs.h | 6 +++++-
1 file changed, 5 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 abda2c3..2f72326 100644
--- a/src/mesa/drivers/dri/i965/brw_ir_fs.h
+++ b/src/mesa/drivers/dri/i965/brw_ir_fs.h
@@ -98,10 +98,14 @@ byte_offset(fs_reg reg, unsigned delta)
case MRF:
reg.nr += delta / 32;
break;
+ case UNIFORM:
+ reg.reg_offset += delta / 4;
+ reg.subreg_offset += delta % 4;
+ return reg;
case ARF:
case FIXED_GRF:
case IMM:
- case UNIFORM:
+ default:
assert(delta == 0);
}
reg.subreg_offset += delta % 32;
--
2.5.0
More information about the mesa-dev
mailing list