Age | Commit message (Collapse) | Author |
|
|
|
All & operations were incorrectly being generated as ast_bit_or.
|
|
Only layout(location=#) is supported. Setting the index requires GLSL
1.30 and GL_ARB_blend_func_extended.
|
|
This will ease adding non-bit fields in the near future.
|
|
|
|
|
|
|
|
|
|
|
|
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.
|
|
Fixes piglit test case loop-06.vert.
Unfortunately, causes 1 shift/reduce conflict.
|
|
All pragmas are currently ignored. Also, the error messages when a
pragma is used incorrectly (i.e., '#pragma debug(on)' inside a
function) are crap, but I think this is sufficient for now.
Fixes piglit test cases pragma-0[1-8].(vert|frag).
|
|
As of 1.20, variable names, function names, and structure type names all
share a single namespace, and should conflict with one another in the
same scope, or hide each other in nested scopes.
However, in 1.10, variables and functions can share the same name in the
same scope. Structure types, however, conflict with/hide both.
Fixes piglit tests redeclaration-06.vert, redeclaration-11.vert,
redeclaration-19.vert, and struct-05.vert.
|
|
In C++ you don't have to say 'struct' or 'class' if the declaration of
the type has been seen. Some compilers will complain if you use
'struct' when 'class' should have been used and vice versa.
Fixes bugzilla #29539.
|
|
|
|
MAT2 and MAT2X2, for example, are treated identically by the parser.
The language version based error checking (becuase mat2x2 is not
available in GLSL 1.10) is already done in the lexer.
|
|
Bison version 2.3 doesn't seem to support %name-prefix in the source.
This should fix bugzilla #29207.
|
|
Without this, the parser will generate obtuse, useless error
diagnostics when reservered word that are not used by the grammar are
encountered in a shader.
Fixes bugzilla #29519.
|
|
Since we have a custom structure for YYLTYPE locations, we need to use
an %initial-action directive to avoid triggering use of uninitialized
memory when, for example, printing error messages.
Thanks to valgrind for noticing this bug.
|
|
|
|
|
|
|
|
This assertion is triggered by method calls (i.e. array.length()), where
subexpressions[1] is an ast_function_call expression. Since the
assertion itself had a comment saying it could be removed eventually,
simply do so.
Causes negative glslparser tests array-length-110.frag,
array-length-args.frag, and array-length-unsized.frag to pass, but only
because the length() method is not supported yet.
|
|
This prevents conflicts with defines elsewhere in Mesa and allows
including mtypes.h in the compiler.
|
|
_mesa_glsl_parse_state should be the parent for all temporary allocation
done while compiling a shader. glsl_shader should only be used as the
parent for the shader's final IR---the _result_ of compilation.
Since many IR instructions may be added or discarded during optimization
passes, IR should not ever be allocated to glsl_shader directly.
Done via sed -i s/talloc_parent(state)/state/g and s/talloc_parent(st)/st/g.
This also removes a ton of talloc_parent calls, which may help performance.
|
|
|