summaryrefslogtreecommitdiffstats
path: root/src/gallium/winsys/radeon/drm
diff options
context:
space:
mode:
authorMarek Olšák <[email protected]>2012-03-31 01:31:47 +0200
committerMarek Olšák <[email protected]>2012-04-01 23:57:50 +0200
commit669d8766ff3403938794eb80d7769347b6e52174 (patch)
treeee775a4a51c56ddae6168adb77888d5dd79014e0 /src/gallium/winsys/radeon/drm
parent68e4c83ffa9319c934a96ca1daf25e81b78a6d90 (diff)
r600g: optimize r600_resource_va
Avoid calling get_radeon_bo and inline it.
Diffstat (limited to 'src/gallium/winsys/radeon/drm')
-rw-r--r--src/gallium/winsys/radeon/drm/radeon_drm_bo.c6
-rw-r--r--src/gallium/winsys/radeon/drm/radeon_winsys.h2
2 files changed, 3 insertions, 5 deletions
diff --git a/src/gallium/winsys/radeon/drm/radeon_drm_bo.c b/src/gallium/winsys/radeon/drm/radeon_drm_bo.c
index 31a47c6f14c..47bbcb87513 100644
--- a/src/gallium/winsys/radeon/drm/radeon_drm_bo.c
+++ b/src/gallium/winsys/radeon/drm/radeon_drm_bo.c
@@ -898,11 +898,9 @@ static boolean radeon_winsys_bo_get_handle(struct pb_buffer *buffer,
return TRUE;
}
-static uint64_t radeon_winsys_bo_va(struct pb_buffer *buffer)
+static uint64_t radeon_winsys_bo_va(struct radeon_winsys_cs_handle *buf)
{
- struct radeon_bo *bo = get_radeon_bo(buffer);
-
- return bo->va;
+ return ((struct radeon_bo*)buf)->va;
}
void radeon_bomgr_init_functions(struct radeon_drm_winsys *ws)
diff --git a/src/gallium/winsys/radeon/drm/radeon_winsys.h b/src/gallium/winsys/radeon/drm/radeon_winsys.h
index 7d5259ad11f..6eef6b16200 100644
--- a/src/gallium/winsys/radeon/drm/radeon_winsys.h
+++ b/src/gallium/winsys/radeon/drm/radeon_winsys.h
@@ -255,7 +255,7 @@ struct radeon_winsys {
* \param buf A winsys buffer object
* \return virtual address
*/
- uint64_t (*buffer_get_virtual_address)(struct pb_buffer *buf);
+ uint64_t (*buffer_get_virtual_address)(struct radeon_winsys_cs_handle *buf);
/**************************************************************************
* Command submission.