bool textureBarrierSupport() const { return fTextureBarrierSupport; }
bool useDrawInsteadOfClear() const { return fUseDrawInsteadOfClear; }
- bool useDrawInsteadOfPartialTextureWrite() const {
- return fUseDrawInsteadOfPartialTextureWrite;
- }
/**
* Indicates the capabilities of the fixed function blend unit.
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;
, 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
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
fSupressPrints = options.fSuppressPrints;
fDrawPathMasksToCompressedTextureSupport = options.fDrawPathToCompressedTexture;
fGeometryBufferMapThreshold = options.fGeometryBufferMapThreshold;
- fUseDrawInsteadOfPartialTextureWrite = options.fUseDrawInsteadOfPartialTextureWrite;
}
void GrCaps::applyOptionsOverrides(const GrContextOptions& options) {
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);
}
{
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()) {
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) ||