Mesa (master): i965/fs: Fix passing an immediate to half().
Jason Ekstrand
jekstrand at kemper.freedesktop.org
Wed May 6 18:06:29 UTC 2015
Module: Mesa
Branch: master
Commit: 88414de45e723a7fe8f052a3ab616aa7bc568519
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=88414de45e723a7fe8f052a3ab616aa7bc568519
Author: Francisco Jerez <currojerez at riseup.net>
Date: Wed Apr 22 15:01:24 2015 +0300
i965/fs: Fix passing an immediate to half().
Immediates are generally uniform, they yield the same value to both
halves of any instruction.
Reviewed-by: Matt Turner <mattst88 at gmail.com>
---
src/mesa/drivers/dri/i965/brw_ir_fs.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/mesa/drivers/dri/i965/brw_ir_fs.h b/src/mesa/drivers/dri/i965/brw_ir_fs.h
index 0727ac5..acbf617 100644
--- a/src/mesa/drivers/dri/i965/brw_ir_fs.h
+++ b/src/mesa/drivers/dri/i965/brw_ir_fs.h
@@ -183,10 +183,10 @@ half(fs_reg reg, unsigned idx)
{
assert(idx < 2);
- if (reg.file == UNIFORM)
+ if (reg.file == UNIFORM || reg.file == IMM)
return reg;
- assert(idx == 0 || (reg.file != HW_REG && reg.file != IMM));
+ assert(idx == 0 || reg.file != HW_REG);
assert(reg.width == 16);
reg.width = 8;
return horiz_offset(reg, 8 * idx);
More information about the mesa-commit
mailing list