[Mesa-dev] [PATCH] i965/fs: Don't offset uniform registers in half().
Matt Turner
mattst88 at gmail.com
Tue Dec 2 21:19:22 PST 2014
Half gives you the second half of a SIMD16 register, but if the register
is a uniform it would incorrectly give you the next register.
---
src/mesa/drivers/dri/i965/brw_fs.h | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/src/mesa/drivers/dri/i965/brw_fs.h b/src/mesa/drivers/dri/i965/brw_fs.h
index 6a7fbe4..71b82ae 100644
--- a/src/mesa/drivers/dri/i965/brw_fs.h
+++ b/src/mesa/drivers/dri/i965/brw_fs.h
@@ -210,6 +210,10 @@ static inline fs_reg
half(fs_reg reg, unsigned idx)
{
assert(idx < 2);
+
+ if (reg.file == UNIFORM)
+ return reg;
+
assert(idx == 0 || (reg.file != HW_REG && reg.file != IMM));
assert(reg.width == 16);
reg.width = 8;
--
2.0.4
More information about the mesa-dev
mailing list