Switch orders of depth and stencil copies when restoring D/S 'MS' arrays

* This was previously needed to be stencil-before-depth to workaround an
  nvidia driver bug, but now depth-before-stencil works around a RADV
  hang and it no longer seems to be necessary for nvidia.
* The RADV issue is being fixed upstream but this is a 'free' workaround
  until that arrives.
This commit is contained in:
baldurk
2017-06-26 10:53:42 +01:00
parent aa34cf131b
commit 6d89d451cd
+4 -4
View File
@@ -1849,15 +1849,15 @@ bool WrappedVulkan::Serialise_InitialState(ResourceId resid, WrappedVkRes *)
}
}
ObjDisp(cmd)->CmdCopyBufferToImage(Unwrap(cmd), Unwrap(buf), Unwrap(arrayIm),
VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL,
(uint32_t)mainCopies.size(), &mainCopies[0]);
if(!stencilCopies.empty())
ObjDisp(cmd)->CmdCopyBufferToImage(Unwrap(cmd), Unwrap(buf), Unwrap(arrayIm),
VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL,
(uint32_t)stencilCopies.size(), &stencilCopies[0]);
ObjDisp(cmd)->CmdCopyBufferToImage(Unwrap(cmd), Unwrap(buf), Unwrap(arrayIm),
VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL,
(uint32_t)mainCopies.size(), &mainCopies[0]);
// once transfers complete, get ready for copy array->ms
dstimBarrier.oldLayout = VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL;
dstimBarrier.newLayout = VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL;