8333a7b6e3a8a49ef5b7b673ca0c0bb3369b5222 |
02-Jan-2013 |
Adam Jackson <ajax@redhat.com> |
glcpp: Typo fix. Note: this is a candidate for the 9.0 stable branch. Signed-off-by: Adam Jackson <ajax@redhat.com> (cherry picked from commit 86b6964ef9839f1bd5a05efe47712843c97196ca)
akefile.am
|
7eddf861859135caea9cea20576d024909660d95 |
02-Jan-2013 |
Adam Jackson <ajax@redhat.com> |
glcpp: Fix visibility CFLAGS in automake Note: this is a candidate for the 9.0 stable branch. Signed-off-by: Adam Jackson <ajax@redhat.com> (cherry picked from commit 0daabd52394899ec4947dc2cf3119201d2e79b1c)
akefile.am
|
a3f5601465086bfcda4e68c3c55a284dd84879c6 |
06-Nov-2012 |
Matt Turner <mattst88@gmail.com> |
glcpp: Reject garbage after #else and #endif tokens Previously we were accepting garbage after #else and #endif tokens when the previous preprocessor conditional evaluated to false (eg, #if 0). When the preprocessor hits a false conditional, it switches the lexer into the SKIP state, in which it ignores non-control tokens. The parser pops the SKIP state off the stack when it reaches the associated #elif, #else, or #endif. Unfortunately, that meant that it only left the SKIP state after the lexing the entire line containing the #token and thus would accept garbage after the #token. To fix this we use a mid-rule, which is executed immediately after the #token is parsed. NOTE: This is a candidate for the stable branch Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=56442 Fixes: preprocess17_frag.test from oglconform Reviewed-by: Carl Worth <cworth@cworth.org> (glcpp-parse.y) Acked-by: Ian Romanick <ian.d.romanick@intel.com> Reviewed-by: Kenneth Graunke <kenneth@whitecape.org> (cherry picked from commit 060e69679925f171cfcc2a5f84fab1d833a7e804)
lcpp-parse.y
ests/102-garbage-after-endif.c
ests/102-garbage-after-endif.c.expected
ests/103-garbage-after-else.c
ests/103-garbage-after-else.c.expected
|
a908f4a75401284dd45bf559de18c83adaacb335 |
22-Oct-2012 |
Kenneth Graunke <kenneth@whitecape.org> |
glcpp: Don't use infinite lookhead for #define differentiation. Previously, we used lookahead patterns to differentiate: #define FOO(x) function macro #define FOO (x) object macro Unfortunately, our rule for function macros: {HASH}define{HSPACE}+/{IDENTIFIER}"(" relies on infinite lookahead, and apparently triggers a Flex bug where the generated code overflows a state buffer (see YY_STATE_BUF_SIZE). There's no need to use infinite lookahead. We can simply change state, match the identifier, and use a single character lookahead for the '('. This apparently makes Flex not generate the giant state array, which avoids the buffer overflow, and should be more efficient anyway. Fixes piglit test 17000-consecutive-chars-identifier.frag. NOTE: This is a candidate for every release branch ever. Signed-off-by: Kenneth Graunke <kenneth@whitecape.org> Reviewed-by: Carl Worth <cworth@cworth.org> (cherry picked from commit 9142ade15416415f2d5eb20b093b898c649cd2bb)
lcpp-lex.l
lcpp-parse.y
|
7cfd42cefe1949af51ecced9891f415eca2c0e66 |
14-Sep-2012 |
Dave Airlie <airlied@redhat.com> |
mesa/glsl: rename preprocess to glcpp_preprocess This symbol with dricore escapes into the namespace, its too generic, we should prefix it with something just to be nice. Should be applied to stable + 9.0 Acked-by: Kenneth Graunke <kenneth@whitecape.org> Signed-off-by: Dave Airlie <airlied@redhat.com> (cherry picked from commit 88b0790b1ae8864d4ec6196b3939498bbffdbb5f)
lcpp.c
lcpp.h
p.c
|
8f7990c5f2ca25e42c7fefff6312bee2ff77e134 |
14-Sep-2012 |
Dave Airlie <airlied@gmail.com> |
glcpp: fix abuse of yylex So glcpp tried to workaround yylex its own way, but failed, do it properly. This fixes another crash found after fixing the first crash. this is a candidate for 9.0 and stable branches Reviewed-by: Kenneth Graunke <kenneth@whitecape.org> Signed-off-by: Dave Airlie <airlied@redhat.com> (cherry picked from commit 53d46bc787318ccf9911fdd1d5fe99ee4db7f41a)
akefile.am
lcpp-parse.y
|
77a3efc6b907943903190b385fdf107c4acfcdca |
18-Jul-2012 |
Christopher James Halse Rogers <christopher.halse.rogers@canonical.com> |
build/glsl: fix location of generated files. Like in src/mesa, use GLSL_BUILDDIR/GLSL_SRCDIR to unambiguously distinguish between in-tree and generated files. Reviewed-by: Eric Anholt <eric@anholt.net> Signed-off-by: Christopher James Halse Rogers <christopher.halse.rogers@canonical.com>
akefile.am
|
dcf8754cce1af09547a5976a74ba807bc6f2657c |
28-Jul-2012 |
Kenneth Graunke <kenneth@whitecape.org> |
glcpp: Add a newline to expanded #line directives. Otherwise, the preprocessor happily outputs #line 2 4 <your next line of code> and the main compiler gets horribly confused and fails to compile. This is not the right solution (line numbers in error messages will likely be off-by-one in certain circumstances), but until Carl comes up with a proper fix, this gets programs running again. Fixes regressions in Regnum Online, Overgrowth, Piglit, and others since commit aac78ce8234d96932c38b3f48b1d828077bc0027. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=51802 Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=51506 Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=41152 Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
lcpp-parse.y
|
68e04cc6014bf7a2c9bd0b3b783b4ec12aa2e824 |
29-Jun-2012 |
Jon TURNEY <jon.turney@dronecode.org.uk> |
automake: convert libglsl v2: Use AM_V_GEN to silence generated code rules. Add BUILT_SOURCES to CLEANFILES v3: - Fix an accidental // in a path - Use automake make rules for lex/yacc rather than writing our own - Update .gitignore appropriately - Build a libglcpp convenience library rather than awkwardly including the files in libglsl and delegating the generation - Remove libglsl.a compatibility link on clean v4: - Automake's rules for lex/yacc make .cc if source is .ll or .yy, and apparently we must use those extensions "because of scons", so update everywhere glsl_parser.cpp -> glsl_parser.cc and glsl_lexer.cpp -> glsl_lexer.cc. This fixes 'make tarballs' and building with dricore enabled. Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> Reviewed-by: Eric Anholt <eric@anholt.net> Tested-by: Matt Turner <mattst88@gmail.com>
gitignore
akefile.am
|
532e99cbf26d175220eac245b12011939ea07d0c |
04-Jul-2012 |
Kenneth Graunke <kenneth@whitecape.org> |
glcpp: Add built-in #define for GL_ARB_uniform_buffer_object. Signed-off-by: Kenneth Graunke <kenneth@whitecape.org> Reviewed-by: Eric Anholt <eric@anholt.net>
lcpp-parse.y
|
d8e61f8f86bfb078a35222f95ad4b0b4e6283f53 |
10-Jun-2012 |
Carl Worth <cworth@cworth.org> |
glsl: glcpp: Extend testing of #line directives The most recent commit adds support for comments and macro expansion on #line directives. Add testing to verify the new features. Signed-off-by: Carl Worth <cworth@cworth.org> Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
ests/091-hash-line.c
ests/091-hash-line.c.expected
|
aac78ce8234d96932c38b3f48b1d828077bc0027 |
10-Jun-2012 |
Carl Worth <cworth@cworth.org> |
glsl: glcpp: Move handling of #line directives from lexer to parser. The GLSL specification requires that #line directives be interpreted after macro expansion. Our existing implementation of #line macros in the lexer prevents conformance on this point. Moving the handling of #line from the lexer to the parser gives us the macro expansion we need. An additional benefit is that the preprocessor also now supports comments on the same line as #line directives. Finally, the preprocessor now emits the (fully-macro-expanded) #line directives into the output. This allows the full GLSL compiler to also see and interpret these directives so it can also generate correct line numbers in error messages. Signed-off-by: Carl Worth <cworth@cworth.org> Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
lcpp-lex.l
lcpp-parse.y
lcpp.h
ests/091-hash-line.c.expected
|
39f8c46eaa4d1c3b072cd97d256fe973c1791b14 |
10-Jun-2012 |
Carl Worth <cworth@cworth.org> |
glsl: glcpp: Rename and document _glcpp_parser_expand_if This function is currently used only in the expansion of #if lines, but we will soon be using it more generally (for the expansion of (_glcpp_parser_expand_and_lex_from) and some more documentation. Signed-off-by: Carl Worth <cworth@cworth.org> Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
lcpp-parse.y
|
1db463ce2e2812c4e41ab4096ff16a148d4bcc90 |
09-Jun-2012 |
Carl Worth <cworth@cworth.org> |
glsl: Consistently use length-based ralloc string functions for info_log. Commit b823b99ec0f13af257dcd885f436a4d294c6222a switched from using functions such as ralloc_asprintf and ralloc_strcat to ralloc_asprintf_rewrite_tail. This change maintains the string's length as a aparamter that is updated by the ralloc functions (rather than recomputing it with strlen over and over). However, the change failed to updated two locations (glcpp_error and glcpp_warning), with the result that the string's length wasn't updated by these calls. Then, subsequent calls to other ralloc_asprintf_rewrite_tail would overwrite the text appended by glcpp_error. This commit fixes the two missing updates, and restores line numbers to the output of glcpp error messages, (as noticed by a glcpp unit test case that has been failing since the above-mentioned commit). Signed-off-by: Carl Worth <cworth@cworth.org> Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
p.c
|
c96b8302a398a6db27f1bb6070cdc088c7ee0fba |
09-Jun-2012 |
Carl Worth <cworth@cworth.org> |
glsl: glcpp: Allow "#if undefined-macro' to evaluate to false. A strict reading of the GLSL specification would have this be an error, but we've received reports from users who expect the preprocessor to interepret undefined macros as 0. This is the standard behavior of the rpeprocessor for C, and according to these user reports is also the behavior of other OpenGL implementations. So here's one of those cases where we can make our users happier by ignoring the specification. And it's hard to imagine users who really, really want to see an error for this case. The two affected tests cases are updated to reflect the new behavior. Signed-off-by: Carl Worth <cworth@cworth.org> Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
lcpp-parse.y
ests/070-undefined-macro-in-expression.c
ests/070-undefined-macro-in-expression.c.expected
ests/098-elif-undefined.c
ests/098-elif-undefined.c.expected
|
ca9977d5c6f8e6ff8290bdf094d978487519d6f5 |
08-Jun-2012 |
Andreas Boll <andreas.boll.dev@gmail.com> |
glcpp: .gitignore cleanup *.o, *.lo and *~ are already in toplevel .gitignore Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
gitignore
|
199771bc325900eb1d3acc7fa03808894a94fdb2 |
30-Apr-2012 |
Olivier Galibert <galibert@pobox.com> |
glsl: Scaffolding for ARB_shader_bit_encoding. That adds support for activating the extension. It doesn't actually *do* anything yet, of course. Signed-off-by: Olivier Galibert <galibert@pobox.com> Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
lcpp-parse.y
|
b41ab3b42c989926389e599d5794412a628f277f |
16-Mar-2012 |
Paul Berry <stereotype441@gmail.com> |
Add .deps/, .libs/, and *.la to toplevel .gitignore To avoid redundancies, this patch also removes .deps, .libs, and *.la from .gitignore files in subdirectories. Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
gitignore
|
b823b99ec0f13af257dcd885f436a4d294c6222a |
10-Feb-2012 |
Kenneth Graunke <kenneth@whitecape.org> |
glcpp: Don't strlen() the output for every token being printed. The ralloc string appending functions were originally intended for simple, non-hot-path uses like printing to an info log. Cuts Unigine Tropics load time by around 20% (6 seconds). v2: Avoid strlen() on every newline, too. Signed-off-by: Kenneth Graunke <kenneth@whitecape.org> Reviewed-by: Ian Romanick <ian.d.romanick@intel.com> [v1] Acked-by: José Fonseca <jfonseca@vmware.com> [v1]
lcpp-parse.y
lcpp.h
|
cd2e2187cb45accb13bf89ef297324332c46f379 |
02-Feb-2012 |
Carl Worth <cworth@cworth.org> |
glsl: Avoid ralloc_stealing a long-lived object to a short-lived parent In commit 6ecee54a9aecc120cb68b02f7e14dcac86b9eca2 a call to talloc_reference was replaced with a call to talloc_steal. This was in preparation for moving to ralloc which doesn't support reference counting. The justification for talloc_steal within token_list_append in that commit is that the tokens are being copied already. But the copies are shallow, so this does not work. Fortunately, the lifetime of these tokens is easy to understand. A token list for "replacements" is created and stored in a hash table when a function-like macro is defined. This list will live until the macro is #undefed (if ever). Meanwhile, a shallow copy of the list is created when the macro is used and the list expanded. This copy is short-lived, so is unsuitable as a new parent. So we can just let the original, longer-lived owner continue to own the underlying objects and things will work. This fixes bug #45082: "ralloc.c:78: get_header: Assertion `info->canary == 0x5A1106' failed." when using a macro in GLSL https://bugs.freedesktop.org/show_bug.cgi?id=45082 Reviewed-by: Kenneth Graunke <kenneth@whitecape.org> NOTE: This is a candidate for stable release branches.
lcpp-parse.y
|
64fd26a8a812f66f1291d897df7953b8ac9e2f1b |
02-Feb-2012 |
Carl Worth <cworth@cworth.org> |
glsl: Add glcpp tests for a macro used twice This test cases exposes a bug as described in this bug report: "ralloc.c:78: get_header: Assertion `info->canary == 0x5A1106' failed." when using a macro in GLSL https://bugs.freedesktop.org/show_bug.cgi?id=45082 Clearly, some memory is getting (incorrectly) freed on the first macro invocation, leading to problems with the second macro invocation. Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
ests/101-macros-used-twice.c
ests/101-macros-used-twice.c.expected
|
7ab1c7f7926c75a07f33eb149d0fc17dcfaffd5e |
21-Jan-2012 |
Carl Worth <cworth@cworth.org> |
glcpp: Fix so that trailing punctuation does not prevent macro expansion The trick here is that flex always chooses the rule that matches the most text. So with a input text of "two:" which we want to be lexed as an IDENTIFIER token "two" followed by an OTHER token ":" the previous OTHER rule would match longer as a single token of "two:" which we don't want. We prevent this by forcing the OTHER pattern to never match any characters that appear in other constructs, (no letters, numbers, #, _, whitespace, nor any punctuation that appear in CPP operators). Fixes bug #44764: GLSL preprocessor doesn't replace defines ending with ":" https://bugs.freedesktop.org/show_bug.cgi?id=44764 Reviewed-by: Kenneth Graunke <kenneth@whitecape.org> NOTE: This is a candidate for stable release branches.
lcpp-lex.l
|
e931b0e05b19259b0f5b53faf73b375013ab1cb3 |
21-Jan-2012 |
Carl Worth <cworth@cworth.org> |
glcpp: Add new test showing bug where a trailing ':' prevents macro expansion This demonstrates a bug that was recently triggered in piglit. Here is the original bug report (containing a test case almost identical to this one): https://bugs.freedesktop.org/show_bug.cgi?id=44764 Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
ests/100-macro-with-colon.c
ests/100-macro-with-colon.c.expected
|
a99164956f1ade01909123ba196ef01282f41675 |
01-Feb-2012 |
Matt Turner <mattst88@gmail.com> |
Revert "automake: src/glsl and src/glsl/glcpp" This reverts commit 9947656168d09f9019600fccc42ca8e0de49b83a.
gitignore
akefile.am
|
70dd17152dca228675f955da41bc9d285c6177d4 |
01-Feb-2012 |
Matt Turner <mattst88@gmail.com> |
Revert "src/glsl/glcpp: wire up glcpp-test to make check" This reverts commit 2bb9f9e1fda61fceb9284cbb4619d7e60e39f190.
akefile.am
ests/glcpp-test
|
2bb9f9e1fda61fceb9284cbb4619d7e60e39f190 |
29-Jan-2012 |
Matt Turner <mattst88@gmail.com> |
src/glsl/glcpp: wire up glcpp-test to make check Reviewed-by: Eric Anholt <eric@anholt.net> Tested-by: Eric Anholt <eric@anholt.net> Signed-off-by: Matt Turner <mattst88@gmail.com>
akefile.am
ests/glcpp-test
|
82060adcde88eb57cc0a3b71d23f003f5637986f |
29-Jan-2012 |
Matt Turner <mattst88@gmail.com> |
glcpp-test: don't return failure if valgrind tests aren't run Success was (tests-passed AND valgrind-tests-passed) but this meant that if the valgrind tests weren't run it would be considered a failure. The logic is now (tests-passed AND (!valgrind OR valgrind-tests-passed)) which lets us return success if the valgrind tests aren't run. Reviewed-by: Eric Anholt <eric@anholt.net> Tested-by: Eric Anholt <eric@anholt.net> Signed-off-by: Matt Turner <mattst88@gmail.com>
ests/glcpp-test
|
9947656168d09f9019600fccc42ca8e0de49b83a |
27-Jan-2012 |
Matt Turner <mattst88@gmail.com> |
automake: src/glsl and src/glsl/glcpp Reviewed-by: Eric Anholt <eric@anholt.net> Tested-by: Eric Anholt <eric@anholt.net> Signed-off-by: Matt Turner <mattst88@gmail.com>
gitignore
akefile.am
|
bbcb648bc2f45dd85e33c7301527c8f6d97cbce6 |
19-Nov-2011 |
Marek Olšák <maraeo@gmail.com> |
mesa: rename the AMD_conservative_depth extension flag to ARB Reviewed-by: Kenneth Graunke <kenneth@whitecape.org> Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
lcpp-parse.y
|
54346d1f9b31de531c202ffe26b72551326ad7ae |
11-Nov-2011 |
Morgan Armand <morgan.devel@gmail.com> |
glcpp: Add GL_ARB_draw_instanced #define.
lcpp-parse.y
|
2903816aadb281716b6c59a5a48aeadb84a08f50 |
23-Oct-2011 |
Chia-I Wu <olv@lunarg.com> |
glsl: add support for GL_OES_EGL_image_external This extension introduces a new sampler type: samplerExternalOES. texture2D (and texture2DProj) can be used to do a texture look up in an external texture. Reviewed-by: Brian Paul <brianp@vmware.com> Acked-by: Jakob Bornecrantz <jakob@vmware.com> Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
lcpp-parse.y
|
201485bae0fcba4db61ceb1e9d9916778b5bba74 |
30-Sep-2011 |
Carl Worth <cworth@cworth.org> |
glcpp: Add a test for #elif with an undefined macro. As written, this test correctly raises an error for #elif being used with an undefined macro (and not as an argument to "defined"). If the preceding #if were '#if 1' then this diagnositc would correctly be hidden. That allows code such as the following to not raise an error: #ifndef MAYBE_UNDEFINED #elif MAYBE_UNDEFINED < 5 ... #endif So this test case is working as expected already. We add it here just to improve test coverage. Reviewed-by: Kenneth Graunke <kenneth@whitecape.org> Signed-off-by: Carl Worth <cworth@cworth.org>
ests/098-elif-undefined.c
ests/098-elif-undefined.c.expected
|
c4aaf7943c2cdff0e2148b5c05813356dc99696d |
30-Sep-2011 |
Carl Worth <cworth@cworth.org> |
glcpp: Raise error if defining any macro containing two consecutive underscores The specification reserves any macro name containing two consecutive underscores, (anywhere within the name). Previously, we only raised this error for macro names that started with two underscores. Fix the implementation to check for two underscores anywhere, and also update the corresponding 086-reserved-macro-names test. This also fixes the following two piglit tests: spec/glsl-1.30/preprocessor/reserved/double-underscore-02.frag spec/glsl-1.30/preprocessor/reserved/double-underscore-03.frag Reviewed-by: Kenneth Graunke <kenneth@whitecape.org> Reviewed-by: Eric Anholt <eric@anholt.net> Signed-off-by: Carl Worth <cworth@cworth.org>
lcpp-parse.y
ests/086-reserved-macro-names.c
ests/086-reserved-macro-names.c.expected
|
28842c2331e6df2cbe18c0be3487ece93680075d |
30-Sep-2011 |
Carl Worth <cworth@cworth.org> |
glcpp: Implement token pasting for non-function-like macros This is as simple as abstracting one existing block of code into a function call and then adding a single call to that function for the case of a non-function-like macro. This fixes the recently-added 097-paste-with-non-function-macro test as well as the following piglit tests: spec/glsl-1.30/preprocessor/concat/concat-01.frag spec/glsl-1.30/preprocessor/concat/concat-02.frag Also, the concat-04.frag test now passes for the right reason. The test is intended to fail the compilation, but before this commit it was failing compilation (and hence passing the test) for the wrong reason. Reviewed-by: Kenneth Graunke <kenneth@whitecape.org> Signed-off-by: Carl Worth <cworth@cworth.org>
lcpp-parse.y
|
7bb3403e0172a440b8100bcf1db8462f50a254cc |
30-Sep-2011 |
Carl Worth <cworth@cworth.org> |
glcpp: Test a non-function-like macro using the token paste operator Apparently we never implemented this, (but we've got a GLSL 1.30 test in piglit that is exercising this case). Reviewed-by: Kenneth Graunke <kenneth@whitecape.org> Signed-off-by: Carl Worth <cworth@cworth.org>
ests/097-paste-with-non-function-macro.c
ests/097-paste-with-non-function-macro.c.expected
|
3c01a589448b92945f26bd7e3bfa75155c06f3cf |
30-Sep-2011 |
Carl Worth <cworth@cworth.org> |
glcpp: Fix two (or more) successive applications of token pasting There was already a loop here to look for multiple token pastes, but it was mistakenly incrementing the iterator counter after performing one paste. Instead, leave the loop iterator in place to coalesce as many tokens as necessary into one. This fixes the recently add 096-paste-twice test as well as the following piglit test: spec/glsl-1.30/preprocessor/concat/concat-03.frag Reviewed-by: Kenneth Graunke <kenneth@whitecape.org> Signed-off-by: Carl Worth <cworth@cworth.org>
lcpp-parse.y
|
8e6b99e7b13da33547fcc8388fe867e851ee0bda |
30-Sep-2011 |
Carl Worth <cworth@cworth.org> |
glcpp: Add a test for a macro that implements token pasting twice. This is something that piglit is exercising that currently fails. Reviewed-by: Kenneth Graunke <kenneth@whitecape.org> Signed-off-by: Carl Worth <cworth@cworth.org>
ests/096-paste-twice.c
ests/096-paste-twice.c.expected
|
9a3bd5e0452c9c791ba94155d3c9ddba42abd114 |
29-Aug-2011 |
Ian Romanick <ian.d.romanick@intel.com> |
glsl: Silence several "warning: unused parameter"
lcpp.c
|
778ecc928388b2905d516743d0bdf19ffce03acb |
25-Aug-2011 |
Kenneth Graunke <kenneth@whitecape.org> |
glcpp: Add GL_ARB_conservative_depth #define. Forgotten in the patch that enabled the extension. Reviewed-by: Ian Romanick <ian.d.romanick@intel.com> Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
lcpp-parse.y
|
5a3a242a8fc4b9f0cac0e40786dd0c4831517473 |
19-Oct-2010 |
Kenneth Graunke <kenneth@whitecape.org> |
glsl: Add compiler support for ARB_shader_texture_lod. Signed-off-by: Kenneth Graunke <kenneth@whitecape.org> Tested-by: Marek Olšák <maraeo@gmail.com>
lcpp-parse.y
|
9dacbe222641443af000a82161922a5ade206340 |
15-Apr-2011 |
Carl Worth <cworth@cworth.org> |
glcpp: Fix attempts to expand recursive macros infinitely (bug #32835). The 095-recursive-define test case was triggering infinite recursion with the following test case: #define A(a, b) B(a, b) #define C A(0, C) C Here's what was happening: 1. "C" was pushed onto the active list to expand the C node 2. While expanding the "0" argument, the active list would be emptied by the code at the end of _glcpp_parser_expand_token_list 3. When expanding the "C" argument, the active list was now empty, so lather, rinse, repeat. We fix this by adjusting the final popping at the end of _glcpp_parser_expand_token_list to never pop more nodes then this particular invocation had pushed itself. This is as simple as saving the original state of the active list, and then interrupting the popping when we reach this same state. With this fix, all of the glcpp-test tests now pass. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=32835 Signed-off-by: Carl Worth <cworth@cworth.org> Reviewed-by: Ian Romanick <ian.d.romanick@intel.com> Reviewed-and-tested-by: Kenneth Graunke <kenneth@whitecape.org>
lcpp-parse.y
|
3d78f83cde0286ef352fefa1b018563c11642ff1 |
15-Apr-2011 |
Carl Worth <cworth@cworth.org> |
Add expected file for 095-recursive-define test case. It's clear enough that the current segmentation fault isn't what we want. And it's also very easy to know what we do want here, (just check with any functional C preprocessor such as "gcc -E"). Add the desired output as an expected file so that the test suite gives useful output, (showing the omitted output and the segfault), rather than just reporting "No such file" for the expected file.
ests/095-recursive-define.c.expected
|
02d293c08ee2375fc43b343bfc9b074f33a9063c |
15-Apr-2011 |
Carl Worth <cworth@cworth.org> |
glcpp: Simplify calling convention of parser's active_list functions These were all written as generic list functions, (accepting and returning a list to act upon). But they were only ever used with parser->active as the list. By simply accepting the parser itself, these functions can update parser->active and now return nothing at all. This makes the code a bit more compact. And hopefully the code is no less readable since the functions are also now renamed to have "_parser_active" in the name for better correlation with nearby tests of the parser->active field.
lcpp-parse.y
|
0b80f2d4c9fd672d75d647104bf0b0fdafec9dda |
14-Apr-2011 |
Carl Worth <cworth@cworth.org> |
glcpp: Add --valgrind option to the glcpp-test utility The common case for this test suite is to quickly test that everything returns the correct results. In this case, the second run of the test suite under valgrind was just annoying, (and the user would often interrupt it). Now, do what is wanted in the common case by default (just run the test suite), and require a run with "glcpp-test --valgrind" in order to test with valgrind.
ests/glcpp-test
|
6affa4806a74c0f81fefa0be0212ec8574a74f4d |
14-Apr-2011 |
Carl Worth <cworth@cworth.org> |
Add an expected file for 084-unbalanced-parentheses The expected file here captures the current behavior of glcpp (which is to generate an obscure "syntax error, unexpected $end" diagnostic for this case). It would certainly be better for glcpp to generate a nicer diagnostic, (such as "missing closing parenthesis in function-like macro definition" or so), but the current behavior is at least correct, and expected. So we can make the test suite more useful by marking the current behavior as expected.
ests/084-unbalanced-parentheses.c.expected
|
d3c6ed382d8e02cd9f9e2cc77208b800abe17d54 |
14-Apr-2011 |
Carl Worth <cworth@cworth.org> |
Add an expected file for 094-divide-by-zero-short-circuit The expected file here captures the current behavior of glcpp (which is to generate a division-by-zero error) for this case. It's easy to argue that it should be short-circuiting the evaluation and not generating the diagnostic (which happens to be what gcc does). But it doesn't seem like we should force this behavior on our pre-processor, (and, as always, the GLSL specification of the pre-processor is too vague on this point).
ests/094-divide-by-zero-short-circuit.c
ests/094-divide-by-zero-short-circuit.c.expected
|
ea3b2560b1dd0585fcf82a5d3179826374ae03b2 |
14-Apr-2011 |
Carl Worth <cworth@cworth.org> |
Add an expected file for 093-divide-by-zero This test is behaving just fine already---it's generating an informative diagnostic, ("error: division by 0 in preprocessor directive"), so adding this in the expected file makes things pass.
ests/093-divide-by-zero.c.expected
|
12d17bcadf79d473b29c902c1ac949dcc65ff354 |
04-Mar-2011 |
José Fonseca <jfonseca@vmware.com> |
glsl/glcpp: Use stdio.h instead of unistd.h.
lcpp.c
|
f52660c3dc85632b4dce76d16bf6d78266c35173 |
04-Mar-2011 |
José Fonseca <jfonseca@vmware.com> |
glsl: Define YY_NO_UNISTD_H on MSVC.
lcpp-lex.l
|
09e1bebc25140eecafa0c3eacefcf63010ce4f10 |
03-Mar-2011 |
Kenneth Graunke <kenneth@whitecape.org> |
glcpp: Remove trailing contexts from #if rules. These are now unnecessary.
lcpp-lex.l
|
f20656e9446b9acde55b9dd41a2b47d7d5b7a56a |
01-Mar-2011 |
Kenneth Graunke <kenneth@whitecape.org> |
glcpp: Rework lexer to use a SKIP state rather than REJECT. Previously, the rule deleted by this commit was matched every single time (being the longest match). If not skipping, it used REJECT to continue on to the actual correct rule. The flex manual advises against using REJECT where possible, as it is one of the most expensive lexer features. So using it on every match seems undesirable. Perhaps more importantly, it made it necessary for the #if directive rules to contain a look-ahead pattern to make them as long as the (now deleted) "skip the whole line" rule. This patch introduces an exclusive start state, SKIP, to avoid REJECTs. Each time the lexer is called, the code at the top of the rules section will run, implicitly switching the state to the correct one. Fixes piglit tests 16384-consecutive-chars.frag and 16385-consecutive-chars.frag.
lcpp-lex.l
|
b56f30c2b23f6d7b5499f01fa2d3ee04f2ce546e |
03-Mar-2011 |
Kenneth Graunke <kenneth@whitecape.org> |
glcpp/tests: Update 063-comments.c.expected to match output. The expected result has been out of sync with what glcpp produces for some time; glcpp's actual result seems to be correct and is very close to GCC's cpp. Updating this will make it easier to catch regressions in upcoming commits.
ests/063-comments.c.expected
|
2e756f3d6f15d61297a3bb4efe6a88c29081a5eb |
03-Mar-2011 |
Kenneth Graunke <kenneth@whitecape.org> |
glsl: Remove unused glcpp/Makefile.am. This is a remnant of when glsl2 lived in its own repository.
akefile.am
|
6dd0a2ed40309fe721eb1c6f8217d363b3a57f04 |
12-Feb-2011 |
Ian Romanick <ian.d.romanick@intel.com> |
Add generated parser / lexer files to gitignore lists
gitignore
|
cb48207e4bb85db636ea5201c8f0657bae202f59 |
01-Feb-2011 |
Ian Romanick <ian.d.romanick@intel.com> |
glcpp: Remove files generated by flex and bison from GIT
lcpp-lex.c
lcpp-parse.c
lcpp-parse.h
|
a0120e6e0f4fbf11a43725862a03f8dc6904bc4b |
12-Feb-2011 |
Ian Romanick <ian.d.romanick@intel.com> |
glcpp: regerated files These should have been committed right after fd1252ab, but they were missed. Soon, we'll never have to do this again...
lcpp-parse.c
lcpp-parse.h
|
fd1252ab67abb1ea351195e192429f292667a8a2 |
02-Feb-2011 |
Chad Versace <chad.versace@intel.com> |
glcpp: Raise error when modulus is zero For example, this now raises an error: #define XXX 1 / 0 Fixes bug: https://bugs.freedesktop.org//show_bug.cgi?id=33507 Fixes Piglit test: spec/glsl-1.10/preprocessor/modulus-by-zero.vert NOTE: This is a candidate for the 7.9 and 7.10 branches.
lcpp-parse.y
|
a1f5c46d24ed9952d5643364d2814425002b5690 |
31-Jan-2011 |
Brian Paul <brianp@vmware.com> |
glsl: regerated files
lcpp-parse.c
lcpp-parse.h
|
aacd07d623d60356cfad9f96a261310e12eed7c0 |
31-Jan-2011 |
Brian Paul <brianp@vmware.com> |
glsl: make _token_list_is_empty_ignoring_space() static To silence warning about missing prototype.
lcpp-parse.y
|
d3073f58c17d8675a2ecdd5dfa83e5520c78e1a8 |
21-Jan-2011 |
Kenneth Graunke <kenneth@whitecape.org> |
Convert everything from the talloc API to the ralloc API.
lcpp-lex.c
lcpp-lex.l
lcpp-parse.c
lcpp-parse.y
lcpp.c
lcpp.h
p.c
|
2a18d1950c84c96d263cc8f15434502e03aeb1dc |
28-Jan-2011 |
Carl Worth <cworth@cworth.org> |
Revert "glcpp: Demote "macro redefined" from an error to a warning" This reverts commit d3df641f0aba99b0b65ecd4d9b06798bca090a29. The original commit had sat unpushed on my machine for months. By the time I found it again, I had forgotten that we had decided not to use this change after all, (the relevant test was removed long ago).
EADME
lcpp-parse.c
lcpp-parse.y
ests/089-redefine-macro-error.c.expected
|
d3df641f0aba99b0b65ecd4d9b06798bca090a29 |
23-Aug-2010 |
Carl Worth <cworth@cworth.org> |
glcpp: Demote "macro redefined" from an error to a warning The GLSL specification is vague here, (just says "as is standard for C++"), though the C specifications seem quite clear that this should be an error. However, an existing piglit test (CorrectPreprocess11.frag) expects this to be a warning, not an error, so we change this, and document in README the deviation from the specification.
EADME
lcpp-parse.c
lcpp-parse.y
ests/089-redefine-macro-error.c.expected
|
39cad66a889b453d78e83e6a20560bcc338000de |
27-Jan-2011 |
Chad Versace <chad.versace@intel.com> |
glsl: Refresh autogenerated parser files For commits titled: glcpp: Conditionally define macro GL_AMD_conservative_depth glsl: Add support for AMD_conservative_depth to parser
lcpp-parse.c
|
0423f24eb8a415cf704c307c93e2a8647e799002 |
27-Jan-2011 |
Chad Versace <chad.versace@intel.com> |
glcpp: Conditionally define macro GL_AMD_conservative_depth Define macro GL_AMD_conservative_depth to 1 when its extension is enabled.
lcpp-parse.y
|
0db3161036f47447d72eebe26869779e264b3c8a |
16-Jan-2011 |
Kenneth Graunke <kenneth@whitecape.org> |
glcpp: Regenerate parser files.
lcpp-parse.c
|
6ecee54a9aecc120cb68b02f7e14dcac86b9eca2 |
16-Jan-2011 |
Kenneth Graunke <kenneth@whitecape.org> |
glcpp: Remove use of talloc reference counting. We almost always want to simply steal; we only need to copy when copying a token list (in which case we're already cloning stuff anyway).
lcpp-parse.y
|
a302d740bd1e90d3db2b8cee79b2d5ee1220f8bf |
11-Jan-2011 |
Ian Romanick <ian.d.romanick@intel.com> |
glcpp: Refresh autogenerated lexer and parser files. For the previous commit.
lcpp-parse.c
|
9ca5300b6e781150cec903c73cf5fd8e1deee2f1 |
10-Jan-2011 |
Ian Romanick <ian.d.romanick@intel.com> |
glcpp: Generate an error for division by zero When GCC encounters a division by zero in a preprocessor directive, it generates an error. Since the GLSL spec says that the GLSL preprocessor behaves like the C preprocessor, we should generate that same error. It's worth noting that I cannot find any text in the C99 spec that says this should be an error. The only text that I can find is line 5 on page 82 (section 6.5.5 Multiplicative Opertors), which says, "The result of the / operator is the quotient from the division of the first operand by the second; the result of the % operator is the remainder. In both operations, if the value of the second operand is zero, the behavior is undefined." Fixes 093-divide-by-zero.c test and bugzilla #32831. NOTE: This is a candidate for the 7.9 and 7.10 branches.
lcpp-parse.y
|
4e09a786d20ee5a2793e29d1cf336ad5383da22b |
11-Jan-2011 |
Chad Versace <chad.versace@intel.com> |
glcpp: Regenerate glcpp-parse.c
lcpp-parse.c
|
4fff52f1c973f2f284c142fbb31536a9656767c9 |
11-Jan-2011 |
Chad Versace <chad.versace@intel.com> |
glcpp: Fix segfault when validating macro redefinitions In _token_list_equal_ignoring_space(token_list_t*, token_list_t*), add a guard that prevents dereferncing a null token list. This fixes test src/glsl/glcpp/tests/092-redefine-macro-error-2.c and Bugzilla #32695.
lcpp-parse.y
|
5a3f31575bf0657661c3e66a4c95c3298c78e441 |
05-Jan-2011 |
Vinson Lee <vlee@vmware.com> |
glcpp: Add test for recursive #define.
ests/095-recursive-define.c
|
6530944b502a0f35b305ee35c1c6f1e32a887721 |
04-Jan-2011 |
Vinson Lee <vlee@vmware.com> |
glcpp: Add division by zero test cases.
ests/093-divide-by-zero.c
ests/094-divide-by-zero-short-circuit.c
|
f3319561a476bd806005551251dbc6a37f266e03 |
28-Dec-2010 |
Vinson Lee <vlee@vmware.com> |
glcpp: Add negative tests for redefintions with valueless macros.
ests/092-redefine-macro-error-2.c
ests/092-redefine-macro-error-2.c.expected
|
bd74101aeb88ce409cc7204c57c173c9c4e65368 |
07-Dec-2010 |
Kenneth Graunke <kenneth@whitecape.org> |
Refresh autogenerated glcpp parser.
lcpp-parse.c
|
800eed6765d43d35a338d3135b3204fa6a318afd |
07-Dec-2010 |
Kenneth Graunke <kenneth@whitecape.org> |
glcpp: Don't emit SPACE tokens in conditional_tokens production. Fixes glslparsertest defined-01.vert. Reported-by: José Fonseca <jfonseca@vmware.com> Signed-off-by: Kenneth Graunke <kenneth@whitecape.org> Acked-by: Carl Worth <cworth@cworth.org>
lcpp-parse.y
|
302fe4049c1f409655eb283e20f9ab6397ac3db4 |
17-Nov-2010 |
Kenneth Graunke <kenneth@whitecape.org> |
Regenerate glcpp parser.
lcpp-parse.c
|
d719bf8fb4b8f511fbb00dd990fb644efc510c0e |
17-Nov-2010 |
Kenneth Graunke <kenneth@whitecape.org> |
glsl: Unconditionally define GL_FRAGMENT_PRECISION_HIGH in ES2 shaders. This is really supposed to be defined only if the driver supports highp in the fragment shader - but all of our current ES2 implementations do. So, just define it. In the future, we'll need to add a flag to gl_context and only define the macro if the flag is set. "Fixes" freedesktop.org bug #31673.
lcpp-parse.y
|
bee901a1cf5f06a56c59189077d7f8c02a3af0d1 |
17-Nov-2010 |
Kenneth Graunke <kenneth@whitecape.org> |
Refresh autogenerated glcpp parser.
lcpp-parse.c
lcpp-parse.h
|
3fb83038a05bfcbc41e649b0b6c1a2c6ff41124c |
17-Nov-2010 |
Kenneth Graunke <kenneth@whitecape.org> |
glcpp: Define GL_FRAGMENT_PRECISION_HIGH if GLSL version >= 1.30. Per section 4.5.4 of the GLSL 1.30 specification.
lcpp-parse.y
|
46c19700676e17bfaa0a88346d512449fbeede79 |
03-Nov-2010 |
Benjamin Franzke <benjaminfranzke@googlemail.com> |
r600g: implement texture_get_handle (needed for eglExportDRMImageMESA)
lcpp-lex.c
|
94a36faed7ae0c795665b6cfb4dd4324ffaa5fa8 |
21-Oct-2010 |
Kenneth Graunke <kenneth@whitecape.org> |
glcpp: Refresh autogenerated lexer file.
lcpp-lex.c
|
bd55ba568b301d0f764cd1ca015e84e1ae932c8b |
21-Oct-2010 |
Kenneth Graunke <kenneth@whitecape.org> |
glcpp: Return NEWLINE token for newlines inside multi-line comments. This is necessary for the main compiler to get correct line numbers.
lcpp-lex.l
|
3322fbaf3b5e305ce00c1d08c26965bb98e0cef0 |
14-Oct-2010 |
Ian Romanick <ian.d.romanick@intel.com> |
glsl: Slightly change the semantic of _LinkedShaders Previously _LinkedShaders was a compact array of the linked shaders for each shader stage. Now it is arranged such that each slot, indexed by the MESA_SHADER_* defines, refers to a specific shader stage. As a result, some slots will be NULL. This makes things a little more complex in the linker, but it simplifies things in other places. As a side effect _NumLinkedShaders is removed. NOTE: This may be a candidate for the 7.9 branch. If there are other patches that get backported to 7.9 that use _LinkedShader, this patch should be cherry picked also.
lcpp.c
|
eafebed5bdfd853c6ec7f7275e219378e441c49c |
06-Oct-2010 |
Ian Romanick <ian.d.romanick@intel.com> |
glcpp: Regenerate files changes by previous commit
lcpp-parse.c
lcpp-parse.h
|
e0c9f67be5c47273416a50e011f70aa9e2021a65 |
06-Oct-2010 |
Ian Romanick <ian.d.romanick@intel.com> |
glcpp: Add the define for ARB_explicit_attrib_location when present
lcpp-parse.y
|
48e789d71e01b0a7185555735b4a26b1a53d0825 |
08-Sep-2010 |
Kenneth Graunke <kenneth@whitecape.org> |
glcpp: Fix build on non-GCC compilers.
lcpp-parse.c
lcpp-parse.y
|
7dcfc44b72f00ba5a38cb02123c80113440f0de9 |
05-Sep-2010 |
Kenneth Graunke <kenneth@whitecape.org> |
glsl: Define GL_ES preprocessor macro if API is OpenGL ES 2.0. Also define it if #version 100 is encountered.
lcpp-parse.c
lcpp-parse.h
lcpp-parse.y
lcpp.c
lcpp.h
p.c
|
1be5d1c887b3308865c8f4770138a9d70251392f |
27-Aug-2010 |
Brian Paul <brianp@vmware.com> |
glsl2: remove 'extern' keyword in .c file
p.c
|
653ddaab2636764b9e7999fa39b37edde7fe7c6d |
25-Aug-2010 |
Aras Pranckevicius <aras@unity3d.com> |
glsl/mesa: fixes for MSVC Signed-off-by: Brian Paul <brianp@vmware.com>
p.c
|
bfd7c9ac228c7ed8aec04c3b3aa33f40ee00b035 |
23-Aug-2010 |
Chia-I Wu <olv@lunarg.com> |
glsl: Include main/core.h. Make glsl include only main/core.h from core mesa.
lcpp-parse.c
lcpp-parse.y
|
61f73fec532b24ef5ec4b5baef81f5e6b9f20918 |
23-Aug-2010 |
Carl Worth <cworth@cworth.org> |
glcpp: Make standalone preprocessor work with a tty as stdin Previously glcpp would silently abort if it couldn't fstat the file being read, (so it would work with stdin redirected from a file, but would not work with stdin as a tty). The stat was so that glcpp could allocate a buffer for the file content in a single call. We now use talloc_realloc instead, (even if the fstat is possible). This is theoretically less efficient, but quite irrelevant, (particularly because the standalone preprocessor is used only for testing).
lcpp.c
|
21560c40e8aa98624a225752b98babc7ae2938d5 |
23-Aug-2010 |
Carl Worth <cworth@cworth.org> |
glcpp: Fix test suite to avoid flagging failed tests as valgrind errors. We recently added several tests that intentionally trigger preprocessor errors. During valgrind-based testing, our test script was noticing the non-zero return value from the preprocessor and incorrectly flagging the valgrind-based test as failing. To fix this, we make valgrind return an error code that is otherwise unused by the preprocessor.
ests/glcpp-test
|
cf8bb19a114d753bca94f920b87dcf51aa26af99 |
23-Aug-2010 |
Carl Worth <cworth@cworth.org> |
glcpp: Fix segfault in standalone preprocessor for "file not found", etc. This error message was missing so that the program would simply segfault if the provided filename could not be opened for some reason. While we're at it, we add explicit support for a filename of "-" to indicate input from stdin.
lcpp.c
|
eab206510fc76407ee8b18aacafadd0d5406e483 |
23-Aug-2010 |
Carl Worth <cworth@cworth.org> |
glcpp: Update generated glcpp-lex.c for the last two changes. This fixes both "#line 0" and "#line XXX YYY" as described in the two most recent commits.
lcpp-lex.c
|
c2280e63817238bb969b20605c7d8dab4ddf1721 |
23-Aug-2010 |
Carl Worth <cworth@cworth.org> |
glcpp: Fix handling of "#line 0" The existing DECIMAL_INTEGER pattern is the correct thing to use when looking for a C decimal integer, (that is, a digit-sequence not starting with 0 which would instead be an octal integer). But for #line, we really want to accept any digit sequence, (including "0"), and always interpret it as a decimal constant. So we add a new DIGITS pattern for this case. This should fix the compilation failure noted in bug #28138 https://bugs.freedesktop.org/show_bug.cgi?id=28138 (Though the generated file will not be updated until the next commit.)
lcpp-lex.l
|
ff10d239af3b48f4ba13a0ef947e97d3302ea818 |
23-Aug-2010 |
Carl Worth <cworth@cworth.org> |
glcpp: Fix source numbers set with "#line LINE_NUMBER SOURCE_NUMBER" Previously, the YY_USER_ACTION was overwriting the yylloc->source value in every action, (after that value had been carefully set by the handling of the #line directive). Instead, we want to initialize it once in YY_USER_INIT and then not touch it at all in YY_USER_ACTION.
lcpp-lex.l
|
2a9e791fdeb45080a98042d41c153ea19c17caae |
23-Aug-2010 |
Carl Worth <cworth@cworth.org> |
glcpp: Add new test for #line directive. This test exposes two current bugs: 1. The source number is not being correctly emitted in error messages (instead, it's always 0). 2. A directive of "#line 0" is resulting in the following parse error: preprocessor error: Invalid tokens after #
ests/091-hash-line.c
ests/091-hash-line.c.expected
|
c15f04b326aafc27aa2e508ab88bf209c829abd7 |
23-Aug-2010 |
Carl Worth <cworth@cworth.org> |
glcpp: Update README file (new specifications and fewer limitations). The README file had grown a little bit stale. We've been using newer versions of both the GLSL and C99 specifications, so list those. Also, several of the documented known limitations have since been fixed, so remove those.
EADME
|
0acd68c4050fea82797f80ad90212926df4cf001 |
23-Aug-2010 |
Carl Worth <cworth@cworth.org> |
glcpp: Add test for the #error directive. This directive is already implemented nicely, but wasn't previously tested. It will be convenient to use this directive in further tests that rely on error messages, (such as ensuring that #line correctly sets the line number in the error message).
ests/090-hash-error.c
ests/090-hash-error.c.expected
|
bd7853768dd7ad52604e3b636ae71dacaa7352fe |
19-Aug-2010 |
Kenneth Graunke <kenneth@whitecape.org> |
glcpp: Refresh autogenerated lexer.
lcpp-lex.c
|
9cf62bdfeb3982405b9360500d7e0fa52036f38f |
19-Aug-2010 |
Kenneth Graunke <kenneth@whitecape.org> |
glcpp: Add basic #line support (adapted from the main compiler).
lcpp-lex.l
|
9751b4ec60291a5fc48fe9ef27324350d148f36e |
18-Aug-2010 |
Carl Worth <cworth@cworth.org> |
glcpp: Refresh generated files. After a recent change to glcpp-parse.y (adding "redefined macro" error).
lcpp-parse.c
lcpp-parse.h
|
3882cf21696d2576bd3d855dbc97c9354f72a15f |
18-Aug-2010 |
Carl Worth <cworth@cworth.org> |
glcpp: Add support for "redefined macro" error. Carefully avoiding printing any error when the new definition matches the existing definition. This fixes the recently-added 088-redefine-macro-legitimate.c and 089-redefine-macro-error.c tests as well as glsparsertest/preprocess1 in piglit.
lcpp-parse.y
|
105e2137d67b98c24251be3586985fb61aeaf28a |
18-Aug-2010 |
Carl Worth <cworth@cworth.org> |
glcpp: Add two new tests for testing redefined macros. The specification says that redefining a macro is an error, unless the new definitions is identical to the old one, (identical replacement lists but ignoring differing amounts of whitespace).
ests/088-redefine-macro-legitimate.c
ests/088-redefine-macro-legitimate.c.expected
ests/089-redefine-macro-error.c
ests/089-redefine-macro-error.c.expected
|
97638aa77c509cd37dea499202d31357926a0e2a |
18-Aug-2010 |
Carl Worth <cworth@cworth.org> |
glcpp: Allow standalone glcpp to accept a filename as first argument. This is useful for debugging the preprocessor.
lcpp.c
|
ce5d0a296c984a9b746f0b248f4cb10ed78bc647 |
18-Aug-2010 |
Carl Worth <cworth@cworth.org> |
glcpp: Fix 064-version.c expected result to track recent change. In commit 6be3a8b70af4ba4fa4d037d54ecf6d5f055edbc9, the #version directive was fixed to stop generating a spurious newline. Here we simply update the expected result for the single test which includes a #version directive.
ests/064-version.c.expected
|
b9892f22d18400db2f20f20b05c301248209bf48 |
18-Aug-2010 |
Carl Worth <cworth@cworth.org> |
glcpp: Regenerated glcpp-lex.c from previous commit. The previous commit changed glcpp-lex.l so we commit the resulting generated file here.
lcpp-lex.c
|
eb26f0d5b68f0218d4c79c1825d0d9e6a905e199 |
18-Aug-2010 |
Carl Worth <cworth@cworth.org> |
glcpp: Don't include the newline when discarding single-line comments Matching the newline here meant having to do some redundant work here, (incrementing line number, resetting column number, and returning a NEWLINE token), that could otherwise simply be left to the existing rule which matches a newline. Worse, when the comment rule matches the newline as well, the parser can lookahead and see a token for something that should actually be skipped. For example, in a case like this: #if 0 // comment here fail #else win #endif Both fail and win appear in the output, (not that the condition is being evaluated incorrectly---merely that one token after the comment's newline was being lexed/parse regardless of the condition). This commit fixes the above test case, (which is also remarkably similar to 087-if-comments which now passes).
lcpp-lex.l
|
ede67e307142000a408e40b637132700a4dc2808 |
18-Aug-2010 |
Eric Anholt <eric@anholt.net> |
glcpp: Add testcase for #if handling bug that breaks Savage2.
ests/087-if-comments.c
ests/087-if-comments.c.expected
|
2e2614586225b3fff3c21f37817064a90dd320ad |
16-Aug-2010 |
Kenneth Graunke <kenneth@whitecape.org> |
glcpp: Refresh autogenerated lexer and parser.
lcpp-lex.c
lcpp-parse.c
|
6be3a8b70af4ba4fa4d037d54ecf6d5f055edbc9 |
16-Aug-2010 |
Kenneth Graunke <kenneth@whitecape.org> |
glcpp: Remove spurious newline generated by #version handling. This was causing line numbering to be off by one. The newline comes from the NEWLINE token at the end of the line; there's no need to insert one.
lcpp-lex.l
lcpp-parse.y
|
9349379d1acca23e7a2442549e49e9b58515d731 |
14-Aug-2010 |
José Fonseca <jfonseca@vmware.com> |
Revert "glsl2: Use stdint.h instead of inttypes.h" This reverts commit a77a6bc008b3146c56431fa520a00e1f8dfa3938.
lcpp-parse.c
lcpp-parse.y
|
c55aa4292f35a6d08b0660e23f248a37988a5f99 |
14-Aug-2010 |
Kenneth Graunke <kenneth@whitecape.org> |
glsl2: Refresh autogenerated bison parser.
lcpp-parse.c
lcpp-parse.h
|
07ca55b7fa09b8b5c08f8e2e45f9060020593783 |
14-Aug-2010 |
Vinson Lee <vlee@vmware.com> |
Fix an MSVC build error (bugzilla 29570).
lcpp-parse.y
|
a77a6bc008b3146c56431fa520a00e1f8dfa3938 |
14-Aug-2010 |
Ian Romanick <ian.d.romanick@intel.com> |
glsl2: Use stdint.h instead of inttypes.h
lcpp-parse.c
lcpp-parse.y
|
23f6017d70a705479b9bc3a1bf2ef401ac519fb9 |
13-Aug-2010 |
Ian Romanick <ian.d.romanick@intel.com> |
glsl2: Commit generated file changed by previous commit
lcpp-lex.c
|
ab18be74ac5f95ba1ebe6a52259d77e0940b2dbd |
13-Aug-2010 |
Ian Romanick <ian.d.romanick@intel.com> |
glsl2: Use --nounistd to fix MSVC build Also remove the --never-interactive command line option for the preprocessor lexer. This was already done for main compiler lexer.
lcpp-lex.l
|
204d4cbea0de81f6f162ae0348e476de6c916ca8 |
13-Aug-2010 |
Jakob Bornecrantz <jakob@vmware.com> |
glsl2: Include string.h in preprocessor
p.c
|
4ca4edd20e10415d7aabcf2ba6ca89e9401854ef |
12-Aug-2010 |
Ian Romanick <ian.d.romanick@intel.com> |
glsl2: Commit generated file changed by previous commit
lcpp-parse.y
|
188f60fb0576c8ac06638a8fd080a2ecc551919c |
12-Aug-2010 |
Ian Romanick <ian.d.romanick@intel.com> |
glsl2: Add missing include of string.h Makes the build happy on non-GCC platforms.
lcpp-parse.c
|
da6b10a7eb26c8a13056cbae9015d5b84f134142 |
11-Aug-2010 |
Carl Worth <cworth@cworth.org> |
glcpp: Fix "unterminated if" diagnostic. This was previously being appended to the output string *after* a copy of the supposedly final string was made and handed to the caller. So the diagnostic was never actually visible to the user. We fix this by moving the check for an unterminated #if from glcpp_parser_destroy to the calling function, preprocess. This fixes the test case 083-unterminated-if.c.
lcpp-parse.c
lcpp-parse.y
p.c
ests/083-unterminated-if.c.expected
|
6b9e7b034ca5d10cd367a2388c5439cdb10a1a68 |
11-Aug-2010 |
Carl Worth <cworth@cworth.org> |
glccp: Regenerate glcpp-parse.c Due to a recent change to glcpp-parse.y.
lcpp-parse.c
|
253cad3f424f71f6984431e5edbde1694ccfae3f |
11-Aug-2010 |
Carl Worth <cworth@cworth.org> |
glcpp: Add an explicit diagnostic for #if with no expression. This is more clear than the previously-generated diagnostic which was something confusing like "enexpected newline". This change makse test 080-if-witout-expression.c now pass.
lcpp-parse.y
ests/080-if-without-expression.c.expected
|
624dd585c72103e5bffbc600cdf7bdfba5305a15 |
11-Aug-2010 |
Carl Worth <cworth@cworth.org> |
glcpp: Reword diagnostic for #elif with no expression Rather than telling the user what to fix, the standard convention is to describe what the detected problem is. With this change, test 081-elif-without-expression now passes.
lcpp-parse.c
lcpp-parse.y
ests/081-elif-without-expression.c.expected
|
cb5ea0c79bd74ea6263d54302ed19c243ceb05de |
11-Aug-2010 |
Carl Worth <cworth@cworth.org> |
glcpp: Add several tests for diagnostics. Which are proving to be useful since some of these tests are not yet acting as desired, (in particular, the unterminated if test is not generating any diagnostic).
ests/070-undefined-macro-in-expression.c
ests/070-undefined-macro-in-expression.c.expected
ests/077-else-without-if.c
ests/077-else-without-if.c.expected
ests/078-elif-without-if.c
ests/078-elif-without-if.c.expected
ests/079-endif-without-if.c
ests/079-endif-without-if.c.expected
ests/080-if-without-expression.c
ests/080-if-without-expression.c.expected
ests/081-elif-without-expression.c
ests/081-elif-without-expression.c.expected
ests/082-invalid-paste.c
ests/082-invalid-paste.c.expected
ests/083-unterminated-if.c
ests/084-unbalanced-parentheses.c
ests/085-incorrect-argument-count.c
ests/085-incorrect-argument-count.c.expected
ests/086-reserved-macro-names.c
ests/086-reserved-macro-names.c.expected
|
5a6285cc862df35ef5275c3858f833e0807dee14 |
11-Aug-2010 |
Carl Worth <cworth@cworth.org> |
glcpp: Regenerate glcpp-lex.c After a recent change to glcpp-lex.l
lcpp-lex.c
|
bc64b8980803a5ba1cc91c63dc2ed1517db800c6 |
11-Aug-2010 |
Carl Worth <cworth@cworth.org> |
glcpp: Initialize line and column numbers to 1, not 0. Error messages make more sense this way since the convention is for the first line of a file to be numbered from 1, rather than 0.
lcpp-lex.l
|
2bcff4c879acec31ef0b39ecf04e9df41c5cbfab |
11-Aug-2010 |
Carl Worth <cworth@cworth.org> |
glcpp-test: Capture the stderr output of the preprocessor. This allows writing tests that verify diagnostics from the preprocessor.
ests/glcpp-test
|
d1dda951c85f65612ed6fe080728f67fdc93d232 |
11-Aug-2010 |
Brian Paul <brianp@vmware.com> |
glsl2: move declarations before code
p.c
|
8485f4d9aa6d98304bb0197dc4f1f357d81d1daa |
11-Aug-2010 |
Carl Worth <cworth@cworth.org> |
glcpp: Clean up intermediate file when test suite is interrupted. The glcpp-test script was leaving around bogus *.valgrind-errors files if a valgrind test was interrupted.
ests/glcpp-test
|
764e096647ec8c0f20ea3b5191499af806ad23f8 |
11-Aug-2010 |
Carl Worth <cworth@cworth.org> |
glcpp: Regenerate glcpp-parse.c After a recent change to glcpp-parse.y
lcpp-parse.c
|
48ba058e7a4b808271ca987b1553efd7e9792da9 |
11-Aug-2010 |
Carl Worth <cworth@cworth.org> |
glcpp: Additional fixes for not evaluating skipped #if/#elif expressions. This adds a couple of test cases to expand our coverage of invalid #if and being skipped, (either by being nested inside an #if/#elif that evaluates to zero or by being after an #if/#elif that evaluates to non-zero).
lcpp-parse.y
ests/075-elif-elif-undef.c
ests/075-elif-elif-undef.c.expected
ests/076-elif-undef-nested.c
ests/076-elif-undef-nested.c.expected
|
298a6fcddef6a91084ae921fca0b8640eb2e2a16 |
11-Aug-2010 |
Kenneth Graunke <kenneth@whitecape.org> |
glcpp/tests: Commit forgotten file 074-elif-undef.c.expected.
ests/074-elif-undef.c.expected
|
9b7fd2099f926b9cc187382ca75eb8dedf3d37ca |
11-Aug-2010 |
Carl Worth <cworth@cworth.org> |
glcpp: Discard output of cmp when running the test suite. We're already using the return-value of cmp to print either PASS or FAIL and in the case of failure, we're subsequently running and showing the output of diff. So any warnings/errors from cmp itself are not actually needed, and can be quite confusing.
ests/glcpp-test
|
4f9a64407c948a7a46d23e8d4f7caae6d0e83232 |
11-Aug-2010 |
Carl Worth <cworth@cworth.org> |
glcpp: Fix expected result for the 064-version.c test. Commit d4a04f315560704bf1103df0b93723e468725df7 caused this test case to produce an additional blank line, which is otherwise harmless, but does need to be reflected in the .expected file for the test to pass.
ests/064-version.c.expected
|
e29cd391253230611a26ca58849a1169045dd795 |
11-Aug-2010 |
Carl Worth <cworth@cworth.org> |
glcpp: Regnerate glcpp-parse.c and glcpp-parse.h After making a minor change to the .y file.
lcpp-parse.c
lcpp-parse.h
|
485f84d36608b4545fc5a0061f9ab3ac71b9e36e |
11-Aug-2010 |
Carl Worth <cworth@cworth.org> |
glcpp: Initialize location structure at beginning of parse. Since we have a custom structure for YYLTYPE locations, we need to use an %initial-action directive to avoid triggering use of uninitialized memory when, for example, printing error messages. We apparently don't yet have a test case that allowed valgrind to find this bug for us, but valgrind found a similar problem in the other parser, so we fix this one as well.
lcpp-parse.y
|
f4239872c9cb56d1e5735b62ea53bedf3f39dfb0 |
05-Aug-2010 |
Kenneth Graunke <kenneth@whitecape.org> |
glcpp: Ignore #if and #elif expressions when skipping. Fixes glcpp test cases 073 and 074, as well as piglit test xonotic-vs-generic-diffuse.vert.
lcpp-parse.c
lcpp-parse.y
|
d65135a7661c320c618151df0a94c852dc9bc621 |
05-Aug-2010 |
Kenneth Graunke <kenneth@whitecape.org> |
glcpp/tests: Add a corollary to testcase 073 for testing #elif.
ests/074-elif-undef.c
|
c52b2be16689fbbe8a8ec190dbe9dc7e469956a0 |
05-Aug-2010 |
Kenneth Graunke <kenneth@whitecape.org> |
glcpp/tests: Fix 073-if-in-ifdef.c to use #ifdef, not #if. The original intention was to use #ifdef.
ests/073-if-in-ifdef.c
|
16b4eed59a07f5e07587f4f9b0cdc304a08a685c |
05-Aug-2010 |
Kenneth Graunke <kenneth@whitecape.org> |
glcpp: Refactor HASH_IF and HASH_ELIF expansion to reuse code.
lcpp-parse.c
lcpp-parse.y
|
0ef79a5f115659b3719a330d01a365e8ca8144c4 |
04-Aug-2010 |
Kenneth Graunke <kenneth@whitecape.org> |
glcpp: Refresh autogenerated lexer and parser.
lcpp-lex.c
lcpp-parse.c
lcpp-parse.h
|
1ffc1cd86186ae5d03bb28a1e041c4a57761515e |
04-Aug-2010 |
Kenneth Graunke <kenneth@whitecape.org> |
glcpp: Remove xtalloc wrappers in favor of plain talloc. Calling exit() on a memory failure probably made sense for the standalone preprocessor, but doesn't seem too appealing as part of the GL library. Also, we don't use it in the main compiler.
akefile.am
lcpp-lex.l
lcpp-parse.y
lcpp.h
talloc.c
|
31747155ea3a24190277b125bd188ac8689af719 |
28-Jul-2010 |
Aras Pranckevicius <aras@unity3d.com> |
glsl2: Give the path within src/mesa/ for headers instead of relying on -I.
lcpp.h
|
93b10bd353e98670b627873e1da130c789646a4e |
01-Aug-2010 |
Eric Anholt <eric@anholt.net> |
glcpp: Add a testcase for the failure in compiling xonotic's shader. gcc and mesa master agree that this is OK.
ests/073-if-in-ifdef.c
ests/073-if-in-ifdef.c.expected
|
805cbf39224580fdb85b09a21be7cbc658f0ecf6 |
30-Jul-2010 |
Kenneth Graunke <kenneth@whitecape.org> |
glcpp: Don't look for backslashes before the beginning of the string. Fixes a valgrind error.
p.c
|
d6942460cec5ffb69dfee7492f7dac59872735de |
29-Jul-2010 |
Eric Anholt <eric@anholt.net> |
glsl2: Actually fix glsl-version-define.
lcpp-parse.c
lcpp-parse.y
|
d4a04f315560704bf1103df0b93723e468725df7 |
29-Jul-2010 |
Eric Anholt <eric@anholt.net> |
glcpp: Add __VERSION__ define to the current language version. Fixes: glsl-version-define glsl-version-define-110 glsl-version-define-120
lcpp-lex.c
lcpp-lex.l
lcpp-parse.c
lcpp-parse.h
lcpp-parse.y
|
8605c297cfb8068737991601f163f866395c41c9 |
29-Jul-2010 |
Eric Anholt <eric@anholt.net> |
glcpp: Print integer tokens as decimal, not hex.
lcpp-parse.c
lcpp-parse.y
|
0c7b37c8367e72e7b4295cd249561e5c3079d161 |
28-Jul-2010 |
Eric Anholt <eric@anholt.net> |
glsl2: Add the define for ARB_fragment_coord_conventions when present. Fixes: glsl-arb-fragment-coord-conventions-define
lcpp-parse.c
lcpp-parse.y
|
667173e36293d781e145f40e0d6919cb847af318 |
28-Jul-2010 |
Carl Worth <cworth@cworth.org> |
glcpp: Add generated source files. This is now consistent with other usage of flex/bison througout mesa, (which is that these generated files are added to source control so that the build system does not require external tools like flex/bison for non-developers).
gitignore
lcpp-lex.c
lcpp-parse.c
lcpp-parse.h
|
279cc22dbc297b32ddc7301ed1790336cd1038ae |
28-Jul-2010 |
Carl Worth <cworth@cworth.org> |
glcpp: Add expected output for a recently-added test. I simply forgot to add this file when adding the test case originally.
ests/069-repeated-argument.c.expected
|
efef950f393dfe6cb7ef60bee646f2197143df41 |
28-Jul-2010 |
Carl Worth <cworth@cworth.org> |
glcpp: Explicitly expect 0 shift/reduce conflicts. The "%expect 0" construct will make bison emit an error if any future changes to the grammar introduce shift/reduce conflicts, (without also increasing the number after "%expect").
lcpp-parse.y
|
2233d10442f1e19d18693fc030aefe292b14cf29 |
28-Jul-2010 |
Carl Worth <cworth@cworth.org> |
glcpp: Remove 2 shift/reduce conflicts from the grammar. Since we have productions to turn "defined FOO" and "defined ( FOO )" into a conditional_token we don't need to list DEFINED as an operator as well. Doing so just introduces the shift/reduce ambiguity with no benefit.
lcpp-parse.y
|
fbe4240626bfe102a9c4c889ee18cb9ea27bddec |
23-Jul-2010 |
Carl Worth <cworth@cworth.org> |
glcpp: Fix function-like macros with an argument used multiple times. It's really hard to believe that this case has been broken, but apparently no test previously exercised it. So this commit adds such a test and fixes it by making a copy of the argument token-list before expanding it. This fix causes the following glean tests to now pass: glsl1-Preprocessor test 6 (#if 0, #define macro) glsl1-Preprocessor test 7 (multi-line #define)
lcpp-parse.y
ests/069-repeated-argument.c
|
a0cfe8c44085032fd982bbbff1f02252ffaa7114 |
21-Jul-2010 |
Carl Worth <cworth@cworth.org> |
glsl: Fix missing initialization of yylloc.source In both the preprocessor and in the compiler proper, we use a custom yyltype struct to allow tracking the source-string number in addition to line and column. However, we were previously relying on bison's default initialization of the yyltype struct which of course is not aware of the source field and leaves it uninitialized. We fix this by defining our own YYLLOC_DEFAULT macro expanding on the default version (as appears in the bison manual) and adding initialization of yylloc.source.
lcpp.h
|
e1acbfca322c4ac720707ec8d3fda08fab65a30b |
21-Jul-2010 |
Carl Worth <cworth@cworth.org> |
glcpp: Avoid accidental token pasting in preprocessed result. Consider this test case: #define EMPTY int foo = 1+EMPTY+4; The expression should compile as the sequence of tokens 1, PLUS, UNARY_POSITIVE, 4. But glcpp has been failing for this case since it results in the string "1++4" which a compiler correctly sees as a syntax error, (1, POST_INCREMENT, 4). We fix this by changing any macro with an empty definition to result in a single SPACE token rather than nothing. This then gives "1+ +4" which compiles correctly. This commit does touch up the two existing test cases which already have empty macros, (to add the space to the expected result). It also adds a new test case to exercise the above scenario.
lcpp-parse.y
ests/008-define-empty.c.expected
ests/011-define-func-empty.c.expected
ests/068-accidental-pasting.c
ests/068-accidental-pasting.c.expected
|
942ccc517012e360a7e30d3322331c8450dda022 |
21-Jul-2010 |
Carl Worth <cworth@cworth.org> |
glcpp: Add missing include in xtalloc.c Without this, the compiler was legitimately complaining about missing declarations for all of the functions being defined here.
talloc.c
|
d80dcaf427e12a5cba9cfc5bcd1b485572a2714b |
21-Jul-2010 |
Carl Worth <cworth@cworth.org> |
glcpp: Add static keyword to several functions in the parser. This quiets warnings about missing declarations otherwise.
lcpp-parse.y
|
fb90560744864e44730330e4c801ac47c4ece0e1 |
21-Jul-2010 |
Carl Worth <cworth@cworth.org> |
glcpp: Avoid warnings in generated flex code. We define the YY_NO_INPUT macro to avoid one needless function being generated. for the other needless functions, (yyunput and yy_top_state), we add a new UNREACHABLE start condition and call these functions from an action there. This doesn't change functionality at all, (since we never enter the UNREACHABLE start condition), but makes the compiler stop complaining about these two functions being defined but not used.
lcpp-lex.l
|
a9bb4bcde360ef8d0a444bf1c4a7d02a8fdb5fa1 |
21-Jul-2010 |
Carl Worth <cworth@cworth.org> |
glcpp-lex: Declare some generated functions to eliminate compiler warnings. It's really a bug in flex that these functions are generated with neither a declaration nor the 'static' keyword, but we can at least avoid the warnings this way.
lcpp-lex.l
|
1d7e03e48e87328ce0081021dde133921b78b406 |
20-Jul-2010 |
Carl Worth <cworth@cworth.org> |
glcpp: Fix support for nested #ifdef and nested #ifndef Previously, if the outer #ifdef/#ifndef evaluated to false, the inner directive would not be parsed correctly, (the identifier as the subject of the #ifdef/#ifndef would inadvertently be skipped along with the other content correctly being skipped). We fix this by setting the lexing_if state in each case here. We also add a new test to the test suite to ensure that this case is tested.
lcpp-lex.l
ests/067-nested-ifdef-ifndef.c
ests/067-nested-ifdef-ifndef.c.expected
|
17f9beb6c313b41ca08984add7b76ecb84a7339e |
20-Jul-2010 |
Carl Worth <cworth@cworth.org> |
glcpp: Support #if(expression) with no intervening space. And add a test case to ensure that this works.
lcpp-lex.l
ests/066-if-nospace-expression.c
ests/066-if-nospace-expression.c.expected
|
61ebc01dfecda0963a184e881ea966e2d92f0519 |
20-Jul-2010 |
Carl Worth <cworth@cworth.org> |
glcpp: Fix use-after-free error from #undef directive. By taking advantage of the recently-added hash_table_remove function. With this change, all existing tests are now valgrind-clean.
lcpp-parse.y
|
d1500f8a195b7afe871cd768a5d33ecfecad5f31 |
20-Jul-2010 |
Carl Worth <cworth@cworth.org> |
glcpp: Make test suite test for valgrind cleanliness. As it turns out, 4 of our current tests are not valgrind clean, (use after free errors or so), so this will be helpful for investigating and fixing those.
ests/glcpp-test
|
3a530b8ef68a40526b33de2af8de85f71ebdb30d |
20-Jul-2010 |
Carl Worth <cworth@cworth.org> |
glcpp: Make test suite report final count of passed/total tests. And report PASS or FAIL for each test along the way as well.
ests/glcpp-test
|
f15e27ec1d3238df5cd5ab40642e21aea5a162e3 |
14-Jul-2010 |
Carl Worth <cworth@cworth.org> |
glcpp: Delete copies of hash_table.c, hash_table.h, and other headers. These were only ever intended to exist in the original, standalone implementation of glcpp, (with the idea of dropping them as soon as the code moved into mesa). The current build system wasn't compiling this C file, but the presence of the header files could cause problems if the two copies diverge in the future. We head those problems off by deleting al of these redundant files.
akefile.am
ash_table.c
ash_table.h
ain/imports.h
ain/simple_list.h
|
388ab9fa6b468d8c162dd4fc645d2f758c49051c |
07-Jul-2010 |
Kenneth Graunke <kenneth@whitecape.org> |
glsl2: Initialize yylineno and yycolumn so line numbers are sane.
lcpp-lex.l
|
7e908a6a27f196027a4dfd0f4d8c37aa71e163fa |
03-Jul-2010 |
Kenneth Graunke <kenneth@whitecape.org> |
glcpp: Add #error support.
lcpp-lex.l
|
06143ea09411aa283ac3633bfbfa4326584cd952 |
01-Jul-2010 |
Ian Romanick <ian.d.romanick@intel.com> |
glsl2: Conditionally define preprocessor tokens for optional extensions The only optional extension currently supported by the compiler is GL_EXT_texture_array.
lcpp-parse.y
lcpp.c
lcpp.h
p.c
|
2d1223611700b33aab084f1927bfc1ff1b284115 |
01-Jul-2010 |
Ian Romanick <ian.d.romanick@intel.com> |
glsl2: Define preprocessor tokens for extensions Currently only GL_ARB_draw_buffers and GL_ARB_texture_rectangle are defined because those extensions are always enabled. This make tex_rect-03.frag pass.
lcpp-parse.y
|
29285882676388aacff123e8bdf025904abf8ea9 |
25-Jun-2010 |
Eric Anholt <eric@anholt.net> |
glsl2: Move the compiler to the subdirectory it will live in in Mesa.
gitignore
akefile.am
EADME
lcpp-lex.l
lcpp-parse.y
lcpp.c
lcpp.h
ash_table.c
ash_table.h
ain/imports.h
ain/simple_list.h
p.c
ests/000-content-with-spaces.c
ests/000-content-with-spaces.c.expected
ests/001-define.c
ests/001-define.c.expected
ests/002-define-chain.c
ests/002-define-chain.c.expected
ests/003-define-chain-reverse.c
ests/003-define-chain-reverse.c.expected
ests/004-define-recursive.c
ests/004-define-recursive.c.expected
ests/005-define-composite-chain.c
ests/005-define-composite-chain.c.expected
ests/006-define-composite-chain-reverse.c
ests/006-define-composite-chain-reverse.c.expected
ests/007-define-composite-recursive.c
ests/007-define-composite-recursive.c.expected
ests/008-define-empty.c
ests/008-define-empty.c.expected
ests/009-undef.c
ests/009-undef.c.expected
ests/010-undef-re-define.c
ests/010-undef-re-define.c.expected
ests/011-define-func-empty.c
ests/011-define-func-empty.c.expected
ests/012-define-func-no-args.c
ests/012-define-func-no-args.c.expected
ests/013-define-func-1-arg-unused.c
ests/013-define-func-1-arg-unused.c.expected
ests/014-define-func-2-arg-unused.c
ests/014-define-func-2-arg-unused.c.expected
ests/015-define-object-with-parens.c
ests/015-define-object-with-parens.c.expected
ests/016-define-func-1-arg.c
ests/016-define-func-1-arg.c.expected
ests/017-define-func-2-args.c
ests/017-define-func-2-args.c.expected
ests/018-define-func-macro-as-parameter.c
ests/018-define-func-macro-as-parameter.c.expected
ests/019-define-func-1-arg-multi.c
ests/019-define-func-1-arg-multi.c.expected
ests/020-define-func-2-arg-multi.c
ests/020-define-func-2-arg-multi.c.expected
ests/021-define-func-compose.c
ests/021-define-func-compose.c.expected
ests/022-define-func-arg-with-parens.c
ests/022-define-func-arg-with-parens.c.expected
ests/023-define-extra-whitespace.c
ests/023-define-extra-whitespace.c.expected
ests/024-define-chain-to-self-recursion.c
ests/024-define-chain-to-self-recursion.c.expected
ests/025-func-macro-as-non-macro.c
ests/025-func-macro-as-non-macro.c.expected
ests/026-define-func-extra-newlines.c
ests/026-define-func-extra-newlines.c.expected
ests/027-define-chain-obj-to-func.c
ests/027-define-chain-obj-to-func.c.expected
ests/028-define-chain-obj-to-non-func.c
ests/028-define-chain-obj-to-non-func.c.expected
ests/029-define-chain-obj-to-func-with-args.c
ests/029-define-chain-obj-to-func-with-args.c.expected
ests/030-define-chain-obj-to-func-compose.c
ests/030-define-chain-obj-to-func-compose.c.expected
ests/031-define-chain-func-to-func-compose.c
ests/031-define-chain-func-to-func-compose.c.expected
ests/032-define-func-self-recurse.c
ests/032-define-func-self-recurse.c.expected
ests/033-define-func-self-compose.c
ests/033-define-func-self-compose.c.expected
ests/034-define-func-self-compose-non-func.c
ests/034-define-func-self-compose-non-func.c.expected
ests/035-define-func-self-compose-non-func-multi-token-argument.c
ests/035-define-func-self-compose-non-func-multi-token-argument.c.expected
ests/036-define-func-non-macro-multi-token-argument.c
ests/036-define-func-non-macro-multi-token-argument.c.expected
ests/037-finalize-unexpanded-macro.c
ests/037-finalize-unexpanded-macro.c.expected
ests/038-func-arg-with-commas.c
ests/038-func-arg-with-commas.c.expected
ests/039-func-arg-obj-macro-with-comma.c
ests/039-func-arg-obj-macro-with-comma.c.expected
ests/040-token-pasting.c
ests/040-token-pasting.c.expected
ests/041-if-0.c
ests/041-if-0.c.expected
ests/042-if-1.c
ests/042-if-1.c.expected
ests/043-if-0-else.c
ests/043-if-0-else.c.expected
ests/044-if-1-else.c
ests/044-if-1-else.c.expected
ests/045-if-0-elif.c
ests/045-if-0-elif.c.expected
ests/046-if-1-elsif.c
ests/046-if-1-elsif.c.expected
ests/047-if-elif-else.c
ests/047-if-elif-else.c.expected
ests/048-if-nested.c
ests/048-if-nested.c.expected
ests/049-if-expression-precedence.c
ests/049-if-expression-precedence.c.expected
ests/050-if-defined.c
ests/050-if-defined.c.expected
ests/051-if-relational.c
ests/051-if-relational.c.expected
ests/052-if-bitwise.c
ests/052-if-bitwise.c.expected
ests/053-if-divide-and-shift.c
ests/053-if-divide-and-shift.c.expected
ests/054-if-with-macros.c
ests/054-if-with-macros.c.expected
ests/055-define-chain-obj-to-func-parens-in-text.c
ests/055-define-chain-obj-to-func-parens-in-text.c.expected
ests/056-macro-argument-with-comma.c
ests/056-macro-argument-with-comma.c.expected
ests/057-empty-arguments.c
ests/057-empty-arguments.c.expected
ests/058-token-pasting-empty-arguments.c
ests/058-token-pasting-empty-arguments.c.expected
ests/059-token-pasting-integer.c
ests/059-token-pasting-integer.c.expected
ests/060-left-paren-in-macro-right-paren-in-text.c
ests/060-left-paren-in-macro-right-paren-in-text.c.expected
ests/061-define-chain-obj-to-func-multi.c
ests/061-define-chain-obj-to-func-multi.c.expected
ests/062-if-0-skips-garbage.c
ests/062-if-0-skips-garbage.c.expected
ests/063-comments.c
ests/063-comments.c.expected
ests/064-version.c
ests/064-version.c.expected
ests/065-if-defined-parens.c
ests/065-if-defined-parens.c.expected
ests/071-punctuator.c
ests/071-punctuator.c.expected
ests/072-token-pasting-same-line.c
ests/072-token-pasting-same-line.c.expected
ests/099-c99-example.c
ests/099-c99-example.c.expected
ests/glcpp-test
talloc.c
|