summaryrefslogtreecommitdiff
path: root/ir.cpp
AgeCommit message (Collapse)Author
2010-04-07Remove extraneous base-class constructor callsIan Romanick
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-06Make constant folding descend into if statements.Eric Anholt
2010-04-06Handle constant expressions using derefs of const values.Eric Anholt
Fixes CorrectParse1.frag and makes for a ton of folding in CorrectParse2.frag.
2010-04-05Set correct type for ir_dereference of a matrix or a vectorIan Romanick
2010-04-02Track whether whole-arrays are assignableIan Romanick
In GLSL 1.10 this was not allowed, but in GLSL 1.20 and later it is. This causes the following tests to pass: glslparsertest/glsl2/array-09.vert glslparsertest/glsl2/array-13.vert
2010-04-02Whole structures are assignableIan Romanick
Whole arrays are assignable in GLSL 1.20 and later, but it's not clear how to handle that within the IR because the IR is supposed to be shading language version agnostic.
2010-04-02Add bool/int conversion as IR operations.Eric Anholt
Fixes constructor-09.glsl and CorrectParse2.frag.
2010-04-02Add conversion of bool to float as an IR operation to match int to float.Eric Anholt
2010-04-02Allow array dereferences to be considered as lvalues.Eric Anholt
Fixes glsl-vs-arrays.vert and glsl-vs-mov-after-deref.vert. Regresses parser3.frag which was failing for the wrong reason.
2010-04-02Simplify ir_constant_expression.cpp by factoring operand computation out.Eric Anholt
2010-04-01Track max accessed array element, reject additional out-of-bounds accessesIan Romanick
For unsized arrays, we can't flag out-of-bounds accesses until the array is redeclared with a size. Track the maximum accessed element and generate an error if the declaration specifies a size that would cause that access to be out-of-bounds. This causes the following tests to pass: glslparsertest/shaders/array10.frag
2010-04-01Fix type handling in ir_dereference array dereference constructorIan Romanick
2010-03-26Set variables with the sampler base type to read only.Eric Anholt
Fixes increment3.frag.
2010-03-26Add constructors for immediate hir constants.Eric Anholt
This will make ast_to_hir for inc/dec easier.
2010-03-26Add glsl_type::components to query total number of components in a typeIan Romanick
2010-03-26Make glsl_*_type glsl_type class static dataIan 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-25Add dereference constructor for array element dereferencesIan Romanick
This should have gone in before the previous commit.
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-24Add method to set the swizzle of an ir_dereferenceIan Romanick
2010-03-23ir_function constructor now takes the function name as a parameterIan Romanick
2010-03-23Set, and require, a return type for function signaturesIan Romanick
2010-03-11Add ir_call call to represent function calls.Ian Romanick
2010-03-11Fix broken constructor of ir_instruction base classIan Romanick
Make the constructor inline-able, and don't try to initialize it as a simple_node. It hasn't been derived from simple_node in a long time.
2010-03-10ir_variable: Initialize all attribute bits to reasonable defaultsIan Romanick
This prevents variables from randomly having their 'invariant' or 'read_only' bits set, for example.
2010-03-08Conver IR structures to use exec_list instead of simple_nodeIan Romanick
2010-02-22Rename .cc files to .cppIan Romanick