}
} else {
if (type == EGL_PBUFFER_BIT) {
- dri2_surf->depth = _eglGetConfigKey(conf, EGL_BUFFER_SIZE);
+ dri2_surf->depth = conf->BufferSize;
}
swrastCreateDrawable(dri2_dpy, dri2_surf);
}
if (dri2_conf->base.ConfigID == config_count + 1)
config_count++;
- /* Allows RGB visuals to match a 32-bit RGBA EGLConfig.
+ /* Allow a 24-bit RGB visual to match a 32-bit RGBA EGLConfig.
+ * Ditto for 30-bit RGB visuals to match a 32-bit RGBA EGLConfig.
* Otherwise it will only match a 32-bit RGBA visual. On a
* composited window manager on X11, this will make all of the
* EGLConfigs with destination alpha get blended by the
* compositor. This is probably not what the application
* wants... especially on drivers that only have 32-bit RGBA
* EGLConfigs! */
- unsigned int rgba_mask = ~(visuals[i].red_mask |
- visuals[i].green_mask |
- visuals[i].blue_mask);
- rgba_shifts[3] = ffs(rgba_mask) - 1;
- rgba_sizes[3] = util_bitcount(rgba_mask);
- dri2_conf = dri2_add_config(disp, config, config_count + 1,
- surface_type, config_attrs,
- rgba_shifts, rgba_sizes);
- if (dri2_conf) {
- if (dri2_conf->base.ConfigID == config_count + 1)
- config_count++;
-
- /* Put RGBA visuals in the second ConfigSelectGroup so that they
- * have lower priority. Applications probably don't want the
- * compositor to alpha-blend their windows.
- */
- if (d.data->depth != 24 && d.data->depth != 30)
- ++dri2_conf->base.ConfigSelectGroup;
+ if (d.data->depth == 24 || d.data->depth == 30) {
+ unsigned int rgba_mask = ~(visuals[i].red_mask |
+ visuals[i].green_mask |
+ visuals[i].blue_mask);
+ rgba_shifts[3] = ffs(rgba_mask) - 1;
+ rgba_sizes[3] = util_bitcount(rgba_mask);
+ dri2_conf = dri2_add_config(disp, config, config_count + 1,
+ surface_type, config_attrs,
+ rgba_shifts, rgba_sizes);
+ if (dri2_conf)
+ if (dri2_conf->base.ConfigID == config_count + 1)
+ config_count++;
}
- }
+ }
}
xcb_depth_next(&d);
.destroy_surface = dri2_x11_destroy_surface,
.create_image = dri2_create_image_khr,
.swap_buffers = dri2_x11_swap_buffers,
- .swap_buffers_region = dri2_fallback_swap_buffers_region,
- .post_sub_buffer = dri2_fallback_post_sub_buffer,
/* XXX: should really implement this since X11 has pixmaps */
- .copy_buffers = dri2_fallback_copy_buffers,
- .query_buffer_age = dri2_fallback_query_buffer_age,
.query_surface = dri2_query_surface,
- .create_wayland_buffer_from_image = dri2_fallback_create_wayland_buffer_from_image,
- .get_sync_values = dri2_fallback_get_sync_values,
.get_dri_drawable = dri2_surface_get_dri_drawable,
};
.create_image = dri2_x11_create_image_khr,
.swap_interval = dri2_x11_swap_interval,
.swap_buffers = dri2_x11_swap_buffers,
- .swap_buffers_with_damage = dri2_fallback_swap_buffers_with_damage,
.swap_buffers_region = dri2_x11_swap_buffers_region,
.post_sub_buffer = dri2_x11_post_sub_buffer,
.copy_buffers = dri2_x11_copy_buffers,
- .query_buffer_age = dri2_fallback_query_buffer_age,
.query_surface = dri2_query_surface,
- .create_wayland_buffer_from_image = dri2_fallback_create_wayland_buffer_from_image,
.get_sync_values = dri2_x11_get_sync_values,
.get_dri_drawable = dri2_surface_get_dri_drawable,
};