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:
parent
a08f9d0897
commit
8a9cee903b
@ -941,8 +941,16 @@ namespace dxvk {
|
|||||||
VkOffset3D srcOffset,
|
VkOffset3D srcOffset,
|
||||||
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,
|
||||||
|
Loading…
Reference in New Issue
Block a user