From 27dd3807a8d9b84491c403690a376440ac34a39d Mon Sep 17 00:00:00 2001 From: Rob Clark Date: Fri, 31 May 2024 13:09:38 -0700 Subject: [PATCH] freedreno: Use buffer replacement limit Signed-off-by: Rob Clark Part-of: --- src/gallium/drivers/freedreno/freedreno_context.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/gallium/drivers/freedreno/freedreno_context.c b/src/gallium/drivers/freedreno/freedreno_context.c index 500cff9178e..6bd25687d7c 100644 --- a/src/gallium/drivers/freedreno/freedreno_context.c +++ b/src/gallium/drivers/freedreno/freedreno_context.c @@ -755,8 +755,11 @@ fd_context_init_tc(struct pipe_context *pctx, unsigned flags) }, &ctx->tc); - if (tc && tc != pctx) + if (tc && tc != pctx) { threaded_context_init_bytes_mapped_limit((struct threaded_context *)tc, 16); + ((struct threaded_context *)tc)->bytes_replaced_limit = + ((struct threaded_context *)tc)->bytes_mapped_limit / 4; + } return tc; }