From 064847122a4c6dae6fdee41a4862948352cd929f Mon Sep 17 00:00:00 2001 From: Marek Olšák Date: Tue, 10 Feb 2015 22:27:21 +0100 Subject: winsys/radeon: allow unaligned size for user-memory buffers MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This is not required, but being user-friendly doesn't hurt. Reviewed-by: Christian König --- src/gallium/winsys/radeon/drm/radeon_drm_bo.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/gallium/winsys/radeon/drm/radeon_drm_bo.c b/src/gallium/winsys/radeon/drm/radeon_drm_bo.c index 8f4b13576b9..e3b2c228378 100644 --- a/src/gallium/winsys/radeon/drm/radeon_drm_bo.c +++ b/src/gallium/winsys/radeon/drm/radeon_drm_bo.c @@ -883,7 +883,7 @@ static struct pb_buffer *radeon_winsys_bo_from_ptr(struct radeon_winsys *rws, memset(&args, 0, sizeof(args)); args.addr = (uintptr_t)pointer; - args.size = size; + args.size = align(size, sysconf(_SC_PAGE_SIZE)); args.flags = RADEON_GEM_USERPTR_ANONONLY | RADEON_GEM_USERPTR_VALIDATE | RADEON_GEM_USERPTR_REGISTER; -- cgit v1.2.3