vk/image: Refactor anv_image_create()
authorChad Versace <chad.versace@intel.com>
Fri, 26 Jun 2015 16:17:52 +0000 (09:17 -0700)
committerChad Versace <chad.versace@intel.com>
Fri, 26 Jun 2015 16:32:59 +0000 (09:32 -0700)
commit67a7659d69a6e2c0927ca218efcc3c99086ae31b
treed353b28f866583b652074e4478ced78cdd15e1d9
parent5d7103ee15593dda3811c251a1c5239a5d82cac5
vk/image: Refactor anv_image_create()

From my experience with intel_mipmap_tree.c, I learned that for struct's
like anv_image and intel_mipmap_tree, which have sprawling
multi-function construction codepaths, it's easy to mistakenly use
unitialized struct members during construction.

Let's eliminate the risk of using unitialized anv_image members during
construction.  Fill the struct at the function bottom instead of
piecemeal throughout the constructor.
src/vulkan/image.c