mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-06 02:58:05 +02:00
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 <kenneth@whitecape.org>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Francisco Jerez <currojerez@riseup.net>
This commit is contained in:
parent
cc64c9e441
commit
4f3888c1ca
1 changed files with 6 additions and 2 deletions
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue