-
-
Notifications
You must be signed in to change notification settings - Fork 6.3k
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
RetroPlayer: Fix black screen for RGB emulators on some GLES platforms #16421
Conversation
|
||
void main () | ||
{ | ||
vec4 rgb; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Suggestion for all of main
. Simplify the code and not read the 4th component of the texture since it's not used:
void main ()
{
vec3 rgb = texture2D(m_samp0, m_cord0.xy).rgb;
#if defined(KODI_LIMITED_RANGE)
rgb *= (235.0 - 16.0) / 255.0;
rgb += 16.0 / 255.0;
#endif
gl_FragColor = vec4(rgb, 1.0);
}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I just tried this and games work, but now GUI textures are having the invisible problem
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hm weird, it should be functionally the same.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Must have been stale build files, because I retried your suggestion and found that I made a typo. With the typo fixed, everything works. I'm adding your suggestion to the PR.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I just tried this and games work, but now GUI textures are having the invisible problem
I'm seeing a similar issue with OSMC builds. Invisible logos under MyOSMC. Tested using the latest commit as well.
Created a test image for RPi 2: https://github.com/kodi-game/LibreELEC.tv/releases/tag/v9.1-20190901 |
Uploaded a new image (had a report the last one got corrupted): https://github.com/kodi-game/LibreELEC.tv/releases |
Received a report that the new image also fixes black screen. @VelocityRa @gusandrianos look good? |
@garbear Not sure what you're talking about... I have yet to add GLES and so far, I haven't noticed any black screen issues, neither on Nvidia nor on Intel GPUs |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@gusandrianos was about another issue, not w/ your shaders
lgtm
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@VelocityRa Yeah, my mistake.
Also lgtm
Could this be merged and backported to Leia, please? |
Fixes black screen with RGB emulators on RPi.
4abc24a
to
5425277
Compare
Updated for Rechi's style comment. Will merge the PR when jenkins is happy. |
Sorry, I missed the 18.5 cutoff. If there's talk of 18.6 I'll do a backport. |
@garbear please always set milestone before or right after merging a PR. |
I know triage isn't fun, but it would be nice if important bugs (like this one) would be labeled or added to a milestone so it wouldn't be forgotten like this. Especially the milestones functionality of GitHub would make it easy to ensure nothing important gets left behind. Or at least postponing it becomes a deliberate decision, and not an oversight. The problem with milestones here is that you can't have two milestones set (i.e. one for Leia and one for Matrix) |
@garbear do the backport, and providing there are some fixes to release I will do a 18.6 release. It is as near we can get to doing RERO |
Backport PR is open with test build based on LE 9.2: #16969 EDIT: Build is here: https://github.com/kodi-game/LibreELEC.tv/releases/tag/v9.2-20191126 |
RetroPlayer: Fix black screen for RGB emulators on some GLES platforms
Description
This PR fixes the black screen shown in emulators across some GLES platforms.
The problem is visible during gameplay, when the screen is black. However, when the game is paused and the menu appears, the video is correctly shown under the dialog.
The fix adds a new GLES shader that sets the alpha bits to 0xff, removing transparency issues.
Motivation and Context
Fixes kodi-game/game.libretro.stella#5 and others.
Addresses the bug mentioned in #15771
How Has This Been Tested?
Tested using Stella emulator on RPi 3 running LibreELEC.
Types of change