Commit graph

79 commits

Author SHA1 Message Date
Michal Krol
cb66e9f2b4 glsl/pp: Remove sl_pp_get_extension_state().
Parse extension tokens to track current state of extension enables.
2010-02-17 11:22:01 +01:00
Brian Paul
de5928a615 sl/pp: re-do extension testing code
The #extension directive should not effect which extension preprocessor
symbols are defined/undefined; only whether/how the compiler accepts
language features defined by the extension.
2010-02-16 10:43:36 -07:00
Michal Krol
fa8acb0528 glsl/pp: Do not try to enable extension `all'. 2010-02-16 10:04:58 +01:00
Michal Krol
ee67167358 glsl/pp: Fix handling of if/elif/else cases.
Once if/elif evalutes to true, all subsequent conditions are always false.
2010-02-15 21:33:22 +01:00
Vinson Lee
f0e1499805 glsl/pp: Add asserts to check for null pointer deferences. 2010-02-15 00:30:31 -08:00
Brian Paul
3b53b7e8b0 glsl/pp: fix incorrect extension enable flag for warn mode 2010-02-13 13:48:32 -07:00
Brian Paul
3251f31d59 glsl/pp: fix extension enable/disable options
Now the #extension name: disable/enable flags do the right thing.

Fixes glean/glsl1 "Preprocessor test (extension test 3)"
2010-02-10 10:49:50 -07:00
Michal Krol
8b1c332a77 Simplify GLSL extension mechanism.
Since extension name and extension name string are the same, collapse
them into one name.
2010-02-10 18:04:07 +01:00
Michal Krol
c1395a71ac glsl/pp: Fix ifdef directive for extension names. 2010-02-10 17:55:29 +01:00
Vinson Lee
c73dbce891 glsl/pp: Silence GCC "no previous prototype" warning. 2010-01-26 00:47:31 -08:00
Keith Whitwell
b2a615e3cd glsl/pp: move static functions out of header file 2009-12-23 16:10:37 +00:00
Keith Whitwell
cdd25ab8cf glsl/pp: quieten compiler about missing case statements 2009-12-23 16:10:37 +00:00
Dave Airlie
55c43ee315 glsl: make stack compile.
it would be nice if this stuff would be test built on mesa's primary
platform with mesa's primary build system.

Signed-off-by: Dave Airlie <airlied@redhat.com>
2009-12-21 09:10:21 +10:00
Michal Krol
d801c296c6 glsl: Do syntax parsing inline with processing. 2009-12-20 21:19:07 +01:00
Michal Krol
d696cb279d glsl/pp: Do processing inline with tokenisation. 2009-12-20 21:18:59 +01:00
Michal Krol
7631dca25b glsl/pp: Remove outdated TODO.
Already implemented in mesa compiler using predefined symbols.
2009-12-20 21:18:58 +01:00
Michal Krol
e9aa65d2b7 glsl/pp: Report correct error line for purify and tokeniser errors. 2009-12-20 21:18:57 +01:00
José Fonseca
491f384c39 scons: Get GLSL code building correctly when cross compiling.
This is quite messy. GLSL code has to be built twice: one for the
host OS, another for the target OS.
2009-12-10 16:30:08 +00:00
Brian Paul
0d654a7f2c glsl/pp: make some functions static 2009-12-10 08:25:35 -07:00
Brian Paul
52271c5345 glsl/pp: declare sl_pp_purify_options to silence warning 2009-12-10 08:25:16 -07:00
Michal Krol
22200bcafc glsl/pp: Add support for user-defined macros. 2009-12-10 12:58:21 +01:00
Michal Krol
91e164b3d0 glsl/pp: Add sl_pp_context_add_extension().
This way third parties are able to add supported extension strings.
2009-12-10 12:38:22 +01:00
michal
068596c9a7 Build mesa glsl with make.
Still don't know how to add glsl to mesa dependencies.
2009-12-10 01:03:15 +01:00
Michal Krol
abe1f33298 glsl/pp: Do purification and tokenisation in a single step. 2009-11-21 20:41:48 +01:00
Michal Krol
b89cd8afc5 glsl/pp: Expand unknown identifiers to 0 in if/elif expressions. 2009-11-20 08:59:50 +01:00
Michal Krol
547ac2869b glsl/pp: Fix macro formal argument parsing, more descriptive error msgs. 2009-11-17 09:06:53 +01:00
Michal Krol
d44cebd1ee glsl/pp: Add sl_pp_purify_getc(). 2009-11-10 20:49:45 +01:00
Michal Krol
d37f7694b6 glsl/pp: Have sl_pp_purify() return error msg/line no. 2009-11-10 00:15:33 +01:00
Michal Krol
c4bd6ccde8 glsl/pp: Expand macro actual arguments before pasting into its body. 2009-09-28 11:30:15 +02:00
Michal Krol
92e33569f3 glsl/pp: Add forward decls to silence gcc warnings. 2009-09-24 10:57:55 +02:00
Michal Krol
69fec23251 glsl/pp: Avoid using `__VERSION__' as an identifier. 2009-09-24 10:57:32 +02:00
Michal Krol
7a95a3c7c4 glsl/pp: Include missing headers. 2009-09-24 10:56:46 +02:00
Michal Krol
e1eed56702 glsl/pp: Allow builds on all platforms. 2009-09-24 10:56:01 +02:00
Michal Krol
a58360dbc2 glsl/pp: Use struct instead of union. 2009-09-24 09:04:15 +02:00
Michal Krol
9a1447d449 glsl/pp: Store both line number and file index in a single token. 2009-09-24 08:43:05 +02:00
Michal Krol
1ed1dc8b41 glsl/pp: Include missing headers. 2009-09-23 09:40:24 +02:00
Michal Krol
2f89e1a5a1 glsl/pp: Add 0' and 1' to dictionary. 2009-09-23 09:37:37 +02:00
Michal Krol
32966991c6 glsl/pp: Check for reserved macro names. 2009-09-23 09:33:12 +02:00
Michal Krol
0481e85af7 glsl/pp: Differentiate between integer and floating-point number tokens. 2009-09-22 12:51:08 +02:00
Michal Krol
95956bb8cb glsl/pp: Define a public interface for external modules.
Make sl_pp_context struct opaque.
Move all public declarations to sl_pp_public.h.
2009-09-18 11:19:25 +02:00
Michal Krol
90daefd1c4 glsl/pp: Add a TODO for FEATURE_es2_glsl. 2009-09-17 12:33:26 +02:00
Michal Krol
4fcda5000e slang/pp: Fix file number parsing. 2009-09-17 12:14:12 +02:00
Michal Krol
ce8f486156 slang/pp: Use a dictionary for the remaining string literals. 2009-09-17 12:12:34 +02:00
Michal Krol
0ddf41d34d glsl/pp: Add remaining error messages. 2009-09-17 11:51:35 +02:00
Michal Krol
a7382628f2 glsl/pp: Validate numbers. 2009-09-16 21:51:12 +02:00
Michal Krol
de0753e4cb glsl/pp: Add more error messages. 2009-09-16 20:40:02 +02:00
Michal Krol
d4638f5dce glsl/pp: Add more error messages. 2009-09-16 20:27:59 +02:00
Michal Krol
0f302b60fd glsl/pp: Support GL_ARB_draw_buffers and GL_ARB_texture_rectangle. 2009-09-14 13:09:36 +02:00
Michal Krol
a67f32289a glsl/pp: Add a dictionary to a context. 2009-09-14 13:07:25 +02:00
Michal Krol
5ad8937752 glsl: Add error messages for version parser. 2009-09-07 10:12:12 +02:00