mirror of
https://github.com/doitsujin/dxvk.git
synced 2025-02-20 19:54:19 +01:00
[d3d9] Use buffer DirtyRange to track managed uploads
This commit is contained in:
parent
4f45e74d96
commit
3f57a3a8cc
@ -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;
|
||||
|
||||
};
|
||||
|
||||
}
|
@ -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;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user