summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/nv50/nv50_context.c
diff options
context:
space:
mode:
authorChristoph Bumiller <[email protected]>2012-05-16 20:52:41 +0200
committerChristoph Bumiller <[email protected]>2012-05-17 15:24:58 +0200
commitfcb28682101dfa127486373411043d5d97a0ff8f (patch)
tree178155b68e55c7d7278c70cff3569c985677d428 /src/gallium/drivers/nv50/nv50_context.c
parent07323a80a258372875e61f73a4f745374bea6bda (diff)
nv50,nvc0: handle user constbufs without wrapping them in a resource
Diffstat (limited to 'src/gallium/drivers/nv50/nv50_context.c')
-rw-r--r--src/gallium/drivers/nv50/nv50_context.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/gallium/drivers/nv50/nv50_context.c b/src/gallium/drivers/nv50/nv50_context.c
index 558fe0b3684..1e6bbaf8eb8 100644
--- a/src/gallium/drivers/nv50/nv50_context.c
+++ b/src/gallium/drivers/nv50/nv50_context.c
@@ -86,8 +86,9 @@ nv50_context_unreference_resources(struct nv50_context *nv50)
for (i = 0; i < nv50->num_textures[s]; ++i)
pipe_sampler_view_reference(&nv50->textures[s][i], NULL);
- for (i = 0; i < 16; ++i)
- pipe_resource_reference(&nv50->constbuf[s][i], NULL);
+ for (i = 0; i < NV50_MAX_PIPE_CONSTBUFS; ++i)
+ if (!nv50->constbuf[s][i].user)
+ pipe_resource_reference(&nv50->constbuf[s][i].u.buf, NULL);
}
}