Add the descriptor index and current pm4 packet to the script hook.
Knowing the pm4 packet tells the callback whether it is a 3d draw or
compute shader, so it knows which shader stages to check. Having the
descriptor index lets the script check against stats extracted from
the relevant enabled shader stages.
Signed-off-by: Rob Clark <rob.clark@oss.qualcomm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39636>
Add a script hook which can be used to decide whether to show a
particular descriptor variant. For example, the FMT determines
MULTI_PLANE vs SINGLE_PLANE, and the TYPE determines between
BUFFER vs other formats.
Some ambiguity remains. We could do better in most cases by
extracting info from the enabled shader stages. But this is
a good start.
Signed-off-by: Rob Clark <rob.clark@oss.qualcomm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39573>
Setting up a new `iL` `lua_State` in which `r` is injected as
the equivalent to `rnn.init(<gpu>)` and a `priv` library allows
accessing extra functionality (not available to user provided
scripts) currently just allowing writing to registers.
Signed-off-by: Karmjit Mahil <karmjit.mahil@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38001>
cffdump, crashdec, etc
At this point there is some duplication with other files in-tree (ie.
a2xx and a3xx+ disassembly), which will be cleaned up in a later commit.
Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6070>