summaryrefslogtreecommitdiff
path: root/src/glsl
AgeCommit message (Collapse)Author
2010-08-04glsl2: Refactor constant folding of rvalues to a function.Eric Anholt
2010-08-04glcpp: Refresh autogenerated lexer and parser.Kenneth Graunke
2010-08-04glcpp: Remove xtalloc wrappers in favor of plain talloc.Kenneth Graunke
Calling exit() on a memory failure probably made sense for the standalone preprocessor, but doesn't seem too appealing as part of the GL library. Also, we don't use it in the main compiler.
2010-08-04glsl2: Remove uses of deprecated TALLOC_CTX type.Kenneth Graunke
2010-08-04glsl2: add gl_LightModel built-in uniform.Aras Pranckevicius
2010-08-04glsl2: Don't try to assign locations for samplers during linking.Eric Anholt
Mesa will do the mapping at _mesa_add_sampler() time. Fixes assertion failures in debug builds, which might have caught real problems with multiple samplers linked in a row.
2010-08-04glsl2: Skip talloc_parent in constant_expression of non-constant arrays.Eric Anholt
2010-08-04glsl2: Make the clone() method take a talloc context.Eric Anholt
In most cases, we needed to be reparenting the cloned IR to a different context (for example, to the linked shader instead of the unlinked shader), or optimization before the reparent would cause memory usage of the original object to grow and grow.
2010-08-04glsl2: Set ir_discard::ir_type when cloning itAras Pranckevicius
Fixes unset ir_type after inlining.
2010-08-03glsl2: Fix ir_validate validating null variable names.Eric Anholt
An unnamed variable in a prototype will have a NULL ->name, so don't worry about storage then. Fixes: CorrectFunction1.vert CorrectParse1.frag
2010-08-03glsl2: No need to strdup the name passed in to ir_variable constructor.Eric Anholt
ir_variable always strdups the incoming name so that it matches the lifetime of the ir_variable.
2010-08-02glsl2: Fix typo in clamp() constant builtin using uint instead of int.Eric Anholt
I take back the bad things I've said about the signed/unsigned comparison warning now.
2010-08-02glsl2: Don't consider uniform initializers as constant expressions.Eric Anholt
We were happily optimizing away the body of glsl-uniform-initializer-* to never use the uniforms.
2010-08-02glsl2: Use talloc_zero_size instead of talloc_size to allocate ast_node objects.Carl Worth
This is a zero-ing function, (like calloc), to avoid bugs due to accessing uninitialized values. Thanks to valgrind for noticing the use of uninitialized values.
2010-08-02glsl_type: Use string key for array type hashIan Romanick
2010-08-02glsl2: Clean-up two 'unused variable' warningsIan Romanick
2010-08-02glsl2: Make glsl_types::ctx private againIan Romanick
2010-08-02glsl2: Fix expression type in builtin tan().Eric Anholt
Fixes glsl-fs-tan-1.
2010-08-02glsl2: Add validation that talloc ownership of ir_* names is right.Eric Anholt
2010-08-02glsl2: Fix validation for ir_unop_not.Eric Anholt
We use vector ir_unop_not to implement builtin not(), and that seems fine.
2010-08-02glsl2: Add support for floating constants like "1f".Eric Anholt
Fixes glsl-floating-constant-120.
2010-08-02glsl2: Initialize the ARB_fcc fields of ir_variable.Eric Anholt
Fixes intermittent failure in glsl-arb-fragment-coord-conventions.
2010-08-02glsl2: Also initialize the identifier field of parameter_declarator.Eric Anholt
The non-named parameter grammar understandably doesn't set the identifier field. Fixes intermittent failures about void main(void) {} having a named void parameter.
2010-08-02glsl2: Fix spelling of "precision" in error output.Eric Anholt
2010-08-02glsl2: Don't add mesa/program/ as an include dir. Let includes say program/.Eric Anholt
2010-08-02glsl2: Give the path within src/mesa/ for headers instead of relying on -I.Aras Pranckevicius
2010-08-02glsl2: initialize is_array and array_size of ast_parameter_declaratorAras Pranckevicius
The non-array path of glsl_parser.ypp wasn't setting is_array to false.
2010-08-01glsl2: Make non-square matrix keywords not keywords pre-120.Eric Anholt
Fixes glsl-mat-110.
2010-08-01glcpp: Add a testcase for the failure in compiling xonotic's shader.Eric Anholt
gcc and mesa master agree that this is OK.
2010-07-31glsl2: Do algebraic optimizations after linking as well.Eric Anholt
Linking brings in inlining of builtins, so we weren't catching the (rcp(/sqrt(x)) -> rsq(x)) without it.
2010-07-31glsl2: Add new tree grafting optimization pass.Eric Anholt
2010-07-31glsl2: Factor out the variable refcounting part of ir_dead_code.cpp.Eric Anholt
2010-07-31glsl2: Fix stack smash when ternary selection is used.Aras Pranckevicius
2010-07-30glsl2: Fix the implementation of atan(y, x).Eric Anholt
So many problems here. One is that we can't do the quadrant handling for all the channels at the same time, so we call the float(y, x) version multiple times. I'd also left out the x == 0 handling. Also, the quadrant handling was broken for y == 0, so there was a funny discontinuity on the +x side if you plugged in obvious values to test. I generated the atan(float y, float x) code from a short segment of GLSL and pasted it in by hand. It would be nice to automate that somehow. Fixes: glsl-fs-atan-1 glsl-fs-atan-2
2010-07-30ast: Initialize location data in constructor of all ast_node objects.Carl Worth
This prevents using uninitialized data in _msea_glsl_error in some cases, (including at least 6 piglit tests). Thanks to valgrind for pointing out the problem!
2010-07-30glsl2: Update the callee pointer of calls to newly-linked-in functions.Eric Anholt
Otherwise, ir_function_inlining will see the body of the function from the unlinked version of the shader, which won't have had the lowering passes done on it or linking's variable remapping.
2010-07-30glsl2: Initialize ir_function_signature::is_built_in.Kenneth Graunke
Fixes a valgrind error.
2010-07-30glcpp: Don't look for backslashes before the beginning of the string.Kenneth Graunke
Fixes a valgrind error.
2010-07-29glsl2: Do ir_if_return on the way out, not the way in.Eric Anholt
The problem with doing it on the way in is that for a function with multiple early returns, we'll move an outer block in, then restart the pass, then move the two inside returns out, then never move outer blocks in again because the remaining early returns are inside an else block and they don't know that there's a return just after their block. By going inside-out, we get the early returns stacked up so that they all move out with a series of move_returns_after_block(). Fixes (on i965): glsl-fs-raytrace-bug27060 glsl-vs-raytrace-bug26691
2010-07-29glsl2: Make sure functions end with a return before doing ir_if_return.Eric Anholt
This catches a few remaining functions that weren't getting inlined, generally operating on global or out variables and using an early return to skip work when possible. Fixes for i965: glsl1-function with early return (3)
2010-07-29glsl2: Make ir_if_return handle if () { return } else { not return }Eric Anholt
This makes many remaining functions inlinable. Fixes for i965: glsl1-function with early return (1) glsl1-function with early return (2)
2010-07-29glsl2: Refactor a bit of ir_if_return for the next changes.Eric Anholt
2010-07-29glsl2: Allow use of _mesa_print_ir without a parse state on hand.Eric Anholt
2010-07-29ir_constant_variable: Don't mark variable from outside our scope as constant.Eric Anholt
Fixes (with software, except for alpha): glsl1-function with early return(3)
2010-07-29glsl2: When dumping IR for debug, indent nested blocks.Eric Anholt
No more trying to match parens in my head when looking at the body of a short function containing an if statement.
2010-07-29glsl2: When dumping IR for debug, skip all the empty builtin prototypes.Eric Anholt
2010-07-29glsl2: Fix spelling of "sentinel."Eric Anholt
2010-07-29glsl2: Fix spelling of "initializer."Eric Anholt
2010-07-29glsl2: Remove an inlined unvalued return statement.Eric Anholt
We already have asserts that it was the last call in the function, so it's safe to remove after it got cloned in. Fixes: glsl-fs-functions-4.
2010-07-28glsl2: Actually fix glsl-version-define.Eric Anholt