Mesa (main): freedreno: Add debugging for blitter fallback recursion
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Tue Jun 15 19:26:49 UTC 2021
Module: Mesa
Branch: main
Commit: 6d01c1780569fb2fe50e2f1620e15b8ec1ae3785
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=6d01c1780569fb2fe50e2f1620e15b8ec1ae3785
Author: Rob Clark <robdclark at chromium.org>
Date: Sun Jun 13 13:37:16 2021 -0700
freedreno: Add debugging for blitter fallback recursion
Signed-off-by: Rob Clark <robdclark at chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11371>
---
src/gallium/drivers/freedreno/freedreno_context.h | 3 +++
src/gallium/drivers/freedreno/freedreno_resource.c | 5 +++++
2 files changed, 8 insertions(+)
diff --git a/src/gallium/drivers/freedreno/freedreno_context.h b/src/gallium/drivers/freedreno/freedreno_context.h
index f685a3b7ce7..dc2a97843ca 100644
--- a/src/gallium/drivers/freedreno/freedreno_context.h
+++ b/src/gallium/drivers/freedreno/freedreno_context.h
@@ -350,6 +350,9 @@ struct fd_context {
*/
bool in_discard_blit : 1 dt;
+ /* For catching recursion problems with blit fallback: */
+ bool in_blit : 1 dt;
+
/* points to either scissor or disabled_scissor depending on rast state: */
struct pipe_scissor_state *current_scissor dt;
diff --git a/src/gallium/drivers/freedreno/freedreno_resource.c b/src/gallium/drivers/freedreno/freedreno_resource.c
index 309be6137bf..4d1c96c3e91 100644
--- a/src/gallium/drivers/freedreno/freedreno_resource.c
+++ b/src/gallium/drivers/freedreno/freedreno_resource.c
@@ -232,6 +232,9 @@ do_blit(struct fd_context *ctx, const struct pipe_blit_info *blit,
{
struct pipe_context *pctx = &ctx->base;
+ assert(!ctx->in_blit);
+ ctx->in_blit = true;
+
/* TODO size threshold too?? */
if (fallback || !fd_blit(pctx, blit)) {
/* do blit on cpu: */
@@ -240,6 +243,8 @@ do_blit(struct fd_context *ctx, const struct pipe_blit_info *blit,
blit->dst.box.z, blit->src.resource,
blit->src.level, &blit->src.box);
}
+
+ ctx->in_blit = false;
}
/**
More information about the mesa-commit
mailing list