diff options
author | Ilia Mirkin <imirkin@alum.mit.edu> | 2017-03-19 01:22:29 -0400 |
---|---|---|
committer | Ilia Mirkin <imirkin@alum.mit.edu> | 2017-03-19 01:24:06 -0400 |
commit | 663e7c25f5ea6a3933de804d47503e3569debc01 (patch) | |
tree | 9b59f714a9ddfaeb2480f3e482afedad174d2042 /src/gallium/drivers/nouveau/nv30 | |
parent | 0e9232dbccf45ffd7e36f8cc1837a7e5e4a295de (diff) |
nv30: create uploader after pipe->screen is set
Fixes crashes after recent upload rework.
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Diffstat (limited to 'src/gallium/drivers/nouveau/nv30')
-rw-r--r-- | src/gallium/drivers/nouveau/nv30/nv30_context.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/gallium/drivers/nouveau/nv30/nv30_context.c b/src/gallium/drivers/nouveau/nv30/nv30_context.c index 716d2bbe4c1..4c16e0c41df 100644 --- a/src/gallium/drivers/nouveau/nv30/nv30_context.c +++ b/src/gallium/drivers/nouveau/nv30/nv30_context.c @@ -209,6 +209,12 @@ nv30_context_create(struct pipe_screen *pscreen, void *priv, unsigned ctxflags) nv30->base.screen = &screen->base; nv30->base.copy_data = nv30_transfer_copy_data; + pipe = &nv30->base.pipe; + pipe->screen = pscreen; + pipe->priv = priv; + pipe->destroy = nv30_context_destroy; + pipe->flush = nv30_context_flush; + nv30->base.pipe.stream_uploader = u_upload_create_default(&nv30->base.pipe); if (!nv30->base.pipe.stream_uploader) { nv30_context_destroy(pipe); @@ -216,12 +222,6 @@ nv30_context_create(struct pipe_screen *pscreen, void *priv, unsigned ctxflags) } nv30->base.pipe.const_uploader = nv30->base.pipe.stream_uploader; - pipe = &nv30->base.pipe; - pipe->screen = pscreen; - pipe->priv = priv; - pipe->destroy = nv30_context_destroy; - pipe->flush = nv30_context_flush; - /*XXX: *cough* per-context client */ nv30->base.client = screen->base.client; |