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

i.MX6: GLXの有効化 #28

Open
ashie opened this issue Oct 14, 2016 · 2 comments
Open

i.MX6: GLXの有効化 #28

ashie opened this issue Oct 14, 2016 · 2 comments
Labels
NXP i.MX i.MX で再現する問題 X11

Comments

@ashie
Copy link
Contributor

ashie commented Oct 14, 2016

i.MX6ではEGLを使ってCompositorOGLを使うことができているが、GLXも有効化できるようにしたい。

現状では、GLXを有効化するとクラッシュする。

Program received signal SIGSEGV, Segmentation fault.
[Switching to LWP 1261]
0x76d82ce4 in strlen () from /lib/libc.so.6
(gdb) where
#0  0x76d82ce4 in strlen () from /lib/libc.so.6
#1  0x61e0ca44 in __glim_GetShaderiv (shader=1, pname=35716, params=0x6a252ce8) at gc_gl_shader.c:1143
#2  0x00005be2 in ?? ()
Backtrace stopped: previous frame identical to this frame (corrupt stack?)

落ちている箇所は以下

ドライバの問題と思われる。

上記を回避するようにすると起動することはできるが、表示が大きく乱れる。

@ashie ashie added the NXP i.MX i.MX で再現する問題 label Oct 14, 2016
@ashie
Copy link
Contributor Author

ashie commented Oct 14, 2016

Linuxでは本来GLXの方がデフォルト(EGLはパッチを当てないとコンパイルすら通らない)なので、
GLXの方がよくテストされているはずであり、表示の問題を直せばEGLよりも安定する可能性はある。

@ashie ashie added the X11 label Oct 14, 2016
@ashie
Copy link
Contributor Author

ashie commented Oct 14, 2016

結局どのリポジトリにも入れていないと思うが、手元のビルド環境にお試しパッチが残っていた。
(あくまでもお試しなのでコメントとコードが合わなくなっちゃってるけど)

commit 26da701251567547191ca66a29424bac4054f97b
Author: Takuro Ashie <ashie@homa.ne.jp>
Date:   Fri May 13 18:12:03 2016 +0900

    Avoid crash which occurs when GLX is enabled on vivante GPU

diff --git a/gfx/layers/opengl/OGLShaderProgram.cpp b/gfx/layers/opengl/OGLShaderProgram.cpp
index a9f79e2..5c474ff 100644
--- a/gfx/layers/opengl/OGLShaderProgram.cpp
+++ b/gfx/layers/opengl/OGLShaderProgram.cpp
@@ -570,17 +570,13 @@ ShaderProgramOGL::CreateShader(GLenum aShaderType, const char *aShaderSource)
   mGL->fShaderSource(sh, 1, (const GLchar**)&aShaderSource, nullptr);
   mGL->fCompileShader(sh);
   mGL->fGetShaderiv(sh, LOCAL_GL_COMPILE_STATUS, &success);
-  mGL->fGetShaderiv(sh, LOCAL_GL_INFO_LOG_LENGTH, (GLint*) &len);
   /* Even if compiling is successful, there may still be warnings.  Print them
    * in a debug build.  The > 10 is to catch silly compilers that might put
    * some whitespace in the log but otherwise leave it empty.
    */
-  if (!success
-#ifdef DEBUG
-      || (len > 10 && gfxEnv::DebugShaders())
-#endif
-      )
+  if (!success)
   {
+    mGL->fGetShaderiv(sh, LOCAL_GL_INFO_LOG_LENGTH, (GLint*) &len);
     nsAutoCString log;
     log.SetCapacity(len);
     mGL->fGetShaderInfoLog(sh, len, (GLint*) &len, (char*) log.BeginWriting());

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
NXP i.MX i.MX で再現する問題 X11
Projects
None yet
Development

No branches or pull requests

1 participant