summaryrefslogtreecommitdiff
path: root/src/glsl/ast_function.cpp
AgeCommit message (Collapse)Author
2010-07-18glsl2: Remove the const disease from function signature's callee.Eric Anholt
2010-07-14ast_function: Actually do type conversion on function arguments.Kenneth Graunke
2010-07-09ast_function: Fix non-float constructors with matrix arguments.Kenneth Graunke
Previously, code like ivec4(mat2(...)) would fail because the compiler would naively try to convert a mat2 to an imat2...which doesn't exist. Now, a separate pass breaks such matrices down to their columns, which can be converted from vec2 to ivec2. Fixes piglit tests constructor-11.vert, constructor-14.vert, constructor-15.vert, and CorrectConstFolding2.frag.
2010-07-09ast_function: Move error return earlier and don't indent the world.Kenneth Graunke
This has no functional changes.
2010-07-09ast_function: Remove unnecessary check for empty constructors.Kenneth Graunke
This case is already caught by a later check that ensures sufficient components were provided, based on the type.
2010-06-30glsl2: Use _mesa_glsl_parse_state as the talloc parent, not glsl_shader.Kenneth Graunke
_mesa_glsl_parse_state should be the parent for all temporary allocation done while compiling a shader. glsl_shader should only be used as the parent for the shader's final IR---the _result_ of compilation. Since many IR instructions may be added or discarded during optimization passes, IR should not ever be allocated to glsl_shader directly. Done via sed -i s/talloc_parent(state)/state/g and s/talloc_parent(st)/st/g. This also removes a ton of talloc_parent calls, which may help performance.
2010-06-29glsl2: Use talloc_strdup when generating constructor temporary namesIan Romanick
2010-06-29glsl2: Don't flatten constructor parameters to scalarsIan Romanick
Now that all scalar, vector, and matrix constructors are emitted in-line, the parameters to these constructors should not be flattened to a pile of scalars. Instead, the functions that emit the in-line constructor bodies can directly write the parameters to the correct locations in the objects being constructed.
2010-06-29glsl2: Always emit matrix constructors inlineIan Romanick
2010-06-29glsl2: Always emit vector constructors inlineIan Romanick
2010-06-28glsl2: Use i2b and f2b IR opcodes for casting int or float to boolIan Romanick
2010-06-24glsl2: Move the compiler to the subdirectory it will live in in Mesa.Eric Anholt