소스 검색

Add 'AMD' GPU vendor name to PRIME detector

Apparently some recent Mesa version also changed AMD's vendor string. In
addition I found a small uninitialized variable that's corrected now.
Hein-Pieter van Braam-Stewart 4 년 전
부모
커밋
92687b4544
1개의 변경된 파일2개의 추가작업 그리고 1개의 파일을 삭제
  1. 2 1
      platform/x11/detect_prime.cpp

+ 2 - 1
platform/x11/detect_prime.cpp

@@ -61,6 +61,7 @@ struct vendor {
 
 vendor vendormap[] = {
 	{ "Advanced Micro Devices, Inc.", 30 },
+	{ "AMD", 30 },
 	{ "NVIDIA Corporation", 30 },
 	{ "X.Org", 30 },
 	{ "Intel Open Source Technology Center", 20 },
@@ -128,7 +129,7 @@ void create_context() {
 
 int detect_prime() {
 	pid_t p;
-	int priorities[2];
+	int priorities[2] = {};
 	String vendors[2];
 	String renderers[2];