-
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
Black screen at startup (bisected to e715fe0) #12049
Comments
Apparently it's more important to get alpha right for your platform then than color. We really should add some solid debug logging so we can figure out what's chosen and why. I'd very much appreciate a pull request with that. |
I'll set to adding that output to the console. |
The idea behind the heuristics is, for better or worse - Every device has various possible options, but not always the same ones. So device A could support 5551/4444/8880, device B might support 4444/4440, and device C might support 5650/8888. And there are other settings they could support too. PPSSPP can run on a wide variety of these possible configs. Any of those above would work, but some better than others. If we pick the first config that "would work" we might pick the worst colors possible on a device. Or one that doesn't support the latest GL features. If we pick the first config meeting unnecessarily high requirements, we'll exclude devices that are weaker. If we try to catalog every possible device any person might try to run PPSSPP on, we'll end up with a short list of the most popular devices. Less popular (or newer) devices won't be able to run PPSSPP, because no one will have decided manually the best config. Obviously, those aren't options, so we're left with writing code to make the decision, instead of making a human do it. So looking at the formula, before it was: R * 10 + G * 10 + B * 10 + A * 10 The change in e715fe0 made it so we care less about alpha. So instead: R * 10 + G * 10 + B * 10 + A * 2 As you can see, before we might've picked 4444, but now we would pick 5650 (since we pick whatever has the most total points.) In this specific case, I think it was actually to avoid a Mali issue we've seen on Android where the compositor doesn't work when the backbuffer has alpha. In other words, it's a contest and each config is a contestant. We judge them in a bunch of categories, and announce a winner based on best total score. Maybe our judging criteria sucks, though. -[Unknown] |
@unknownbrackets Thanks for the explanation. Got it now.
Looks like that's a given! If you're mixing contestants from different weight categories or even different sports it's going to fall over eventually. Maybe add a weighting for broad platform types to bias it. Or dreaded I'll finish my debug output and see what we have anyway. |
I've added some debug output. Is this what you had in mind? I could add colour for highest scores etc if you like - perhaps use Anyway, the output from my system for example is:
|
Trimmed out the < 700 values then sorted and removed identical rows:
It's interesting that two are, from our heuristics perspective, identical. There ought to be something different about them, so maybe we want to pick 22 rather than 10. As a hack, you could try changing That said, maybe your device does want alpha (notice that the two highest scores lack alpha.) Maybe a non-comformant config is not so bad after all. In that case, maybe we could try replacing -[Unknown] |
Presently it selects config With
With |
Hm. I'd be perfectly happy to have it count as 99/100, mostly I'd want to continue avoiding That 10 and 22 behave differently means that we're missing something about 22 that makes it a non-option, though. It'd be nice to figure out which other egl config attribute it has that is different from 10... -[Unknown] |
I'll have a look at my Ladybird Book of OpenGLES Programming and see what other attributes I can test for. Will let you know what I find. |
Nailed it. The only difference is the bitmasks for Config 10
Config 22
|
See hrydgard#12049: * Require EGL_WINDOW_BIT more strongly. * Allow EGL_NON_CONFORMANT_CONFIG (but still not EGL_SLOW_CONFIG.)
Ah, we definitely want an EGL_WINDOW_BIT config. Boosted its priority significantly in #12097. For more on why we use heuristics here, this seems to explain it well: -[Unknown] |
Thanks for the reading and the issue resolution! So with all this behind us, is it still worth me putting the extra debugging that was used here into a PR? With the config attributes and bitmask breakdowns Perhaps as a command line option e.g |
Yeah, I think that's a good idea, if it's not too bothersome. |
Not at all. |
What happens?
Black screen at start up.
Audio and controls continue to work.
What should happen?
Image on screen.
What hardware, operating system, and PPSSPP version? On desktop, GPU matters for graphical issues.
The OSMC box Vero4k (Amlogic S905x). EGL GLES2 FBDEV
We had this a year ago. A work around, which still works here, was to first run:
fbset -fb /dev/fb0 -g 1920 1080 1920 2160 16
It was finally fixed by heuristics in #11188 .
First time building this year and the bug is back. Bisected back to commit
e715fe0
Specifically this change (sorry can't seem to quote from commits...):
SDL/SDLGLGraphicsContext.cpp
Line 151
- score += (colorScore + alphaScore) * 10;
+ score += colorScore * 10 + alphaScore * 2;
I never could get my head around the heuristics. Would you accept a PR to bypass this for the platform, or can I help in testing alternative code?
Many Thanks
The text was updated successfully, but these errors were encountered: