1
0
mirror of https://github.com/doitsujin/dxvk.git synced 2024-12-02 10:24:12 +01:00

[dxvk] Use render pass copy for depth-stencil images if beneficial

This commit is contained in:
Philip Rebohle 2019-07-18 16:53:43 +02:00
parent a08f9d0897
commit 8a9cee903b
No known key found for this signature in database
GPG Key ID: C8CC613427A31C99

View File

@ -941,8 +941,16 @@ namespace dxvk {
VkOffset3D srcOffset,
VkExtent3D extent) {
this->spillRenderPass();
if (dstSubresource.aspectMask == srcSubresource.aspectMask) {
bool useFb = dstSubresource.aspectMask != srcSubresource.aspectMask;
if (m_device->perfHints().preferFbDepthStencilCopy) {
useFb |= (dstSubresource.aspectMask == (VK_IMAGE_ASPECT_DEPTH_BIT | VK_IMAGE_ASPECT_STENCIL_BIT))
&& (dstImage->info().usage & VK_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT)
&& (srcImage->info().usage & VK_IMAGE_USAGE_SAMPLED_BIT);
}
if (!useFb) {
this->copyImageHw(
dstImage, dstSubresource, dstOffset,
srcImage, srcSubresource, srcOffset,