src/compiler/preprocessor


Log

Author Commit Date CI Message
Olli Etuaho 2f6ddf31 2015-09-22T16:10:07 Allow double underscore in macro names Double underscore is allowed according to GLSL ES 3.10, and based on Khronos discussions the intent is that this should also apply to older specs. The dEQP tests also check this, and WebGL tests that check the opposite were recently removed. The error is changed into a warning. BUG=angleproject:989 TEST=angle_unittests dEQP-GLES3.functional.shaders.preprocessor.* (2 tests start passing) dEQP-GLES2.functional.shaders.preprocessor.* (2 tests start passing) Change-Id: I582c01b4adc8fc416354351e02b776f2cc602408 Reviewed-on: https://chromium-review.googlesource.com/300965 Tested-by: Olli Etuaho <oetuaho@nvidia.com> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Zhenyao Mo <zmo@chromium.org> Tryjob-Request: Olli Etuaho <oetuaho@nvidia.com>
Olli Etuaho 247374cb 2015-09-09T15:07:24 Allow limited form of expressions in #line directives Reuse ExpressionParser that's also used for parsing preprocessor conditionals to parse line and file numbers in #line directives. According to recent Khronos discussions, the intent of the spec is that expressions in #line directives should be interpreted similarly to expressions in conditional directives, so reusing ExpressionParser is a natural way to implement this. This enables simple math operators operating on integers. There are a few unclear corner cases, but this approach is enough to support practical use cases and pass the dEQP tests. Valid line directives have one of the following forms: #line line-expression #line line-expression file-expression ExpressionParser is first run to parse the line-expression. In ambiguous cases the ExpressionParser consumes as much of the line as possible to form line-expression. Then, if end-of-line hasn't been reached, file-expression is parsed by running ExpressionParser again. As an example of an ambiguous case: #line 1 + 2 This could alternatively be interpreted to mean line-expression "1" and file-expression "+ 2" where + is the unary + operator, but ANGLE now interprets it to mean line-expression "1 + 2". Because of these ambiguous cases, a bison grammar that would parse multiple expressions on the same line couldn't be easily constructed, so this solution where ExpressionParser is run twice was chosen instead. The problematic corner cases are: - ExpressionParser uses 64-bit integers internally for evaluating the expression's value. It's possible to interpret the ESSL3 spec so that 32-bit integer wraparound behavior would be required also for #line directive expressions. - It's unclear whether the defined operator can be used in #line expressions. In this patch it is disabled. Hoping for further clarification from Khronos. - It's unclear how short-circuiting should affect the parsing of undefined identifiers in #line expressions. Now it's consistent with #if expressions (undefined identifiers are OK if they're short-circuited). dEQP expectations are updated for preprocessor tests, including ones not affected specifically by this change. BUG=angleproject:989 TEST=angle_unittests, dEQP-GLES3.functional.shaders.preprocessor.* (4 start passing), dEQP-GLES2.functional.shaders.preprocessor.* (4 start passing) Change-Id: I55c5bf75857da5de855cc600d3603ee19399f328 Reviewed-on: https://chromium-review.googlesource.com/300964 Reviewed-by: Jamie Madill <jmadill@chromium.org> Tryjob-Request: Olli Etuaho <oetuaho@nvidia.com> Tested-by: Olli Etuaho <oetuaho@nvidia.com>
Olli Etuaho 3187a38e 2015-09-09T12:00:12 Make preprocessor ExpressionParser only lex what it can parse This cleans up ExpressionParser so that the lexer only consumes one extra token in case the parser finishes. The parser will also finish with YYACCEPT once it has parsed a complete expression. This will make the preprocessor to generate a more informative unexpected token error instead of a syntax error if there are extra tokens after #if. This will also enable reusing ExpressionParser for parsing expressions in line directives. The format for a line directive that specifies both line and file numbers is as follows: #if line-expression file_expression ExpressionParser will need to be run twice for each line: first to parse line-expression and then to parse file-expression. For that reason, it is essential that ExpressionParser for line-expression stops before consuming more than one token of file-expression. BUG=angleproject:989 TEST=angle_unittests, dEQP-GLES3.functional.shaders.preprocessor.* Change-Id: I0bb92f733c18891eeddbc61e7c5bebdf1003559a Reviewed-on: https://chromium-review.googlesource.com/300962 Tested-by: Olli Etuaho <oetuaho@nvidia.com> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Zhenyao Mo <zmo@chromium.org> Tryjob-Request: Olli Etuaho <oetuaho@nvidia.com>
Olli Etuaho 261f5379 2015-09-18T10:34:31 Support parsing defined operator generated by macro expansion dEQP tests enforce that the defined operator should be parsed even when it is generated as a result of macro expansion, even though this is undefined according to the C++ preprocessor spec. Implement support for this by putting the parsing for the defined operator inside MacroExpander. The operator gets processed right after it is generated by macro expansion. Parsing the defined operator is toggled with a boolean according to the context where MacroExpander is used. BUG=angleproject:989 TEST=angle_unittests, dEQP-GLES3.functional.shaders.preprocessor.* - 2 tests start passing: dEQP-GLES3.functional.shaders.preprocessor.conditional_inclusion.basic_2* Change-Id: I780e63bd4558253657d898685d62339017564a06 Reviewed-on: https://chromium-review.googlesource.com/300970 Reviewed-by: Jamie Madill <jmadill@chromium.org> Tested-by: Olli Etuaho <oetuaho@nvidia.com>
Olli Etuaho e6432c85 2015-09-08T14:21:38 Fix preprocessor macro replacement list location According to the dEQP tests, a macro replacement list generated by a function-like macro invocation should get its location from the closing parenthesis of the invocation. The tests check this by using __LINE__ in a macro with a multi-line invocation. It's not quite clear from the spec that the enforced behavior is expected as opposed to the replacement list getting its location from the macro name, but a minor correction to the preprocessor makes the dEQP tests pass. Newlines in the preprocessor unit tests are generated according to the source locations in the token list produced by the preprocessor, so the expectations of a few tests also need to be updated. BUG=angleproject:989 TEST=dEQP-GLES3.functional.shaders.preprocessor.predefined_macros.* (2 start passing with this change), angle_unittests Change-Id: I4cc9da09bd0985310a05ebf6def680916a46308a Reviewed-on: https://chromium-review.googlesource.com/297990 Tested-by: Olli Etuaho <oetuaho@nvidia.com> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Zhenyao Mo <zmo@chromium.org>
Olli Etuaho 809ec546 2015-08-26T14:30:57 Don't evaluate short-circuited preprocessor expressions Resubmit with clang build issue fixed. The result of a short-circuited operation is now either 0 or 1. ESSL 3.00 spec section 3.4 mentions that the second operand in a logical && or || preprocessor operation is evaluated only if the first operand doesn't short-circuit the expression. The non-evaluated part of a preprocessor expression may also have undefined identifiers. Make the expression parser follow the spec by ignoring errors that are generated inside short-circuited expressions. This includes undefined identifiers and divide by zero. BUG=angleproject:347 TEST=dEQP-GLES3.functional.shaders.preprocessor.undefined_identifiers.* angle_unittests Change-Id: I4163f96ec46d40ac859ffb39d91b89490041e44d Reviewed-on: https://chromium-review.googlesource.com/297252 Tested-by: Olli Etuaho <oetuaho@nvidia.com> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill 9a1b49f7 2015-09-08T14:32:26 Revert "Don't evaluate short-circuited preprocessor expressions" Build break on Clang: FAILED: /b/build/goma/gomacc ../../third_party/llvm-build/Release+Asserts/bin/clang++ -MMD -MF obj/third_party/angle/src/compiler/preprocessor/preprocessor.ExpressionParser.o.d -DV8_DEPRECATION_WARNINGS -DCLD_VERSION=2 -D__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORE=0 -DCHROMIUM_BUILD -DCR_CLANG_REVISION=245965-1 -DUSE_LIBJPEG_TURBO=1 -DENABLE_ONE_CLICK_SIGNIN -DENABLE_PRE_SYNC_BACKUP -DENABLE_WEBRTC=1 -DENABLE_MEDIA_ROUTER=1 -DUSE_PROPRIETARY_CODECS -DENABLE_PEPPER_CDMS -DENABLE_CONFIGURATION_POLICY -DENABLE_NOTIFICATIONS -DENABLE_HIDPI=1 -DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE -DDONT_EMBED_BUILD_METADATA -DDCHECK_ALWAYS_ON=1 -DFIELDTRIAL_TESTING_ENABLED -DENABLE_TASK_MANAGER=1 -DENABLE_EXTENSIONS=1 -DENABLE_PDF=1 -DENABLE_PLUGIN_INSTALLATION=1 -DENABLE_PLUGINS=1 -DENABLE_SESSION_SERVICE=1 -DENABLE_THEMES=1 -DENABLE_AUTOFILL_DIALOG=1 -DENABLE_BACKGROUND=1 -DENABLE_GOOGLE_NOW=1 -DENABLE_PRINTING=1 -DENABLE_BASIC_PRINTING=1 -DENABLE_PRINT_PREVIEW=1 -DENABLE_SPELLCHECK=1 -DUSE_BROWSER_SPELLCHECKER=1 -DENABLE_CAPTIVE_PORTAL_DETECTION=1 -DENABLE_APP_LIST=1 -DENABLE_SETTINGS_APP=1 -DENABLE_SUPERVISED_USERS=1 -DENABLE_SERVICE_DISCOVERY=1 -DENABLE_WIFI_BOOTSTRAPPING=1 -DV8_USE_EXTERNAL_STARTUP_DATA -DFULL_SAFE_BROWSING -DSAFE_BROWSING_CSD -DSAFE_BROWSING_DB_LOCAL -DSAFE_BROWSING_SERVICE -DUSE_LIBPCI=1 -DUSE_OPENSSL=1 -DNDEBUG -DNVALGRIND -DDYNAMIC_ANNOTATIONS_ENABLED=0 -Igen -isysroot /Applications/Xcode5.1.1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk -O2 -gdwarf-2 -fvisibility=hidden -Werror -Wnewline-eof -mmacosx-version-min=10.6 -arch x86_64 -Wendif-labels -Wno-unused-parameter -Wno-missing-field-initializers -Wno-selector-type-mismatch -Wpartial-availability -Wheader-hygiene -Wno-char-subscripts -Wno-unneeded-internal-declaration -Wno-covered-switch-default -Wstring-conversion -Wno-c++11-narrowing -Wno-deprecated-register -Wno-inconsistent-missing-override -Wno-shift-negative-value -Wno-unused-function -Wno-unused-variable -std=c++11 -fno-rtti -fno-exceptions -fvisibility-inlines-hidden -fno-threadsafe-statics -Xclang -load -Xclang /b/build/slave/GPU_Mac_Builder/build/src/third_party/llvm-build/Release+Asserts/lib/libFindBadConstructs.dylib -Xclang -add-plugin -Xclang find-bad-constructs -Xclang -plugin-arg-find-bad-constructs -Xclang check-templates -fcolor-diagnostics -fno-strict-aliasing -c ../../third_party/angle/src/compiler/preprocessor/ExpressionParser.cpp -o obj/third_party/angle/src/compiler/preprocessor/preprocessor.ExpressionParser.o ../../third_party/angle/src/compiler/preprocessor/ExpressionParser.cpp:1372:35: error: use of logical '||' with constant operand [-Werror,-Wconstant-logical-operand] (yyval) = (yyvsp[-3]) || 0; ^ ~ ../../third_party/angle/src/compiler/preprocessor/ExpressionParser.cpp:1372:35: note: use '|' for a bitwise operation (yyval) = (yyvsp[-3]) || 0; ^~ | ../../third_party/angle/src/compiler/preprocessor/ExpressionParser.cpp:1406:35: error: use of logical '&&' with constant operand [-Werror,-Wconstant-logical-operand] (yyval) = (yyvsp[-3]) && 0; ^ ~ ../../third_party/angle/src/compiler/preprocessor/ExpressionParser.cpp:1406:35: note: use '&' for a bitwise operation (yyval) = (yyvsp[-3]) && 0; ^~ & ../../third_party/angle/src/compiler/preprocessor/ExpressionParser.cpp:1406:35: note: remove constant to silence this warning (yyval) = (yyvsp[-3]) && 0; ~^~~~ BUG=angleproject:347 This reverts commit 6ffe613518482b966b913013c51221ce06ca7c33. Change-Id: I6d81666cca573f320bfb1164a6c794b6f75f7463 Reviewed-on: https://chromium-review.googlesource.com/298020 Reviewed-by: Jamie Madill <jmadill@chromium.org> Tested-by: Jamie Madill <jmadill@chromium.org>
Olli Etuaho 6ffe6135 2015-08-26T14:30:57 Don't evaluate short-circuited preprocessor expressions ESSL 3.00 spec section 3.4 mentions that the second operand in a logical && or || preprocessor operation is evaluated only if the first operand doesn't short-circuit the expression. The non-evaluated part of a preprocessor expression may also have undefined identifiers. Make the expression parser follow the spec by ignoring errors that are generated inside short-circuited expressions. This includes undefined identifiers and divide by zero. BUG=angleproject:347 TEST=dEQP-GLES3.functional.shaders.preprocessor.undefined_identifiers.* angle_unittests Change-Id: Ieed02a71298af838f784a5d1197d4f4a9ba0e3c8 Reviewed-on: https://chromium-review.googlesource.com/295033 Reviewed-by: Zhenyao Mo <zmo@chromium.org> Tested-by: Olli Etuaho <oetuaho@nvidia.com>
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>
Olli Etuaho 26e355b8 2015-08-14T14:16:19 Add full support for line continuation in the preprocessor Re-landing earlier change with constant signedness fixed (was causing build issues on Linux). Line continuation in ESSL 3.00 needs to be processed before tokenization, since tokens can span the line continuation. On the other hand, ANGLE's tokenizer keeps track of line numbers, and whenever a line continuation appears the line number still needs to be incremented by one, just like on a regular newline. That's why line continuation is now implemented as follows: when the shader strings are concatenated in Input, they are also checked for line continuation. Whenever line continuation is encountered, the string is cut before that point. When the tokenizer asks for more input, the string starting from the character after line continuation is passed to it, and the line number is incremented from Input. This way the tokenizer can parse tokens that span multiple lines - it never sees the line continuation - but still keeps track of the line number correctly. Relevant spec is in ESSL 3.00 section 3.2 "Source strings". Support for line continuation also applies to ESSL 1.00. ESSL 3.00 spec section 1.5 says that line continuation support is mandated when an ESSL 1.00 shader is used with the OpenGL ES 3.0 API, and is optional when ESSL 1.00 is used with the OpenGL ES 2.0 API. TEST=dEQP-GLES3.functional.shaders.preprocessor.line_continuation.* (all pass), angle_unittests BUG=angleproject:1125 Change-Id: Ic086aacac53cd75bf93c0fda782416501d2f842b Reviewed-on: https://chromium-review.googlesource.com/294200 Reviewed-by: Jamie Madill <jmadill@chromium.org> Tested-by: Olli Etuaho <oetuaho@nvidia.com>
Jamie Madill 3b040eb8 2015-08-17T16:51:33 Revert "Add full support for line continuation in the preprocessor" Warning in the Linux/Mac builders: In file included from ../../third_party/angle/src/tests/preprocessor_tests/input_test.cpp:7: In file included from ../../third_party/angle/src/tests/preprocessor_tests/PreprocessorTest.h:7: ../../testing/gtest/include/gtest/gtest.h:1392:16: error: comparison of integers of different signs: 'const int' and 'const unsigned long' [-Werror,-Wsign-compare] if (expected == actual) { ~~~~~~~~ ^ ~~~~~~ ../../testing/gtest/include/gtest/gtest.h:1422:12: note: in instantiation of function template specialization 'testing::internal::CmpHelperEQ<int, unsigned long>' requested here return CmpHelperEQ(expected_expression, actual_expression, expected, ^ ../../third_party/angle/src/tests/preprocessor_tests/input_test.cpp:171:5: note: in instantiation of function template specialization 'testing::internal::EqHelper<false>::Compare<int, unsigned long>' requested here EXPECT_EQ(3, input.read(buf, maxSize, &lineNo)); ^ BUG=angleproject:1125 This reverts commit c1157d1963170c7411eb6c32e2b2fbce02c5a170. Change-Id: Ic6fa286d190b006cccc5154d86e21ecc03175763 Reviewed-on: https://chromium-review.googlesource.com/294080 Reviewed-by: Jamie Madill <jmadill@chromium.org> Tested-by: Jamie Madill <jmadill@chromium.org>
Olli Etuaho c1157d19 2015-08-14T14:16:19 Add full support for line continuation in the preprocessor Line continuation in ESSL 3.00 needs to be processed before tokenization, since tokens can span the line continuation. On the other hand, ANGLE's tokenizer keeps track of line numbers, and whenever a line continuation appears the line number still needs to be incremented by one, just like on a regular newline. That's why line continuation is now implemented as follows: when the shader strings are concatenated in Input, they are also checked for line continuation. Whenever line continuation is encountered, the string is cut before that point. When the tokenizer asks for more input, the string starting from the character after line continuation is passed to it, and the line number is incremented from Input. This way the tokenizer can parse tokens that span multiple lines - it never sees the line continuation - but still keeps track of the line number correctly. Relevant spec is in ESSL 3.00 section 3.2 "Source strings". Support for line continuation also applies to ESSL 1.00. ESSL 3.00 spec section 1.5 says that line continuation support is mandated when an ESSL 1.00 shader is used with the OpenGL ES 3.0 API, and is optional when ESSL 1.00 is used with the OpenGL ES 2.0 API. TEST=dEQP-GLES3.functional.shaders.preprocessor.line_continuation.* (all pass), angle_unittests BUG=angleproject:1125 Change-Id: I1c1de49602e7cd755d6072c3c0aa5524cd0313b4 Reviewed-on: https://chromium-review.googlesource.com/293721 Reviewed-by: Jamie Madill <jmadill@chromium.org> Tested-by: Olli Etuaho <oetuaho@nvidia.com>
Nico Weber ec17d54a 2015-08-13T12:19:28 Fix angle miscompiling shaders on x86_64 Android. BUG=487341 Change-Id: I792e0c9419566facb0bec0ad93f3646294e5a2a7 Reviewed-on: https://chromium-review.googlesource.com/293500 Reviewed-by: Jamie Madill <jmadill@chromium.org> Tested-by: Nico Weber <thakis@chromium.org> Reviewed-by: Nico Weber <thakis@chromium.org>
Olli Etuaho 6cb4c7f0 2015-08-13T11:27:17 Set __VERSION__ macro when the #version directive is parsed __VERSION__ macro needs to be set to 300 when #version 300 es is on the first line of the shader, since section 3.4 of ESSL 3.00.4 spec mentions that the value of __VERSION__ should match the shading language being parsed. The value from parsing the version directive replaces the default value 100. BUG=angleproject:524 TEST=dEQP-GLES3.functional.shaders.preprocessor.predefined_macros.* (4 tests start passing, 2 still fail) dEQP-GLES3.functional.shaders.preprocessor.conditionals.* (2 tests start passing) dEQP-GLES2.functional.shaders.preprocessor.predefined_macros.* (no regression) Change-Id: I15bfdeb73d1e343d131ded56b1fd52ca5ef32408 Reviewed-on: https://chromium-review.googlesource.com/293440 Reviewed-by: Zhenyao Mo <zmo@chromium.org> Tested-by: Olli Etuaho <oetuaho@nvidia.com>
Olli Etuaho 391befef 2015-08-12T16:30:38 Revert "Add pragma errors for malformed pragmas." Since this commit was made, dEQP tests were fixed to check that unrecognized pragma tokens only generate warnings, not errors. This applies to both ESSL1.00 and ESSL3.00, which specify this behavior in section 3.4 Preprocessor. BUG=angleproject:989 TEST=dEQP-GLES2.functional.shaders.preprocessor.pragmas.* This reverts commit d3c29f57aaeb451b149bbb9fd17b3f1f99101c52. Change-Id: Ie4e0ec061fa3164d6f3872ac0016a063056ed110 Reviewed-on: https://chromium-review.googlesource.com/293181 Tested-by: Olli Etuaho <oetuaho@nvidia.com> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@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>
Olli Etuaho c378cd8a 2015-05-25T15:21:44 Check that #version 300 es directive is on the first line ESSL3.00 and 3.10 specs don't allow even newlines before the version directive. BUG=angleproject:1009 TEST=WebGL 2 conformance tests, angle_unittests Change-Id: Id7967829077e35e03572c724e0eafffbed0c975b Reviewed-on: https://chromium-review.googlesource.com/272719 Reviewed-by: Jamie Madill <jmadill@chromium.org> Tested-by: Olli Etuaho <oetuaho@nvidia.com> Reviewed-by: Zhenyao Mo <zmo@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>
Scott Graham a897542f 2015-05-01T11:09:12 vs2015: disable warning in generated code, fix another Macro redefinition is for INT8_MIN, etc. which are generated by flex. VS doesn't define __STDC_VERSION__ as >= C99 because it's still only partial support in VS2015. Fix a float->int conversion narrowing warning. Change-Id: I5232eb23426eaf584218137c068e14d74119a1ef Reviewed-on: https://chromium-review.googlesource.com/268821 Reviewed-by: Zhenyao Mo <zmo@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Tested-by: Scott Graham <scottmg@chromium.org>
Geoff Lang 4c8cae60 2015-05-01T16:46:16 Revert "Don't mark all macros with double underscores as reserved." Fails a WebGL CTS test. BUG=angleproject:989 This reverts commit 942e36254a1e3537371c39f3f23d1ce12f4c87e8. Change-Id: I9f833366d5b69535ef74e358ac21efaccb1f1a3d Reviewed-on: https://chromium-review.googlesource.com/268751 Reviewed-by: Geoff Lang <geofflang@chromium.org> Tested-by: Geoff Lang <geofflang@chromium.org>
Geoff Lang 942e3625 2015-04-30T11:00:01 Don't mark all macros with double underscores as reserved. Only __FILE__, __LINE__, __VERSION__ and GL_ES are reserved but it is still not recommended to use a name with double underscores because it may be used by the "underlying software layers". Updated the tests to reflect that it is OK to define macros with double underscores but it is not valid to make assumptions about their values. Fixes: dEQP-GLES2.functional.shaders.preprocessor.basic.identifier_with_double_underscore_vertex dEQP-GLES2.functional.shaders.preprocessor.basic.identifier_with_double_underscore_fragment BUG=angleproject:898 Change-Id: I77054d04c9935eedcdbb7304dc0c3b60b53994f9 Reviewed-on: https://chromium-review.googlesource.com/268434 Reviewed-by: Zhenyao Mo <zmo@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Tested-by: Geoff Lang <geofflang@chromium.org>
Jamie Madill 2dc8bf8b 2015-04-30T15:56:52 translator: Fix C++11-deprecated register usage. Define 'register' as an empty string if we're in a modern version of C++. BUG=255186 BUG=angleproject:463 Change-Id: Ied044fb87a9b05c91cb419c54295c39f0f0ab776 Reviewed-on: https://chromium-review.googlesource.com/268512 Reviewed-by: Geoff Lang <geofflang@chromium.org> Tested-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Zhenyao Mo <zmo@chromium.org>
Jamie Madill b96687df 2015-04-30T15:56:51 translator: Regenerate with Bison 3.0.4. BUG=angleproject:463 Change-Id: If89a29de8fb006e8e3b0483ac5df21c8833ce974 Reviewed-on: https://chromium-review.googlesource.com/268511 Tested-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Zhenyao Mo <zmo@chromium.org> Reviewed-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 26be18da 2015-04-27T14:05:57 Validate that all preprocessor function arguments are unique. Fixes: dEQP-GLES2.functional.shaders.preprocessor.invalid_function_definitions.unique_param_name_vertex dEQP-GLES2.functional.shaders.preprocessor.invalid_function_definitions.unique_param_name_fragment BUG=angleproject:989 Change-Id: I32198f1c9036c371b46e7ad2986a44e42fd38e20 Reviewed-on: https://chromium-review.googlesource.com/267396 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Zhenyao Mo <zmo@chromium.org> Tested-by: Geoff Lang <geofflang@chromium.org>
Geoff Lang 95a423d0 2015-04-28T11:09:45 Unexpected tokens after conditionals should be an error instead of a warning. Fixes: dEQP-GLES2.functional.shaders.preprocessor.invalid_conditionals.tokens_after_if_vertex dEQP-GLES2.functional.shaders.preprocessor.invalid_conditionals.tokens_after_if_fragment dEQP-GLES2.functional.shaders.preprocessor.invalid_conditionals.tokens_after_else_vertex dEQP-GLES2.functional.shaders.preprocessor.invalid_conditionals.tokens_after_else_fragment dEQP-GLES2.functional.shaders.preprocessor.invalid_conditionals.tokens_after_endif_vertex dEQP-GLES2.functional.shaders.preprocessor.invalid_conditionals.tokens_after_endif_fragment dEQP-GLES2.functional.shaders.preprocessor.invalid_conditionals.tokens_after_ifdef_vertex dEQP-GLES2.functional.shaders.preprocessor.invalid_conditionals.tokens_after_ifdef_fragment dEQP-GLES2.functional.shaders.preprocessor.invalid_conditionals.tokens_after_ifndef_vertex dEQP-GLES2.functional.shaders.preprocessor.invalid_conditionals.tokens_after_ifndef_fragment BUG=angleproject:989 Change-Id: I6511f7082c98206fb623775d81329b6bc7673c1a Reviewed-on: https://chromium-review.googlesource.com/267638 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Zhenyao Mo <zmo@chromium.org> Tested-by: Geoff Lang <geofflang@chromium.org>
Geoff Lang d3c29f57 2015-04-28T11:23:02 Add pragma errors for malformed pragmas. Instead of always warning on invalid pragmas, only warn when the pragma type is not recognized and error when the syntax is invalid. Fixes: dEQP-GLES2.functional.shaders.preprocessor.pragmas.invalid_pragma_invalid_debug_vertex dEQP-GLES2.functional.shaders.preprocessor.pragmas.invalid_pragma_invalid_debug_fragment dEQP-GLES2.functional.shaders.preprocessor.pragmas.invalid_pragma_invalid_token_vertex dEQP-GLES2.functional.shaders.preprocessor.pragmas.invalid_pragma_invalid_token_fragment BUG=angleproject:989 Change-Id: Ibd584dc08a2436e163dfc52eeffdf2dac8a22cb8 Reviewed-on: https://chromium-review.googlesource.com/267639 Reviewed-by: Zhenyao Mo <zmo@chromium.org> Tested-by: Geoff Lang <geofflang@chromium.org>
Geoff Lang b819d25d 2015-04-27T14:16:34 Validate that there are no tokens following #undef on the same line. Fixes: dEQP-GLES2.functional.shaders.preprocessor.definitions.undefine_object_invalid_syntax_vertex dEQP-GLES2.functional.shaders.preprocessor.definitions.undefine_object_invalid_syntax_fragment dEQP-GLES2.functional.shaders.preprocessor.invalid_definitions.undef_non_identifier_2_vertex dEQP-GLES2.functional.shaders.preprocessor.invalid_definitions.undef_non_identifier_2_fragment BUG=angleproject:989 Change-Id: I279a38aaae8010017ef6e3f1aa139ae03f374680 Reviewed-on: https://chromium-review.googlesource.com/267397 Reviewed-by: Zhenyao Mo <zmo@chromium.org> Tested-by: Geoff Lang <geofflang@chromium.org>
Minmin Gong 794e0009 2015-04-07T18:31:54 Fix and enable warning C4244 (Conversion from 'type1' to 'type2', possible loss of data) Change-Id: Id0e06d7d6600344d858f00dabc219d79289bbc82 Reviewed-on: https://chromium-review.googlesource.com/265020 Tested-by: Minmin Gong <mgong@microsoft.com> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Jamie Madill b3584fb4 2015-04-09T17:34:21 Revert "Fix and enable warning C4244 (Conversion from 'type1' to 'type2', possible loss of data)" Causing a build failure on Mac/Clang: ./Tokenizer.cpp:551:7: error: extra tokens at end of #else directive [-Werror,-Wextra-tokens] #else if defined(_MSC_VER) http://build.chromium.org/p/chromium.gpu.fyi/builders/GPU%20Mac%20Builder/builds/29136 This reverts commit 3b26e231d99154814eb428f75a67bbe7a21adadc. Change-Id: I2d11ddcc18130d908fd2ec3d6f5ab890cfccd5e7 Reviewed-on: https://chromium-review.googlesource.com/264983 Reviewed-by: Jamie Madill <jmadill@chromium.org> Tested-by: Jamie Madill <jmadill@chromium.org>
Minmin Gong 3b26e231 2015-04-07T18:31:54 Fix and enable warning C4244 (Conversion from 'type1' to 'type2', possible loss of data) Change-Id: I73d9a2b9ad16f032be974b9c819de0dc1247c2ea Reviewed-on: https://chromium-review.googlesource.com/264533 Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Tested-by: Jamie Madill <jmadill@chromium.org>
Austin Kinross c8ef69d2 2015-03-18T16:43:22 Fix C4702 issues (unreachable code) in ANGLE, excluding <xtree> Change-Id: Ia7603139af266fd7b14efc8c3465225738456e67 Reviewed-on: https://chromium-review.googlesource.com/261038 Tested-by: Austin Kinross <aukinros@microsoft.com> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill 185de884 2014-12-22T15:17:52 Update ANGLE's translator to Bison 3. BUG=angle:462 Change-Id: I2c1c18027dee1c3b4efb87374caaadbf58367841 Reviewed-on: https://chromium-review.googlesource.com/236930 Tested-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Kenneth Russell <kbr@chromium.org> Reviewed-by: Zhenyao Mo <zmo@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 b5e17750 2014-10-22T10:57:10 Get rid of use of "static const std::string". BUG=angle:807 TEST=angle_unittests Change-Id: Ifa4d713deeb25d52a7aafc362a7e4630024fd511 Reviewed-on: https://chromium-review.googlesource.com/225004 Tested-by: Zhenyao Mo <zmo@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Zhenyao Mo 94ac7b78 2014-10-15T18:22:08 Invariant related processing. * Fix a bug in PreProcessor for STDGL pragma. * Record all invariant settings and set them in ShaderVariable. * Write #pragma STDGL invariant(all) in GL BUG=angle:776 TEST=https://www.khronos.org/registry/webgl/sdk/tests/conformance/glsl/misc/shaders-with-invariance.html Change-Id: Ie28b75480deed79f0c9f26e3b98f1778d1290182 Reviewed-on: https://chromium-review.googlesource.com/223610 Tested-by: Zhenyao Mo <zmo@chromium.org> Reviewed-by: Jamie Madill <jmadill@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>
Jamie Madill 5508f39d 2014-02-20T13:31:36 Fix breaking the build with missing GetGlobalMaxTokenSize. Because the preprocessor is used independently from the compiler, we need a way to track max token size when we don't have access to the parse context with the current spec. BUG=angle:550 Change-Id: Idf5035ec2c001ee75f264151ab3c4e92f3cd44d7 Reviewed-on: https://chromium-review.googlesource.com/187140 Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Shannon Woods <shannonwoods@chromium.org> Reviewed-by: Nicolas Capens <nicolascapens@chromium.org> Tested-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill 88f6e946 2014-02-19T10:27:53 Proper support for token max size in WebGL+ES3. WebGL specifies a maximum token size of 256 characters, while ES3 specifies 1024 characters. We can determine the proper max size to support from the spec. BUG=angle:550 Change-Id: I6aeabe8af3b6184a27b456248ce2f84f361b76e4 Reviewed-on: https://chromium-review.googlesource.com/186973 Reviewed-by: Shannon Woods <shannonwoods@chromium.org> Tested-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill c9f140d8 2014-02-18T15:27:21 Add preprocess bison files to the gyp files. We had accidentally left out the y and l files from our generation scripts, causing us to miss several instances of updated enum names. BUG=angle:550 Change-Id: I8790742fbaab5435e4c0db4f61c3e8194a231550 Reviewed-on: https://chromium-review.googlesource.com/186972 Reviewed-by: Nicolas Capens <nicolascapens@chromium.org> Tested-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill a738f085 2013-11-01T17:45:04 Fix build on QNX. InfoSink.h needs stdlib.h for abs(int) and free() in the global namespace. ExpressionParser needs malloc.h, because bison needs malloc and free in the global namespace, but "#include <cassert>" will put it only in the std:: namespace on QNX. BUG=500 R=geofflang@chromium.org, jmadill@chromium.org, shannonwoods@chromium.org, zmo@chromium.org Review URL: https://codereview.appspot.com/19330044 Change-Id: Ifa30a8ba5eced1156123416d4a24b490620721af Reviewed-on: https://chromium-review.googlesource.com/178993 Reviewed-by: Shannon Woods <shannonwoods@chromium.org> Tested-by: Shannon Woods <shannonwoods@chromium.org>
Jamie Madill d7f2135f 2013-10-30T17:53:15 Fix build on QNX. InfoSink.h needs stdlib.h for abs(int) and free() in the global namespace. ExpressionParser needs malloc.h, because bison needs malloc and free in the global namespace, but "#include <cassert>" will put it only in the std:: namespace on QNX. BUG=500 R=geofflang@chromium.org, shannonwoods@chromium.org Review URL: https://codereview.appspot.com/19330044 Conflicts: src/compiler/translator/InfoSink.h Change-Id: Ie480d5c293d099f21dafc8c1e7997c0b4cda7207 Reviewed-on: https://chromium-review.googlesource.com/178998 Reviewed-by: Shannon Woods <shannonwoods@chromium.org> Tested-by: Shannon Woods <shannonwoods@chromium.org>
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 7c697201 2013-10-07T17:18:14 Deleted manually maintained visual studio projects and replaced them with gyp generated ones.
Zhenyao Mo f1d723c6 2013-09-23T14:57:07 Clamp numeric overflow rather than failing with an error BUG=249086 ANGLEBUG=468 TEST= R=alokp@chromium.org, kbr@chromium.org Review URL: https://codereview.appspot.com/13195043
Jamie Madill ba615196 2013-09-24T14:07:39 Normalize line endings of tracked files in the repository. TRAC #23896 Signed-off-by: Shannon Woods
Shannon Woods eb936d0d 2013-06-12T14:05:38 Adds patch files for 64 bit safety fixes TRAC #23274 Authored-by: Shannon Woods Signed-off-by: Jamie Madill Signed-off-by: Nicolas Capens
Shannon Woods b5ce077e 2013-06-12T14:05:56 Add 64bit safety patch step to generate_parser.sh scripts. TRAC #23274 Authored-by: Shannon Woods Signed-off-by: Jamie Madill Signed-off-by: Nicolas Capens
Shannon Woods 81e93083 2013-06-12T14:05:22 Makes generate_parser.sh executable TRAC #23274 Authored-by: Shannon Woods Signed-off-by: Jamie Madill Signed-off-by: Nicolas Capens
shannonwoods@chromium.org 2a5436ff 2013-05-30T00:21:41 Added preprocessor support for parsing the float suffix. TRAC #23185 Signed-off-by: Geoff Lang Signed-off-by: Shannon Woods Author: Nicolas Capens git-svn-id: https://angleproject.googlecode.com/svn/branches/es3proto@2413 736b8ea6-26fd-11df-bfd4-992fa37f6226
shannonwoods@chromium.org 3f83e29c 2013-05-30T00:21:34 Added preprocessor support for parsing the unsigned integer suffix. TRAC #23185 Signed-off-by: Geoff Lang Signed-off-by: Shannon Woods Author: Nicolas Capens git-svn-id: https://angleproject.googlecode.com/svn/branches/es3proto@2412 736b8ea6-26fd-11df-bfd4-992fa37f6226
shannonwoods@chromium.org b0757168 2013-05-30T00:21:27 Restore 64-bit support of the preprocessor tokenizer. TRAC #23185 Signed-off-by: Geoff Lang Signed-off-by: Shannon Woods Author: Nicolas Capens git-svn-id: https://angleproject.googlecode.com/svn/branches/es3proto@2411 736b8ea6-26fd-11df-bfd4-992fa37f6226
shannonwoods@chromium.org c8100b85 2013-05-30T00:20:34 Add support for unsigned integer literals in the shading language. TRAC #23080 Signed-off-by: Nicolas Capens Signed-off-by: Shannon Woods Author: Jamie Madill git-svn-id: https://angleproject.googlecode.com/svn/branches/es3proto@2405 736b8ea6-26fd-11df-bfd4-992fa37f6226
shannonwoods@chromium.org 8ddaf5c0 2013-05-30T00:13:08 Increase the maximum token length in the preprocessor to be 1024, to comply with the GLSL ES 3 specification. TRAC #23077 Signed-off-by: Shannon Woods Signed-off-by: Geoff Lang Author: Jamie Madill git-svn-id: https://angleproject.googlecode.com/svn/branches/es3proto@2349 736b8ea6-26fd-11df-bfd4-992fa37f6226
shannonwoods@chromium.org 4b8a3115 2013-05-30T00:13:01 Regenerate the preprocessor source files with the new versions of the compiler tools. Will have to be resolved with 64-bit compatible bison in the future. TRAC #23077 Signed-off-by: Shannon Woods Signed-off-by: Geoff Lang Author: Jamie Madill git-svn-id: https://angleproject.googlecode.com/svn/branches/es3proto@2348 736b8ea6-26fd-11df-bfd4-992fa37f6226
shannon.woods%transgaming.com@gtempaccount.com 0bbed38f 2013-04-13T03:38:07 Accept shader version 300 on ES3 contexts. TRAC #22712 Signed-off-by: Jamie Madill Signed-off-by: Shannon Woods Author: Nicolas Capens git-svn-id: https://angleproject.googlecode.com/svn/branches/es3proto@2121 736b8ea6-26fd-11df-bfd4-992fa37f6226
shannon.woods%transgaming.com@gtempaccount.com bcde56f7 2013-04-13T03:32:12 Added support for line continuations. TRAC #22713 Signed-off-by: Geoff Lang Signed-off-by: Shannon Woods Author: Nicolas Capens git-svn-id: https://angleproject.googlecode.com/svn/branches/es3proto@2086 736b8ea6-26fd-11df-bfd4-992fa37f6226
shannon.woods@transgaming.com 8e02e356 2013-02-28T23:20:08 Fix ANGLE patching/building issues. 1) Remove an empty file: this causes patch apply failures when updating WebKit side ANGLE. 2) Fix a 64-to-32 conversion issue. 3) Append a change to Tokenizer.l that's left out in a previous CL. (cpp is already updated). Review URL: https://codereview.appspot.com/7378051 git-svn-id: https://angleproject.googlecode.com/svn/branches/dx11proto@1965 736b8ea6-26fd-11df-bfd4-992fa37f6226
shannon.woods@transgaming.com eb68fd0e 2013-02-28T23:20:01 This pulls in mvujovic's build fix in WebKit ANGLE. Original patch: http://trac.webkit.org/changeset/139665 Review URL: https://codereview.appspot.com/7392044 git-svn-id: https://angleproject.googlecode.com/svn/branches/dx11proto@1964 736b8ea6-26fd-11df-bfd4-992fa37f6226
shannon.woods@transgaming.com d64b3dab 2013-02-28T23:19:26 Fixed 64-bit integer truncation issues in shader translator. This is an incompatible API change, but one which is necessary in order to improve correctness of the code. The API version in ShaderLang.h is updated and, unfortunately, the define renamed to something less ambiguous due to conflicts on some Android buildbots. Temporary patches in Chromium and WebKit will be landed separately to support this upgrade. BUG=403,404,405,406,407,408,409 Review URL: https://codereview.appspot.com/7300058 Conflicts: include/GLSLANG/ShaderLang.h git-svn-id: https://angleproject.googlecode.com/svn/branches/dx11proto@1960 736b8ea6-26fd-11df-bfd4-992fa37f6226
shannon.woods@transgaming.com e36fddfc 2013-01-25T21:57:50 Attempt different fix for unknown #pragma on Linux. BUG=none TEST=compiled on Linux and Mac OS Review URL: https://codereview.appspot.com/7133076 git-svn-id: https://angleproject.googlecode.com/svn/branches/dx11proto@1800 736b8ea6-26fd-11df-bfd4-992fa37f6226
shannon.woods@transgaming.com 2f8524d3 2013-01-25T21:57:17 Fixed compiler warning on Linux resulting in build failures. BUG=none TEST=compiled on Linux Review URL: https://codereview.appspot.com/7201056 git-svn-id: https://angleproject.googlecode.com/svn/branches/dx11proto@1797 736b8ea6-26fd-11df-bfd4-992fa37f6226
daniel@transgaming.com b3077d08 2013-01-11T04:12:09 Upstream various build fixes from WebKit to ANGLE to make updating ANGLE in WebKit easier. a) http://trac.webkit.org/changeset/127747 b) http://trac.webkit.org/changeset/128539 c) http://trac.webkit.org/changeset/122870 - Specifically, items #3 and #4 in this changeset's commit message. Review URL: https://codereview.appspot.com/7040045 Author: maxvujovic@gmail.com ------ Upodate preprocessor.vcxproj to reflect changes in r1640. Review URL: https://codereview.appspot.com/7061044 git-svn-id: https://angleproject.googlecode.com/svn/branches/dx11proto@1703 736b8ea6-26fd-11df-bfd4-992fa37f6226
daniel@transgaming.com a16a55f7 2012-12-20T20:51:54 Add explicit std:: namespace to code from <cXYZ> includes. Some platforms seem to implicitly include the <XYZ.h> headers which also add some types and functions (like strlen, size_t,...) into the global namespace. On other platforms though, this can result in compile errors, which is noticeable in WebKit on e.g. QNX. See also: https://bugs.webkit.org/show_bug.cgi?id=95468 https://codereview.appspot.com/6843083/ Contributed by Milian Wolff, Klaralvdavens Datakonsult AB. git-svn-id: https://angleproject.googlecode.com/svn/branches/dx11proto@1565 736b8ea6-26fd-11df-bfd4-992fa37f6226
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
daniel@transgaming.com 3be1d571 2012-10-26T18:58:16 Removed the old preprocessor source, interface and license. TRAC #21966 Signed-off-by: Daniel Koch Author: Nicolas Capens git-svn-id: https://angleproject.googlecode.com/svn/trunk@1325 736b8ea6-26fd-11df-bfd4-992fa37f6226
daniel@transgaming.com c60c15c0 2012-10-17T18:15:14 Add filter files for VS2010 Solution browser Trac #21647 git-svn-id: https://angleproject.googlecode.com/svn/trunk@1300 736b8ea6-26fd-11df-bfd4-992fa37f6226
daniel@transgaming.com 2187b4a3 2012-10-17T18:12:07 Delete old .vcproj files that were replaced by .vcxproj files Trac #21647 Signed-off-by: Shannon Woods Signed-off-by: Nicolas Capens git-svn-id: https://angleproject.googlecode.com/svn/trunk@1298 736b8ea6-26fd-11df-bfd4-992fa37f6226
daniel@transgaming.com e9b408bf 2012-10-17T18:11:40 Add auto converted .vxcproj files for VC++ 2010 Express Trac #21647 Signed-off-by: Shannon Woods Signed-off-by: Nicolas Capens git-svn-id: https://angleproject.googlecode.com/svn/trunk@1295 736b8ea6-26fd-11df-bfd4-992fa37f6226
maxvujovic@gmail.com 433f4aaa 2012-07-18T17:29:52 Fix always true condition in assert in MacroExpander.cpp. Issue: 349 Review URL: https://codereview.appspot.com/6420046/ git-svn-id: https://angleproject.googlecode.com/svn/trunk@1228 736b8ea6-26fd-11df-bfd4-992fa37f6226
alokp@chromium.org 6c0c2d87 2012-07-18T15:49:56 Do not call MacroExpander::popMacro() from MacroExpander::~MacroExpander(). MacroExpander::popMacro() assumes that the macro being popped has been fully parsed. This may not be true for MacroExpander destructor which may get called anytime the compiler decides to abort the compilation process. This patch just deletes the macro-contexts pushed in the stack without validating the parse state of current macro. BUG=348 Review URL: https://codereview.appspot.com/6415043 git-svn-id: https://angleproject.googlecode.com/svn/trunk@1227 736b8ea6-26fd-11df-bfd4-992fa37f6226
maxvujovic@gmail.com e640ef8e 2012-07-13T18:42:40 Make the new preprocessor backwards compatible with Bison 2.3 Review URL: http://codereview.appspot.com/6356098/ git-svn-id: https://angleproject.googlecode.com/svn/trunk@1224 736b8ea6-26fd-11df-bfd4-992fa37f6226
alokp@chromium.org fc0543f4 2012-07-11T20:31:02 This patch reverts r1203, but in slightly different way. It seems there is a problem with the config of memory bots. The usage of std::locale in ANGLE is fine. Review URL: https://codereview.appspot.com/6392052 git-svn-id: https://angleproject.googlecode.com/svn/trunk@1205 736b8ea6-26fd-11df-bfd4-992fa37f6226
apatrick@chromium.org 39a94266 2012-07-10T23:30:30 Reconstructed preprocessor.vcproj from libGLESv2.vcproj. There was something different about the project properties in release builds that caused std::vector to have different member variable offsets, leading to the samples crashing in Release builds. Removed stuff that was specific to libGLESv2.vcproj. Project now builds in all configs including x64. Review URL: https://codereview.appspot.com/6374050 git-svn-id: https://angleproject.googlecode.com/svn/trunk@1204 736b8ea6-26fd-11df-bfd4-992fa37f6226
alokp@chromium.org 828ec8fa 2012-07-10T17:50:12 Builds for chrome memroy bots (windows only) do not link due to the usage of std::locale, the reason for which is still unknown. This patch avoids the usage of std::locale, while still enforcing "C" locale and checking for overflow. Review URL: https://codereview.appspot.com/6392046 git-svn-id: https://angleproject.googlecode.com/svn/trunk@1203 736b8ea6-26fd-11df-bfd4-992fa37f6226
alokp@chromium.org c0a1eb3c 2012-07-09T18:27:04 Fixed compile error on android. It was complaining about tolower. This patch removes the usage of tolower, and adds tests for checking both versions of hexadecimal integers - 0x and 0X. git-svn-id: https://angleproject.googlecode.com/svn/trunk@1195 736b8ea6-26fd-11df-bfd4-992fa37f6226
alokp@chromium.org c022c3af 2012-07-09T15:56:42 WebGL spec specifies maximum length of all types of tokens - not just identifier tokens. And it also means preprocessing-tokens, not compiler tokens. Note that this implies that non-compliant tokens even inside excluded #if blocks will trigger error. TODO: This behavior should be implemented as a preprocessor option, so that a GLES2 compiler can choose to disable it. Review URL: https://codereview.appspot.com/6355066 git-svn-id: https://angleproject.googlecode.com/svn/trunk@1193 736b8ea6-26fd-11df-bfd4-992fa37f6226
alokp@chromium.org d35efdf5 2012-07-03T19:33:10 Restricted the length of identifiers (including #define directive) to 256, as required by webgl spec. git-svn-id: https://angleproject.googlecode.com/svn/trunk@1186 736b8ea6-26fd-11df-bfd4-992fa37f6226
alokp@chromium.org 390209ae 2012-07-03T16:12:48 Lowered the severity of EOF_IN_DIRECTIVE from an ERROR to WARNING. There are just too many shaders on internet (including webgl conformance test) that do not have a newline at the end of directives, especially #endif. Review URL: https://codereview.appspot.com/6352059 git-svn-id: https://angleproject.googlecode.com/svn/trunk@1185 736b8ea6-26fd-11df-bfd4-992fa37f6226
alokp@chromium.org d0d9f87a 2012-07-03T16:06:40 Make sure that #version occurs before anything else, except for comments and white space. Review URL: https://codereview.appspot.com/6348056 git-svn-id: https://angleproject.googlecode.com/svn/trunk@1184 736b8ea6-26fd-11df-bfd4-992fa37f6226
alokp@chromium.org 2e81891c 2012-06-29T21:26:03 Handled the case where int and float are of correct format, but large. The GLSL spec is not very clear on how integers should be interpreted for expressions. C99 says the expression is of type intmax_t. I am parsing all integers as int except those in expressions, which are being parsed as unsigned int. Review URL: https://codereview.appspot.com/6351051 git-svn-id: https://angleproject.googlecode.com/svn/trunk@1179 736b8ea6-26fd-11df-bfd4-992fa37f6226
alokp@chromium.org 6b495719 2012-06-29T00:06:58 Moved error-counting to Diagnostics so that errors generated during preprocessing is included in the count. Enabled logging of preprocessor diagnostics into info-log. Review URL: https://codereview.appspot.com/6354047 git-svn-id: https://angleproject.googlecode.com/svn/trunk@1177 736b8ea6-26fd-11df-bfd4-992fa37f6226
alokp@chromium.org f115592d 2012-06-28T23:34:30 Used std::ostringstream instead of std::stringstream wherever applicable. git-svn-id: https://angleproject.googlecode.com/svn/trunk@1176 736b8ea6-26fd-11df-bfd4-992fa37f6226
alokp@chromium.org 5b6a68e0 2012-06-28T20:29:13 Replaced pp::Token::value with pp::Token::text. The term value will be used for a function which will convert text to integer/float constant. git-svn-id: https://angleproject.googlecode.com/svn/trunk@1175 736b8ea6-26fd-11df-bfd4-992fa37f6226
maxvujovic@gmail.com c6b3b3c7 2012-06-27T22:49:39 Fix the compiler warnings on WebKit ports when updating ANGLE in WebKit. Remove the varargs used for extra info formatting in the error() and warning() methods of ParseHelper. Use std::stringstream for formatting instead. Review URL: http://codereview.appspot.com/6310067/ git-svn-id: https://angleproject.googlecode.com/svn/trunk@1170 736b8ea6-26fd-11df-bfd4-992fa37f6226
alokp@chromium.org 432d6fc4 2012-06-27T22:13:21 Introduced preprocessing token types. This fixes a bug where invalid tokens inside excluded conditional block may report diagnostics. Now we let the invalid tokens to bubble through the preprocessor so that they have chance to be skipped. Review URL: https://codereview.appspot.com/6356045 git-svn-id: https://angleproject.googlecode.com/svn/trunk@1169 736b8ea6-26fd-11df-bfd4-992fa37f6226
alokp@chromium.org d39ec4c1 2012-06-26T04:37:55 Implemented conditional processing. Review URL: https://codereview.appspot.com/6333046 git-svn-id: https://angleproject.googlecode.com/svn/trunk@1168 736b8ea6-26fd-11df-bfd4-992fa37f6226
alokp@chromium.org e6357c0e 2012-06-19T20:24:23 Added x64 config to preprocessor.vcproj. Review URL: https://codereview.appspot.com/6295105 git-svn-id: https://angleproject.googlecode.com/svn/trunk@1161 736b8ea6-26fd-11df-bfd4-992fa37f6226
alokp@chromium.org b197c885 2012-06-19T18:53:39 Fixed build for manually-maintained vcproj files. Review URL: https://codereview.appspot.com/6297103 git-svn-id: https://angleproject.googlecode.com/svn/trunk@1159 736b8ea6-26fd-11df-bfd4-992fa37f6226
alokp@chromium.org 73bc298e 2012-06-19T18:48:05 Hooked up the new preprocessor behind a compile-time flag ANGLE_USE_NEW_PREPROCESSOR. Review URL: https://codereview.appspot.com/6304095 git-svn-id: https://angleproject.googlecode.com/svn/trunk@1158 736b8ea6-26fd-11df-bfd4-992fa37f6226
alokp@chromium.org f3cdb460 2012-06-19T18:39:48 Added support for pre-defined macros. Review URL: https://codereview.appspot.com/6301084 git-svn-id: https://angleproject.googlecode.com/svn/trunk@1157 736b8ea6-26fd-11df-bfd4-992fa37f6226
alokp@chromium.org a19572ce 2012-06-15T16:30:08 Fixed compile error on linux. git-svn-id: https://angleproject.googlecode.com/svn/trunk@1151 736b8ea6-26fd-11df-bfd4-992fa37f6226
alokp@chromium.org 8b851c6d 2012-06-15T16:25:11 Preparation of hooking up the new preprocessor. - Added custom Diagnostics class. Routed all info-log messages via this new class. - Added custom DirectiveHandler class. Moved directive-handling code to this class and routed the old path. - Deleted lexer_glue because it is not needed anymore. The new preprocessor is almost ready! - Killed a bunch of dead code related to PragmaTable. Review URL: https://codereview.appspot.com/6308074 git-svn-id: https://angleproject.googlecode.com/svn/trunk@1150 736b8ea6-26fd-11df-bfd4-992fa37f6226
alokp@chromium.org 46aa13d8 2012-06-15T15:40:27 Implemented line directive. Review URL: https://codereview.appspot.com/6307083 git-svn-id: https://angleproject.googlecode.com/svn/trunk@1149 736b8ea6-26fd-11df-bfd4-992fa37f6226
alokp@chromium.org 7fc38ddd 2012-06-14T18:23:23 Implemented macro expansion. Review URL: https://codereview.appspot.com/6303052 git-svn-id: https://angleproject.googlecode.com/svn/trunk@1148 736b8ea6-26fd-11df-bfd4-992fa37f6226
daniel@transgaming.com 69ab2993 2012-06-13T15:42:30 Remove an unused variable from readCPPline() This causes problems with -Wunused-but-set-variable in GCC 4.6. Review: http://codereview.appspot.com/6296o59/ Author: Steve Block git-svn-id: https://angleproject.googlecode.com/svn/trunk@1147 736b8ea6-26fd-11df-bfd4-992fa37f6226
alokp@chromium.org 19d7aa60 2012-05-31T17:34:05 Fixed the location of EOF token. Added three new location tests for EOF. git-svn-id: https://angleproject.googlecode.com/svn/trunk@1125 736b8ea6-26fd-11df-bfd4-992fa37f6226