mirror of
https://github.com/doitsujin/dxvk.git
synced 2025-02-18 13:54:16 +01:00
[d3d9] Rotate swap chain back buffers
Restores functionality removed in 81c3daa3d068f6a1fd2e8960efa0a109a61ebe78.
This commit is contained in:
parent
6a6af16195
commit
582b06a706
@ -111,6 +111,14 @@ namespace dxvk {
|
|||||||
return m_container;
|
return m_container;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void Swap(D3D9Subresource* Other) {
|
||||||
|
// Only used for swap chain back buffers that don't
|
||||||
|
// have a container and all have identical properties
|
||||||
|
std::swap(m_texture, Other->m_texture);
|
||||||
|
std::swap(m_sampleView, Other->m_sampleView);
|
||||||
|
std::swap(m_renderTargetView, Other->m_renderTargetView);
|
||||||
|
}
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
|
||||||
IDirect3DBaseTexture9* m_container;
|
IDirect3DBaseTexture9* m_container;
|
||||||
|
@ -739,6 +739,13 @@ namespace dxvk {
|
|||||||
|
|
||||||
SubmitPresent(sync, i);
|
SubmitPresent(sync, i);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Rotate swap chain buffers so that the back
|
||||||
|
// buffer at index 0 becomes the front buffer.
|
||||||
|
for (uint32_t i = 1; i < m_backBuffers.size(); i++)
|
||||||
|
m_backBuffers[i]->Swap(m_backBuffers[i - 1].ptr());
|
||||||
|
|
||||||
|
m_parent->m_flags.set(D3D9DeviceFlag::DirtyFramebuffer);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user