summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2010-03-29Reject main() declarations with a non-void return value.Eric Anholt
Fixes main3.vert.
2010-03-29Reject variables marked with attribute in the fragment shader.Eric Anholt
Fixes attribute.frag.
2010-03-29Add the instruction for the parameter variable declarations of builtin funcs.Eric Anholt
Matches constructor setup, but I'm not really sure why we make the variable twice.
2010-03-29Implement dot() builtin.Eric Anholt
2010-03-29Implement exp2() and log2(), and make ir_unop_exp and ir_unop_log be base e.Eric Anholt
Making the base e functions IR operations is not a clear win. i965 doesn't support it, it doesn't look like r600 supports it, but r500 does. It should be easily supportable as a lowering pass, though.
2010-03-29Implement builtin length() function.Eric Anholt
2010-03-29Add sqrt() builtin as an IR operation.Eric Anholt
Following a discussion in #dri-devel, I think this makes more sense than implementing it as RSQ RCP CMP as Mesa did. The i965 has a hardware sqrt that should work, and AMD is suppposed to be able to implement it as RSQ RCP with an alternate floating point mode so that the 0.0 case is handled like we want.
2010-03-29Add builtin pow() function.Eric Anholt
2010-03-29Add support for builtin deprecated fs varyings.Eric Anholt
Fixes glsl-color.frag.
2010-03-29Implement some binary gentype builtin functions.Eric Anholt
2010-03-29Implement additional unary gentype builtins.Eric Anholt
2010-03-29Implement the first builtin function: exp().Eric Anholt
2010-03-28Generate more correctly diagnostics from some invalid initializersIan Romanick
2010-03-27Initial bits to process initializers in variable declarationsIan Romanick
As a result, the following tests pass: glslparsertest/array3.frag glslparsertest/CGStandardLibrary.frag glslparsertest/ConstantConversions.frag glslparsertest/constructor1.frag glslparsertest/constructor2.frag glslparsertest/constructor3.V110.frag glslparsertest/dataType4.frag glslparsertest/dataType5.frag glslparsertest/dataType13.frag glslparsertest/dataType19.frag glslparsertest/matrix.V110.frag glslparsertest/parser7.frag glslparsertest/swizzle3.frag The following tests also pass, but it is just by dumb luck. In these cases the shader fails to compile, but it fails for the wrong reason: glslparsertest/array6.frag glslparsertest/comma2.frag glslparsertest/conditional1.frag glslparsertest/conditional2.frag glslparsertest/conditional3.frag glslparsertest/constFunc.frag glslparsertest/ParseTest3.frag glslparsertest/ParseTest4.frag glslparsertest/varying3.frag glslparsertest/parser8.frag (also segfaults) glslparsertest/parser9.frag (also segfaults) The following tests now fail. As far as I can tell, these are all cases where the shader was failing to compile, but it was failing for the wrong reason. glslparsertest/CorrectMatComma.frag glslparsertest/CorrectModule.frag glslparsertest/CorrectSwizzle2.vert glslparsertest/shaders/glsl-fs-bug25902.frag
2010-03-26Reject uniform initializers in GLSL 1.10 modeIan Romanick
Now both glslparsertest/dataType3.frag and glslparsertest/dataType2.frag pass.
2010-03-26Set variables with the sampler base type to read only.Eric Anholt
Fixes increment3.frag.
2010-03-26Set the var_type for arrays to error_type until it's implemented.Eric Anholt
"Fixes" segfaults in array tests.
2010-03-26Add support for ast_to_hir of pre inc/dec.Eric Anholt
2010-03-26Add support for ast_to_hir of post inc/dec.Eric Anholt
2010-03-26Make read-only variables not be considered lvalues.Eric Anholt
This should fix tests trying to assign to builtin "in" variables, and will also be relied on for post_inc/dec handling.
2010-03-26Add constructors for immediate hir constants.Eric Anholt
This will make ast_to_hir for inc/dec easier.
2010-03-26Add support for %= in ast_to_hir.Eric Anholt
2010-03-26Factor out assignment setup in ast_to_hir.Eric Anholt
2010-03-26IR print visitor: Print out something for the operator.Eric Anholt
2010-03-26IR print visitor: Print expressions a little betterIan Romanick
2010-03-26Initial implementation of constructor handling codeIan Romanick
All of the scalar, vector, and matrix constructors *except* "from bool" constructors should be handled. Array and structure constructors are also not yet handled.
2010-03-26IR print visitor: print function callsIan Romanick
2010-03-26Add hack ir_call::callee_name to get the name of the called functionIan Romanick
2010-03-26Be sure to set ir_function_signature::definition for constructorsIan Romanick
2010-03-26Add ir_call::iterator to iterate over actual parametersIan Romanick
2010-03-26Add missing parenthesis in foreach_iterIan Romanick
This allows uses like 'foreach_iter(exec_list_iterator, iter, *list_ptr)'.
2010-03-26Add some simple constructor testsIan Romanick
2010-03-26Add unary operator to convert unsigned integer to floatIan Romanick
2010-03-26Slightly change the representation of numeric typesIan Romanick
For numeric types, vector_elements and matrix_columns must be at least 1. Previously matrix_columns was 0 for vectors, and both were 0 for scalars. This change simplifies things in some places.
2010-03-26Add glsl_type::components to query total number of components in a typeIan Romanick
2010-03-26Replace remaining use of is_error_type with glsl_type::is_errorIan Romanick
2010-03-26Replace remaining uses of is_numeric_base_type with glsl_type::is_numericIan Romanick
2010-03-26Replace is_integer_base_type macro with glsl_type::is_integer methodIan Romanick
2010-03-26Make glsl_*_type glsl_type class static dataIan Romanick
2010-03-26Use glsl_type::is_error instead of comparison with glsl_error_type pointerIan Romanick
2010-03-26Move swizzles out of ir_dereference and into their own class.Kenneth Graunke
Also turn generate_swizzle into a static "create" method of the new class; we'll want to use it for the IR reader as well. Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
2010-03-26Add new abstract ir_rvalue class; rework accordingly.Kenneth Graunke
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
2010-03-26Replace "mode" type tag with virtual as_foo() downcasting functions.Kenneth Graunke
These should work well even in a non-flat IR hierarchy. Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
2010-03-25Merge branch 'anholt'Ian Romanick
2010-03-25IR print visitor: Finish printing constantsIan Romanick
2010-03-25IR print visitor: Remove most of the newlines from the printed outputIan Romanick
This makes it a lot easier to read... if you have a really wide display.
2010-03-25IR print visitor: print expressionsIan Romanick
Not quite complete. The operator is not yet printed.
2010-03-25IR print visitor: print ir_dereference instructionsIan Romanick
Also make a slight change to ir_variable. The ir_dereference tracks the number of nested dereferences. If an ir_variable is visited and the count is non-zero, just print the name of the variable.
2010-03-25IR print visitor: Less newlines when printing ir_variablesIan Romanick
2010-03-25Fix assignment operators: *=, /=, +=, -=.Eric Anholt
Basically, replace everything different from operator_assign other than the creation of the rhs value from the lvalue and rvalue with the contents of operator_assign. Fixes a segfault in CorrectSwizzle1.frag, and fixes parser10.frag.