From 562f46bad3c0e890ae4654592e250312ce3a17ae Mon Sep 17 00:00:00 2001 From: Daekwang Ryu Date: Thu, 23 Feb 2017 13:41:08 +0900 Subject: [PATCH] evas gl: Partially fix MSAA for GLES 3 drivers MSAA (multisampled_render_to_texture) support was implemented with GLES 2 in mind, but for GLES 3 it comes as a core feature, not as an extension. Also it relies on renderbuffers, not textures. GL is awesome. Note: MSAA still doesn't work! Change-Id: I51d1588d2bdae49af31802735c0bd29fcb7acc1f --- src/modules/evas/engines/gl_common/evas_gl_core.c | 10 +++++++++- 1 file changed, 9 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 811688a..6745847 100644 --- a/src/modules/evas/engines/gl_common/evas_gl_core.c +++ b/src/modules/evas/engines/gl_common/evas_gl_core.c @@ -1542,7 +1542,8 @@ try_again: if (cfg_index < 0) { - ERR("Unable to find a matching config format."); + ERR("Unable to find a matching config format (depth:%d, stencil:%d, msaa:%d)", + depth_size, stencil_bit, msaa_samples); if ((stencil_bit > 8) || (depth_size > 24)) { INF("Please note that Evas GL might not support 32-bit depth or " @@ -1557,6 +1558,13 @@ try_again: DBG("Fallback to depth:%d, stencil:%d", depth_size, stencil_bit); goto try_again; } + else if (msaa_samples > 0) + { + msaa_samples /= 2; + if (msaa_samples == 1) msaa_samples = 0; + DBG("Fallback to msaa:%d", msaa_samples); + goto try_again; + } return 0; } else -- 2.7.4