OSDN Git Service

anv: Add a helper for doing mass allocations
authorJason Ekstrand <jason.ekstrand@intel.com>
Fri, 7 Apr 2017 05:15:16 +0000 (22:15 -0700)
committerJason Ekstrand <jason.ekstrand@intel.com>
Sat, 8 Apr 2017 02:24:14 +0000 (19:24 -0700)
commite5c29b8c2713f622a66cae9ad35f85469cda2a46
tree12b5ff89785659ac6314c87c8739dd0a093067b0
parent82695c32b6f5afe742de17a2d617dc200f7f0676
anv: Add a helper for doing mass allocations

We tend to try to reduce the number of allocation calls the Vulkan
driver uses by doing a single allocation whenever possible for a data
structure.  While this has certain downsides (usually code complexity),
it does mean error handling and cleanup is much easier.  This commit
adds a nice little helper struct for getting rid of some of that
complexity.

Reviewed-by: Nanley Chery <nanley.g.chery@intel.com>
src/intel/vulkan/anv_private.h