continue;
}
+ /*
+ * A bugfix for Tizen's WebKit. When it chooses a config it
+ * doesn't always pass EGL_DEPTH_SIZE, thus, if host GPU has at least
+ * one config without a depth buffer it gets chosen (EGL_DEPTH_SIZE is
+ * 0 by default and has an AtLeast,Smaller sorting rule). But WebKit
+ * WANTS THE DEPTH BUFFER! If someone wants to have a depth buffer
+ * a value greater than zero must be passed with EGL_DEPTH_SIZE,
+ * read the manual goddamit!
+ *
+ * P.S: We just drop all configs with depth_size == 0 and
+ * also with stencil_size == 0, just in case.
+ */
+ if ((native_configs[i].depth_size == 0) ||
+ (native_configs[i].stencil_size == 0)) {
+ dpy->backend_dpy->config_cleanup(dpy->backend_dpy,
+ &native_configs[i]);
+ continue;
+ }
+
configs[*num_configs] = yagl_egl_config_create(dpy, &native_configs[i]);
++*num_configs;
fb->attachment_states[framebuffer_attachment].local_name = 0;
}
- /*
- * Standalone stencil attachments are not supported on modern
- * desktop graphics cards, so we just drop it here. Currently this
- * doesn't do us any harm, but apps in target system that use
- * framebuffers with stencil buffers might not be displayed correctly.
- * If this ever happens we'll have to work around here by create some
- * dummy texture with both color and stencil buffers and copying stencil
- * data from that texture to texture/renderbuffer being attached here.
- */
- if (attachment != GL_STENCIL_ATTACHMENT) {
- fb->driver->FramebufferRenderbuffer(target,
- attachment,
- renderbuffer_target,
- (rb ? rb->global_name : 0));
- }
+ fb->driver->FramebufferRenderbuffer(target,
+ attachment,
+ renderbuffer_target,
+ (rb ? rb->global_name : 0));
return true;
}
fb->attachment_states[framebuffer_attachment].local_name = 0;
}
- if (attachment != GL_STENCIL_ATTACHMENT) {
- fb->driver->FramebufferTexture2D(target,
- attachment,
- textarget,
- (texture ? texture->global_name : 0),
- level);
- }
+ fb->driver->FramebufferTexture2D(target,
+ attachment,
+ textarget,
+ (texture ? texture->global_name : 0),
+ level);
return true;
}