ptitSeb
Serial Porter
I open this thread to try find a fix / workaround on the hang that happens sometimes on 3D driver of the CC model only.
I have witnessed it in a few game, like Torus_trooper (both GLES port by M-HT and my glshim port), Sable (Loic2003 port using glshim), nprQuake with NPR rendring (glshim, but it's ok with default normal renderer) and Tasty Static (glshim by lunixbochs).
I was assuming it was some bugs with Line drawing, but it may not.
M-HT also hinted that it triggers when rendering off screen.
I worked with Torus-trooper to try find a workaround. On a CC model, Torus runs, the intro screen run fine as long as it is empty, but in game, quickly, it freeze (but the music continue).
I have launched the game with a debugger and Interupted inside the freeze.
Here is the BackTrace:
#0 0x403a45ac in ioctl () from /lib/libc.so.6
#1 0x41430bd0 in PVRSRVBridgeCall (hServices=<value optimized out>, ui32FunctionID=3223086915, pvParamIn=<value optimized out>, ui32InBufferSize=<value optimized out>,
pvParamOut=0xbefff3a8, ui32OutBufferSize=8)
at /home1/prathap/fresh/imgtiddk16_netrakernel/ti_references/sources/GFX_Linux_DDK/src/eurasia/services4/srvclient/env/linux/common/pvr_bridge_u.c:242
#2 0x41430508 in PVRSRVEventObjectWait (psConnection=<value optimized out>, hOSEvent=0xf)
at /home1/prathap/fresh/imgtiddk16_netrakernel/ti_references/sources/GFX_Linux_DDK/src/eurasia/services4/srvclient/env/linux/common/osfunc_um.c:457
#3 0x41c87514 in CBUF_GetBufferSpace (apsBuffers=<value optimized out>, ui32DWordsRequired=15204, ui32BufferType=1, bTerminate=IMG_FALSE)
at /home1/prathap/fresh/imgtiddk16_netrakernel/ti_references/sources/GFX_Linux_DDK/src/eurasia/eurasiacon/common/buffers.c:534
#4 0x41c56d8c in GetVertexIndexBufferSpace (gc=0x234620, ui32NumIndices=<value optimized out>, ui32NumVertices=<value optimized out>, ui32SizePerIndex=<value optimized out>)
at drawvarray.c:641
#5 0x41c577bc in DrawBatchOnVBuffer (gc=0x234620, eMode=1, ui32First=0, ui32CountIn=1103462188, ui32NumIndices=5828, eType=0, elements=0x0, ui32VertexStart=0, ui32VertexCount=5828)
at drawvarray.c:1272
#6 0x41c5973c in glDrawArrays (mode=1, first=0, count=5828) at drawvarray.c:2277
#7 0x400f7458 in glDrawArrays () from /mnt/utmp/torus_trooper/lib/libGL.so.1
#8 0x00000000 in ?? ()
In the backtrace, we see the freeze is inside a glDrawArrays with mode=GL_LINES (=1) with a vertex count quite high (probably the wireframe part of the tunnel that I draw in a single draw call).
Also, I continued and break again, the backtrace is just the same, nothing changed.
In case someone wants to try, here a version with the large FBO, crashing immediatly (in game) on a CC (should works fine on Rebirth/Gigahertz): http://ptitseb.openpandora.org/torus_trooper.pnd
Any hint someone?
I have witnessed it in a few game, like Torus_trooper (both GLES port by M-HT and my glshim port), Sable (Loic2003 port using glshim), nprQuake with NPR rendring (glshim, but it's ok with default normal renderer) and Tasty Static (glshim by lunixbochs).
I was assuming it was some bugs with Line drawing, but it may not.
M-HT also hinted that it triggers when rendering off screen.
I worked with Torus-trooper to try find a workaround. On a CC model, Torus runs, the intro screen run fine as long as it is empty, but in game, quickly, it freeze (but the music continue).
- Try to define a simple glScissor(0,0,800,480); and enabling Scissor. => No effect it seems.
- Try to define a simple glScissor(1,1,799,479); and enbling Scissor, just in case the 0,0 is a special case => No effect.
- Render offscreen in an FBO. Created a 512*256 small FBO (it's GLES1.1, so Texture have to be power of 2 sized), render game in 640x480=>512x256 in a texture, then show the texture at buffer swap => Quite stable. I've been able to play until level 4 (and loose), but that it crash at intro screen.
- Render offscreen if an FBO. Created a large 1024*512 FBO, render game in 640x480, and use a centred glViewport(192,16,640,480) and show part of the texture at buffer swap => Immediate crash when starting the game (especially with 4.03.00.02 driver)
I have launched the game with a debugger and Interupted inside the freeze.
Here is the BackTrace:
#0 0x403a45ac in ioctl () from /lib/libc.so.6
#1 0x41430bd0 in PVRSRVBridgeCall (hServices=<value optimized out>, ui32FunctionID=3223086915, pvParamIn=<value optimized out>, ui32InBufferSize=<value optimized out>,
pvParamOut=0xbefff3a8, ui32OutBufferSize=8)
at /home1/prathap/fresh/imgtiddk16_netrakernel/ti_references/sources/GFX_Linux_DDK/src/eurasia/services4/srvclient/env/linux/common/pvr_bridge_u.c:242
#2 0x41430508 in PVRSRVEventObjectWait (psConnection=<value optimized out>, hOSEvent=0xf)
at /home1/prathap/fresh/imgtiddk16_netrakernel/ti_references/sources/GFX_Linux_DDK/src/eurasia/services4/srvclient/env/linux/common/osfunc_um.c:457
#3 0x41c87514 in CBUF_GetBufferSpace (apsBuffers=<value optimized out>, ui32DWordsRequired=15204, ui32BufferType=1, bTerminate=IMG_FALSE)
at /home1/prathap/fresh/imgtiddk16_netrakernel/ti_references/sources/GFX_Linux_DDK/src/eurasia/eurasiacon/common/buffers.c:534
#4 0x41c56d8c in GetVertexIndexBufferSpace (gc=0x234620, ui32NumIndices=<value optimized out>, ui32NumVertices=<value optimized out>, ui32SizePerIndex=<value optimized out>)
at drawvarray.c:641
#5 0x41c577bc in DrawBatchOnVBuffer (gc=0x234620, eMode=1, ui32First=0, ui32CountIn=1103462188, ui32NumIndices=5828, eType=0, elements=0x0, ui32VertexStart=0, ui32VertexCount=5828)
at drawvarray.c:1272
#6 0x41c5973c in glDrawArrays (mode=1, first=0, count=5828) at drawvarray.c:2277
#7 0x400f7458 in glDrawArrays () from /mnt/utmp/torus_trooper/lib/libGL.so.1
#8 0x00000000 in ?? ()
In the backtrace, we see the freeze is inside a glDrawArrays with mode=GL_LINES (=1) with a vertex count quite high (probably the wireframe part of the tunnel that I draw in a single draw call).
Also, I continued and break again, the backtrace is just the same, nothing changed.
In case someone wants to try, here a version with the large FBO, crashing immediatly (in game) on a CC (should works fine on Rebirth/Gigahertz): http://ptitseb.openpandora.org/torus_trooper.pnd
Any hint someone?
Last edited by a moderator: