aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/gl/GrGLCaps.cpp
diff options
context:
space:
mode:
authorGravatar Brian Salomon <bsalomon@google.com>2017-06-12 12:09:30 -0400
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2017-06-12 19:31:53 +0000
commit9bada5475f11c796a4e10845d86068218fa84bc8 (patch)
treef0260156d1e4e723afa29ec629afd012484f0469 /src/gpu/gl/GrGLCaps.cpp
parenteb7dc794df98d4b23e00cc441b464a0ebb9f5edb (diff)
Revert "Revert "Expand partial render target write pixels workaround.""
New version limits the workaround to unorm configs. This reverts commit fdd117025fb846771e9e47cbf825d9071745fa98. Change-Id: I47a08a0ea4cf1acd88ca3c1bf9922cf0a8d215cc Reviewed-on: https://skia-review.googlesource.com/19490 Reviewed-by: Robert Phillips <robertphillips@google.com> Commit-Queue: Brian Salomon <bsalomon@google.com>
Diffstat (limited to 'src/gpu/gl/GrGLCaps.cpp')
-rw-r--r--src/gpu/gl/GrGLCaps.cpp13
1 files changed, 11 insertions, 2 deletions
diff --git a/src/gpu/gl/GrGLCaps.cpp b/src/gpu/gl/GrGLCaps.cpp
index 8287580fbe..d52b73b2e8 100644
--- a/src/gpu/gl/GrGLCaps.cpp
+++ b/src/gpu/gl/GrGLCaps.cpp
@@ -57,6 +57,8 @@ GrGLCaps::GrGLCaps(const GrContextOptions& contextOptions,
fClearTextureSupport = false;
fDrawArraysBaseVertexIsBroken = false;
fUseDrawToClearStencilClip = false;
+ fDisallowTexSubImageForUnormConfigTexturesEverBoundToFBO = false;
+ fUseDrawInsteadOfAllRenderTargetWrites = false;
fRequiresCullFaceEnableDisableWhenDrawingLinesAfterNonLines = false;
fBlitFramebufferFlags = kNoSupport_BlitFramebufferFlag;
@@ -523,12 +525,12 @@ void GrGLCaps::init(const GrContextOptions& contextOptions,
}
if (kAdreno4xx_GrGLRenderer == ctxInfo.renderer()) {
- fUseDrawInsteadOfPartialRenderTargetWrite = true;
// This is known to be fixed sometime between driver 145.0 and 219.0
if (ctxInfo.driver() == kQualcomm_GrGLDriver &&
ctxInfo.driverVersion() <= GR_GL_DRIVER_VER(219, 0)) {
fUseDrawToClearStencilClip = true;
}
+ fDisallowTexSubImageForUnormConfigTexturesEverBoundToFBO = true;
}
// This was reproduced on the following configurations:
@@ -546,7 +548,7 @@ void GrGLCaps::init(const GrContextOptions& contextOptions,
// Texture uploads sometimes seem to be ignored to textures bound to FBOS on Tegra3.
if (kTegra3_GrGLRenderer == ctxInfo.renderer()) {
- fUseDrawInsteadOfPartialRenderTargetWrite = true;
+ fDisallowTexSubImageForUnormConfigTexturesEverBoundToFBO = true;
fUseDrawInsteadOfAllRenderTargetWrites = true;
}
@@ -1298,6 +1300,10 @@ SkString GrGLCaps::dump() const {
r.appendf("Texture swizzle support: %s\n", (fTextureSwizzleSupport ? "YES" : "NO"));
r.appendf("BGRA to RGBA readback conversions are slow: %s\n",
(fRGBAToBGRAReadbackConversionsAreSlow ? "YES" : "NO"));
+ r.appendf("Intermediate texture for partial updates of unorm textures ever bound to FBOs: %s\n",
+ fDisallowTexSubImageForUnormConfigTexturesEverBoundToFBO ? "YES" : "NO");
+ r.appendf("Intermediate texture for all updates of textures bound to FBOs: %s\n",
+ fUseDrawInsteadOfAllRenderTargetWrites ? "YES" : "NO");
r.append("Configs\n-------\n");
for (int i = 0; i < kGrPixelConfigCnt; ++i) {
@@ -2217,4 +2223,7 @@ void GrGLCaps::onApplyOptionsOverrides(const GrContextOptions& options) {
fAvoidInstancedDrawsToFPTargets = true;
#endif
}
+ if (options.fUseDrawInsteadOfPartialRenderTargetWrite) {
+ fUseDrawInsteadOfAllRenderTargetWrites = true;
+ }
}