OSDN Git Service

anv/blorp: Fix a crash in CmdClearColorImage
authorXu Randy <randy.xu@intel.com>
Mon, 20 Mar 2017 07:31:35 +0000 (15:31 +0800)
committerAndres Gomez <agomez@igalia.com>
Wed, 29 Mar 2017 16:13:18 +0000 (19:13 +0300)
commit8c5dfa91693f28f5ee464961145a4347aa8ca15a
tree8e92be307b702cb9914257a8dbf103168a702d40
parent1fcf8231eab1a3af8757e014009f482d57c43fdb
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>
(cherry picked from commit 004468de14170dc7a22322301829ad4f59188ee5)
src/intel/vulkan/anv_blorp.c