summaryrefslogtreecommitdiff
path: root/src/glsl
AgeCommit message (Collapse)Author
2010-08-21glsl: Silence uninitialized variable warning.Vinson Lee
i686-apple-darwin10-gcc-4.2.1 generated the following warning. warning: 'score' may be used uninitialized in this function GCC 4.4.3 on Linux didn't generate the above warning.
2010-08-21glsl: Silence unused variable warning.Vinson Lee
The variable is actually used but only in the body of an assert.
2010-08-21glsl: Handle array declarations in function parameters.Kenneth Graunke
The 'vec4[12] foo' style already worked, but the 'vec4 foo[12]' style did not. Also, 'vec4[] foo' was wrongly accepted. Fixes piglit test cases array-19.vert and array-21.vert. May fix fd.o bug #29684 (or at least part of it).
2010-08-21generate_builtins.py: Remove unused import sys.Vinson Lee
2010-08-20Delete more vestiges of the old shader compiler.Kenneth Graunke
2010-08-20Remove remnants of the old glsl compiler.Eric Anholt
2010-08-20ast_to_hir: Reject function names that start with "gl_".Kenneth Graunke
Fixes piglit test redeclaration-03.vert.
2010-08-20ast_to_hir: Fix crash when a function shadows a variable.Kenneth Graunke
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).
2010-08-18glsl: Replace sscanf in s_expression reader with strspn and strcspn.Kenneth Graunke
This seems to give roughly a 20% speedup.
2010-08-18glsl: Also strdup the names of uniform list entries for >vec4 types.Eric Anholt
Fixes double-free since the fix to free all of the uniform list.
2010-08-18glcpp: Refresh autogenerated lexer.Kenneth Graunke
2010-08-18glcpp: Add basic #line support (adapted from the main compiler).Kenneth Graunke
2010-08-18glsl2: Free the shader compiler at dri screen destruction.Eric Anholt
Hooray, we can valgrind again without adding suppressions. This also adds an interface for use by an implementation of glReleaseShaderCompiler().
2010-08-18glsl: Fix leak-causing typo in destructor that made it another constructor.Eric Anholt
2010-08-18glsl: Fix uninitialized member in ir_hierarchical_vistor constructor.Vinson Lee
Class member base_ir was not initialized by the default constructor.
2010-08-18glsl: Garbage collect old prototype for ir_to_mesa.Eric Anholt
2010-08-18mesa: Free old linked shaders when relinking new shaders.Eric Anholt
2010-08-18glsl2: Fix copy'n'paste hilarity leading to leaking in the refcount visitor.Eric Anholt
2010-08-18glsl: Fix scoping bug in if statements.Kenneth Graunke
Fixes glslparsertest/glsl2/scoping-01.frag (successfully compiled but should've failed) and scoping-02.frag (assertion triggered).
2010-08-18glsl: Refresh autogenerated file builtin_function.cpp.Kenneth Graunke
2010-08-18generate_builtins.py: Clean up generated output a bit.Kenneth Graunke
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.
2010-08-18glsl/builtins: Add forgotten hyperbolic trig builtins in 1.30 profiles.Kenneth Graunke
2010-08-18ir_constant_expression: Implement equal/notEqual for booleans.Kenneth Graunke
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.
2010-08-17glsl2: Regenerate builtin_function.cpp.Kenneth Graunke
2010-08-17glsl2: Fix cut and paste error in EXT_texture_array builtins.Kenneth Graunke
Fixes fd.o bug #29629.
2010-08-17glcpp: Refresh generated files.Carl Worth
After a recent change to glcpp-parse.y (adding "redefined macro" error).
2010-08-17glcpp: Add support for "redefined macro" error.Carl Worth
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.
2010-08-17glcpp: Add two new tests for testing redefined macros.Carl Worth
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).
2010-08-17glcpp: Allow standalone glcpp to accept a filename as first argument.Carl Worth
This is useful for debugging the preprocessor.
2010-08-17glcpp: Fix 064-version.c expected result to track recent change.Carl Worth
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.
2010-08-17glcpp: Regenerated glcpp-lex.c from previous commit.Carl Worth
The previous commit changed glcpp-lex.l so we commit the resulting generated file here.
2010-08-17glcpp: Don't include the newline when discarding single-line commentsCarl Worth
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).
2010-08-17glcpp: Add testcase for #if handling bug that breaks Savage2.Eric Anholt
2010-08-17glsl2: Fix transpose of rows and colsIan Romanick
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.
2010-08-17linker: Demote user-defined varyings in the VS-only caseIan Romanick
Fixes piglit test case glsl-vs-ff-frag and bugzilla #29623.
2010-08-17glsl: When doing algebraic simplification, make sure the type still matches.Eric Anholt
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
2010-08-17glsl: Make ir_algebraic new expressions allocate out of the parent.Eric Anholt
This could reduce the amount of memory used by a shader tree after optimization, and increases consistency with other passes.
2010-08-17ir_constant: Don't assert on out-of-bounds array accessesIan Romanick
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.
2010-08-16Merge branch 'glsl2'Ian Romanick
Conflicts: src/mesa/program/prog_optimize.c
2010-08-16glsl2: Refresh autogenerated file builtin_function.cpp.Kenneth Graunke
2010-08-16glsl2: Add builtins profile for GLSL 1.30.Kenneth Graunke
Many functions are currently wrapped with #if 0 since we haven't implemented them yet.
2010-08-16linker: Include compiler.h to avoid spurious warnings about INLINEIan Romanick
2010-08-16glsl2: Silence unused variable warningIan Romanick
2010-08-16glcpp: Refresh autogenerated lexer and parser.Kenneth Graunke
2010-08-16glcpp: Remove spurious newline generated by #version handling.Kenneth Graunke
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.
2010-08-14Revert "glsl2: Use stdint.h instead of inttypes.h"José Fonseca
This reverts commit a77a6bc008b3146c56431fa520a00e1f8dfa3938.
2010-08-14glsl: Standardize a few more uses of struct vs class keyword.José Fonseca
2010-08-14glsl: Silence gcc warning "control reaches end of non-void function".José Fonseca
2010-08-14scons: Add new source files.José Fonseca
2010-08-14glsl: Clean up header file inclusion.Vinson Lee