SUMMARY 3D graph plots in KAlgebra Mobile are not rendered. STEPS TO REPRODUCE 1. Install kalgebra on the PinePhone. I am using Manjaro ARM Plasma Mobile. 2. Run KAlgebra Mobile from the menu. 3. Go to Graph 3D. 4. Touch the circled + button to open the popup. 5. Touch the + button in the popup to add the example sin x*sin y plot. You can also try any other function. It does not make a difference. OBSERVED RESULT The plot area remains completely black. EXPECTED RESULT The 3D graph is rendered. SOFTWARE/OS VERSIONS Manjaro ARM Plasma Mobile Pine64 PinePhone (1.2) (Allwinner A64 / Cortex A53 aarch64) KDE Plasma Version: 5.25.5 KDE Frameworks Version: 5.98.0 Qt Version: 5.15.6 kalgebra 22.08.1-1 (Manjaro ARM Package) ADDITIONAL INFORMATION This is the terminal output. I believe the first error to be the root cause and the remaining ones to be followups that ultimately lead to nothing at all being rendered: QOpenGLShader::compile(Fragment): 0:4(2): error: No precision specified in this scope for type `float' *** Problematic Fragment shader source code *** #ifdef GL_KHR_blend_equation_advanced #extension GL_ARB_fragment_coord_conventions : enable #extension GL_KHR_blend_equation_advanced : enable #endif #ifndef GL_FRAGMENT_PRECISION_HIGH #define highp mediump #endif #line 1 uniform mediump vec4 color; void main(void) { float w = 10.*gl_FragCoord.w; highp vec4 zvec = vec4(w, w, w, 1.0); gl_FragColor = mix(color, zvec, vec4(.5,.5,.5,1.)); } *** QOpenGLShader::link: error: program lacks a fragment shader QOpenGLShader::link: error: program lacks a fragment shader QOpenGLShaderProgram::uniformLocation(matrix): shader program is not linked QOpenGLShaderProgram::attributeLocation(vertex): shader program is not linked QOpenGLShaderProgram::attributeLocation(normal): shader program is not linked QOpenGLShaderProgram::attributeLocation(vertex): shader program is not linked QOpenGLShaderProgram::uniformLocation(color): shader program is not linked QOpenGLShaderProgram::uniformLocation(color): shader program is not linked QOpenGLShaderProgram::uniformLocation(color): shader program is not linked QOpenGLShaderProgram::attributeLocation(vertex): shader program is not linked QOpenGLShaderProgram::uniformLocation(color): shader program is not linked QOpenGLShader::link: error: program lacks a fragment shader QOpenGLShaderProgram::uniformLocation(matrix): shader program is not linked QOpenGLShaderProgram::attributeLocation(vertex): shader program is not linked QOpenGLShaderProgram::attributeLocation(normal): shader program is not linked QOpenGLShaderProgram::attributeLocation(vertex): shader program is not linked QOpenGLShaderProgram::uniformLocation(color): shader program is not linked QOpenGLShaderProgram::uniformLocation(color): shader program is not linked QOpenGLShaderProgram::uniformLocation(color): shader program is not linked QOpenGLShaderProgram::attributeLocation(vertex): shader program is not linked QOpenGLShaderProgram::uniformLocation(color): shader program is not linked
And in case it matters: Kernel version: 5.19.11-1-MANJARO-ARM
And I am using the qt5-es2-{base,declarative,multimedia} (OpenGL ES) builds.
Looks like the offending code is actually part of analitza(plot). I am using: analitza 22.08.1-1
Apparently a regression from this 2015 commit: https://invent.kde.org/education/analitza/-/commit/80a3833ee306ee62ef61126d31fd7649bc7394af
I guess it should say "highp float w = …" instead of "float w = …".
Ping? Aleix, can you please look into this? Or anybody else? It looks to me like this should be a one-word fix (see my comments above), though I am not by any means an expert for OpenGL shaders.
Git commit 2af6c7ddbd5d961dc0aefda0e08367fb2cf1d858 by Aleix Pol. Committed on 03/11/2022 at 01:25. Pushed by apol into branch 'master'. analitzaplot: Fix 3D plots on the pinephone It complains about the lack of precision on the float there whereas elsewhere it doesn't. Adding the highp still works on other devices so we have all bases covered. M +1 -1 analitzaplot/plotter3d_es.cpp https://invent.kde.org/education/analitza/commit/2af6c7ddbd5d961dc0aefda0e08367fb2cf1d858
There you go, it was exactly what you said.
Git commit 9f32552760eaf462a79356011ed117a4ce03a62a by Aleix Pol Gonzalez, on behalf of Aleix Pol. Committed on 03/11/2022 at 01:28. Pushed by apol into branch 'release/22.08'. analitzaplot: Fix 3D plots on the pinephone It complains about the lack of precision on the float there whereas elsewhere it doesn't. Adding the highp still works on other devices so we have all bases covered. (cherry picked from commit 2af6c7ddbd5d961dc0aefda0e08367fb2cf1d858) M +1 -1 analitzaplot/plotter3d_es.cpp https://invent.kde.org/education/analitza/commit/9f32552760eaf462a79356011ed117a4ce03a62a
Thanks a lot!
Unfortunately, this missed 22.08.3 by 2 days, and there is no 22.08.4 planned, so 22.12(.0) will likely be the first release to ship the fix.