Skip to content

RFC: nir/gcm: more heuristics

Timothy Arceri requested to merge tarceri/mesa:gcm_more into main

The final commit is based on a suggestion from @idr. The overall results look good but shader-db results are mixed but that seems to be mostly due to deficiencies with the intel scheduler rather than issues with the new code.

One thing that does change as a result of the final patch is that previously we would just rip any tex instructions out of the loop no matter what. Now that we try to avoid any change to register pressure before removing instructions from a loop it results in a few Unreal engine shaders no longer pulling these out of the loop and shader-db reports a big change in HURT cycles.

For example: shaders/closed/UnrealEngine4/ShooterGame/228.shader_test

I think its possible to extend check_if_src_used_after_block() to further detect further chucks of the code that can be removed without changes to register pressure and get these shaders back to how they were previously, but its getting tricky.

I'm posting the Merge Request now to get feedback on this change as is, and allow testing if people are interest. Do we think this is net positive?

Edited by Timothy Arceri

Merge request reports

Loading