Merge changes Ic816b68d,Ie317a680 am: bcbf35a0a5 am: f7740307c8

Original change: https://android-review.googlesource.com/c/platform/external/mesa3d/+/1382357

Change-Id: I8aa93c3ca49253dd2365cda8996048d6a1337a26
diff --git a/src/util/altxmlconfig.c b/src/util/altxmlconfig.c
index bbbc68a..dc6ed034 100644
--- a/src/util/altxmlconfig.c
+++ b/src/util/altxmlconfig.c
@@ -90,6 +90,7 @@
 		{"allow_glsl_builtin_const_expression", DRI_BOOL, NULL, 0},
 		{"allow_glsl_relaxed_es", DRI_BOOL, NULL, 0},
 		{"force_compat_profile", DRI_BOOL, NULL, 0},
+		{"force_gl_vendor", DRI_STRING, NULL, 0 },
 		{"glx_disable_sgi_video_sync", DRI_BOOL, NULL, 0} //,
 };
 
@@ -124,6 +125,7 @@
 		{false}, // allow_glsl_builtin_const_expression
 		{false}, // allow_glsl_relaxed_es
 		{false}, // force_compat_profile
+		{._string = ""}, // force_gl_vendor
 		{false}, // glx_disable_sgi_video_sync
 };
 
@@ -218,7 +220,7 @@
 {
     uint32_t i = findOption (name);
    /* If not found, return default */
-    if (i < ALT_XML_MAX_OPTIONS)
+    if (i == ALT_XML_MAX_OPTIONS)
 	return false;
 
     assert (_cache.info[i].type == DRI_BOOL);
@@ -230,7 +232,7 @@
 {
     uint32_t i = findOption (name);
    /* If not found, return default */
-    if (i < ALT_XML_MAX_OPTIONS)
+    if (i == ALT_XML_MAX_OPTIONS)
 	return 0;
 
     assert (_cache.info[i].type == DRI_ENUM || _cache.info[i].type == DRI_INT);
@@ -242,7 +244,7 @@
 {
     uint32_t i = findOption (name);
     /* If not found, return default */
-    if (i < ALT_XML_MAX_OPTIONS)
+    if (i == ALT_XML_MAX_OPTIONS)
 	return 0.0;
 
     assert (_cache.info[i].type == DRI_FLOAT);
@@ -254,7 +256,7 @@
 {
     uint32_t i = findOption (name);
     /* If not found, return default */
-    if (i < ALT_XML_MAX_OPTIONS)
+    if (i == ALT_XML_MAX_OPTIONS)
 	return NULL;
 
     assert (_cache.info[i].type == DRI_STRING);