aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/nvc0/nvc0_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/nvc0/nvc0_context.c
parent07323a80a258372875e61f73a4f745374bea6bda (diff)
nv50,nvc0: handle user constbufs without wrapping them in a resource
Diffstat (limited to 'src/gallium/drivers/nvc0/nvc0_context.c')
-rw-r--r--src/gallium/drivers/nvc0/nvc0_context.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/gallium/drivers/nvc0/nvc0_context.c b/src/gallium/drivers/nvc0/nvc0_context.c
index b0ab5bdc504..f93081465bd 100644
--- a/src/gallium/drivers/nvc0/nvc0_context.c
+++ b/src/gallium/drivers/nvc0/nvc0_context.c
@@ -72,8 +72,9 @@ nvc0_context_unreference_resources(struct nvc0_context *nvc0)
for (i = 0; i < nvc0->num_textures[s]; ++i)
pipe_sampler_view_reference(&nvc0->textures[s][i], NULL);
- for (i = 0; i < 16; ++i)
- pipe_resource_reference(&nvc0->constbuf[s][i], NULL);
+ for (i = 0; i < NVC0_MAX_PIPE_CONSTBUFS; ++i)
+ if (!nvc0->constbuf[s][i].user)
+ pipe_resource_reference(&nvc0->constbuf[s][i].u.buf, NULL);
}
for (i = 0; i < nvc0->num_tfbbufs; ++i)