src/tests/gl_tests/DrawBuffersTest.cpp


Log

Author Commit Date CI Message
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 d48d38ce 2019-08-09T11:03:35 Vulkan: Restore DrawBuffersTestES3.3DTextures on Intel Linux The test was failing due to ANGLE changes, not the target itself. It is unclear why this was the only one showing Vulkan validation errors, but it is passing now. I believe we were using recycled rendertarget views. Bug: anglebug:3784 Change-Id: I256165954c9933b211bcc04b94172e13fa5a3a70 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1745850 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Cody Northrop <cnorthrop@google.com>
Cody Northrop eb0479e2 2019-07-24T14:15:56 Vulkan: Texture 3D and 2DArray layers as framebuffer attachments Support glFramebufferTextureLayer by correctly handling layers from 3D and 2DArray textures. Modeled after CubeMap layers support. Bug: angleproject:3188 Bug: angleproject:3189 Change-Id: Ic73a6017134e9d2b49beed103487454397a97167 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1738436 Reviewed-by: Tim Van Patten <timvp@google.com> Commit-Queue: Cody Northrop <cnorthrop@google.com>
Yuly Novikov f857b501 2019-06-26T20:15:46 Skip end2end tests failing on Intel Ubuntu 19.04 Mesa 19.0.2 Failing: MaskedScissoredClearTest.Test/ES2_OpenGL_clear_cd MaskedScissoredClearTest.Test/ES2_OpenGL_clear_cd_mask_c MaskedScissoredClearTest.Test/ES2_OpenGL_clear_cds MaskedScissoredClearTest.Test/ES2_OpenGL_clear_cds_mask_c MaskedScissoredClearTest.Test/ES2_OpenGL_clear_cds_mask_cs MaskedScissoredClearTest.Test/ES2_OpenGL_clear_cds_mask_s MaskedScissoredClearTest.Test/ES2_OpenGL_clear_d MaskedScissoredClearTest.Test/ES2_OpenGL_clear_ds MaskedScissoredClearTest.Test/ES2_OpenGL_clear_ds_mask_s MaskedScissoredClearTest.Test/ES3_OpenGL_clear_cd MaskedScissoredClearTest.Test/ES3_OpenGL_clear_cd_mask_c MaskedScissoredClearTest.Test/ES3_OpenGL_clear_cds MaskedScissoredClearTest.Test/ES3_OpenGL_clear_cds_mask_c MaskedScissoredClearTest.Test/ES3_OpenGL_clear_cds_mask_cs MaskedScissoredClearTest.Test/ES3_OpenGL_clear_cds_mask_s MaskedScissoredClearTest.Test/ES3_OpenGL_clear_d MaskedScissoredClearTest.Test/ES3_OpenGL_clear_ds MaskedScissoredClearTest.Test/ES3_OpenGL_clear_ds_mask_s BlitFramebufferTest.MultisampleDepthClear/ES3_OpenGL DrawBuffersTest.FirstHalfNULL/ES2_Vulkan DrawBuffersTest.Gaps/ES2_Vulkan WebGLCompatibilityTest.DrawBuffers/ES2_Vulkan Crashing: Texture3DTestES3.DrawWithLevelsOutsideRangeWithInconsistentDimensions/ES3_OpenGL Bug: angleproject:2782, angleproject:3614, angleproject:3616 Change-Id: Ib9bc72d8fd050ba1db1269d5fb3b38e80636211e Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1679630 Reviewed-by: Yuly Novikov <ynovikov@chromium.org> Commit-Queue: Yuly Novikov <ynovikov@chromium.org>
shrekshao 7d798558 2019-05-13T13:40:09 Skip validating draw buffers when RASTERIZER_DISCARD is enabled. Bug: 962555, 962636 Change-Id: I4a22f83689252b7b7e51bbb3fc80e8f0d601a43f Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1610701 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Shrek Shao <shrekshao@google.com>
shrekshao 3dbe480b 2019-05-06T15:59:07 Validating draw buffers now also considers color mask settings It will always return true if all 4 channels of color mask are set to false. This should only apply to WebGL. Will fix this in a later patch. Bug: chromium:958374 Change-Id: I46befaf3ae1b63027dfbb309ac32724c616025d3 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1594629 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Shahbaz Youssefi 9fa248e1 2019-05-06T14:55:18 Vulkan: Implement EXT_draw_buffers In GLES, color attachments are referenced by their indices. These indices match between the API and GLSL. For example, if a shader has: layout(location=0) out color; layout(location=3) out roughness; Then GLES would bind and enable GL_COLOR_ATTACHMENT0 and GL_COLOR_ATTACHMENT3. In Vulkan, the framebuffer object and the corresponding renderpass define the color attachments, and they don't allow gaps in color attachments as GLES does. A render subpass creates the mapping between the color attachments as defined in the framebuffer and the attachments used by the shader (with possible gaps). This change packs the enabled GL color attachments for the sake of the framebuffer, and sets the subpass up in such a way that the shaders continue to use the same color output indices as GLES. In the example above, we have the attachment indices as follows: Status | GLES | GLSL | RenderPass | Subpass enabled 0 0 0 0 disabled 1 - VK_ATTACHMENT_UNUSED disabled 2 - VK_ATTACHMENT_UNUSED enabled 3 3 1 1 That is, the array of color attachments in the Vulkan framebuffer/renderpass is: [0] = GL color attachment 0 [1] = GL color attachment 3 And the array of color attachment references in the Vulkan render subpass is: [0] = 0 (index 0 of the renderpass attachment array) [1] = VK_ATTACHMENT_UNUSED [2] = VK_ATTACHMENT_UNUSED [3] = 1 (index 1 of the renderpass attachment array) Bug: angleproject:2394 Change-Id: Ib6cd2b60882643ea152986eee453270d09cd4aed Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1595442 Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@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 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>
shrekshao 15ce8227 2019-03-18T19:25:21 Fix error report when active color buffer has no fs output Also modify or remove some tests to sync up with the expected behavior stated in spec. Related to https://github.com/KhronosGroup/WebGL/pull/2780 If any draw buffer with an attachment does not have a defined fragment shader output, draws generate INVALID_OPERATION. Also remove Framebuffer masking for inactive outputs. This workaround is no longer necessary as the WebGL spec has changed. It also was never fully working and had bugs with certain orders of calls. Bug: angleproject:2872 Bug: chromium:927908 Bug: chromium:943538 Change-Id: I73715a6ab851ae3db7096f49ea0a9fdd6f576703 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1530018 Commit-Queue: Shrek Shao <shrekshao@google.com> Reviewed-by: Jonah Ryan-Davis <jonahr@google.com>
Jamie Madill f455f756 2019-03-20T20:49:44 Reuse angle_end2end_test windows and displays. This both speeds up test execution and cuts down on the number of new windows and displays created for a test config. This feature is only currently enabled for Windows NVIDIA and Intel. On every other config there were blocking issues that would need investigation. Several tests were manually flagged as needed new displays on each iteration to prevent test flakiness. This feature might fix the issues with Intel test flakiness that have been prominent on the ANGLE CQ. WGL configurations have also been removed from ANGLE tests. So this removes more of the code from ANGLETest.cpp. Bug: angleproject:3261 Change-Id: Ic2864d4806ad38e0eeaa3c0afcd54ae1c548090f Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1520995 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Yuly Novikov <ynovikov@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 3e92206b 2018-11-15T11:26:29 Allow querying of all draw buffer states on the default framebuffer. Because the default framebuffer isn't tied to a specific context, its drawbuffer state vector was only of size 1. It is still valid to query up to GL_MAX_DRAW_BUFFERS through so a special case is added when the drawbuffer is larger than the state vector. BUG=angleproject:2965 Change-Id: Ib49570df67e59e93932a7e916fe72f2e71c29939 Reviewed-on: https://chromium-review.googlesource.com/c/1337453 Reviewed-by: Yuly Novikov <ynovikov@chromium.org> Commit-Queue: Geoff Lang <geofflang@chromium.org>
Shahbaz Youssefi 0864a7ac 2018-11-07T15:50:15 Vulkan: Enable end2end tests for ES2_VULKAN everywhere Used a script to find test files that have more ES2_OPENGL() invocations than ES2_VULKAN(), and added ES2_VULKAN() to those. There may be false negatives. Bug: angleproject:1578 Change-Id: I938eb3571c909879e9276b355a9f1d324880f99a Reviewed-on: https://chromium-review.googlesource.com/c/1324350 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Jamie Madill 120b13f8 2018-10-09T07:58:39 Add more draw buffer related tests. Some of these are targeting our workaround for a mac bug. The bug was that the driver was somehow modifying output attachments that the program wasn't writing to. A new test shows a bug where we wouldn't re-sync the state properly after a clear. Also adds more pretty printing for GLColor. Bug: angleproject:2872 Change-Id: I5485893b5f1b269c5407678db27978a789f7acc6 Reviewed-on: https://chromium-review.googlesource.com/c/1269255 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Frank Henigman c0a403e2 2018-05-08T18:55:54 Revert "ANGLETest: Reuse test windows per-renderer" This reverts commit fad918f85445f19bc2aa6e6b3ee52f104690ff2a. Reason for revert: attempt to fix anglebug.com/2537 Original change's description: > ANGLETest: Reuse test windows per-renderer > > When running angle_end2end_tests unfiltered with the OpenGL and Vulkan > backends enabled, the test window was recreated all the time and grabbed > focus every-time it was created. This made it impossible to do anything > with the machine running the tests. > > Fix this by having one OSWindow per renderer group that's lazily created: > this solves most of the issue since only a couple windows end up being > created, and at the beginning of the test suite. > > BUG= > > Change-Id: I7a51300f0d59d8b6bb79e54d20b3acbf01068002 > Reviewed-on: https://chromium-review.googlesource.com/1038433 > Commit-Queue: Corentin Wallez <cwallez@chromium.org> > Reviewed-by: Jamie Madill <jmadill@chromium.org> TBR=geofflang@chromium.org,jmadill@chromium.org,cwallez@chromium.org # Not skipping CQ checks because original CL landed > 1 day ago. Change-Id: I93bdfa38757cbe2a6ce939c0c3e3da806307e7dd Reviewed-on: https://chromium-review.googlesource.com/1050326 Reviewed-by: Frank Henigman <fjhenigman@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Frank Henigman <fjhenigman@chromium.org>
Corentin Wallez fad918f8 2018-05-07T09:17:30 ANGLETest: Reuse test windows per-renderer When running angle_end2end_tests unfiltered with the OpenGL and Vulkan backends enabled, the test window was recreated all the time and grabbed focus every-time it was created. This made it impossible to do anything with the machine running the tests. Fix this by having one OSWindow per renderer group that's lazily created: this solves most of the issue since only a couple windows end up being created, and at the beginning of the test suite. BUG= Change-Id: I7a51300f0d59d8b6bb79e54d20b3acbf01068002 Reviewed-on: https://chromium-review.googlesource.com/1038433 Commit-Queue: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Olli Etuaho 5804dc8e 2018-04-13T14:11:46 Refactor GL tests to use a shader library Instead of having the same simple shaders repeated over and over in the test code, reuse a single shader library. BUG=angleproject:2474 TEST=angle_end2end_tests Change-Id: I13f8ca8c0125e6d30f1761639bf8c3f69e0e77d2 Reviewed-on: https://chromium-review.googlesource.com/1012078 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
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 ffb35f64 2017-07-14T18:01:07 Fix broadcasting gl_FragColor at the end of main Previously, the broadcast step would not get run in case the main() function returned before reaching its end. Now the broadcast step is put in a separate function that wraps main() if needed, so that it gets run even if the main() function in the original shader source returns in the middle. DrawBuffersTest is refactored to use ANGLETest::drawQuad() instead of calling glDrawArrays directly. BUG=angleproject:2109 TEST=WebGL conformance tests, angle_end2end_tests Change-Id: Id5f05094e816df03bc9c8ca62b60de914072682c Reviewed-on: https://chromium-review.googlesource.com/574597 Reviewed-by: Zhenyao Mo <zmo@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
Yunchao He f81ce4a3 2017-04-24T10:49:17 Refactoring: replace NULL by nullptr for pointers (3rd CL). This CL mainly handles passing/returning NULL to/from a function. BUG=angleproject:2001 Change-Id: I34802f792e710e3d7ff697cbe4701dc1bf5ab009 Reviewed-on: https://chromium-review.googlesource.com/485060 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill 08c24e6e 2017-02-02T18:52:43 ES: Don't expose EXT_draw_buffers if extension not present. Emulation of this extension would potentially require rewriting ESSL 1.00 shaders as 3.00 when the extension is missing, and we're on a GLES 3.0 context. For now, it's easier to disable the extension when native support is lacking. BUG=angleproject:1828 Change-Id: I8eabb8efccc2ddd5fafd3521657ea68cc9e1d1e0 Reviewed-on: https://chromium-review.googlesource.com/436144 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
Yuly Novikov 00ff1194 2016-09-23T18:25:47 Disable DrawBuffersTest.Gaps on Windows AMD OpenGL Fails on Win7 Release (AMD R7 240) bot BUG=angleproject:1535 Change-Id: I5e8d0552867bfe0d81f3e189536c50b36f530089 Reviewed-on: https://chromium-review.googlesource.com/389233 Reviewed-by: Yuly Novikov <ynovikov@chromium.org> Commit-Queue: Yuly Novikov <ynovikov@chromium.org>
Yuly Novikov 44d0a736 2016-09-21T16:19:50 Disable some DrawBuffersTest on Windows AMD OpenGL DrawBuffersTest.FirstAndLast/ES2_OPENGL DrawBuffersTest.FirstHalfNULL/ES2_OPENGL Hang on Win7 Release (ATI) and Win7 Debug (ATI) bots. BUG=angleproject:1533 Change-Id: I6e37893fbcdbcc7a2a76c1cab6e8ef1f7ebaec19 Reviewed-on: https://chromium-review.googlesource.com/387714 Reviewed-by: Yuly Novikov <ynovikov@chromium.org> Commit-Queue: Yuly Novikov <ynovikov@chromium.org>
Geoff Lang b21e20da 2016-07-19T15:35:41 D3D: Validate that all color attachments are unique. The previous logic of only checking the currently enabled draw buffers was incorrect. Also updated the logic to be more lenient and allow multiple slices or mips of the same texture. BUG=483282 Change-Id: I0d406d1a9a96e48342baefbaf11e0c2ecc6d390c Reviewed-on: https://chromium-review.googlesource.com/361533 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Geoff Lang <geofflang@chromium.org>
Martin Radev 1be913cf 2016-07-11T17:59:16 Add support for ES31 context creation The dEQP test for context creation passes. SH_WEBGL3_SPEC has been added, but it should be considered whether we should keep it, remove it or rename it. It was added so that there is a webgl mapping to es 310 shaders. Check Compiler.cpp. The bison file has been modified so that some tokens from es3 can be also used in es31 as well. A separate macro ES3_1_ONLY is added so that some tokens are limited only for es 310 shaders. BUG=angleproject:1442 TEST=angle_unittests Change-Id: I2e5ca227c96046c30dc796ab934f3fda9c533eba Reviewed-on: https://chromium-review.googlesource.com/360300 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Geoff Lang a15472a3 2015-08-11T11:48:03 Fix bugs with drawbuffer state. * IsAttachmentEnabled was checking the wrong draw buffer state. Instead of checking that drawbuffer[colorAttachment] is in use, it should have been scanning for a drawbuffer state that points to colorAttachment. * Allow for maxDrawBuffer != maxColorAttachments. Tested by the GL backend on some systems that don't have the draw buffers extension. Fixed by updating the helpers and adding a new getDrawBuffer helper. BUG=angleproject:1121 Change-Id: Idd1b0a9ec4a3f944d332c708364408bf5d59e1fd Reviewed-on: https://chromium-review.googlesource.com/292740 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Tryjob-Request: Geoff Lang <geofflang@chromium.org> Tested-by: 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>
Austin Kinross 9fc2e4c3 2015-06-10T10:23:58 Reduce hardcoded D3D11 assumptions in DrawBuffersTest Change-Id: I9b93cc6ee7218a92dda80dbc3f70aec6fef69ded Reviewed-on: https://chromium-review.googlesource.com/276598 Tested-by: Austin Kinross <aukinros@microsoft.com> Reviewed-by: Geoff Lang <geofflang@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>