anv/meta: Fix VkImageViewType
authorChad Versace <chad.versace@intel.com>
Thu, 10 Dec 2015 01:03:14 +0000 (17:03 -0800)
committerChad Versace <chad.versace@intel.com>
Mon, 14 Dec 2015 17:03:58 +0000 (09:03 -0800)
commitf0d11d5a814b792eb5f5161e9332123aaaf689fb
tree16280161ad6e1e8388fb0d72e4312a92136bb5d1
parent0bebaeacd74acfafc97c0f66cdcd50369d85ab26
anv/meta: Fix VkImageViewType

Meta unconditionally used VK_IMAGE_VIEW_TYPE_2D in the functions below.
This caused some out-of-bound memory accesses.
  anv_CmdCopyImage
  anv_CmdBlitImage
  anv_CmdCopyBufferToImage
  anv_CmdClearColorImage

Fix it by adding a new function, anv_meta_get_view_type().
src/vulkan/anv_meta.c
src/vulkan/anv_meta.h
src/vulkan/anv_meta_clear.c