Skip to content

Commit

Permalink
vulkan: recognize more vendor ids for love.graphics.getRendererInfo
Browse files Browse the repository at this point in the history
  • Loading branch information
slime73 committed Jun 15, 2024
1 parent 8e67fd5 commit 6869737
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/modules/graphics/vulkan/Vulkan.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -494,13 +494,14 @@ TextureFormat Vulkan::getTextureFormat(PixelFormat format)
return textureFormat;
}

// values taken from https://pcisig.com/membership/member-companies
// values taken from https://pcisig.com/membership/member-companies and https://vulkan.gpuinfo.org/displaycoreproperty.php?name=vendorid&platform=all
// as specified at https://www.khronos.org/registry/vulkan/specs/1.3-extensions/man/html/VkPhysicalDeviceProperties.html
std::string Vulkan::getVendorName(uint32_t vendorId)
{
switch (vendorId)
{
case 4130:
case 4098:
return "AMD";
case 4318:
return "Nvidia";
Expand All @@ -516,6 +517,8 @@ std::string Vulkan::getVendorName(uint32_t vendorId)
return "Qualcomm";
case 5348:
return "Broadcom";
case 65541:
return "Mesa";
default:
return "unknown";
}
Expand Down

0 comments on commit 6869737

Please sign in to comment.