ricrpi / mupen64plus-video-gles2n64

Manually ported from mupen64plus-ae for use with the Raspberry PI
5 stars 10 forks source link

Certain games crash the whole system #13

Open gizmo98 opened 9 years ago

gizmo98 commented 9 years ago

There are certain games crashing the whole system like Zelda OoT, Paper Mario and Castlevania (with FOG=0). Any suggestions how to debug gles2n64? Use gdb or apitrace?

ricrpi commented 9 years ago

I have used gdb in the past, but run/debug from a remote machine. If you use my build script then you just need to pass in DEBUG=1. (Note: the official core does not pass -g into the compiler which may make debugging harder)

ricrpi commented 8 years ago

I have started to investigate and there is a problem at: OpenGL Error code 502 in '../../src/OpenGL.cpp' line 268 and OpenGL Error code 500 in '../../src/OpenGL.cpp' line 485

These errors cause the video core to lock up and requires a restart to fix.

gizmo98 commented 8 years ago

Line 268 function void OGL_UpdateScale() is interesting. Is it possible VI.width or VI.height are zero at startup? Could a division through zero happen?

Line 485 is not used because USE_SDL is not defined.

ricrpi commented 8 years ago

line 485 is hit as its written in the debug output. Interestingly uTex is a uniform sampler2D in the shader code. It all looks ok, I wonder if glUniform1i() should be called after glUseProgram()

ricrpi commented 8 years ago

Line 268 function void OGL_UpdateScale() is interesting. Is it possible VI.width or VI.height are zero at startup? Could a division through zero happen?

Think I'm looking at a slightly different version but can confirm that glUseProgram before glUniformli() in OGL_InitStates() removes gl error 502

ricrpi commented 8 years ago

I have tried porting the latest android 'gles2n64', which works fine on a tablet, but still locks up on the pi with Zelda

gizmo98 commented 8 years ago

I use GLideN64 for now. It is based on gln64 and a little bit slower bad has no lock up problems.