summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/nv50/nv50_state.c
diff options
context:
space:
mode:
authorChristoph Bumiller <[email protected]>2011-03-13 13:06:42 +0100
committerChristoph Bumiller <[email protected]>2011-03-13 13:23:55 +0100
commit26a199efac43cc0509f174ca47ad0d2b0044eee0 (patch)
treed0c4f32958fe8ac5553767c30996a0597b069287 /src/gallium/drivers/nv50/nv50_state.c
parent259efc90e7a1a14bc1797707c8f05d5200f4d0b6 (diff)
nv50,nvc0: add some missing resource referencing
Diffstat (limited to 'src/gallium/drivers/nv50/nv50_state.c')
-rw-r--r--src/gallium/drivers/nv50/nv50_state.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/gallium/drivers/nv50/nv50_state.c b/src/gallium/drivers/nv50/nv50_state.c
index 3c497451d8b..db257159698 100644
--- a/src/gallium/drivers/nv50/nv50_state.c
+++ b/src/gallium/drivers/nv50/nv50_state.c
@@ -796,10 +796,13 @@ nv50_set_index_buffer(struct pipe_context *pipe,
{
struct nv50_context *nv50 = nv50_context(pipe);
- if (ib)
+ if (ib) {
+ pipe_resource_reference(&nv50->idxbuf.buffer, ib->buffer);
+
memcpy(&nv50->idxbuf, ib, sizeof(nv50->idxbuf));
- else
- nv50->idxbuf.buffer = NULL;
+ } else {
+ pipe_resource_reference(&nv50->idxbuf.buffer, NULL);
+ }
}
static void