src/tests/egl_tests/EGLIOSurfaceClientBufferTest.cpp


Log

Author Commit Date CI Message
Shahbaz Youssefi 7a85d114 2022-03-25T15:01:17 Use [[nodiscard]] on RAII classes Scoped* classes provide an RAII way of adding cleanup/restore state/etc in a robust way. Unfortunatley, it's very easy to mistakenly leave the variable name, leading to the destructor being called immediately instead of at the end of the scope: { ScopedX(parameters); // instead of ScopedX x(parameters); // Code here is run after destructor } The [[nodiscard]] attribute, if specified on the ScopedX class would lead to a warning (turned to error with -Werror). This change does that for classes named *Scoped* in ANGLE. Bug: chromium:1103817 Change-Id: I65c9922c9b4eba1f9c033e093fe8fe534648ab62 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3552092 Reviewed-by: Lingfeng Yang <lfy@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Alexis Hetu 4647e4c5 2021-09-27T17:03:05 SwANGLE copy to IOSurface This CL performs a buffer to image copy on bindTexImage and an image to buffer copy on a releaseTexImage on MacOS in order to copy from/to an IOSurface which has an arbitrary internal layout. It also changes the internal format used by GL_BGRX8_ANGLEX to GL_RGBX8_ANGLEX in order to have an internal format which accurately represents the {GL_RGB, GL_UNSIGNED_BYTE} format with the color channels in the correct order. Bug: chromium:1209250 Bug: angleproject:4369 Change-Id: I62b66c7055f8ba8a4c943abeb2e35a3825efc392 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3169472 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Jonah Ryan-Davis <jonahr@google.com> Commit-Queue: Alexis Hétu <sugoi@chromium.org>
Peter Kasting f33a41be 2021-06-15T16:59:57 Another fix for -Wc++11-narrowing. Bug: chromium:1216696 Change-Id: I65955fe818917a1909c3d1af391718aaa82652bb Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2965535 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Charlie Lao 07ae2970 2021-05-12T11:15:01 Fix IOSurfaceClientBufferTest.RenderToBGRX8888IOSurface on OSX+OpenGL For BGRX, the alpha value is undefined. It wont write back to client memory, so don't compare alpha to expected result. Bug: angleproject:5958 Change-Id: I289f14f7c6a6ee63e74351d6abdd44fff8bf106b Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2891926 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Charlie Lao <cclao@google.com>
Geoff Lang 710e408e 2020-08-25T18:00:39 Add support for P010 IOSurfaces Add test coverage of multi-plane IOSurfaces. Bug: chromium:1115621 Change-Id: Ib2150c4221a3e49f01ab016cebba4830194ab2b5 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2376174 Reviewed-by: Jonah Ryan-Davis <jonahr@google.com> Commit-Queue: Geoff Lang <geofflang@chromium.org>
Jonah Ryan-Davis b89e9611 2020-08-19T11:19:35 Fix SwANGLE suppressions of EGLIOSurfaceClientBufferTest Suppressions were missing for several texture formats. This slipped through because angle_end2end_tests are not run on SwANGLE on Mac. Bug: angleproject:4369 Change-Id: I0cbafe5daab591da15f86f2658c4edc724ae2561 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2364190 Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Jonah Ryan-Davis <jonahr@google.com>
Ian Elliott 09924221 2020-08-24T17:17:17 Convert the EGL end2end tests to use RAII types/macros These tests are frequently cloned to make new tests, and so it's good to do a more-global refactor so that these and future tests will use RAII. Bug: angleproject:4947 Change-Id: I2973e70ee075629965b18c685793975537e96b6c Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2372627 Reviewed-by: Ian Elliott <ianelliott@google.com> Reviewed-by: Courtney Goeltzenleuchter <courtneygo@google.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Cody Northrop <cnorthrop@google.com> Commit-Queue: Ian Elliott <ianelliott@google.com>
Le Hoang Quyen a13f1061 2020-08-14T23:37:21 Metal: Fix missing image view for texture from IOSurface. Image view is used by glTexSubImage*, glCopySubImage* and glCopySubTexture*. This fixed some failed WebGL tests that make use of IOSurface. Bug: angleproject:4846 Bug: angleproject:2634 Change-Id: Iebcf840fdc1be2794feab766957b5848a361a63c Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2356107 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Le Hoang Quyen 69ca1025 2020-07-31T02:08:09 Metal: Implement EGL_ANGLE_iosurface_client_buffer. GL_R16UI format is not supported yet. It will be implemented once integer textures are implemented in metal back-end. Bug: angleproject:4847 Bug: angleproject:2634 Change-Id: I60a52c0ce327a524c74e80b18bb15978ac52065b Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2329091 Commit-Queue: Jonah Ryan-Davis <jonahr@google.com> Reviewed-by: Jonah Ryan-Davis <jonahr@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Geoff Lang ab95a449 2020-07-20T12:12:18 Textures that have bound surfaces are always renderable. Chrome still tends to use ES2 contexts for most rasterization. This is a problem when trying to use FP16 IOSurfaces for rendering HDR because GL_RGBA16F is not renderable in ES2. Since a surface is always renderable, allow rendering to any textures with a bound surface. Update the tests to verify that ES3 formats can be used with ES2 contexts. Add tests for RGBA16F IOSurfaces. BUG: chromium:1103112 Change-Id: I9e8c082fc97a0e072289b097e71fc944988d4872 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2307454 Reviewed-by: Jonah Ryan-Davis <jonahr@google.com> Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Geoff Lang <geofflang@chromium.org>
Geoff Lang 49108a12 2020-06-30T11:53:23 Support BGRA_1010102 IOSurfaces in CGL and Vulkan. Bug: chromium:1100599 Change-Id: I7bc2c2e35490e28e9f6fe8f2e0c26cdea50650b9 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2275731 Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Jonah Ryan-Davis <jonahr@google.com> Commit-Queue: Geoff Lang <geofflang@chromium.org>
Jonah Ryan-Davis 806ba566 2019-12-12T13:02:01 Extend ANGLE_iosurface_client_buffer to Vulkan backend for Swangle Implement an IOSurface-backed pBuffer surface for the Vulkan backend on Mac, through SwANGLE. ANGLE will pass a raw pointer to Swiftshader and handle locking/unlocking the IOSurface. Bug: chromium:1015454 Change-Id: Ia3ead55334736003d405b54ba8dcc7701706fbb2 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1965434 Commit-Queue: Jonah Ryan-Davis <jonahr@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Geoff Lang b3eeb2a4 2019-08-05T17:02:43 Emulate RGB textures using BGRX IOSurfaces. When the user requests an IOSurface Pbuffer with an RGB format, emulate the missing alpha channel by clearing it to 1.0 and masking reads and writes in shaders. BUG=angleproject:3766 Change-Id: I58c992bf641d9ece0f923603f32640615150e4f3 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1737437 Commit-Queue: Geoff Lang <geofflang@chromium.org> Reviewed-by: Kenneth Russell <kbr@chromium.org>
Kenneth Russell cbdf8616 2019-07-09T20:30:45 Support blitFramebuffer to and from IOSurface-backed textures. Extend validation to allow texture rectangle-backed textures as blitFramebuffer sources and destinations. Add end-to-end test covering this functionality, and run the IOSurfaceClientBufferTests against both ES2 and ES3. Bug: angleproject:3669 Change-Id: I7b8815a2c98072c12de45717afbba9e9b29ba253 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1694483 Commit-Queue: Kenneth Russell <kbr@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill 5cbaa3f8 2019-05-07T15:49:22 Don't inherit ANGLETest SetUp and TearDown. Instead of inheriting from testing::Test's SetUp and TearDown we add new methods 'testSetUp' and 'testTearDown'. This helps prevent a common error of forgetting to call the base class method. Also add a check in the ANGLETest destructor that SetUp and TearDown have been called. Bug: angleproject:3393 Change-Id: Iab211305cc06ffea9ca649e864ddc9b180f2cba0 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1593960 Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
James Darpinian 2889dff6 2019-03-27T16:25:11 Mac: Support using an IOSurface as the default framebuffer Bug: angleproject:2764 Change-Id: I3fdab330b59ed996f68e3063debca29323a66cf0 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1542599 Commit-Queue: James Darpinian <jdarpinian@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
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>
Corentin Wallez 3f4b87b4 2018-02-16T17:12:19 Expand the EGLIOSurfaceClientBufferTests This expands the test to check for validation errors and that multiple formats of IOSurfaces can be read from / rendered to. It fixes a couple issues in the implementation of the extension too. Minor fixes in the EGL_ANGLE_iosurface_client_buffer extension text. Fix a fragile test that was not setting the texture unit a shader is to sample from. BUG=angleproject:1649 Change-Id: Ied2a9bfff95cb3a9a7a59008260899eb2fc55575 Reviewed-on: https://chromium-review.googlesource.com/924477 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Corentin Wallez 9db70de8 2017-07-04T18:28:42 Reland: Implement EGL_ANGLE_iosurface_client_buffer Includes a fix for creating pbuffers with <buftype> EGL_D3D_TEXTURE with EGL_WIDTH and EGL_HEIGHT attributes. BUG=angleproject:1649 TBR=geofflang@chromium.org Change-Id: Id2974b8fab02c3218febfac708b9b034e65cbc53 Reviewed-on: https://chromium-review.googlesource.com/823248 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Corentin Wallez 7f5c3eb7 2017-12-12T14:54:17 Revert "Implement EGL_ANGLE_iosurface_client_buffer" This reverts commit c7abc08034a30a41748eefc5b628a76d4e2daa8a. Reason for revert: Might have broken Chromium Win10 composition due to validation changes. Original change's description: > Implement EGL_ANGLE_iosurface_client_buffer > > BUG=angleproject:1649 > > Change-Id: I1e72c31d7c9497ad14039a8d3fb97317ab193cb2 > Reviewed-on: https://chromium-review.googlesource.com/559107 > Reviewed-by: Corentin Wallez <cwallez@chromium.org> > Reviewed-by: Geoff Lang <geofflang@chromium.org> > Commit-Queue: Corentin Wallez <cwallez@chromium.org> TBR=geofflang@chromium.org,cwallez@chromium.org Change-Id: I605b710b6d76056d6276b09822cd6ddca277bfd0 No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: angleproject:1649 Reviewed-on: https://chromium-review.googlesource.com/822172 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Corentin Wallez c7abc080 2017-07-04T18:28:42 Implement EGL_ANGLE_iosurface_client_buffer BUG=angleproject:1649 Change-Id: I1e72c31d7c9497ad14039a8d3fb97317ab193cb2 Reviewed-on: https://chromium-review.googlesource.com/559107 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Corentin Wallez <cwallez@chromium.org>