layers: Update vk_helper to generate safe_struct wrappers
authorTobin Ehlis <tobine@google.com>
Wed, 10 Feb 2016 22:32:46 +0000 (15:32 -0700)
committerTobin Ehlis <tobine@google.com>
Thu, 11 Feb 2016 23:31:56 +0000 (16:31 -0700)
commit5e29489f855a8c6fba84c1e608bfaa5dd58066d1
tree1aa4730a1b71a7a03392ba7dbd79bc1062517f61
parent2f18c59a5c36bfbac1dd99ee35b58027b433156a
layers: Update vk_helper to generate safe_struct wrappers

Create vk_safe_struct.h/cpp files that contain wrapped versions of vk structs.
The idea is to wrap structs that contain non-dispatchable objects so that
the non-dispatchable objects are no longer contained within or below "const" decls.
The safe struct wrappers are intended to exactly match the original structures
in how they appear, but they also contain some utility functions to contruct and
desctruct themselves so that ptr chains are automatically replicated.

For unique_objects, the idea is to use the safe_struct wrappers as follows:
foreach struct that contains non-dispatchable objects
   declare local safe_struct version of struct
   initialize struct to exactly match original
   unwrap non-dispatchable objects in place in the safe_struct
vk_helper.py