mirror of
https://github.com/doitsujin/dxvk.git
synced 2025-03-15 16:29:16 +01:00
[dxgi] Add option for deferred surface creation
Deferred surface creation is required for Frostpunk due to conflicts with the D3D9 swap chain created by the game before it presents the first frame to the DXGI swap chain, but breaks NieR:Automata due to threading issues.
This commit is contained in:
parent
f087016e77
commit
d844ddfdfa
@ -14,6 +14,13 @@ namespace dxvk {
|
||||
m_device (device),
|
||||
m_context (device->createContext()) {
|
||||
|
||||
// Some games don't work with deferred surface creation,
|
||||
// so we should default to initializing it immediately.
|
||||
DxgiOptions dxgiOptions = getDxgiAppOptions(env::getExeName());
|
||||
|
||||
if (!dxgiOptions.test(DxgiOption::DeferSurfaceCreation))
|
||||
m_surface = CreateSurface();
|
||||
|
||||
// Reset options for the swap chain itself. We will
|
||||
// create a swap chain object before presentation.
|
||||
m_options.preferredSurfaceFormat = { VK_FORMAT_UNDEFINED, VK_COLOR_SPACE_SRGB_NONLINEAR_KHR };
|
||||
|
@ -8,7 +8,7 @@
|
||||
|
||||
#include "../spirv/spirv_module.h"
|
||||
|
||||
#include "dxgi_include.h"
|
||||
#include "dxgi_options.h"
|
||||
|
||||
namespace dxvk {
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user