Unblock hardware-accelerated P3D on ARM Mali devices #5014

Merged
merged 1 commit into from Apr 20, 2017

Conversation

Projects
None yet
3 participants
@gohai
Contributor

gohai commented Apr 20, 2017

This works around a JOGL bug that affects ARM Mali devices, such as the PocketCHIP. (reported by @xranby)

Unblock hardware-accelerated P3D on ARM Mali devices
This works around a JOGL bug that affects ARM Mali devices, such as the PocketCHIP. (reported by @xranby)

@gohai gohai requested review from codeanticode and JakubValtar Apr 20, 2017

@xranby

This comment has been minimized.

Show comment
Hide comment
@xranby

xranby Apr 20, 2017

Contributor

This is a workaround for ARM Mali devices when both Mesa 3D software rendered OpenGL and ARM OpenGL ES drivers are installed at the same time on the same system.

Contributor

xranby commented Apr 20, 2017

This is a workaround for ARM Mali devices when both Mesa 3D software rendered OpenGL and ARM OpenGL ES drivers are installed at the same time on the same system.

+
+ // workaround for https://jogamp.org/bugzilla/show_bug.cgi?id=1347
+ if (!profile.isHardwareRasterizer()) {
+ GLProfile hardware = GLProfile.getMaxProgrammable(true);

This comment has been minimized.

@xranby

xranby Apr 20, 2017

Contributor

if i am not mistaken you should use
GLProfile.getMaxFixedFunc(true);
here.
see: https://jogamp.org/bugzilla/show_bug.cgi?id=1347#c2

@xranby

xranby Apr 20, 2017

Contributor

if i am not mistaken you should use
GLProfile.getMaxFixedFunc(true);
here.
see: https://jogamp.org/bugzilla/show_bug.cgi?id=1347#c2

This comment has been minimized.

@gohai

gohai Apr 20, 2017

Contributor

Hm, I don't understand - I thought fixedFunc means GL2ES1, whereas we want GL2ES2, which is also what the hardware is capable of?

@gohai

gohai Apr 20, 2017

Contributor

Hm, I don't understand - I thought fixedFunc means GL2ES1, whereas we want GL2ES2, which is also what the hardware is capable of?

This comment has been minimized.

@xranby

xranby Apr 20, 2017

Contributor

please double check that GLProfile hardware = GLProfile.getMaxProgrammable(true); gives you GLES2 since I think you may en up with the Mesa 3D software renderer because Mesa 3D do support a very high Programmable profile using software renderer.

@xranby

xranby Apr 20, 2017

Contributor

please double check that GLProfile hardware = GLProfile.getMaxProgrammable(true); gives you GLES2 since I think you may en up with the Mesa 3D software renderer because Mesa 3D do support a very high Programmable profile using software renderer.

This comment has been minimized.

@gohai

gohai Apr 20, 2017

Contributor

Seems to give me the hardware profile - here are my debug printlns while I was testing the code above:

Trying GL2ES2
libGL error: MESA-LOADER: malformed or no PCI ID
libGL error: unable to load driver: sun4i-drm_dri.so
libGL error: driver pointer missing
libGL error: failed to load driver: sun4i-drm
Got GLProfile[GL2/GL2.sw]
Not hardware
Max programmable is GLProfile[GLES2/GLES2.hw]
Picking max programmable over software
@gohai

gohai Apr 20, 2017

Contributor

Seems to give me the hardware profile - here are my debug printlns while I was testing the code above:

Trying GL2ES2
libGL error: MESA-LOADER: malformed or no PCI ID
libGL error: unable to load driver: sun4i-drm_dri.so
libGL error: driver pointer missing
libGL error: failed to load driver: sun4i-drm
Got GLProfile[GL2/GL2.sw]
Not hardware
Max programmable is GLProfile[GLES2/GLES2.hw]
Picking max programmable over software

This comment has been minimized.

@xranby

xranby Apr 20, 2017

Contributor

OK, good!

@xranby

xranby Apr 20, 2017

Contributor

OK, good!

@benfry benfry merged commit 7b0c89b into processing:master Apr 20, 2017

@gohai gohai deleted the gohai:chip-p3d branch Apr 23, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment