radeonsi: add fail_if_slow parameter into si_msaa_resolve_blit_via_CB

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28917>
This commit is contained in:
Marek Olšák
2024-04-15 00:00:10 -04:00
committed by Marge Bot
parent 77d81fb8b0
commit 0c545e2fca
3 changed files with 6 additions and 4 deletions

View File

@@ -1102,7 +1102,8 @@ static bool resolve_formats_compatible(enum pipe_format src, enum pipe_format ds
return *need_rgb_to_bgr;
}
bool si_msaa_resolve_blit_via_CB(struct pipe_context *ctx, const struct pipe_blit_info *info)
bool si_msaa_resolve_blit_via_CB(struct pipe_context *ctx, const struct pipe_blit_info *info,
bool fail_if_slow)
{
struct si_context *sctx = (struct si_context *)ctx;
@@ -1226,7 +1227,7 @@ static void si_blit(struct pipe_context *ctx, const struct pipe_blit_info *info)
if (unlikely(sctx->sqtt_enabled))
sctx->sqtt_next_event = EventCmdResolveImage;
if (si_msaa_resolve_blit_via_CB(ctx, info))
if (si_msaa_resolve_blit_via_CB(ctx, info, true))
return;
if (unlikely(sctx->sqtt_enabled))

View File

@@ -1401,7 +1401,8 @@ void si_gfx_copy_image(struct si_context *sctx, struct pipe_resource *dst,
const struct pipe_box *src_box);
void si_decompress_dcc(struct si_context *sctx, struct si_texture *tex);
void si_flush_implicit_resources(struct si_context *sctx);
bool si_msaa_resolve_blit_via_CB(struct pipe_context *ctx, const struct pipe_blit_info *info);
bool si_msaa_resolve_blit_via_CB(struct pipe_context *ctx, const struct pipe_blit_info *info,
bool fail_if_slow);
void si_gfx_blit(struct pipe_context *ctx, const struct pipe_blit_info *info);
/* si_nir_optim.c */

View File

@@ -927,7 +927,7 @@ void si_test_blit(struct si_screen *sscreen, unsigned test_flags)
bool success;
if (only_cb_resolve)
success = si_msaa_resolve_blit_via_CB(ctx, &info);
success = si_msaa_resolve_blit_via_CB(ctx, &info, false);
else
success = si_compute_blit(sctx, &info, NULL, 0, 0, SI_OP_SYNC_BEFORE_AFTER);