Age | Commit message (Collapse) | Author |
|
|
|
|
|
Fixes piglit test redeclaration-03.vert.
|
|
The code would attempt to add a new signature to the ir_function, which
didn't exist. Simply bailing out/returning early seems reasonable.
Fixes piglit test redeclaration-02.vert, and fixes a crash in
redeclaration-03.vert (the test still fails).
|
|
This seems to give roughly a 20% speedup.
|
|
Fixes double-free since the fix to free all of the uniform list.
|
|
|
|
|
|
Hooray, we can valgrind again without adding suppressions. This also
adds an interface for use by an implementation of
glReleaseShaderCompiler().
|
|
|
|
Class member base_ir was not initialized by the default constructor.
|
|
|
|
|
|
|
|
Fixes glslparsertest/glsl2/scoping-01.frag (successfully compiled but
should've failed) and scoping-02.frag (assertion triggered).
|
|
|
|
This should make it easier to diff the output, clean up some of the
insane whitespace, and make the strings a bit smaller.
We'll probably need to split up the prototype strings eventually, but
for now, this gets it under the 65K mark.
|
|
|
|
Calls to equal(bvec, bvec) or notEqual(bvec, bvec) previously caused an
assertion. Fixes piglit tests glsl-const-builtin-equal-bool and
glsl-const-builtin-notEqual-bool.
|
|
|
|
Fixes fd.o bug #29629.
|
|
After a recent change to glcpp-parse.y (adding "redefined macro" error).
|
|
Carefully avoiding printing any error when the new definition matches
the existing definition.
This fixes the recently-added 088-redefine-macro-legitimate.c and
089-redefine-macro-error.c tests as well as glsparsertest/preprocess1
in piglit.
|
|
The specification says that redefining a macro is an error, unless the
new definitions is identical to the old one, (identical replacement
lists but ignoring differing amounts of whitespace).
|
|
This is useful for debugging the preprocessor.
|
|
In commit 6be3a8b70af4ba4fa4d037d54ecf6d5f055edbc9, the #version directive
was fixed to stop generating a spurious newline. Here we simply update
the expected result for the single test which includes a #version directive.
|
|
The previous commit changed glcpp-lex.l so we commit the resulting
generated file here.
|
|
Matching the newline here meant having to do some redundant work here,
(incrementing line number, resetting column number, and returning a
NEWLINE token), that could otherwise simply be left to the existing rule
which matches a newline.
Worse, when the comment rule matches the newline as well, the parser
can lookahead and see a token for something that should actually be skipped.
For example, in a case like this:
#if 0 // comment here
fail
#else
win
#endif
Both fail and win appear in the output, (not that the condition is being
evaluated incorrectly---merely that one token after the comment's newline
was being lexed/parse regardless of the condition).
This commit fixes the above test case, (which is also remarkably similar
to 087-if-comments which now passes).
|
|
|
|
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.
|
|
|