Commit d0b270e6688c38786e45088a0610cda8473c407d

Jamie Madill 2020-08-14T21:55:17

Feedback Loop Redesign 1/3: Framebuffer Serials. Currently we track feedback loops by counting the times a Texture is bound as a sampler or image in a particular context. This is a bit tricky because Texture bindings change frequently. Relative to the number of times we need to check for a feedback loop this causes excess overhead. Usually Framebuffers have a low number of Textures bound (in many cases just 1). And Textures aren't usually bound to many different FBOs. So instead of counting the number of times a Texture is bound as a sampler or image we will track the Framebuffers that the Texture is bound to. Because FBOs are unique to a Context, a Texture could be bound to two different FBOs with the same ID. In this CL we introduce a new Serial for the FBO which is unique to an EGL Share Group. This way we can ensure we don't make the wrong call when a Texture is referenced by a Framebuffer. It also replaces the old FB serial which was again only unique to a particular Context. Bug: angleproject:4500 Bug: angleproject:4959 Change-Id: I0a9989d861a4132bd3b7ed85f699a4448ff37a4e Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2358849 Reviewed-by: Jonah Ryan-Davis <jonahr@google.com> Reviewed-by: Tobin Ehlis <tobine@google.com> Reviewed-by: Courtney Goeltzenleuchter <courtneygo@google.com> Commit-Queue: Jamie Madill <jmadill@chromium.org>