Skip to content

Commit

Permalink
Use framebuffer extent in depth aspect copy, fixes #2071
Browse files Browse the repository at this point in the history
  • Loading branch information
sean-purcell authored and AWoloszyn committed Jul 23, 2018
1 parent 05d9111 commit 13c73ed
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion gapis/api/vulkan/overdraw.go
Original file line number Diff line number Diff line change
Expand Up @@ -1343,13 +1343,13 @@ func (s *stencilOverdraw) copyImageDepthAspect(ctx context.Context,
cmdBuffer VkCommandBuffer,
srcImageDesc imageDesc,
dstImageDesc imageDesc,
extent VkExtent3D,
alloc func(v ...interface{}) api.AllocResult,
addCleanup func(func()),
out transform.Writer,
) {
srcImageView := srcImageDesc.imageView
dstImageView := dstImageDesc.imageView
extent := srcImageView.Image().Info().Extent()
copyBuffer := s.createDepthCopyBuffer(ctx, cb, gs, st, a, device,
srcImageView.Image().Info().Fmt(),
extent.Width(), extent.Height(),
Expand Down Expand Up @@ -1532,6 +1532,7 @@ func (s *stencilOverdraw) loadExistingDepthValues(ctx context.Context,
imageDesc{oldImageView.Get(), oldImageLayout},
imageDesc{newImageView.Get(),
VkImageLayout_VK_IMAGE_LAYOUT_DEPTH_STENCIL_ATTACHMENT_OPTIMAL},
NewVkExtent3D(a, fbInfo.Width(), fbInfo.Height(), 1),
alloc, addCleanup, out)
}

Expand Down Expand Up @@ -1569,6 +1570,7 @@ func (s *stencilOverdraw) storeNewDepthValues(ctx context.Context,
imageDesc{oldImageView.Get(),
VkImageLayout_VK_IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL},
imageDesc{newImageView.Get(), newImageLayout},
NewVkExtent3D(a, fbInfo.Width(), fbInfo.Height(), 1),
alloc, addCleanup, out)
}

Expand Down

0 comments on commit 13c73ed

Please sign in to comment.