mirror of
https://github.com/PabloMK7/citra.git
synced 2025-09-08 03:40:05 +00:00
add requested refactoring
This commit is contained in:
parent
ca1e01ad05
commit
8f25ac55fb
1 changed files with 5 additions and 5 deletions
|
@ -33,9 +33,11 @@ vk::MemoryPropertyFlags MakePropertyFlags(BufferType type) {
|
|||
case BufferType::Upload:
|
||||
return vk::MemoryPropertyFlagBits::eHostVisible | vk::MemoryPropertyFlagBits::eHostCoherent;
|
||||
case BufferType::Download:
|
||||
return vk::MemoryPropertyFlagBits::eHostVisible | vk::MemoryPropertyFlagBits::eHostCoherent | vk::MemoryPropertyFlagBits::eHostCached;
|
||||
return vk::MemoryPropertyFlagBits::eHostVisible |
|
||||
vk::MemoryPropertyFlagBits::eHostCoherent | vk::MemoryPropertyFlagBits::eHostCached;
|
||||
case BufferType::Stream:
|
||||
return vk::MemoryPropertyFlagBits::eDeviceLocal | vk::MemoryPropertyFlagBits::eHostVisible | vk::MemoryPropertyFlagBits::eHostCoherent;
|
||||
return vk::MemoryPropertyFlagBits::eDeviceLocal | vk::MemoryPropertyFlagBits::eHostVisible |
|
||||
vk::MemoryPropertyFlagBits::eHostCoherent;
|
||||
default:
|
||||
UNREACHABLE_MSG("Unknown buffer type {}", type);
|
||||
return vk::MemoryPropertyFlagBits::eHostVisible;
|
||||
|
@ -78,9 +80,7 @@ u32 GetMemoryType(const vk::PhysicalDeviceMemoryProperties& properties, BufferTy
|
|||
}
|
||||
|
||||
// If we reach here, we couldn't find any suitable memory type
|
||||
LOG_CRITICAL(Render_Vulkan, "Failed to find a suitable memory type for buffer type {}",
|
||||
BufferTypeName(type));
|
||||
return 0; // Return 0 as a fallback, though this will likely cause issues
|
||||
UNREACHABLE_MSG("Failed to find a suitable memory type for buffer type {}", BufferTypeName(type));
|
||||
}
|
||||
|
||||
constexpr u64 WATCHES_INITIAL_RESERVE = 0x4000;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue