| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
Fixes a valgrind error.
|
| |
|
|
|
|
| |
This conveniently creates a zero value of whatever type you want.
|
|
|
|
|
| |
Fixes:
glsl1-GLSL 1.20 uniform array constructor
|
| |
|
|
|
|
| |
Fixes a link-time crash in glsl-vs-cross-3.
|
|
|
|
|
|
|
|
|
|
|
| |
Top-level instructions now get NULL as their default type (since type is
irrelevant for things like ir_function), while ir_rvalues get error_type
by default.
This should make it easier to tell if we've forgotten to set a type. It
also fixes some "Conditional jump or move depends on uninitialized
value" errors in valgrind caused by ir_validate examining the type of
top level ir_instructions, which weren't set.
|
|
|
|
|
| |
Piglit parser tests const-array-03.frag and const-array-04.frag now
generate the correct code.
|
|
|
|
|
|
|
|
|
| |
Since GLSL permits arrays of structures, we need to store each element
as an ir_constant*, not just ir_constant_data.
Fixes parser tests const-array-01.frag, const-array-03.frag,
const-array-04.frag, const-array-05.frag, though 03 and 04 generate the
wrong code.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is quite a large patch because breaking it into smaller pieces
would result in the tree being intermitently broken. The big changes
are:
* Add the ir_var_temporary variable mode
* Change the ir_variable constructor to take the mode as a
parameter and correctly specify the mode for all ir_varables.
* Change the linker to not cross validate ir_var_temporary
variables.
* Change the linker to pull all ir_var_temporary variables from
global scope into 'main'.
|
|
|
|
|
| |
Otherwise, after linking and freeing the old data, the pointer would
dangle. Partial fix for glsl1-struct*.
|
|
|
|
|
|
|
| |
This is a big deal for debugging if nothing else ("what class is this
ir_instruction, really?"), but is also nice for avoiding building a
whole visitor or an if (node->as_whatever() || node->as_other_thing())
chain.
|
| |
|
|
|
|
|
|
| |
ARB_fp, ARB_vp, Mesa IR, and the 965 vertex shader all have
instructions for cross. Shaves 12 Mesa instructions off of a
66-instruction shader I have.
|
|
|
|
|
|
|
|
|
| |
There is no setter function, the getter returns a constant pointer,
and ir_function_signature::_function is private for a reason. The
only way to make a connection between a function and function
signature is via ir_function::add_signature. This helps ensure that
certain invariants (i.e., a function signature is in the list of
signatures for its _function) are met.
|
| |
|
|
|
|
|
| |
Most backends will prefer seeing this to seeing (a - floor(a)), so
represent it explicitly.
|
|
|
|
| |
This avoids losing their memory when the parser state is freed.
|
|
|
|
|
| |
Adds a new constructor that takes an array of component values. Refactors
the meat of the two constructors to an init_mask method.
|
|
|