src/tests/gl_tests/FramebufferMultiviewTest.cpp


Log

Author Commit Date CI Message
Martin Radev 61e710b6 2017-09-05T11:59:52 GL: Optimize multi-view layered Clear* commands Until this patch multi-view layered framebuffers used to be cleared by attaching a single layer of each attachment to a framebuffer and calling the Clear* command for that internal framebuffer. According to the GL 4.1+ specifications, Clear* commands clear all of the layers of an attached 2D texture array. If all of the layers are active for a multi-view layered framebuffer, then we can directly call the corresponding Clear* command instead of iterating over each layer and clearing it. BUG=angleproject:2062 TEST=angle_end2end_tests Change-Id: Ie4dfd9fff47715b502f358272bfc47c0373c4e91 Reviewed-on: https://chromium-review.googlesource.com/649209 Commit-Queue: Martin Radev <mradev@nvidia.com> Reviewed-by: Olli Etuaho <oetuaho@nvidia.com>
Martin Radev 14b2126e 2017-08-25T13:54:37 Relax multi-view end-point validation on detach Passing invalid arguments to the multi-view end-points should not generate an error if a texture is being detached from the framebuffer. BUG=angleproject:2062 TEST=angle_end2end_tests Change-Id: I22e1ed13b64db046724031d0189612d5e111dcac Reviewed-on: https://chromium-review.googlesource.com/635166 Commit-Queue: Martin Radev <mradev@nvidia.com> Reviewed-by: Olli Etuaho <oetuaho@nvidia.com> Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Martin Radev 18b75bad 2017-08-15T15:50:40 D3D11: Handle Clear* commands for layered framebuffers According to the ANGLE_multiview spec, Clear* commands only affect the range of attached layers to the multi-view layered framebuffer. The patch extends ImageIndex so that the range of attached layers is tracked and a render target view can be created with that range of texture array slices attached. The special case of scissored clears for depth and stencil attachments is handled by instancing the same number of quads as there are views and selecting the layer within a geometry shader. BUG=angleproject:2062 TEST=angle_end2end_tests Change-Id: Ibea248b980513f83d918652030a72c62c7ecd88b Reviewed-on: https://chromium-review.googlesource.com/632256 Commit-Queue: Martin Radev <mradev@nvidia.com> Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Martin Radev 5e424fae 2017-08-09T16:25:36 Handle Clear* commands for layered framebuffers The patch adds support for clearing the layers of 2D array textures attached to a multi-view framebuffer. According to the ANGLE_multiview spec, the layers which are outside of the range [baseViewIndex; baseViewIndex + numViews) should remain unmodified. Because the native Clear* commands clear all of the layers, a workaround is implemented which creates a FBO, attaches a single layer from all multi-view attachments and clears the contents. BUG=angleproject:2062 TEST=angle_end2end_tests Change-Id: Ibf711d02046233eed16bdd3f9c96fc38f82ed0a8 Reviewed-on: https://chromium-review.googlesource.com/615242 Commit-Queue: Martin Radev <mradev@nvidia.com> Reviewed-by: Olli Etuaho <oetuaho@nvidia.com> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Martin Radev 5c00d0db 2017-08-07T10:06:59 D3D11: Handle Clear* commands for side-by-side framebuffers The patch modifies Clear11 to add support for clearing the color, depth and stencil attachments to a side-by-side framebuffer: - Color attachments are cleared through the command ClearView. - Depth and stencil attachments are cleared by drawing a quad on top of each view. BUG=angleproject:2062 TEST=angle_end2end_tests Change-Id: I5753a72222216a48cd954eb1219bc58f968735fc Reviewed-on: https://chromium-review.googlesource.com/603853 Commit-Queue: Martin Radev <mradev@nvidia.com> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Martin Radev eef80e40 2017-08-11T14:44:57 Do not implicitly enable the scissor test for side-by-side FBOs The patch modifies the ANGLE_multiview specification so that issuing a Draw* command has undefined results for side-by-side FBOs if the scissor test is disabled. Also, clearing a side-by-side framebuffer will result in clearing the whole content of the specified buffers if the scissor test is disabled. StateManagerGL and FramebufferGL are modified to address this change in the spec. BUG=angleproject:2062 TEST=angle_end2end_tests Change-Id: I39a87d297944f12769dee2ead17b508ac22053db Reviewed-on: https://chromium-review.googlesource.com/612283 Commit-Queue: Martin Radev <mradev@nvidia.com> Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Martin Radev 82ef774b 2017-08-08T17:44:58 Save layered multiview end-point's arguments into attachment's state Handle glFramebufferTextureMultiviewLayeredANGLE calls by saving the arguments into the attachment's state. BUG=angleproject:2062 TEST=angle_end2end_tests Change-Id: I9d7c0e00fe9e917ad2f9d903a39f30b2546dc7a3 Reviewed-on: https://chromium-review.googlesource.com/609960 Commit-Queue: Martin Radev <mradev@nvidia.com> Reviewed-by: Olli Etuaho <oetuaho@nvidia.com> Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Martin Radev 0f7714ec 2017-08-07T15:13:42 Refactor FramebufferMultiviewTest.cpp The patch refactors the tests to use the GL RAII objects from gl_raii.h. It also specifies a correct internal format for a texture 2D array object in one of the tests so that the texture is color-renderable. BUG=angleproject:2062 TEST=angle_end2end_tests Change-Id: Ie536ffeb5b2f2594f5273b795fe786a5042f63d4 Reviewed-on: https://chromium-review.googlesource.com/603610 Commit-Queue: Martin Radev <mradev@nvidia.com> Reviewed-by: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Olli Etuaho <oetuaho@nvidia.com>
Martin Radev b0761934 2017-07-25T17:42:25 Handle Clear* commands for side-by-side framebuffers Clear* commands for side-by-side framebuffers require special handling because only the scissor rectangle of the first viewport is used in the scissor test as defined in the OpenGL 4.1+ specs. To enable clearing of each view of a side-by-side framebuffer all views are iterated over, the corresponding scissor rectangle is set as first, and a Clear* call is made to the driver. Afterwards the scissor state is restored. BUG=angleproject:2062 TEST=angle_end2end_tests Change-Id: I138663ea61b4f0c9302872108e7dfbadf451b3ec Reviewed-on: https://chromium-review.googlesource.com/590233 Commit-Queue: Martin Radev <mradev@nvidia.com> Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Martin Radev 2803168e 2017-07-28T14:47:56 Disallow glReadPixels with multi-view read framebuffers According to the ANGLE_multiview spec, glReadPixels must generate an INVALID_FRAMEBUFFER_OPERATION error if the active read framebuffer has a multi-view layout. BUG=angleproject:2062 TEST=angle_end2end_tests Change-Id: Ia5311ff7a62c5ff732491eb80befd32de57b9d44 Reviewed-on: https://chromium-review.googlesource.com/591368 Commit-Queue: Martin Radev <mradev@nvidia.com> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Martin Radev a3ed4576 2017-07-27T18:29:37 Disallow glBlitFramebuffer for multi-view framebuffers According to the ANGLE_multiview spec, glBlitFramebuffer must generate an INVALID_FRAMEBUFFER_OPERATION error if either the active read framebuffer, or active draw framebuffer has a multi-view layout. BUG=angleproject:2062 TEST=angle_end2end_tests Change-Id: I885bdc970c9606cfad882f31759f5780c65d15e5 Reviewed-on: https://chromium-review.googlesource.com/590237 Commit-Queue: Martin Radev <mradev@nvidia.com> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Martin Radev 04e2c3bc 2017-07-27T16:54:35 Disallow glCopyTex* with multi-view read framebuffers According to the ANGLE_multiview spec, glCopyTex* functions must generate an INVALID_FRAMEBUFFER_OPERATION error if the active read framebuffer has a multi-view layout. BUG=angleproject:2062 TEST=angle_end2end_tests Change-Id: Icadc4ac79843986076594da25a90ba807e511d1e Reviewed-on: https://chromium-review.googlesource.com/589447 Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Martin Radev <mradev@nvidia.com>
Martin Radev 9bc9a321 2017-07-21T14:28:17 Integrate multiview state in FBO completeness check The patch extends the FBO completeness validation to include the multiview state members according to the ANGLE_multiview specification. It also changes the numViews in FramebufferAttachment to be consistently of type GLsizei instead of GLint. BUG=angleproject:2062 TEST=angle_end2end_tests Change-Id: Ibe550ba03204d808d96a4edf4807c68421aa1158 Reviewed-on: https://chromium-review.googlesource.com/581193 Commit-Queue: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Martin Radev 5dae57b0 2017-07-14T16:15:55 Save side-by-side function arguments into attachment's state Handle glFramebufferTextureMultiviewSideBySideANGLE calls by saving the arguments into the attachment's state. BUG=angleproject:2062 TEST=angle_end2end_tests Change-Id: Idc5441d673b48640f47415b07b2854fbdf566c8d Reviewed-on: https://chromium-review.googlesource.com/574915 Commit-Queue: Olli Etuaho <oetuaho@nvidia.com> Reviewed-by: Olli Etuaho <oetuaho@nvidia.com>
Martin Radev 137032d9 2017-07-13T10:11:12 Validate ANGLE_multiview end-points The patch adds validation for the ANGLE_multiview end-points and propagates the calls to the unimplemented stubs in Context. The patch also removes the glFramebufferTextureMultiviewSideBySideRobustANGLE end-point because the size of the viewport offsets buffer can trivially be computed from the number of views. BUG=angleproject:2062 Change-Id: I9a10bc00c19825e586d3df2750fabea4daf5ef8f Reviewed-on: https://chromium-review.googlesource.com/573861 Commit-Queue: Olli Etuaho <oetuaho@nvidia.com> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Martin Radev e5285d29 2017-07-14T16:23:53 Handle ANGLE_multiview state queries The patch extends glGetIntegerv and glGetFramebufferAttachmentParameteriv logic to handle the new tokens from the ANGLE_multiview extension. BUG=angleproject:2062 TEST=angle_end2end_tests Change-Id: Ide145279cd7b58cd03502458d7d3a1a0f5e9e86d Reviewed-on: https://chromium-review.googlesource.com/573780 Reviewed-by: Olli Etuaho <oetuaho@nvidia.com> Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>