-
Notifications
You must be signed in to change notification settings - Fork 36
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
DeSmuME core freezes when creating savestate #281
Comments
I could not reproduce locally. Thank you for both the video and the log file. The only notable thing I see in the log file is this:
Same lines when I do it:
The new save file format embeds the image in the save file, but it shouldn't be required. Were you maybe having issues generating the image files previously and it just didn't matter? Do you have any ".png" files for save states from the earlier versions of RAlibretro? If I modify the code to simulate a failure capturing the current screen, I don't see any problem there either. It's also strange that it seems to be specifically the DeSmuMe core. I don't see anything else in 1.3.5 related to save states or the OpenGL APIs. |
I just checked and the previous version generated |
It looks like the same error when you take a screenshot.
And since you attached that screenshot and it appears to be "blank", it's obviously not working. Unfortunately, I don't know what the error is indicating or how to address it. I still find it strange that it only affects the DeSmuMe core. |
So, theanxietybuster here. I ran into this issue recently with Kirby and found that disabling the Opengl Rasterizer solved the problem. It’s not exclusive to DeSuMuMe. MelonDS had the same issue (despite not being officially supported). |
I can reproduce with the rasterizer enabled. Interestingly enough, it only happens when saving the state. After restarting, I can reload the state and continue playing just fine. The documentation just says:
which provides very little insight as to why the problem occurs. Some simple stepping over pieces of the code shows that it's this line that's causing the issue, but I don't have the OpenGL expertise to determine why. RALibretro/src/components/Video.cpp Line 333 in cdfb97c
It does seem to correlate to the error captured in the log file above:
|
It's just a guess, but that code is changing the OpenGL state which may be confusing the core. The currently bound texture should be obtained before binding A quick search provided this code, which I haven't tested: GLint current;
glGetIntegerv(GL_TEXTURE_BINDING_2D, ¤t); |
That did not work. I think you're right though about our state change affecting whatever state is being managed internally. It could explain why the emulator starts strobing, but it doesn't explain why calling |
I see. I'd leave the code there anyway, maybe there are cores out there that will leave a texture bound and relying on that to function properly, even though I'm getting the feeling no core will rely on that since the frontend will, when
I see that As for 2D vs 3D, OpenGL, and I belive this is true for every other graphics API, doesn't differentiate between 2D and 3D rendering. It transform vertices and map them to a 2D plane, onto which the textures will be blit etc. Here the person says that this error can happen if the format is an integer one and the texture has a float point format, but I think RALibretro is the one which always create the texture and only creates textures with integer formats, so it's really weird. Again, maybe RetroArch can be a good source for a possible fix. |
Whenever I create a savestate with the DeSmuME core the visuals freeze, the game still plays in the background, I just can't see anything anymore. Resetting the game does not fix it, only restarting the emulator fixes it. When trying to load a different game in a different core the emulator simply crashes.
I tested multiple DS games, same happened in all of them, it did not happen on different cores though (tried ParaLLEl64 and Beetle PSX HW). It also didn't happen in previous versions.
video - log.txt
The text was updated successfully, but these errors were encountered: