Skip to content

ARM Mali upbringing #5475

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

Merged
merged 7 commits into from
Apr 20, 2018
Merged

ARM Mali upbringing #5475

merged 7 commits into from
Apr 20, 2018

Conversation

gohai
Copy link
Contributor

@gohai gohai commented Apr 18, 2018

This makes P3D work on Linux SBCs using ARM Mali graphics and their (closed-source) OpenGL ES 3.1 driver.

I don't have matching hardware, so all testing was done by user seongwook in the Processing Forums, who was very generous with his time in this effort. He tested with an ODROID-XU4 board, which reports a "Mali-T628" model and the following driver string "OpenGL ES 3.1 v1.r17p0-01rel0.a881d28363cdb20f0017ed13c980967e".

Re review: I specifically don't know if my code in d351070 makes sense in this way.

gohai added 3 commits April 17, 2018 17:59
Fixes:
java.lang.RuntimeException: GL function glRenderbufferStorageMultisample() is not available on this hardware (or driver) Read <a href="http://wiki.processing.org/w/OpenGL_Issues" target="_blank" rel="nofollow">http://wiki.processing.org/w/OpenGL_Issues</a> for help.
    at processing.opengl.PJOGL.renderbufferStorageMultisample(PJOGL.java:1941)
    at processing.opengl.PGL.createFBOLayer(PGL.java:955)
    at processing.opengl.PGL.beginRender(PGL.java:727)
    at processing.opengl.PGraphicsOpenGL.beginOnscreenDraw(PGraphicsOpenGL.java:6577)
    at processing.opengl.PGraphicsOpenGL.beginDraw(PGraphicsOpenGL.java:1459)
    at processing.core.PApplet.handleDraw(PApplet.java:2388)
    at processing.opengl.PSurfaceJOGL$DrawListener.display(PSurfaceJOGL.java:866)
    at jogamp.opengl.GLDrawableHelper.displayImpl(GLDrawableHelper.java:692)
    at jogamp.opengl.GLDrawableHelper.display(GLDrawableHelper.java:674)
    at jogamp.opengl.GLAutoDrawableBase$2.run(GLAutoDrawableBase.java:443)
    at jogamp.opengl.GLDrawableHelper.invokeGLImpl(GLDrawableHelper.java:1293)
    at jogamp.opengl.GLDrawableHelper.invokeGL(GLDrawableHelper.java:1147)
    at com.jogamp.newt.opengl.GLWindow.display(GLWindow.java:759)
    at com.jogamp.opengl.util.AWTAnimatorImpl.display(AWTAnimatorImpl.java:81)
    at com.jogamp.opengl.util.AnimatorBase.display(AnimatorBase.java:452)
    at com.jogamp.opengl.util.FPSAnimator$MainTask.run(FPSAnimator.java:178)
    at java.util.TimerThread.mainLoop(Timer.java:555)
    at java.util.TimerThread.run(Timer.java:505)
Fixes:
java.lang.RuntimeException: GL function glReadBuffer() is not available on this hardware (or driver) Read <a href="http://wiki.processing.org/w/OpenGL_Issues" target="_blank" rel="nofollow">http://wiki.processing.org/w/OpenGL_Issues</a> for help.
    at processing.opengl.PJOGL.readBuffer(PJOGL.java:1954)
    at processing.opengl.PJOGL.initFBOLayerES(PJOGL.java:310)
    at processing.opengl.PJOGL.initFBOLayer(PJOGL.java:301)
    at processing.opengl.PGL.createFBOLayer(PGL.java:988)
    at processing.opengl.PGL.beginRender(PGL.java:727)
    at processing.opengl.PGraphicsOpenGL.beginOnscreenDraw(PGraphicsOpenGL.java:6576)
    at processing.opengl.PGraphicsOpenGL.beginDraw(PGraphicsOpenGL.java:1459)
    at processing.core.PApplet.handleDraw(PApplet.java:2388)
    at processing.opengl.PSurfaceJOGL$DrawListener.display(PSurfaceJOGL.java:866)
    at jogamp.opengl.GLDrawableHelper.displayImpl(GLDrawableHelper.java:692)
    at jogamp.opengl.GLDrawableHelper.display(GLDrawableHelper.java:674)
    at jogamp.opengl.GLAutoDrawableBase$2.run(GLAutoDrawableBase.java:443)
    at jogamp.opengl.GLDrawableHelper.invokeGLImpl(GLDrawableHelper.java:1293)
    at jogamp.opengl.GLDrawableHelper.invokeGL(GLDrawableHelper.java:1147)
    at com.jogamp.newt.opengl.GLWindow.display(GLWindow.java:759)
    at com.jogamp.opengl.util.AWTAnimatorImpl.display(AWTAnimatorImpl.java:81)
    at com.jogamp.opengl.util.AnimatorBase.display(AnimatorBase.java:452)
    at com.jogamp.opengl.util.FPSAnimator$MainTask.run(FPSAnimator.java:178)
    at java.util.TimerThread.mainLoop(Timer.java:555)
    at java.util.TimerThread.run(Timer.java:505)
Fixes:
P0007: Language version '300' unknown, this compiler only supports up to version '320 es'
gohai added 3 commits April 17, 2018 23:24
Fixes:
S0032: no default precision defined for variable '_fragColor'
Fixes:
java.lang.RuntimeException: GL function glBlitFramebuffer() is not available on this hardware (or driver) Read <a href="http://wiki.processing.org/w/OpenGL_Issues" target="_blank" rel="nofollow">http://wiki.processing.org/w/OpenGL_Issues</a> for help.
    at processing.opengl.PJOGL.blitFramebuffer(PJOGL.java:1939)
    at processing.opengl.PGL.syncBackTexture(PGL.java:595)
    at processing.opengl.PGL.endRender(PGL.java:769)
    at processing.opengl.PGraphicsOpenGL.endOnscreenDraw(PGraphicsOpenGL.java:6598)
    at processing.opengl.PGraphicsOpenGL.endDraw(PGraphicsOpenGL.java:1483)
    at processing.core.PApplet.handleDraw(PApplet.java:2444)
    at processing.opengl.PSurfaceJOGL$DrawListener.display(PSurfaceJOGL.java:866)
    at jogamp.opengl.GLDrawableHelper.displayImpl(GLDrawableHelper.java:692)
    at jogamp.opengl.GLDrawableHelper.display(GLDrawableHelper.java:674)
    at jogamp.opengl.GLAutoDrawableBase$2.run(GLAutoDrawableBase.java:443)
    at jogamp.opengl.GLDrawableHelper.invokeGLImpl(GLDrawableHelper.java:1293)
    at jogamp.opengl.GLDrawableHelper.invokeGL(GLDrawableHelper.java:1147)
    at com.jogamp.newt.opengl.GLWindow.display(GLWindow.java:759)
    at com.jogamp.opengl.util.AWTAnimatorImpl.display(AWTAnimatorImpl.java:81)
    at com.jogamp.opengl.util.AnimatorBase.display(AnimatorBase.java:452)
    at com.jogamp.opengl.util.FPSAnimator$MainTask.run(FPSAnimator.java:178)
    at java.util.TimerThread.mainLoop(Timer.java:555)
    at java.util.TimerThread.run(Timer.java:505)
I don't know IntBuffer and OpenGL well enought to say if this will leak memory or similar.
Copy link
Contributor

@JakubValtar JakubValtar left a comment

Choose a reason for hiding this comment

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

I can't test it, but I cross-checked glReadBuffer() and glWriteBuffers() and the constants with the ES3 reference and what you have there seems fine to me.

Fixes:
GLDebugEvent[ id 0xb
    type Error
    severity High: dangerous undefined behavior
    source GL API
    msg Error:glGetFloatv::<pname> is not an accepted value
    when 1524036153380
    source 3.1 (ES profile, arb, debug, compat[ES2, ES3, ES31], FBO, hardware) - OpenGL ES 3.1 v1.r17p0-01rel0.a881d28363cdb20f0017ed13c980967e - hash 0xc39cf5]
    [2]: jogamp.opengl.GLDebugMessageHandler$StdErrGLDebugListener.messageSent(GLDebugMessageHandler.java:347)
    [3]: jogamp.opengl.GLDebugMessageHandler.sendMessage(GLDebugMessageHandler.java:332)
    [4]: jogamp.opengl.GLDebugMessageHandler.glDebugMessageARB(GLDebugMessageHandler.java:358)
    [5]: jogamp.opengl.es3.GLES3Impl.dispatch_glGetFloatv1(Native Method)
    [6]: jogamp.opengl.es3.GLES3Impl.glGetFloatv(GLES3Impl.java:1157)
    [7]: com.jogamp.opengl.DebugGLES3.glGetFloatv(DebugGLES3.java:3260)
    [8]: processing.opengl.PJOGL.getFloatv(PJOGL.java:1106)
    [9]: processing.opengl.PGraphicsOpenGL.getGLParameters(PGraphicsOpenGL.java:6892)
    [10]: processing.opengl.PGraphicsOpenGL.beginDraw(PGraphicsOpenGL.java:1454)
    [11]: processing.core.PApplet.handleDraw(PApplet.java:2388)
    [12]: processing.opengl.PSurfaceJOGL$DrawListener.display(PSurfaceJOGL.java:866)
    [13]: jogamp.opengl.GLDrawableHelper.displayImpl(GLDrawableHelper.java:692)
    [14]: jogamp.opengl.GLDrawableHelper.display(GLDrawableHelper.java:674)
    [15]: jogamp.opengl.GLAutoDrawableBase$2.run(GLAutoDrawableBase.java:443)
    [16]: jogamp.opengl.GLDrawableHelper.invokeGLImpl(GLDrawableHelper.java:1293)
    [17]: jogamp.opengl.GLDrawableHelper.invokeGL(GLDrawableHelper.java:1147)
    [18]: com.jogamp.newt.opengl.GLWindow.display(GLWindow.java:759)
    [19]: com.jogamp.opengl.util.AWTAnimatorImpl.display(AWTAnimatorImpl.java:81)
    [20]: com.jogamp.opengl.util.AnimatorBase.display(AnimatorBase.java:452)
    [21]: com.jogamp.opengl.util.FPSAnimator$MainTask.run(FPSAnimator.java:178)
    [22]: java.util.TimerThread.mainLoop(Timer.java:555)
    [23]: java.util.TimerThread.run(Timer.java:505)
@benfry benfry merged commit 6c2971d into processing:master Apr 20, 2018
@benfry
Copy link
Contributor

benfry commented Apr 20, 2018

Thanks!

@gohai gohai deleted the arm-mali branch June 27, 2018 02:18
@github-actions
Copy link

This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jun 15, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants