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

very slow on raspberry pi 4 (64 bit) #130

Open
kiai72 opened this issue Jan 21, 2023 · 12 comments
Open

very slow on raspberry pi 4 (64 bit) #130

kiai72 opened this issue Jan 21, 2023 · 12 comments

Comments

@kiai72
Copy link

kiai72 commented Jan 21, 2023

Hello on Raspberry Pi OS (64 bit) (2.1.1. from the official repository) it's unplayable slow.

why ? other games like supertuxkart work fine.

@juzzlin
Copy link
Owner

juzzlin commented Jan 21, 2023

My guess is that there might be no HW acceleration on Raspberry Pi for framebuffer blitting that is being used in renderer.cpp:

QOpenGLFramebufferObject::blitFramebuffer(m_shadowFbo.get(), m_fbo.get(), GL_DEPTH_BUFFER_BIT);

@kiai72
Copy link
Author

kiai72 commented Jan 22, 2023

But why only with this game. Supertuxkart for example works fast.

@juzzlin
Copy link
Owner

juzzlin commented Jan 22, 2023

But why only with this game. Supertuxkart for example works fast.

That's because SuperTuxCart and other games very likely don't use framebuffer blitting at all. In Dust Racing 2D it's being used to create those fake 3D shadows. I'm only guessing that it could be the reason.

@kiai72
Copy link
Author

kiai72 commented Jan 23, 2023

ok, is there a flag to turn this feature off ?

@juzzlin
Copy link
Owner

juzzlin commented Jan 28, 2023

Try this out: 596a0f1

@juzzlin
Copy link
Owner

juzzlin commented Jan 28, 2023

Build with -DDisableFramebufferBlits=ON and it will render the shadows directly to the target framebuffer. The only downside is that they will be pretty bad. However, if this fixes the performance issue on Raspberry Pi I could try to improve that method.

@kiai72
Copy link
Author

kiai72 commented Jan 28, 2023

i build with
cmake ../.. -DDisableFramebufferBlits=OFF
make

but it does not change anything. still unplayable slow. Or do i have to set a flag in .conf as well ?

@juzzlin
Copy link
Owner

juzzlin commented Jan 28, 2023

i build with cmake ../.. -DDisableFramebufferBlits=OFF make

but it does not change anything. still unplayable slow. Or do i have to set a flag in .conf as well ?

Should be -DDisableFramebufferBlits=ON. I made a typo in my earlier comment, but immediately fixed it :)

@kiai72
Copy link
Author

kiai72 commented Jan 29, 2023

i tried with -DDisableFramebufferBlits=ON as well (+ another make) -> no change!

not only the game is slow - even the menu is very slow.

@juzzlin
Copy link
Owner

juzzlin commented Jan 29, 2023

Stupid question, but did you update the source code from master branch so that it actually included my framebuffer hack in commit 596a0f1 ?

If yes, then the root cause for the slowness must be something else and needs more investigation.

@kiai72
Copy link
Author

kiai72 commented Jan 29, 2023

after you wrote about this new feature i downloaded the master as zip ...

@kiai72
Copy link
Author

kiai72 commented Feb 20, 2024

so can we please add more switches that simplify the graphics - to make it run on rpi4 ?

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