diff options
author | 2013-02-22 16:44:04 +0000 | |
---|---|---|
committer | 2013-02-22 16:44:04 +0000 | |
commit | 3012ded0ffd152c41ef5c85d13e49116fee856eb (patch) | |
tree | 04c493db7e45f15acba1b41874a5e01942265a45 /src/gpu | |
parent | 13b77e83076d3735a86926f6f48741e1360c525c (diff) |
Enable cpu-array dynamic vertex data on SGX.
R=robertphillips@google.com
Review URL: https://codereview.appspot.com/7388045
git-svn-id: http://skia.googlecode.com/svn/trunk@7830 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'src/gpu')
-rw-r--r-- | src/gpu/gl/GrGLCaps.cpp | 8 | ||||
-rw-r--r-- | src/gpu/gl/GrGLUtil.cpp | 10 | ||||
-rw-r--r-- | src/gpu/gl/GrGLUtil.h | 6 |
3 files changed, 16 insertions, 8 deletions
diff --git a/src/gpu/gl/GrGLCaps.cpp b/src/gpu/gl/GrGLCaps.cpp index bd18e56b4b..1276a65a19 100644 --- a/src/gpu/gl/GrGLCaps.cpp +++ b/src/gpu/gl/GrGLCaps.cpp @@ -169,8 +169,12 @@ void GrGLCaps::init(const GrGLContextInfo& ctxInfo) { ctxInfo.hasExtension("GL_ARB_fragment_coord_conventions"); } - // Perhaps we should look at the renderer string and limit to Mali GPUs. - if (kARM_GrGLVendor == ctxInfo.vendor() && !GR_GL_MUST_USE_VBO) { + // SGX and Mali GPUs that are based on a tiled-deferred architecture that have trouble with + // frequently changing VBOs. We've measured a performance increase using non-VBO vertex + // data for dynamic content on these GPUs. Perhaps we should read the renderer string and + // limit this decision to specific GPU families rather than basing it on the vendor alone. + if (!GR_GL_MUST_USE_VBO && + (kARM_GrGLVendor == ctxInfo.vendor() || kImagination_GrGLVendor == ctxInfo.vendor())) { fUseNonVBOVertexAndIndexDynamicData = true; } diff --git a/src/gpu/gl/GrGLUtil.cpp b/src/gpu/gl/GrGLUtil.cpp index 225650c106..88c81b7d4e 100644 --- a/src/gpu/gl/GrGLUtil.cpp +++ b/src/gpu/gl/GrGLUtil.cpp @@ -168,14 +168,16 @@ bool GrGLHasExtensionFromString(const char* ext, const char* extensionString) { GrGLVendor GrGLGetVendorFromString(const char* vendorString) { if (NULL != vendorString) { - if (0 == strcmp(vendorString, "Intel")) { - return kIntel_GrGLVendor; - } if (0 == strcmp(vendorString, "ARM")) { return kARM_GrGLVendor; } + if (0 == strcmp(vendorString, "Imagination Technologies")) { + return kImagination_GrGLVendor; + } + if (0 == strcmp(vendorString, "Intel")) { + return kIntel_GrGLVendor; + } } - return kOther_GrGLVendor; } diff --git a/src/gpu/gl/GrGLUtil.h b/src/gpu/gl/GrGLUtil.h index da0c7c32a3..30995a9fe1 100644 --- a/src/gpu/gl/GrGLUtil.h +++ b/src/gpu/gl/GrGLUtil.h @@ -20,9 +20,11 @@ typedef uint32_t GrGLSLVersion; * This list is lazily updated as required. */ enum GrGLVendor { - kIntel_GrGLVendor, kARM_GrGLVendor, - kOther_GrGLVendor, + kImagination_GrGLVendor, + kIntel_GrGLVendor, + + kOther_GrGLVendor }; #define GR_GL_VER(major, minor) ((static_cast<int>(major) << 16) | \ |