anv: add anv_batch_set_error() and anv_batch_has_error() helpers
authorIago Toral Quiroga <itoral@igalia.com>
Wed, 8 Mar 2017 11:59:58 +0000 (12:59 +0100)
committerIago Toral Quiroga <itoral@igalia.com>
Thu, 16 Mar 2017 10:40:05 +0000 (11:40 +0100)
commita8ce8e35420e57b6921dfce8462a7caa512b797a
treeb9e21e8c2b44362e2207df6ee07034b02cac736e
parentd0195bd0678b7ebfa740386c781e981ded8d788d
anv: add anv_batch_set_error() and anv_batch_has_error() helpers

The anv_batch_set_error() helper will track the first error that happened
while recording a command buffer. The helper returns the currently tracked
error to help the job of internal functions that may generate errors that
need to be tracked and return a VkResult to the caller.

We will use the anv_batch_has_error() helper to guard parts of the driver
that are not safe to execute if an error has been generated while recording
a particular command buffer.

Reviewed-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
src/intel/vulkan/anv_private.h