Commit graph

126 commits

Author SHA1 Message Date
Brian Paul
1f2b495b55 glsl: implement support for GL_EXT_texture_array
GL_EXT_texture_array is different from the existing GL_MESA_texture_array
support in that the former is only supported for GLSL, not fixed-function.

The shadow compare versions of the sampler functions haven't been tested
yet.  The non-shadow versions have been tested with a new piglit test.
2010-02-25 20:11:55 -07:00
Vinson Lee
83a5b7e468 glsl/apps: Assert that ftell does not return an error. 2010-02-22 23:49:50 -08:00
Vinson Lee
d1aafb33b5 glsl/cl: Prevent possible buffer overflow. 2010-02-21 00:36:50 -08:00
Vinson Lee
ae41339d4c glsl/cl: Prevent possible string overflow. 2010-02-20 23:27:07 -08:00
Brian Paul
5b392ff49a glsl/apps: print usage info if insufficient args 2010-02-17 08:59:02 -07:00
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
Michal Krol
27a68bd14a glsl/cl: Parse layout qualifiers only when an appropriate extension enabled. 2010-02-17 11:21:59 +01:00
Michal Krol
a21215a74e glsl/cl: Properly emit layout qualifier list. 2010-02-17 11:21:58 +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
46f788c2e5 glsl/cl: implement parsing for layout qualifiers
For GL_ARB_fragment_coord_conventions support.
2010-02-13 13:50:45 -07: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
Brian Paul
4c041fac96 glsl: remove __inline directive
It makes no difference with gcc -O3, for example.
2010-01-18 11:06:57 -07:00
José Fonseca
cbb23523a8 glsl: Ignore programs. 2010-01-01 12:16:19 +00:00
Brian Paul
561a107df7 glsl: added default case in _fetch_token() to silence warnings 2009-12-29 08:47:40 -07:00
José Fonseca
7abdaf574a scons: Fix xlib build.
After glsl rework merge.
2009-12-28 22:53:40 +00: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
1071ad70f5 glsl/apps: Update after glsl cl interface changes. 2009-12-20 21:19:10 +01:00
Michal Krol
d801c296c6 glsl: Do syntax parsing inline with processing. 2009-12-20 21:19:07 +01:00
Michal Krol
9c15948125 glsl/apps: Update after glsl pp interface changes. 2009-12-20 21:19:03 +01:00
Michal Krol
e0f57a37b2 glsl/apps: Do not print number of eaten tokens in version.
This is due to the glsl pp interface changes.
2009-12-20 21:19:02 +01:00
Michal Krol
0874ce48a6 glsl/apps: Print error line number in compile. 2009-12-20 21:19:01 +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
Sedat Dilek
294bd53d4b glsl/apps: Add dummy install target to fix 'make install'
Signed-off-by: Brian Paul <brianp@vmware.com>
2009-12-17 12:46:55 -07: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
289eab5389 glsl/sl: fix _parse_boolconstant()
Need to emit the radix before the digits.
This fixes several glean/glgl1 regressions.
2009-12-10 09:16:39 -07:00
Brian Paul
05eccfe79e glsl/apps: remove unused vars 2009-12-10 08:25:47 -07: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
Brian Paul
7502b6affa glsl/cl: silence unused var warning 2009-12-10 08:24:45 -07:00
Michal Krol
417f36ccb0 glsl/apps: Predefine __GLSL_PP_PREDEFINED_MACRO_TEST for testing. 2009-12-10 12:58:44 +01:00
Michal Krol
22200bcafc glsl/pp: Add support for user-defined macros. 2009-12-10 12:58:21 +01:00
Michal Krol
d1a09a9ba4 glsl/apps: Explicitly add ARB_draw_buffers and ARB_texture_rectangle. 2009-12-10 12:39:37 +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
77a0a3e5ca glsl/apps: Make compile more shell friendly. 2009-11-25 14:59:29 +01:00
Michal Krol
3371f7e502 scons: Autogenerate GLSL builtin library *_gc.h from *.gc files. 2009-11-25 14:52:21 +01:00
Michal Krol
6199a0cf89 glsl/apps: No need to purify source text for tokeniser. 2009-11-21 20:44:16 +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