magdesign / Vidifold

Wiki and Bug report repo for https://vidifold.com
3 stars 0 forks source link

Vidifold requests the wrong OpenGL context #24

Closed DavidHaitch closed 4 years ago

DavidHaitch commented 4 years ago

When starting the application, the splash screen displays an error: "requires 4.3 minimum shader version". However, when I run glxinfo, I get the following info about my OpenGL version:

OpenGL core profile version string: 4.5 (Core Profile) Mesa 20.0.8
OpenGL core profile shading language version string: 4.50
OpenGL version string: 3.0 Mesa 20.0.8
OpenGL shading language version string: 1.30

The log file shows that Vidifold sees the shader version as 1.30, suggesting that it's requesting the "compatability" version instead of the core one.

See the log file here: VIDIFOLD-logfile.txt

ghost commented 4 years ago

Hi @DavidHaitch

Thanks for the report, its an known issue.

VIDIFOLD relies on the response from the drivers when querying the available shading language version. Late in the day I've discovered that it's possible to have multiple OpenGL 'profiles'. I was a bit behind the times when I started the project. I'm not currently detecting and selecting a profile but relying on the default.

It is something that really bothers me, but I wanted to get other functionality tied down first and I haven't been able to source a setup that would reproduce the problem yet (pretty limited resources). From many years of experience, attempting to fix something that you can't reproduce is usually a very long and painful path to take, but I might have to start down that path now.

This is one of the last 'big' annoyances and I'll be prioritising this issue for the near future, I hope I can find some way to work on it and hope the solution isn't going to require large chunks of refactoring!

FYI: to be honest I'm not even sure that the check I've put in is useful, you can bypass it by running the app from the command line with the argument 2 ie: VIDIFOLD 2

ghost commented 4 years ago

After reading around my suspicion is, until I can get a similar setup to confirm, that I'll have to declare it requires an compatibility mode with up to date shader support, I think that's is what I'm seeing on the few machines here.

It looks like all the reports I've had on this are using 'Mesa' drivers. and I've found a ref to 'On Mesa (latest) the non-core OpenGL does not support GLSL versions higher than 1.3 (this is intentional)' I'm not the only application that has problems with this, even Minecraft has struggled. (eg: https://github.com/sp614x/optifine/issues/420)

ghost commented 4 years ago

some interesting options / information here https://docs.mesa3d.org/envvars.html

ghost commented 4 years ago

Oh dear, by coincidence my system corrupted this eve, I've had to upgrad to Ubuntu 20.04 and remove my AMD drivers. So... I've currently got a system with: Mesa 20.0.8

my output from glxinfo is:

OpenGL core profile version string: 4.5 (Core Profile) Mesa 20.0.8 OpenGL core profile shading language version string: 4.50 OpenGL core profile context flags: (none) OpenGL core profile profile mask: core profile OpenGL core profile extensions: OpenGL version string: 4.5 (Compatibility Profile) Mesa 20.0.8 OpenGL shading language version string: 4.50

well, this should be interesting to see how far I get this working again.

ghost commented 4 years ago

hmm... its a bit slower (maybe half/third the speed, I might need to start optimizing) but seems to be running OK, got added bonus that the vsync seems to work! (which prob accounts for fps difference) . Looking good, need to check for other knock on effects.

ghost commented 4 years ago

Hi @DavidHaitch

Sorry to say, but for the time being VIDIFOLD requires a compatibility profile which supports 4.5 shader version. Just another note is it's only built on Ubuntu at this time, so it probably wont work on anything else. I might progress this to 4.5 core at some point but not just yet, I'm trying to get other things finished off first.

ghost commented 4 years ago

Hi @DavidHaitch

Sorry to say, but for the time being VIDIFOLD requires a compatibility profile which supports 4.5 shader version. Just another note is it's only built on Ubuntu at this time, so it probably wont work on anything else. I might progress this to 4.5 core at some point but not just yet, I'm trying to get other things finished off first.