return NULL;
}
- buffer = rws->buffer_from_handle(rws, whandle, &stride, NULL);
+ buffer = rws->buffer_from_handle(rws, whandle, 0, &stride, NULL);
if (!buffer)
return NULL;
templ->depth0 != 1 || templ->last_level != 0)
return NULL;
- buf = rscreen->ws->buffer_from_handle(rscreen->ws, whandle, &stride, &offset);
+ buf = rscreen->ws->buffer_from_handle(rscreen->ws, whandle,
+ rscreen->info.max_alignment,
+ &stride, &offset);
if (!buf)
return NULL;
return NULL;
buf = rscreen->ws->buffer_from_handle(rscreen->ws, whandle,
+ rscreen->info.max_alignment,
&stride, &offset);
if (!buf) {
free(memobj);
*/
struct pb_buffer *(*buffer_from_handle)(struct radeon_winsys *ws,
struct winsys_handle *whandle,
+ unsigned vm_alignment,
unsigned *stride, unsigned *offset);
/**
templ->depth0 != 1 || templ->last_level != 0)
return NULL;
- buf = sscreen->ws->buffer_from_handle(sscreen->ws, whandle, &stride, &offset);
+ buf = sscreen->ws->buffer_from_handle(sscreen->ws, whandle,
+ sscreen->info.max_alignment,
+ &stride, &offset);
if (!buf)
return NULL;
return NULL;
buf = sscreen->ws->buffer_from_handle(sscreen->ws, whandle,
+ sscreen->info.max_alignment,
&stride, &offset);
if (!buf) {
free(memobj);
static struct pb_buffer *amdgpu_bo_from_handle(struct radeon_winsys *rws,
struct winsys_handle *whandle,
+ unsigned vm_alignment,
unsigned *stride,
unsigned *offset)
{
goto error;
r = amdgpu_va_range_alloc(ws->dev, amdgpu_gpu_va_range_general,
- result.alloc_size, 1 << 20, 0, &va, &va_handle,
+ result.alloc_size, vm_alignment, 0, &va, &va_handle,
AMDGPU_VA_RANGE_HIGH);
if (r)
goto error;
static struct pb_buffer *radeon_winsys_bo_from_handle(struct radeon_winsys *rws,
struct winsys_handle *whandle,
+ unsigned vm_alignment,
unsigned *stride,
unsigned *offset)
{
if (ws->info.r600_has_virtual_memory && !bo->va) {
struct drm_radeon_gem_va va;
- bo->va = radeon_bomgr_find_va64(ws, bo->base.size, 1 << 20);
+ bo->va = radeon_bomgr_find_va64(ws, bo->base.size, vm_alignment);
va.handle = bo->handle;
va.operation = RADEON_VA_MAP;
/* 2D tiling on CIK is supported since DRM 2.35.0 */
ws->info.has_2d_tiling = ws->info.chip_class <= SI || ws->info.drm_minor >= 35;
ws->info.has_read_registers_query = ws->info.drm_minor >= 42;
+ ws->info.max_alignment = 1024*1024;
ws->check_vm = strstr(debug_get_option("R600_DEBUG", ""), "check_vm") != NULL;