1
0
mirror of https://github.com/doitsujin/dxvk.git synced 2024-12-12 13:08:50 +01:00

[d3d9] Fix synchronization in UpdateTextureFromBuffer

This commit is contained in:
Robin Kertels 2022-08-08 23:46:10 +02:00 committed by Joshie
parent ac1e44f120
commit 36d8bb77a5

View File

@ -4427,6 +4427,12 @@ namespace dxvk {
auto convertFormat = pDestTexture->GetFormatMapping().ConversionFormatInfo;
if (unlikely(pSrcTexture->NeedsReadback(SrcSubresource))) {
const Rc<DxvkBuffer>& buffer = pSrcTexture->GetBuffer(SrcSubresource, false);
WaitForResource(buffer, pSrcTexture->GetMappingBufferSequenceNumber(SrcSubresource), 0);
pSrcTexture->SetNeedsReadback(SrcSubresource, false);
}
if (likely(convertFormat.FormatType == D3D9ConversionFormat_None)) {
VkOffset3D alignedDestOffset = {
int32_t(alignDown(DestOffset.x, formatInfo->blockSize.width)),