[Mesa-dev] Comments on adding a GLSL_OPT_PASS macro and option in glsl_compiler_options
Nicolai Hähnle
nhaehnle at gmail.com
Fri Sep 9 07:19:41 UTC 2016
On 08.09.2016 11:45, Thomas Helland wrote:
> Hi,
>
> I have some old code lying around that I was considering picking up again.
> The thought basically goes something like this:
>
> Have a enum representing the compiler optimization passes in glsl.
> Have an array of enums that define an optimization pass order.
> Have a default array for glsl compiler options that can be overridden
> by the backend if it wants to. Maybe add a NIR-like opt-macro.
>
> My thinking is that this will make it easy for each backend to
> decide what optimization passes it wants to run, and making it
> easy to disable an optimization pass if the backend pleases.
> This can allow us to possibly remove some overhead
> by skipping passes that are deamed unnecessary.
> It will also make it simpler to experiment with different orderings
> of the optimization passes.
>
> A future experiment I'm considering is hacking together
> an automated script that reorders, compiles and runs shader-db.
> One can then compare runtime, instruction count, etc,
> and possibly find a golden combination that gives the best of both worlds.
>
> What do people think about this? Will it be a viable project?
FWIW, I think it's a cool idea.
Cheers,
Nicolai
> Regards,
> Thomas
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/mesa-dev
>
More information about the mesa-dev
mailing list