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

[d3d9] Fix sysmem readback

This commit is contained in:
Robin Kertels 2022-02-24 02:32:50 +01:00 committed by Joshie
parent a81c653b42
commit b42c07253e
3 changed files with 6 additions and 2 deletions

View File

@ -328,7 +328,7 @@ namespace dxvk {
void SetNeedsReadback(UINT Subresource, bool value) { m_needsReadback.set(Subresource, value); }
bool NeedsReachback(UINT Subresource) const { return m_needsReadback.get(Subresource) && m_image != nullptr; }
bool NeedsReachback(UINT Subresource) const { return m_needsReadback.get(Subresource); }
void MarkAllNeedReadback() { m_needsReadback.setAll(); }

View File

@ -849,6 +849,7 @@ namespace dxvk {
cLevelExtent);
});
dstTexInfo->SetNeedsReadback(dst->GetSubresource(), true);
TrackTextureMappingBufferSequenceNumber(dstTexInfo, dst->GetSubresource());
return D3D_OK;
@ -4159,7 +4160,7 @@ namespace dxvk {
std::memset(physSlice.mapPtr, 0, physSlice.length);
}
else if (!skipWait) {
if (unlikely(needsReadback)) {
if (unlikely(needsReadback) && pResource->GetImage() != nullptr) {
Rc<DxvkImage> resourceImage = pResource->GetImage();
Rc<DxvkImage> mappedImage = resourceImage->info().sampleCount != 1

View File

@ -469,6 +469,9 @@ namespace dxvk {
cLevelExtent);
});
dstTexInfo->SetNeedsReadback(dst->GetSubresource(), true);
m_parent->TrackTextureMappingBufferSequenceNumber(dstTexInfo, dst->GetSubresource());
return D3D_OK;
}