Commit 878c8b1e5e89dc6cded6566e7e2fa2272afadb19

Martin Radev 2017-07-28T09:51:04

Handle viewport and scissor state changes for side-by-side framebuffers Side-by-side framebuffers have viewport offsets as part of their state which have to be applied to the viewport and scissor rectangles to generate the final viewport and scissor rectangles of each view. Whenever there is a transition to or from a side-by-side framebuffer, viewport and scissor state has to be synced. Also, because rendering is done on the same 2D texture the scissor test has to be always enabled to guarantee that no fragments leak to a neighboring view. The patch addresses this by extending the viewport and scissor state in StateManagerGL to be a vector of rectangles instead of a single rectangle. Two new dirty bits are added to cover changes in the viewport offsets and whether the framebuffer has a side-by-side layout. BUG=angleproject:2062 TEST=angle_end2end_tests Change-Id: I8107d7ba97d06b20cf24358f19963fa494844592 Reviewed-on: https://chromium-review.googlesource.com/585012 Commit-Queue: Martin Radev <mradev@nvidia.com> Reviewed-by: Geoff Lang <geofflang@chromium.org>