r600/sfn: keep workgroup and invocation ID registers for whole shader

For some reason one must not overwrite these values "too early", so
pin them for the whole shader.

Fixes: 79ca45 (r600/sfn: rewrite NIR backend)
Related: https://gitlab.freedesktop.org/mesa/mesa/-/issues/10004

Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25846>
This commit is contained in:
Gert Wollny 2023-10-22 21:31:08 +02:00 committed by Marge Bot
parent 5de814171b
commit eb25c7a4e2

View file

@ -52,7 +52,9 @@ ComputeShader::do_allocate_reserved_registers()
for (int i = 0; i < 3; ++i) {
m_local_invocation_id[i] = vf.allocate_pinned_register(thread_id_sel, i);
m_local_invocation_id[i]->set_flag(Register::pin_end);
m_workgroup_id[i] = vf.allocate_pinned_register(wg_id_sel, i);
m_workgroup_id[i]->set_flag(Register::pin_end);
}
return 2;
}