src/tests/gl_tests/FramebufferMultiviewTest.cpp


Log

Author Commit Date CI Message
Jamie Madill ba319ba3 2018-12-29T10:29:33 Re-land "Load entry points dynamically in tests and samples." Fixes the Android/ChromeOS/Fuchsia builds by using consistent EGL headers. This CL adds a dynamic loader generator based on XML files. It also refactors the entry point generation script to move the XML parsing into a helper class. Additionally this includes a new GLES 1.0 base header. The new header allows for function pointer types and hiding prototypes. All tests and samples now load ANGLE dynamically. In the future this will be extended to load entry points from the driver directly when possible. This will allow us to perform more accurate A/B testing. The new build configuration leads to some tests having more warnings applied. The CL includes fixes for the new warnings. Bug: angleproject:2995 Change-Id: I5a8772f41a0f89570b3736b785f44b7de1539b57 Reviewed-on: https://chromium-review.googlesource.com/c/1392382 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Yuly Novikov 9f088621 2018-12-29T20:46:15 Revert "Load entry points dynamically in tests and samples." This reverts commit 03923558a7103827ffec6a4d2a1453ed91f01c6f. Reason for revert: fails compilation on Android, ChromeOS and Fuchsia during roll https://chromium-review.googlesource.com/c/chromium/src/+/1392624 Original change's description: > Load entry points dynamically in tests and samples. > > This CL adds a dynamic loader generator based on XML files. It also > refactors the entry point generation script to move the XML parsing > into a helper class. > > Additionally this includes a new GLES 1.0 base header. The new > header allows for function pointer types and hiding prototypes. > > All tests and samples now load ANGLE dynamically. In the future this > will be extended to load entry points from the driver directly when > possible. This will allow us to perform more accurate A/B testing. > > The new build configuration leads to some tests having more warnings > applied. The CL includes fixes for the new warnings. > > Bug: angleproject:2995 > Change-Id: I6726d4163f7a6e54d2482f094c0a952f59702a05 > Reviewed-on: https://chromium-review.googlesource.com/c/1359516 > Commit-Queue: Jamie Madill <jmadill@chromium.org> > Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> TBR=ynovikov@chromium.org,jmadill@chromium.org,syoussefi@chromium.org Change-Id: I902bec2d733c2b879be29c02ab52a0b7d4eaa077 No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: angleproject:2995 Reviewed-on: https://chromium-review.googlesource.com/c/1392381 Reviewed-by: Yuly Novikov <ynovikov@chromium.org> Commit-Queue: Yuly Novikov <ynovikov@chromium.org>
Jamie Madill 03923558 2018-12-29T10:29:33 Load entry points dynamically in tests and samples. This CL adds a dynamic loader generator based on XML files. It also refactors the entry point generation script to move the XML parsing into a helper class. Additionally this includes a new GLES 1.0 base header. The new header allows for function pointer types and hiding prototypes. All tests and samples now load ANGLE dynamically. In the future this will be extended to load entry points from the driver directly when possible. This will allow us to perform more accurate A/B testing. The new build configuration leads to some tests having more warnings applied. The CL includes fixes for the new warnings. Bug: angleproject:2995 Change-Id: I6726d4163f7a6e54d2482f094c0a952f59702a05 Reviewed-on: https://chromium-review.googlesource.com/c/1359516 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Jamie Madill 35cd7332 2018-12-02T12:03:33 Refactor test shader style. This change enforces a lot more consistency. We pass const char * to the Compile functions instead of std::string. Also fixes the indentation of C++11 block comments to be more consistent. Bug: angleproject:2995 Change-Id: Id6e5ea94055d8cbd420df4ea2e81b2d96cb5ce78 Reviewed-on: https://chromium-review.googlesource.com/c/1357103 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill b980c563 2018-11-27T11:34:27 Reformat all cpp and h files. This applies git cl format --full to all ANGLE sources. Bug: angleproject:2986 Change-Id: Ib504e618c1589332a37e97696cdc3515d739308f Reviewed-on: https://chromium-review.googlesource.com/c/1351367 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Olli Etuaho 2c8f0845 2018-09-12T14:44:55 Add ANGLE_multiview_multisample We add a novel multiview multisampling extension that includes the requirement to explicitly resolve the multisampled framebuffer. The explicit resolve is much more straightforward to implement on top of OpenGL and D3D11 than implicit resolve found in the native extension OVR_multiview_multisampled_render_to_texture. It also has predictable performance characteristics. The extension allows multiview drawing to 2D multisample texture arrays and is now enabled on both the GL backend and the D3D11 backend. The implementation is fairly simple, as it involves just small changes in validation to allow multisampled framebuffer attachments. The multiview rendering logic is exactly the same regardless of whether multisampling is enabled. For the most part the same tests are used to test both multisampled and non-multisampled rendering. The tests will use a different framebuffer setup depending on the test param. They resolve the multisampled framebuffer to a non-multisampled framebuffer prior to any readbacks from the framebuffer. Some of the tests are adjusted so that they have the correct sub-pixel positioning of multisampled quads, so there won't be any pixels that would be just partially covered. The tests don't have any tolerance for partially covered pixels - if we find any platforms where the tests run into a sub-pixel positioning corner case, tolerance may need to be added later. BUG=angleproject:2775 TEST=angle_end2end_tests Change-Id: I590d7f300a92ea5439f2720d9db14a7976db2e1d Reviewed-on: https://chromium-review.googlesource.com/1221214 Commit-Queue: Olli Etuaho <oetuaho@nvidia.com> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Shahbaz Youssefi c4097441 2018-08-22T12:14:52 Fix x64 visual studio build errors Bug: angleproject:2740 Change-Id: I44fd2a1daf3dca764e2eef73e437feb32b36dbaa Reviewed-on: https://chromium-review.googlesource.com/1185234 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Olli Etuaho a7b35c33 2018-08-21T16:32:24 Add helpers for multiview framebuffer init Multiview tests now use common helpers to create textures for multiview framebuffers and often also to attach the textures to the framebuffers. The tests now rely on uploaded texture data to initialize the buffers instead of clearing the framebuffers with glClear. BUG=angleproject:2765 TEST=angle_end2end_tests Change-Id: I7d6d63add5943cab610ab888045d5b0f8ba29215 Reviewed-on: https://chromium-review.googlesource.com/1184712 Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
Olli Etuaho 7a4f6b8c 2018-08-17T11:38:11 Fix resource init/teardown in FramebufferMultiviewTest GL RAII classes can't be used as test class members since the GL objects need to be deleted before the test class TearDown is called. BUG=angleproject:2765 TEST=angle_end2end_tests Change-Id: If19d33bd044c9e74e46f35183e8ca1bc6a96d6cf Reviewed-on: https://chromium-review.googlesource.com/1179159 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
Olli Etuaho f26b27e2 2018-08-17T11:01:19 Add some shared utilities for multiview tests This prepares for fixing multiview test resource init/teardown order. BUG=angleproject:2765 TEST=angle_end2end_tests Change-Id: I841327416fa76ac682310ef1b2309f5bb4e9fbac Reviewed-on: https://chromium-review.googlesource.com/1179155 Commit-Queue: Olli Etuaho <oetuaho@nvidia.com> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Olli Etuaho 8acb1b61 2018-07-30T16:20:54 Allow reads from a multiview framebuffer with one view It's safe to read from a multiview framebuffer if it is layered and has just one view. The native OVR_multiview spec supports this as well. BUG=angleproject:2062 TEST=angle_end2end_tests Change-Id: I04e1364390574075f7e06e39a64e3bf05a539a05 Reviewed-on: https://chromium-review.googlesource.com/1156509 Commit-Queue: Olli Etuaho <oetuaho@nvidia.com> Reviewed-by: Jamie Madill <jmadill@chromium.org>
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>