[Mesa-dev] [PATCH] radv: handle dcc in explicit image resolve path. (v2)
Bas Nieuwenhuizen
bas at basnieuwenhuizen.nl
Tue Feb 7 23:22:57 UTC 2017
Reviewed-by: Bas Nieuwenhuizen <bas at basnieuwenhuizen.nl>
On Wed, Feb 8, 2017, at 00:20, Dave Airlie wrote:
> From: Dave Airlie <airlied at redhat.com>
>
> We need to initialize dcc like we do in the subpass path.
>
> v2: fix initial/final layouts
> Signed-off-by: Dave Airlie <airlied at redhat.com>
> ---
> src/amd/vulkan/radv_meta_resolve.c | 11 ++++++++---
> 1 file changed, 8 insertions(+), 3 deletions(-)
>
> diff --git a/src/amd/vulkan/radv_meta_resolve.c
> b/src/amd/vulkan/radv_meta_resolve.c
> index 66f1466..23ca569 100644
> --- a/src/amd/vulkan/radv_meta_resolve.c
> +++ b/src/amd/vulkan/radv_meta_resolve.c
> @@ -95,9 +95,11 @@ create_pass(struct radv_device *device)
> attachments[i].samples = 1;
> attachments[i].loadOp = VK_ATTACHMENT_LOAD_OP_LOAD;
> attachments[i].storeOp = VK_ATTACHMENT_STORE_OP_STORE;
> - attachments[i].initialLayout = VK_IMAGE_LAYOUT_GENERAL;
> - attachments[i].finalLayout = VK_IMAGE_LAYOUT_GENERAL;
> }
> + attachments[0].initialLayout = VK_IMAGE_LAYOUT_GENERAL;
> + attachments[0].finalLayout = VK_IMAGE_LAYOUT_GENERAL;
> + attachments[1].initialLayout =
> VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL;
> + attachments[1].finalLayout =
> VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL;
>
> result = radv_CreateRenderPass(device_h,
> &(VkRenderPassCreateInfo) {
> @@ -116,7 +118,7 @@ create_pass(struct radv_device *device)
> },
> {
> .attachment = 1,
> -
> .layout = VK_IMAGE_LAYOUT_GENERAL,
> +
> .layout = VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL,
> },
> },
> .pResolveAttachments = NULL,
> @@ -428,6 +430,9 @@ void radv_CmdResolveImage(
> if (src_image->array_size > 1)
> radv_finishme("vkCmdResolveImage: multisample array images");
>
> + if (dest_image->surface.dcc_size) {
> + radv_initialize_dcc(cmd_buffer, dest_image, 0xffffffff);
> + }
> for (uint32_t r = 0; r < region_count; ++r) {
> const VkImageResolve *region = ®ions[r];
>
> --
> 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