summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorDongyeon Kim <dy5.kim@samsung.com>2014-06-10 19:20:16 +0900
committerCarsten Haitzler (Rasterman) <raster@rasterman.com>2014-06-10 19:20:17 +0900
commitacc95afbd82f78ff785e538cc2c891bee281654c (patch)
tree38da5f3b558cf52d5b9d271fee13e2d45b63385f /src
parenta03952ca0f53341cee8ac8936e596c2e64d8a266 (diff)
evas gl: distinguish between IMG and EXT MSAA extensions
Summary: For drivers that support IMG_multisampled_render_to_texture, GL_MAX_SAMPLES_IMG should be used to query max supported samples Likewise, for drivers that support EXT_multisampled_render_to_texture, GL_MAX_SAMPLES_EXT should be used to query max supported samples @fix Reviewers: seoz, Hermet, raster, cedric Reviewed By: cedric CC: cedric Differential Revision: https://phab.enlightenment.org/D948
Diffstat (limited to 'src')
-rw-r--r--src/lib/evas/Evas_GL.h6
-rw-r--r--src/modules/evas/engines/gl_common/evas_gl_api_ext_def.h8
-rw-r--r--src/modules/evas/engines/gl_common/evas_gl_common.h3
-rw-r--r--src/modules/evas/engines/gl_common/evas_gl_core.c20
4 files changed, 29 insertions, 8 deletions
diff --git a/src/lib/evas/Evas_GL.h b/src/lib/evas/Evas_GL.h
index 91ba179ef6..6249d54084 100644
--- a/src/lib/evas/Evas_GL.h
+++ b/src/lib/evas/Evas_GL.h
@@ -1194,6 +1194,12 @@ typedef signed long int GLsizeiptr; // Changed khronos_ssize_t
1194/* GL_EXT_texture_type_2_10_10_10_REV */ 1194/* GL_EXT_texture_type_2_10_10_10_REV */
1195#define GL_UNSIGNED_INT_2_10_10_10_REV_EXT 0x8368 1195#define GL_UNSIGNED_INT_2_10_10_10_REV_EXT 0x8368
1196 1196
1197/* GL_EXT_multisampled_render_to_texture */
1198#define GL_RENDERBUFFER_SAMPLES_EXT 0x8CAB
1199#define GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE_EXT 0x8D56
1200#define GL_MAX_SAMPLES_EXT 0x8D57
1201#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_SAMPLES_EXT 0x8D6C
1202
1197/*------------------------------------------------------------------------* 1203/*------------------------------------------------------------------------*
1198 * IMG extension tokens 1204 * IMG extension tokens
1199 *------------------------------------------------------------------------*/ 1205 *------------------------------------------------------------------------*/
diff --git a/src/modules/evas/engines/gl_common/evas_gl_api_ext_def.h b/src/modules/evas/engines/gl_common/evas_gl_api_ext_def.h
index a80f518e4b..9a81a8cf92 100644
--- a/src/modules/evas/engines/gl_common/evas_gl_api_ext_def.h
+++ b/src/modules/evas/engines/gl_common/evas_gl_api_ext_def.h
@@ -264,6 +264,14 @@ _EVASGL_EXT_BEGIN(QCOM_extended_get2)
264 _EVASGL_EXT_FUNCTION_END() 264 _EVASGL_EXT_FUNCTION_END()
265_EVASGL_EXT_END() 265_EVASGL_EXT_END()
266 266
267_EVASGL_EXT_BEGIN(IMG_multisampled_render_to_texture)
268 _EVASGL_EXT_DRVNAME(GL_IMG_multisampled_render_to_texture)
269_EVASGL_EXT_END()
270
271_EVASGL_EXT_BEGIN(EXT_multisampled_render_to_texture)
272 _EVASGL_EXT_DRVNAME(GL_EXT_multisampled_render_to_texture)
273_EVASGL_EXT_END()
274
267_EVASGL_EXT_BEGIN(multisampled_render_to_texture) 275_EVASGL_EXT_BEGIN(multisampled_render_to_texture)
268 _EVASGL_EXT_DRVNAME(GL_IMG_multisampled_render_to_texture) 276 _EVASGL_EXT_DRVNAME(GL_IMG_multisampled_render_to_texture)
269 _EVASGL_EXT_DRVNAME(GL_EXT_multisampled_render_to_texture) 277 _EVASGL_EXT_DRVNAME(GL_EXT_multisampled_render_to_texture)
diff --git a/src/modules/evas/engines/gl_common/evas_gl_common.h b/src/modules/evas/engines/gl_common/evas_gl_common.h
index e206af5f55..917c86faf6 100644
--- a/src/modules/evas/engines/gl_common/evas_gl_common.h
+++ b/src/modules/evas/engines/gl_common/evas_gl_common.h
@@ -190,6 +190,9 @@
190#ifndef GL_MAX_SAMPLES_IMG 190#ifndef GL_MAX_SAMPLES_IMG
191#define GL_MAX_SAMPLES_IMG 0x9135 191#define GL_MAX_SAMPLES_IMG 0x9135
192#endif 192#endif
193#ifndef GL_MAX_SAMPLES_EXT
194#define GL_MAX_SAMPLES_EXT 0x8D57
195#endif
193#ifndef GL_WRITE_ONLY 196#ifndef GL_WRITE_ONLY
194#define GL_WRITE_ONLY 0x88B9 197#define GL_WRITE_ONLY 0x88B9
195#endif 198#endif
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 f8e703723a..6aada80ba0 100644
--- a/src/modules/evas/engines/gl_common/evas_gl_core.c
+++ b/src/modules/evas/engines/gl_common/evas_gl_core.c
@@ -657,17 +657,21 @@ _surface_cap_init(void *eng_data)
657#ifdef GL_GLES 657#ifdef GL_GLES
658 int max_samples = 0; 658 int max_samples = 0;
659 659
660 if (EXTENSION_SUPPORT(multisampled_render_to_texture)) 660 if (EXTENSION_SUPPORT(IMG_multisampled_render_to_texture))
661 { 661 {
662 glGetIntegerv(GL_MAX_SAMPLES_IMG, &max_samples); 662 glGetIntegerv(GL_MAX_SAMPLES_IMG, &max_samples);
663 }
664 else if (EXTENSION_SUPPORT(EXT_multisampled_render_to_texture))
665 {
666 glGetIntegerv(GL_MAX_SAMPLES_EXT, &max_samples);
667 }
663 668
664 if (max_samples >= 2) 669 if (max_samples >= 2)
665 { 670 {
666 evgl_engine->caps.msaa_samples[0] = 2; 671 evgl_engine->caps.msaa_samples[0] = 2;
667 evgl_engine->caps.msaa_samples[1] = (max_samples>>1) < 2 ? 2 : (max_samples>>1); 672 evgl_engine->caps.msaa_samples[1] = (max_samples>>1) < 2 ? 2 : (max_samples>>1);
668 evgl_engine->caps.msaa_samples[2] = max_samples; 673 evgl_engine->caps.msaa_samples[2] = max_samples;
669 evgl_engine->caps.msaa_supported = 1; 674 evgl_engine->caps.msaa_supported = 1;
670 }
671 } 675 }
672#endif 676#endif
673 677