Hello, I was playing with profiling Minecraft on radeonsi in perf and found that _mesa_get_fixed_func_fragment_program was a little bit too high in the profile log than it should. I assumed that most of it comes from make_state_key static function which I am trying to optimize now in the spare time.
I started with a few pretty simple things. I don't think they will help much, but should be a good start. The code is divided into 3 patches, which might be an overkill. I can squash them if you prefer that. For more serious performance benefits, I was thinking about making the state inside the gl context be more similar to ff cache key. This way make_state_key would be more about copying stuff around than translating it from one representation to another. As I don't have commit access, please push the changes after you deem them ready for that. Regards, Gustaw Gustaw Smolarczyk (3): mesa/main: Use correct constant in ff cache key. mesa/main: Remove enabled_units from ff cache key. mesa/main: Reduce the size of nr_enabled_units in ff cache key. src/mesa/main/ff_fragment_shader.cpp | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) -- 2.12.1 _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev