src/tests/preprocessor_tests/extension_test.cpp


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>
Tobin Ehlis 93121f36 2019-10-17T08:18:16 Make invalid extension directive a CHROMEOS warning This change allows extension directive after ESSL1.0 non-preprocessor tokens on CHROMEOS. CHROMEOS kiosks have a video player that violates this spec requirement so just flagging as a warning to prevent failed video playback. Added ANGLE_PLATFORM_CHROMEOS define to build config in order to only make this a warning on CHROMEOS. Split the ESSL1 & ESSL3 cases back out as ESSL3 had always been an error on all platforms in the past and so want to keep it that way. Bug: 1003005 Bug: angleproject:4023 Change-Id: Ia931b3a8dad82dbda4c9c9e49a9c1090116397b5 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1866464 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Tobin Ehlis <tobine@google.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>
Clemen Deng 1d672749 2019-07-08T15:42:05 WGL implemetation for OpenGL tutorial Fixes to make WGL implementation work with OpenGL tutorial - Give directive parser the correct shader spec when on Desktop GL - Minor changes to parse Desktop GL shaders - Moved clientType parameter from Context to Context->mState - Minor fixes to WGL functions Bug: angleproject:3666 Change-Id: I01ddb828f6d581ad445f49942589436849eae5d9 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1693244 Commit-Queue: Clemen Deng <clemendeng@google.com> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Tobin Ehlis d7013c03 2019-06-17T09:27:18 Merge ESSL pre-processsor token errors In both the ESSL 1.00 & 3.00 specifications having an extension directive after a pre-processor token is an error. Merging those two enum cases to be a single case. WebGL is handled as a separate warning case for any shader version before 3.00. Also this change now correctly marks 1.00 shaders that break this rule to be invalid so the ExtensionAfterNonPreProcessorTokenESSL1 test no longer expects handleExtension() to be called. BUG=chromium:971660 Change-Id: I37b10cc0fb3a0efd6200a478171e005a96478255 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1661395 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Tobin Ehlis <tobine@google.com>
Victor Costan ffd39978 2019-02-20T10:45:24 test: Replace _TEST_CASE_ with _TEST_SUITE_. Googletest is (at last) converging with industry-standard terminology [1]. We previously called test suites "test cases", which was rather confusing for folks coming from any other testing framework. Chrome now has a googletest version that supports _TEST_SUITE_ macros instead of _TEST_CASE_, so this CL cleans up some of the outdated usage. [1] https://github.com/google/googletest/blob/master/googletest/docs/primer.md#beware-of-the-nomenclature Bug: chromium:925652 Change-Id: Ia0deec0bc4216ef1adabc33985a7cbda89682608 Reviewed-on: https://chromium-review.googlesource.com/c/1477418 Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Victor Costan <pwnall@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 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>
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 2728f992 2015-08-31T16:24:10 Make unittest #includes start from src This is will help avoid adding many include directories for the GN build. BUG=angleproject:929 Change-Id: If8f7e98526df3560b8e410ec86271a2da0c6889d Reviewed-on: https://chromium-review.googlesource.com/296480 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@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>
Jamie Madill 559a2e8c 2015-03-16T17:25:51 Move the ANGLE tests project to src/ *re-re-land with fix for Chrome's angle tests* BUG=angleproject:945 Change-Id: I3c64e2edc776c299791440f65f22450855eb6dfa Reviewed-on: https://chromium-review.googlesource.com/260448 Tested-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Jamie Madill 96e3f556 2015-03-16T21:24:20 Revert "Move the ANGLE tests project to src/" Still causing build issues on Chrome. This reverts commit 64a3b2a92fe3bbd28972638e6759fae0b98d81b9. Change-Id: I8d40fe3dfd0a877343357153a02b8ef66d571c64 Reviewed-on: https://chromium-review.googlesource.com/260425 Reviewed-by: Jamie Madill <jmadill@chromium.org> Tested-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill 64a3b2a9 2015-03-16T11:00:20 Move the ANGLE tests project to src/ *re-land with fix for Chromium build* BUG=angleproject:945 Change-Id: I82bff1760e681987fb26e479734aa62fb845898a Reviewed-on: https://chromium-review.googlesource.com/260362 Tested-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Jamie Madill 5491fe66 2015-03-16T17:56:18 Revert "Move the ANGLE tests project to src/" Causing build break in Chromium. This reverts commit 71c2d85c4af2f6cb213d4f3e15f0ae16b63790f3. Change-Id: Iedf001c1f4c60a759f69009610fbce978d193d17 Reviewed-on: https://chromium-review.googlesource.com/260370 Reviewed-by: Jamie Madill <jmadill@chromium.org> Tested-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill 71c2d85c 2015-03-16T10:47:04 Move the ANGLE tests project to src/ BUG=angleproject:945 Change-Id: I2eb44ac43f65b916ddd838d39e6aae62580d7fa0 Reviewed-on: https://chromium-review.googlesource.com/258903 Tested-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Brandon Jones <bajones@chromium.org>