i965: Mark shader programs for capture in the error state.
authorMatt Turner <mattst88@gmail.com>
Tue, 25 Apr 2017 17:00:19 +0000 (10:00 -0700)
committerMatt Turner <mattst88@gmail.com>
Mon, 15 May 2017 18:42:41 +0000 (11:42 -0700)
commit8ca8ebbf78d6e5eacbd42dc245f503e0c9787268
treedc6e84990f54efd95b88caa471d0759125ebde44
parent0aa578714e9d664ab15d2bfb70102505928d8119
i965: Mark shader programs for capture in the error state.

When the GPU hangs, the kernel saves some state for us. Until now it has
not included the shader programs, which are very often the reason the
GPU hang occurred. With the programs saved in the error state, we should
be more capable of debugging hangs.

Thanks to Chris Wilson and Ben Widawsky who provided the kernel support
for this feature ("drm/i915: Copy user requested buffers into the error
state"), which will be in kernel v4.13.

Reviewed-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
src/mesa/drivers/dri/i965/brw_bufmgr.c
src/mesa/drivers/dri/i965/brw_bufmgr.h
src/mesa/drivers/dri/i965/brw_program_cache.c
src/mesa/drivers/dri/i965/intel_batchbuffer.c
src/mesa/drivers/dri/i965/intel_screen.c
src/mesa/drivers/dri/i965/intel_screen.h