src/tests/gl_tests/BlitFramebufferANGLETest.cpp


Log

Author Commit Date CI Message
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>
Olli Etuaho a20af6d7 2017-09-18T13:32:29 Use C++11 raw string literals instead of SHADER_SOURCE macro This is better in many ways: 1. It doesn't confuse clang format 2. \n doesn't need to be included after preprocessor directives like the version directive. 3. It's using built-in functionality instead of something custom. Raw string literals should be the preferred way to include shader source in C++ files going forward. BUG=angleproject:2157 TEST=angle_end2end_tests Change-Id: I8b236a6e2d5c25d920297e5bc5b5b143eddeba1f Reviewed-on: https://chromium-review.googlesource.com/671046 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
Jamie Madill 4dac6798 2017-09-12T22:22:35 Lift AMD blit suppressions. BUG=angleproject:1474 Change-Id: Ie80385a9c89453694f1411e49dba7b298c3a1a6c Reviewed-on: https://chromium-review.googlesource.com/664478 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Kenneth Russell 6938285b 2017-07-21T16:38:44 Fix BlitFramebuffer validation for BGRA sources and targets. It is legal to blit between GL_RGBA8 and GL_BGRA8 sources and destinations when resolving multisampled renderbuffers. Expand BlitFramebuffer's validation to handle this case. Query GL_MAX_VERTEX_OUTPUT_COMPONENTS on the Core Profile to work around an error generated on macOS when querying GL_MAX_VARYING_COMPONENTS. Expand the BlitFramebuffer tests to cover these cases and start running them on the OpenGL backend. Fix detectition of multisampled D3D11 rendertargets when the sample count is 1. BUG=angleproject:891 Change-Id: Ief5531756651caa66f612e647d3d5c05c8c51ff5 Reviewed-on: https://chromium-review.googlesource.com/587459 Reviewed-by: Kenneth Russell <kbr@chromium.org>
Corentin Wallez 26cf35a8 2017-07-26T11:01:02 Revert "Fix BlitFramebuffer validation for BGRA sources and targets." This reverts commit 17d270311efcd8c72f251a67e726518278e81c26. Reason for revert: - New test fails on NVIDIA and AMD on Windows when using the backbuffer FAST_PATH. - SetUp code ASSERT_GL_NO_ERROR (line 269) but a GL error happens on all Windows and Linux Intel OpenGL. Original change's description: > Fix BlitFramebuffer validation for BGRA sources and targets. > > It is legal to blit between GL_RGBA8 and GL_BGRA8 sources and > destinations when resolving multisampled renderbuffers. Expand > BlitFramebuffer's validation to handle this case. > > Work around a bug in macOS' OpenGL driver querying the number of > samples for GL_BGRA8. > > Query GL_MAX_VERTEX_OUTPUT_COMPONENTS on the Core Profile to work > around an error generated on macOS when querying > GL_MAX_VARYING_COMPONENTS. > > Expand the BlitFramebuffer tests to cover these cases and start > running them on the OpenGL backend. > > BUG=angleproject:891 > > Change-Id: I4829585d2b6428ce0bc7509c4734d33709a0930b > Reviewed-on: https://chromium-review.googlesource.com/582268 > Commit-Queue: Geoff Lang <geofflang@chromium.org> > Reviewed-by: Kenneth Russell <kbr@chromium.org> > Reviewed-by: Geoff Lang <geofflang@chromium.org> TBR=geofflang@chromium.org,kbr@chromium.org Change-Id: I220bc482194cf7fad5e7e732a6d043ce0d504d79 No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: angleproject:891 Reviewed-on: https://chromium-review.googlesource.com/586428 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Kenneth Russell 17d27031 2017-07-21T16:38:44 Fix BlitFramebuffer validation for BGRA sources and targets. It is legal to blit between GL_RGBA8 and GL_BGRA8 sources and destinations when resolving multisampled renderbuffers. Expand BlitFramebuffer's validation to handle this case. Work around a bug in macOS' OpenGL driver querying the number of samples for GL_BGRA8. Query GL_MAX_VERTEX_OUTPUT_COMPONENTS on the Core Profile to work around an error generated on macOS when querying GL_MAX_VARYING_COMPONENTS. Expand the BlitFramebuffer tests to cover these cases and start running them on the OpenGL backend. BUG=angleproject:891 Change-Id: I4829585d2b6428ce0bc7509c4734d33709a0930b Reviewed-on: https://chromium-review.googlesource.com/582268 Commit-Queue: Geoff Lang <geofflang@chromium.org> Reviewed-by: Kenneth Russell <kbr@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Geoff Lang c4e93668 2017-05-01T10:45:59 Update end2end tests to function without EXT_texture_storage. This also exposed an issue in our glTexSubImage2D validation where the sized format would be used for the texture support check when the unsized format was provided. The GL_ALPHA32F format is not valid unless EXT_texture_storage is present but using GL_ALPHA + GL_FLOAT is valid. BUG=angleproject:1958 Change-Id: Ice0b7549c39559990942176481c5175df17aaf92 Reviewed-on: https://chromium-review.googlesource.com/491246 Commit-Queue: Geoff Lang <geofflang@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
He Yunchao 66a41a28 2016-12-15T16:45:05 Generate errors when read buffers are missing in BlitFramebuffer. The corresponding gl_tests has been updated too. BUG=672719 Change-Id: Ief37bc397f7aa065bf99d6ebad0a1b50b1917dac Reviewed-on: https://chromium-review.googlesource.com/420469 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill 1200c41b 2016-08-16T14:09:14 Suppress two new AMD failures. These failures were exposed with the new R7 240 card. BUG=chromium:637037 Change-Id: I1fe5add2fc08d5c93e338250efb2af62712d0e53 Reviewed-on: https://chromium-review.googlesource.com/371318 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Kenneth Russell <kbr@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill 196ca36c 2016-07-12T10:54:04 D3D11: Implement multisample depth resolve. This uses a pretty slow path with readback to the CPU. It should be possible to use SV_Depth in HLSL to resolve without a readback, but that will be left for a future optimization. Enables the WebGL 2 tests gles3/fbomultisample and fboinvalidate/sub. BUG=angleproject:1246 Change-Id: Id67178b0f6374cf53e4e107428637546ecca4124 Reviewed-on: https://chromium-review.googlesource.com/359956 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill 78a9c733 2016-07-15T11:22:43 D3D11: Implement multisampled stencil resolve. This implements a fairly slow path with readback for stencil blits, and depth/stencil resolve. In a subsequent patch I'll implement the depth blits. BUG=angleproject:1246 Change-Id: I04151d1f49ca404d858172dff8286608eae29864 Reviewed-on: https://chromium-review.googlesource.com/359955 Reviewed-by: Geoff Lang <geofflang@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>
Corentin Wallez 322653bf 2015-06-17T18:33:56 Fix Chromium build of angle_end2end_tests BUG=angleproject:892 Change-Id: I9922046fc9e4d82d7034405f5952263f982c6529 Reviewed-on: https://chromium-review.googlesource.com/278159 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Kenneth Russell <kbr@chromium.org> Tested-by: Corentin Wallez <cwallez@chromium.org>
Corentin Wallez d3970de4 2015-05-14T11:07:48 Move ANGLETest back in test_utils, leaving a proxy header for Chromium BUG=angleproject:892 Change-Id: Ibd494813be87e996096077d6e208cc92461b8f49 Reviewed-on: https://chromium-review.googlesource.com/271154 Reviewed-by: Jamie Madill <jmadill@chromium.org> Tested-by: Corentin Wallez <cwallez@chromium.org>
Corentin Wallez ac3ab882 2015-05-12T13:31:28 Temporarily move back ANGLETest in end2end_tests This path needs to a Chrome change before it can change. BUG=angleproject:892 Change-Id: I549737383b9720a2e7d83ee5e3145d71716f04cb Reviewed-on: https://chromium-review.googlesource.com/270457 Reviewed-by: Jamie Madill <jmadill@chromium.org> Tested-by: Corentin Wallez <cwallez@chromium.org>
Corentin Wallez 9cb9583e 2015-05-11T10:21:48 Move end2end and standalone tests to gl_tests and egl_tests Also introduce a test_utils directory that contains helpers used for all types of tests. BUG=angleproject:892 Change-Id: I9e1bff895020ffd3a109162283971a290a1098bd Reviewed-on: https://chromium-review.googlesource.com/270198 Reviewed-by: Jamie Madill <jmadill@chromium.org> Tested-by: Corentin Wallez <cwallez@chromium.org>