diff options
author | Rob Clark <[email protected]> | 2020-05-13 09:54:57 -0700 |
---|---|---|
committer | Marge Bot <[email protected]> | 2020-06-16 20:56:15 +0000 |
commit | 1418ea0d0015d6bf8a5256668f4485ae22ffbc0a (patch) | |
tree | 7006c2d0a3f7453bf9887d57952fabb248b636a4 | |
parent | 541c288b5f8b8b579a00460b7343784ae9cdbde9 (diff) |
freedreno/a6xx: emit shader names in debug builds
To simplify mapping a shader in a cmdstream trace back to glsl.
Signed-off-by: Rob Clark <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5280>
-rw-r--r-- | src/gallium/drivers/freedreno/a6xx/fd6_program.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/gallium/drivers/freedreno/a6xx/fd6_program.c b/src/gallium/drivers/freedreno/a6xx/fd6_program.c index 9faa11bd384..9f1510942c6 100644 --- a/src/gallium/drivers/freedreno/a6xx/fd6_program.c +++ b/src/gallium/drivers/freedreno/a6xx/fd6_program.c @@ -78,6 +78,13 @@ fd6_emit_shader(struct fd_ringbuffer *ring, const struct ir3_shader_variant *so) unreachable(""); } +#ifdef DEBUG + /* Name should generally match what you get with MESA_SHADER_CAPTURE_PATH: */ + const char *name = so->shader->nir->info.name; + if (name) + fd_emit_string5(ring, name, strlen(name)); +#endif + OUT_PKT4(ring, instrlen, 1); OUT_RING(ring, so->instrlen); |