broadcom/compiler: emit TMU flush before a jump

Like in the case of emitting a block, process pending TMU operations
before a jump is executed.

Fixes dEQP-VK.graphicsfuzz.stable-binarysearch-tree-nested-if-and-conditional.

Fixes: 197090a3fc ("broadcom/compiler: implement pipelining for general
TMU operations")

Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11971>
(cherry picked from commit dc40157888)
This commit is contained in:
Juan A. Suarez Romero 2021-07-19 12:18:11 +02:00 committed by Eric Engestrom
parent 6e91961794
commit 904e0c989b
2 changed files with 5 additions and 1 deletions

View file

@ -841,7 +841,7 @@
"description": "broadcom/compiler: emit TMU flush before a jump",
"nominated": true,
"nomination_type": 1,
"resolution": 0,
"resolution": 1,
"main_sha": null,
"because_sha": "197090a3fcae47a4aa0faa06ea3a45e1bb64a458"
},

View file

@ -3456,6 +3456,10 @@ ntq_emit_instr(struct v3d_compile *c, nir_instr *instr)
break;
case nir_instr_type_jump:
/* Always flush TMU before jumping to another block, for the
* same reasons as in ntq_emit_block.
*/
ntq_flush_tmu(c);
if (vir_in_nonuniform_control_flow(c))
ntq_emit_jump(c, nir_instr_as_jump(instr));
else