Revert of Work around for nexus 6 TexSubImage issue (patchset #4 id:60001 of https...
authorjoshualitt <joshualitt@google.com>
Thu, 18 Jun 2015 18:49:18 +0000 (11:49 -0700)
committerCommit bot <commit-bot@chromium.org>
Thu, 18 Jun 2015 18:49:18 +0000 (11:49 -0700)
Reason for revert:
breaks gms

Original issue's description:
> Work around for nexus 6 TexSubImage issue
>
> BUG=skia:
>
> Committed: https://skia.googlesource.com/skia/+/c69fe20ef35df0776b179cbd5ce4d1bdc0ba4090

TBR=bsalomon@google.com,joshualitt@chromium.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:

Review URL: https://codereview.chromium.org/1190463006

include/gpu/GrCaps.h
include/gpu/GrContextOptions.h
src/gpu/GrCaps.cpp
src/gpu/GrContext.cpp
src/gpu/gl/GrGLCaps.cpp

index c5789fc0dce557a4df3ede29c271d4b3cb82c445..54969c59333f3ad0c8e5816dde3fa72cd336f7b8 100644 (file)
@@ -133,9 +133,6 @@ public:
     bool textureBarrierSupport() const { return fTextureBarrierSupport; }
 
     bool useDrawInsteadOfClear() const { return fUseDrawInsteadOfClear; }
-    bool useDrawInsteadOfPartialTextureWrite() const {
-        return fUseDrawInsteadOfPartialTextureWrite;
-    }
 
     /**
      * Indicates the capabilities of the fixed function blend unit.
@@ -223,19 +220,18 @@ protected:
 
     SkAutoTUnref<GrShaderCaps>    fShaderCaps;
 
-    bool fNPOTTextureTileSupport                : 1;
-    bool fMipMapSupport                         : 1;
-    bool fTwoSidedStencilSupport                : 1;
-    bool fStencilWrapOpsSupport                 : 1;
-    bool fDiscardRenderTargetSupport            : 1;
-    bool fReuseScratchTextures                  : 1;
-    bool fGpuTracingSupport                     : 1;
-    bool fCompressedTexSubImageSupport          : 1;
-    bool fOversizedStencilSupport               : 1;
-    bool fTextureBarrierSupport                 : 1;
+    bool fNPOTTextureTileSupport        : 1;
+    bool fMipMapSupport                 : 1;
+    bool fTwoSidedStencilSupport        : 1;
+    bool fStencilWrapOpsSupport         : 1;
+    bool fDiscardRenderTargetSupport    : 1;
+    bool fReuseScratchTextures          : 1;
+    bool fGpuTracingSupport             : 1;
+    bool fCompressedTexSubImageSupport  : 1;
+    bool fOversizedStencilSupport       : 1;
+    bool fTextureBarrierSupport         : 1;
     // Driver workaround
-    bool fUseDrawInsteadOfClear                 : 1;
-    bool fUseDrawInsteadOfPartialTextureWrite   : 1;
+    bool fUseDrawInsteadOfClear         : 1;
 
     BlendEquationSupport fBlendEquationSupport;
     uint32_t fAdvBlendEqBlacklist;
index 95b153fe61d0b694fa8dbe6ebfc79a7f014728a5..057bc83d19b06687c24000703010f0b7fadf8983 100644 (file)
@@ -17,8 +17,7 @@ struct GrContextOptions {
         , fMaxTextureSizeOverride(SK_MaxS32)
         , fMinTextureSizeOverride(0)
         , fSuppressDualSourceBlending(false)
-        , fGeometryBufferMapThreshold(-1)
-        , fUseDrawInsteadOfPartialTextureWrite(false) {}
+        , fGeometryBufferMapThreshold(-1) {}
 
     // EXPERIMENTAL
     // May be removed in the future, or may become standard depending
@@ -40,9 +39,6 @@ struct GrContextOptions {
         buffers to CPU memory in order to update them.  A value of -1 means the GrContext should
         deduce the optimal value for this platform. */
     int  fGeometryBufferMapThreshold;
-
-    /** some gpus have problems with partial texture writes */
-    bool fUseDrawInsteadOfPartialTextureWrite;
 };
 
 #endif
index 2e956c7da50f81bbc7d8e883b47421cdb88213c5..ba4e10430dfffa977dd1535e084bde99bc2b2f3c 100644 (file)
@@ -109,7 +109,6 @@ GrCaps::GrCaps(const GrContextOptions& options) {
     fSupressPrints = options.fSuppressPrints;
     fDrawPathMasksToCompressedTextureSupport = options.fDrawPathToCompressedTexture;
     fGeometryBufferMapThreshold = options.fGeometryBufferMapThreshold;
-    fUseDrawInsteadOfPartialTextureWrite = options.fUseDrawInsteadOfPartialTextureWrite;
 }
 
 void GrCaps::applyOptionsOverrides(const GrContextOptions& options) {
@@ -151,8 +150,6 @@ SkString GrCaps::dump() const {
     r.appendf("Oversized Stencil Support          : %s\n", gNY[fOversizedStencilSupport]);
     r.appendf("Texture Barrier Support            : %s\n", gNY[fTextureBarrierSupport]);
     r.appendf("Draw Instead of Clear [workaround] : %s\n", gNY[fUseDrawInsteadOfClear]);
-    r.appendf("Draw Instead of TexSubImage [workaround] : %s\n",
-              gNY[fUseDrawInsteadOfPartialTextureWrite]);
     if (this->advancedBlendEquationSupport()) {
         r.appendf("Advanced Blend Equation Blacklist  : 0x%x\n", fAdvBlendEqBlacklist);
     }
index 073982329c087082315a34a2e5a8d9c10de9faad..03aeaa8fcda5527737ccd2ca4e367890fff10c21 100755 (executable)
@@ -334,9 +334,7 @@ bool GrContext::writeSurfacePixels(GrSurface* surface,
     {
         GrTexture* texture = NULL;
         if (!(kUnpremul_PixelOpsFlag & pixelOpsFlags) && (texture = surface->asTexture()) &&
-            fGpu->canWriteTexturePixels(texture, srcConfig) &&
-            (!fCaps->useDrawInsteadOfPartialTextureWrite() ||
-             (width == texture->width() && height == texture->height()))) {
+            fGpu->canWriteTexturePixels(texture, srcConfig)) {
 
             if (!(kDontFlush_PixelOpsFlag & pixelOpsFlags) &&
                 surface->surfacePriv().hasPendingIO()) {
index ccedc98bb5462fd2914518ea7b0d6ab31d5333fc..63e215f58561ae4f6fecc538875933e6914e3e02 100644 (file)
@@ -421,10 +421,6 @@ void GrGLCaps::init(const GrContextOptions& contextOptions,
         fUseDrawInsteadOfClear = true;
     }
 
-    if (kAdreno4xx_GrGLRenderer == ctxInfo.renderer()) {
-        fUseDrawInsteadOfPartialTextureWrite = true;
-    }
-
     if (kGL_GrGLStandard == standard) {
         // ARB allows mixed size FBO attachments, EXT does not.
         if (ctxInfo.version() >= GR_GL_VER(3, 0) ||