Commit 32d718f3 by Jonah Ryan-Davis Committed by Commit Bot

NVIDIA Shield workaround for IsNVIDIA() detection

NVIDIA Shield do not implement Vulkan, which is used to populate vendor IDs in SystemInfo. The vendorIDs are used to check IsNVIDIA(). This CL adds a workaround so IsNVIDIA() returns true for NVIDIA Shield. Bug: angleproject:3541 Change-Id: Ib36dd376207163acfc8d3a0e341f07a7d6aa3122 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1663080 Commit-Queue: Jonah Ryan-Davis <jonahr@google.com> Reviewed-by: 's avatarGeoff Lang <geofflang@chromium.org>
parent f9686af0
...@@ -185,6 +185,11 @@ bool IsNexus6P() ...@@ -185,6 +185,11 @@ bool IsNexus6P()
return IsAndroidDevice("Nexus 6P"); return IsAndroidDevice("Nexus 6P");
} }
bool IsNexus9()
{
return IsAndroidDevice("Nexus 9");
}
bool IsPixelXL() bool IsPixelXL()
{ {
return IsAndroidDevice("Pixel XL"); return IsAndroidDevice("Pixel XL");
...@@ -212,6 +217,13 @@ bool IsAMD() ...@@ -212,6 +217,13 @@ bool IsAMD()
bool IsNVIDIA() bool IsNVIDIA()
{ {
#if defined(ANGLE_PLATFORM_ANDROID)
// NVIDIA Shield cannot detect vendor ID (http://anglebug.com/3541)
if (IsNVIDIAShield())
{
return true;
}
#endif
return HasSystemVendorID(kVendorID_NVIDIA); return HasSystemVendorID(kVendorID_NVIDIA);
} }
......
...@@ -28,6 +28,7 @@ bool IsFuchsia(); ...@@ -28,6 +28,7 @@ bool IsFuchsia();
// Android devices // Android devices
bool IsNexus5X(); bool IsNexus5X();
bool IsNexus6P(); bool IsNexus6P();
bool IsNexus9();
bool IsPixelXL(); bool IsPixelXL();
bool IsPixel2(); bool IsPixel2();
bool IsNVIDIAShield(); bool IsNVIDIAShield();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment