diff --git a/src/d3d9/d3d9_common_buffer.h b/src/d3d9/d3d9_common_buffer.h index 7ea1c8a87..94d61d2fb 100644 --- a/src/d3d9/d3d9_common_buffer.h +++ b/src/d3d9/d3d9_common_buffer.h @@ -168,9 +168,10 @@ namespace dxvk { } uint32_t GetLockCount() const { return m_lockCount; } - void MarkUploaded() { m_needsUpload = false; } - void MarkNeedsUpload() { m_needsUpload = true; } - bool NeedsUpload() const { return m_needsUpload; } + /** + * \brief Whether or not the staging buffer needs to be copied to the actual buffer + */ + bool NeedsUpload() { return m_desc.Pool != D3DPOOL_DEFAULT && !m_dirtyRange.IsDegenerate(); } void PreLoad(); @@ -206,8 +207,6 @@ namespace dxvk { uint32_t m_lockCount = 0; - bool m_needsUpload = false; - }; } \ No newline at end of file diff --git a/src/d3d9/d3d9_device.cpp b/src/d3d9/d3d9_device.cpp index 46ee13035..47614cd87 100644 --- a/src/d3d9/d3d9_device.cpp +++ b/src/d3d9/d3d9_device.cpp @@ -4463,13 +4463,9 @@ namespace dxvk { // We need to remove the READONLY flags from the map flags // if there was ever a non-readonly upload. - if (!(Flags & D3DLOCK_READONLY)) { + if (!(Flags & D3DLOCK_READONLY)) oldFlags &= ~D3DLOCK_READONLY; - if (pResource->Desc()->Pool != D3DPOOL_DEFAULT) - pResource->MarkNeedsUpload(); - } - pResource->SetMapFlags(Flags | oldFlags); pResource->IncrementLockCount(); @@ -4496,7 +4492,6 @@ namespace dxvk { pResource->GPUReadingRange().Conjoin(pResource->DirtyRange()); pResource->DirtyRange().Clear(); - pResource->MarkUploaded(); return D3D_OK; }