From e44a1e614bbb2a51dfce7704e82cd2a57641bb4e Mon Sep 17 00:00:00 2001 From: DadSchoorse <49841484+DadSchoorse@users.noreply.github.com> Date: Wed, 3 Mar 2021 21:25:45 +0100 Subject: [PATCH] [dxvk] preserve order of devices with the same type --- src/dxvk/dxvk_instance.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/dxvk/dxvk_instance.cpp b/src/dxvk/dxvk_instance.cpp index c1539f48..acc132f5 100644 --- a/src/dxvk/dxvk_instance.cpp +++ b/src/dxvk/dxvk_instance.cpp @@ -167,7 +167,7 @@ namespace dxvk { result.push_back(new DxvkAdapter(m_vki, adapters[i])); } - std::sort(result.begin(), result.end(), + std::stable_sort(result.begin(), result.end(), [] (const Rc& a, const Rc& b) -> bool { static const std::array deviceTypes = {{ VK_PHYSICAL_DEVICE_TYPE_DISCRETE_GPU,