[Mesa-dev] [PATCH 0/6] util, ac, radeonsi: debug tools fixes and improvements
nhaehnle at gmail.com
Tue Aug 22 15:45:00 UTC 2017
The two main changes here are related to amd/common IB parsing:
1. Prefix IB dumps with the raw hex values in the IB. For when you distrust
your debugging tools...
I've gone back and forth on how to implement this. It's a pity that
the stdlib has no way of "overloading" FILE, and I didn't want to write
my own FILE proxy, so instead the code writes the dump to memory and adds
custom "control codes" which are interpreted for formatting in a second
A side benefit is that nested IB dumping should look nicer now, but I
haven't tested it.
2. Add explicit valgrind definedness checks. Valgrind will not complain
about undefined data written to IBs by default, because it does not
understand what happens with the data (it does not understand the
ioctls, and has no chance whatsoever of understanding chained and nested
If IB parsing is enabled, Valgrind *will* complain about undefined data,
but that's written in the Valgrind log file. With this change, we
additionally flag the situation in the IB dump itself, which makes it
easier to understand where the undefined data is coming from.
There are some related odds and ends, like proper bounds checking when
reading from IBs, etc.
src/amd/common/ac_debug.c | 446 +++++++++++------
src/gallium/auxiliary/util/u_dump_state.c | 12 +-
.../drivers/radeon/r600_pipe_common.c | 2 +-
src/gallium/drivers/radeonsi/si_state.h | 11 +-
4 files changed, 303 insertions(+), 168 deletions(-)
More information about the mesa-dev