diff --git a/src/Cafe/HW/Latte/Renderer/Metal/MetalRenderer.cpp b/src/Cafe/HW/Latte/Renderer/Metal/MetalRenderer.cpp index f4a35eb5..64406171 100644 --- a/src/Cafe/HW/Latte/Renderer/Metal/MetalRenderer.cpp +++ b/src/Cafe/HW/Latte/Renderer/Metal/MetalRenderer.cpp @@ -40,6 +40,7 @@ MetalRenderer::MetalRenderer() // Feature support m_hasUnifiedMemory = m_device->hasUnifiedMemory(); m_isAppleGPU = m_device->supportsFamily(MTL::GPUFamilyApple1); + m_recommendedMaxVRAMUsage = m_device->recommendedMaxWorkingSetSize(); m_pixelFormatSupport = MetalPixelFormatSupport(m_device); // Resources @@ -213,7 +214,8 @@ bool MetalRenderer::IsPadWindowActive() bool MetalRenderer::GetVRAMInfo(int& usageInMB, int& totalInMB) const { usageInMB = m_device->currentAllocatedSize() / 1024 / 1024; - totalInMB = usageInMB; + // TODO: get the total VRAM size? Though would be pretty useless on Apple Silicon + totalInMB = m_recommendedMaxVRAMUsage / 1024 / 1024; return true; } diff --git a/src/Cafe/HW/Latte/Renderer/Metal/MetalRenderer.h b/src/Cafe/HW/Latte/Renderer/Metal/MetalRenderer.h index d43dcdd3..5b34d630 100644 --- a/src/Cafe/HW/Latte/Renderer/Metal/MetalRenderer.h +++ b/src/Cafe/HW/Latte/Renderer/Metal/MetalRenderer.h @@ -414,6 +414,7 @@ private: // Feature support bool m_hasUnifiedMemory; bool m_isAppleGPU; + uint32 m_recommendedMaxVRAMUsage; MetalPixelFormatSupport m_pixelFormatSupport; // Managers and caches