[Mesa-dev] [PATCH] anv/genX: Solve the anv_CmdClearColorImage crash issue
Xu, Randy
randy.xu at intel.com
Mon Mar 27 08:32:26 UTC 2017
Hi, Lionel/Tapani/Emil
Any comments to this patch? I think it should be enough to address the VK_REMAINING_ARRAY_LAYERS (~0) issue in anv_blorp.c
Thanks,
Randy
> -----Original Message-----
> From: mesa-dev [mailto:mesa-dev-bounces at lists.freedesktop.org] On
> Behalf Of Randy Xu
> Sent: Monday, March 20, 2017 3:32 PM
> To: mesa-dev at lists.freedesktop.org
> Cc: Xu, Randy <randy.xu at intel.com>
> Subject: [Mesa-dev] [PATCH] anv/genX: Solve the anv_CmdClearColorImage
> crash issue
>
> From: Xu Randy <randy.xu at intel.com>
>
> 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 at intel.com>
> ---
> src/intel/vulkan/anv_blorp.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/src/intel/vulkan/anv_blorp.c b/src/intel/vulkan/anv_blorp.c index
> 1f4fec5..9b3910f 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; @@ -890,7 +890,7
> @@ void anv_CmdClearDepthStencilImage(
> bool clear_stencil = pRanges[r].aspectMask &
> VK_IMAGE_ASPECT_STENCIL_BIT;
>
> 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;
> --
> 2.7.4
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/mesa-dev
More information about the mesa-dev
mailing list