summaryrefslogtreecommitdiffstats
path: root/src/gallium/winsys/radeon
diff options
context:
space:
mode:
authorMarek Olšák <[email protected]>2011-08-03 01:03:13 +0200
committerMarek Olšák <[email protected]>2011-08-16 09:15:10 +0200
commit11daa7e325cc2653269d3c01844ff77fdd515de9 (patch)
treeb20cf81d4017ca53423d33d57118a93efa38c2f5 /src/gallium/winsys/radeon
parentedca57e53318121a7bd909c0c36dcffe5d9ac15f (diff)
r600g: allocate/destroy buffers using radeon_winsys
We use the cache buffer manager from radeon_winsys now, but we don't use anything else yet. Reviewed-by: Alex Deucher <[email protected]>
Diffstat (limited to 'src/gallium/winsys/radeon')
-rw-r--r--src/gallium/winsys/radeon/drm/radeon_drm_bo.c7
-rw-r--r--src/gallium/winsys/radeon/drm/radeon_winsys.h4
2 files changed, 11 insertions, 0 deletions
diff --git a/src/gallium/winsys/radeon/drm/radeon_drm_bo.c b/src/gallium/winsys/radeon/drm/radeon_drm_bo.c
index 609a9065db8..58898d3423e 100644
--- a/src/gallium/winsys/radeon/drm/radeon_drm_bo.c
+++ b/src/gallium/winsys/radeon/drm/radeon_drm_bo.c
@@ -617,6 +617,11 @@ static boolean radeon_winsys_bo_get_handle(struct pb_buffer *buffer,
return TRUE;
}
+static unsigned trans_get_buffer_handle(struct pb_buffer *buf)
+{
+ return get_radeon_bo(buf)->handle;
+}
+
void radeon_bomgr_init_functions(struct radeon_drm_winsys *ws)
{
ws->base.buffer_get_cs_handle = radeon_drm_get_cs_handle;
@@ -629,4 +634,6 @@ void radeon_bomgr_init_functions(struct radeon_drm_winsys *ws)
ws->base.buffer_create = radeon_winsys_bo_create;
ws->base.buffer_from_handle = radeon_winsys_bo_from_handle;
ws->base.buffer_get_handle = radeon_winsys_bo_get_handle;
+
+ ws->base.trans_get_buffer_handle = trans_get_buffer_handle;
}
diff --git a/src/gallium/winsys/radeon/drm/radeon_winsys.h b/src/gallium/winsys/radeon/drm/radeon_winsys.h
index 2948ea78c18..2e5000702e0 100644
--- a/src/gallium/winsys/radeon/drm/radeon_winsys.h
+++ b/src/gallium/winsys/radeon/drm/radeon_winsys.h
@@ -325,6 +325,10 @@ struct radeon_winsys {
boolean (*cs_request_feature)(struct radeon_winsys_cs *cs,
enum radeon_feature_id fid,
boolean enable);
+
+
+ /* Transitional functions for r600g when moving to winsys/radeon */
+ unsigned (*trans_get_buffer_handle)(struct pb_buffer *buf);
};
#endif