[Mesa-dev] [PATCH 4/6] winsys/radeon: allow unaligned size for user-memory buffers
Marek Olšák
maraeo at gmail.com
Wed Feb 11 12:18:14 PST 2015
From: Marek Olšák <marek.olsak at amd.com>
This is not required, but being user-friendly doesn't hurt.
---
src/gallium/winsys/radeon/drm/radeon_drm_bo.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/gallium/winsys/radeon/drm/radeon_drm_bo.c b/src/gallium/winsys/radeon/drm/radeon_drm_bo.c
index 8f4b135..e3b2c22 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;
--
2.1.0
More information about the mesa-dev
mailing list