[Mesa-dev] [PATCH] Vulkan: Solve the vkCmdClearColorImage crash issue

Lionel Landwerlin lionel.g.landwerlin at intel.com
Sat Mar 18 12:21:56 UTC 2017


Also, we want this in Cc for stable :)


On 18/03/17 11:07, Xu,Randy wrote:
> In anv_CmdClearColorImage, the layer count should be got through
> anv_get_layerCount, 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 at intel.com>
> ---
>   src/intel/vulkan/anv_blorp.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/src/intel/vulkan/anv_blorp.c b/src/intel/vulkan/anv_blorp.c
> index 1f4fec5..955bb6d 100644
> --- a/src/intel/vulkan/anv_blorp.c
> +++ b/src/intel/vulkan/anv_blorp.c
> @@ -830,7 +830,7 @@ void anv_CmdClearColorImage(
>                           VK_IMAGE_ASPECT_COLOR_BIT, image->tiling);
>   
>         unsigned base_layer = pRanges[r].baseArrayLayer;
> -      unsigned layer_count = pRanges[r].layerCount;
> +      unsigned layer_count = anv_get_layerCount(image, &pRanges[r]);
>   
>         for (unsigned i = 0; i < anv_get_levelCount(image, &pRanges[r]); i++) {
>            const unsigned level = pRanges[r].baseMipLevel + i;




More information about the mesa-dev mailing list