summaryrefslogtreecommitdiff
path: root/src/mesa/pipe/softpipe/sp_state_fs.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa/pipe/softpipe/sp_state_fs.c')
-rw-r--r--src/mesa/pipe/softpipe/sp_state_fs.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/mesa/pipe/softpipe/sp_state_fs.c b/src/mesa/pipe/softpipe/sp_state_fs.c
index 9e3ff6d35c..5ab246896b 100644
--- a/src/mesa/pipe/softpipe/sp_state_fs.c
+++ b/src/mesa/pipe/softpipe/sp_state_fs.c
@@ -68,8 +68,9 @@ void softpipe_set_constant_buffer(struct pipe_context *pipe,
assert(index == 0);
/* note: reference counting */
- ws->buffer_unreference(ws, &softpipe->constants[shader].buffer);
- softpipe->constants[shader].buffer = ws->buffer_reference(ws, buf->buffer);
+ ws->buffer_reference(ws,
+ &softpipe->constants[shader].buffer,
+ buf->buffer);
softpipe->constants[shader].size = buf->size;
softpipe->dirty |= SP_NEW_CONSTANTS;