mirror of
https://github.com/EduApps-CDG/OpenDX
synced 2024-12-30 09:45:37 +01:00
[d3d9] Unmark resources as dirty if they get discarded
This commit is contained in:
parent
6fa28bf937
commit
764cb5634f
@ -3829,6 +3829,13 @@ namespace dxvk {
|
|||||||
Flags &= ~D3DLOCK_READONLY;
|
Flags &= ~D3DLOCK_READONLY;
|
||||||
|
|
||||||
pResource->SetLockFlags(Subresource, Flags);
|
pResource->SetLockFlags(Subresource, Flags);
|
||||||
|
|
||||||
|
bool renderable = desc.Usage & (D3DUSAGE_RENDERTARGET | D3DUSAGE_DEPTHSTENCIL | D3DUSAGE_AUTOGENMIPMAP);
|
||||||
|
|
||||||
|
// If we are dirty, then we need to copy -> buffer
|
||||||
|
// We are also always dirty if we are a render target,
|
||||||
|
// a depth stencil, or auto generate mipmaps.
|
||||||
|
bool dirty = pResource->SetDirty(Subresource, false) || renderable;
|
||||||
|
|
||||||
DxvkBufferSliceHandle physSlice;
|
DxvkBufferSliceHandle physSlice;
|
||||||
|
|
||||||
@ -3856,7 +3863,6 @@ namespace dxvk {
|
|||||||
// or is reading. Remember! This will only trigger for MANAGED resources
|
// or is reading. Remember! This will only trigger for MANAGED resources
|
||||||
// that cannot get affected by GPU, therefore readonly is A-OK for NOT waiting.
|
// that cannot get affected by GPU, therefore readonly is A-OK for NOT waiting.
|
||||||
const bool readOnly = Flags & D3DLOCK_READONLY;
|
const bool readOnly = Flags & D3DLOCK_READONLY;
|
||||||
const bool dirty = pResource->SetDirty(Subresource, false);
|
|
||||||
const bool skipWait = (readOnly && managed) || scratch || (readOnly && systemmem && !dirty);
|
const bool skipWait = (readOnly && managed) || scratch || (readOnly && systemmem && !dirty);
|
||||||
|
|
||||||
if (alloced)
|
if (alloced)
|
||||||
@ -3867,13 +3873,6 @@ namespace dxvk {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
bool renderable = desc.Usage & (D3DUSAGE_RENDERTARGET | D3DUSAGE_DEPTHSTENCIL | D3DUSAGE_AUTOGENMIPMAP);
|
|
||||||
|
|
||||||
// If we are dirty, then we need to copy -> buffer
|
|
||||||
// We are also always dirty if we are a render target,
|
|
||||||
// a depth stencil, or auto generate mipmaps.
|
|
||||||
bool dirty = pResource->SetDirty(Subresource, false) || renderable;
|
|
||||||
|
|
||||||
if (unlikely(dirty)) {
|
if (unlikely(dirty)) {
|
||||||
Rc<DxvkImage> resourceImage = pResource->GetImage();
|
Rc<DxvkImage> resourceImage = pResource->GetImage();
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user