创建逻辑设备功能

This commit is contained in:
2026-01-04 19:40:00 +08:00
parent faca69caea
commit 473e5b57df
27 changed files with 1247 additions and 165 deletions

View File

@@ -0,0 +1,21 @@
#include "gpu_buffer.h"
#include "allocator.h"
namespace mirai {
gpu_buffer::gpu_buffer(const buffer_create_info& info) {
vma_allocator::get();
}
bool gpu_buffer::is_host_visible() const noexcept {
switch (mem_usage_) {
case memory_usage::cpu_only:
case memory_usage::cpu_to_gpu:
case memory_usage::gpu_to_cpu:
case memory_usage::auto_prefer_host:
return true;
default:
return false;
}
}
}