mirror of
https://github.com/cemu-project/Cemu.git
synced 2024-11-29 12:34:17 +01:00
report total vram correctly
This commit is contained in:
parent
7499c3fbe7
commit
c4a26d4c70
@ -40,6 +40,7 @@ MetalRenderer::MetalRenderer()
|
|||||||
// Feature support
|
// Feature support
|
||||||
m_hasUnifiedMemory = m_device->hasUnifiedMemory();
|
m_hasUnifiedMemory = m_device->hasUnifiedMemory();
|
||||||
m_isAppleGPU = m_device->supportsFamily(MTL::GPUFamilyApple1);
|
m_isAppleGPU = m_device->supportsFamily(MTL::GPUFamilyApple1);
|
||||||
|
m_recommendedMaxVRAMUsage = m_device->recommendedMaxWorkingSetSize();
|
||||||
m_pixelFormatSupport = MetalPixelFormatSupport(m_device);
|
m_pixelFormatSupport = MetalPixelFormatSupport(m_device);
|
||||||
|
|
||||||
// Resources
|
// Resources
|
||||||
@ -213,7 +214,8 @@ bool MetalRenderer::IsPadWindowActive()
|
|||||||
bool MetalRenderer::GetVRAMInfo(int& usageInMB, int& totalInMB) const
|
bool MetalRenderer::GetVRAMInfo(int& usageInMB, int& totalInMB) const
|
||||||
{
|
{
|
||||||
usageInMB = m_device->currentAllocatedSize() / 1024 / 1024;
|
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;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -414,6 +414,7 @@ private:
|
|||||||
// Feature support
|
// Feature support
|
||||||
bool m_hasUnifiedMemory;
|
bool m_hasUnifiedMemory;
|
||||||
bool m_isAppleGPU;
|
bool m_isAppleGPU;
|
||||||
|
uint32 m_recommendedMaxVRAMUsage;
|
||||||
MetalPixelFormatSupport m_pixelFormatSupport;
|
MetalPixelFormatSupport m_pixelFormatSupport;
|
||||||
|
|
||||||
// Managers and caches
|
// Managers and caches
|
||||||
|
Loading…
Reference in New Issue
Block a user