src/compiler/preprocessor/DirectiveParser.h


Log

Author Commit Date CI Message
Mike Schuchardt 4cbe8548 2023-02-28T21:12:17 Expose shader extensions based on ESSL version Previously, all suported extensions were always exposed in the preprocessor. This broke some games which relied on ESSL1-only extension macros not being defined in ESSL3 shaders. This change adds min/max version information to list of extensions so the preprocessor can conditionally expose extensions based on the shader language version, both via the extension name macros and the #extension directive. Test: angle_unittests --gtest_filter="VersionTest.*" Test: angle_end2end_tests --gtest_filter="*ESSL*ExtensionMacros*" Test: Run com.gameloft.android.ANMP.GloftGGHM on Pixel 6 Bug: b/268091452 Change-Id: I2332a6cb964f54c47d23e2ef6b24e99a0b5c8202 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4304907 Reviewed-by: Cody Northrop <cnorthrop@google.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Mike Schuchardt <mikes@lunarg.com>
Stuart Morgan 9d737966 2019-08-14T12:25:12 Standardize copyright notices to project style For all "ANGLE Project" copyrights, standardize to the format specified by the style guide. Changes: - "Copyright (c)" and "Copyright(c)" changed to just "Copyright". - Removed the second half of date ranges ("Y1Y1-Y2Y2"->"Y1Y1"). - Fixed a small number of files that had no copyright date using the initial commit year from the version control history. - Fixed one instance of copyright being "The ANGLE Project" rather than "The ANGLE Project Authors" These changes are applied both to the copyright of source file, and where applicable to copyright statements that are generated by templates. BUG=angleproject:3811 Change-Id: I973dd65e4ef9deeba232d5be74c768256a0eb2e5 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1754397 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: 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>
Jamie Madill c3bef3e7 2018-10-03T07:35:09 Allow 'defined' in define in non-WebGL. This is needed to pass dEQP conformance. Several of the harder dEQP tests around this behaviour are excluded from the mustpass list. This is presumably because the behaviours weren't implemented portably. Nevertheless we need to support conformant behaviour for GLES 2.0 Contexts for the most simple uses. This also leaves the error behaviour intact for WebGL specs. Bug: angleproject:1335 Change-Id: Ia80b4f71475efa928488ee6c2ee35c566d4602d4 Reviewed-on: https://chromium-review.googlesource.com/c/1242013 Reviewed-by: Olli Etuaho <oetuaho@nvidia.com> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Geoff Lang 197d5294 2018-04-25T14:29:00 Wrap all preprocessor code in the angle namespace. BUG=836820 BUG=801364 Change-Id: I08b6a2f9f12b689e09df6efd916c313e71e8a051 Reviewed-on: https://chromium-review.googlesource.com/1028581 Commit-Queue: Geoff Lang <geofflang@chromium.org> Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
Jamie Madill acf2f3ad 2017-11-21T19:22:44 Apply Chromium style fixes. This addresses several minor code quality issues that are validated in Chromium, but not yet applied to ANGLE: * constructors and destructors must be defined out-of-line * auto is not allowed for simple pointer types * use override everywhere instead of virtual * virtual functions must also be defined out-of-line Slightly reduces binary size for me (~2k on Win, 150k on Linux). Bug: angleproject:1569 Change-Id: I073ca3365188caf5f29fb28d9eb207903c1843e6 Reviewed-on: https://chromium-review.googlesource.com/779959 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill f832c9dd 2016-12-12T17:38:48 Fix style in the preprocessor. Again using git cl format. BUG=angleproject:650 Change-Id: I8898d00bfc6a50db50bffd2cc30c3eda7c08c6c2 Reviewed-on: https://chromium-review.googlesource.com/419097 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Olli Etuaho f1cf5e63 2016-11-22T17:36:49 Prevent stack overflow in macro expansion Add a configurable limit for how many nested MacroExpander objects can be created in the preprocessor, so that stack overflow can be prevented in case of malicious shaders. By default the limit is set to 1000. In unit tests the limit is set lower to make the test run faster. Includes refactoring of most of the preprocessor tests so that they use utility functions provided by the test class instead of repeating the same code for initializing the preprocessor. BUG=angleproject:1600 TEST=angle_unittests Change-Id: I23b5140d9f2dc52df96111650db63150f7238494 Reviewed-on: https://chromium-review.googlesource.com/413986 Commit-Queue: Olli Etuaho <oetuaho@nvidia.com> Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Corentin Wallez 054f7ed0 2016-09-20T17:15:59 preprocessor: Miscellaneous cleanups - Use full header paths in includes - Use ASSERT instead of assert - Use angle::NonCopyable instead of PP_DISALLOW_COPY_AND_ASSIGN - Use range-for in a couple places - Remove pp_utils.h BUG=angleproject:1522 Change-Id: If107fef89e8465bca65cf664926d1051c5d1e232 Reviewed-on: https://chromium-review.googlesource.com/387212 Commit-Queue: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Corentin Wallez e5a1f271 2015-08-21T02:58:25 Use override in all the places where it is possible This will avoid -Winconsistent-overrides in the future. Done using the -Wsuggest-override warning of GCC 5.1 BUG= Change-Id: I707a649dc368f5dd1e139fd144370abcac0b6263 Reviewed-on: https://chromium-review.googlesource.com/294920 Reviewed-by: Jamie Madill <jmadill@chromium.org> Tested-by: Corentin Wallez <cwallez@chromium.org>
Geoff Lang b3a6a8f3 2015-06-23T16:10:14 Error when encountering non-preprocessor tokens before #extension in ESSL3. BUG=angleproject:1047 Change-Id: I4a548270f651e35b2c8d1ab5d0f46185230c5f74 Reviewed-on: https://chromium-review.googlesource.com/281216 Reviewed-by: Jamie Madill <jmadill@chromium.org> Tested-by: Geoff Lang <geofflang@chromium.org>
Geoff Lang 06e24a7e 2015-04-27T14:48:59 Track if a non-preprocessor token has been seen and validate #extension with it. Reland: Only report a warning instead of an error. BUG=angleproject:989 BUG=483252 Change-Id: Ife3e7759cdef6bc0f41cae3c58c307682b608279 Reviewed-on: https://chromium-review.googlesource.com/269404 Reviewed-by: Jamie Madill <jmadill@chromium.org> Tested-by: Geoff Lang <geofflang@chromium.org>
Jamie Madill 4b6bfe10 2015-05-05T20:10:20 Revert "Track if a non-preprocessor token has been seen and validate #extension with it." Causing failures in the GLES2 CTS "build", related to extensions. BUG=483252 BUG=angleproject:989 This reverts commit bbdb9e2259c38454be097ce01505db83db3ad7a8. Change-Id: I3e1ad989af645194c8ee9b9847b2131e289d09e1 Reviewed-on: https://chromium-review.googlesource.com/269403 Reviewed-by: Jamie Madill <jmadill@chromium.org> Tested-by: Jamie Madill <jmadill@chromium.org>
Geoff Lang bbdb9e22 2015-04-27T14:48:59 Track if a non-preprocessor token has been seen and validate #extension with it. Reland: Only report a warning instead of an error. BUG=angleproject:989 BUG=483252 Change-Id: Ibf9adbf423cd9dee20ec45b8d2ea42bcfd9311be Reviewed-on: https://chromium-review.googlesource.com/269205 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Zhenyao Mo <zmo@chromium.org> Tested-by: Geoff Lang <geofflang@chromium.org>
Geoff Lang 9624e058 2015-05-01T14:04:24 Revert "Track if a non-preprocessor token has been seen and validate #extension with it." Breaks some WebGL applications, holding off until a decision is made. BUG=483252 BUG=angleproject:989 This reverts commit fa55bf1ed6a26341c57f45b3a3da8feda0b6c18d. Change-Id: Iebef439095a95741c8502716a4ce90c4785561eb Reviewed-on: https://chromium-review.googlesource.com/268742 Reviewed-by: Geoff Lang <geofflang@chromium.org> Tested-by: Geoff Lang <geofflang@chromium.org>
Geoff Lang fa55bf1e 2015-04-27T14:48:59 Track if a non-preprocessor token has been seen and validate #extension with it. Fixes: dEQP-GLES2.functional.shaders.preprocessor.extensions.after_non_preprocessing_tokens_vertex dEQP-GLES2.functional.shaders.preprocessor.extensions.after_non_preprocessing_tokens_fragment BUG=angleproject:989 Change-Id: Ie0aba80b2fde0160e83fc95f545b62954af2e5fc Reviewed-on: https://chromium-review.googlesource.com/267398 Reviewed-by: Zhenyao Mo <zmo@chromium.org> Tested-by: Geoff Lang <geofflang@chromium.org>
Geoff Lang 0a73dd85 2014-11-19T16:18:08 Fix include guards. BUG=angle:733 Change-Id: I08b2c11c4831f1161c178c1842b10e807185aced Reviewed-on: https://chromium-review.googlesource.com/230831 Reviewed-by: Jamie Madill <jmadill@chromium.org> Tested-by: Geoff Lang <geofflang@chromium.org>
Zhenyao Mo d526f989 2014-05-13T14:51:19 Fix code style violation in compiler/preprocessor BUG=angle:650 TEST=no behavior change Change-Id: Ib52f15f6471fc7897b66d11baee11216cf08158a Reviewed-on: https://chromium-review.googlesource.com/199591 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Zhenyao Mo <zmo@chromium.org> Tested-by: Zhenyao Mo <zmo@chromium.org>
daniel@transgaming.com b401a92b 2012-10-26T18:58:24 Move the new preprocessor out of the 'new' directory. TRAC #21966 Signed-off-by: Daniel Koch Author: Nicolas Capens git-svn-id: https://angleproject.googlecode.com/svn/trunk@1326 736b8ea6-26fd-11df-bfd4-992fa37f6226