[Mesa-dev] Submitting more shaders to shader-db?

Kenneth Graunke kenneth at whitecape.org
Sun Jan 4 00:20:25 PST 2015


On Sunday 04 January 2015 09:36:40 Aras Pranckevicius wrote:
> Hi,
> 
> I noticed some GLSL related discussions talk "My shader-db is dominated by
> TF2, DOTA2, Portal, Brutal Legend and Dungeon Defenders. Maybe
> non-Source-engine
> games show some benefit from this series?"
> 
> Now, shader-db that I can find is this:
> http://cgit.freedesktop.org/mesa/shader-db/tree/shaders - and it seems to
> have very few shaders.

That's unfortunately true.  The public repository contains the tools we use, 
and shaders from programs whose license allows us to freely redistribute them.

Most shaders aren't freely redistributable (i.e. you have to buy the game, and 
even then scraping their shaders is kind of sketchy), so we can't include them 
there.  We keep those in a separate, hidden repository.

> Is it possible to submit more shaders into whatever shader-db is typically
> used by Mesa developers to test compiler optimizations on? I could package
> up some built-in shaders from Unity 4 / Unity 5 (which end up being used in
> a many, many Unity games), in the format expected by shader-db, and under
> whatever license is needed.
> 
> Would that be useful, and if so, what are the steps to get there?

Absolutely!  We'd love to expand it.

You can just run a program that compiles the shaders with MESA_GLSL=dump and 
email me the output.  (MESA_GLSL=dump ./yourapp &> log_to_be_emailed)

I can run that through split-to-files.py to get shaders in the proper format.

If you'd like them included in the public repository, I'll also need a license 
header saying that the shaders are freely redistributable.

--Ken


More information about the mesa-dev mailing list