diff options
author | Ben Skeggs <[email protected]> | 2009-03-07 17:14:24 +1000 |
---|---|---|
committer | Ben Skeggs <[email protected]> | 2009-03-07 17:49:09 +1000 |
commit | ca95d71a4bc63e2ea45abf9096a3da802819ef92 (patch) | |
tree | d97d43c54f8e841c3bc01d3de1d313dc42034cfe /src/gallium/drivers/nv40 | |
parent | f2ec26cf52fcbf98139cb9e31520183189d09861 (diff) |
nouveau: make stateobjs start off with refcount of 1
Diffstat (limited to 'src/gallium/drivers/nv40')
-rw-r--r-- | src/gallium/drivers/nv40/nv40_fragprog.c | 1 | ||||
-rw-r--r-- | src/gallium/drivers/nv40/nv40_fragtex.c | 1 | ||||
-rw-r--r-- | src/gallium/drivers/nv40/nv40_state.c | 3 | ||||
-rw-r--r-- | src/gallium/drivers/nv40/nv40_state_blend.c | 1 | ||||
-rw-r--r-- | src/gallium/drivers/nv40/nv40_state_fb.c | 1 | ||||
-rw-r--r-- | src/gallium/drivers/nv40/nv40_state_scissor.c | 1 | ||||
-rw-r--r-- | src/gallium/drivers/nv40/nv40_state_viewport.c | 1 | ||||
-rw-r--r-- | src/gallium/drivers/nv40/nv40_vbo.c | 3 | ||||
-rw-r--r-- | src/gallium/drivers/nv40/nv40_vertprog.c | 1 |
9 files changed, 13 insertions, 0 deletions
diff --git a/src/gallium/drivers/nv40/nv40_fragprog.c b/src/gallium/drivers/nv40/nv40_fragprog.c index 1031e87e970..16e40889ec3 100644 --- a/src/gallium/drivers/nv40/nv40_fragprog.c +++ b/src/gallium/drivers/nv40/nv40_fragprog.c @@ -944,6 +944,7 @@ nv40_fragprog_validate(struct nv40_context *nv40) so_method(so, nv40->screen->curie, NV40TCL_FP_CONTROL, 1); so_data (so, fp->fp_control); so_ref(so, &fp->so); + so_ref(NULL, &so); update_constants: if (fp->nr_consts) { diff --git a/src/gallium/drivers/nv40/nv40_fragtex.c b/src/gallium/drivers/nv40/nv40_fragtex.c index 0227d22620d..eb3002dc053 100644 --- a/src/gallium/drivers/nv40/nv40_fragtex.c +++ b/src/gallium/drivers/nv40/nv40_fragtex.c @@ -151,6 +151,7 @@ nv40_fragtex_validate(struct nv40_context *nv40) so = nv40_fragtex_build(nv40, unit); so_ref(so, &nv40->state.hw[NV40_STATE_FRAGTEX0 + unit]); + so_ref(NULL, &so); state->dirty |= (1ULL << (NV40_STATE_FRAGTEX0 + unit)); } diff --git a/src/gallium/drivers/nv40/nv40_state.c b/src/gallium/drivers/nv40/nv40_state.c index 2eff25aa836..c3ee4d23453 100644 --- a/src/gallium/drivers/nv40/nv40_state.c +++ b/src/gallium/drivers/nv40/nv40_state.c @@ -52,6 +52,7 @@ nv40_blend_state_create(struct pipe_context *pipe, so_data (so, cso->dither ? 1 : 0); so_ref(so, &bso->so); + so_ref(NULL, &so); bso->pipe = *cso; return (void *)bso; } @@ -414,6 +415,7 @@ nv40_rasterizer_state_create(struct pipe_context *pipe, } so_ref(so, &rsso->so); + so_ref(NULL, &so); rsso->pipe = *cso; return (void *)rsso; } @@ -487,6 +489,7 @@ nv40_depth_stencil_alpha_state_create(struct pipe_context *pipe, } so_ref(so, &zsaso->so); + so_ref(NULL, &so); zsaso->pipe = *cso; return (void *)zsaso; } diff --git a/src/gallium/drivers/nv40/nv40_state_blend.c b/src/gallium/drivers/nv40/nv40_state_blend.c index 95e6d7394f4..8cd05ce66ef 100644 --- a/src/gallium/drivers/nv40/nv40_state_blend.c +++ b/src/gallium/drivers/nv40/nv40_state_blend.c @@ -28,6 +28,7 @@ nv40_state_blend_colour_validate(struct nv40_context *nv40) (float_to_ubyte(bcol->color[2]) << 0))); so_ref(so, &nv40->state.hw[NV40_STATE_BCOL]); + so_ref(NULL, &so); return TRUE; } diff --git a/src/gallium/drivers/nv40/nv40_state_fb.c b/src/gallium/drivers/nv40/nv40_state_fb.c index 5ebd3a1a56b..be618a306bf 100644 --- a/src/gallium/drivers/nv40/nv40_state_fb.c +++ b/src/gallium/drivers/nv40/nv40_state_fb.c @@ -150,6 +150,7 @@ nv40_state_framebuffer_validate(struct nv40_context *nv40) so_data (so, (1 << 12) | h); so_ref(so, &nv40->state.hw[NV40_STATE_FB]); + so_ref(NULL, &so); return TRUE; } diff --git a/src/gallium/drivers/nv40/nv40_state_scissor.c b/src/gallium/drivers/nv40/nv40_state_scissor.c index 285239ef419..cf58d33906a 100644 --- a/src/gallium/drivers/nv40/nv40_state_scissor.c +++ b/src/gallium/drivers/nv40/nv40_state_scissor.c @@ -23,6 +23,7 @@ nv40_state_scissor_validate(struct nv40_context *nv40) } so_ref(so, &nv40->state.hw[NV40_STATE_SCISSOR]); + so_ref(NULL, &so); return TRUE; } diff --git a/src/gallium/drivers/nv40/nv40_state_viewport.c b/src/gallium/drivers/nv40/nv40_state_viewport.c index 869a55b4053..3d14d203081 100644 --- a/src/gallium/drivers/nv40/nv40_state_viewport.c +++ b/src/gallium/drivers/nv40/nv40_state_viewport.c @@ -55,6 +55,7 @@ nv40_state_viewport_validate(struct nv40_context *nv40) } so_ref(so, &nv40->state.hw[NV40_STATE_VIEWPORT]); + so_ref(NULL, &so); return TRUE; } diff --git a/src/gallium/drivers/nv40/nv40_vbo.c b/src/gallium/drivers/nv40/nv40_vbo.c index 8f1834628f7..f3518b2e4fe 100644 --- a/src/gallium/drivers/nv40/nv40_vbo.c +++ b/src/gallium/drivers/nv40/nv40_vbo.c @@ -537,10 +537,13 @@ nv40_vbo_validate(struct nv40_context *nv40) so_data (vtxbuf, 0); so_ref(vtxbuf, &nv40->state.hw[NV40_STATE_VTXBUF]); + so_ref(NULL, &vtxbuf); nv40->state.dirty |= (1ULL << NV40_STATE_VTXBUF); so_ref(vtxfmt, &nv40->state.hw[NV40_STATE_VTXFMT]); + so_ref(NULL, &vtxfmt); nv40->state.dirty |= (1ULL << NV40_STATE_VTXFMT); so_ref(sattr, &nv40->state.hw[NV40_STATE_VTXATTR]); + so_ref(NULL, &sattr); nv40->state.dirty |= (1ULL << NV40_STATE_VTXATTR); return FALSE; } diff --git a/src/gallium/drivers/nv40/nv40_vertprog.c b/src/gallium/drivers/nv40/nv40_vertprog.c index 0862386638c..7df9a4d3264 100644 --- a/src/gallium/drivers/nv40/nv40_vertprog.c +++ b/src/gallium/drivers/nv40/nv40_vertprog.c @@ -916,6 +916,7 @@ check_gpu_resources: so_method(so, curie, NV40TCL_CLIP_PLANE_ENABLE, 1); so_data (so, vp->clip_ctrl); so_ref(so, &vp->so); + so_ref(NULL, &so); upload_code = TRUE; } |