summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2010-05-25Implement substitution of function parameters in macro calls.Carl Worth
This makes tests 16 - 19 pass.
2010-05-25Collapse multiple spaces in input down to a single space.Carl Worth
This is what gcc does, and it's actually less work to do this. Previously we were having to save the contents of space tokens as a string, but we don't need to do that now. We extend test #0 to exercise this feature here.
2010-05-25Add a test #0 to ensure that we don't do any inadvertent token pasting.Carl Worth
This simply ensures that spaces in input line are preserved.
2010-05-25Pass through literal space values from replacement lists.Carl Worth
This makes test 15 pass and also dramatically simplifies the lexer. We were previously using a CONTROL state in the lexer to only emit SPACE tokens when on text lines. But that's not actually what we want. We need SPACE tokens in the replacement lists as well. Instead of a lexer state for this, we now simply set a "space_tokens" flag whenever we start constructing a pp_tokens list and clear the flag whenever we see a '#' introducing a directive. Much cleaner this way.
2010-05-26r300g: more efficient finish + fix commentsMarek Olšák
2010-05-25Implement simplified substitution for function-like macro invocation.Carl Worth
This supports function-like macro invocation but without any argument substitution. This now makes test 11 through 14 pass.
2010-05-26r300g: implement fake but compliant fencesMarek Olšák
2010-05-25Implement #undef.Carl Worth
Which is as simple as copying the former action back from the git history. Now all tests through test 11 pass.
2010-05-25Implement expansion of object-like macros.Carl Worth
For this we add an "active" string_list_t to the parser. This makes the current expansion_list_t in the parser obsolete, but we don't remove that yet. With this change we can now start passing some actual tests, so we turn on real testing in the test suite again. I expect to implement things more or less in the same order as before, so the test suite now halts on first error. With this change the first 8 tests in the suite pass, (object-like macros with chaining and recursion).
2010-05-25Make the lexer pass whitespace through (as OTHER tokens) for text lines.Carl Worth
With this change, we can recreate the original text-line input exactly. Previously we were inserting a space between every pair of tokens so our output had a lot more whitespace than our input. With this change, we can drop the "-b" option to diff and match the input exactly.
2010-05-25Store parsed tokens as token list and print all text lines.Carl Worth
Still not doing any macro expansion just yet. But it should be fairly easy from here.
2010-05-25Delete some trailing whitespace.Carl Worth
This pernicious stuff managed to sneak in on us.
2010-05-25Add xtalloc_reference.Carl Worth
Yet another talloc wrapper that should come in handy.
2010-05-25Starting over with the C99 grammar for the preprocessor.Carl Worth
This is a fresh start with a much simpler approach for the flex/bison portions of the preprocessor. This isn't functional yet, (produces no output), but can at least read all of our test cases without any parse errors. The grammar here is based on the grammar provided for the preprocessor in the C99 specification.
2010-05-25r300g: add r300_init_render_functions, remove r300_render.hMarek Olšák
2010-05-25r300g: remove r300_query.hMarek Olšák
2010-05-25r300g: remove r300_flush.hMarek Olšák
2010-05-25r300g: add r300_init_blit_functions, remove r300_blit.hMarek Olšák
2010-05-25util: update comments at blitterMarek Olšák
2010-05-25util: fix indentation in blitterMarek Olšák
2010-05-25r300g,util: remove pipe_surface from the util_blitter_copy interface and ↵Marek Olšák
clean up
2010-05-25r300g,util: remove pipe_surface from the util_blitter_fill interface and ↵Marek Olšák
clean up
2010-05-25util: remove unused util_blitter_copy_surfaceMarek Olšák
2010-05-25drm_api: Remove type argument from create screen callbackJakob Bornecrantz
With the removal of DRI1 support there where no use of this argument, some drivers didn't even properly check it.
2010-05-25gallium: Remove dri1_api.h and winsys support for DRI1Jakob Bornecrantz
Since DRI1 support was dropped from st/dri it makes no sense to keep this code around.
2010-05-25st/dri: Remove DRI1 supportJakob Bornecrantz
Nobody used it and the current code had been trough so many changes yet never once being tested.
2010-05-25llvmpipe: Stop relying on PIPE_FLUSH_TEXTURE_CACHE/PIPE_FLUSH_RENDER_CACHE ↵José Fonseca
magic. Flush means flush, i.e., all previous operations should be visible from other contexts. This does not imply unswizzling tiles, since unswizzling should be done on a needed basis for any context.
2010-05-25gallivm: Choose an appropriate code generation optimization level.José Fonseca
'Default' unless GALLIVM_DEBUG=nopt option is set.
2010-05-24sw/xlib: NULL-out pointers after freeing image dataBrian Paul
This fixes a double-free() error when not using a shared memory XImage. The XDestroyImage() function frees the ximage->data buffer if non-NULL. If we free it ourselves, we also need to NULL-out the pointer.
2010-05-24st/glx: check if deleting head of buffer listBrian Paul
2010-05-24meta: Convert Z value from normalized to object-space in meta codeBrian Paul
Convert Z from a normalized value in the range [0, 1] to an object-space Z coordinate in [-1, +1] so that drawing at the new Z position with the default/identity ortho projection results in the original Z value. Used by the meta-Clear, Draw/CopyPixels and Bitmap functions where the Z value comes from the clear value or raster position. Fixes piglit tests fdo23670-depth_test, quad-invariance and glsl-orangebook-ch06-bump as well as oglc zbfunc.c. https://bugs.freedesktop.org/show_bug.cgi?id=23670
2010-05-24mesa: Reenable check for GL_FRAMEBUFFER_INCOMPLETE_DRAW_BUFFER_EXTKristian Høgsberg
The check was disabled when FEATURE_OES_framebuffer_object was enabled, since that used to mean we weren't implementing regular OpenGL semantics. Now that we can compile in support for multiple APIs, change the #ifdef to compile the check in when FEATURE_GL is enabled and enable the check for contexts that implement OpenGL at runtime.
2010-05-24Add test for '/', '<<', and '>>' in #if expressions.Carl Worth
These operators have been supported already, but were not covered in existing tests yet. So this test passes already.
2010-05-24Add test of bitwise operators and octal/hexadecimal literals.Carl Worth
This new test covers several features from the last few commits. This test passes already.
2010-05-24Add support for octal and hexadecimal integer literals.Carl Worth
In addition to the decimal literals which we already support. Note that we use strtoll here to get the large-width integers demanded by the specification.
2010-05-24Switch to intmax_t (rather than int) for #if expressionsCarl Worth
This is what the C99 specification demands. And the GLSL specification says that we should follow the "standard C++" rules for #if condition expressions rather than the GLSL rules, (which only support a 32-bit integer).
2010-05-24Add the '~' operator to the lexer.Carl Worth
This was simply missing before, (and unnoticed since we had no test of the '~' operator).
2010-05-24glsl: silence unused var warningsBrian Paul
2010-05-24Implement all operators specified for GLSL #if expressions (with tests).Carl Worth
The operator coverage here is quite complete. The one big thing missing is that we are not yet doing macro expansion in #if lines. This makes the whole support fairly useless, so we plan to fix that shortcoming right away.
2010-05-24llvmpipe: Also test compressed formats in lp_test_format()José Fonseca
2010-05-24llvmpipe: Fix lp_test_format on 32bit OSes.José Fonseca
2010-05-20Implement #if, #else, #elif, and #endif with tests.Carl Worth
So far the only expression implemented is a single integer literal, but obviously that's easy to extend. Various things including nesting are tested here.
2010-05-20Implement (and add test) for token pasting.Carl Worth
This is *very* easy to implement now that macro arguments are pre-expanded.
2010-05-20Pre-expand macro arguments at time of invocation.Carl Worth
Previously, we were using the same lexing stack as we use for macro expansion to also expand macro arguments. Instead, we now do this earlier by simply recursing over the macro-invocations replacement list and constructing a new expanded list, (and pushing only *that* onto the stack). This is simpler, and also allows us to more easily implement token pasting in the future.
2010-05-20Add xtalloc_asprintfCarl Worth
I expect this to be useful in the upcoming implementation of token pasting.
2010-05-20Finish cleaning up whitespace differences.Carl Worth
The last remaining thing here was that when a line ended with a macro, and the parser looked ahead to the newline token, the lexer was printing that newline before the parser printed the expansion of the macro. The fix is simple, just make the lexer tell the parser that a newline is needed, and the parser can wait until reducing a production to print that newline. With this, we now pass the entire test suite with simply "diff -u", so we no longer have any diff options hiding whitespace bugs from us. Hurrah!
2010-05-20Avoid printing a space at the beginning of lines in the output.Carl Worth
This fixes more differences compared to "gcc -E" so removes several cases of erroneously failing test cases. The implementation isn't very elegant, but it is functional.
2010-05-20Fix bug of consuming excess whitespace.Carl Worth
We fix this by moving printing up to the top-level "input" action and tracking whether a space is needed between one token and the next. This fixes all actual bugs in test-suite output, but does leave some tests failing due to differences in the amount of whitespace produced, (which aren't actual bugs per se).
2010-05-20Remove unused function _print_string_listCarl Worth
The only good dead code is non-existing dead code.
2010-05-20Remove "unnecessary" whitespace from some tests.Carl Worth
This whitespace was not part of anything being tested, and it introduces differences (that we don't actually care about) between the output of "gcc -E" and glcpp. Just eliminate this extra whitespace to reduce spurious test-case failures.