Commit 64ece363 authored by Joshua Ashton's avatar Joshua Ashton 🐸

[d3d9] Implement d3d9.forceSwapchainMSAA

Works good enough for some titles like Vampire The Masquerade: Bloodlines.
parent 3ebd4b28
Pipeline #996 passed with stage
in 4 minutes and 54 seconds
......@@ -289,3 +289,9 @@
# d3d9.enableDialogMode = False
# Overrides the application's MSAA level on the swapchain
#
# Supported values: -1 (application) and 0 to 16 (user override)
# d3d9.forceSwapchainMSAA = -1
......@@ -62,6 +62,7 @@ namespace dxvk {
this->supportVCache = config.getOption<bool> ("d3d9.supportVCache", vendorId == 0x10de);
this->enableDialogMode = config.getOption<bool> ("d3d9.enableDialogMode", false);
this->forceSamplerTypeSpecConstants = config.getOption<bool> ("d3d9.forceSamplerTypeSpecConstants", false);
this->forceSwapchainMSAA = config.getOption<int32_t> ("d3d9.forceSwapchainMSAA", -1);
this->forceAspectRatio = config.getOption<std::string>("d3d9.forceAspectRatio", "");
......
......@@ -116,6 +116,9 @@ namespace dxvk {
/// Always use a spec constant to determine sampler type (instead of just in PS 1.x)
/// Works around a game bug in Halo CE where it gives cube textures to 2d/volume samplers
bool forceSamplerTypeSpecConstants;
/// Forces an MSAA level on the swapchain
int32_t forceSwapchainMSAA;
};
}
\ No newline at end of file
......@@ -417,6 +417,12 @@ namespace dxvk {
pPresentParams->BackBufferCount = std::max(pPresentParams->BackBufferCount, 1u);
const int32_t forcedMSAA = m_parent->GetOptions()->forceSwapchainMSAA;
if (forcedMSAA != -1) {
pPresentParams->MultiSampleType = D3DMULTISAMPLE_TYPE(forcedMSAA);
pPresentParams->MultiSampleQuality = 0;
}
if (pPresentParams->Windowed) {
GetWindowClientSize(pPresentParams->hDeviceWindow,
pPresentParams->BackBufferWidth ? nullptr : &pPresentParams->BackBufferWidth,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment