summaryrefslogtreecommitdiffstats
path: root/src/mesa/pipe
diff options
context:
space:
mode:
authorBrian <[email protected]>2007-09-10 16:52:05 -0600
committerBrian <[email protected]>2007-09-10 16:52:05 -0600
commit6275b40063d7d06e0b05767ebca3963ce7e9c34e (patch)
tree1323c9c266075c70ae186e0f31ca8d09999a088b /src/mesa/pipe
parent051a2a3028370da66c15c44fa49fa9474b23d668 (diff)
merge buffer_unreference(), buffer_reference()
Diffstat (limited to 'src/mesa/pipe')
-rw-r--r--src/mesa/pipe/i915simple/i915_regions.c4
-rw-r--r--src/mesa/pipe/p_winsys.h9
-rw-r--r--src/mesa/pipe/softpipe/sp_region.c4
-rw-r--r--src/mesa/pipe/softpipe/sp_state_fs.c5
4 files changed, 11 insertions, 11 deletions
diff --git a/src/mesa/pipe/i915simple/i915_regions.c b/src/mesa/pipe/i915simple/i915_regions.c
index aad4a6a5375..bab256c7634 100644
--- a/src/mesa/pipe/i915simple/i915_regions.c
+++ b/src/mesa/pipe/i915simple/i915_regions.c
@@ -123,8 +123,8 @@ i915_region_release(struct pipe_context *pipe, struct pipe_region **region)
if ((*region)->refcount == 0) {
assert((*region)->map_refcount == 0);
- i915->pipe.winsys->buffer_unreference( i915->pipe.winsys,
- &((*region)->buffer) );
+ i915->pipe.winsys->buffer_reference( i915->pipe.winsys,
+ &((*region)->buffer), NULL );
free(*region);
}
*region = NULL;
diff --git a/src/mesa/pipe/p_winsys.h b/src/mesa/pipe/p_winsys.h
index 09baef020ea..4d2cc2196f6 100644
--- a/src/mesa/pipe/p_winsys.h
+++ b/src/mesa/pipe/p_winsys.h
@@ -79,11 +79,10 @@ struct pipe_winsys {
void (*buffer_unmap)( struct pipe_winsys *sws,
struct pipe_buffer_handle *buf );
- struct pipe_buffer_handle *(*buffer_reference)( struct pipe_winsys *sws,
- struct pipe_buffer_handle *buf );
-
- void (*buffer_unreference)( struct pipe_winsys *sws,
- struct pipe_buffer_handle **buf );
+ /** Set ptr = buf, with reference counting */
+ void (*buffer_reference)( struct pipe_winsys *sws,
+ struct pipe_buffer_handle **ptr,
+ struct pipe_buffer_handle *buf );
void (*buffer_data)(struct pipe_winsys *sws,
struct pipe_buffer_handle *buf,
diff --git a/src/mesa/pipe/softpipe/sp_region.c b/src/mesa/pipe/softpipe/sp_region.c
index 25d0a419aa3..ae05b1d0dea 100644
--- a/src/mesa/pipe/softpipe/sp_region.c
+++ b/src/mesa/pipe/softpipe/sp_region.c
@@ -121,8 +121,8 @@ sp_region_release(struct pipe_context *pipe, struct pipe_region **region)
if ((*region)->refcount == 0) {
assert((*region)->map_refcount == 0);
- sp->pipe.winsys->buffer_unreference( sp->pipe.winsys,
- &((*region)->buffer) );
+ sp->pipe.winsys->buffer_reference( sp->pipe.winsys,
+ &((*region)->buffer), NULL );
free(*region);
}
*region = NULL;
diff --git a/src/mesa/pipe/softpipe/sp_state_fs.c b/src/mesa/pipe/softpipe/sp_state_fs.c
index 9e3ff6d35c0..5ab246896b9 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;