summaryrefslogtreecommitdiff
path: root/src/glsl
AgeCommit message (Collapse)Author
2010-09-07ast_to_hir: Reject unsized array declarations in GLSL ES 1.00.Kenneth Graunke
2010-09-07ast_to_hir: Allow matrix-from-matrix constructors in GLSL ES.Kenneth Graunke
Everything but 1.10 supports this, so just change the check to ==.
2010-09-07linker: Fix assertion and cross-version checks for version 100.Kenneth Graunke
Fixes an assert (min_version >= 110) which was no longer correct, and also prohibits linking ES2 shaders with non-ES2 shaders. I'm not positive this is correct, but the specification doesn't seem to say.
2010-09-07glsl: Add built-in function profiles for GLSL ES 1.00.Kenneth Graunke
2010-09-07glsl: Add built-in variables for GLSL ES 1.00.Kenneth Graunke
2010-09-07glsl: Split out types that are in 1.10 but not GLSL ES 1.00.Kenneth Graunke
2010-09-07glsl: Recognize GLSL ES 1.00 keywords.Kenneth Graunke
2010-09-07glsl: Define GL_ES preprocessor macro if API is OpenGL ES 2.0.Kenneth Graunke
Also define it if #version 100 is encountered.
2010-09-07glsl: Accept language version 100 and make it the default on ES2.Kenneth Graunke
2010-09-07glsl: Set default language version in mesa_glsl_parse_state constructor.Kenneth Graunke
This should make it easier to change the default version based on the API (say, version 1.00 for OpenGL ES). Also, synchronize the symbol table's version with the parse state's version just before doing AST-to-HIR. This way, it will be set when it matters, but the main initialization code doesn't have to care about the symbol table.
2010-09-07glsl2: Forbid array-types in ?: operator in GLSL 1.10Ian Romanick
Fixes bugzilla #30039.
2010-09-07glsl2: Early return with visit_continue in ↵Ian Romanick
loop_analysis::visit(ir_dereference_variable *) Returning early with visit_continue_with_parent prevented the then-statements and else-statements of if-statements such as the following from being processed: if (some_var) { ... } else { ... } Fixes piglit test case glsl-fs-loop-nested-if and bugzilla #30030.
2010-09-07glsl: Change grammar rules for selection statements to match the spec.Kenneth Graunke
Fixes piglit test case loop-06.vert. Unfortunately, causes 1 shift/reduce conflict.
2010-09-07glsl2: check for _NumLinkedShaders being 0Török Edvin
Otherwise spring 0.82+.4.0 crashes when starting a game because prog->_LinkedShaders[0] is NULL. This also fixes piglit test cases glsl-link-empty-prog-0[12].
2010-09-05glsl: Add new files to sconscript.José Fonseca
2010-09-05ir_reader: Only validate IR when a global 'debug' flag is set.Kenneth Graunke
This extra validation is very useful when working on the built-ins, but in general overkill - the results should stay the same unless the built-ins or ir_validate have changed. Also, validating all the built-in functions in every test case makes piglit run unacceptably slow.
2010-09-04ir_reader: Run ir_validate on the generated IR.Kenneth Graunke
It's just too easy to get something wrong in hand-written IR.
2010-09-04ir_reader: Emit global variables at the top of the instruction list.Kenneth Graunke
Since functions are emitted when scanning for prototypes, functions always come first, even if the original IR listed the variable declarations first. Fixes an ir_validate error (to be turned on in the next commit).
2010-09-04ir_reader: Drop support for reading the old assignment format.Kenneth Graunke
2010-09-04glsl: Regenerate autogenerated file builtin_function.cpp.Kenneth Graunke
2010-09-04glsl/builtins: Convert assignments to new format (with write mask).Kenneth Graunke
2010-09-04ir_reader: Read the new assignment format (with write mask).Kenneth Graunke
This preserves the ability to read the old format, for momentary compatibility with all the existing IR implementations of built-ins.
2010-09-04ir_reader: Track the current function and report it in error messages.Kenneth Graunke
2010-09-04glsl/builtins: Actually print the info log if reading a builtin failed.Kenneth Graunke
2010-09-03exec_list: replace class with structBrian Paul
To match the definition below.
2010-09-03glsl2: Use as_constant some places instead of constant_expression_valueIan Romanick
The places where constant_expression_value are still used in loop analysis are places where a new expression tree is created and constant folding won't have happened. This is used, for example, when we try to determine the maximal loop iteration count. Based on review comments by Eric. "...rely on constant folding to have done its job, instead of going all through the subtree again when it wasn't a constant."
2010-09-03glsl2: Allow copy / constant propagation into array indicesIan Romanick
2010-09-03glsl2: Add module to perform simple loop unrollingIan Romanick
2010-09-03glsl2: Track the number of ir_loop_jump instructions that are in a loopIan Romanick
2010-09-03ir_expression: Add static operator_string methodIan Romanick
I've used this in quite a few debug commits that never reached an up-stream tree.
2010-09-03exec_node: Add insert_before that inserts an entire listIan Romanick
2010-09-03glsl2: Eliminate zero-iteration loopsIan Romanick
2010-09-03glsl2: Perform initial bits of loop analysis during compilationIan Romanick
2010-09-03glsl2: Add module to suss out loop control variables from loop analysis dataIan Romanick
This is the next step on the road to loop unrolling
2010-09-03glsl2: Add module to analyze variables used in loopsIan Romanick
This is the first step eventually leading to loop unrolling.
2010-09-03ir_validate: Validate loop control fields in ir_loopIan Romanick
2010-09-03glsl2: Add cmp field to ir_loopIan Romanick
This reprents the type of comparison between the loop induction variable and the loop termination value.
2010-09-03glsl2: Set a flag when visiting the assignee of an assignmentIan Romanick
2010-09-03exec_list: Add pop_headIan Romanick
2010-09-03ir_print_visitor: Print empty else blocks more compactlyIan Romanick
2010-09-02glsl2: Update TODO fileIan Romanick
2010-09-01glsl: Apply implicit conversions to structure constructor parameters.Kenneth Graunke
The code for handling implicit conversions should probably get refactored, but for now, this is easy. Fixes piglit test constructor-26.vert.
2010-09-01glsl: Convert constant record constructor parameters to ir_constants.Kenneth Graunke
I'm not sure if this is strictly necessary, but it seems wise.
2010-09-01glsl: Reject structure constructors that have too many arguments.Kenneth Graunke
Fixes piglit test constructor-27.vert.
2010-09-01glsl2: Remove unnecessary glsl_symbol_table::get_function parameter ↵Ian Romanick
return_constructors Now that constructors are not generated as functions or stored in the symbol table, there is no need to flag whether or not constructors should be returned.
2010-09-01glsl2: Remove unused method glsl_type::generate_constructorIan Romanick
2010-09-01glsl2: Remove unused 'constructor' parameter from glsl_symbol_table::add_typeIan Romanick
2010-09-01glsl2: Don't generate constructor functions for structuresIan Romanick
2010-09-01glsl2: Emit structure constructors inlineIan Romanick
Fixes piglit test cases glsl-[fv]s-all-0[12].
2010-09-01glsl: Fix write mask in matrix-from-matrix constructors.Kenneth Graunke
If the matrix being constructed was larger than the source matrix, it would overwrite the lower-right part of the matrix with the wrong values, rather than leaving it as the identity matrix. For example, constructing a mat4 from a mat2 should only use a writemask of "xy" when copying from the source, but was using "xyzw". Fixes the code generated by piglit test constructor-23.vert.