mirror of
https://github.com/EduApps-CDG/OpenDX
synced 2024-12-30 09:45:37 +01:00
[dxgi] Add emulateUMA option
Some games think we are on Intel given a lack of NVAPI or AGS/atiadlxx support. Report our device memory as shared memory, and some small amount for a "carveout".
This commit is contained in:
parent
fe0dc2d579
commit
15e0594ec4
@ -58,6 +58,15 @@
|
|||||||
# dxgi.maxSharedMemory = 0
|
# dxgi.maxSharedMemory = 0
|
||||||
|
|
||||||
|
|
||||||
|
# Some games think we are on Intel given a lack of NVAPI or
|
||||||
|
# AGS/atiadlxx support. Report our device memory as shared memory,
|
||||||
|
# and some small amount for a "carveout".
|
||||||
|
|
||||||
|
# Supported values: True, False
|
||||||
|
|
||||||
|
# dxgi.emulateUMA = False
|
||||||
|
|
||||||
|
|
||||||
# Override back buffer count for the Vulkan swap chain.
|
# Override back buffer count for the Vulkan swap chain.
|
||||||
# Setting this to 0 or less will have no effect.
|
# Setting this to 0 or less will have no effect.
|
||||||
#
|
#
|
||||||
|
@ -283,6 +283,15 @@ namespace dxvk {
|
|||||||
else
|
else
|
||||||
sharedMemory += heap.size;
|
sharedMemory += heap.size;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Some games think we are on Intel given a lack of
|
||||||
|
// NVAPI or AGS/atiadlxx support.
|
||||||
|
// Report our device memory as shared memory,
|
||||||
|
// and some small amount for the carveout.
|
||||||
|
if (options->emulateUMA && !m_adapter->isUnifiedMemoryArchitecture()) {
|
||||||
|
sharedMemory = deviceMemory;
|
||||||
|
deviceMemory = 128 * (1 << 20);
|
||||||
|
}
|
||||||
|
|
||||||
// Some games are silly and need their memory limited
|
// Some games are silly and need their memory limited
|
||||||
if (options->maxDeviceMemory > 0
|
if (options->maxDeviceMemory > 0
|
||||||
|
@ -32,6 +32,9 @@ namespace dxvk {
|
|||||||
this->customVendorId = parsePciId(config.getOption<std::string>("dxgi.customVendorId"));
|
this->customVendorId = parsePciId(config.getOption<std::string>("dxgi.customVendorId"));
|
||||||
this->customDeviceId = parsePciId(config.getOption<std::string>("dxgi.customDeviceId"));
|
this->customDeviceId = parsePciId(config.getOption<std::string>("dxgi.customDeviceId"));
|
||||||
this->customDeviceDesc = config.getOption<std::string>("dxgi.customDeviceDesc", "");
|
this->customDeviceDesc = config.getOption<std::string>("dxgi.customDeviceDesc", "");
|
||||||
|
|
||||||
|
// Emulate a UMA device
|
||||||
|
this->emulateUMA = config.getOption<bool>("dxgi.emulateUMA", false);
|
||||||
|
|
||||||
// Interpret the memory limits as Megabytes
|
// Interpret the memory limits as Megabytes
|
||||||
this->maxDeviceMemory = VkDeviceSize(config.getOption<int32_t>("dxgi.maxDeviceMemory", 0)) << 20;
|
this->maxDeviceMemory = VkDeviceSize(config.getOption<int32_t>("dxgi.maxDeviceMemory", 0)) << 20;
|
||||||
|
@ -30,6 +30,9 @@ namespace dxvk {
|
|||||||
VkDeviceSize maxDeviceMemory;
|
VkDeviceSize maxDeviceMemory;
|
||||||
VkDeviceSize maxSharedMemory;
|
VkDeviceSize maxSharedMemory;
|
||||||
|
|
||||||
|
/// Emulate UMA
|
||||||
|
bool emulateUMA;
|
||||||
|
|
||||||
/// Enables nvapi workaround
|
/// Enables nvapi workaround
|
||||||
bool nvapiHack;
|
bool nvapiHack;
|
||||||
};
|
};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user