Can't use CmdCopyBufferToImage or vice versa for depth and stencil.

This commit is contained in:
Dr. Chat 2016-04-01 22:03:29 -05:00
parent f9a634ad25
commit 3726064af5
1 changed files with 16 additions and 16 deletions

View File

@ -840,15 +840,15 @@ void RenderCache::UpdateTileView(VkCommandBuffer command_buffer,
&barrier, 0, nullptr);
}
// TODO(DrChat): Stencil copies.
VkBufferImageCopy region;
region.bufferOffset = view->key.tile_offset * 5120;
region.bufferRowLength = 0;
region.bufferImageHeight = 0;
region.imageSubresource = {0, 0, 0, 1};
region.imageSubresource.aspectMask =
view->key.color_or_depth
region.imageSubresource.aspectMask = view->key.color_or_depth
? VK_IMAGE_ASPECT_COLOR_BIT
: VK_IMAGE_ASPECT_DEPTH_BIT | VK_IMAGE_ASPECT_STENCIL_BIT;
: VK_IMAGE_ASPECT_DEPTH_BIT;
region.imageOffset = {0, 0, 0};
region.imageExtent = {view->key.tile_width * 80u, view->key.tile_height * 16u,
1};