src/tests/gl_tests/CopyTexImageTest.cpp


Log

Author Commit Date CI Message
Liza Burakova 69745720 2025-09-23T11:16:21 [WebGPU] Implement texture copy from cpu reads. This CL implements a slow path to copying from a texture that reads data from the CPU. This path is taken when the src and destination formats differ. Bug: angleproject:438268609 Change-Id: I5a81fbed5bbac68c48537d8c7a2fcc487c31e76e Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6847147 Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Matthew Denton <mpdenton@chromium.org> Auto-Submit: Liza Burakova <liza@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Shahbaz Youssefi 98915e44 2025-09-12T14:15:05 Vulkan: Fix blit src missing mip Bug: angleproject:433816259 Bug: angleproject:40644750 Change-Id: I50261279224dea8e37beff388207b927399d099a Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6944327 Reviewed-by: Cody Northrop <cnorthrop@google.com> Reviewed-by: Charlie Lao <cclao@google.com>
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>
Geoff Lang 86a8d11c 2025-08-11T16:45:39 Metal: Fix potential incorrect format used for texSubImage TextureMtl caches the most recent format used for a texture redefinition in mFormat. During subImage calls, this format may not be the same as the image being uploaded to. Pass ImageDefinitionMtl to these functions which reference mFormat, it contains the format of the image being updated. MacOS OpenGL is skipped because the driver generates errors in glCompressedTexImage2D. Bug: chromium:435683799 Change-Id: Idec6f71870c2d376cad3a5e3628b957009bdced9 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6838878 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Quyen Le <lehoangquyen@chromium.org> Commit-Queue: Geoff Lang <geofflang@chromium.org>
Liza Burakova 03068e0c 2025-08-20T17:36:22 [WebGPU] Implement direct copy for images. This CL implements CopyImage specifically in cases where the source is the same size and format as the destination. Bug: angleproject:438268609 Change-Id: Icf5f3685bb2f49874d996883c839515314f1c189 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6842317 Commit-Queue: Liza Burakova <liza@chromium.org> Reviewed-by: Matthew Denton <mpdenton@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Panfeng Hou a504b6a2 2024-11-25T15:59:05 Support GL_OES_required_internalformat Enable GL_OES_required_internalformat GLES extension. Bug: angleproject:364069034 Change-Id: Ia57548469abff189472aa20b13ca99179c45f2c0 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6038448 Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Panfeng Hou <panfeng.hou@arm.com>
Alexey Knyazev 9e8b104e 2024-10-14T00:00:00 Do not test OpenGL backend on iOS Added Metal platform to tests that require instantiation. Bug: angleproject:40050022 Bug: angleproject:42264029 Bug: angleproject:42266119 Bug: angleproject:42266226 Bug: angleproject:42266239 Bug: angleproject:42266249 Bug: angleproject:359136169 Fixed: angleproject:373478551 Change-Id: I915f09c7f24acce27bf0d489932645338ac3fbe8 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5932659 Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Alexey Knyazev <lexa.knyazev@gmail.com>
Alexey Knyazev a93476a1 2024-07-11T00:00:00 D3D11: Pass 3D slice index to Image11::copyWithoutConversion 3D slice range is passed in a D3D11_BOX structure for CopySubresourceRegion. Fixed: angleproject:352467349 Bug: angleproject:352496176 Change-Id: Ie96d9567cf73b0612bfb1cbd7fbacc6c0f01dec4 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5697425 Commit-Queue: Alexey Knyazev <lexa.knyazev@gmail.com> Reviewed-by: Kenneth Russell <kbr@chromium.org>
Alexey Knyazev 590010b6 2024-07-04T00:00:00 D3D11: Cleanup stale CopyTexImageTestES3 suppressions Bug: angleproject:42262446 Change-Id: Id49b380b4dbf22efc0637605bbf7a67f317e7247 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5691437 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Alexey Knyazev <lexa.knyazev@gmail.com>
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>
Geoff Lang e489dac0 2024-02-02T13:52:47 Allow BGRA -> RGBA for glCopyTex[Sub]Image The opposite RGBA->BGRA was already allowed for handling platform- specific default framebuffers. This allows the copying a IOSurface- backed framebuffers to RGBA textures. Bug: chromium:1523778 Change-Id: I124a4acc8c8fcdd1d3aae861d756d17022c4b4cc Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5254778 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Shahbaz Youssefi c70c329e 2024-01-31T15:59:19 Vulkan: Fix texture copy vs pre-rotation A minor error where the destination offsets were swapped based on source rotation. Bug: b/319336510 Change-Id: I5541f8d0bf0b7306b951d2601c8c27ffedb8470e Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5254238 Commit-Queue: Yuxin Hu <yuxinhu@google.com> Reviewed-by: Yuxin Hu <yuxinhu@google.com> Auto-Submit: Shahbaz Youssefi <syoussefi@chromium.org>
Shahbaz Youssefi b8ca8de4 2023-12-05T13:36:53 Vulkan: Don't crash when glCopyTexImage2D redefines itself The Vulkan backend marks a level being redefined as such before doing the copy. If a single-level texture was being redefined, it releases it so it can be immediately reallocated. If the source of the copy is the same texture, this causes a crash. This can be properly supported by using a temp image to do the copy, but that is not implemented in this change. Bug: chromium:1501798 Change-Id: I9dde99aa0b88bc7d5f582ff15772f70b36f424e0 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5089150 Reviewed-by: Charlie Lao <cclao@google.com> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Shahbaz Youssefi 8c341cfd 2023-10-04T12:49:59 Vulkan: Fix blits involving 3D images The layer vs depth value involved with 3D images when calling vkCmdBlitImage is fixed in this change. However, that brought to light that the combination of VUID-vkCmdBlitImage-srcImage-00240 and VUID-vkCmdBlitImage-dstImage-00252 make it impossible to blit between 3D and 2D array images, which is likely a spec oversight. This change makes 3D<->2DArray blits fall back to draw-based blit. This in turn exposed the fact that 3D images as src were not handled in BlitResolve.frag. A new Blit3DSrc.frag shader is added which shares code with BlitResolve.frag to implement this. This is a separate shader to avoid creating unnecessary and invalid combinations of shaders. VK_EXT_image_2d_view_of_3d could have been used to avoid this new shader, but that is not ubiquitous. Bug: angleproject:7291 Bug: dawn:1962 Change-Id: I6a96162f95829304b4731d43208d9d054f538105 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4911800 Reviewed-by: Charlie Lao <cclao@google.com> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Yuxin Hu <yuxinhu@google.com>
Alexey Knyazev 5897d6f5 2022-07-07T00:00:00 GL: Add emulateCopyTexImage2D workaround Using texImage2D + copyTexSubImage2D seems to be more stable than using copyTexImage2D directly. Added missing HALF_FLOAT fix to the code path that requires target texture initialization. Fixed target texture dimensions when initialization is not required. Fixes Apple GPU crashes in: * CopyTexImageTest.DeleteAfterCopyingToTextures * conformance/textures/misc/texture-copying-and-deletion.html * conformance/textures/misc/texture-copying-feedback-loops.html Bug: angleproject:5038 Bug: angleproject:5360 Bug: chromium:1130703 Change-Id: I5cce087983601e768902f01b3462ec2106e2500a Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3749921 Commit-Queue: Kenneth Russell <kbr@chromium.org> Reviewed-by: Gregg Tavares <gman@chromium.org> Reviewed-by: Kenneth Russell <kbr@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>
Eddie Hatfield 707323c1 2022-06-21T18:53:05 Miscellaneous C++17 refactoring Bug: angleproject:6747 Change-Id: I792ba74e03145ff6c3cc97d4bff6327ab275a2c7 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3719001 Commit-Queue: Eddie Hatfield <eddiehatfield@google.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Cody Northrop <cnorthrop@google.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>
Shahbaz Youssefi 797e627e 2022-04-08T22:49:51 Autogenerate list of features as enum The WithX() and WithNoX() helpers are removed and replaced with enable() and disable() member functions that take the name of the feature (as a Feature::X enum constant). This has two benefits: - Adding tests that override a feature no longer requires additional helper functions to be written. - There's no mistaking the feature name. This change doesn't yet fix the main issue in anglebug.com/6435, but does fix the following helpers using an old feature name (so they were ineffective): - WithMetalForcedBufferGPUStorage - WithNoVulkanViewportFlip A follow up would remove the old way of overriding features in tests and replaces them with the new way. Bug: angleproject:6435 Change-Id: Ida02b26ec72bc40d7a8938c76a93815bb903ca05 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3580982 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Yuly Novikov <ynovikov@chromium.org> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Sergey Ulanov 2ab8f48f 2022-02-04T08:23:09 Allow glCopyTexImage2D from BGRX and RGBX to GL_LUMINANCE glCopyTexImage2D was failing with GL_INVALID_OPERATION when copying from GL_RGBX8_ANGLE buffer to GL_LUMINANCE texture, while it should be supported. Also updated validator to allow copying from RGBX & BGRX to GL_RED_EXT, GL_RG_EXT. Bug: chromium:1269826 Change-Id: I865dcdd46921730968995822d71ba34b39e49262 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3439129 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>
Nico Weber 90403672 2021-10-08T09:50:47 Fix Wbitwise-instead-of-logical warnings `a && b` only evaluates b if a is true. `a & b` always evaluates both a and b. If a and b are of type bool, `&&` is usually what you want, so clang now warns on `&` where both arguments are of type bool. From what I can tell, in ANGLE it wasn't important if we evaluate both branches or not in the places where this fired, so I went with `&&` everywhere. Bug: chromium:1255745 Change-Id: I7ac6a12c37f28a872de1fe9b9b96abf43e39b21c Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3212889 Commit-Queue: Nico Weber <thakis@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Jonah Ryan-Davis 212f4592 2021-09-22T12:02:47 Enable direct-to-metal backend by default We are switching over to Apple's direct-to-metal backend instead of generating SPIRV in the metal backend. This CL enables the direct-to-metal generation by default, but the SPIRV backend is still accessible by overriding the feature directMetalGeneration. This CL comes with a change in test expectations to catch new failures and clean up newly passing tests. Bug: angleproject:6080 Change-Id: I4b10ad93c641b88857079a08fb45d3dc575d71f1 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3175664 Reviewed-by: Gregg Tavares <gman@chromium.org> Reviewed-by: Kenneth Russell <kbr@chromium.org> Commit-Queue: Jonah Ryan-Davis <jonahr@google.com>
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>
James Darpinian ebf00703 2020-12-29T16:25:54 angle_end2end_tests passes on iOS! Miscellaneous test skips and fixes for iOS. Bug: angleproject:5417 Bug: angleproject:5491 Change-Id: Id0785e6243949fc756e4d7923dbbe77a411052f3 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2606656 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Kenneth Russell <kbr@chromium.org> Commit-Queue: James Darpinian <jdarpinian@chromium.org>
Shahbaz Youssefi 56330564 2020-12-10T00:46:04 Vulkan: Support layered framebuffers This feature is introduced by geometry shaders, where all the layers of a texture can be attached to a framebuffer. The geometry shader would use gl_Layer to decide which layer the primitive should be rendered to. Bug: angleproject:3571 Change-Id: Ib2ae8e227b226295f9e2f62f6b230839070bc95c Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2582711 Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Tim Van Patten <timvp@google.com>
Kai Ninomiya bacb8dfc 2020-11-17T11:31:49 Add TODOs for Apple DTK skips; update bug urls Bug: angleproject:5360 Change-Id: Ibad5be256f08c893caebd6fa268668b966556d13 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2544907 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Kai Ninomiya e0780931 2020-10-08T17:57:47 Suppress gl_test failures on Mac ARM64 (Apple DTK) BuiltinVariableFragDepthClampingFloatRBOTest.Below1/ES3_OpenGL CopyTexImageTest.DeleteAfterCopyingToTextures/ES2_OpenGL GLSLTest.MaxVaryingVec2Arrays/ES2_Metal GLSLTest.MaxVaryingVec3ArrayAndOneFloatArray/ES2_Metal GLSLTest.MoreNestedCompoundStructsWithSamplersAsFunctionArg/ES2_OpenGL GLSLTest.NestedCompoundStructsWithSamplersAsFunctionArg/ES2_OpenGL GLSLTest.NestedStructsWithSamplersAsFunctionArg/ES2_OpenGL GLSLTest.NestedStructsWithSamplersAsFunctionArg/ES3_OpenGL MipmapTestES3.BaseLevelTextureBug/ES3_OpenGL MipmapTestES3.GenerateMipmapBaseLevel/ES3_OpenGL MipmapTestES3.GenerateMipmapCubeBaseLevel/ES3_OpenGL MipmapTestES3.GenerateMipmapMaxLevel/ES3_OpenGL MipmapTestES3.GenerateMipmapPreservesOutOfRangeMips/ES3_OpenGL OcclusionQueriesTest.MultiQueries/ES2_Metal Texture2DBaseMaxTestES3.GenerateMipmapAfterRedefineAndRebase/ES3_OpenGL Texture2DFloatTestES2.TextureFloatLinearLegacyTest/ES2_Metal Texture2DFloatTestES2.TextureFloatLinearLegacyTest/ES2_OpenGL Texture2DFloatTestES2.TextureFloatLinearTest/ES2_Metal Texture2DFloatTestES2.TextureFloatLinearTest/ES2_OpenGL Texture2DFloatTestES3.TextureFloatLinearLegacyTest/ES3_OpenGL Texture2DFloatTestES3.TextureFloatLinearTest/ES3_OpenGL TimerQueriesTest.TimeElapsed/ES3_OpenGL TimerQueriesTest.TimeElapsedMulticontextTest/ES3_OpenGL WebGLCompatibilityTest.TextureCopyingFeedbackLoops/ES2_OpenGL WebGLCompatibilityTest.TextureCopyingFeedbackLoops/ES3_OpenGL Bug: chromium:1132295 Change-Id: If64dc67275063c8046dbc941d92de273fbc226e5 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2461674 Commit-Queue: Kai Ninomiya <kainino@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Shahbaz Youssefi a0d048a4 2020-08-27T12:03:02 Vulkan: Fool-proof usage of GL and VK level indices Using boxed types, this change allows the compiler to catch errors when a level index in one space (e.g. GL) is mistakenly used in another space (e.g. VK). This change uncovered a number of bugs due to such mistakes which are fixed. Mistakes are still possible when the index is explicitly extracted, for example to be given to a Vulkan command, or when it's created, for example when retrieved from gl::ImageIndex::getLevelIndex. Future work can include using gl::LevelIndex in gl::ImageIndex directly to alleviate the latter at least. Bug: angleproject:4880 Change-Id: I6427c68c3bc096f771402f51c8554d8171758aa9 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2380232 Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Tim Van Patten <timvp@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Charlie Lao <cclao@google.com>
Le Hoang Quyen acda9dde 2020-08-08T18:36:57 Metal: Implement GL_OES_texture_3D Bug: angleproject:2634 Change-Id: I8c46493ac28fe1bbfdb29ee3a60b23076bbc4c0c Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2336119 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Jonah Ryan-Davis <jonahr@google.com>
Shahbaz Youssefi dcc56215 2020-07-19T01:12:09 Vulkan: Implement GL_EXT_multisampled_render_to_texture This change allows the use of resolve attachments in the Vulkan backend. GL_EXT_multisampled_render_to_texture is implemented using this feature. The infrastructure for specifying resolve attachments is designed with eventual support for GL_EXT_multisampled_render_to_texture2 in mind as well as optimizations to glBlitFramebuffer() and multisampled backbuffers. Proper support for glRenderbufferStorageMultisampledEXT is still missing from this change. All tests use this for the depth/stencil attachment and don't read back the data. Currently, the depth/stencil attachment is created as a normal multisampled image. Bug: angleproject:4836 Change-Id: I110a7f63312ae61a657b6094adf7d97c92bd5843 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2304170 Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Tim Van Patten <timvp@google.com>
Ian Elliott 28300e6f 2020-06-30T10:41:27 Vulkan: Fix off-by-1 180/270-rotated CopyTexImage The rotation calculations are a little different for this code (that uses a special shader) than for other pre-rotation cases. I also modified the CopyTexImageTestES3.2DArraySubImage test to make future bugs a little easier to diagnose. Test: Test: angle_end2end_tests --gtest_filter=*CopyTexImageTestES3.2DArraySubImage*Vulkan* Test: Test: angle_end2end_tests --gtest_filter=*WebGLReadOutsideFramebufferTest.CopyTexSubImage2D*Vulkan* Bug: b/158245571 Change-Id: I497ec541cae5cd4085c3e9d596ee20943f5510f9 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2275733 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Ian Elliott <ianelliott@google.com>
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 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>
James Darpinian 336e8915 2020-05-29T16:09:47 Workaround broken copyTexImage2D on iOS Use BlitGL to reimplement copyTex[Sub]Image2D on iOS. Bug: angleproject:4674 Change-Id: Ie3018d6d33da57797162922410f76557124df4b6 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2222718 Commit-Queue: James Darpinian <jdarpinian@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Amy Liu 572ee7b9 2020-04-26T13:58:22 Vulkan: Fix texture copy from texture3d to texture2d or cubemap In vulkan spec, if srcImage or dstImage parameters are of VkImageType VK_IMAGE_TYPE_3D, the baseArrayLayer and layerCount members of the corresponding subresource must be 0 and 1. Bug: angleproject:4553 Change-Id: Iabdc9708c86606c0d78c095c9d44827951264180 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2166863 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Kenneth Russell 7a37d3ac 2020-01-05T13:52:03 Work around Intel driver bug with CopyTex{Sub}Image2D/DeleteTextures. Dependencies seem to be incorrectly tracked in some Intel OpenGL drivers (on macOS specifically), causing crashes in glDeleteTextures if a GL command buffer is being constructed where those textures are destinations of CopyTexImage2D/CopyTexSubImage2D. Work around this bug by flushing before texture deletion if CopyTex{Sub}Image have been called recently. The tracking is only done on a per-context rather than a per-device basis, but seems sufficient to work around the problem as identified. Tested both with new ANGLE test on affected hardware, and in WebKit's ANGLE backend for WebGL. Works around the crash reported in https://bugs.webkit.org/show_bug.cgi?id=205707 . Bug: angleproject:4267 Change-Id: I2266a5590759f6a3f19080def08710ef4b66d463 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1987932 Commit-Queue: Kenneth Russell <kbr@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Le Hoang Quyen b6148c3a 2019-11-21T10:13:44 Metal: re-enable end2end tests Bug: angleproject:4157 Change-Id: Ia7e29c32696c84556e9ea527fc48b086b1bc4766 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1940007 Commit-Queue: Geoff Lang <geofflang@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Le Hoang Quyen 6fcc0bb8 2019-11-21T01:19:40 Metal: Re-add end2end test configs (running test is still disabled) angle_test_instantiate.cpp & angle_test_instantiate_apple.mm: - Disabled metal platform selection on pre-10.13 mac devices for Bug: angleproject:4153 Explicitly disabled tests on metal: - DifferentStencilMasksTest.DrawWithDifferentMask - PointSpritesTest.PointSizeAboveMaxIsClamped - WebGL2ReadOutsideFramebufferTest.CopyTexSubImage3D This requires the crash fix in http://crrev.com/c/1924101 Bug: angleproject:4153 Bug: angleproject:2634 Change-Id: I95046d731a8ba7414cf1a1f4b6f2940282725872 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1926389 Commit-Queue: Jonah Ryan-Davis <jonahr@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Jonah Ryan-Davis <jonahr@google.com>
Courtney Goeltzenleuchter 8392b118 2019-11-20T16:57:08 Revert "Metal: Enable end2end tests." This reverts commit 0bb42e091b77f174632434a05789b2ce632bd902. Reason for revert: https://bugs.chromium.org/p/chromium/issues/detail?id=1026633 Causing failures on Mac bots. Original change's description: > Metal: Enable end2end tests. > > Explicitly disabled tests: > - DifferentStencilMasksTest.DrawWithDifferentMask > - PointSpritesTest.PointSizeAboveMaxIsClamped > - WebGL2ReadOutsideFramebufferTest.CopyTexSubImage3D > > Bug: angleproject:2634 > Change-Id: I76ab450c06d0e1be1e7469a8b9c6497684c3ca54 > Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1906607 > Commit-Queue: Jamie Madill <jmadill@chromium.org> > Reviewed-by: Jamie Madill <jmadill@chromium.org> > Reviewed-by: Geoff Lang <geofflang@chromium.org> TBR=geofflang@chromium.org,jonahr@google.com,jmadill@chromium.org,le.hoang.q@gmail.com Change-Id: Iaa4264834170a49c274f186d3d74f57714c84b32 No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: angleproject:2634 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1926378 Reviewed-by: Courtney Goeltzenleuchter <courtneygo@google.com> Commit-Queue: Courtney Goeltzenleuchter <courtneygo@google.com>
Le Hoang Quyen 0bb42e09 2019-11-19T23:04:00 Metal: Enable end2end tests. Explicitly disabled tests: - DifferentStencilMasksTest.DrawWithDifferentMask - PointSpritesTest.PointSizeAboveMaxIsClamped - WebGL2ReadOutsideFramebufferTest.CopyTexSubImage3D Bug: angleproject:2634 Change-Id: I76ab450c06d0e1be1e7469a8b9c6497684c3ca54 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1906607 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
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>
Cody Northrop 4a276034 2019-09-30T16:31:00 Vulkan: Narrow skip lists for 3D and 2DArray tests to Compute Narrow these skips to just compute shader failures, which we will tackle as part of the next sprint. Bug: 3188 Bug: 3189 Bug: 3810 Test: CopyTexImageTestES3.2DArraySubImage Change-Id: I74c259712e5f3c9296bd3a6241d1da8f1668ca36 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1832881 Commit-Queue: Ian Elliott <ianelliott@google.com> Reviewed-by: Courtney Goeltzenleuchter <courtneygo@google.com>
Tim Van Patten 99cffe5d 2019-08-01T17:10:50 Vulkan: Fix glCopyTexSubImage3D() Update glCopyTexSubImage3D() to account for the requirements necessary for VK_IMAGE_TYPE_3D. Bug: angleproject:3765 Test: KHR-GLES2.texture_3d.copy_sub_image.rgba8 Test: angle_end2end_tests CopyTexImageTestES3 Change-Id: Ife3d768323d0cfe2a53e5ae4c47a0747d65981bc Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1730637 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Tim Van Patten <timvp@google.com>
Shahbaz Youssefi c68e7cbc 2019-07-25T11:28:07 Vulkan: Fix image copy flipping The draw framebuffer was consulted for flipping instead of the read framebuffer. Revealed a bug with copy-with-transfer not taking source render target's level/layer into account. This test was failing on Linux/Intel because there the framebuffer is not flipped, so the transfer path was taken. Bug: angleproject:2954 Bug: angleproject:3723 Change-Id: If95bf97b8e0536302ed39999be47bf904283c9e4 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1718784 Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Mohan Maiya <m.maiya@samsung.com> Reviewed-by: Jamie Madill <jmadill@chromium.org>
James Dong a7d8ada2 2019-06-28T11:10:41 Test out-of-bounds writes in glCopyTexSubImage2D Adds a test for out-of-bounds writes resulting from clipping the copy area to the size of the source framebuffer causing the destination area to be out of bounds. This causes a GL_INVALID_VALUE error according to the spec. Bug: angleproject:3355 Change-Id: I39638daa9b0c03cc82a6dbf6cabd0027e32a8ea8 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1682111 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: 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>
Jamie Madill ddc4d33a 2019-05-01T15:11:46 Remove several underused platform configs. * Removes D3D11 Warp and Reference configs from tests. * Removes several permutations of OpenGL back-end specific configs. * Removes FL 9_3 since it is no longer supported. * Removes present path "Copy" since it's redundant with normal D3D11. Reduces number of configs from over 60 to 25. Bug: angleproject:3393 Change-Id: Ia5a23de3c4865b17ee50673a4066757b901a4b5a Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1574675 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Yuly Novikov <ynovikov@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Jamie Madill e4458b7b 2019-04-08T16:26:50 Fix glCopyTexSubImage3D. Two bugs were present in our implementation. We were using the y offset for z in ensureSubImageInitialized. And for our D3D back-end we were potentially reading from the wrong image index. Bug: chromium:947342 Change-Id: If39671a911e08fcc641b9ba6f5910e3a2c16eb5d Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1558671 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Jonah Ryan-Davis <jonahr@google.com>
Shahbaz Youssefi d84728e0 2019-02-01T16:28:55 Vulkan: Fix copySubImage to non-cube-complete images. When copying to a non-cube-complete level of a texture we would fail because we would try to get the base level's current format. Instead we can get the format of the level that is being copied to. Bug: angleproject:2911 Change-Id: Ib6a5c5cef67ad9c880c1b76ea71ed9317eb20c97 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1483951 Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
Shahbaz Youssefi af4cef51 2018-12-28T16:56:47 Improve CopyTexImageTest The test is enhanced to perform the copy multiple times. Initially, the copy creates a new texture from a 16x16 framebuffer. Then, a copy is made from another 16x16 framebuffer (which should not trigger the recreation of the texture). Finally, a copy is made from a 32x32 framebuffer (which should trigger the recreation of the texture). Bug: angleproject:2958 Change-Id: Idc934d6f3d6312a2122d079309a4c2ae2608ba7f Reviewed-on: https://chromium-review.googlesource.com/c/1392388 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: 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>
Luc Ferron f299a378 2018-05-14T14:44:54 Vulkan: Implement copyImage and enable all tests for it Bug: angleproject:2500 Change-Id: I9066861ed4db0330754b32995ed82c658d66a590 Reviewed-on: https://chromium-review.googlesource.com/1058034 Commit-Queue: Luc Ferron <lucferron@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Yunchao He 8e5ba8bb 2018-02-05T17:52:27 Clean up end2end tests for Intel Linux platform. Removed tests can pass on Intel Linux Desktop (Intel KabyLake, Ubuntu 17.04) with system default mesa and latest upstream mesa. BUG=angleproject:2205 BUG=chromium:680631 Change-Id: Ie3f0f34b9708a7dab81f66d9ec83a469658deee7 Reviewed-on: https://chromium-review.googlesource.com/901382 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Frank Henigman 9e3bd310 2017-05-17T22:41:49 Enable CopyTex(Sub)Image default FB on Mesa/GLX. Allow CopyTexImageTest.SubDefaultFramebuffer and CopyTexImageTest.DefaultFramebuffer to work with Mesa and GLX back end by doing a clear before reading the framebuffer. BUG=angleproject:2027 Change-Id: Ibb10369e3f5aceb60511fbed1d67a28132734b29 Reviewed-on: https://chromium-review.googlesource.com/507952 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Corentin Wallez 07843cd6 2017-05-15T15:24:53 Suppress default FBO CopyTexImage failure on Linux Intel BUG=angleproject:2027 Change-Id: I337303c9f673558ed75826e96fc2cd75f6ec1441 Reviewed-on: https://chromium-review.googlesource.com/506070 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Frank Henigman cbd14085 2017-05-02T18:26:34 Test CopyTex(Sub)Image on default framebuffer. Add end2end tests that attempt CopyTexImage2D and CopyTexSubImage2D from the default framebuffer. BUG=angleproject:2027 Change-Id: Ic16527a0665317fe7d08d8204d1bd3f6309b0343 Reviewed-on: https://chromium-review.googlesource.com/494266 Commit-Queue: Frank Henigman <fjhenigman@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Martin Radev 1fc7493e 2016-07-21T10:15:04 Fix TearDown incorrect order in ReadPixelsTest The ANGLETest::TearDown() call was set at the beginning of the function where as it should be at the end since it destroys the context. The earlier version would not cause any crashes because the GL function calls would be ignored. BUG=angleproject:1445 TEST=angle_end2end_tests Change-Id: I187cb8fede1db4ef2bfc13ab850594c41e00b0b0 Reviewed-on: https://chromium-review.googlesource.com/362220 Reviewed-by: Olli Etuaho <oetuaho@nvidia.com> Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
Martin Radev 138064f5 2016-07-15T12:03:41 Improve glCopyTexSubImage2D and glReadPixels validation glCopyTexSubImage2d and glReadPixels should generate a GL_INVALID_OPERATION when GL_NONE is specified as a color buffer. There are two tests added which cover glCopyTexSubImage2D and glReadPixels. BUG=angleproject:1445 TEST=angle_end2end_tests Change-Id: I3ab1428aad7eee96ca2330909e2b6f765f539705 Reviewed-on: https://chromium-review.googlesource.com/360860 Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
Jamie Madill 52b09c2f 2016-04-11T14:12:31 Re-re-land "D3D11: Implement dirty bits for VertexArray11."" Translated attributes are now stored in the VertexArray11 in a cache, and only updated when dirty bits change. Currently dynamic attributes must be re-translated every call, so these are stored in a list and processed repeatedly. This skips doing a lot of the VertexDataManager work for vertex attributes that don't change between draw calls. Current value attributes, which correspond to disabled attributes that the program will pulls vertex data from, are owned by the Context, so these need to be handled outside of the VertexArray11. Further changes will be necessary to reduce the redundant work we do in the InputLayoutCache. We shouldn't need to re-check the cache if nothing relevant changed. This give about a 23% performance improvement on the draw call benchmark on my machine. Re-land with a fix for the start vertex offset. Re-re-land with a fix for using XFB with deleted buffers. BUG=angleproject:1327 Change-Id: I0fba49515375c149bbf54d933f8d1f747fbb8158 Reviewed-on: https://chromium-review.googlesource.com/338003 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill 518b9fab 2016-03-02T11:26:02 Suppress some failing end2end_tests on Intel. BUG=589851 Change-Id: Ia580cee30e6842aaddb4683025f425166f0f6120 Reviewed-on: https://chromium-review.googlesource.com/329735 Reviewed-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill f09bf669 2016-03-02T11:26:01 Revert "Suppress some failing end2end_tests on Intel." This reverts commit 7208f6994cf7d810c2226965362aad43d2a66f53. Still some failures on Intel, requires a slightly different solution. BUG=589851 Change-Id: I6ac6599249e9e0f6319c917e04734cd48ca9274d Reviewed-on: https://chromium-review.googlesource.com/329734 Reviewed-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill 7208f699 2016-02-29T10:47:35 Suppress some failing end2end_tests on Intel. BUG=589851 Change-Id: I91588014784a8a9b75389aeb596923458c30d80a Reviewed-on: https://chromium-review.googlesource.com/329427 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Austin Kinross 2a63b3f8 2016-02-08T12:29:08 Re-land "Implement EGL_experimental_present_path_angle" - Re-land with clang fix. This allows ANGLE to render directly onto a D3D swapchain in the correct orientation when using the D3D11 renderer. The trick is to add an extra uniform to each shader which takes either the value +1.0 or -1.0. When rendering to a texture, ANGLE sets this value to -1.0. When rendering to the default framebuffer, ANGLE sets this value to +1.0. ANGLE multiplies vertex positions by this value in the VS to invert rendering when appropriate. It also corrects other state (e.g. viewport/scissor rect) and shader built-in values (e.g. gl_FragCoord). This saves a substantial amount of GPU time and lowers power consumption. For example, the old method (where ANGLE renders all content onto an offscreen texture, and then copies/inverts this onto the swapchain at eglSwapBuffers() time) uses about 20% of the GPU each frame on a Lumia 630. Verification: + dEQP GL ES2 tests pass when "present path fast" is enabled + all ANGLE_end2end_tests pass when "present path fast" is enabled BUG=angleproject:1219 Change-Id: I56b339897828753a616d7bae837a2f354dba9c63 Reviewed-on: https://chromium-review.googlesource.com/326730 Tryjob-Request: Austin Kinross <aukinros@microsoft.com> Reviewed-by: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Jamie Madill d1c46228 2016-02-08T14:51:18 Revert "Implement EGL_experimental_present_path_angle" Compile failure on Clang/Win: The reason for reverting is: FAILED: ninja -t msvc -e environment.x86 -- "..\..\third_party/llvm-build/Release+Asserts/bin/clang-cl" -m32 /nologo /showIncludes /FC @obj\third_party\angle\src\tests\egl_tests\angle_end2end_tests.EGLPresentPathD3D11Test.obj.rsp /c ..\..\third_party\angle\src\tests\egl_tests\EGLPresentPathD3D11Test.cpp /Foobj\third_party\angle\src\tests\egl_tests\angle_end2end_tests.EGLPresentPathD3D11Test.obj /Fdobj\gpu\angle_end2end_tests.cc.pdb In file included from ..\..\third_party\angle\src\tests\egl_tests\EGLPresentPathD3D11Test.cpp:7: In file included from ..\..\third_party\angle\src\tests\test_utils/ANGLETest.h:13: ..\..\testing\gtest\include\gtest/gtest.h(1392,16) : error: comparison of integers of different signs: 'const int' and 'const unsigned int' [-Werror,-Wsign-compare] if (expected == actual) { ~~~~~~~~ ^ ~~~~~~ ..\..\testing\gtest\include\gtest/gtest.h(1422,12) : note: in instantiation of function template specialization 'testing::internal::CmpHelperEQ<int, unsigned int>' requested here return CmpHelperEQ(expected_expression, actual_expression, expected, ^ ..\..\third_party\angle\src\tests\egl_tests\EGLPresentPathD3D11Test.cpp(281,9) : note: in instantiation of function template specialization 'testing::internal::EqHelper<false>::Compare<int, unsigned int>' requested here ASSERT_EQ(mWindowWidth * 4, mappedSubresource.RowPitch); ^ ..\..\testing\gtest\include\gtest/gtest.h(1960,32) : note: expanded from macro 'ASSERT_EQ' # define ASSERT_EQ(val1, val2) GTEST_ASSERT_EQ(val1, val2) ^ ..\..\testing\gtest\include\gtest/gtest.h(1943,67) : note: expanded from macro 'GTEST_ASSERT_EQ' EqHelper<GTEST_IS_NULL_LITERAL_(expected)>::Compare, \ ^ BUG=angleproject:1219 This reverts commit 6b3c1db5170450bbc4946d8f18ba0d8619da43a0. Change-Id: Ia67ab82dd13295dc03235d57fa417c73f20a49e6 Reviewed-on: https://chromium-review.googlesource.com/326680 Reviewed-by: Jamie Madill <jmadill@chromium.org>
Austin Kinross 6b3c1db5 2015-12-18T14:01:46 Implement EGL_experimental_present_path_angle This allows ANGLE to render directly onto a D3D swapchain in the correct orientation when using the D3D11 renderer. The trick is to add an extra uniform to each shader which takes either the value +1.0 or -1.0. When rendering to a texture, ANGLE sets this value to -1.0. When rendering to the default framebuffer, ANGLE sets this value to +1.0. ANGLE multiplies vertex positions by this value in the VS to invert rendering when appropriate. It also corrects other state (e.g. viewport/scissor rect) and shader built-in values (e.g. gl_FragCoord). This saves a substantial amount of GPU time and lowers power consumption. For example, the old method (where ANGLE renders all content onto an offscreen texture, and then copies/inverts this onto the swapchain at eglSwapBuffers() time) uses about 20% of the GPU each frame on a Lumia 630. Verification: + dEQP GL ES2 tests pass when "present path fast" is enabled + all ANGLE_end2end_tests pass when "present path fast" is enabled BUG=angleproject:1219 Change-Id: Ib6eeea46bafa6ebce4adada0ae9db3a433b8fc4c Reviewed-on: https://chromium-review.googlesource.com/321360 Reviewed-by: Geoff Lang <geofflang@chromium.org> Tryjob-Request: Austin Kinross <aukinros@microsoft.com> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Geoff Lang <geofflang@chromium.org>
Geoff Lang e0cc2a4a 2016-01-20T10:58:17 Enable all angle_end2end_tests targeting OpenGL and OpenGL ES backends. Added failure supressions and filed bugs for failing tests. BUG=angleproject:1145 BUG=angleproject:1289 BUG=angleproject:1291 BUG=angleproject:1292 BUG=angleproject:1293 BUG=angleproject:1296 Change-Id: Ida78ba855500fe8a6ce6154d43ee01520330e3b1 Reviewed-on: https://chromium-review.googlesource.com/322695 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Tested-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Geoff Lang <geofflang@chromium.org>
Geoff Lang aa40feea 2015-09-01T09:35:45 Supress failures in RGB->L CopyTex[Sub]Image calls on Intel OpenGL. BUG=angleproject:1113 Change-Id: Ie16a28046546fad2ff1c1af35ca67c434b9f5216 Reviewed-on: https://chromium-review.googlesource.com/296481 Reviewed-by: Jamie Madill <jmadill@chromium.org> Tested-by: Geoff Lang <geofflang@chromium.org>
Geoff Lang 53b8aec0 2015-08-24T10:33:25 Work around deprecated LUMA formats in the core profile. Use R and RG textures with swizzle states to emulate them. A manual blit is required when calling CopyTex[Sub]Image from a RGB[A] framebuffer to an emulated L[A] texture so that the alpha channel ends up in the correct channel of the destination texture. Fixes the following tests when using the core profile: * conformance/extensions/oes-texture-float.html * conformance/extensions/oes-texture-half-float.html * conformance/textures/misc/tex-sub-image-2d.html * conformance/textures/misc/texture-formats-test.html * conformance/textures/misc/texture-npot.html BUG=angleproject:1113 Change-Id: If5540e66d9017596bd83d95ec3ede043cbcfe0d2 Reviewed-on: https://chromium-review.googlesource.com/293905 Reviewed-by: Jamie Madill <jmadill@chromium.org> Tested-by: Geoff Lang <geofflang@chromium.org>