pan/mdg: Always write return address to r1.w

This might not be optimal but it matches our current behaviour and is much more
justified than the "accidental" code before. Caught by the gcc warning:

../src/panfrost/midgard/midgard_schedule.c:1227:48: warning: the comparison will
always evaluate as ‘true’ for the address of ‘writeout_branch’ will never be
NULL [-Waddress]

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18338>
This commit is contained in:
Alyssa Rosenzweig
2022-08-22 13:27:55 -04:00
committed by Marge Bot
parent d05a2243d4
commit 4fe755e803

View File

@@ -1220,11 +1220,8 @@ mir_schedule_alu(
predicate.no_cond = true;
}
/* When MRT is in use, writeout loops require r1.w to be filled with a
* return address for the blend shader to jump to. We always emit the
* move for blend shaders themselves for ABI reasons. */
if (writeout && (ctx->inputs->is_blend || ctx->writeout_branch[1])) {
/* Set r1.w to the return address so we can return from blend shaders */
if (writeout) {
vadd = ralloc(ctx, midgard_instruction);
*vadd = v_mov(~0, make_compiler_temp(ctx));