r600: Force last instruction of group when starting a new CF

When emitting the AR forces splitting an ALU group, and at the same time
a new CF instruction is started, then the last instrcution in the finished
CF block might not have the "last" bit set, which results in an invalid
shader that might hang, or crash SB.
So when a new CF is started, force the last bit in the last ALU instruction.

Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Acked-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15714>
This commit is contained in:
Gert Wollny
2021-12-31 21:34:02 +01:00
committed by Marge Bot
parent 04fd9a6488
commit d920200ad6
+2
View File
@@ -1264,6 +1264,8 @@ int r600_bytecode_add_alu_type(struct r600_bytecode *bc,
/* cf can contains only alu or only vtx or only tex */
if (bc->cf_last == NULL || bc->force_add_cf) {
if (bc->cf_last && bc->cf_last->curr_bs_head)
bc->cf_last->curr_bs_head->last = 1;
r = r600_bytecode_add_cf(bc);
if (r) {
free(nalu);