Commit a0d4d7fe authored by Eric Anholt's avatar Eric Anholt

freedreno: Fix assertion failures in context setup in shader-db mode.

The TTN path needs access to the screen to make the right decisions about
lowering, but we didn't have pctx->screen set up at fdN_prog_init time.
Reviewed-by: Rob Clark's avatarRob Clark <robdclark@gmail.com>
Tested-by: Eduardo Lima Mitev's avatarEduardo Lima Mitev <elima@igalia.com>
parent 9d148555
......@@ -79,6 +79,7 @@ fd3_context_create(struct pipe_screen *pscreen, void *priv, unsigned flags)
return NULL;
pctx = &fd3_ctx->base.base;
pctx->screen = pscreen;
fd3_ctx->base.dev = fd_device_ref(screen->dev);
fd3_ctx->base.screen = fd_screen(pscreen);
......
......@@ -79,6 +79,7 @@ fd4_context_create(struct pipe_screen *pscreen, void *priv, unsigned flags)
return NULL;
pctx = &fd4_ctx->base.base;
pctx->screen = pscreen;
fd4_ctx->base.dev = fd_device_ref(screen->dev);
fd4_ctx->base.screen = fd_screen(pscreen);
......
......@@ -78,6 +78,7 @@ fd5_context_create(struct pipe_screen *pscreen, void *priv, unsigned flags)
return NULL;
pctx = &fd5_ctx->base.base;
pctx->screen = pscreen;
fd5_ctx->base.dev = fd_device_ref(screen->dev);
fd5_ctx->base.screen = fd_screen(pscreen);
......
......@@ -84,6 +84,7 @@ fd6_context_create(struct pipe_screen *pscreen, void *priv, unsigned flags)
return NULL;
pctx = &fd6_ctx->base.base;
pctx->screen = pscreen;
fd6_ctx->base.dev = fd_device_ref(screen->dev);
fd6_ctx->base.screen = fd_screen(pscreen);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment