{
struct dri2_egl_surface *dri2_surf = loaderPrivate;
+ images->image_mask = 0;
+
if (update_buffers(dri2_surf) < 0)
return 0;
- if (get_back_bo(dri2_surf) < 0) {
- _eglError(EGL_BAD_PARAMETER, "get_back_bo");
- return 0;
+ if (buffer_mask & __DRI_IMAGE_BUFFER_FRONT) {
+ /*
+ * We don't support front buffers and GLES doesn't require them for
+ * window surfaces, but some DRI drivers will request them anyway.
+ * We just ignore such request as other platforms backends do.
+ */
}
- images->image_mask = __DRI_IMAGE_BUFFER_BACK;
- images->back = dri2_surf->dri_image;
+ if (buffer_mask & __DRI_IMAGE_BUFFER_BACK) {
+ if (get_back_bo(dri2_surf) < 0)
+ return 0;
+
+ images->back = dri2_surf->dri_image;
+ images->image_mask |= __DRI_IMAGE_BUFFER_BACK;
+ }
return 1;
}