jpeg pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=a4b649ca8ce7dc5e14977d3d4dc46b3c43906941
commit a4b649ca8ce7dc5e14977d3d4dc46b3c43906941 Author: Jean-Philippe Andre <[email protected]> Date: Mon Mar 16 17:19:37 2015 +0900 Evas GL: Fallback to depth24, stencil8 if GL_GLES is used If depth32 or stencil16 are requested, those are most likely to fail with GLES. In that case, fallback automatically to 24+8. --- src/modules/evas/engines/gl_common/evas_gl_core.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/modules/evas/engines/gl_common/evas_gl_core.c b/src/modules/evas/engines/gl_common/evas_gl_core.c index 7b9dee2..80c80fe 100644 --- a/src/modules/evas/engines/gl_common/evas_gl_core.c +++ b/src/modules/evas/engines/gl_common/evas_gl_core.c @@ -1236,6 +1236,7 @@ _internal_config_set(void *eng_data, EVGL_Surface *sfc, Evas_GL_Config *cfg) if (cfg->multisample_bits) msaa_samples = evgl_engine->caps.msaa_samples[cfg->multisample_bits-1]; +try_again: // Run through all the available formats and choose the first match for (i = 0; i < evgl_engine->caps.num_fbo_fmts; ++i) { @@ -1302,11 +1303,19 @@ _internal_config_set(void *eng_data, EVGL_Surface *sfc, Evas_GL_Config *cfg) if (cfg_index < 0) { ERR("Unable to find a matching config format."); - if ((stencil_bit >= 16) || (depth_size >= 32)) + if ((stencil_bit > 8) || (depth_size > 24)) { INF("Please note that Evas GL might not support 32-bit depth or " "16-bit stencil buffers, so depth24, stencil8 are the maximum " "recommended values."); + if (depth_size > 24) + { + depth_bit = 4; // see DEPTH_BIT_24 + depth_size = 24; + } + if (stencil_bit > 8) stencil_bit = 8; // see STENCIL_BIT_8 + DBG("Fallback to depth:%d, stencil:%d", depth_size, stencil_bit); + goto try_again; } return 0; } --
