[dxgi] Fix reported VRAM size for 32-bit builds

This commit is contained in:
Philip Rebohle 2018-05-07 19:04:25 +02:00
parent 3e111086b2
commit 3c611503d6
No known key found for this signature in database
GPG Key ID: C8CC613427A31C99
1 changed files with 8 additions and 0 deletions

View File

@ -155,6 +155,14 @@ namespace dxvk {
sharedMemory += heap.size;
}
#ifndef _WIN64
// The value returned by DXGI is a 32-bit value
// on 32-bit platforms, so we need to clamp it
VkDeviceSize maxMemory = 0xF0000000;
deviceMemory = std::min(deviceMemory, maxMemory);
sharedMemory = std::min(sharedMemory, maxMemory);
#endif
pDesc->VendorId = deviceProp.vendorID;
pDesc->DeviceId = deviceProp.deviceID;
pDesc->SubSysId = 0;