mirror of
https://github.com/doitsujin/dxvk.git
synced 2024-12-02 01:24:11 +01:00
[d3d9] Rotate swap chain back buffers
Restores functionality removed in 81c3daa3d0
.
This commit is contained in:
parent
6a6af16195
commit
582b06a706
@ -111,6 +111,14 @@ namespace dxvk {
|
||||
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:
|
||||
|
||||
IDirect3DBaseTexture9* m_container;
|
||||
|
@ -739,6 +739,13 @@ namespace dxvk {
|
||||
|
||||
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…
Reference in New Issue
Block a user