On 14.08.2014 04:33, Ian Romanick wrote: > On 07/29/2014 02:36 AM, Petri Latvala wrote: >> Add an optimization pass that drops min/max expression operands that >> can be proven to not contribute to the final result. The algorithm is >> similar to alpha-beta pruning on a minmax search, from the field of >> AI. >> >> This optimization pass can optimize min/max expressions where operands >> are min/max expressions. Such code can appear in shaders by itself, or >> as the result of clamp() or AMD_shader_trinary_minmax functions. >> >> This optimization pass improves the generated code for piglit's >> AMD_shader_trinary_minmax tests as follows: >> >> total instructions in shared programs: 75 -> 67 (-10.67%) >> instructions in affected programs: 60 -> 52 (-13.33%) >> GAINED: 0 >> LOST: 0 >> >> All tests (max3, min3, mid3) improved. > > And I assume no piglit regressions? > > Also... have you tried this in combination with Abdiel's related work on > saturates? >
Petteri, What is your plan on this particular pass? I have a similar patch that drops the min/max expression but using a different approach. Do you want to push for this particular optimization or do you want to take over the series? _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev