aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarek Olšák <[email protected]>2015-02-10 22:27:21 +0100
committerMarek Olšák <[email protected]>2015-02-17 17:31:48 +0100
commit064847122a4c6dae6fdee41a4862948352cd929f (patch)
treeea4ec025a085a3c8424603d8106880fc0bff6309
parente8d727a2b6b89f6c6c205fbe87acf30659a0bd39 (diff)
winsys/radeon: allow unaligned size for user-memory buffers
This is not required, but being user-friendly doesn't hurt. Reviewed-by: Christian König <[email protected]>
-rw-r--r--src/gallium/winsys/radeon/drm/radeon_drm_bo.c2
1 files changed, 1 insertions, 1 deletions
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;