diff options
author | Alyssa Rosenzweig <[email protected]> | 2019-06-11 12:25:35 -0700 |
---|---|---|
committer | Alyssa Rosenzweig <[email protected]> | 2019-06-12 14:07:09 -0700 |
commit | fc7bcee865c5b42b7575f2e69ecf61b80521d47e (patch) | |
tree | 62572a55ff62f337788f86a0fca0479099a5eae1 /src/gallium/drivers/panfrost/meson.build | |
parent | 845ec8576a600ea54f80a2639e0466041f145ffa (diff) |
panfrost: Replace pantrace with direct decoding
History lesson! In the early days of a Panfrost, we had a library
independent of the driver called `panwrap` which would be LD_PRELOAD'ed
into a driver to decode its cmdstream in real-time. When upstreaming
Panfrost, we realized that we would much rather have this decode
functionality maintained in-tree to avoid divergence, but that we could
not upstream panwrap because of its use with the legacy API. So we
instead dumped GPU memory to the filesystem with an out-of-tree panwrap,
and decoded that with the in-tree pandecode module. When we migrated to
the new kernel, we just added support for doing this memory dump
directly from the driver (via a module "pantrace").
This works, but dumping memory every frame is sloooooooooooooow and
error-prone. I figured if we have pandecode in-tree, we might as well
link to it directly in the driver, allowing us to decode Panfrost's
command streams without dumping memory to the filesystem first. This
cleans up the code *substantially* and improves dumping performance by a
HUGE margin. I'm talking "several seconds per frame" to "dumping in
real-time" kind of jump.
Note to users: this removes the environmental option "PANTRACE_BASE".
Instead, for equivalent functionality set "PAN_MESA_DEBUG=trace" and
redirect stdout to the file of your choosing.
This should be debugging Panfrost much more pleasant.
Signed-off-by: Alyssa Rosenzweig <[email protected]>
Diffstat (limited to 'src/gallium/drivers/panfrost/meson.build')
-rw-r--r-- | src/gallium/drivers/panfrost/meson.build | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/gallium/drivers/panfrost/meson.build b/src/gallium/drivers/panfrost/meson.build index d01c132eb70..006449fc48f 100644 --- a/src/gallium/drivers/panfrost/meson.build +++ b/src/gallium/drivers/panfrost/meson.build @@ -42,11 +42,13 @@ files_panfrost = files( 'bifrost/disassemble.c', + 'pandecode/common.c', + 'pandecode/decode.c', + 'pan_context.c', 'pan_afbc.c', 'pan_blit.c', 'pan_job.c', - 'pan_trace.c', 'pan_drm.c', 'pan_allocate.c', 'pan_assemble.c', @@ -135,6 +137,7 @@ bifrost_compiler = executable( files_pandecode = files( 'pandecode/cmdline.c', + 'pandecode/common.c', 'pandecode/decode.c', 'pan_pretty_print.c', |