intel/dump_gpu: Disambiguate between BOs from different GEM handle spaces.
authorFrancisco Jerez <currojerez@riseup.net>
Fri, 18 Jan 2019 20:51:57 +0000 (12:51 -0800)
committerFrancisco Jerez <currojerez@riseup.net>
Mon, 11 Feb 2019 20:27:22 +0000 (12:27 -0800)
commit374eb3cd6f87347e73ec35b247be947e0aba11c4
tree976280297e4759abd37c6b7cc3b2cbd3b7b0ad63
parente404c6879d57bffac580936ef420f50648e55f7b
intel/dump_gpu: Disambiguate between BOs from different GEM handle spaces.

This fixes a rather astonishing problem that came up while debugging
an issue in the Vulkan CTS.  Apparently the Vulkan CTS framework has
the tendency to create multiple VkDevices, each one with a separate
DRM device FD and therefore a disjoint GEM buffer object handle space.
Because the intel_dump_gpu tool wasn't making any distinction between
buffers from the different handle spaces, it was confusing the
instruction state pools from both devices, which happened to have the
exact same GEM handle and PPGTT virtual address, but completely
different shader contents.  This was causing the simulator to believe
that the vertex pipeline was executing a fragment shader, which didn't
end up well.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
src/intel/tools/intel_dump_gpu.c