diff options
author | Connor Abbott <[email protected]> | 2015-07-28 17:06:12 -0700 |
---|---|---|
committer | Samuel Iglesias Gonsálvez <[email protected]> | 2016-05-10 11:25:07 +0200 |
commit | 4f3888c1caf3455f61b2e20ccf7c39e59f4feaf3 (patch) | |
tree | 33ecaed6b5c7a6c24345b9428c01d91df8d75e06 /src | |
parent | cc64c9e441acce45b1a7531d1762d152ad9ce22f (diff) |
i965/fs: fix assign_constant_locations() for doubles
Uniform doubles will read two registers, in which case we need to mark
both as being live.
v2 (Sam):
- Use a formula to get the number of registers read with proper
units (Curro).
Reviewed-by: Kenneth Graunke <[email protected]>
Reviewed-by: Jordan Justen <[email protected]>
Reviewed-by: Francisco Jerez <[email protected]>
Diffstat (limited to 'src')
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_fs.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_fs.cpp b/src/mesa/drivers/dri/i965/brw_fs.cpp index d0ce79d101a..6eae49fdf4a 100644 --- a/src/mesa/drivers/dri/i965/brw_fs.cpp +++ b/src/mesa/drivers/dri/i965/brw_fs.cpp @@ -2056,8 +2056,12 @@ fs_visitor::assign_constant_locations() } is_live[last] = true; } else { - if (constant_nr >= 0 && constant_nr < (int) uniforms) - is_live[constant_nr] = true; + if (constant_nr >= 0 && constant_nr < (int) uniforms) { + int regs_read = inst->components_read(i) * + type_sz(inst->src[i].type) / 4; + for (int j = 0; j < regs_read; j++) + is_live[constant_nr + j] = true; + } } } } |