src/tests/gl_tests/CopyTextureTest.cpp


Log

Author Commit Date CI Message
Tom Sepez 25390156 2025-08-21T00:13:19 Suppress unsafe buffers on a file-by-file basis in src/ [1 of N] In this CL, we suppress many files but stop short of actually enabling the warning by not removing the line from the unsafe_buffers_paths.txt file. That will happen in a follow-on CL, along with resolving any stragglers missed here. This is mostly a manual change so as to familiarize myself with the kinds of issues faced by the Angle codebase when applying buffer safety warnings. -- Re-generate affected hashes. -- Clang-format applied to all changed files. -- Add a few missing .reserve() calls to vectors as noticed. -- Fix some mismatches between file names and header comments. -- Be more consistent with header comment format (blank lines and trailing //-only lines when a filename comment adjoins license boilerplate). Bug: b/436880895 Change-Id: I3bde5cc2059acbe8345057289214f1a26f1c34aa Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6869022 Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Jeff Vigil 8e9132c3 2025-07-08T15:23:17 Add missing brackets to gl_tests Add missing brackets required for format style Bug: angleproject:430338389 Change-Id: I4757f03c06bc25734c7492284160d04c8c8fd459 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6715884 Commit-Queue: mohan maiya <m.maiya@samsung.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: mohan maiya <m.maiya@samsung.com>
Tim Van Patten 0d441eda 2025-05-29T12:04:46 util: Give all ConfigParameters default values ConfigParameters has a mix of 'bool' and 'Optional<bool>', with some tests setting the Optional<> values to the default value, inadvertently creating a dependency on the associated extension. To reduce the dependency on various extensions and allow more tests to run, update ConfigParameters to only contain raw bools and initialize them to the default values defined by the associated spec. This allows EGLWindow to only require the necessary extension when a non-default value is set by a test. This also requires updates to a handful of tests which were relying on the state of extensions due to non-default values. Bug: b/279980674 Change-Id: I77a7e102559e4393aadcdbf37886ae80cbbb9e29 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6618033 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Tim Van Patten <timvp@google.com> Reviewed-by: Amirali Abdolrashidi <abdolrashidi@google.com>
Amirali Abdolrashidi ef55ca0a 2024-10-17T14:44:22 Update copy validation regarding ext textures * Updated the validation functions for the following function to accept TEXTURE_EXTERNAL_OES: glCopyImageSubDataEXT() * Updated unit test CopyTextureTestES3.CopyImageSubDataToEGLImage * Using TEXTURE_EXTERNAL_OES as target for glFramebufferTexture2D() requires EXT_YUV_target. Therefore, the texture related to it is used instead. Bug: angleproject:361372990 Change-Id: I905d4cf89522ae3158516b42b15705d1044c6e97 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5940404 Reviewed-by: Charlie Lao <cclao@google.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Amirali Abdolrashidi <abdolrashidi@google.com>
Jiaqi Li ff455e8c 2024-10-17T13:19:09 Add tests to check copy image with TEXTURE_EXTERNAL_OES According to spec of EXT_copy_image, GL_TEXTURE_EXTERNAL_OES should be accepted by glCopyImageSubDataEXT. Add two tests to check copy image from gles texture to EGLImage and from EGLImage to gles texture by API glCopyImageSubDataEXT. As ANGLE does not support this currently, skip these two tests on all platforms. Bug: angleproject:361372990 Change-Id: Iceacb2d6af2277a314a215220c3ccdf47665561c Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5940214 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Amirali Abdolrashidi <abdolrashidi@google.com> Commit-Queue: Amirali Abdolrashidi <abdolrashidi@google.com>
Yuxin Hu dd25e193 2024-06-14T12:14:52 Add a texture copy test that does multiple layer copies Add a test that does multi-layer copy between a 2D array texture and a 3D texture of different formats. Bug: b/347306270 Change-Id: I972ae83f568450c27295a565af13f8e6d2332f66 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5634376 Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Amirali Abdolrashidi <abdolrashidi@google.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Shahbaz Youssefi d193d51b 2024-06-17T22:46:08 Replace issue ids post migration to new issue tracker This change replaces anglebug.com/NNNN links. Bug: None Change-Id: I8ac3aec8d2a8a844b3d7b99fc0a6b2be8da31761 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5637912 Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Shahbaz Youssefi b3ab67d3 2024-03-14T15:06:02 tests: Remove unnecessary .get() from RAII objects Bug: chromium:40942995 Change-Id: I82509869bce3ad8f51811188fe04267f2de04786 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5370904 Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Shahbaz Youssefi 8346addb 2024-02-06T15:40:31 Contain X11 includes and free usage of common terms This change undoes workarounds where some terms were avoided so there is no clash with X11 (such as Success, Bool and None). In particular, this helps us make sure we never include the X11 headers in such an unconstrained manner as to clash with our code. Bug: angleproject:8520 Change-Id: I53d9657c5a33164064d2c80a206b96fd52f607f1 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5273491 Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Liza Burakova <liza@chromium.org>
Shahbaz Youssefi 0ea24ef2 2024-01-26T16:50:39 Unsuppress passing tests Bug: angleproject:3871 Bug: angleproject:3872 Bug: angleproject:3879 Bug: angleproject:4686 Bug: angleproject:4704 Bug: angleproject:4718 Bug: angleproject:4721 Bug: angleproject:4792 Bug: angleproject:5086 Bug: angleproject:5313 Bug: angleproject:6109 Change-Id: I0d0f88a388cd2f19da99a7defd0ab8d98db0e6e0 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5241306 Reviewed-by: Roman Lavrov <romanl@google.com> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Alexey Knyazev d7077e9f 2023-12-05T00:00:00 Update macOS end2end expectations Bug: angleproject:2273 Bug: angleproject:2408 Bug: angleproject:3837 Bug: angleproject:5325 Bug: angleproject:5360 Bug: angleproject:5594 Bug: angleproject:6358 Bug: angleproject:6418 Bug: angleproject:6454 Bug: angleproject:6457 Bug: angleproject:6540 Bug: angleproject:6702 Bug: angleproject:6751 Bug: angleproject:7068 Bug: angleproject:7309 Bug: angleproject:7445 Change-Id: I7f4c012ed2de6af83188ed69170b19f8d2bb19de Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5087774 Commit-Queue: Alexey Knyazev <lexa.knyazev@gmail.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Christopher Cameron a1e3abc0 2023-09-22T10:14:43 Add ES2 support for copying GL_SRGB8_ALPHA8 to GL_RGBA8 Bug: angleproject:7907 Change-Id: I02ae9785ea1f942e85983c18155cfd75ec39b5c2 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4887271 Commit-Queue: ccameron chromium <ccameron@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Christopher Cameron 120e90eb 2023-09-08T11:23:11 Add test for copying GL_SRGB8_ALPHA8 to GL_RGBA8 The pixel values should be the same (no conversion should happen). Include sub-tests with and without alpha premultiplication. Bug: angleproject:7907 Change-Id: I2e3d657d5b8513cd06df357e84027572ebce03ff Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4852258 Commit-Queue: ccameron chromium <ccameron@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Steven Noonan 113f847b 2023-06-26T12:07:52 centralize basic OS/platform detection functions We had multiple different places that defined these, and with varying naming schemes. Centralize them to be defined in platform_helpers.h. Also renaming the IsApple(uint32_t) functions to IsAppleGPU(uint32_t) to avoid ambiguous meaning: "IsApple" should mean "is Apple-vended OS" while "IsAppleGPU" should mean "is Apple GPU vendor ID". Bug: angleproject:8229 Change-Id: If4e3fc5ac1b5b8ad416663950a1b2ee912ccad99 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4647291 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Steven Noonan <steven@uplinklabs.net> Auto-Submit: Steven Noonan <steven@uplinklabs.net> Reviewed-by: Roman Lavrov <romanl@google.com> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Solti b9df3551 2022-08-15T17:42:53 update CopyTextureCHROMIUM to match Chromium Overview: This CL makes the validation of *CopyTextureCHROMIUM* and *CopySubTextureCHROMIUM* in ANGLE behave consistently with CHROMIUM. The new behavior is: ``` INVALID_OPERATION is generated on ES 2.0 if <sourceId> refers to an external texture (OES_EGL_image_external), <destId> refers to a texture with an integer-type internal format, and the underlying context does not support OES_EGL_image_external_essl3. ``` Tests: ===== CopyTextureCHROMIUM ===== add a test in ES 2.0 to test the API with the error case. ===== CopySubTextureCHROMIUM ===== add a test in ES 3.0 to test the error case. in ES 2.0, the error case cannot happen because "glTexImage2D()" doesn't support integer formats - ran all CopyTextureTest on gLinux: ```autoninja -C out/Debug && xvfb-run out/Debug/angle_end2end_tests --gtest_filter=*CopyTextureTest* --verbose``` - ran all CopyTextureTest on Android test phone: ```autoninja -C out/Android && out/Android/angle_end2end_tests --gtest_filter=*CopyTextureTest* --verbose``` Bug: angleproject:4228 Change-Id: I1cb77c72750add5f399013d3d30eed7acf8d0a50 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3826166 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Yuxin Hu <yuxinhu@google.com> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Eddie Hatfield 89e38b57 2022-06-22T15:04:08 Refactor to use ANGLETest vs ANGLETestWithParam Bug: angleproject:6747 Change-Id: I72ad52d0268eae0e1a401f12f3e94cc5efa402f2 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3719002 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Cody Northrop <cnorthrop@google.com>
Alexey Knyazev b51bbe24 2022-05-06T00:00:00 Add CopyTextureTest.ClearAfterCopySubTexture Bug: angleproject:2192 Change-Id: I75d13e089e6e47f1fd3ce62eba48e531c24abcff Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3634704 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Alexey Knyazev <lexa.knyazev@gmail.com>
Yuxin Hu fe2c82ad 2022-04-26T12:39:44 check integer overflow in Texture copyImage The code that checks forceCopySubImage could run into integer overflow error for these values: sourceArea.x + sourceArea.width sourceArea.y + sourceArea.height With gn arg is_ubsan=true, these two equations lead to crash. Add the code to check integer overflow Bug: chromium:1314268 Bug: angleproject:5246 Change-Id: I6dee98457a44797ffb806ef8bd05f052c9aaa733 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3597713 Reviewed-by: Charlie Lao <cclao@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Yuxin Hu <yuxinhu@google.com>
Kyle Piddington 91f92540 2022-01-14T18:34:44 Metal: Fix multisample resolves. 1) Only use MTLLoadActionDontCare if store action was MTLStoreActionDontCare, ignoring MTLStoreActionMultisampleResolve. 2) For color, depth and stencil attachments, if they have implicit multisample textures, use MTLStoreActionStoreAndMultisampleResolve rather than MTLStoreActionStore. This addresses bugs when resolving a multisampled framebuffer and copying it to a texture, and fixes these two Three.js demos: https://threejs.org/examples/webgl_framebuffer_texture https://threejs.org/examples/webgl_decals Added CopyTextureTestES3.DrawThenCopyThenBlend modeled after new WebGL 2.0 conformance test in: https://github.com/KhronosGroup/WebGL/pull/3379 Confirmed to catch the bug. On Intel Macs, the Metal debug layers and load/store action validation must be enabled: MTL_DEBUG_LAYER=1 \ MTL_DEBUG_LAYER_VALIDATE_LOAD_ACTIONS=1 \ MTL_DEBUG_LAYER_VALIDATE_STORE_ACTIONS=1 \ MTL_DEBUG_LAYER_VALIDATE_UNRETAINED_RESOURCES=4 \ angle_end2end_tests ... Bug: angleproject:6972 Change-Id: I7bcb7c19e434e22e24b800fdce4c480d10b1fc40 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3450033 Reviewed-by: Gregg Tavares <gman@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Kenneth Russell <kbr@chromium.org>
Sergey Ulanov 3c727e44 2022-01-31T22:18:22 Allow GL_RGBX8_ANGLE for texture copy destination Updated IsValidCopyTextureDestinationInternalFormatEnum() to allow GL_RGBX8_ANGLE. Bug: chromium:1269826 Change-Id: I07533560d8f0d6f9d114e7c05927f670c6f96891 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3426820 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Maksim Sisov 4572a176 2022-01-03T13:29:59 Add support for GL_MESA_framebuffer_flip_y 3/* This is a third CL that adds tests that exercise the extension in various use cases. Bug: chromium:1231934 Change-Id: Iae3192cd0985150b6844a2855a9a048a54353655 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3365195 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Jonah Ryan-Davis <jonahr@google.com> Commit-Queue: Maksim Sisov <msisov@igalia.com>
Yuly Novikov 8a48f4de 2021-03-05T14:33:16 Skip CopyTextureVariationsTest failing on Ozone CopyTextureVariationsTest.CopyTexture CopyTextureVariationsTest.CopySubTexture Bug: angleproject:5723 Change-Id: Iad62344b9bc503a2553647877c5975b03bb6829d Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2738602 Reviewed-by: Yuly Novikov <ynovikov@chromium.org> Commit-Queue: Yuly Novikov <ynovikov@chromium.org>
Yuly Novikov a6b16d29 2021-03-02T19:04:57 Suppress UNINSTANTIATED_PARAMETERIZED_TEST failures on Ozone We only support ES2 on Ozone, so tests that depend on ES3 or ES31 support are not instantiated there. Bug: chromium:1183147 Change-Id: Id58bcd9b44a5b9a70b5ae8115e27c44f5dc81226 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2726550 Reviewed-by: Jonah Ryan-Davis <jonahr@google.com> Commit-Queue: Yuly Novikov <ynovikov@chromium.org>
Mohan Maiya 658ede5d 2020-11-04T15:53:09 LuminanceWorkaroundTextureSwizzleBug test bug fix This test would create an sRGB format texture without checking for the GL_EXT_texture_sRGB extension. Skip the test if it is not supported. Bug: angleproject:5281 Change-Id: I491e874201c26c9f828772a0fbebaea307ab57a0 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2519865 Commit-Queue: Mohan Maiya <m.maiya@samsung.com> Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Le Hoang Quyen 8a275449 2020-10-25T03:22:10 Metal: Add ES3_METAL to ANGLE_ALL_TEST_PLATFORMS_ES3 Bug: angleproject:2634 Change-Id: Iacc3aaf17565c7b16879897db4b9dac16826d829 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2494526 Commit-Queue: Le Hoang Quyen <le.hoang.q@gmail.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill 2d6b6026 2020-10-25T13:15:09 Skip flaky tests on Win7/NVIDIA/GLES. CopyTextureVariationsTest.CopyTexture/ES2_OpenGLES__AToRGBFlipYUnmultiplyAlpha CopyTextureTest.CopyOutsideMipmap/ES2_OpenGLES Bug: angleproject:5246 Change-Id: I388df27c690d2a082741f2018690bf2fa24a7594 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2497224 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Le Hoang Quyen 80d4901a 2020-09-26T19:22:00 Metal: Support integer textures. Bug: angleproject:2634 Bug: angleproject:5154 Change-Id: Iffea26fe2c683557b4fa7c13fddf3523294b47d4 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2433329 Commit-Queue: Le Hoang Quyen <le.hoang.q@gmail.com> Reviewed-by: Jonah Ryan-Davis <jonahr@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Shahbaz Youssefi 68bd685a 2020-10-10T22:58:41 Reland: "4 Vulkan content defined CLs." Reland "Vulkan: Avoid content restore by detecting no-op stencil" This relands commit 243d0f899e443cd931c78aba7489382dff79edbb. Reland "Vulkan: Restore at the end of RP if write-after-invalidate" This relands commit e5d52ac3b9a00656acdd912ee8cd62dd14784075. Reland "Vulkan: Invalidate/restore depth/stencil separately." This relands commit 61fa0878964a796f6d3b3c13bc3a3849403ecdbd. Reland "Vulkan: Move content-defined tracking to ImageHelper" This relands commit 2392e6b34c0ddfbfd7b4c3cb67323ba463e11a57. Reason for revert: Caused crashes in Fuchsia x64 and on ARM. Reland fixes content defined for external images. Original CL message: Content-defined tracking was done in render targets prior to this change. This had multiple drawbacks: - When a framebuffer attachment is changed (including the first time it's set), it's unknown whether the contents of the attachment is defined. - Invalidate takes effect at the end of render pass, at which point the render target objects may be gone. Attachment ImageHelpers are however correctly tracked. This change moves content-defined tracking to the ImageHelper itself, and tracks it per subresource. ImageHelper::onWrite() now receives the subresource that is being written, and marks it as having defined content. A future optimization can make use of this change to ImageHelper::onWrite to track "dirty" subresources. This can lead to the removal of unnecessary barriers when same-kind writes are done on different subresources of the image. See http://anglebug.com/3347#c15 Bug: b/167275320 Bug: angleproject:4836 Bug: angleproject:5159 Change-Id: If5c1ae7152657fd7c94db7d55bea4fb9ddf835ba Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2464825 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Jamie Madill d6b1c17b 2020-10-10T14:29:15 Revert 4 Vulkan content defined CLs. Revert "Vulkan: Avoid content restore by detecting no-op stencil" This reverts commit 243d0f899e443cd931c78aba7489382dff79edbb. Revert "Vulkan: Restore at the end of RP if write-after-invalidate" This reverts commit e5d52ac3b9a00656acdd912ee8cd62dd14784075. Revert "Vulkan: Invalidate/restore depth/stencil separately." This reverts commit 61fa0878964a796f6d3b3c13bc3a3849403ecdbd. Revert "Vulkan: Move content-defined tracking to ImageHelper" This reverts commit 2392e6b34c0ddfbfd7b4c3cb67323ba463e11a57. Causes crashes in Fuchsia x64 and on ARM. Original CL message: Content-defined tracking was done in render targets prior to this change. This had multiple drawbacks: - When a framebuffer attachment is changed (including the first time it's set), it's unknown whether the contents of the attachment is defined. - Invalidate takes effect at the end of render pass, at which point the render target objects may be gone. Attachment ImageHelpers are however correctly tracked. This change moves content-defined tracking to the ImageHelper itself, and tracks it per subresource. ImageHelper::onWrite() now receives the subresource that is being written, and marks it as having defined content. A future optimization can make use of this change to ImageHelper::onWrite to track "dirty" subresources. This can lead to the removal of unnecessary barriers when same-kind writes are done on different subresources of the image. See http://anglebug.com/3347#c15 Bug: b/167275320 Bug: angleproject:4836 Bug: angleproject:5159 Change-Id: I93d9dfe973caa7ce70aefa46b5b7d04a8637efb3 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2464822 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Shahbaz Youssefi 2392e6b3 2020-10-07T23:59:43 Vulkan: Move content-defined tracking to ImageHelper Content-defined tracking was done in render targets prior to this change. This had multiple drawbacks: - When a framebuffer attachment is changed (including the first time it's set), it's unknown whether the contents of the attachment is defined. - Invalidate takes effect at the end of render pass, at which point the render target objects may be gone. Attachment ImageHelpers are however correctly tracked. This change moves content-defined tracking to the ImageHelper itself, and tracks it per subresource. ImageHelper::onWrite() now receives the subresource that is being written, and marks it as having defined content. A future optimization can make use of this change to ImageHelper::onWrite to track "dirty" subresources. This can lead to the removal of unnecessary barriers when same-kind writes are done on different subresources of the image. See http://anglebug.com/3347#c15 Bug: b/167275320 Bug: angleproject:4836 Change-Id: Iabd1dace4eae9eb379453a9eb7ec6eafc9db1aef Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2462036 Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Ian Elliott <ianelliott@google.com>
Jamie Madill c488f0c9 2020-10-02T16:23:08 Suppress flaky test on Win/Intel/GL. CopyTextureTestES3.ES3UnormFormats/ES3_OpenGL Bug: angleproject:5127 Change-Id: I93628beb92b8d9b4d8c6f70b32d15ed9add54667 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2446595 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Le Hoang Quyen a0880831 2020-08-06T19:11:40 Metal: Implement CHROMIUM_copy_texture Bug: angleproject:4930 Bug: angleproject:2634 Change-Id: I9fd958aa1dd872855be06a14bdbba4c6624dc934 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2340396 Commit-Queue: Jonah Ryan-Davis <jonahr@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Jonah Ryan-Davis <jonahr@google.com>
Jamie Madill ad782a84 2020-07-02T16:21:59 Tests: Use "__" to delineate test config names. This will allow the ANGLE test runner to identify test configs for tests that use parameterization to break up different test permutations with the same config. Note that GoogleTest doesn't allow for anything other than alphanumeric characters or "_" in test names. Bug: angleproject:3162 Change-Id: Iee215fbd8c397eef04dce0269da9b58ec568fce7 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2280402 Reviewed-by: Yuly Novikov <ynovikov@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Shahbaz Youssefi 7005248b 2020-06-11T16:00:23 Vulkan: Fix glCopyTextureCHROMIUM if source is swizzled A no-swizzle view is added for this use-case. Bug: angleproject:4004 Change-Id: Id654af9a4f520357c91bf2b06501c9e1ea169f11 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2241623 Reviewed-by: Tim Van Patten <timvp@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Shahbaz Youssefi ff2ebce4 2020-06-10T22:46:17 Vulkan: allow texture copies from one mip to another As a first implementation, this makes the copy go through the staging buffer. Once anglebug.com/4719 is implemented, this can be optimized to perform the copy directly. Bug: angleproject:2914 Bug: angleproject:4274 Change-Id: I2c9863381f54c3467ca939d049336960c21f60b0 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2240671 Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Tim Van Patten <timvp@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Shahbaz Youssefi ac44f8c5 2020-06-05T23:30:53 Vulkan: Apply SPIR-V optimization to internal shaders Shaves about 40KB from binary size. Bug: angleproject:2022 Bug: angleproject:3432 Change-Id: I008c18e0040b1bafe022087113681e2ace6eb7b8 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1616963 Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Shahbaz Youssefi 000a79f1 2020-06-04T23:06:58 Vulkan: Better handling of texture level redefinition If a texture level is being redefined, there are two scenarios to consider: 1. The level is outside the base/max level, for which the image was allocated. 2. The level is within the base/max level, but it's being redefined to a different size or format. In the former case, we simply don't need to release the image. The latter case itself has two possibilities: 2.1. There is only one level in the image. 2.2. There are multiple levels in the image. In case 2.1, the whole image is being redefined (as it has only a single level), so the image can (and should) be released. Prior to this change, this behavior was adopted for all cases. This change retains this behavior for this case only. In case 2.2, the texture is becoming incomplete. However, the image shouldn't yet be released because another one of its mips may be bound to a framebuffer. In such cases as glCopyTexImage2D(), that framebuffer may in fact be the source of the copy operation (which would be destroyed if the image is released). If the base/max level of the texture doesn't change, redefining the level and making the texture incomplete doesn't make the framebuffer incomplete; this is achieved at the same time by not releasing the image. This change ensures that updates to the redefined level are staged in cases 1 and 2.2. Bug: angleproject:4274 Change-Id: I3fac3203c2fbbc16e8e4a35b1334b767120b2dcf Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2230853 Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Antonio Maiorano 111a4d97 2020-06-05T16:56:45 Fix copy texture to sRGB in ANGLE/VK Like the GL backend, use the CPU copy path rather than the draw path when the target is sRGB. Fixes the following WebGL tests: conformance2/textures/canvas/tex-2d-srgb8_alpha8-rgba-unsigned_byte.html conformance2/textures/canvas/tex-2d-srgb8-rgb-unsigned_byte.html conformance2/textures/image_bitmap_from_canvas/tex-2d-srgb8_alpha8-rgba-unsigned_byte.html conformance2/textures/image_bitmap_from_canvas/tex-2d-srgb8-rgb-unsigned_byte.html Re-enable CopyTextureTestES3.ES3UnormFormats for Vulkan as they now pass with this change. Bug: b/157934810 Bug: angleproject:4092 Change-Id: I6b76e5f4345d204a084f5483e206c5bb4ff2f139 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2233405 Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Antonio Maiorano <amaiorano@google.com>
Antonio Maiorano 3c4d7ab0 2020-06-01T17:14:28 Fix copy subtexture to GL_RGB9_E5 in ANGLE/VK When copying via glTexSubImage2D to a non-renderable format, GL_RGB9_E5, ANGLE's TextureVk::copySubTextureImpl will use the read-back and copy method. This path was ignoring the source offset in the source area computation. Fixes the following WebGL tests: conformance2/textures/canvas_sub_rectangle/tex-2d-rgb9_e5-rgb-float.html conformance2/textures/canvas_sub_rectangle/tex-2d-rgb9_e5-rgb-half_float.html Bug: b/157744725 Change-Id: I714f8d3b8f1490edab5e7578445e9623215ce229 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2225611 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Antonio Maiorano <amaiorano@google.com>
Antonio Maiorano 1e9097f5 2020-05-29T11:58:10 Enable CopyTextureVariationsTest.CopyTexture on VK These do not fail on SwiftShaderVK. Root problem was fixed at some point so we can re-enable these. Bug: angleproject:4092 Change-Id: I8a0e03eaf438b61d31a2c6461e581445d0378645 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2221424 Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Geoff Lang <geofflang@chromium.org>
Antonio Maiorano 9905f7f5 2020-05-29T11:25:33 Fix CopyTextureTestES3.ES3FloatFormats for VK When enabled, this would crash in debug because mFormat would be nullptr on the target VkTexture, and the ASSERT would access mFormat via getAspectFlags(). Fixed this by only calling getAspectFlags() if mFormat is valid. I'm not sure this was the original reason this test was disabled, but they pass now on SwiftShader. Bug: angleproject:4092 Change-Id: I9b04bbc61dde14f722d3a510f3d38776f4f6c7ac Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2221420 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Antonio Maiorano <amaiorano@google.com>
Antonio Maiorano 98496cab 2020-05-28T15:02:43 Fix float to int copy in VK backend This fixes WebGL tests on Vulkan (e.g. SwiftShaderVK) that copy from the canvas (GL_RGBA8) to an integer format target texture, such as: conformance2/textures/canvas_sub_rectangle/tex-2d-rg8ui-rg_integer-unsigned_byte.html The sampled normalized value needs to be scaled up by 255. Also fixes angle_end2end test CopyTextureTestES3.ES3UintFormats on Vulkan. Bug: b/156399229 Bug: angleproject:4092 Change-Id: I18d46bc4453fdc500caca96ca3a12fe93290b10c Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2219142 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Antonio Maiorano <amaiorano@google.com>
Courtney Goeltzenleuchter 377b8caf 2019-11-19T08:57:01 Add suppressions for failures on Intel/Linux The refactor to angle_end2end_tests added tests to OpenGL ES and some of these tests are failing on Intel/Linux. Skip those tests for now. Bug: angleproject:4121 Change-Id: I7a56099faac558a4e18d98eb5f0b25522d656e61 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1924061 Commit-Queue: Courtney Goeltzenleuchter <courtneygo@google.com> Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Tobin Ehlis <tobine@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Jonah Ryan-Davis 1c795d9e 2019-11-12T11:03:14 Add a test to capture bug with LUMA blit workaround This test captures a bug with state tracking in the BlitGL LUMA texture workaround. Bug: 1022080 Change-Id: I22d2eb0d653778be300ab4a1f6b27e67f8cf1cbd Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1912140 Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Jonah Ryan-Davis <jonahr@google.com>
Tobin Ehlis 1a01b4b3 2019-11-11T16:41:07 Refactor end2end test macros This is a foundational CL to enabling the end2end tests on swiftshader. Refactored infrastructure with new ANGLE_INSTANTIATE_TEST_ES* macros that will run tests over all various combinations of all platforms for different ES versions. Just skipping failing tests initially to get the refactor landed. Bug: angleproject:4081 Bug: angleproject:4092 Change-Id: I017f6c3267179e49b6ae08cc7488096b423dcdb5 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1904635 Commit-Queue: Tobin Ehlis <tobine@google.com> Reviewed-by: Courtney Goeltzenleuchter <courtneygo@google.com>
Geoff Lang c2fc8bd8 2019-10-01T18:21:22 GL: Fix support for glCopyTextureCHROMIUM with source rectangle textures. Shader generation didn't use the correct sampler type and discarded pixels outside the [0, 1] texcoord which is almost always true when sampling rectangle textures. Added end2end test coverage. BUG=990368 Change-Id: Ifaa73dfa83467d5bfa32e3795b52033254436a77 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1834582 Commit-Queue: Geoff Lang <geofflang@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Jamie Madill 188b679b 2019-08-15T09:02:43 Remove GL/EGL function pointers from tests. The auto-gen loader code should be able to handle all these cases. Bug: angleproject:3393 Change-Id: If0a90fb29d79f2892fdf76fe0cb91ed0036ee1e3 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1756083 Commit-Queue: Courtney Goeltzenleuchter <courtneygo@google.com> Reviewed-by: Courtney Goeltzenleuchter <courtneygo@google.com>
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>
Jamie Madill b8149075 2019-04-30T16:14:44 Clean up ANGLE test extension functions. None of these functions needed to be member functions. Also make the naming more consistent. Bug: angleproject:3393 Change-Id: I7aafe2269a48af703a87bd9a8cf4cfab9e177dd3 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1574673 Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Geoff Lang 5a0f64b6 2019-04-23T16:06:47 D3D: Require cube completeness to create render targets TextureD3D_Cube::isFaceLevelComplete skips checks for the base level because it assumes that isCubeComplete has already been called to verify the base level. This assumption is not correct for some cases like glCopyTextureCHROMIUM which attempts to create a render target from cube maps that may not be complete. This caused us to create render targets from incomplete cube maps and then fail to upload data to the cube faces because the sizes or formats did not match between the images and render target. TEST=conformance/more/conformance/quickCheckAPI-S_V.html BUG=angleproject:3384 Change-Id: Iceb9415debfa07436fea1eb4bc23d0ec05679839 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1578957 Commit-Queue: Geoff Lang <geofflang@chromium.org> Reviewed-by: Jonah Ryan-Davis <jonahr@google.com>
Shahbaz Youssefi b6eb3412 2019-03-06T15:10:56 Allow testing::Combine in ANGLE_INSTANTIATE_TEST In most tests, ANGLE_INSTANTIATE_TEST is sufficient. This macro takes a a variable number of angle::PlatformParameters and instantiates that many tests. angle::PlatformParameters already aggregates multiple configurations. In a number of cases, however, it would be useful to have even more configurations in conjunction with angle::PlatformParameters. gl_tests/MultiviewDrawTest.cpp solves this by creating a custom class that combines angle::PlatformParameters with test-specific configurations. gl_tests/CopyTextureTest.cpp included numerous tests with hardcoded values for its configurations. This change introduces ANGLE_INSTANTIATE_TEST_COMBINE_N. These macros take N testing::* parameter generators followed by the list of angle::PlatformParameters as per ANGLE_INSTANTIATE_TEST. They then testing::Combine these generators, placing the angle::PlatformParameters list first. Tests that use this functionality would inherit from ANGLETestWithParams<std::tuple<angle::PlatformParameters, ...>> instead of ANGLETest, and instantiate their tests as such: ANGLE_INSTANTIATE_TEST_COMBINE_3(TestName, PrettyPrintFunction, testing::ValuesIn(listOfParameters), testing::Values(some, other, parameters), testing::Bool(), ES2_D3D9(), ES2_D3D11(), ES2_OPENGL(), ES2_OPENGLES(), ES2_VULKAN()); The name of the test, as used by --gtest_filter, will be suffixed with the output of the PrettyPrintFunction. Assuming the tuple type given to ANGLETestWithParams is Params, this function takes a ::testing::TestParamInfo<Params> input to pretty-print the name of the test variation. It is recommended to output the platform first for consistency with other tests. gl_tests/CopyTextureTest.cpp is modified to use this macro. Bug: angleproject:3125 Change-Id: I0311b84659578bf3c7b5e9673b41cc3a3adfc50d Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1506236 Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
Michael Spang d8506c7e 2019-01-29T15:35:09 Disable broken tests on Fuchsia (reland) This disables tests that do not work on Fuchsia. Most of them are related to cube maps which currently crash inside the intel driver. Reland disabling -Wextra-semi. BUG=angleproject:2475, angleproject:3145, angleproject:3081 TEST=angle_end2end_tests on Fuchsia Change-Id: I65ad84f43c88e8ee83c581cc2f41046d00bbae7f Reviewed-on: https://chromium-review.googlesource.com/c/1467604 Commit-Queue: Michael Spang <spang@chromium.org> Reviewed-by: Michael Spang <spang@chromium.org>
Zhenyao Mo c66fb571 2019-02-12T03:56:16 Revert "Disable broken tests on Fuchsia" This reverts commit ad194995ed7228078d5b937dd1eff87c1dcac9c0. Reason for revert: broke GPU optional bots since the revert of its previous CL Original change's description: > Disable broken tests on Fuchsia > > This disables tests that do not work on Fuchsia. Most of them are related > to cube maps which currently crash inside the intel driver. > > BUG=angleproject:2475, angleproject:3145, angleproject:3081 > TEST=angle_end2end_tests on Fuchsia > > Change-Id: Ifc0be390c6d5c43a756e1afb6ced9e3bd5b6986e > Reviewed-on: https://chromium-review.googlesource.com/c/1446497 > Commit-Queue: Michael Spang <spang@chromium.org> > Reviewed-by: Geoff Lang <geofflang@chromium.org> TBR=spang@chromium.org,geofflang@chromium.org,jmadill@chromium.org Change-Id: Id1861ee94b89020bcd64dd8e7e52588b76830783 No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: angleproject:2475, angleproject:3145, angleproject:3081 Reviewed-on: https://chromium-review.googlesource.com/c/1465881 Reviewed-by: Zhenyao Mo <zmo@chromium.org> Commit-Queue: Zhenyao Mo <zmo@chromium.org>
Michael Spang ad194995 2019-01-29T15:35:09 Disable broken tests on Fuchsia This disables tests that do not work on Fuchsia. Most of them are related to cube maps which currently crash inside the intel driver. BUG=angleproject:2475, angleproject:3145, angleproject:3081 TEST=angle_end2end_tests on Fuchsia Change-Id: Ifc0be390c6d5c43a756e1afb6ced9e3bd5b6986e Reviewed-on: https://chromium-review.googlesource.com/c/1446497 Commit-Queue: Michael Spang <spang@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Jamie Madill 7098cff5 2019-01-15T18:33:42 Make BUILD.gn targets into templates. This allows us to "globally" add and remove certain configs as long as we use the new templates. This simplifies the logic of adding configs for stuff like extra warnings and default include dirs. As well it simplifies removing certain common unwanted configs. Generally simplifies the logic in BUILD.gn. Will allow for easily suppressing the clang-plugins config instead of using a global setting in .gn. Then we can enable the additional warnings config-by-config. Also fixes some warnings that turned up after we enabled the extra warnings config in our tests. Also moves the dEQP tests main to be consistent with the other test main files. Bug: angleproject:3069 Change-Id: I5a8166cd0f5a7926822c171fcaf473fc86b3ffc1 Reviewed-on: https://chromium-review.googlesource.com/c/1409871 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
Shahbaz Youssefi 29b49417 2019-01-07T14:03:06 Make copy texture test more extensive By doing the copy multiple times, we exercise both paths where the destination is already initialized and when it's not. This adds tests for all combinations of formats and flags. Bug: angleproject:2958 Change-Id: I56afb44496acd1b4d5a8527f4dbee29afbac9c81 Reviewed-on: https://chromium-review.googlesource.com/c/1398643 Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Geoff Lang <geofflang@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>
Geoff Lang 7198ebc4 2018-11-22T14:36:06 GL: Work around Qualcomm sRGB ReadPixels driver bug. When calling glReadPixels on unsized sRGB textures, the data returned is not linearized. Using sized sRGB formats works around this problem. Fix SRGBTextureTest assuming that unsized SRGB formats work in ES3. BUG=angleproject:2977 Change-Id: I413c888ca0c3564ecdc364f3ea693e75ed4f8d6d Reviewed-on: https://chromium-review.googlesource.com/c/1343138 Reviewed-by: Tobin Ehlis <tobine@google.com> Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Geoff Lang <geofflang@chromium.org>
Jiawei Shao af0f31d3 2018-09-27T15:42:31 Enable several end2end tests on Windows Intel drivers Bug: angleproject:1388 angleproject:1706 Change-Id: Ic6c62b0a85756bf36b6d345610a77ffd5c4665e3 Reviewed-on: https://chromium-review.googlesource.com/1248442 Commit-Queue: Jiawei Shao <jiawei.shao@intel.com> Reviewed-by: Jiajia Qin <jiajia.qin@intel.com> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill 71bb0267 2018-09-12T11:09:42 Vulkan: Implement cube map render targets. Each TextureVk now stores vectors of RenderTargetVks and ImageViews associated with the image faces. They are initialized lazily when the RenderTarget is queried in getAttachmentRenderTarget. There's still one missing edge case for handling clear with the Framebuffer when using cube maps. Also one additional test failure on Android. Bug: angleproject:2470 Change-Id: Ib959a3434a992cef010a11940cf2ee49e118ac17 Reviewed-on: https://chromium-review.googlesource.com/1220727 Reviewed-by: Frank Henigman <fjhenigman@chromium.org> Reviewed-by: Yuly Novikov <ynovikov@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Geoff Lang d691aeeb 2018-07-11T16:32:06 Vulkan: Implement GL_CHROMIUM_copy_texture with CPU copies. BUG=angleproject:2723 Change-Id: Ic3905531d3e91f94ff0ce10a09ca5dcdf643e21f Reviewed-on: https://chromium-review.googlesource.com/1134084 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Geoff Lang <geofflang@chromium.org>
Luc Ferron af883628 2018-06-08T15:57:31 Vulkan: enable as many end2end tests as possible Bug: angleproject:2615 Change-Id: I918cc18984b2e5b22b5e13398355a2fd60e4eb00 Reviewed-on: https://chromium-review.googlesource.com/1093564 Commit-Queue: Luc Ferron <lucferron@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Geoff Lang 00689191 2018-03-27T17:34:20 GL: Fix the CPU readback path of CopyTextureCHROMIUM. 1. BlitGL's resources were not being intialized. 2. The format/type information was not enough to know if the destination texture was SRGB. BUG=693090 Change-Id: I3fc277a175772d3b6acace1810cb43f4a9bdc473 Reviewed-on: https://chromium-review.googlesource.com/982642 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Geoff Lang <geofflang@chromium.org>
Brandon Jones 2878379d 2018-03-05T09:37:32 Add NPOT validation to copyTextureCHROMIUM copyTextureCHROMIUM should generate INVALID_VALUE when using a NPOT texture and level not equal to zero, so we should add validation to catch this case. BUG=angleproject:2380 Change-Id: I7ca2e657287c11d560db0ad296f8e87ed0c19798 Reviewed-on: https://chromium-review.googlesource.com/956018 Commit-Queue: Geoff Lang <geofflang@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Yuly Novikov e3688d27 2018-03-07T22:14:54 Revert "Add NPOT validation to copyTextureCHROMIUM" This reverts commit 2202680c6a5d08ba74d57ce675af2266dddb205c. Reason for revert: ASAN found error https://ci.chromium.org/buildbot/chromium.gpu.fyi/Mac%20FYI%20GPU%20ASAN%20Release/210 Original change's description: > Add NPOT validation to copyTextureCHROMIUM > > copyTextureCHROMIUM should generate INVALID_VALUE when using a NPOT > texture and level not equal to zero, so we should add > validation to catch this case. > > BUG=angleproject:2380 > > Change-Id: I0ea50a981e4d8f10f5913969f6b629617b57aa15 > Reviewed-on: https://chromium-review.googlesource.com/951713 > Commit-Queue: Geoff Lang <geofflang@chromium.org> > Reviewed-by: Geoff Lang <geofflang@chromium.org> TBR=geofflang@chromium.org,jmadill@chromium.org,brandon1.jones@intel.com Change-Id: I04dcbd5e1d97b1bd968b26a06e4d3e4d175be0d8 No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: angleproject:2380 Reviewed-on: https://chromium-review.googlesource.com/953343 Reviewed-by: Yuly Novikov <ynovikov@chromium.org> Commit-Queue: Yuly Novikov <ynovikov@chromium.org>
Brandon Jones 2202680c 2018-03-05T09:37:32 Add NPOT validation to copyTextureCHROMIUM copyTextureCHROMIUM should generate INVALID_VALUE when using a NPOT texture and level not equal to zero, so we should add validation to catch this case. BUG=angleproject:2380 Change-Id: I0ea50a981e4d8f10f5913969f6b629617b57aa15 Reviewed-on: https://chromium-review.googlesource.com/951713 Commit-Queue: Geoff Lang <geofflang@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Geoff Lang f81d17c2 2018-02-02T15:10:37 D3D11: Downsample when copying to emulated 16-bit texture formats. BUG=angleproject:2313 Change-Id: Ic1e679164d82f3024bb6842c9af2716aa10feb76 Reviewed-on: https://chromium-review.googlesource.com/900042 Commit-Queue: Geoff Lang <geofflang@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Yunchao He 9550c603 2018-02-13T14:47:05 Code refactoring for end2end tests. This change: 1) uses the new style ANGLE_SKIP_TEST_IF to skip tests. 2) replaces compile-time definition for OSX to skip tests by run-time function IsOSX() to skip tests, in order to align with ANGLE_SKIP_TEST_IF. 3) fixes a couple of typos. BUG=angleproject:2005 Change-Id: I5af77d82257536b9eb79e26afa502f5b91ff6d31 Reviewed-on: https://chromium-review.googlesource.com/915861 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Brandon Jones 92a1459f 2017-11-16T10:01:08 Add Regression Test for D3D11 Alpha Passthrough As a follow up to commit "8d6af08 Use dedicated ALPHA passthrough shader", this change adds a regression test that verifies RGB channels are set to zero when performing an ALPHA copy. BUG=angleproject:2239 Change-Id: Icc08deb523c388a0f2cbdcadd1eec69a97fbe136 Reviewed-on: https://chromium-review.googlesource.com/774579 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Geoff Lang 63458a3e 2017-10-30T15:16:53 CopyTextureCHROMIUM: Validate the texture target enums first. INVALID_ENUM should be generated before any INVALID_VALUE errors based on the texture state. BUG=angleproject:1932 Change-Id: If74440602d56b1a86fa24ff87c38d2b0dec2bfb2 Reviewed-on: https://chromium-review.googlesource.com/744448 Commit-Queue: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Bryan Bernhart (Intel Americas Inc) 2a35741b 2017-09-05T10:42:47 WebGLCompatibility: Disable ES format extensions by default. Prevents format validation errors with WebGL context. BUG=angleproject:1523 Change-Id: Iddc525eeb467de0139e166dad0893f3bea3ef35f Reviewed-on: https://chromium-review.googlesource.com/650807 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Jamie Madill 3dfaf265 2017-08-18T12:32:14 Add a Linux/Intel suppression for CopyTextureTestES3.ES3UintFormats. BUG=chromium:756087 Change-Id: If7d318d58ce46b52a810b1a96fcdbff57a787f86 Reviewed-on: https://chromium-review.googlesource.com/621408 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill e59000c3 2017-08-16T11:13:49 Skip CopyTextureTestES3.ES3FloatFormats in Win/Intel/OpenGL. Possibly due to a driver bug. BUG=angleproject:1932 Change-Id: I8b10457681c5635b89f898aab09fa244b3bf7d9c Reviewed-on: https://chromium-review.googlesource.com/616817 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Geoff Lang aadc8f37 2017-08-11T17:34:44 Implement the CPU fallback for CopyTextureCHROMIUM on OpenGL. BUG=angleproject:1932 Change-Id: Iabc1a3e361d66313dc16bf19b392402b7836f8a5 Reviewed-on: https://chromium-review.googlesource.com/612562 Commit-Queue: Geoff Lang <geofflang@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Geoff Lang 47bb4933 2017-08-03T11:52:13 Implement CopyTexture functions for uint texture formats. BUG=angleproject:1932 Change-Id: I6474237cbb82b59a0bd40c1b9b9e2455952d3755 Reviewed-on: https://chromium-review.googlesource.com/600510 Commit-Queue: Geoff Lang <geofflang@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Brandon Jones 340b7b8b 2017-06-26T13:02:31 Add support for new internalformats in copyTextureCHROMIUM This adds support in blit11::copyTexture for LUMA, LUMA_ALPHA, and ALPHA formats as destinations. Added is handling for each case to match up the corresponding shader. This required new premultiply and unmultiply D3D11 shaders for some cases. Changed copyTextureCHROMIUM validation to allow new formats. Tests have been created to demonstrate using copyTextureCHROMIUM with the new formats with default parameters, as well as with the unpackPremultiply and unpackUnmultiply parameters. BUG=:angleproject:2101 Change-Id: Id8cd303a46fe70710bc18172fc938552a6e4cfaf
Geoff Lang 88318b44 2017-07-05T14:39:01 Fall back to CPU copies for srgb textures in copy_texture_CHROMIUM. The copied data is not supposed to have sRGB conversions applied to it when written to the destination texture but an sRGB SRV is used by Blit11. Instead of creating multiple sRGB and non-sRGB SRVs for textures, simply fall back to the CPU copy path for this format for now. Clip color channels that should not exist in the destination texture formats in Image11::CopyImage. This works around issues with texture formats with emulated channels. TEST=conformance2/textures/image_bitmap_from_canvas/tex-2d-srgb8-rgb-unsigned_byte TEST=conformance2/textures/image_bitmap_from_canvas/tex-2d-srgb8_alpha8-rgba-unsigned_byte BUG=angleproject:1932 Change-Id: Ieeda3569f80d016fda781e7eb498acd3b97568d0 Reviewed-on: https://chromium-review.googlesource.com/559857 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Geoff Lang <geofflang@chromium.org>
Geoff Lang 165dcf15 2017-06-07T15:05:14 Allow CHROMIUM_copy_texture to copy to non-zero mips. Fix some errors in the GL backend related to source and destination mipmap targets. BUG=angleproject:1356 Change-Id: I030529c8626f3bc30dbb4f7f859a02ba56e315e3 Reviewed-on: https://chromium-review.googlesource.com/527653 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Geoff Lang <geofflang@chromium.org>
Geoff Lang 80616218 2017-05-17T15:40:03 Support CHROMIUM_copy_texture for all formats on D3D11. Adds a CPU readback and conversion path when the destination texture is not renderable. BUG=angleproject:1932 Change-Id: I71461ca991dc10dd636ff38e1ae20db2be0f8d63 Reviewed-on: https://chromium-review.googlesource.com/508308 Commit-Queue: Geoff Lang <geofflang@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Geoff Lang 4f0e003e 2017-05-01T16:04:35 Implement the new formats/features of the ES3 CHROMIUM_copy_texture. Some non-renderable texture formats remain unimplemented. BUG=angleproject:1932 Change-Id: Id206432d6e26a70fc0e84478a4e43e9eefadcf2f Reviewed-on: https://chromium-review.googlesource.com/491948 Commit-Queue: Geoff Lang <geofflang@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Geoff Lang fc72a073 2017-03-24T14:52:39 Update CHROMIUM_copy_texture entry points to the ES3 versions. BUG=angleproject:1932 Change-Id: Ia45f8522320af1d747fbfb57468e8b881b033543 Reviewed-on: https://chromium-review.googlesource.com/459101 Reviewed-by: Geoff Lang <geofflang@chromium.org>
Corentin Wallez 133a2ecb 2016-11-17T16:28:03 Implement CHROMIUM_copy_texture for OpenGL. This also makes BlitGL work correctly on OpenGL ES (provided vertex arrays are available) BUG=angleproject:1356 Change-Id: Icb7cef35bebfe6672220aa0b312ab89187dbf585 Reviewed-on: https://chromium-review.googlesource.com/412452 Commit-Queue: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Geoff Lang 97073d12 2016-04-20T10:42:34 Implement CHROMIUM_copy_texture for D3D11. BUG=angleproject:1356 Change-Id: I70246762411dbeeb3e291e317854139a68d80070 Reviewed-on: https://chromium-review.googlesource.com/339434 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Geoff Lang <geofflang@chromium.org>