intel/aubinator: Properly handle batch buffer chaining
authorJason Ekstrand <jason@jlekstrand.net>
Fri, 9 Sep 2016 04:12:11 +0000 (21:12 -0700)
committerJason Ekstrand <jason.ekstrand@intel.com>
Tue, 29 Nov 2016 00:45:08 +0000 (16:45 -0800)
commitd6cef320477354f1c139c0bb7fb9b68731aa15cd
tree61376d62aaffb5d3201edeab45d0d7f306849177
parent0a5e1b02cf6103037b488db5daa3097fbcfcf670
intel/aubinator: Properly handle batch buffer chaining

The original aubinator that Kristian wrote had a bug in the handling of
MI_BATCH_BUFFER_START that propagated into the version in upstream mesa.
In particular, it ignored the "2nd level" bit which tells you whether this
MI_BATCH_BUFFER_START is a subroutine call (2nd level) or a goto.  Since
the Vulkan driver uses batch chaining, this can lead to a very confusing
interpretation of the batches.  In some cases, depending on how things are
laid out in the virtual GTT, you can even end up with infinite loops in
batch processing.

Reviewed-by: Kristian H. Kristensen <hoegsberg@google.com>
src/intel/tools/aubinator.c