Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | glcpp: Add a testcase for the failure in compiling xonotic's shader. | Eric Anholt | 2010-08-01 | 2 | -0/+9 |
| | | | | gcc and mesa master agree that this is OK. | ||||
* | glsl2: Do algebraic optimizations after linking as well. | Eric Anholt | 2010-07-31 | 1 | -0/+1 |
| | | | | | Linking brings in inlining of builtins, so we weren't catching the (rcp(/sqrt(x)) -> rsq(x)) without it. | ||||
* | glsl2: Add new tree grafting optimization pass. | Eric Anholt | 2010-07-31 | 5 | -0/+360 |
| | |||||
* | glsl2: Factor out the variable refcounting part of ir_dead_code.cpp. | Eric Anholt | 2010-07-31 | 4 | -112/+190 |
| | |||||
* | glsl2: Fix stack smash when ternary selection is used. | Aras Pranckevicius | 2010-07-31 | 1 | -1/+1 |
| | |||||
* | glsl2: Fix the implementation of atan(y, x). | Eric Anholt | 2010-07-30 | 2 | -166/+166 |
| | | | | | | | | | | | | | | | | 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 | ||||
* | ast: Initialize location data in constructor of all ast_node objects. | Carl Worth | 2010-07-30 | 1 | -1/+3 |
| | | | | | | 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! | ||||
* | glsl2: Update the callee pointer of calls to newly-linked-in functions. | Eric Anholt | 2010-07-30 | 1 | -0/+2 |
| | | | | | | 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. | ||||
* | glsl2: Initialize ir_function_signature::is_built_in. | Kenneth Graunke | 2010-07-30 | 1 | -0/+1 |
| | | | | Fixes a valgrind error. | ||||
* | glcpp: Don't look for backslashes before the beginning of the string. | Kenneth Graunke | 2010-07-30 | 1 | -3/+7 |
| | | | | Fixes a valgrind error. | ||||
* | glsl2: Do ir_if_return on the way out, not the way in. | Eric Anholt | 2010-07-29 | 1 | -19/+20 |
| | | | | | | | | | | | | | | | 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 | ||||
* | glsl2: Make sure functions end with a return before doing ir_if_return. | Eric Anholt | 2010-07-29 | 1 | -1/+61 |
| | | | | | | | | | 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) | ||||
* | glsl2: Make ir_if_return handle if () { return } else { not return } | Eric Anholt | 2010-07-29 | 1 | -26/+77 |
| | | | | | | | | This makes many remaining functions inlinable. Fixes for i965: glsl1-function with early return (1) glsl1-function with early return (2) | ||||
* | glsl2: Refactor a bit of ir_if_return for the next changes. | Eric Anholt | 2010-07-29 | 1 | -22/+34 |
| | |||||
* | glsl2: Allow use of _mesa_print_ir without a parse state on hand. | Eric Anholt | 2010-07-29 | 1 | -10/+12 |
| | |||||
* | ir_constant_variable: Don't mark variable from outside our scope as constant. | Eric Anholt | 2010-07-29 | 1 | -1/+20 |
| | | | | | Fixes (with software, except for alpha): glsl1-function with early return(3) | ||||
* | glsl2: When dumping IR for debug, indent nested blocks. | Eric Anholt | 2010-07-29 | 2 | -6/+54 |
| | | | | | No more trying to match parens in my head when looking at the body of a short function containing an if statement. | ||||
* | glsl2: When dumping IR for debug, skip all the empty builtin prototypes. | Eric Anholt | 2010-07-29 | 1 | -3/+15 |
| | |||||
* | glsl2: Fix spelling of "sentinel." | Eric Anholt | 2010-07-29 | 7 | -31/+31 |
| | |||||
* | glsl2: Fix spelling of "initializer." | Eric Anholt | 2010-07-29 | 1 | -4/+5 |
| | |||||
* | glsl2: Remove an inlined unvalued return statement. | Eric Anholt | 2010-07-29 | 1 | -0/+1 |
| | | | | | | | | 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. | ||||
* | glsl2: Actually fix glsl-version-define. | Eric Anholt | 2010-07-28 | 2 | -6/+0 |
| | |||||
* | glcpp: Add __VERSION__ define to the current language version. | Eric Anholt | 2010-07-28 | 5 | -714/+774 |
| | | | | | | | Fixes: glsl-version-define glsl-version-define-110 glsl-version-define-120 | ||||
* | glcpp: Print integer tokens as decimal, not hex. | Eric Anholt | 2010-07-28 | 2 | -2/+2 |
| | |||||
* | glsl2: Make lowp, mediump, highp, and precision identifiers pre-1.20. | Eric Anholt | 2010-07-28 | 2 | -16/+72 |
| | | | | Fixes glsl-precision-110. | ||||
* | glsl2/Makefile: Append to DEFINES rather than replacing them. | Kenneth Graunke | 2010-07-28 | 1 | -1/+1 |
| | | | | | Otherwise, we lose DEBUG, which causes mtypes.h to set NDEBUG, which causes assertions to not happen, which is no fun for anyone. | ||||
* | glsl2: Fix outerProduct builtin. | Kenneth Graunke | 2010-07-28 | 3 | -100/+100 |
| | | | | The type signatures were completely backwards. | ||||
* | ir_constant_expression: Add support for the "outerProduct" builtin. | Kenneth Graunke | 2010-07-28 | 1 | -1/+8 |
| | |||||
* | ir_constant_expression: Add support for the "mix" builtin. | Kenneth Graunke | 2010-07-28 | 1 | -1/+13 |
| | | | | Both 1.10 and 1.30 variants. | ||||
* | ir_constant_expression: Add support for the "transpose" builtin. | Kenneth Graunke | 2010-07-28 | 1 | -1/+8 |
| | |||||
* | ir_constant_expression: Add support for the "smoothstep" builtin. | Kenneth Graunke | 2010-07-28 | 1 | -1/+15 |
| | |||||
* | ir_constant_expression: Add support for the "clamp" builtin. | Kenneth Graunke | 2010-07-28 | 1 | -1/+24 |
| | |||||
* | ir_constant_expression: Add support for the "step" builtin. | Kenneth Graunke | 2010-07-28 | 1 | -1/+5 |
| | |||||
* | ir_constant_expression: Add support for the "faceforward" builtin. | Kenneth Graunke | 2010-07-28 | 1 | -1/+4 |
| | |||||
* | ir_constant_expression: Add support for the "refract" builtin. | Kenneth Graunke | 2010-07-28 | 1 | -1/+11 |
| | |||||
* | ir_constant_expression: Add support for the "reflect" builtin. | Kenneth Graunke | 2010-07-28 | 1 | -1/+4 |
| | |||||
* | ir_constant_expression: Add support for the "normalize" builtin. | Kenneth Graunke | 2010-07-28 | 1 | -1/+8 |
| | |||||
* | ir_constant_expression: Add support for the "matrixCompMult" builtin. | Kenneth Graunke | 2010-07-28 | 1 | -1/+3 |
| | |||||
* | ir_constant_expression: Simplify code that implements the "dot" builtin. | Kenneth Graunke | 2010-07-28 | 1 | -1/+1 |
| | | | | There's no need to use an ir_expression; we have a handy C function. | ||||
* | ir_constant_expression: Add support for the "length" builtin. | Kenneth Graunke | 2010-07-28 | 1 | -1/+1 |
| | |||||
* | ir_constant_expression: Extract dot product calculation for reuse. | Kenneth Graunke | 2010-07-28 | 1 | -7/+14 |
| | |||||
* | ir_constant_expression: Remove support for dot products of integers. | Kenneth Graunke | 2010-07-28 | 1 | -13/+2 |
| | | | | | This shouldn't be required since dot is only defined for floating point types, even in GLSL 4.0. | ||||
* | ir_constant_expression: Add support for the "greaterThanEqual" builtin. | Kenneth Graunke | 2010-07-28 | 1 | -1/+16 |
| | |||||
* | ir_constant_expression: Add support for the "greaterThan" builtin. | Kenneth Graunke | 2010-07-28 | 1 | -1/+16 |
| | |||||
* | ir_constant_expression: Add support for the "lessThanEqual" builtin. | Kenneth Graunke | 2010-07-28 | 1 | -1/+16 |
| | |||||
* | ir_constant_expression: Add support for the "lessThan" builtin. | Kenneth Graunke | 2010-07-28 | 1 | -1/+16 |
| | |||||
* | ir_constant_expression: Add support for the "notEqual" builtin. | Kenneth Graunke | 2010-07-28 | 1 | -1/+16 |
| | |||||
* | ir_constant_expression: Add support for the "equal" builtin. | Kenneth Graunke | 2010-07-28 | 1 | -1/+16 |
| | |||||
* | ir_constant_expression: Add support for the "distance" builtin. | Kenneth Graunke | 2010-07-28 | 1 | -1/+7 |
| | |||||
* | ir_constant_expression: Add support for the "degrees" builtin. | Kenneth Graunke | 2010-07-28 | 1 | -1/+3 |
| |