vkd3d: Support discarding single aspects as required.

Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
This commit is contained in:
Hans-Kristian Arntzen 2021-07-02 12:55:51 +02:00
parent 398724cd6e
commit 3090ae01c1
1 changed files with 1 additions and 3 deletions

View File

@ -2316,9 +2316,7 @@ static void d3d12_command_list_discard_attachment_barrier(struct d3d12_command_l
return;
}
/* TODO: Separate depth-stencil layouts? Otherwise, we cannot discard single planes. */
if (resource->format->vk_aspect_mask != subresource->aspectMask)
return;
/* With separate depth stencil layouts, we can only discard the aspect we care about. */
barrier.sType = VK_STRUCTURE_TYPE_IMAGE_MEMORY_BARRIER;
barrier.pNext = NULL;