Require compatibility profile context when not forcing OpenGL ES - #16214
Require compatibility profile context when not forcing OpenGL ES#16214ry-gatoni wants to merge 1 commit into
Conversation
This prevents a potential version conflict between the context and packed shaders, which would result in shader compilation failure.
|
The code should run on GL and EGL. So picking here does not work. Or does it? Do you haven log of the errors you like to fix? |
|
As a first-time contributor we also need your signature at Mixxx Contributor Agreement (Please comment here when you have done). It gives us permission to distribute your contribution under the GPL v2 or later license and the Apple Mac App Store. It is also helpful for us to have contact information for contributors in case we may need it in the future. |
|
I've signed the agreement |
|
EGL and OpenGL are not mutually exclusive; EGL is often used to create an OpenGL context. |
|
It would take up too much space to include the full error logs, so I'll describe the general pattern and show some examples. warning [Main] QOpenGLShader::compile(Fragment): 0(3) : error C0201: unsupported version 120 warning [Main] *** Problematic Fragment shader source code *** #version 120 critical [Main] DEBUG ASSERT: "addShaderFromSourceCode( GLShader::Fragment, fragmentShaderCode)" in function void mixxx::Shader::load(const QString&, const QString&) at ./src/shaders/shader.cpp:23
|
|
I have two related PR: Do they help to avoid the crash in the first place? In this PR I have remove the version 120 requirement utilizing the QT compatible layer between GL and GLES. We may check the remaining version guards, but I am afraid the shaders are actually required the version. FORCE_GLES is a debug flag, I have introduced to check if GLES is working on my system which is GL by default. That's nothing we use in a release. If I understand correctly, Fedora uses Wayland in EGL mode for optimal compatibility and performance. This is also supported by Qt. |
|
Neither of those arguments or environment variables fix the problem. Neither of those PRs fix the issue either. The reason for the crash is indexing into an empty vector (in I can add an early return in |
|
The current approach is to not offer waveforms that are known to crash. Of cause replacing an actual crash by a VERIFY_OR_DEBUG_ASSERT is also a good practice, for that card the waveform selection verification fails. A separate PR would be nice. |
|
Did you had a second look here? The solution of this PR does not work, because it overrides the QT default. |
This prevents a potential version conflict between the context and packed shaders, which would result in shader compilation failure.
Fixes bug #16213
I'm not sure if altering the context is a good solution, or if it would be better to change the packed shader versions. I'd appreciate some feedback here.