Age | Commit message (Collapse) | Author |
|
|
|
Chances are, if one fragment looped badly, others will too, and
debugging output gets overwhelmed by the looping complaints.
|
|
|
|
Fixes a segfault in Regnum Online.
|
|
This is an invasive set of changes. Each user shader tracks a set of other
shaders that contain built-in functions. During compilation, function
prototypes are imported from these shaders. During linking, the
shaders are linked with these built-in-function shaders just like with
any other shader.
|
|
To quiet a compiler warning.
|
|
|
|
Coming changes to the handling of built-in functions necessitate this.
|
|
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'.
|
|
This caught the failure in cloning of ir_dereference_record.
|
|
To allow for the removal of a single element from a hash table.
|
|
Fixes:
glsl1-built-in constants
|
|
I hadn't noticed you could do this, but glsl1 tests caught it. Fixes:
glsl1-Swizzled writemask
glsl1-Swizzled writemask (2)
glsl1-Swizzled writemask (rgba)
glsl1-Swizzled writemask (stpq)
|
|
|
|
|
|
|
|
|
|
|
|
Unlike the previous compiler, in this case we emit only one copy of
the function regardless of how many times it's called.
|
|
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.
|
|
Most of flow control is like this.
|
|
That is to say, gl_TexCoord[i] now works, fixing glsl-texcoord-array
on swrast.
|
|
The big change is to delay address reg setup until the instruction
that needs the deref. It was hard to use the deref chain support for
the LHS because it does the copy of the dereffed value to a temporary
(to avoid problems when two src regs are array derefs), so we wouldn't
haev a pointer to actual storage in the end.
Fixes glsl-vs-arrays on swrast.
|
|
|
|
Bug #27914.
|
|
|
|
|
|
|
|
This reverts commit b4d0c0e0ee983ee614b047799c3e01221a353c98.
Now that ir_mat_op_to_vec is landed, this change is no longer needed.
|
|
This will be used by the Mesa IR and likely most HW backends, as it
allows other optimizations to occur that might not otherwise.
Fixes glsl-vs-mat-sub-1, glsl-vs-mat-div-1.
|
|
Most places in the code simply use a static name, which works because
names are never used to look up an ir_variable. generate_temporary is
simply unnecessary (and looks like it would leak memory, and isn't
thread safe...)
|
|
Previously, a register defined at main scope and used in a loop in a
loop could end up getting marked as needed only from the definition
outside of the loops to the end of the inner loop, and we would
cleverly slot in something else in its register in the end of the
outer loop.
Fixes glsl-vs-loop-nested and glsl-fs-loop-nested on glsl2. This
doesn't happen much on master because the original compiler does its
own register allocation, so we find little we can do with linear scan
register (re)allocation.
|
|
It was changed in 2009 and the comment wasn't updated.
|
|
This allows array derefs of matrices now, which makes idr's GLSL demo
happy.
|
|
|
|
This isn't really tested, but didn't break normal vector add/sub.
|
|
|
|
|
|
|
|
|
|
Fixes glsl-vs-texturematrix-1, and glsl-vs-texturematrix-2 on swrast.
|
|
|
|
This allows function inlining making the following tests work even
without function calls implemented:
glsl-fs-functions-2
glsl-fs-functions-3
glsl-vs-functions
glsl-vs-functions-2
glsl-vs-functions-3
glsl-vs-vec4-indexing-5
(Note that those tests were designed to trigger actual function calls,
and this defeats them. However, those testcases ended up catching the
bug in the previous commit.)
|
|
The Mesa IR needs this to support vector indexing correctly, and
hardware backends such as 915 would want this behavior as well.
Fixes glsl-vs-vec4-indexing-2.
|
|
Nothing generates conditional moves yet.
|
|
|
|
|
|
The previous table didn't distinguish gl_Color for the VS and FS, so
we would use the FS's attribute index for the VS and read undefined.
This partially fixes glsl-routing to match its behavior on master.
|
|
|
|
OPCODE_EXP is not to ir_unop_exp what OPCODE_EX2 is to ir_unop_exp2.
It's the weird VP approximation helper opcode. Just implement it with
OPCODE_POW instead.
Fixes glsl-fs-exp.
|