[Mesa-dev] [PATCH 0/4] i965: skip control-flow aware liveness analysis if we only have 1 block

Iago Toral itoral at igalia.com
Wed Oct 14 23:10:39 PDT 2015


On Wed, 2015-10-14 at 11:08 -0700, Jordan Justen wrote:
> On 2015-10-13 22:49:08, Iago Toral wrote:
> > On Tue, 2015-10-13 at 09:44 -0700, Jordan Justen wrote:
> > > On 2015-10-13 05:17:37, Francisco Jerez wrote:
> > > > Iago Toral Quiroga <itoral at igalia.com> writes:
> > > > 
> > > > > This fixes the following test:
> > > > >
> > > > > [require]
> > > > > GL >= 3.3
> > > > > GLSL >= 3.30
> > > > > GL_ARB_shader_storage_buffer_object
> > > > >
> > > > > [fragment shader]
> > > > > #version 330
> > > > > #extension GL_ARB_shader_storage_buffer_object: require
> > > > >
> > > > > buffer SSBO {
> > > > >     mat4 sm4;
> > > > > };
> > > > >
> > > > >
> > > > > mat4 um4;
> > > > >
> > > > > void main() {
> > > > >     sm4 *= um4;
> > > > 
> > > > This is using the value of "um4", which is never assigned, so liveness
> > > > analysis will correctly extend its live interval up to the start of the
> > > > block.
> > > 
> > > This test was derived by simplifying a CTS test case.
> > > 
> > > Anyway, I'm not sure what happened on the way to the commit message,
> > > but um4 should be a uniform.
> > > 
> > > http://sprunge.us/cEUe
> > 
> > Oh yes, that was me playing around with the example. The patches also
> > fix the uniform version. Jordan, can you verify if this fixes the CTS
> > test case?
> 
> Unfortunately, no. The CTS case has some control flow. I had removed
> it to minimize the test case.

Yes, if it has control flow then my patch doesn't help.

> Here is a small shader_test that has control flow and still fails to
> compile with your patches:
> 
> http://sprunge.us/LIjA

Thanks, I am experimenting with a ssbo load cache (so we do not emit the
same ssbo load when we know there are no ssbo writes that could've
altered the underlying buffer) that should help the test. It is not
complete yet but it seems that this alone should be able to get the test
to pass.

> > In any case, since Curro is working on a more general fix for this
> > stuff, I guess you'd rather wait for his patches...
> 
> It depends how long we'd have to wait. :) Anyway, since we don't have
> a short-term fix anyhow, let's wait to see what curro has to say.

I think my patch will still take a couple of days, but I have just
tested Curro's hack and that seems to work for this test, so hopefully
we can use that?

Iago

> -Jordan
> 




More information about the mesa-dev mailing list