aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/gl
diff options
context:
space:
mode:
authorGravatar Brian Osman <brianosman@google.com>2018-01-19 11:13:45 -0500
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2018-01-19 16:47:43 +0000
commitcfe83d15f3b5044f425f5eac1494bce1c73f7856 (patch)
treec29f1b0fe4346720f64108055ed990b0354cef08 /src/gpu/gl
parentb1b80f7de4224c5083dfc1475e1988b2ce839a65 (diff)
Add more asserts about MSAA render buffers and FBO 0
Bug: skia: Change-Id: I46451b776461cc50f34fa532aa8d070fddb17852 Reviewed-on: https://skia-review.googlesource.com/97102 Reviewed-by: Greg Daniel <egdaniel@google.com> Commit-Queue: Brian Osman <brianosman@google.com>
Diffstat (limited to 'src/gpu/gl')
-rw-r--r--src/gpu/gl/GrGLGpu.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/gpu/gl/GrGLGpu.cpp b/src/gpu/gl/GrGLGpu.cpp
index 179391f3d9..267b405b67 100644
--- a/src/gpu/gl/GrGLGpu.cpp
+++ b/src/gpu/gl/GrGLGpu.cpp
@@ -2711,6 +2711,7 @@ void GrGLGpu::onResolveRenderTarget(GrRenderTarget* target, GrSurfaceOrigin orig
// Some extensions automatically resolves the texture when it is read.
if (this->glCaps().usesMSAARenderBuffers()) {
SkASSERT(rt->textureFBOID() != rt->renderFBOID());
+ SkASSERT(rt->textureFBOID() != 0 && rt->renderFBOID() != 0);
fStats.incRenderTargetBinds();
fStats.incRenderTargetBinds();
GL_CALL(BindFramebuffer(GR_GL_READ_FRAMEBUFFER, rt->renderFBOID()));
@@ -4376,6 +4377,7 @@ void GrGLGpu::xferBarrier(GrRenderTarget* rt, GrXferBarrierType type) {
switch (type) {
case kTexture_GrXferBarrierType: {
GrGLRenderTarget* glrt = static_cast<GrGLRenderTarget*>(rt);
+ SkASSERT(glrt->textureFBOID() != 0 && glrt->renderFBOID() != 0);
if (glrt->textureFBOID() != glrt->renderFBOID()) {
// The render target uses separate storage so no need for glTextureBarrier.
// FIXME: The render target will resolve automatically when its texture is bound,