Remove recent changes to use temp fbo to do stencil clears.
In order to implement these stencil clears we had to use a work around where we would bind a color buffer renderbuffer to the fbo before clearing the stencil buffer. However this workaround seems to cause the win 7 hd2000 machines to all crash on some memory access issue. For now we will comment on the change and go back to the old world BUG=skia: Review URL: https://codereview.chromium.org/1015223002
This commit is contained in:
parent
4a22a433bf
commit
df60355438
@ -98,6 +98,15 @@ bool GrGpu::attachStencilBufferToRenderTarget(GrRenderTarget* rt) {
|
||||
return false;
|
||||
}
|
||||
if (this->createStencilBufferForRenderTarget(rt, width, height)) {
|
||||
// Right now we're clearing the stencil buffer here after it is
|
||||
// attached to an RT for the first time. When we start matching
|
||||
// stencil buffers with smaller color targets this will no longer
|
||||
// be correct because it won't be guaranteed to clear the entire
|
||||
// sb.
|
||||
// We used to clear down in the GL subclass using a special purpose
|
||||
// FBO. But iOS doesn't allow a stencil-only FBO. It reports unsupported
|
||||
// FBO status.
|
||||
this->clearStencil(rt);
|
||||
GrStencilBuffer* sb = rt->renderTargetPriv().getStencilBuffer();
|
||||
sb->resourcePriv().setUniqueKey(sbKey);
|
||||
return true;
|
||||
|
@ -1182,7 +1182,8 @@ bool GrGLGpu::createStencilBufferForRenderTarget(GrRenderTarget* rt, int width,
|
||||
if (this->attachStencilBufferToRenderTarget(sb, rt)) {
|
||||
fLastSuccessfulStencilFmtIdx = sIdx;
|
||||
rt->renderTargetPriv().didAttachStencilBuffer(sb);
|
||||
|
||||
// This work around is currently breaking on windows 7 hd2000 bot when we bind a color buffer
|
||||
#if 0
|
||||
// Clear the stencil buffer. We use a special purpose FBO for this so that the
|
||||
// entire stencil buffer is cleared, even if it is attached to an FBO with a
|
||||
// smaller color target.
|
||||
@ -1233,7 +1234,7 @@ bool GrGLGpu::createStencilBufferForRenderTarget(GrRenderTarget* rt, int width,
|
||||
GR_GL_DEPTH_ATTACHMENT,
|
||||
GR_GL_RENDERBUFFER, 0));
|
||||
}
|
||||
|
||||
#endif
|
||||
return true;
|
||||
}
|
||||
// Remove the scratch key from this resource so we don't grab it from the cache ever
|
||||
|
Loading…
Reference in New Issue
Block a user