To begin, I draw sprites using the geometry shader. I often draw 2D in 3D in various orders to achieve certain effects, such as 2D Background -> 3D Model -> Text. It seems that drawing in certain orders causes citro3D to hang, such that the main thread gets stuck in a loop. I didn't have this issue when I'd draw using only a vertex shader, so I'm sure it is related to me using the geometry shader. Under normal circumstances, the shader program works as expected. It is only when I draw sprites, and then draw a model that citro3D hangs. When drawing models, I use C3D_DrawElements to draw triangles with an index buffer. Whenever it hangs, I can no longer trigger the Luma menu, and must hard power off my 3DS.
To be more specific, here is a list of tests I've tried and the results.
To begin, I draw sprites using the geometry shader. I often draw 2D in 3D in various orders to achieve certain effects, such as 2D Background -> 3D Model -> Text. It seems that drawing in certain orders causes citro3D to hang, such that the main thread gets stuck in a loop. I didn't have this issue when I'd draw using only a vertex shader, so I'm sure it is related to me using the geometry shader. Under normal circumstances, the shader program works as expected. It is only when I draw sprites, and then draw a model that citro3D hangs. When drawing models, I use C3D_DrawElements to draw triangles with an index buffer. Whenever it hangs, I can no longer trigger the Luma menu, and must hard power off my 3DS.
To be more specific, here is a list of tests I've tried and the results.
Here are the shaders I use. Vertex Shader: https://pastebin.com/562LdNGk Geometry Shader: https://pastebin.com/sHLtFUME
Here is the log of code execution. Log: https://pastebin.com/mMnth0xD