mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2026-11-18 03:54:30 +01:00
renderer_vulkan: do not auto-select a software rendering device (#4904)
This commit is contained in:
1 parent
2651debdd0
commit
012a15d4ff
1 file changed
+8
@@ -130,6 +130,14 @@ Instance::Instance(Frontend::WindowSDL& window, s32 physical_device_index,
|
||||
return left_is_discrete;
|
||||
}
|
||||
|
||||
// Software renderers advertise system memory as device local, so they
|
||||
// would win the memory comparison below against real hardware.
|
||||
const bool left_is_cpu = left_prop.deviceType == vk::PhysicalDeviceType::eCpu;
|
||||
const bool right_is_cpu = right_prop.deviceType == vk::PhysicalDeviceType::eCpu;
|
||||
if (left_is_cpu != right_is_cpu) {
|
||||
return right_is_cpu;
|
||||
}
|
||||
|
||||
constexpr auto get_mem = [](const vk::PhysicalDeviceMemoryProperties& mem) -> size_t {
|
||||
size_t max = 0;
|
||||
for (u32 i = 0; i < mem.memoryHeapCount; i++) {
|
||||
|
||||
Reference in new issue
Block a user