diff --git a/src/d3d9/d3d9_common_buffer.cpp b/src/d3d9/d3d9_common_buffer.cpp index 84f976a0..b233d7a3 100644 --- a/src/d3d9/d3d9_common_buffer.cpp +++ b/src/d3d9/d3d9_common_buffer.cpp @@ -14,6 +14,9 @@ namespace dxvk { m_stagingBuffer = CreateStagingBuffer(); m_sliceHandle = GetMapBuffer()->getSliceHandle(); + + if (m_desc.Pool != D3DPOOL_DEFAULT) + m_dirtyRange = D3D9Range(0, m_desc.Size); } diff --git a/src/d3d9/d3d9_common_texture.cpp b/src/d3d9/d3d9_common_texture.cpp index dca5c187..8ce017fe 100644 --- a/src/d3d9/d3d9_common_texture.cpp +++ b/src/d3d9/d3d9_common_texture.cpp @@ -21,6 +21,13 @@ namespace dxvk { AddDirtyBox(nullptr, i); } + if (m_desc.Pool != D3DPOOL_DEFAULT) { + const uint32_t subresources = CountSubresources(); + for (uint32_t i = 0; i < subresources; i++) { + SetNeedsUpload(i, true); + } + } + m_mapping = pDevice->LookupFormat(m_desc.Format); m_mapMode = DetermineMapMode(); diff --git a/src/d3d9/d3d9_device.cpp b/src/d3d9/d3d9_device.cpp index 910daca2..4e187a01 100644 --- a/src/d3d9/d3d9_device.cpp +++ b/src/d3d9/d3d9_device.cpp @@ -5008,7 +5008,7 @@ namespace dxvk { void D3D9DeviceEx::UploadManagedTexture(D3D9CommonTexture* pResource) { for (uint32_t subresource = 0; subresource < pResource->CountSubresources(); subresource++) { - if (!pResource->NeedsUpload(subresource)) + if (!pResource->NeedsUpload(subresource) || pResource->GetBuffer(subresource) == nullptr) continue; this->FlushImage(pResource, subresource);