summaryrefslogtreecommitdiffstats
path: root/src/mesa
diff options
context:
space:
mode:
authorFrancisco Jerez <currojerez@riseup.net>2015-04-22 15:01:24 +0300
committerJason Ekstrand <jason.ekstrand@intel.com>2015-05-06 10:29:29 -0700
commit88414de45e723a7fe8f052a3ab616aa7bc568519 (patch)
tree7c793be1bfc5fac9d1e28d83297d8c15a9bce6b7 /src/mesa
parent5b2d3480f57168d50ad24cf0b8c9244414bd3701 (diff)
downloadexternal_mesa3d-88414de45e723a7fe8f052a3ab616aa7bc568519.zip
external_mesa3d-88414de45e723a7fe8f052a3ab616aa7bc568519.tar.gz
external_mesa3d-88414de45e723a7fe8f052a3ab616aa7bc568519.tar.bz2
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@gmail.com>
Diffstat (limited to 'src/mesa')
-rw-r--r--src/mesa/drivers/dri/i965/brw_ir_fs.h4
1 files 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);