i965: Complete 'expose RGBA visuals only on Android'

Commit 731ba6924a
"expose RGBA visuals only on Android" replaced
ARRAY_SIZE(formats) by num_formats, but there are
3 loops which add configs, and only one was updated
to num_formats.

Also update loops for configs with accumulation buffer
and multisample configs.

Fixes: 731ba6924a "i965: expose RGBA visuals only on Android"
Signed-off-by: Mario Kleiner <mario.kleiner.de@gmail.com>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
This commit is contained in:
Mario Kleiner
2017-10-06 18:11:31 +02:00
committed by Emil Velikov
parent df3a430180
commit 556037f131
+2 -2
View File
@@ -1977,7 +1977,7 @@ intel_screen_make_configs(__DRIscreen *dri_screen)
/* Generate the minimum possible set of configs that include an
* accumulation buffer.
*/
for (unsigned i = 0; i < ARRAY_SIZE(formats); i++) {
for (unsigned i = 0; i < num_formats; i++) {
__DRIconfig **new_configs;
if (formats[i] == MESA_FORMAT_B5G6R5_UNORM) {
@@ -2009,7 +2009,7 @@ intel_screen_make_configs(__DRIscreen *dri_screen)
* supported. Singlebuffer configs are not supported because no one wants
* them.
*/
for (unsigned i = 0; i < ARRAY_SIZE(formats); i++) {
for (unsigned i = 0; i < num_formats; i++) {
if (devinfo->gen < 6)
break;