summaryrefslogtreecommitdiffstats
path: root/src/gallium/winsys
diff options
context:
space:
mode:
authorMarek Olšák <[email protected]>2010-07-08 22:32:39 +0200
committerMarek Olšák <[email protected]>2010-07-08 22:39:52 +0200
commit61a26cdfdc9c75a83c0d362c973d5436fe077be4 (patch)
treefc55d9268fb85cfedaf89e3ab53a3cc7d03db920 /src/gallium/winsys
parent8a3f2eb9e6c830ff953751221961f2a6c8f76661 (diff)
r300g: store/return the stride for winsys_handle in winsys
Diffstat (limited to 'src/gallium/winsys')
-rw-r--r--src/gallium/winsys/radeon/drm/radeon_r300.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/gallium/winsys/radeon/drm/radeon_r300.c b/src/gallium/winsys/radeon/drm/radeon_r300.c
index cb26447606d..51cfc0fd400 100644
--- a/src/gallium/winsys/radeon/drm/radeon_r300.c
+++ b/src/gallium/winsys/radeon/drm/radeon_r300.c
@@ -136,20 +136,25 @@ static boolean radeon_r300_winsys_is_buffer_referenced(struct r300_winsys_screen
}
static struct r300_winsys_buffer *radeon_r300_winsys_buffer_from_handle(struct r300_winsys_screen *rws,
- unsigned handle)
+ struct winsys_handle *whandle,
+ unsigned *stride)
{
struct radeon_libdrm_winsys *ws = radeon_winsys_screen(rws);
struct pb_buffer *_buf;
- _buf = radeon_drm_bufmgr_create_buffer_from_handle(ws->kman, handle);
+ *stride = whandle->stride;
+
+ _buf = radeon_drm_bufmgr_create_buffer_from_handle(ws->kman, whandle->handle);
return radeon_libdrm_winsys_buffer(_buf);
}
static boolean radeon_r300_winsys_buffer_get_handle(struct r300_winsys_screen *rws,
struct r300_winsys_buffer *buffer,
- struct winsys_handle *whandle)
+ struct winsys_handle *whandle,
+ unsigned stride)
{
struct pb_buffer *_buf = radeon_pb_buffer(buffer);
+ whandle->stride = stride;
return radeon_drm_bufmgr_get_handle(_buf, whandle);
}