r600/sfn: Keep array registers alive for the whole shader
This is needed when using sb as a post-optimizer. Signed-off-by: Gert Wollny <gert.wollny@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8563>
This commit is contained in:
parent
9fa48c0207
commit
14fe19e797
|
@ -279,8 +279,16 @@ GPRArray::GPRArray(int base, int size, int mask, int frac):
|
|||
m_values.resize(size);
|
||||
for (int i = 0; i < size; ++i) {
|
||||
for (int j = 0; j < 4; ++j) {
|
||||
if (mask & (1 << j))
|
||||
m_values[i].set_reg_i(j, PValue(new GPRValue(base + i, j)));
|
||||
if (mask & (1 << j)) {
|
||||
auto gpr = new GPRValue(base + i, j);
|
||||
/* If we want to use sb, we have to keep arrays
|
||||
* alife for the whole shader range, otherwise the sb scheduler
|
||||
* thinks is not capable to rename non-array uses of these registers */
|
||||
gpr->set_as_input();
|
||||
gpr->set_keep_alive();
|
||||
m_values[i].set_reg_i(j, PValue(gpr));
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue