[Mesa-dev] [PATCH v2 0/3] GEM BO padding to find OOB buffer writes
kevin.rogovin at intel.com
kevin.rogovin at intel.com
Wed Dec 13 10:18:35 UTC 2017
From: Kevin Rogovin <kevin.rogovin at intel.com>
This patch series adds a new debug option to pad each GEM BO
allocated by the brw_bufmgr with pseudo-(weak) random noise values
which are then checked after each batchbuffer dispatch to the kernel.
This can be quite valuable to find diffucult to track down heisenberg
style bugs.
A possible follow-up series would be to write to stderr (or
another logging mechanism) if the OOB write is to a GEM BO that
backs a GL buffer object; that features would be quite useful for
application developers.
(resending because I sent out v2 earlier today without tagging it as v2).
v2:
Change from using rand() to using internal generating function
(requested/suggested by Jason Ekstrand)
Avoid having extra pointers in brw_bo struct via using the internal
function and allocating buffer for pread at brw_bo_padding_is_good()
(requested/suggested by Jason Ekstrand)
Comments indicating that pread ioctl will do the required waiting
for GPU commands to finish
Kevin Rogovin (3):
intel/common:add debug flag for adding and checking padding on BO's
i965: add noise padding to buffer object and function to check if
noise is correct
i965: if DEBUG_OUT_OF_BOUND_CHK is up, check that noise padding for
each bo used in batchbuffer is correct
src/intel/common/gen_debug.c | 1 +
src/intel/common/gen_debug.h | 1 +
src/mesa/drivers/dri/i965/brw_bufmgr.c | 107 +++++++++++++++++++++++++-
src/mesa/drivers/dri/i965/brw_bufmgr.h | 8 ++
src/mesa/drivers/dri/i965/intel_batchbuffer.c | 19 +++++
5 files changed, 135 insertions(+), 1 deletion(-)
--
2.15.0
More information about the mesa-dev
mailing list