src/compiler/translator/Diagnostics.cpp


Log

Author Commit Date CI Message
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>
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 89a69a03 2017-10-23T12:20:45 Generate performance warnings in HLSL translation Generate performance warnings for some code that undergoes heavy emulation when translated to HLSL: 1. Dynamic indexing of vectors and matrices. 2. Non-empty fall-through cases in switch/case. The warnings are generated only when code is translated to HLSL. Generating them in the parsing stage would add too much maintenance burden. Improves switch statement fall-through handling in cases where an empty fall-through case follows a non-empty one so that extra performance warnings are not generated. BUG=angleproject:1116 Change-Id: I7c85d78fe7c4f8e6042bda72ceaaf6e37dadfe6c Reviewed-on: https://chromium-review.googlesource.com/732986 Commit-Queue: Olli Etuaho <oetuaho@nvidia.com> Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Olli Etuaho 77ba408a 2016-12-16T12:01:18 Unify Diagnostics interface Use the same kind of interface for reporting preprocessor errors as for reporting regular compiler errors, and make global errors like having too many uniforms also go through Diagnostics. Also don't create std::string objects unnecessarily. Includes cleanups of some dead code related to reporting errors. BUG=angleproject:1670 TEST=angle_unittests Change-Id: I3ee794d32ddeec1826bdf1b76b558f35259f82c0 Reviewed-on: https://chromium-review.googlesource.com/421527 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
Olli Etuaho 4de340ac 2016-12-16T09:32:03 Remove extraInfo parameter from compiler diagnostic functions This makes error messages more consistent. It was not clear what was supposed to go to the extraInfo parameter, and previously it was mostly being misused, resulting in poorly formatted error messages. Sometimes the order of parameters to the diagnostic functions like error() and warning() was wrong altogether. The diagnostics API is simpler when there's only the "reason" and "token" parameters that have clear meaning and that are separated by consistent punctuation in the output. Fixes error messages like "redifinition interface block member" to be grammatically reasonable like the rest of the error messages. For other error messages, punctuation is added to make them clearer. Example: "invalid layout qualifier location requires an argument" is changed to "invalid layout qualifier: location requires an argument". Extra spaces are also removed from the beginning of error messages. BUG=angleproject:1670 BUG=angleproject:911 TEST=angle_unittests Change-Id: Id5fb1a1f2892fad2b796aaef47ffb07e9d79759c Reviewed-on: https://chromium-review.googlesource.com/420789 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
Olli Etuaho 7351c2a5 2016-12-15T18:06:41 Clean up GLSL switch statement validation Encapsulate all of the implementation inside the .cpp file, and pass just the diagnostics object instead of the whole ParseContext to the validation function. BUG=angleproject:1670 TEST=angle_unittests Change-Id: I89713b63e554dbedaa12b2270208f1fac496c54e Reviewed-on: https://chromium-review.googlesource.com/420788 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
Jamie Madill d7b1ab58 2016-12-12T14:42:19 Fix up translator style. Using git cl format. BUG=angleproject:650 Change-Id: I7d3f98d2b0dcfb0a8de6c35327db74e55c28d761 Reviewed-on: https://chromium-review.googlesource.com/419059 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill 45bcc784 2016-11-07T13:58:48 translator: Scope all classes with "sh". I was seeing an odd problem with our PoolAlloc conflicting with the glslang/Vulkan TIntermNode, so the fix was to move everything to a separate namespace. The bison grammars are also regenerated. No functional changes. BUG=angleproject:1576 Change-Id: I959c7afe4c092f0d458432c07b4dcee4d39513f3 Reviewed-on: https://chromium-review.googlesource.com/408267 Reviewed-by: Yuly Novikov <ynovikov@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Olli Etuaho 1cc598f8 2016-08-18T13:50:30 Add error and warning helpers to Diagnostics This will make it easier to generate errors and warnings with a consistent format outside of ParseContext, for example in TIntermBinary::fold() which warns about division by zero. BUG=angleproject:952 TEST=angle_unittests Change-Id: I25999d7bdc77efafe77785a0d6f4d63417dfaab9 Reviewed-on: https://chromium-review.googlesource.com/372719 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
Olli Etuaho d57e0db3 2015-04-24T15:05:08 Remove separate compilerdebug.h in favor of debug.h This unifies the behavior across the compiler and rest of ANGLE - for example, one can use #define ANGLE_TEST_CONFIG to disable UNIMPLEMENTED asserts in both the compiler and the rest of ANGLE. Compiler traces from asserts also go to the same TRACE_OUTPUT_FILE as other traces instead of being directed through ParseContext. The compiler build already includes the common sources, so no changes to build config are needed. The original version of this change was reverted due to release mode build issues. This version adds UNUSED_ASSERTION_VARIABLE where needed. TEST=angle_unittests, angle_end2end_tests, dEQP-GLES3.functional.shaders.* BUG=angleproject:983 Change-Id: I36929020a04251b8bc834fbb3c069e10128c3082 Reviewed-on: https://chromium-review.googlesource.com/267411 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Olli Etuaho <oetuaho@nvidia.com> Tested-by: Olli Etuaho <oetuaho@nvidia.com>
Jamie Madill a656490d 2015-04-27T14:30:32 Revert "Remove separate compilerdebug.h in favor of debug.h" Causing compile warnings in Release: 1>compiler\translator\CallDAG.cpp(238): error C2220: warning treated as error - no 'object' file generated 1>compiler\translator\CallDAG.cpp(238): warning C4189: 'op' : local variable is initialized but not referenced 1>compiler\translator\IntermNode.cpp(1495): error C2220: warning treated as error - no 'object' file generated 1>compiler\translator\IntermNode.cpp(1495): warning C4189: 'replaced' : local variable is initialized but not referenced 1>compiler\translator\IntermNode.cpp(1517): warning C4189: 'replaced' : local variable is initialized but not referenced This reverts commit 5271025865b34685da71d0309131c5aff2e32f71. Change-Id: Icdf1c37eef22a13d083767609ab0b0285d3dc517 Reviewed-on: https://chromium-review.googlesource.com/267359 Reviewed-by: Jamie Madill <jmadill@chromium.org> Tested-by: Jamie Madill <jmadill@chromium.org>
Olli Etuaho 52710258 2015-04-24T15:05:08 Remove separate compilerdebug.h in favor of debug.h This unifies the behavior across the compiler and rest of ANGLE - for example, one can use #define ANGLE_TEST_CONFIG to disable UNIMPLEMENTED asserts in both the compiler and the rest of ANGLE. Compiler traces from asserts also go to the same TRACE_OUTPUT_FILE as other traces instead of being directed through ParseContext. The compiler build already includes the common sources, so no changes to build config are needed. TEST=angle_unittests, angle_end2end_tests, dEQP-GLES3.functional.shaders.* BUG=angleproject:983 Change-Id: Ifca4d16f667b1e5cf9c2e7cc4139940091917a1c Reviewed-on: https://chromium-review.googlesource.com/266993 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Zhenyao Mo <zmo@chromium.org> Tested-by: Olli Etuaho <oetuaho@nvidia.com>
Shannon Woods 7f2d7945 2013-11-19T15:07:58 Manual merge of Ehsan Akhgari's patch to rename Diagnostics enums to avoid collision with Windows.h (See https://chromium-review.googlesource.com/#/c/177181/3) Change-Id: I2978d06ec96789b3ee1696b65a84c2a9f31f7ba4
Geoff Lang 17732823 2013-08-29T13:46:49 Moved the compiler source files into directories based on their project and added a compiler.gypi to generate the compiler projects.