event->bo = device->ws->buffer_create(device->ws, 8, 8,
RADEON_DOMAIN_GTT,
- RADEON_FLAG_CPU_ACCESS);
+ RADEON_FLAG_VA_UNCACHED | RADEON_FLAG_CPU_ACCESS);
if (!event->bo) {
vk_free2(&device->alloc, pAllocator, event);
return VK_ERROR_OUT_OF_DEVICE_MEMORY;
RADEON_FLAG_GTT_WC = (1 << 0),
RADEON_FLAG_CPU_ACCESS = (1 << 1),
RADEON_FLAG_NO_CPU_ACCESS = (1 << 2),
- RADEON_FLAG_VIRTUAL = (1 << 3)
+ RADEON_FLAG_VIRTUAL = (1 << 3),
+ RADEON_FLAG_VA_UNCACHED = (1 << 4),
};
enum radeon_bo_usage { /* bitfield */
goto error_bo_alloc;
}
- r = radv_amdgpu_bo_va_op(ws->dev, buf_handle, 0, size, va, 0, AMDGPU_VA_OP_MAP);
+
+ uint32_t va_flags = 0;
+ if (flags & RADEON_FLAG_VA_UNCACHED)
+ va_flags |= AMDGPU_VM_MTYPE_UC;
+ r = radv_amdgpu_bo_va_op(ws->dev, buf_handle, 0, size, va, flags, AMDGPU_VA_OP_MAP);
if (r)
goto error_va_map;