Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Hardware Quirk] GPU hangs if one shader program has a geo component and the other doesn't #56

Open
TheGag96 opened this issue Oct 14, 2021 · 3 comments

Comments

@TheGag96
Copy link

In working this demo using two different shader programs to draw a scene, I was getting a hard GPU hang on real hardware (and not on Citra). I narrowed the cause down to one shader I was using having a geo part as well as a vertex part and the other one just having a vertex part. If you flip-flopped which shader you used every frame, there'd be no issue.

Here's a demonstration based on the composite_scene example. This exhibits the same behavior I was running into. However, I just went and made another one based on the lenny example and this one doesn't seem to hang. Is something done in citro2d the culprit? Or is the lenny-based example not hanging because the shader programs are basically the same aside from the geo part?

I was told to submit an issue here. Hopefully this helps out!

@fordcars
Copy link

fordcars commented Feb 1, 2022

Edit: turns out I had the same exact issue. My workaround was to give dummy geo components to all shaders; even if they didn't need one. This not only boosted performance, but prevented those pesky hangs.

@TheGag96
Copy link
Author

TheGag96 commented Feb 2, 2022

Yeah, I ended up doing the same thing... And wow, boosted performance? How's that?

@fordcars
Copy link

fordcars commented Feb 3, 2022

Looks like switching between shaders with and without geo components really put a strain on my system. The same code with the dummy geo shader for triangles had a big improvement in performance, but that might be because of the insane amount of shader changes I am doing!

@devkitPro devkitPro deleted a comment from Master-gtaAndroid Aug 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants