anv/blorp: Fix a crash in CmdClearColorImage
authorXu Randy <randy.xu@intel.com>
Mon, 20 Mar 2017 07:31:35 +0000 (15:31 +0800)
committerJason Ekstrand <jason.ekstrand@intel.com>
Mon, 27 Mar 2017 14:43:17 +0000 (07:43 -0700)
commit004468de14170dc7a22322301829ad4f59188ee5
treedb1b98a5693ea140c0dd97e0d7939df26b596139
parent804676f384d4a12e3cfbccf21e48464c4ba58704
anv/blorp: Fix a crash in CmdClearColorImage

We should use anv_get_layerCount() to access layerCount of VkImageSub-
resourceRange in anv_CmdClearColorImage and anv_CmdClearDepthStencil-
Image, which handles the VK_REMAINING_ARRAY_LAYERS (~0) case.

Test: Sample multithreadcmdbuf from LunarG can run without crash

Signed-off-by: Xu Randy <randy.xu@intel.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Cc: "13.0 17.0" <mesa-stable@lists.freedesktop.org>
src/intel/vulkan/anv_blorp.c