<feed xmlns='http://www.w3.org/2005/Atom'>
<title>external_mesa3d/src/gallium/drivers/vc4/vc4_program.c, branch replicant-6.0</title>
<subtitle>external/mesa3d
</subtitle>
<link rel='alternate' type='text/html' href='https://git.replicant.us/replicant/external_mesa3d/'/>
<entry>
<title>vc4: In a loop break/continue, jump if everyone has taken the path.</title>
<updated>2016-12-14T19:03:11+00:00</updated>
<author>
<name>Eric Anholt</name>
<email>eric@anholt.net</email>
</author>
<published>2016-12-01T01:27:37+00:00</published>
<link rel='alternate' type='text/html' href='https://git.replicant.us/replicant/external_mesa3d/commit/?id=403d106c9c5eed481cb58ee0104e211c3d8f44f8'/>
<id>403d106c9c5eed481cb58ee0104e211c3d8f44f8</id>
<content type='text'>
This should be a win for most loops, which tend to have uniform control
flow.

More importantly, it exposes important information to live variables: that
the break/continue here means that our jump target may have access to
values that were live on our input.  Previously, we were just setting the
exec mask and letting control flow fall through, so an intervening def
between the break and the end of the loop would appear to live variables
as if it screened off the variable, when it didn't actually.

Fixes a regression in glsl-vs-loop-redundant-condition.shader_test when a
perturbing of register allocation caused a live variable to get stomped.

Cc: 13.0 &lt;mesa-stable@lists.freedesktop.org&gt;
(cherry picked from commit 8e5ec33f1151dd82402bdfdaa4fff7c284e49a1c)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This should be a win for most loops, which tend to have uniform control
flow.

More importantly, it exposes important information to live variables: that
the break/continue here means that our jump target may have access to
values that were live on our input.  Previously, we were just setting the
exec mask and letting control flow fall through, so an intervening def
between the break and the end of the loop would appear to live variables
as if it screened off the variable, when it didn't actually.

Fixes a regression in glsl-vs-loop-redundant-condition.shader_test when a
perturbing of register allocation caused a live variable to get stomped.

Cc: 13.0 &lt;mesa-stable@lists.freedesktop.org&gt;
(cherry picked from commit 8e5ec33f1151dd82402bdfdaa4fff7c284e49a1c)
</pre>
</div>
</content>
</entry>
<entry>
<title>vc4: Clamp the shadow comparison value.</title>
<updated>2016-11-23T13:52:19+00:00</updated>
<author>
<name>Eric Anholt</name>
<email>eric@anholt.net</email>
</author>
<published>2016-11-07T20:25:47+00:00</published>
<link rel='alternate' type='text/html' href='https://git.replicant.us/replicant/external_mesa3d/commit/?id=64d7d70c5b4722f53f6080b35ec516462f1e191b'/>
<id>64d7d70c5b4722f53f6080b35ec516462f1e191b</id>
<content type='text'>
Fixes piglit glsl-fs-shadow2D-clamp-z.

Cc: &lt;mesa-stable@lists.freedesktop.org&gt;
(cherry picked from commit 08d51487e3b8cfb14ca2ece9545b2e2ed344e3cc)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Fixes piglit glsl-fs-shadow2D-clamp-z.

Cc: &lt;mesa-stable@lists.freedesktop.org&gt;
(cherry picked from commit 08d51487e3b8cfb14ca2ece9545b2e2ed344e3cc)
</pre>
</div>
</content>
</entry>
<entry>
<title>vc4: Don't abort when a shader compile fails.</title>
<updated>2016-11-23T13:07:00+00:00</updated>
<author>
<name>Eric Anholt</name>
<email>eric@anholt.net</email>
</author>
<published>2016-11-07T17:05:59+00:00</published>
<link rel='alternate' type='text/html' href='https://git.replicant.us/replicant/external_mesa3d/commit/?id=9a4206379b0e36d440481ae89b98467ed53dc86b'/>
<id>9a4206379b0e36d440481ae89b98467ed53dc86b</id>
<content type='text'>
It's much better to just skip the draw call entirely.  Getting this
information out of register allocation will also be useful for
implementing threaded fragment shaders, which will need to retry
non-threaded if RA fails.

Cc: &lt;mesa-stable@lists.freedesktop.org&gt;
(cherry picked from commit 4d019bd703e7c20d56d5b858577607115b4926a3)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
It's much better to just skip the draw call entirely.  Getting this
information out of register allocation will also be useful for
implementing threaded fragment shaders, which will need to retry
non-threaded if RA fails.

Cc: &lt;mesa-stable@lists.freedesktop.org&gt;
(cherry picked from commit 4d019bd703e7c20d56d5b858577607115b4926a3)
</pre>
</div>
</content>
</entry>
<entry>
<title>vc4: Use Newton-Raphson on the 1/W write to fix glmark2 terrain.</title>
<updated>2016-11-09T14:13:01+00:00</updated>
<author>
<name>Eric Anholt</name>
<email>eric@anholt.net</email>
</author>
<published>2016-11-04T20:41:20+00:00</published>
<link rel='alternate' type='text/html' href='https://git.replicant.us/replicant/external_mesa3d/commit/?id=a31947fbf95ee79c7617cf74ebb24a6849e0c9c3'/>
<id>a31947fbf95ee79c7617cf74ebb24a6849e0c9c3</id>
<content type='text'>
The 1/W was apparently not accurate enough, and we were getting sparklies
in the distance.  The closed driver also did a N-R step here.

Cc: &lt;mesa-stable@lists.freedesktop.org&gt;
(cherry picked from commit 283d4d18e598793bbff7d9ba5a601bced9b36542)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The 1/W was apparently not accurate enough, and we were getting sparklies
in the distance.  The closed driver also did a N-R step here.

Cc: &lt;mesa-stable@lists.freedesktop.org&gt;
(cherry picked from commit 283d4d18e598793bbff7d9ba5a601bced9b36542)
</pre>
</div>
</content>
</entry>
<entry>
<title>vc4: Fix live intervals analysis for screening defs in if statements.</title>
<updated>2016-10-07T01:09:24+00:00</updated>
<author>
<name>Eric Anholt</name>
<email>eric@anholt.net</email>
</author>
<published>2016-10-05T16:07:46+00:00</published>
<link rel='alternate' type='text/html' href='https://git.replicant.us/replicant/external_mesa3d/commit/?id=d4ae5ca823227214dd1f536e5f4058bede20b2dd'/>
<id>d4ae5ca823227214dd1f536e5f4058bede20b2dd</id>
<content type='text'>
If a conditional assignment is only conditioned on the exec mask, that's
still screening off the value in the executed channels (and, since we're
not storing to the unexcuted channels, we don't care what's in there).

Fixes a bunch of extra register pressure on Processing's Ribbons demo,
which is failing to allocate.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
If a conditional assignment is only conditioned on the exec mask, that's
still screening off the value in the executed channels (and, since we're
not storing to the unexcuted channels, we don't care what's in there).

Fixes a bunch of extra register pressure on Processing's Ribbons demo,
which is failing to allocate.
</pre>
</div>
</content>
</entry>
<entry>
<title>vc4: Fix assertion fails from trying to cast non-ALU instrs to ALU.</title>
<updated>2016-10-07T01:09:24+00:00</updated>
<author>
<name>Eric Anholt</name>
<email>eric@anholt.net</email>
</author>
<published>2016-10-06T23:46:35+00:00</published>
<link rel='alternate' type='text/html' href='https://git.replicant.us/replicant/external_mesa3d/commit/?id=b30205b1120d4a87b6fb8eac9dea9a7f7a065123'/>
<id>b30205b1120d4a87b6fb8eac9dea9a7f7a065123</id>
<content type='text'>
Fixes 100 piglit tests since the assertions were added to nir.h.  What's
amazing is that these tests used to pass, even when casting garbage.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Fixes 100 piglit tests since the assertions were added to nir.h.  What's
amazing is that these tests used to pass, even when casting garbage.
</pre>
</div>
</content>
</entry>
<entry>
<title>nir: Make nir_foo_first/last_cf_node return a block instead</title>
<updated>2016-10-06T16:16:37+00:00</updated>
<author>
<name>Jason Ekstrand</name>
<email>jason.ekstrand@intel.com</email>
</author>
<published>2016-10-06T02:08:57+00:00</published>
<link rel='alternate' type='text/html' href='https://git.replicant.us/replicant/external_mesa3d/commit/?id=2ed17d46de045404042f13c6591895a1cf31b167'/>
<id>2ed17d46de045404042f13c6591895a1cf31b167</id>
<content type='text'>
One of NIR's invariants is that control flow lists always start and end
with blocks.  There's no good reason why we should return a cf_node from
these functions since we know that it's always a block.  Making it a block
lets us remove a bunch of code.

Signed-off-by: Jason Ekstrand &lt;jason@jlekstrand.net&gt;
Reviewed-by: Connor Abbott &lt;cwabbott0@gmail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
One of NIR's invariants is that control flow lists always start and end
with blocks.  There's no good reason why we should return a cf_node from
these functions since we know that it's always a block.  Making it a block
lets us remove a bunch of code.

Signed-off-by: Jason Ekstrand &lt;jason@jlekstrand.net&gt;
Reviewed-by: Connor Abbott &lt;cwabbott0@gmail.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>nir: Allow opt_peephole_sel to be more aggressive in flattening IFs.</title>
<updated>2016-09-22T08:10:21+00:00</updated>
<author>
<name>Eric Anholt</name>
<email>eric@anholt.net</email>
</author>
<published>2016-09-07T02:45:51+00:00</published>
<link rel='alternate' type='text/html' href='https://git.replicant.us/replicant/external_mesa3d/commit/?id=36f0f0318275f65f8744ec6f9471702e2f58e6d5'/>
<id>36f0f0318275f65f8744ec6f9471702e2f58e6d5</id>
<content type='text'>
VC4 was running into a major performance regression from enabling control
flow in the glmark2 conditionals test, because of short if statements
containing an ffract.

This pass seems like it was was trying to ensure that we only flattened
IFs that should be entirely a win by guaranteeing that there would be
fewer bcsels than there were MOVs otherwise.  However, if the number of
ALU ops is small, we can avoid the overhead of branching (which itself
costs cycles) and still get a win, even if it means moving real
instructions out of the THEN/ELSE blocks.

For now, just turn on aggressive flattening on vc4.  i965 will need some
tuning to avoid regressions.  It does looks like this may be useful to
replace freedreno code.

Improves glmark2 -b conditionals:fragment-steps=5:vertex-steps=0 from 47
fps to 95 fps on vc4.

vc4 shader-db:
total instructions in shared programs: 101282 -&gt; 99543 (-1.72%)
instructions in affected programs:     17365 -&gt; 15626 (-10.01%)
total uniforms in shared programs: 31295 -&gt; 31172 (-0.39%)
uniforms in affected programs:     3580 -&gt; 3457 (-3.44%)
total estimated cycles in shared programs: 225182 -&gt; 223746 (-0.64%)
estimated cycles in affected programs:     26085 -&gt; 24649 (-5.51%)

v2: Update shader-db output.

Reviewed-by: Ian Romanick &lt;ian.d.romanick@intel.com&gt; (v1)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
VC4 was running into a major performance regression from enabling control
flow in the glmark2 conditionals test, because of short if statements
containing an ffract.

This pass seems like it was was trying to ensure that we only flattened
IFs that should be entirely a win by guaranteeing that there would be
fewer bcsels than there were MOVs otherwise.  However, if the number of
ALU ops is small, we can avoid the overhead of branching (which itself
costs cycles) and still get a win, even if it means moving real
instructions out of the THEN/ELSE blocks.

For now, just turn on aggressive flattening on vc4.  i965 will need some
tuning to avoid regressions.  It does looks like this may be useful to
replace freedreno code.

Improves glmark2 -b conditionals:fragment-steps=5:vertex-steps=0 from 47
fps to 95 fps on vc4.

vc4 shader-db:
total instructions in shared programs: 101282 -&gt; 99543 (-1.72%)
instructions in affected programs:     17365 -&gt; 15626 (-10.01%)
total uniforms in shared programs: 31295 -&gt; 31172 (-0.39%)
uniforms in affected programs:     3580 -&gt; 3457 (-3.44%)
total estimated cycles in shared programs: 225182 -&gt; 223746 (-0.64%)
estimated cycles in affected programs:     26085 -&gt; 24649 (-5.51%)

v2: Update shader-db output.

Reviewed-by: Ian Romanick &lt;ian.d.romanick@intel.com&gt; (v1)
</pre>
</div>
</content>
</entry>
<entry>
<title>nir: Report progress from nir_lower_phis_to_scalar.</title>
<updated>2016-09-14T19:01:51+00:00</updated>
<author>
<name>Kenneth Graunke</name>
<email>kenneth@whitecape.org</email>
</author>
<published>2016-09-13T22:14:28+00:00</published>
<link rel='alternate' type='text/html' href='https://git.replicant.us/replicant/external_mesa3d/commit/?id=2d8a3fa7ea994ad02a40ff497109f966e3fcbeec'/>
<id>2d8a3fa7ea994ad02a40ff497109f966e3fcbeec</id>
<content type='text'>
Signed-off-by: Kenneth Graunke &lt;kenneth@whitecape.org&gt;
Reviewed-by: Eric Anholt &lt;eric@anholt.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Signed-off-by: Kenneth Graunke &lt;kenneth@whitecape.org&gt;
Reviewed-by: Eric Anholt &lt;eric@anholt.net&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>nir: Report progress from nir_lower_alu_to_scalar.</title>
<updated>2016-09-14T19:01:49+00:00</updated>
<author>
<name>Kenneth Graunke</name>
<email>kenneth@whitecape.org</email>
</author>
<published>2016-09-13T22:14:28+00:00</published>
<link rel='alternate' type='text/html' href='https://git.replicant.us/replicant/external_mesa3d/commit/?id=32630e211e60a2b41388d403cfbd4f43344d8590'/>
<id>32630e211e60a2b41388d403cfbd4f43344d8590</id>
<content type='text'>
Signed-off-by: Kenneth Graunke &lt;kenneth@whitecape.org&gt;
Reviewed-by: Eric Anholt &lt;eric@anholt.net&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Signed-off-by: Kenneth Graunke &lt;kenneth@whitecape.org&gt;
Reviewed-by: Eric Anholt &lt;eric@anholt.net&gt;
</pre>
</div>
</content>
</entry>
</feed>
