diff options
author | Brian <[email protected]> | 2007-08-11 17:03:51 +0100 |
---|---|---|
committer | Brian <[email protected]> | 2007-08-11 17:03:51 +0100 |
commit | 37fdc69a99a7692d337fb4efaea97df842490f21 (patch) | |
tree | 34124b899f0b5db209b5368b7d9218f2e4f97a5a | |
parent | 83521ee66ad3f3cd3ec8212d6f746caecdc6c407 (diff) |
fix invalid usage of buffer_unreference()
Need to pass the address of the buffer ptr, not the buffer ptr.
Before, the region->buffer type was void * so it wasn't effectively
type-checked. Changing the type to pipe_buffer_object* allows the
compiler to detect the error. Fixing this solves a segfault.
-rw-r--r-- | src/mesa/pipe/i915simple/i915_regions.c | 2 | ||||
-rw-r--r-- | src/mesa/pipe/softpipe/sp_region.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/src/mesa/pipe/i915simple/i915_regions.c b/src/mesa/pipe/i915simple/i915_regions.c index 9b7cddb58dc..e27443a58c0 100644 --- a/src/mesa/pipe/i915simple/i915_regions.c +++ b/src/mesa/pipe/i915simple/i915_regions.c @@ -124,7 +124,7 @@ i915_region_release(struct pipe_context *pipe, struct pipe_region **region) assert((*region)->map_refcount == 0); i915->pipe.winsys->buffer_unreference( i915->pipe.winsys, - (*region)->buffer ); + &((*region)->buffer) ); free(*region); } *region = NULL; diff --git a/src/mesa/pipe/softpipe/sp_region.c b/src/mesa/pipe/softpipe/sp_region.c index 115f3ab8260..10b7479e975 100644 --- a/src/mesa/pipe/softpipe/sp_region.c +++ b/src/mesa/pipe/softpipe/sp_region.c @@ -119,7 +119,7 @@ sp_region_release(struct pipe_context *pipe, struct pipe_region **region) assert((*region)->map_refcount == 0); sp->pipe.winsys->buffer_unreference( sp->pipe.winsys, - (*region)->buffer ); + &((*region)->buffer) ); free(*region); } *region = NULL; |