summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
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.
2010-03-25Before generating HIR for user code, generate constructors for built-in typesIan Romanick
2010-03-25Add dereference constructor for array element dereferencesIan Romanick
This should have gone in before the previous commit.
2010-03-25Add functions to generate constructors for built-in types.Ian Romanick
Currently only vector and matrix types are supported. Structure types will be added later.
2010-03-25Fix up the operator printing for the logic or and beyond, check array bounds.Eric Anholt
2010-03-25Merge branch 'anholt'Ian Romanick
2010-03-25Set up fragment shader builtin variables.Eric Anholt
2010-03-25Make the standalone parser return an exit code so we can automate testing.Eric Anholt
2010-03-25More matrix compilation testsIan Romanick
2010-03-25Merge branch 'kwg'Ian Romanick
2010-03-25Fix matrix dimensioningIan Romanick
Newb GL mistake: matrices in GL are column-major. This means that vector_elements is the number of rows. Making these changes causes matrix-08.glsl to pass.
2010-03-25Use glsl_type::row_type and glsl_type::column type in arithmetic_result_typeIan Romanick
This substantially clarifies the code for matching matrix types. It also eliminates some uses of glsl_type member data.
2010-03-25Replace several glsl_type field comparisons with a single pointer comparisonIan Romanick
This simplifies the process of matching function parameter types. More simplifications are probably possible here, but arrays and structures need to be implemented first.
2010-03-25Add queries to get the glsl_type of a row or column of a matrixIan Romanick
2010-03-25Widen num_components to handle vec4 correctly.Kenneth Graunke
2010-03-25Typo fixes: de/re/ference.Kenneth Graunke
2010-03-24Replace several field comparisons with a single pointer comparisonIan Romanick
The only way the specified type fields can match is if the types are the same. Previous tests (and assertions) have filtered away all other possible cases.
2010-03-24Remove unused _mesa_glsl_get_vector_typeIan Romanick
This function has been completely replaced by glsl_type::get_instance.
2010-03-24Use glsl_type::get_instance instead of _mesa_glsl_get_vector_typeIan Romanick
2010-03-24Use glsl_type::get_instance instead of symbol table look-upIan Romanick
2010-03-24Add some matrix math testsIan Romanick
2010-03-24Add glsl_type::get_instance methodIan Romanick
Gets the singleton corresponding to a particular scalar, vector, or matrix type.
2010-03-24Replace accesses to glsl_type data with query functionsIan Romanick
In these particular cases, using the query functions makes it more obvious what is happening.
2010-03-24Add class-private handles to matrix types in glsl_typeIan Romanick
2010-03-24Fix typo in swizzle processing loopIan Romanick
One of the accesses to str in the loop used str[0] instead of str[i]. Reported-by: Kenneth Graunke
2010-03-24Trivial cleanups in generate_swizzleIan Romanick
Add 'const' and 'static const' in a couple of places.
2010-03-24Use ir_dereference::set_swizzleIan Romanick
2010-03-24Add method to set the swizzle of an ir_dereferenceIan Romanick
2010-03-24Allow duplicate symbols at the same scope that are in different name spacesIan Romanick
2010-03-24Merge branch 'anholt'Ian Romanick
2010-03-24Add (negative) test for constructing samplersIan Romanick
2010-03-23ir_function constructor now takes the function name as a parameterIan Romanick
2010-03-23Add glsl_type::get_base_type queryIan Romanick
Retreives the glsl_type that corresponds to the base type of a numeric scalar / vector / matrix type. So vec4 returns float, etc.
2010-03-23Add glsl_type::is_numeric and glsl_type::is_boolean queriesIan Romanick
2010-03-23Begin processing constructorsIan Romanick
Right now, reject constructors for samplers because the are illegal.
2010-03-23Add query to determine whether a type is a samplerIan Romanick
2010-03-23Add test for invalid assignment of function return valueIan Romanick