summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorChristian König <[email protected]>2011-01-31 23:38:10 +0100
committerChristian König <[email protected]>2011-01-31 23:38:10 +0100
commit7fb722c35c2d2cb74b14417a8ddc0684ed6dd838 (patch)
tree6b589d829ec349ceb32dc64c1aee14e82cf41592 /src
parenta8c144a388a5c7275d8d223c5508c66a0612a1b0 (diff)
r600g: fix invalid ref count handling in r600_set_constant_buffer
Only decrement ref count if r600_upload_const_buffer really changes the buffer.
Diffstat (limited to 'src')
-rw-r--r--src/gallium/drivers/r600/r600_state_common.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gallium/drivers/r600/r600_state_common.c b/src/gallium/drivers/r600/r600_state_common.c
index e086e272c8e..d82985e1b1f 100644
--- a/src/gallium/drivers/r600/r600_state_common.c
+++ b/src/gallium/drivers/r600/r600_state_common.c
@@ -433,7 +433,7 @@ void r600_set_constant_buffer(struct pipe_context *ctx, uint shader, uint index,
return;
}
- if (!rbuffer->user_buffer)
+ if (buffer != &rbuffer->r.base.b)
pipe_resource_reference((struct pipe_resource**)&rbuffer, NULL);
}