Commit 98865915 by Jamie Madill Committed by Commit Bot

No-op incomplete framebuffer invalidation.

It's always legal in GL to no-op framebuffer invalidation. When the FBO is incomplete we can't pull RTs safely so no-oping incomplete invalidate calls saves us from fuzzer bugs and crashes. Bug: angleproject:3971 Change-Id: Ide550a22e6c17a28e5042165831dd684567d81fe Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2227038 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: 's avatarGeoff Lang <geofflang@chromium.org> Reviewed-by: 's avatarJonah Ryan-Davis <jonahr@google.com>
parent 3ecaa283
...@@ -4068,17 +4068,17 @@ void Context::invalidateFramebuffer(GLenum target, ...@@ -4068,17 +4068,17 @@ void Context::invalidateFramebuffer(GLenum target,
GLsizei numAttachments, GLsizei numAttachments,
const GLenum *attachments) const GLenum *attachments)
{ {
// Only sync the FBO
ANGLE_CONTEXT_TRY(mState.syncDirtyObject(this, target));
Framebuffer *framebuffer = mState.getTargetFramebuffer(target); Framebuffer *framebuffer = mState.getTargetFramebuffer(target);
ASSERT(framebuffer); ASSERT(framebuffer);
// No-op incomplete FBOs.
if (!framebuffer->isComplete(this)) if (!framebuffer->isComplete(this))
{ {
return; return;
} }
// Only sync the FBO
ANGLE_CONTEXT_TRY(mState.syncDirtyObject(this, target));
ANGLE_CONTEXT_TRY(framebuffer->invalidate(this, numAttachments, attachments)); ANGLE_CONTEXT_TRY(framebuffer->invalidate(this, numAttachments, attachments));
} }
......
...@@ -368,9 +368,6 @@ class FramebufferTest_ES3 : public ANGLETest ...@@ -368,9 +368,6 @@ class FramebufferTest_ES3 : public ANGLETest
// Covers invalidating an incomplete framebuffer. This should be a no-op, but should not error. // Covers invalidating an incomplete framebuffer. This should be a no-op, but should not error.
TEST_P(FramebufferTest_ES3, InvalidateIncomplete) TEST_P(FramebufferTest_ES3, InvalidateIncomplete)
{ {
// TODO: anglebug.com/3971
ANGLE_SKIP_TEST_IF(IsVulkan());
GLFramebuffer framebuffer; GLFramebuffer framebuffer;
GLRenderbuffer renderbuffer; GLRenderbuffer renderbuffer;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment