diff --git a/src/gallium/drivers/panfrost/pan_context.c b/src/gallium/drivers/panfrost/pan_context.c index 9bc1f018f05..e408d49a24d 100644 --- a/src/gallium/drivers/panfrost/pan_context.c +++ b/src/gallium/drivers/panfrost/pan_context.c @@ -986,3 +986,10 @@ panfrost_create_context(struct pipe_screen *screen, void *priv, unsigned flags) return gallium; } + +void +panfrost_context_reinit(struct panfrost_context *ctx) +{ + pan_screen(ctx->base.screen)->vtbl.context_cleanup(ctx); + pan_screen(ctx->base.screen)->vtbl.context_init(ctx); +} diff --git a/src/gallium/drivers/panfrost/pan_context.h b/src/gallium/drivers/panfrost/pan_context.h index 407e3dd6afc..caf5e3534b0 100644 --- a/src/gallium/drivers/panfrost/pan_context.h +++ b/src/gallium/drivers/panfrost/pan_context.h @@ -523,4 +523,6 @@ void panfrost_track_image_access(struct panfrost_batch *batch, enum pipe_shader_type stage, struct pipe_image_view *image); +void panfrost_context_reinit(struct panfrost_context *ctx); + #endif