[Mesa-dev] [PATCH 2/6] i965/fs: Don't offset uniform registers in half().
Matt Turner
mattst88 at gmail.com
Sun Sep 28 13:26:30 PDT 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 f8bc46c..218c5a2 100644
--- a/src/mesa/drivers/dri/i965/brw_fs.h
+++ b/src/mesa/drivers/dri/i965/brw_fs.h
@@ -130,6 +130,10 @@ half(const fs_reg ®, unsigned idx)
{
assert(idx < 2);
assert(idx == 0 || (reg.file != HW_REG && reg.file != IMM));
+
+ if (reg.file == UNIFORM)
+ return reg;
+
return byte_offset(reg, 8 * idx * reg.stride * type_sz(reg.type));
}
--
1.8.5.5
More information about the mesa-dev
mailing list