Check vendor and render string for Freedreno driver
There are quite a few GL context capability tracking for Qualcomm Adreno device in GrGLCaps.cpp. The vendor/render detecting functions currently only check strings for Qualcomm vendor KGSL driver. Let's add check for Freedreno driver as well, so that those GL context capability handling applies to both KGSL and Freedreno driver. This fixes some rendering corruption and performance issue on an A405 device running Freedreno driver on Android. Change-Id: I98744725490d9941465238434a6574c03dc66963 Signed-off-by: Shawn Guo <shawn.guo@linaro.org> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/306746 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com>
This commit is contained in:
parent
75306394f4
commit
284190b108
@ -282,7 +282,7 @@ GrGLVendor GrGLGetVendorFromString(const char* vendorString) {
|
||||
if (0 == strncmp(vendorString, "Intel ", 6) || 0 == strcmp(vendorString, "Intel")) {
|
||||
return kIntel_GrGLVendor;
|
||||
}
|
||||
if (0 == strcmp(vendorString, "Qualcomm")) {
|
||||
if (0 == strcmp(vendorString, "Qualcomm") || 0 == strcmp(vendorString, "freedreno")) {
|
||||
return kQualcomm_GrGLVendor;
|
||||
}
|
||||
if (0 == strcmp(vendorString, "NVIDIA Corporation")) {
|
||||
@ -341,6 +341,10 @@ GrGLRenderer GrGLGetRendererFromStrings(const char* rendererString,
|
||||
}
|
||||
int adrenoNumber;
|
||||
n = sscanf(rendererString, "Adreno (TM) %d", &adrenoNumber);
|
||||
if (n < 1) {
|
||||
// retry with freedreno driver
|
||||
n = sscanf(rendererString, "FD%d", &adrenoNumber);
|
||||
}
|
||||
if (1 == n) {
|
||||
if (adrenoNumber >= 300) {
|
||||
if (adrenoNumber < 400) {
|
||||
|
Loading…
Reference in New Issue
Block a user