Skip to content

ir3: add option to collect preamble stats

Job Noorman requested to merge jnoorman/mesa:ir3-preamblestats into main

Preamble instructions are currently not counted for shaderdb stats as their effect should be much smaller than those from the main shader. However, when working on optimizations the mainly affect the preamble (e.g., shared RA), gathering preamble stats is useful.

This commit adds a preamblestats IR3_SHADER_DEBUG flag which causes instruction counts to be taken from the preamble instead of the main shader. Global stats (e.g., dwords) are unaffected.

Note that the downside of this approach is that collecting stats of both the preamble and main shader requires two runs. The alternative would be to simply duplicate all stats which would blow up the number of stats. I don't have a very strong opinion on which is better.

Merge request reports

Loading