diff options
Diffstat (limited to 'src/gallium/drivers/nv50/nv50_program.c')
-rw-r--r-- | src/gallium/drivers/nv50/nv50_program.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/gallium/drivers/nv50/nv50_program.c b/src/gallium/drivers/nv50/nv50_program.c index 14c5d47e79..2d15868ae8 100644 --- a/src/gallium/drivers/nv50/nv50_program.c +++ b/src/gallium/drivers/nv50/nv50_program.c @@ -1603,7 +1603,7 @@ nv50_program_validate_code(struct nv50_context *nv50, struct nv50_program *p) { struct nouveau_channel *chan = nv50->screen->nvws->channel; struct nouveau_grobj *tesla = nv50->screen->tesla; - struct pipe_winsys *ws = nv50->pipe.winsys; + struct pipe_screen *screen = nv50->pipe.screen; struct nv50_program_exec *e; struct nouveau_stateobj *so; const unsigned flags = NOUVEAU_BO_VRAM | NOUVEAU_BO_WR; @@ -1611,7 +1611,7 @@ nv50_program_validate_code(struct nv50_context *nv50, struct nv50_program *p) boolean upload = FALSE; if (!p->buffer) { - p->buffer = ws->buffer_create(ws, 0x100, 0, p->exec_size * 4); + p->buffer = screen->buffer_create(screen, 0x100, 0, p->exec_size * 4); upload = TRUE; } @@ -1719,6 +1719,7 @@ nv50_vertprog_validate(struct nv50_context *nv50) so_method(so, tesla, 0x140c, 1); so_data (so, 0); /* program start offset */ so_ref(so, &nv50->state.vertprog); + so_ref(NULL, &so); } void @@ -1758,6 +1759,7 @@ nv50_fragprog_validate(struct nv50_context *nv50) so_method(so, tesla, 0x1414, 1); so_data (so, 0); /* program start offset */ so_ref(so, &nv50->state.fragprog); + so_ref(NULL, &so); } void @@ -1775,7 +1777,7 @@ nv50_program_destroy(struct nv50_context *nv50, struct nv50_program *p) p->exec_size = 0; if (p->buffer) - pipe_buffer_reference(pscreen, &p->buffer, NULL); + pipe_buffer_reference(&p->buffer, NULL); nv50->screen->nvws->res_free(&p->data); |