Kenneth Graunke
719caa403e
glsl: Accept language version 100 and make it the default on ES2.
2010-09-07 17:30:37 -07:00
Kenneth Graunke
814c89abdb
glsl: Set default language version in mesa_glsl_parse_state constructor.
...
This should make it easier to change the default version based on the
API (say, version 1.00 for OpenGL ES).
Also, synchronize the symbol table's version with the parse state's
version just before doing AST-to-HIR. This way, it will be set when
it matters, but the main initialization code doesn't have to care about
the symbol table.
2010-09-07 17:30:37 -07:00
Ian Romanick
de7c3fe31a
glsl2: Add module to perform simple loop unrolling
2010-09-03 11:55:22 -07:00
Ian Romanick
8df2dbf91d
glsl2: Perform initial bits of loop analysis during compilation
2010-09-03 11:55:21 -07:00
Chia-I Wu
bfd7c9ac22
glsl: Include main/core.h.
...
Make glsl include only main/core.h from core mesa.
2010-08-24 11:27:29 +08:00
Eric Anholt
b83846475b
glsl2: Free the shader compiler at dri screen destruction.
...
Hooray, we can valgrind again without adding suppressions. This also
adds an interface for use by an implementation of
glReleaseShaderCompiler().
2010-08-18 17:10:48 -07:00
Eric Anholt
8f8cdbfba4
glsl2: Add a pass to strip out noop swizzles.
...
With the glsl2-965 branch, the optimization of glsl-algebraic-rcp-rcp
regressed due to noop swizzles hiding information from ir_algebraic.
This cleans up those noop swizzles for us.
2010-08-13 17:54:47 -07:00
Eric Anholt
2f4fe15168
glsl2: Move the common optimization passes to a helper function.
...
These are passes that we expect all codegen to be happy with. The
other lowering passes for Mesa IR are moved to the Mesa IR generator.
2010-08-13 17:47:00 -07:00
Ian Romanick
4f397e1d64
glsl2: Enable all supported extensions in stand-alone compiler
2010-08-05 17:50:13 -07:00
Carl Worth
ec9675ec53
ast: Initialize location data in constructor of all ast_node objects.
...
This prevents using uninitialized data in _msea_glsl_error in some
cases, (including at least 6 piglit tests). Thanks to valgrind for
pointing out the problem!
2010-07-30 15:03:37 -07:00
Ian Romanick
f50f06552e
glsl2: Parser support for GL_ARB_fragment_coord_conventions
2010-07-28 14:14:38 -07:00
Kenneth Graunke
aa9f86ae8b
glsl2: Fix standalone compiler to not crash horribly.
...
ir_to_mesa was updated for the _mesa_glsl_parse_state constructor
changes, but main.cpp was not.
2010-07-22 16:50:36 -07:00
Ian Romanick
2462a536ea
glsl2: Add a constructor for _mesa_glsl_parse_state
...
Coming changes to the handling of built-in functions necessitate this.
2010-07-20 17:48:24 -07:00
Eric Anholt
87a2ee8db6
glsl2: Fix warning from always-false assert not being known to not return.
2010-07-18 17:49:15 -07:00
Ian Romanick
667f4e1940
glsl2: Conditionally allow optional extensions to be enabled
...
The only optional extension currently supported by the compiler is
GL_EXT_texture_array.
2010-07-01 20:40:08 -07:00
Ian Romanick
3832706f81
glsl2: Initialize ast_declarator_list::invariant in constructor
2010-07-01 17:10:11 -07:00
Eric Anholt
2928588267
glsl2: Move the compiler to the subdirectory it will live in in Mesa.
2010-06-24 15:36:00 -07:00