[Mesa-dev] r600 sb test results

Lauri Kasanen cand at gmx.com
Thu May 2 07:34:33 PDT 2013


On Thu, 02 May 2013 00:45:13 +0400
Vadim Girlin <vadimgirlin at gmail.com> wrote:

> On 05/01/2013 11:36 PM, Lauri Kasanen wrote:
> > Now that it built, I could test your optimizations in my own apps.
> > These are on current master 8eef6ad, on a RV710 (HD 4350 pci-e).
> >
> > In one of my private apps, using R600_DEBUG=sb caused regressions: FPS
> > went from 28 to 7, the SSAO shader gave visual distortions/flicker, and
> > the cpu was constantly pegged.
> >
> > Here's the output from R600_DEBUG=sb,sbstat in case it helps:
> > http://bayfiles.net/file/Pmkh/PUj0Ru/vadim.gz
> >
> > It seems as if it's constantly handling new shaders? My app certainly
> > issues no new shaders, they are all linked when the app starts.
>
> r600g may rebuild shaders at runtime because some GL features are 
> implemented in shader code, so if your app changes some specific GL 
> states (e.g. two-sided rendering mode), then r600g has to build and 
> switch between different shader variants.

It mainly uses the stencil buffer, the clear color is changed in
various passes, some occlusion queries with color masks, but nothing
exotic. New uniforms are of course sent each frame.

> On the other hand there is caching of shader variants in r600g 
> implemented specially to prevent repetitive rebuilding of shaders, looks 
> like it doesn't work in your case for some reason. Optimizations take 
> more time than rebuilding with default backend, that explains 
> performance regression.
> 
> Could you provide some test app that reproduces these issues?

It's quite time-taking to cut it down, and apitraces of it in full are
several gigs (far too much to upload with my connection). I'll see if I
can get just the SSAO isolated, with minimal textures, to get a smaller
trace.

> Please also send me the dump with "R600_DEBUG=sb,ps,vs", maybe I'll be 
> able to spot anything wrong there.

http://bayfiles.net/file/PmY5/xgIdlZ/foo.gz

> > Let me know what you need to debug this.
> >
> > - Lauri
> >
> > PS: I'm not sure if this should be public or not, I think you're the
> > only one working on it?
> 
> Yes, I doubt that anyone else will work on it, on the other hand I think 
> reporting this on the list might help other users who will possibly hit 
> similar issues. Also at least in this case it looks rather like a 
> problem in r600g, so I'm cc'ing mesa-dev, r600-sb just made this issue 
> more noticeable because shader rebuilding with optimization requires 
> more time.

Using standard r600g, the cpu usage is less than 25% of one core, so
nothing was showing it was constantly rebuilding shaders. Is there some
way I could've found it was doing that, and if so, why?

- Lauri


More information about the mesa-dev mailing list