[Mesa-dev] r600g: status of my work on the shader optimization

Mathias Fröhlich Mathias.Froehlich at gmx.net
Fri Feb 15 23:10:49 PST 2013


On Friday, February 15, 2013 15:00:24 Vadim Girlin wrote:
> "LLVM backend is the future" is a pretty abstract argument. I prefer to
> operate with real facts. After a year of LLVM backend development what
> are the real benefits for the users? What are the real use cases where
> the users might prefer LLVM backend? To me this situation looks like the
> use of LLVM requires a lot more time and development efforts than the
> custom solution, despite the initial expectations. Maybe you are right
> and the LLVM backend will become the best alternative for users sometime
> in the future, but I only have some today's results:

I am curious how this compares for shaders like used in

git clone 

which is one of the bigger programs I know of. That one is taken from a Paper 
from INRIA regarding atmospheric scattering. The git archive is just some 
striped down variants of that to make it at least display with our radeon type 
drivers. You need float textures enabled in the configure step. The only 
variants that have a chance to run on the oss drivers is Main.noprecompute and 
Main.nogeometry once you compiled this dirty proof of concept files.

That saied, the shaders there are far from programmed optimal IMO. But they 
render fast on the binary blobs. And I think they are a good example what you 
will find in the wild. People out there expect to find a decent compiler even in 
an OpenGL driver. I mean a compiler that does not just translate a tight pre 
optimized shader into the apropriate backend language, but a compiler that 
knows about all the tricks that are required to optimize more complex and less 
good written programs. Doing good optimizers - not only the backend ones - is 
a hard and longish busines which is easily underestimated.

In the long term I would vote for your knowledge about these machines 
available in llvm to get the best of both worlds.

my 2 cents...


More information about the mesa-dev mailing list