Browse Source

libobs-d3d11: Don't set GPU priority on Intel adapters

jp9000 6 years ago
parent
commit
b7d094a532
1 changed files with 8 additions and 2 deletions
  1. 8 2
      libobs-d3d11/d3d11-subsystem.cpp

+ 8 - 2
libobs-d3d11/d3d11-subsystem.cpp

@@ -403,6 +403,11 @@ static bool set_priority(ID3D11Device *device)
 	blog(LOG_INFO, "D3D11 GPU priority setup success");
 	return true;
 }
+
+static bool is_intel(const wstring &name)
+{
+	return wstrstri(name.c_str(), L"intel") != nullptr;
+}
 #endif
 
 void gs_device::InitDevice(uint32_t adapterIdx)
@@ -441,8 +446,9 @@ void gs_device::InitDevice(uint32_t adapterIdx)
 
 	/* adjust gpu thread priority */
 #if USE_GPU_PRIORITY
-	if (!set_priority(device)) {
-		blog(LOG_INFO, "D3D11 GPU priority setup failed (not admin?)");
+	if (!is_intel(adapterName) && !set_priority(device)) {
+		blog(LOG_INFO, "D3D11 GPU priority setup "
+			       "failed (not admin?)");
 	}
 #endif