|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
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
|
|
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
|