mirror of
https://github.com/godotengine/godot-angle-static.git
synced 2026-01-03 14:09:33 +03:00
Return the vendor string as hex when it is unknown.
ANGLE's vendor strings would include the generic "Unknown" when we did not recognize the driver's vendor ID. Print the vendor ID so that we can future-proof ourselves against new GPU vendors. Bug: chromium:1464799 Change-Id: Idac67b369bc95c3c49eb754e8c681d5930a1f494 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4804365 Reviewed-by: Rafael Cintron <rafael.cintron@microsoft.com> Commit-Queue: Rafael Cintron <rafael.cintron@microsoft.com>
This commit is contained in:
committed by
Angle LUCI CQ
parent
4d4795b249
commit
7c72fbe95c
@@ -236,7 +236,7 @@ bool Is12thGenIntel(uint32_t DeviceId)
|
||||
std::end(IntelGen12);
|
||||
}
|
||||
|
||||
const char *GetVendorString(uint32_t vendorId)
|
||||
std::string GetVendorString(uint32_t vendorId)
|
||||
{
|
||||
switch (vendorId)
|
||||
{
|
||||
@@ -274,11 +274,11 @@ const char *GetVendorString(uint32_t vendorId)
|
||||
return "Test";
|
||||
case 0:
|
||||
return "NULL";
|
||||
default:
|
||||
// TODO(jmadill): More vendor IDs.
|
||||
UNIMPLEMENTED();
|
||||
return "Unknown";
|
||||
}
|
||||
|
||||
std::stringstream s;
|
||||
s << gl::FmtHex(vendorId);
|
||||
return s.str();
|
||||
}
|
||||
|
||||
ARMDriverVersion ParseARMDriverVersion(uint32_t driverVersion)
|
||||
|
||||
@@ -155,7 +155,7 @@ inline bool IsSwiftshader(uint32_t vendorId, uint32_t deviceId)
|
||||
return IsGoogle(vendorId) && deviceId == ANDROID_DEVICE_ID_SWIFTSHADER;
|
||||
}
|
||||
|
||||
const char *GetVendorString(uint32_t vendorId);
|
||||
std::string GetVendorString(uint32_t vendorId);
|
||||
|
||||
// For Linux, Intel graphics driver version is the Mesa version. The version number has three
|
||||
// fields: major revision, minor revision and release number.
|
||||
|
||||
Reference in New Issue
Block a user