mirror of
https://github.com/cemu-project/Cemu.git
synced 2025-07-06 06:51:18 +12:00
determine GPU vendor
This commit is contained in:
parent
8df01528f4
commit
15e5e4487e
1 changed files with 13 additions and 0 deletions
|
@ -148,6 +148,19 @@ MetalRenderer::MetalRenderer()
|
|||
m_device = MTL::CreateSystemDefaultDevice();
|
||||
}
|
||||
|
||||
// Vendor
|
||||
const char* deviceName = m_device->name()->utf8String();
|
||||
if (memcmp(deviceName, "Apple", 5) == 0)
|
||||
m_vendor = GfxVendor::Apple;
|
||||
else if (memcmp(deviceName, "AMD", 3) == 0)
|
||||
m_vendor = GfxVendor::AMD;
|
||||
else if (memcmp(deviceName, "Intel", 5) == 0)
|
||||
m_vendor = GfxVendor::Intel;
|
||||
else if (memcmp(deviceName, "NVIDIA", 6) == 0)
|
||||
m_vendor = GfxVendor::Nvidia;
|
||||
else
|
||||
m_vendor = GfxVendor::Generic;
|
||||
|
||||
// Feature support
|
||||
m_isAppleGPU = m_device->supportsFamily(MTL::GPUFamilyApple1);
|
||||
m_supportsFramebufferFetch = GetConfig().framebuffer_fetch.GetValue() ? m_device->supportsFamily(MTL::GPUFamilyApple2) : false;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue