Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(311)

Unified Diff: src/gpu/gl/GrGLCaps.cpp

Issue 2143333002: Add resource provider flag to avoid client-side buffers (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Add resource provider flag to avoid client-side buffers Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/gpu/gl/GrGLBuffer.cpp ('k') | src/gpu/gl/GrGLGpu.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/gl/GrGLCaps.cpp
diff --git a/src/gpu/gl/GrGLCaps.cpp b/src/gpu/gl/GrGLCaps.cpp
index 431390697b2eea8e8a7796a947f771a478b24a82..6a34a30771fbb1ad0bf81fe7d56990527b837570 100644
--- a/src/gpu/gl/GrGLCaps.cpp
+++ b/src/gpu/gl/GrGLCaps.cpp
@@ -41,7 +41,6 @@ GrGLCaps::GrGLCaps(const GrContextOptions& contextOptions,
fMultiDrawIndirectSupport = false;
fBaseInstanceSupport = false;
fCanDrawIndirectToFloat = false;
- fUseNonVBOVertexAndIndexDynamicData = false;
fIsCoreProfile = false;
fBindFragDataLocationSupport = false;
fRectangleTextureSupport = false;
@@ -132,18 +131,6 @@ void GrGLCaps::init(const GrContextOptions& contextOptions,
fImagingSupport = kGL_GrGLStandard == standard &&
ctxInfo.hasExtension("GL_ARB_imaging");
- // 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 &&
- !fIsCoreProfile &&
- (kARM_GrGLVendor == ctxInfo.vendor() ||
- kImagination_GrGLVendor == ctxInfo.vendor() ||
- kQualcomm_GrGLVendor == ctxInfo.vendor())) {
- fUseNonVBOVertexAndIndexDynamicData = true;
- }
-
// A driver but on the nexus 6 causes incorrect dst copies when invalidate is called beforehand.
// Thus we are blacklisting this extension for now on Adreno4xx devices.
if (kAdreno4xx_GrGLRenderer != ctxInfo.renderer() &&
@@ -344,6 +331,18 @@ void GrGLCaps::init(const GrContextOptions& contextOptions,
}
}
+ // 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 &&
+ !fIsCoreProfile &&
+ (kARM_GrGLVendor == ctxInfo.vendor() ||
+ kImagination_GrGLVendor == ctxInfo.vendor() ||
+ kQualcomm_GrGLVendor == ctxInfo.vendor())) {
+ fPreferClientSideDynamicBuffers = true;
+ }
+
// fUsesMixedSamples must be set before calling initFSAASupport.
this->initFSAASupport(ctxInfo, gli);
this->initBlendEqationSupport(ctxInfo);
@@ -1122,8 +1121,6 @@ SkString GrGLCaps::dump() const {
r.appendf("Multi draw indirect support: %s\n", (fMultiDrawIndirectSupport ? "YES" : "NO"));
r.appendf("Base instance support: %s\n", (fBaseInstanceSupport ? "YES" : "NO"));
r.appendf("Can draw indirect to float: %s\n", (fCanDrawIndirectToFloat ? "YES" : "NO"));
- r.appendf("Use non-VBO for dynamic data: %s\n",
- (fUseNonVBOVertexAndIndexDynamicData ? "YES" : "NO"));
r.appendf("RGBA 8888 pixel ops are slow: %s\n", (fRGBA8888PixelsOpsAreSlow ? "YES" : "NO"));
r.appendf("Partial FBO read is slow: %s\n", (fPartialFBOReadIsSlow ? "YES" : "NO"));
r.appendf("Bind uniform location support: %s\n", (fBindUniformLocationSupport ? "YES" : "NO"));
« no previous file with comments | « src/gpu/gl/GrGLBuffer.cpp ('k') | src/gpu/gl/GrGLGpu.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698