Black Screen on some machines

Started by
6 comments, last by L. Spiro 8 years, 4 months ago

Hello,

we are getting reports from Radeon users that they only get a black screen when they run the game

https://github.com/GlPortal/glPortal

This has not been reported for other hardware than the Radeon so far.

I wonder: How do I even start debugging anything like this? We have some error logs when shader compilation errors occur and GL version does not match but all of them look fine.

Any help is welcome.

Advertisement

Buy a cheap Radeon card, for the same series that your users are reporting issues. You can pick up an R7 240 for ~$60 these days, which shares enough architecture with the current high-end to diagnose most issues. You may not want to spend the money, but I can assure you that diagnosing AMD driver issues remotely from an NVidia setup is a really terrible idea.

If I had to guess at the issue you are facing, it's almost certainly that AMD's GLSL compiler is much more rigorous about enforcing the specification. NVidia's GLSL compiler has a notoriously sloppy history of accepting technically invalid shaders.

Tristam MacDonald. Ex-BigTech Software Engineer. Future farmer. [https://trist.am]

Try testing with the OpenGL reference compiler. It might catch a few issues not detected by a less strict compiler.

Hello to all my stalkers.

Thank you. I did install the reference compiler and ran it on all the shaders but glslangValidator did not throw an error. This is how I called the compiler for example "glslangValidator data/shaders/unshaded.frag". I also checked the terminal output of GlPortal again. OpenGL-Version is 44 and no error when compiling the shaders with the game.

I can assure you that diagnosing AMD driver issues remotely from an NVidia setup is a really terrible idea.

That is why I am using a Radeon to diagnose the issue. I can reproduce the Issue on a machine here. If it is an issue with the shaders then Radeon does a good job of hiding it and glslangValidator, too. Since the shaders compile on both without complaint.

We had some issues on Radeon, which were caused by performing textures updates on a different thread than the rendering (thus having the need to share GL context).

Tbh I hardly understand what it says, but it may point you in the right direction.


OpenGL-Version is 44 and no error when compiling the shaders with the game.

So are you saying that your OpenGL-Version that your game uses is 4.4, or that the reference compiler used 4.4? In the former case, 4.4 is still rather quite new (Juli 2013) and it wouldn't suprise me if a lot of hardware didn't support it. You said that there have only been reports from Radeon users so far, but since I do not know how many reports you got you may consider it this is merely coincidence and may correlate with ie. old hardware. Are you checking for whether the OpenGL-Version you are using is supported when starting the game? I'm pretty sure unless checked explicitely you will just get a black screen and no error/crash.

Add sanity checks to the final stage of your shader(s).
If +InF, return red, if -InF, return green, if NaN return blue.
If negative, return yellow.

Find out which case it is and then look carefully for divisions by zero or almost-zero, etc.
Replace parts of your lighting equations with sane constants rather than throughput data. Do this starting close to the end of your shaders and progressively moving further towards the start of your shaders until the screen turns black again.


L. Spiro

I restore Nintendo 64 video-game OST’s into HD! https://www.youtube.com/channel/UCCtX_wedtZ5BoyQBXEhnVZw/playlists?view=1&sort=lad&flow=grid

This topic is closed to new replies.

Advertisement