| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
Fixes bugzilla #30039.
|
|
|
|
|
|
|
|
|
|
|
|
| |
loop_analysis::visit(ir_dereference_variable *)
Returning early with visit_continue_with_parent prevented the
then-statements and else-statements of if-statements such as the
following from being processed:
if (some_var) { ... } else { ... }
Fixes piglit test case glsl-fs-loop-nested-if and bugzilla #30030.
|
|
|
|
|
|
| |
Fixes piglit test case loop-06.vert.
Unfortunately, causes 1 shift/reduce conflict.
|
|
|
|
|
|
|
| |
Otherwise spring 0.82+.4.0 crashes when starting a game
because prog->_LinkedShaders[0] is NULL.
This also fixes piglit test cases glsl-link-empty-prog-0[12].
|
| |
|
|
|
|
|
|
|
|
|
| |
This extra validation is very useful when working on the built-ins, but
in general overkill - the results should stay the same unless the
built-ins or ir_validate have changed.
Also, validating all the built-in functions in every test case makes
piglit run unacceptably slow.
|
|
|
|
| |
It's just too easy to get something wrong in hand-written IR.
|
|
|
|
|
|
|
|
| |
Since functions are emitted when scanning for prototypes, functions
always come first, even if the original IR listed the variable
declarations first.
Fixes an ir_validate error (to be turned on in the next commit).
|
| |
|
| |
|
| |
|
|
|
|
|
| |
This preserves the ability to read the old format, for momentary
compatibility with all the existing IR implementations of built-ins.
|
| |
|
| |
|
|
|
|
| |
To match the definition below.
|
|
|
|
|
|
|
|
|
|
|
| |
The places where constant_expression_value are still used in loop
analysis are places where a new expression tree is created and
constant folding won't have happened. This is used, for example, when
we try to determine the maximal loop iteration count.
Based on review comments by Eric. "...rely on constant folding to
have done its job, instead of going all through the subtree again when
it wasn't a constant."
|
| |
|
| |
|
| |
|
|
|
|
|
| |
I've used this in quite a few debug commits that never reached an
up-stream tree.
|
| |
|
| |
|
| |
|
|
|
|
| |
This is the next step on the road to loop unrolling
|
|
|
|
| |
This is the first step eventually leading to loop unrolling.
|
| |
|
|
|
|
|
| |
This reprents the type of comparison between the loop induction
variable and the loop termination value.
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
| |
The code for handling implicit conversions should probably get
refactored, but for now, this is easy.
Fixes piglit test constructor-26.vert.
|
|
|
|
| |
I'm not sure if this is strictly necessary, but it seems wise.
|
|
|
|
| |
Fixes piglit test constructor-27.vert.
|
|
|
|
|
|
|
|
| |
return_constructors
Now that constructors are not generated as functions or stored in the
symbol table, there is no need to flag whether or not constructors
should be returned.
|
| |
|
| |
|
| |
|
|
|
|
| |
Fixes piglit test cases glsl-[fv]s-all-0[12].
|
|
|
|
|
|
|
|
|
|
|
| |
If the matrix being constructed was larger than the source matrix, it
would overwrite the lower-right part of the matrix with the wrong
values, rather than leaving it as the identity matrix.
For example, constructing a mat4 from a mat2 should only use a writemask
of "xy" when copying from the source, but was using "xyzw".
Fixes the code generated by piglit test constructor-23.vert.
|
|
|
|
|
| |
Fixes piglit test case constructor-21.vert and changes
constructor-22.vert to give the correct output.
|
| |
|
|
|
|
|
|
|
|
|
| |
This was triggering even for matrix-from-matrix constructors. It is
perfectly legal to construct a mat3 from a mat2 - the rest will be
filled in by the identity matrix.
Changes piglit test constructor-23.vert from FAIL to PASS, but the
generated code is incorrect.
|
|
|
|
| |
There are no integer matrix types, so switching on them is silly.
|
| |
|
|
|
|
|
| |
Reduces glsl-vs-all-01 from 42 Mesa IR instructions (including the
END) to 17.
|
| |
|
|
|
|
|
|
|
| |
The GLSL 1.20 spec specifically disallows this, but it was allowed in
GLSL 1.10.
Fixes piglit test cases local-function-0[13].frag and bugzilla #29921.
|
|
|
|
| |
When x==0, the result was wrong. Fixes piglit glsl-fs-atan-1.shader_test
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Make two passes over the constructor parameters. Write all of the
constants in a single write, then write the non-constants one at a
time. This causes the fragment shader
varying float g;
void main()
{
gl_FragColor = vec4(0.0, g, 0.0, 1.0);
}
to generate
(function main
(signature void (parameters )
(
(declare (temporary ) vec4 vec_ctor@0x8580058)
(assign (constant bool (1)) (xzw) (var_ref vec_ctor@0x8580058) (constant vec4 (0.000000 0.000000 0.000000 1.000000)) )
(assign (constant bool (1)) (y) (var_ref vec_ctor@0x8580058) (swiz xxxx (var_ref g@0x8580218) ))
(assign (constant bool (1)) (xyzw) (var_ref gl_FragColor@0x84d32a0) (var_ref vec_ctor@0x8580058) )
))
)
instead of
(function main
(signature void (parameters )
(
(declare (temporary ) vec4 vec_ctor@0x8580058)
(assign (constant bool (1)) (x) (var_ref vec_ctor@0x8580058) (constant vec4 (0.000000 0.000000 0.000000 1.000000)) )
(assign (constant bool (1)) (y) (var_ref vec_ctor@0x8580058) (swiz xxxx (var_ref g@0x8580218) ))
(assign (constant bool (1)) (z) (var_ref vec_ctor@0x8580058) (constant vec4 (0.000000 0.000000 0.000000 1.000000)) )
(assign (constant bool (1)) (w) (var_ref vec_ctor@0x8580058) (constant vec4 (0.000000 0.000000 0.000000 1.000000)) )
(assign (constant bool (1)) (xyzw) (var_ref gl_FragColor@0x84d32a0) (var_ref vec_ctor@0x8580058) )
))
)
A similar optimization could be done for matrix constructors, but it
is a little more complicate there.
|