mirror of
https://github.com/doitsujin/dxvk.git
synced 2025-01-18 02:52:10 +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
|
||||
|
||||
|
||||
# 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.
|
||||
# Setting this to 0 or less will have no effect.
|
||||
#
|
||||
|
@ -283,6 +283,15 @@ namespace dxvk {
|
||||
else
|
||||
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
|
||||
if (options->maxDeviceMemory > 0
|
||||
|
@ -32,6 +32,9 @@ namespace dxvk {
|
||||
this->customVendorId = parsePciId(config.getOption<std::string>("dxgi.customVendorId"));
|
||||
this->customDeviceId = parsePciId(config.getOption<std::string>("dxgi.customDeviceId"));
|
||||
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
|
||||
this->maxDeviceMemory = VkDeviceSize(config.getOption<int32_t>("dxgi.maxDeviceMemory", 0)) << 20;
|
||||
|
@ -30,6 +30,9 @@ namespace dxvk {
|
||||
VkDeviceSize maxDeviceMemory;
|
||||
VkDeviceSize maxSharedMemory;
|
||||
|
||||
/// Emulate UMA
|
||||
bool emulateUMA;
|
||||
|
||||
/// Enables nvapi workaround
|
||||
bool nvapiHack;
|
||||
};
|
||||
|
Loading…
x
Reference in New Issue
Block a user