libretro / parallel-n64

Optimized/rewritten Nintendo 64 emulator made specifically for Libretro. Originally based on Mupen64 Plus.
314 stars 128 forks source link

Segmentation fault on Amlogic-MX2 SOC, Mali400 GPU (_essl_mali200_write_instructions) #101

Open zephyr1988 opened 10 years ago

zephyr1988 commented 10 years ago

I have compiled Retroarch on an ARM dual-core cortex-a9 cpu with Mali400 GPU, using lima driver and successfully run 2d cores (picodrive, pocketsnes, mednafen_gba and also pcsx_rearmed).

I have compiled successfully mupen64plus_libretro.so and it is loaded correctly, however it segfaults after seemingly finding the Mali GL-Renderer.

Running GDB with the core dump I get the following:

Program terminated with signal 11, Segmentation fault.

0 0x4030888c in _essl_mali200_write_instructions () from /usr/lib/libMali.so

(gdb) bt full

0 0x4030888c in _essl_mali200_write_instructions () from /usr/lib/libMali.so

No symbol table info available.

1 0x4030684c in ?? () from /usr/lib/libMali.so

No symbol table info available.

2 0x4030684c in ?? () from /usr/lib/libMali.so

No symbol table info available.

ps. libMali.so is a closed source blob so that's the most of it.

Here is a retroarch -v log:

http://pastebin.com/96fuV9qC

And finally searching around the internet I found something about glDrawArrays and limits:

"When calling glDrawArrays, I now limit the calls to processing at most 256 triangles in one go. If the vertex buffer contains more than 256 triangles, I split it up into separate calls to glDrawArrays with 256 triangles and then handle the remainder at the end."

http://developer.samsung.com/forum/thread/big-problem-on-mali400-gpu-and-opengl-es-tried-on-galaxy-sii-and-galaxy-note/77/138198

Thanks!

zephyr1988 commented 9 years ago

An update on this issue: compiling latest git with SINGLE_THREAD=1 is working fine, the core loads correctly.

With SINGLE_THREAD=0 I get the same Segmentation fault.