1
0
mirror of https://github.com/doitsujin/dxvk.git synced 2024-11-29 19:24:10 +01:00

[dxgi] Remove unused presenter options

This commit is contained in:
Philip Rebohle 2018-10-23 11:09:24 +02:00
parent 3b5b20ca3f
commit 86e6477e80
No known key found for this signature in database
GPG Key ID: C8CC613427A31C99
5 changed files with 11 additions and 26 deletions

View File

@ -13,7 +13,7 @@ namespace dxvk {
this->deferSurfaceCreation = config.getOption<bool>("dxgi.deferSurfaceCreation", false);
this->numBackBuffers = config.getOption<int32_t>("dxgi.numBackBuffers", 0);
this->syncInterval = config.getOption<int32_t>("dxgi.syncInterval", -1);
this->syncMode = DxgiSyncMode(config.getOption<int32_t>("dxgi.syncMode", 0));
this->syncMode = D3D11SwapChainSyncMode(config.getOption<int32_t>("dxgi.syncMode", 0));
}
}

View File

@ -8,6 +8,14 @@
namespace dxvk {
/**
* \brief Sync mode
*/
enum class D3D11SwapChainSyncMode : int32_t {
Default = 0,
Mailbox = 1,
};
struct D3D11Options {
D3D11Options(const Config& config);
/// Handle D3D11_MAP_FLAG_DO_NOT_WAIT properly.
@ -60,7 +68,7 @@ namespace dxvk {
bool deferSurfaceCreation;
/// Vsync mode
DxgiSyncMode syncMode;
D3D11SwapChainSyncMode syncMode;
};
}

View File

@ -625,7 +625,7 @@ namespace dxvk {
size_t n = 0;
if (m_vsync) {
if (options->syncMode == DxgiSyncMode::Mailbox)
if (options->syncMode == D3D11SwapChainSyncMode::Mailbox)
modes[n++] = VK_PRESENT_MODE_MAILBOX_KHR;
modes[n++] = VK_PRESENT_MODE_FIFO_KHR;
} else {

View File

@ -39,10 +39,6 @@ namespace dxvk {
this->maxDeviceMemory = VkDeviceSize(config.getOption<int32_t>("dxgi.maxDeviceMemory", 0)) << 20;
this->maxSharedMemory = VkDeviceSize(config.getOption<int32_t>("dxgi.maxSharedMemory", 0)) << 20;
this->numBackBuffers = config.getOption<int32_t>("dxgi.numBackBuffers", 0);
this->syncInterval = config.getOption<int32_t>("dxgi.syncInterval", -1);
this->syncMode = DxgiSyncMode(config.getOption<int32_t>("dxgi.syncMode", 0));
this->d3d10Enable = config.getOption<bool>("d3d10.enable", true);
}

View File

@ -8,14 +8,6 @@
namespace dxvk {
/**
* \brief Sync mode
*/
enum class DxgiSyncMode : int32_t {
Default = 0,
Mailbox = 1,
};
/**
* \brief DXGI options
*
@ -46,17 +38,6 @@ namespace dxvk {
VkDeviceSize maxDeviceMemory;
VkDeviceSize maxSharedMemory;
/// Back buffer count for the Vulkan swap chain.
/// Overrides DXGI_SWAP_CHAIN_DESC::BufferCount.
int32_t numBackBuffers;
/// Sync interval. Overrides the value
/// passed to IDXGISwapChain::Present.
int32_t syncInterval;
/// Vsync mode
DxgiSyncMode syncMode;
/// Enables D3D10 support
bool d3d10Enable;
};