mirror of
https://github.com/EduApps-CDG/OpenDX
synced 2024-12-30 09:45:37 +01:00
[d3d9] Cleanup options code
This commit is contained in:
parent
c7bebe8267
commit
6bb271b299
@ -35,7 +35,9 @@ namespace dxvk {
|
|||||||
this->customDeviceId = parsePciId(config.getOption<std::string>("d3d9.customDeviceId"));
|
this->customDeviceId = parsePciId(config.getOption<std::string>("d3d9.customDeviceId"));
|
||||||
this->customDeviceDesc = config.getOption<std::string>("d3d9.customDeviceDesc");
|
this->customDeviceDesc = config.getOption<std::string>("d3d9.customDeviceDesc");
|
||||||
|
|
||||||
const int32_t vendorId = this->customDeviceId != -1 ? this->customDeviceId : (adapter != nullptr ? adapter->deviceProperties().vendorID : 0);
|
const int32_t vendorId = this->customDeviceId != -1
|
||||||
|
? this->customDeviceId
|
||||||
|
: (adapter != nullptr ? adapter->deviceProperties().vendorID : 0);
|
||||||
|
|
||||||
this->maxFrameLatency = config.getOption<int32_t> ("d3d9.maxFrameLatency", 0);
|
this->maxFrameLatency = config.getOption<int32_t> ("d3d9.maxFrameLatency", 0);
|
||||||
this->presentInterval = config.getOption<int32_t> ("d3d9.presentInterval", -1);
|
this->presentInterval = config.getOption<int32_t> ("d3d9.presentInterval", -1);
|
||||||
@ -64,26 +66,26 @@ namespace dxvk {
|
|||||||
this->enableDialogMode = config.getOption<bool> ("d3d9.enableDialogMode", false);
|
this->enableDialogMode = config.getOption<bool> ("d3d9.enableDialogMode", false);
|
||||||
this->forceSamplerTypeSpecConstants = config.getOption<bool> ("d3d9.forceSamplerTypeSpecConstants", false);
|
this->forceSamplerTypeSpecConstants = config.getOption<bool> ("d3d9.forceSamplerTypeSpecConstants", false);
|
||||||
this->forceSwapchainMSAA = config.getOption<int32_t> ("d3d9.forceSwapchainMSAA", -1);
|
this->forceSwapchainMSAA = config.getOption<int32_t> ("d3d9.forceSwapchainMSAA", -1);
|
||||||
|
this->forceAspectRatio = config.getOption<std::string> ("d3d9.forceAspectRatio", "");
|
||||||
this->forceAspectRatio = config.getOption<std::string>("d3d9.forceAspectRatio", "");
|
|
||||||
this->allowDoNotWait = config.getOption<bool> ("d3d9.allowDoNotWait", true);
|
this->allowDoNotWait = config.getOption<bool> ("d3d9.allowDoNotWait", true);
|
||||||
this->allowDiscard = config.getOption<bool> ("d3d9.allowDiscard", true);
|
this->allowDiscard = config.getOption<bool> ("d3d9.allowDiscard", true);
|
||||||
this->enumerateByDisplays = config.getOption<bool> ("d3d9.enumerateByDisplays", true);
|
this->enumerateByDisplays = config.getOption<bool> ("d3d9.enumerateByDisplays", true);
|
||||||
this->longMad = config.getOption<bool> ("d3d9.longMad", false);
|
this->longMad = config.getOption<bool> ("d3d9.longMad", false);
|
||||||
this->tearFree = config.getOption<Tristate> ("d3d9.tearFree", Tristate::Auto);
|
this->tearFree = config.getOption<Tristate> ("d3d9.tearFree", Tristate::Auto);
|
||||||
this->alphaTestWiggleRoom = config.getOption<bool> ("d3d9.alphaTestWiggleRoom", false);
|
this->alphaTestWiggleRoom = config.getOption<bool> ("d3d9.alphaTestWiggleRoom", false);
|
||||||
|
this->apitraceMode = config.getOption<bool> ("d3d9.apitraceMode", false);
|
||||||
this->apitraceMode = config.getOption<bool>("d3d9.apitraceMode", false);
|
this->deviceLocalConstantBuffers = config.getOption<bool> ("d3d9.deviceLocalConstantBuffers", false);
|
||||||
|
this->allowImplicitDiscard = config.getOption<bool> ("d3d9.allowImplicitDiscard", true);
|
||||||
this->deviceLocalConstantBuffers = config.getOption<bool>("d3d9.deviceLocalConstantBuffers", false);
|
|
||||||
this->allowImplicitDiscard = config.getOption<bool>("d3d9.allowImplicitDiscard", true);
|
|
||||||
|
|
||||||
// If we are not Nvidia, enable general hazards.
|
// If we are not Nvidia, enable general hazards.
|
||||||
this->generalHazards = adapter == nullptr || !adapter->matchesDriver(DxvkGpuVendor::Nvidia, VK_DRIVER_ID_NVIDIA_PROPRIETARY_KHR, 0, 0);
|
this->generalHazards = adapter != nullptr
|
||||||
|
&& !adapter->matchesDriver(
|
||||||
|
DxvkGpuVendor::Nvidia,
|
||||||
|
VK_DRIVER_ID_NVIDIA_PROPRIETARY_KHR,
|
||||||
|
0, 0);
|
||||||
applyTristate(this->generalHazards, config.getOption<Tristate>("d3d9.generalHazards", Tristate::Auto));
|
applyTristate(this->generalHazards, config.getOption<Tristate>("d3d9.generalHazards", Tristate::Auto));
|
||||||
|
|
||||||
this->d3d9FloatEmulation = true; // <-- Future Extension?
|
this->d3d9FloatEmulation = true; // <-- Future Extension?
|
||||||
|
|
||||||
applyTristate(this->d3d9FloatEmulation, config.getOption<Tristate>("d3d9.floatEmulation", Tristate::Auto));
|
applyTristate(this->d3d9FloatEmulation, config.getOption<Tristate>("d3d9.floatEmulation", Tristate::Auto));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user