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

@ -942,7 +942,15 @@ namespace dxvk {
VkExtent3D extent) { VkExtent3D extent) {
this->spillRenderPass(); 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( this->copyImageHw(
dstImage, dstSubresource, dstOffset, dstImage, dstSubresource, dstOffset,
srcImage, srcSubresource, srcOffset, srcImage, srcSubresource, srcOffset,