freedreno/a6xx: Rework texture_clear fallback

C++ is more picky about a goto jumping over variable initialization,
even if unused after the goto label (presumably because of destructors
that can be called after a variable goes out of scope).  Since there is
only a single fallback path, get rid of the goto.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21846>
This commit is contained in:
Rob Clark
2023-02-26 09:57:24 -08:00
committed by Marge Bot
parent f921b7c09b
commit af2f0c3d9b
@@ -871,8 +871,10 @@ fd6_clear_texture(struct pipe_context *pctx, struct pipe_resource *prsc,
fprintf(stderr, "\n");
}
if (!can_do_clear(prsc, level, box))
goto fallback;
if (!can_do_clear(prsc, level, box)) {
util_clear_texture(pctx, prsc, level, box, data);
return;
}
union pipe_color_union color;
@@ -942,11 +944,6 @@ fd6_clear_texture(struct pipe_context *pctx, struct pipe_resource *prsc,
* the ctx->batch may need to turn its queries back on.
*/
fd_context_dirty(ctx, FD_DIRTY_QUERY);
return;
fallback:
util_clear_texture(pctx, prsc, level, box, data);
}
void