diff options
author | Brian <[email protected]> | 2007-09-10 16:52:05 -0600 |
---|---|---|
committer | Brian <[email protected]> | 2007-09-10 16:52:05 -0600 |
commit | 6275b40063d7d06e0b05767ebca3963ce7e9c34e (patch) | |
tree | 1323c9c266075c70ae186e0f31ca8d09999a088b /src/mesa/drivers/dri | |
parent | 051a2a3028370da66c15c44fa49fa9474b23d668 (diff) |
merge buffer_unreference(), buffer_reference()
Diffstat (limited to 'src/mesa/drivers/dri')
-rw-r--r-- | src/mesa/drivers/dri/intel_winsys/intel_winsys_pipe.c | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/src/mesa/drivers/dri/intel_winsys/intel_winsys_pipe.c b/src/mesa/drivers/dri/intel_winsys/intel_winsys_pipe.c index 33aacf2a431..668bedcbdab 100644 --- a/src/mesa/drivers/dri/intel_winsys/intel_winsys_pipe.c +++ b/src/mesa/drivers/dri/intel_winsys/intel_winsys_pipe.c @@ -84,22 +84,21 @@ static void intel_buffer_unmap(struct pipe_winsys *sws, } -static struct pipe_buffer_handle * +static void intel_buffer_reference(struct pipe_winsys *sws, + struct pipe_buffer_handle **ptr, struct pipe_buffer_handle *buf) { - return pipe_bo( driBOReference( dri_bo(buf) ) ); -} - -static void intel_buffer_unreference(struct pipe_winsys *sws, - struct pipe_buffer_handle **buf) -{ - if (*buf) { - driBOUnReference( dri_bo(*buf) ); + if (*ptr) { + driBOUnReference( dri_bo(*ptr) ); *buf = NULL; } + + driBOReference( dri_bo(buf) ); + *ptr = buf; } + /* Grabs the hardware lock! */ static void intel_buffer_data(struct pipe_winsys *sws, @@ -208,7 +207,6 @@ intel_create_pipe_winsys( struct intel_context *intel ) iws->winsys.buffer_map = intel_buffer_map; iws->winsys.buffer_unmap = intel_buffer_unmap; iws->winsys.buffer_reference = intel_buffer_reference; - iws->winsys.buffer_unreference = intel_buffer_unreference; iws->winsys.buffer_data = intel_buffer_data; iws->winsys.buffer_subdata = intel_buffer_subdata; iws->winsys.buffer_get_subdata = intel_buffer_get_subdata; |