src/tests/test_utils/ShaderCompileTreeTest.cpp


Log

Author Commit Date CI Message
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>
Olli Etuaho c26214de 2018-03-16T10:43:11 Move AST utilities to a subdirectory Move AST related utilities to compiler/translator/tree_util. BUG=angleproject:2409 TEST=angle_unittests Change-Id: I7567c2f6f2710292029263257c7ac26e2a144ac8 Reviewed-on: https://chromium-review.googlesource.com/966032 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
Olli Etuaho cccf2b00 2017-07-05T14:50:54 Reorganize AST traversal utility code Define TIntermTraverser and TIntermLValueTrackingTraverser in a separate header file. hash() function is moved out from TIntermTraverser as it is not related to the core functionality of traversing and transforming ASTs. Also reorganize some traversers to follow common conventions: - Intermediate output is now in OutputTree.h/.cpp - Max tree depth check is now in IsASTDepthBelowLimit.h/.cpp BUG=angleproject:1490 TEST=angle_unittests Change-Id: Id4968aa9d4e24d0c5bac90dc147fc9f310de0184 Reviewed-on: https://chromium-review.googlesource.com/559531 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
Martin Radev 115fc55e 2017-07-05T17:11:06 Populate gl_InstanceID attribute information explicitly While compiling ESSL1 shaders, with the compiler having both SH_INITIALIZE_BUILTINS_FOR_INSTANCED_MULTIVIEW and SH_VARIABLES set, variable collection terminates with an assertion failure. The reason behind this is that SH_INITIALIZE_BUILTINS_FOR_INSTANCED_MULTIVIEW adds gl_InstanceID to the AST to initialize the multiview builtins, but the variable collection pass cannot find gl_InstanceID information in the symbol table because the builtin is only available in ESSL 3.00 and greater. To address this the patch populates the gl_InstanceID attribute information explicitly in the variable collection pass instead of retrieving it from the symbol table. BUG=angleproject:2062 TEST=angle_unittests Change-Id: I5ecb9967ebe6658e956d17a2637090f9b685ef33 Reviewed-on: https://chromium-review.googlesource.com/559669 Reviewed-by: Olli Etuaho <oetuaho@nvidia.com> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
Olli Etuaho b12040c4 2017-06-27T14:20:45 Clean up redundant initialization of gl_Position In case gl_Position is statically used in the input shader, setting the INIT_OUTPUT_VARIABLES flag will initialize gl_Position. Avoid redundant initialization of gl_Position in this case. Includes cleaning up memory management in InitOutputVariables_test: all the pool-allocated variables will be freed at the end of each test when the memory pool is cleared, so manual memory management is not needed. Also includes making the zero node check used in unit tests stricter so that the tests are more reliable and moving it to ShaderCompileTreeTest.h so that it can be reused in the future. BUG=angleproject:2092 TEST=angle_unittests Change-Id: I323a0a094afa6cea95c8a64e681d9fc485137423 Reviewed-on: https://chromium-review.googlesource.com/549418 Commit-Queue: Olli Etuaho <oetuaho@nvidia.com> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Olli Etuaho 72fc5547 2016-12-19T19:53:29 Add a ShaderCompileTreeTest base class to use in compiler tests The test class provides facilities for parsing test shader source into an AST and determining compile status. Compilation flags change for some of the tests, but this should only have a minor effect on code coverage - mostly affecting non-core parts such as intermediate output. BUG=angleproject:1673 TEST=angle_unittests Change-Id: I7d0900ef490e021272a27c4b0c938bfee02abf39 Reviewed-on: https://chromium-review.googlesource.com/422367 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>