GL: Apply dirty bit mask on sync state.
This prevents us from updating some dirty bits in some operations.
It can prevent us from doing things like updating the Program when
we don't use it in a GPU operation.
Also adds Framebuffer dirty bits to TexImage to work around a bug
on the Windows Intel OpenGL driver.
Bug: angleproject:2763
Bug: angleproject:2906
Change-Id: I9f69775fb930a9bbcbd40d0f9012d62a9381c9f8
Reviewed-on: https://chromium-review.googlesource.com/c/1292610
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
diff --git a/src/libANGLE/Context.cpp b/src/libANGLE/Context.cpp
index 5c8462b..c5b180b 100644
--- a/src/libANGLE/Context.cpp
+++ b/src/libANGLE/Context.cpp
@@ -3452,6 +3452,13 @@
// Lose the context upon out of memory error if the application is
// expecting to watch for those events.
mWorkarounds.loseContextOnOutOfMemory = (mResetStrategy == GL_LOSE_CONTEXT_ON_RESET_EXT);
+
+ if (mWorkarounds.syncFramebufferBindingsOnTexImage)
+ {
+ // Update the Framebuffer bindings on TexImage to work around an Intel bug.
+ mTexImageDirtyBits.set(State::DIRTY_BIT_READ_FRAMEBUFFER_BINDING);
+ mTexImageDirtyBits.set(State::DIRTY_BIT_DRAW_FRAMEBUFFER_BINDING);
+ }
}
// Return true if the draw is a no-op, else return false.