src/tests/compiler_tests/InitOutputVariables_test.cpp


Log

Author Commit Date CI Message
Olli Etuaho 96f6adfa 2017-08-16T11:18:54 Add support for arrays of arrays in AST processing Data concerning arrays of arrays is added in TType. Parsing arrays of arrays and support for arrays of arrays in TPublicType are still left to be implemented later. ShaderVariable interface for arrays of arrays is also left to be implemented later. We rely on existing test coverage to make sure that arrays of arrays are not accidentally exposed. BUG=angleproject:2125 TEST=angle_unittests, angle_end2end_tests, angle_deqp_gles31_tests Change-Id: Ie17d5ac9b8d33958e9126dc0fb40bf1c81ddeec9 Reviewed-on: https://chromium-review.googlesource.com/616146 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
Corentin Wallez 3e5695d1 2017-07-17T15:21:14 Fix standalone OSX warnings BUG= Change-Id: I447900488559622108c0da12a352c88218f9ddc6 Reviewed-on: https://chromium-review.googlesource.com/575201 Commit-Queue: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Geoff Lang <geofflang@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Olli Etuaho daaff1cc 2017-07-05T18:03:26 Set correct symbol ids when referring to GLSL built-ins The symbol ids are fetched from the symbol table. A new utility function is added to make this more convenient. BUG=angleproject:1490 TEST=angle_unittests, angle_end2end_tests Change-Id: I780430e3386f6599503d8290c568ca9bc9cad147 Reviewed-on: https://chromium-review.googlesource.com/559535 Commit-Queue: Olli Etuaho <oetuaho@nvidia.com> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Olli Etuaho 3ec75686 2017-07-05T17:02:55 Collect AST transform utilities to a separate file Collect static functions that are used to create nodes in AST transformations into a single file. BUG=angleproject:1490 TEST=angle_unittests Change-Id: I6f87422988fa088f2f4b48986e378a2909705cb7
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>
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>
Martin Radev e145def0 2017-06-22T12:49:12 Propagate correct type to the lvalue in an output variable initializer With the SH_INIT_OUTPUT_VARIABLES option enabled, vertex and fragment shader outputs get initialized with zeros at the beginning of main. However, previous to this patch the lvalues in the binary expression did not receive the correct type. This can lead to incorrect modifications of the AST in subsequent stages or incorrect output code from the translator. The patch addresses the issue by copying the type information from the symbol table. BUG=angleproject:2081 TEST=angle_unittests TEST=angle_end2end_tests Change-Id: I9e062376bcfad7d57b637a5248caebce1c9a0688 Reviewed-on: https://chromium-review.googlesource.com/544982 Commit-Queue: Olli Etuaho <oetuaho@nvidia.com> Reviewed-by: Jamie Madill <jmadill@chromium.org>