zink: use new tc util for setting bytes_mapped_limit
authorMike Blumenkrantz <michael.blumenkrantz@gmail.com>
Wed, 14 Jul 2021 17:44:39 +0000 (13:44 -0400)
committerMarge Bot <eric+marge@anholt.net>
Tue, 20 Jul 2021 13:49:01 +0000 (13:49 +0000)
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11853>

src/gallium/drivers/zink/zink_context.c

index d92ddbe..e459929 100644 (file)
@@ -3576,7 +3576,7 @@ zink_context_create(struct pipe_screen *pscreen, void *priv, unsigned flags)
                                                      zink_context_is_resource_busy, true, &ctx->tc);
 
    if (tc && (struct zink_context*)tc != ctx) {
-      tc->bytes_mapped_limit = screen->total_mem / 4;
+      threaded_context_init_bytes_mapped_limit(tc, 4);
       ctx->base.set_context_param = zink_set_context_param;
    }