Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
expand MacOS AMD GPU workaround to all dGPU
  • Loading branch information
Kethen committed Dec 9, 2024
1 parent 286580a commit ff1e765
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions Common/GPU/Vulkan/VulkanMemory.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,9 @@ VulkanPushPool::VulkanPushPool(VulkanContext *vulkan, const char *name, size_t o
RegisterGPUMemoryManager(this);

#if PPSSPP_PLATFORM(MAC) && PPSSPP_ARCH(AMD64)
if (vulkan_->GetPhysicalDeviceProperties().properties.vendorID == VULKAN_VENDOR_AMD) {
INFO_LOG(Log::G3D, "MoltenVK with AMD, allocating buffers with VMA_MEMORY_USAGE_CPU_ONLY");
if (vulkan_->GetPhysicalDeviceProperties().properties.vendorID != VULKAN_VENDOR_INTEL) {
// ref https://github.com/KhronosGroup/MoltenVK/issues/960
INFO_LOG(Log::G3D, "MoltenVK with dedicated gpu, allocating buffers with VMA_MEMORY_USAGE_CPU_ONLY");
allocation_usage_ = VMA_MEMORY_USAGE_CPU_ONLY; // VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT + VK_MEMORY_PROPERTY_HOST_COHERENT_BIT in vma type index
} else {
allocation_usage_ = VMA_MEMORY_USAGE_CPU_TO_GPU;
Expand Down

0 comments on commit ff1e765

Please sign in to comment.