summaryrefslogtreecommitdiffstats
path: root/src/glsl/glcpp/pp.c
Commit message (Collapse)AuthorAgeFilesLines
* mesa/glsl: rename preprocess to glcpp_preprocessDave Airlie2012-09-151-1/+1
| | | | | | | | | | 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 <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
* glsl: Consistently use length-based ralloc string functions for info_log.Carl Worth2012-06-261-14/+24
| | | | | | | | | | | | | | | | | | | | | 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 <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
* Convert everything from the talloc API to the ralloc API.Kenneth Graunke2011-01-311-16/+14
|
* glsl: Define GL_ES preprocessor macro if API is OpenGL ES 2.0.Kenneth Graunke2010-09-071-2/+2
| | | | Also define it if #version 100 is encountered.
* glsl2: remove 'extern' keyword in .c fileBrian Paul2010-08-271-1/+1
|
* glsl/mesa: fixes for MSVCAras Pranckevicius2010-08-251-0/+1
| | | | Signed-off-by: Brian Paul <[email protected]>
* glsl2: Include string.h in preprocessorJakob Bornecrantz2010-08-131-0/+1
|
* glcpp: Fix "unterminated if" diagnostic.Carl Worth2010-08-111-0/+3
| | | | | | | | | | | 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.
* glsl2: move declarations before codeBrian Paul2010-08-111-2/+4
|
* glcpp: Don't look for backslashes before the beginning of the string.Kenneth Graunke2010-07-301-3/+7
| | | | Fixes a valgrind error.
* glsl2: Conditionally define preprocessor tokens for optional extensionsIan Romanick2010-07-011-2/+3
| | | | | The only optional extension currently supported by the compiler is GL_EXT_texture_array.
* glsl2: Move the compiler to the subdirectory it will live in in Mesa.Eric Anholt2010-06-241-0/+155