r300: reduce number of iterations for vertex shader loops

Using the default value leads to occasional hangs on RV516 for unknown
reasons. Set it to 128 insted of 255.

dEQP and piglit are still happy and I don't expect any real app to hit
this, but lets see. As a side effect this boosts fps in the apps that
have non-unrollable vertex shaders (as the shaders now effectivelly run
almost two times faster) and ~5% dEQP runtime decrease.

Reviewed-by: Filip Gawin <filip.gawin@collabora.com>
Signed-off-by: Pavel Ondračka <pavel.ondracka@gmail.com>
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/7934
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20873>
This commit is contained in:
Pavel Ondračka 2023-01-22 16:45:00 +01:00 committed by Marge Bot
parent ccd3bb4548
commit 38694b7386

View file

@ -502,11 +502,15 @@ static void translate_vertex_program(struct radeon_compiler *c, void *user)
"Too many flow control instructions.");
return;
}
/* Maximum of R500_PVS_FC_LOOP_CNT_JMP_INST is 0xff, here
* we reduce it to half to avoid occasional hangs on RV516
* and downclocked RV530.
*/
if (compiler->Base.is_r500) {
compiler->code->fc_op_addrs.r500
[compiler->code->num_fc_ops].lw =
R500_PVS_FC_ACT_ADRS(act_addr)
| R500_PVS_FC_LOOP_CNT_JMP_INST(0x00ff)
| R500_PVS_FC_LOOP_CNT_JMP_INST(0x0080)
;
compiler->code->fc_op_addrs.r500
[compiler->code->num_fc_ops].uw =