summaryrefslogtreecommitdiffstats
path: root/src/gallium/winsys/r600
diff options
context:
space:
mode:
authorDave Airlie <[email protected]>2011-06-07 11:03:59 +1000
committerDave Airlie <[email protected]>2011-06-08 11:46:59 +1000
commit4707ae20ad6cd99bbcaa33747fc7b043c85bb084 (patch)
tree4f69851ec3c362a1ca1c400e96c5b93e42a0d067 /src/gallium/winsys/r600
parentff298a66d7dffd0e91997a6af4cb3ffb3962f350 (diff)
r600g: inline r600_bo_reference.
This relies on the reference member being first, so document it. Signed-off-by: Dave Airlie <[email protected]>
Diffstat (limited to 'src/gallium/winsys/r600')
-rw-r--r--src/gallium/winsys/r600/drm/r600_bo.c10
-rw-r--r--src/gallium/winsys/r600/drm/r600_priv.h3
2 files changed, 2 insertions, 11 deletions
diff --git a/src/gallium/winsys/r600/drm/r600_bo.c b/src/gallium/winsys/r600/drm/r600_bo.c
index 2bfb8e4e193..8bb216dc7a8 100644
--- a/src/gallium/winsys/r600/drm/r600_bo.c
+++ b/src/gallium/winsys/r600/drm/r600_bo.c
@@ -180,16 +180,6 @@ void r600_bo_destroy(struct radeon *radeon, struct r600_bo *bo)
free(bo);
}
-void r600_bo_reference(struct radeon *radeon, struct r600_bo **dst, struct r600_bo *src)
-{
- struct r600_bo *old = *dst;
-
- if (pipe_reference(&(*dst)->reference, &src->reference)) {
- r600_bo_destroy(radeon, old);
- }
- *dst = src;
-}
-
boolean r600_bo_get_winsys_handle(struct radeon *radeon, struct r600_bo *bo,
unsigned stride, struct winsys_handle *whandle)
{
diff --git a/src/gallium/winsys/r600/drm/r600_priv.h b/src/gallium/winsys/r600/drm/r600_priv.h
index d9cb52409cd..da31a42b2a0 100644
--- a/src/gallium/winsys/r600/drm/r600_priv.h
+++ b/src/gallium/winsys/r600/drm/r600_priv.h
@@ -95,7 +95,8 @@ struct radeon_bo {
};
struct r600_bo {
- struct pipe_reference reference;
+ struct pipe_reference reference; /* this must be the first member for the r600_bo_reference inline to work */
+ /* DO NOT MOVE THIS ^ */
unsigned size;
unsigned tiling_flags;
unsigned kernel_pitch;