| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
| |
This copies over a dummy builtin_functions.cpp and rebuilds a
bootstrapped version of the compiler, then uses that to generate the
proper list of builtins. Finally, it rebuilds the compiler with the new
list.
Unfortunately, it's no longer automatic, but at least it works.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Each language version/extension and target now has a "profile" containing
all of the available builtin function prototypes. These are written in
GLSL, and come directly out of the GLSL spec (except for expanding genType).
A new builtins/ir/ folder contains the hand-written IR for each builtin,
regardless of what version includes it. Only those definitions that have
prototypes in the profile will be included.
The autogenerated IR for texture builtins is no longer written to disk,
so there's no longer any confusion as to what's hand-written or
generated.
All scripts are now in python instead of perl.
|
| |
|
|
|
|
|
| |
This would have been included in commit 23f6017d, but make wisely did
not regenerate the file when the .lpp file did not change.
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
This one is a little tricky because of the LHS handling.
|
|
|
|
|
| |
I keep copy and pasting this code all over, so consolidate it in one
place.
|
| |
|
| |
|
|
|
|
|
| |
This lets drivers override ir_to_mesa with their own codegen, or at
least have a native alternative.
|
| |
|
|
|
|
|
| |
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.
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
| |
|
|
|
|
|
| |
Also remove the --never-interactive command line option for the
preprocessor lexer. This was already done for main compiler lexer.
|
|
|
|
|
|
|
| |
If gl_Vertex is not used in the shader, then attribute location 0 is
available for use.
Fixes piglit test case glsl-getattriblocation (bugzilla #29540).
|
| |
|
| |
|
| |
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
| |
Based on Aras Pranckevičius' patch.
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
Makes the build happy on non-GCC platforms.
|
|
|
|
|
| |
New shader compiler need libc++ runtime. This works already if
we are using llvm so this just covers the !llvm case.
|
|
|
|
|
|
|
|
|
| |
Remove --never-interactive because it is already specified in the
source using %option. Use -o instead of --outfile. Some of the
%option commands may also need to be removed for compatibility with
older versions (e.g., 2.5.4) of flex.
This should fix bugzilla #29209.
|
| |
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
| |
Accidentally having a variable called 'sig' within an if-statement
cause the higher scope 'sig' to always be NULL. As a result a new
function signature was created for a function definition even when one
already existed from a prototype declaration.
Fixes piglit test case glsl-function-prototype (bugzilla #29520).
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
Due to a recent change to glcpp-parse.y.
|
|
|
|
|
|
|
| |
This is more clear than the previously-generated diagnostic which was
something confusing like "enexpected newline".
This change makse test 080-if-witout-expression.c now pass.
|
|
|
|
|
|
| |
Rather than telling the user what to fix, the standard convention is to
describe what the detected problem is. With this change, test
081-elif-without-expression now passes.
|
|
|
|
|
|
| |
Which are proving to be useful since some of these tests are not yet
acting as desired, (in particular, the unterminated if test is not
generating any diagnostic).
|
|
|
|
| |
After a recent change to glcpp-lex.l
|
|
|
|
|
| |
Error messages make more sense this way since the convention is for
the first line of a file to be numbered from 1, rather than 0.
|
|
|
|
| |
This allows writing tests that verify diagnostics from the preprocessor.
|
| |
|
| |
|
| |
|
| |
|