summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2010-04-16Avoid generating ir_if for &&, || short-circuiting with constant LHS.Eric Anholt
It was breaking constant expression detection for constant initializers, i.e. CorrectParse2.frag, CorrectParse2.vert.
2010-04-16Add support for inlining calls done inside of expressions.Eric Anholt
2010-04-16Make && and || only evaluate the RHS when the LHS requires it.Eric Anholt
2010-04-14Add an ir_if simplification pass.Eric Anholt
This is relatively simple at the moment, recognizing only constant values, and not (for example) values that are restricted to a range that make the branching constant. However, it does remove 59 lines from the printout of CorrectParse2.vert.
2010-04-14Check that the return type of function definition matches its prototype.Eric Anholt
Doesn't fix any testcases, but fixes a FINISHME.
2010-04-14Check that function definition parameter qualifiers match proto qualifiers.Eric Anholt
Fixes function9.frag.
2010-04-14Return the rvalue of a variable decl to fix while (bool b = condition) {}Eric Anholt
2010-04-14Fix the type of gl_FogFragCoord.Eric Anholt
2010-04-08Add an implementation of gentype-only clamp().Eric Anholt
2010-04-08Add builtin implementations of vector comparison functions.Eric Anholt
Fixes CorrectFunction1.vert, glsl-fs-notequal.frag.
2010-04-08Add support for builtin gentype mix(gentype a, gentype b)Eric Anholt
Fixes glsl-fs-mix.frag, glsl-fs-mix-constant.frag.
2010-04-08Add buitlin functions for any(), all(), not().Eric Anholt
2010-04-08Add builtin normalize() functions.Eric Anholt
Fixes CorrectSqizzle2.vert.
2010-04-08Repeat the optimization passes until we stop making progress.Eric Anholt
2010-04-08Add inlining support for array dereferences.Eric Anholt
2010-04-08Inline functions consisting of a return of an expression.Eric Anholt
2010-04-07Remove extraneous base-class constructor callsIan Romanick
2010-04-07Make function bodies rely on the parameter variable declarations.Eric Anholt
Previously, generating inlined function bodies was going to be difficult, as there was no mapping between the body's declaration of variables where parameter values were supposed to live and the parameter variables that a caller would use in paramater setup. Presumably this also have been a problem for actual codegen.
2010-04-07Make dot() take the right number of args.Eric Anholt
2010-04-07Fix the returns of builtin functions to actually return.Eric Anholt
2010-04-07Put function bodies under function signatures, instead of flat in the parent.Eric Anholt
This will let us know the length of function bodies for the purpose of inlining (among other uses).
2010-04-07Clarify the types of various exec_list in ir.hEric Anholt
2010-04-07Treat texture rectangles as an extension that is enabled be defaultIan Romanick
2010-04-07Add support for GL_ARB_draw_buffers extensionIan Romanick
2010-04-07Clean up error reporting in _mesa_glsl_process_extensionIan Romanick
2010-04-07Add tracking for extension based warningsIan Romanick
Using '#extension foo: warn' instructs the compiler to generate a warning when some feature of the extension 'foo' is used. This patch adds some infrastructure needed to support that for variables. Similar changes will be needed for types and built-in functions.
2010-04-07Emit a warning when an unknown extension is used with #extensionIan Romanick
2010-04-07Add _mesa_glsl_warning to emit warnings to the shader logIan Romanick
2010-04-07Begin processing #extension directiveIan Romanick
Nowhere near complete. It just parses correctly at this point.
2010-04-07Use _mesa_glsl_shader_target_nameIan Romanick
2010-04-07Add utility function to get the name of a shader targetIan Romanick
2010-04-07Call glsl_type::get_instance correctly: the number of rows must be at least 1Ian Romanick
This causes the following tests to pass: shaders/glsl-tex-mvp.vert
2010-04-07Eat whitespace while in the PP stateIan Romanick
2010-04-07Partially fix comment handling in preprocessor directives.Ian Romanick
Multi-line /* */ comments are still broken. I think this will wait to be fixed until we have a real preprocessor.
2010-04-07Add support for bool to ir_equal and ir_nequal constant handlingIan Romanick
2010-04-07Add gl_ClipDistance in fragment shaderIan Romanick
2010-04-07Generate correct IR for do-while loopsIan Romanick
Previously the same code was generated for a while loop and a do-while loop. This pulls the code that generates the conditional break into a separate method. This method is called either at the beginning or the end depending on the loop type. Reported-by: Kenneth Graunke <kenneth@whitecape.org>
2010-04-07Process ast_jump_statement into ir_loop_jumpIan Romanick
Specifically, handle 'break' and 'continue' inside loops. This causes the following tests to pass: glslparsertest/shaders/break.frag glslparsertest/shaders/continue.frag
2010-04-07Add dynamic cast for ir_loopIan Romanick
2010-04-07Begin tracking the nesting of loops and switch-statementsIan Romanick
2010-04-07Use switch based on mode in ast_jump_statement::hirIan Romanick
2010-04-07Add some newlines when printing ir_loop instructionsIan Romanick
2010-04-07Process ast_iteration_statement into ir_loopIan Romanick
This causes the following tests to pass: glslparsertest/shaders/dowhile.frag glslparsertest/shaders/while.frag glslparsertest/shaders/while1.frag glslparsertest/shaders/while2.frag
2010-04-07Add ir_loop_jump to represent 'break' and 'continue' in loopsIan Romanick
2010-04-07Add ir_loop to represent loopsIan Romanick
This touches a lot of files because everything derived from ir_visitor has to be updated. This is the primary disadvantage of the visitor pattern.
2010-04-06Add some linebreaks in the ir_print_visitor of if statement bodies.Eric Anholt
2010-04-06Make constant folding descend into if statements.Eric Anholt
2010-04-06Descend down the tree in more locations in constant folding.Eric Anholt
2010-04-06Perform constant folding on array indices.Eric Anholt
Replaces a constant var deref with a constant value in CorrectParse1.frag.
2010-04-06Add float/int conversion to ir_constant_expression.cpp.Eric Anholt
Gives CorrectParse2.frag one more constant folding.