mirror of
https://github.com/EduApps-CDG/OpenDX
synced 2024-12-30 09:45:37 +01:00
[d3d9] Move auto depth stencil creation to after swapchain creation
If the app specifies w == 0 and/or h == 0 then this will be filled in by then in the presentation params. Impacts #1278
This commit is contained in:
parent
009e772fe8
commit
784abe5cf4
@ -6469,6 +6469,11 @@ namespace dxvk {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (auto* implicitSwapchain = GetInternalSwapchain(0))
|
||||||
|
implicitSwapchain->Reset(pPresentationParameters, pFullscreenDisplayMode);
|
||||||
|
else
|
||||||
|
m_swapchains.emplace_back(new D3D9SwapChainEx(this, pPresentationParameters, pFullscreenDisplayMode));
|
||||||
|
|
||||||
if (pPresentationParameters->EnableAutoDepthStencil) {
|
if (pPresentationParameters->EnableAutoDepthStencil) {
|
||||||
D3D9_COMMON_TEXTURE_DESC desc;
|
D3D9_COMMON_TEXTURE_DESC desc;
|
||||||
desc.Width = pPresentationParameters->BackBufferWidth;
|
desc.Width = pPresentationParameters->BackBufferWidth;
|
||||||
@ -6492,11 +6497,6 @@ namespace dxvk {
|
|||||||
SetDepthStencilSurface(m_autoDepthStencil.ptr());
|
SetDepthStencilSurface(m_autoDepthStencil.ptr());
|
||||||
}
|
}
|
||||||
|
|
||||||
if (auto* implicitSwapchain = GetInternalSwapchain(0))
|
|
||||||
implicitSwapchain->Reset(pPresentationParameters, pFullscreenDisplayMode);
|
|
||||||
else
|
|
||||||
m_swapchains.emplace_back(new D3D9SwapChainEx(this, pPresentationParameters, pFullscreenDisplayMode));
|
|
||||||
|
|
||||||
SetRenderTarget(0, GetInternalSwapchain(0)->GetBackBuffer(0));
|
SetRenderTarget(0, GetInternalSwapchain(0)->GetBackBuffer(0));
|
||||||
|
|
||||||
// Force this if we end up binding the same RT to make scissor change go into effect.
|
// Force this if we end up binding the same RT to make scissor change go into effect.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user