[Mesa-dev] [PATCH 2/5] winsys/amdgpu: add support for 64-bit buffer sizes
Nicolai Hähnle
nhaehnle at gmail.com
Mon Apr 11 16:39:43 UTC 2016
On 11.04.2016 05:38, Marek Olšák wrote:
> diff --git a/src/gallium/winsys/radeon/drm/radeon_drm_bo.c b/src/gallium/winsys/radeon/drm/radeon_drm_bo.c
> index c92a66e..2810dca 100644
> --- a/src/gallium/winsys/radeon/drm/radeon_drm_bo.c
> +++ b/src/gallium/winsys/radeon/drm/radeon_drm_bo.c
> @@ -718,7 +718,7 @@ static void radeon_bo_set_metadata(struct pb_buffer *_buf,
>
> static struct pb_buffer *
> radeon_winsys_bo_create(struct radeon_winsys *rws,
> - unsigned size,
> + uint64_t size,
> unsigned alignment,
> boolean use_reusable_pool,
> enum radeon_bo_domain domain,
Please add a check here to fail allocation when size doesn't fit in 32 bits.
> @@ -769,7 +769,7 @@ radeon_winsys_bo_create(struct radeon_winsys *rws,
> }
>
> static struct pb_buffer *radeon_winsys_bo_from_ptr(struct radeon_winsys *rws,
> - void *pointer, unsigned size)
> + void *pointer, uint64_t size)
> {
> struct radeon_drm_winsys *ws = radeon_drm_winsys(rws);
> struct drm_radeon_gem_userptr args;
>
More information about the mesa-dev
mailing list