if (rws->info.has_virtual_memory) {
struct drm_radeon_gem_va va;
+ unsigned va_gap_size;
- bo->va = radeon_bomgr_find_va(rws, size, alignment);
+ va_gap_size = rws->check_vm ? MAX2(4 * alignment, 64 * 1024) : 0;
+ bo->va = radeon_bomgr_find_va(rws, size + va_gap_size, alignment);
va.handle = bo->handle;
va.vm_id = 0;
(ws->info.family == CHIP_HAWAII &&
ws->accel_working2 < 3);
+ ws->check_vm = strstr(debug_get_option("R600_DEBUG", ""), "check_vm") != NULL;
+
return TRUE;
}
if (!do_winsys_init(ws))
goto fail1;
- pb_cache_init(&ws->bo_cache, 500000, 2.0f, 0,
+ pb_cache_init(&ws->bo_cache, 500000, ws->check_vm ? 1.0f : 2.0f, 0,
MIN2(ws->info.vram_size, ws->info.gart_size),
radeon_bo_destroy,
radeon_bo_can_reclaim);