-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
Egl bug on rpi4 with master mesa? #12474
Comments
We should only be creating the one surface. Ultimately, we just want a single backbuffer to draw to - the paltform glue just tries to work that out, so we can churn out frames in the main emulator code. It may be possible we're choosing a wrong EGL config, or that one is rejected in some way so we try another. That would mainly happen here: Line 621 in 56e2e08
I don't have an affected device, so I can't put breakpoints anywhere, but I can tell you what should happen and answer questions as needed. -[Unknown] |
I need to retry it on master, since this was a while ago. Maybe it's fixed somehow. Great 2020. |
Someone on Discord just experienced this again, so it's still an issue. -[Unknown] |
Indeed, its present on master |
For me at least on my Raspberry Pi 4, I do not have a Vulkan backend so that line of code is never being executed. |
Here is where we create the window surface: ppsspp/SDL/SDLGLGraphicsContext.cpp Line 257 in 56e2e08
It should be happening once, but then I recall #7533. What if you force USING_EGL off or comment out this line? Maybe SDL is getting the window surface. That said, we may have problems with getting a correct / usable backbuffer if we just take whatever SDL gives us. -[Unknown] |
Having a usable (with stencil/z) backbuffer is only a problem for non-buffered rendering though - with buffered rendering we don't really care. Although slow platforms like this is one of the main uses for non-buffered anyway maybe... |
Just to confirm, under a X11 desktop this works for me:
|
Obviously.. without gles/egl it will work.. the thing it's x11 and gles/egl only. |
Well, I'm actually mainly worried SDL2 would pick a 10-bit backbuffer format that doesn't actually work (like we used to) on some platforms. I assume it just uses these parameters? Lines 546 to 551 in 2405157
-[Unknown] |
Yeah, maybe it's SDL... I will not test it again bc I use retropie on my raspbian now and it doesn't use x11. |
Probably we should just stop using EGL on SDL2, but I'm not sure if that's making things work for some users. But if EGL init fails, try to avoid a segfault and skip EGL. Should help hrydgard#12474.
Can anyone test this again with latest master? I've made it so even if you include USING_EGL, we'll hopefully continue anyway with SDL's EGL on error. -[Unknown] |
Also works fine with the latest firmware (after rpi-update the kernel bumps to 5.4.42), I tested armv7l and aarch64 with the previously built binary, no problem at all! :-) If you want me to test different cmake arguments just tell me to maybe further improve / optimize performance |
Great, I guess we should update the mesa bug - we were actually in the wrong here, SDL was initing EGL and then we were too. -[Unknown] |
Good to know. By the way I am currently compiling a 64 bit version (see the 64 bit container here https://www.raspberrypi.org/forums/viewtopic.php?p=1621085#p1621085 ) of PPSSPP and I used the following settings in the cmake file |
Oh nevermind, it segfaults as soon as the first frame is in-game (the ppsspp menu loads fine), but no wonder because the container passes the graphics through with llvmpipe. So we have to wait until a proper 64 bit os is released for the pi 4
|
Huh. Still wouldn't expect it to crash, but probably not worth debugging. Anyway, glad it works in 32-bit now! |
The Raspberry Pi foundation just released an official 64 Bit beta, (https://www.raspberrypi.org/forums/viewtopic.php?f=117&t=275370) , so I am compiling it for 64 Bit now. If everything works well I will create a pull request with changes to the cmake file and b.sh script. I will also try to benchmark if there is a performance improvement :-) |
So I was able to successfully compile and run everything fine in 64 Bit, but sadly there was no performance gain compared to 32 bit. I hoped the ARM64 JIT is more powerful. However in order to install libsdl2-dev I had to get out of the debian "dependency hell" using |
Well, it's good for the future - the ARM64 jit is more likely to get improvements than the ARM32 one. But it's quite likely that you are instead bottlenecked by graphics drivers. Hopefully you'll see an improvement once Vulkan drivers are available for the RPI4 some time in the future... |
Should we close this given it has been worked around? -[Unknown] |
I'm fine with closing it. But I'm not the OP^^ |
Mesa topic
https://gitlab.freedesktop.org/mesa/mesa/issues/1976#note_285659
Hi guys, ive found an issue on master ppsspp (i need to apoint the commit reference later, but the build its from a month ago) under mesa 19.2 and next versions too. I detected the problematic commit, reverted and its runnkng now (the all idea was because now we have 3.1 es on mesa). Did you have a clue of what happening with egl surface?
Thanks for this emu... masterpiece.
The text was updated successfully, but these errors were encountered: