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

SDL1 version too old #88

Open
glebm opened this issue Aug 26, 2022 · 6 comments
Open

SDL1 version too old #88

glebm opened this issue Aug 26, 2022 · 6 comments

Comments

@glebm
Copy link

glebm commented Aug 26, 2022

We'd like to try out a game (DevilutionX) with SDL1 instead of SDL2 to see how it affects performance but the SDL1 version here is too old (1.2.8). Would it possible to update SDL1 to at least 1.2.10, or, ideally, the current upstream https://github.com/libsdl-org/SDL-1.2?

@uyjulian
Copy link
Member

The plan is to replace with sdl12-compat

@glebm
Copy link
Author

glebm commented Aug 26, 2022

We've seen actual SDL-1.2 perform much better than SDL2 for software-rendered games on other platforms.
sdl12-compat is just a wrapper around SDL2, so it wouldn't affect performance.

@uyjulian
Copy link
Member

I would prefer to fix the performance issue rather than attempt to do stuff that may not be relevant to issue.

The performance will depend on the system interface exposed by SDL, not the SDL library version.

At least try to use sdl12-compat to ensure the issue is not with the API usage difference.

@glebm
Copy link
Author

glebm commented Aug 26, 2022

On these other platforms, I think the main difference is that SDL-1.2 allows drawing directly to the framebuffer, whereas SDL2 always requires GPU support, so there is an additional copy on every frame.

So for old school software-rendered games, SDL2 is always slower than SDL1.

@uyjulian
Copy link
Member

You can avoid using the GPU pipeline in SDL2 by using SDL_GetWindowSurface. In fact, this is what I do in one of my projects to avoid requiring WebGL support. https://github.com/krkrsdl2/krkrsdl2/blob/abe7762cef00240c323e38cc37e159052d60e013/src/core/sdl2/SDLApplication.cpp#L719

@fjtrujy
Copy link
Member

fjtrujy commented Aug 26, 2022

We've seen actual SDL-1.2 perform much better than SDL2 for software-rendered games on other platforms.
sdl12-compat is just a wrapper around SDL2, so it wouldn't affect performance.

Is that something specifically of PS2? Or is it a general assumption?
Honestly knowing how poor was done the PS2 SDL1.2 port, I don’t expect to have better performance that current SDL2 port.
Anyway if you want to upgrade it to the latest 1.X version, please do it and create the PR, it is going to be really welcomed

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

3 participants