summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2010-04-21Refactor IR function representation.Kenneth Graunke
Now, ir_function is emitted as part of the IR instructions, rather than simply existing in the symbol table. Individual ir_function_signatures are not emitted themselves, but only as part of ir_function.
2010-04-21Use ir_function_signature::function_name() rather than direct access.Kenneth Graunke
2010-04-21Ensure that both parameter lists are the same length in function overloading.Kenneth Graunke
Fixes new test function-05.glsl, where the second function has matching parameter types, but less of them.
2010-04-21Add missing break statementIan Romanick
2010-04-19Remove dead code assignments and variable declarations.Eric Anholt
This pass only works on assignments where the variable is never referenced. There is no code flow analysis, so it can't do a better job of avoiding redundant assignments. For now, the optimizer only does do_dead_code_unlinked(), so it won't trim the builtin variable list or initializers outside of the scope of functions. This is because we don't have the visibility into other functions that might get linked in in order to eliminate work on global variables.
2010-04-19Mark some variables as having usage beyond the shader's scope.Eric Anholt
This will be important to optimization passes. We don't want to dead-code eliminate writes to out varyings, or propagate uninitialized values of uniforms.
2010-04-16While-loops also start a new scope.Ian Romanick
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