Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Intercept GL_VERSION string request in Evas GL #289

Merged
merged 2 commits into from
May 24, 2022

Conversation

bbrto21
Copy link

@bbrto21 bbrto21 commented May 23, 2022

  • Evas GL's glGetString doesn't handle GL_VERSION string request.
    So it intercepts this request and always returns the 2.1 version string.
  • Downgrade the version of tizen_evas_gl_helper.h to Evas_GL_GLES2.

Signed-off-by: Boram Bae boram21.bae@samsung.com

* Evas GL's glGetString doesn't handle GL_VERSION string request.
  So it intercepts this request and always returns the 2.1 version string.
* Downgrade the version of tizen_evas_gl_helper.h to Evas_GL_GLES2.

Signed-off-by: Boram Bae <boram21.bae@samsung.com>
@bbrto21 bbrto21 requested review from JSUYA and swift-kim May 23, 2022 06:15
Copy link
Member

@JSUYA JSUYA left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In tizen's efl, glGetString(GL_VERSION) does not work properly.
(https://review.tizen.org/gerrit/#/c/platform/upstream/efl/+/178697/)
(You will need a review.tizen.org ID to view this link.)

commit efb1d367be87977c584f50764de3e3f233a720f2
Author: Daekwang Ryu <dkdk.ryu@samsung.com>
Date:   Fri May 11 18:51:59 2018 +0900

    evas_gl: remove GL_VERSION wrapper
    
    because some drivers return a context of later version not specified version.
    
    Change-Id: I4fc4567ccdefd63f422812d1f7461d13e1e547b3

diff --git a/src/modules/evas/engines/gl_common/evas_gl_api.c b/src/modules/evas/engines/gl_common/evas_gl_api.c
index 84bd943076..6c3a44a731 100755
--- a/src/modules/evas/engines/gl_common/evas_gl_api.c
+++ b/src/modules/evas/engines/gl_common/evas_gl_api.c
@@ -1471,7 +1471,7 @@ _evgl_glGetString(GLenum name)
 {
    static char _version[128] = {0};
    static char _glsl[128] = {0};
-   const char *ret, *version_extra;
+   const char *ret;
    EVGL_Resource *rsc;
    EVGL_Context *ctx;
 
@@ -1521,19 +1521,6 @@ _evgl_glGetString(GLenum name)
         return (const GLubyte *) _glsl;
 #endif
 
-      case GL_VERSION:
-        ret = (const char *) EVGL_TH(glGetString, GL_VERSION);
-        if (!ret) return NULL;
-#ifdef GL_GLES
-        version_extra = ret + 10;
-#else
-        version_extra = ret;
-#endif
-        snprintf(_version, sizeof(_version), "OpenGL ES %d.%d Evas GL (%s)",
-                 (int) ctx->version, ctx->version_minor, version_extra);
-        _version[sizeof(_version) - 1] = '\0';
-        return (const GLubyte *) _version;
-
       case GL_EXTENSIONS:
         // Passing the version -  GLESv2/GLESv3.
         return (GLubyte *) evgl_api_ext_string_get(EINA_TRUE, rsc->current_ctx->version);

That's why I think CustomGlGetString is appropriate.

Signed-off-by: Boram Bae <boram21.bae@samsung.com>
@JSUYA JSUYA merged commit 1730d83 into flutter-tizen:flutter-3.0.0-tizen May 24, 2022
@swift-kim
Copy link
Member

@JSUYA Please make sure to clean up the commit message before you merge a PR.

* Fix a typo

Signed-off-by: Boram Bae <boram21.bae@samsung.com>

This kind of thing should not be included in the final commit message.

@JSUYA
Copy link
Member

JSUYA commented May 24, 2022

@JSUYA Please make sure to clean up the commit message before you merge a PR.

* Fix a typo

Signed-off-by: Boram Bae <boram21.bae@samsung.com>

This kind of thing should not be included in the final commit message.

OK I will be careful

swift-kim pushed a commit that referenced this pull request Aug 5, 2022
* Evas GL's glGetString doesn't handle GL_VERSION string request.
  So it intercepts this request and always returns the 2.1 version string.
* Downgrade the version of tizen_evas_gl_helper.h to Evas_GL_GLES2.

Signed-off-by: Boram Bae <boram21.bae@samsung.com>
swift-kim pushed a commit that referenced this pull request Sep 1, 2022
* Evas GL's glGetString doesn't handle GL_VERSION string request.
  So it intercepts this request and always returns the 2.1 version string.
* Downgrade the version of tizen_evas_gl_helper.h to Evas_GL_GLES2.

Signed-off-by: Boram Bae <boram21.bae@samsung.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants