asahi: Add perf debug for shader variants

Compiling this can cause jank. This is still an issue in Quake3. There is a way
to solve it but it's rather involved and certainly not this weekend's project.
Better perf debugging on the other hand apparently is ^_^

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22353>
This commit is contained in:
Alyssa Rosenzweig 2023-03-11 17:48:56 -05:00 committed by Marge Bot
parent 3a4920e928
commit 80adaa47e5

View file

@ -1388,6 +1388,10 @@ agx_compile_variant(struct agx_device *dev, struct agx_uncompiled_shader *so,
nir_shader *nir = nir_shader_clone(NULL, so->nir);
/* This can happen at inopportune times and cause jank, log it */
perf_debug(dev, "Compiling shader variant #%u",
_mesa_hash_table_num_entries(so->variants));
bool force_translucent = false;
if (nir->info.stage == MESA_SHADER_VERTEX) {