mirror of
https://github.com/doitsujin/dxvk.git
synced 2025-01-18 11:52:12 +01:00
[d3d9] Implement d3d9.forceSwapchainMSAA
Works good enough for some titles like Vampire The Masquerade: Bloodlines.
This commit is contained in:
parent
3ebd4b28a3
commit
64ece36349
@ -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;
|
||||
};
|
||||
|
||||
}
|
@ -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,
|
||||
|
Loading…
x
Reference in New Issue
Block a user