diff options
author | Matt Turner <[email protected]> | 2014-08-29 14:41:21 -0700 |
---|---|---|
committer | Matt Turner <[email protected]> | 2014-12-03 16:47:45 -0800 |
commit | b5b18e46877d16877053c68e013c8217bb6a7b83 (patch) | |
tree | c308e33987bbea4df430c72475b53d09775b3171 /src/mesa | |
parent | c74f2db0a5dd35845727987b1cbd07c0cdab9678 (diff) |
i965/fs: Don't offset uniform registers in half().
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.
Reviewed-by: Jason Ekstrand <[email protected]>
Diffstat (limited to 'src/mesa')
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_fs.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_fs.h b/src/mesa/drivers/dri/i965/brw_fs.h index 2e6296d4f23..b29b6b09bbe 100644 --- a/src/mesa/drivers/dri/i965/brw_fs.h +++ b/src/mesa/drivers/dri/i965/brw_fs.h @@ -202,6 +202,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; |