mirror of
https://github.com/doitsujin/dxvk.git
synced 2024-11-29 19:24:10 +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
66db3e8714
commit
23ba3e228a
@ -14,6 +14,13 @@ namespace dxvk {
|
|||||||
m_device (device),
|
m_device (device),
|
||||||
m_context (device->createContext()) {
|
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
|
// Reset options for the swap chain itself. We will
|
||||||
// create a swap chain object before presentation.
|
// create a swap chain object before presentation.
|
||||||
m_options.preferredSurfaceFormat = { VK_FORMAT_UNDEFINED, VK_COLOR_SPACE_SRGB_NONLINEAR_KHR };
|
m_options.preferredSurfaceFormat = { VK_FORMAT_UNDEFINED, VK_COLOR_SPACE_SRGB_NONLINEAR_KHR };
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
|
|
||||||
#include "../spirv/spirv_module.h"
|
#include "../spirv/spirv_module.h"
|
||||||
|
|
||||||
#include "dxgi_include.h"
|
#include "dxgi_options.h"
|
||||||
|
|
||||||
namespace dxvk {
|
namespace dxvk {
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user