[Mesa-stable] [Mesa-dev] [PATCH] anv/pass: Store the depth-stencil attachment's last subpass index

Samuel Iglesias Gonsálvez siglesias at igalia.com
Thu Feb 2 09:08:19 UTC 2017


Reviewed-by: Samuel Iglesias Gonsálvez <siglesias at igalia.com>

On Wed, 2017-02-01 at 17:21 -0800, Nanley Chery wrote:
> Commit 968ffd6c868af7226e8f889573eef709888151cb stored the last
> subpass
> index of all the attachments but that of the depth-stencil
> attachment.
> This could cause depth buffers used in multiple subpasses not to be
> in
> the requested final layout. Fix this error.
> 
> Cc: "17.0" <mesa-stable at lists.freedesktop.org>
> Signed-off-by: Nanley Chery <nanley.g.chery at intel.com>
> ---
>  src/intel/vulkan/anv_pass.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/src/intel/vulkan/anv_pass.c
> b/src/intel/vulkan/anv_pass.c
> index 5df6330c6a..2df18260d3 100644
> --- a/src/intel/vulkan/anv_pass.c
> +++ b/src/intel/vulkan/anv_pass.c
> @@ -172,6 +172,7 @@ VkResult anv_CreateRenderPass(
>              pass->attachments[a].usage |=
>                 VK_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT;
>              pass->attachments[a].subpass_usage[i] |=
> ANV_SUBPASS_USAGE_DRAW;
> +            pass->attachments[a].last_subpass_idx = i;
>           }
>        } else {
>           subpass->depth_stencil_attachment = VK_ATTACHMENT_UNUSED;


More information about the mesa-stable mailing list