| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
| |
This error led to an assertion failure for some constructors of
non-square matrices. It only occured in matrices where the number of
columns was greater than the number of rows. It didn't even always
occur on those.
Fixes piglit glslparsertest case constructor-16.vert.
|
|
|
|
| |
Fixes piglit test case glsl-vs-ff-frag and bugzilla #29623.
|
|
|
|
|
|
|
|
|
|
|
|
| |
When simplifying (vec4(1.0) / (float(x))) to rcp(float(x)), we forgot
to produce a vec4, angering ir_validate when starting alien-arena.
Fixes:
glsl-algebraic-add-zero-2
glsl-algebraic-div-one-2
glsl-algebraic-mul-one-2
glsl-algebraic-sub-zero-3
glsl-algebraic-rcp-sqrt-2
|
|
|
|
|
| |
This could reduce the amount of memory used by a shader tree after
optimization, and increases consistency with other passes.
|
|
|
|
|
|
|
|
|
| |
Several optimization paths, including constant folding, can lead to
accessing an ir_constant array with an out of bounds index. The GLSL
spec lets us produce "undefined" results, but it does not let us
crash.
Fixes piglit test case glsl-array-bounds-01 and glsl-array-bounds-03.
|
|\
| |
| |
| |
| | |
Conflicts:
src/mesa/program/prog_optimize.c
|
| | |
|
| |
| |
| |
| |
| | |
Many functions are currently wrapped with #if 0 since we haven't
implemented them yet.
|
| | |
|
| | |
|
| | |
|
| |
| |
| |
| |
| |
| | |
This was causing line numbering to be off by one. The newline comes
from the NEWLINE token at the end of the line; there's no need to
insert one.
|
| |
| |
| |
| | |
This reverts commit a77a6bc008b3146c56431fa520a00e1f8dfa3938.
|
| | |
|
| | |
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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.
|
| | |
|
| |
| |
| |
| |
| | |
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.
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
| |
| |
| | |
Makes the build happy on non-GCC platforms.
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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.
|