-
-
Notifications
You must be signed in to change notification settings - Fork 1.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
use WaveformWidgetType::AllShaderRGBWaveform as autoChooseWidgetType #11822
Conversation
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.
LGTM
However this makes me think what is the best way to get rid of the old GLSL types that are known buggy #11786 #11399 #9589 with MIXXX_USE_QOPENGL defined.
How about remove the enum value "WaveformWidgetType::AllShaderRGBWaveform = 17" and use the old "WaveformWidgetType::GLSLRGBWaveform = 12" value for both conditionally via the MIXXX_USE_QOPENGL macro? We may do this for all GLSL types.
The drawback is that the 2-4-alpha use that have selected a different "All Shaders" type will end up with RGB.
What do you think?
A related issue is #8639 btw.
So this changes the default, but how do we make sure that existing installations also get changed on update? |
You mean map the legacy types to the respective new type? |
How about my idea to just remove the enums for the All Shader types and instead replace the GLSL type with them according to the MIXXX_USE_QOPENGL macro. This allows a smooth transition forward and backward between 2.3 and 2.4 and users without accelerated types are not bothered. |
That still leaves people on the GL variants which are also broken. |
For my understanding the Shader variants have higher GPU requirements than the GL variants. So I consider the GL users use them for some reasons. At least when they where introduced they did not run everywhere. What is the situation now? |
At least we check But anyway, the question of migrating users from GL to All-Shaders can be decided separate form the question to use one settings for GLSL and All Shaders depending on the Mixxx version/build flags. |
not sure. I think its pretty safe now. The shaders all only require OpenGL 2.1 and might also be compatible with OpenGL ES. But I have no experince with GLES so idk. |
I expect the all-shaders waveform types to be faster on all platforms and they should work on OpenGL ES (I haven't tested this but I don't see why not). I would advocate for forcing all users that upgrade to 2.4 to the default (RGB all-shaders) either by using the upgrade mechanism @ronso0 mentioned (not in front of a computer so not sure about this) or by bumping the value of the old enums to a higher value so the switch will fail on fall back to the default (but they will still be available for selection). |
I would also like to change the default fps to 60, as it should run smooth even on older hardware and the initial impression is much nicer. What do you think? |
With all the discussion here and in zulip, and looking at the code, it's still not clear to me what it is we want to do. So let me resume what I think it the objective:
Is this correct? If so, I don't think it's worth it bothering with 4.b. and 5.b.; we could simply move all users to "RGB (all-shaders)", users that changed the waveform type in the past will know how to change it again. |
In my opinion, this is completely correct, though I don't know whether every team member agrees with me here.
Right, its not super necessary, but IMO trivial enough to implement (just a giant switch case mapping in a separate function somewhere) that we should still do it. Though I'm willing to change my opinion if it turns out that it does require more work than the 20 SLOC I estimate for that switch-case. |
As ronso0 pointed out already (thank you). The config migration is likely trivial to implement here: mixxx/src/preferences/upgrade.cpp Line 453 in 28ad941 |
The most work for me. Did you consider the idea to hard replace the GLSL types with the all Shader types? This way we don't even need to migrate any config. We can do the same for the GL types if we are confident they are no longer needed and buggy anyway. This is all around the question if there is hardware that has openGL but no OpenGLShaderProgram::hasOpenGLShaderPrograms() From the history of Mixxx I remebers some issues with badly configured GPU drivers. There is also a blacklist in Qt. But things may have changed. My old EPC was able to use the GL waveforms with Qt4 but not with Qt5. And how about devices using Angle? The 60 Hz default is a good idea in any case. |
Yes, I would be very happy to remove all the old waveform types and it would certainly make things easier. I think that by now the all-shaders waveform types have been thoroughly tested, they out-perform the other waveform types (which in addition have known issues), the code is cleaner and has been through much more scrutiny. All the redundancy is not user friendly and increases maintenance burden. An additional advantage would be getting rid of the "(all-shaders)" tag. I never have been happy with that nomenclature. But honestly I don't think this is my decision to make. So I'll do this if there is consensus that this is the way to go. In any case, I would not remove the implementations, only the possibility to select them. We could even add a command line option --showAllWaveformTypes. I am pretty sure that hardware that doesn't support this very basic OpenGL used by the all-shaders waveforms will not be able to run Mixxx decently anyway! |
Yes I did consider that but I have thre issues with that. In ascending importance:
Right, that's one of the reasons for 3. If people experience issues, they can reported them and we can instruct them to manually switch back. |
Ok, those are valid points, @Swiftb0y . But in that case I do think it would be good to not only actively move users to the all-shaders waveform types (in upgrade.cpp), but also to mark the other waveform types as "legacy". This way old and new users will understand that the all-shaders ones are the ones to use by default. And it allows me to get rid of the "all-shaders" label ;-) Would that work for you? |
Yes, lets mark them as legacy. |
Okay, I'll add these changes to this PR. |
…pes, relabel the legacy types as (legacy)
95229d4
to
27490c0
Compare
I have made the following changes, which I hope match what we discussed and agreed upon:
While doing the mapping I realized I never added the all-shader implementation of the HSV waveform type (which got lost in some branch). I have added this. To test if the upgrade mechanism works, you will either have to edit your mixxx.cfg file and set the Version to 2.3.9, or you will have to set(MIXXX_VERSION_PRERELEASE "") in the CmakeLists.txt |
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.
Thank you very much for your continued time-consuming effort. I have a couple minor comments.
Co-authored-by: Swiftb0y <12380386+Swiftb0y@users.noreply.github.com>
Co-authored-by: Swiftb0y <12380386+Swiftb0y@users.noreply.github.com>
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.
LGTM otherwise. Also please go back and rewrite the last couple of commits to apply pre-commit on the failing commit. Thank you
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.
Thank you. waiting for CI and someone more knowledgeable to clear up my unresolved review comment.
@Swiftb0y your comment has been resolved, right? The upgrades are now all in ascending version order. I have tripple checked and I am sure the code is correct. Besides, it's all a bit academic; apart from the upgrade I added, the remaining upgrade code is for versions that are very old. I would like to see this PR approved and merged as soon as possible. It is unfortunate to have to tell people all the time "Try 2.4, but please make sure you change the waveform type first" 😅 |
If I see this right, @ronso0 wants to have a final look here. But he's away from keyboard for some days. |
Not quite, since I'm also not super familiar with upgrade.cpp I'd just be that second pair of eyes. I doubt I find time before sunday, so if we're in a hurry someone else needs to take a look. |
Ping! |
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.
ronso0 seems busy so I took another review lap. Found this minor nitpick but LGTM otherwise.
Thanks, @Swiftb0y . I applied your suggested change. |
src/preferences/upgrade.cpp
Outdated
case WWT::GLSLRGBStackedWaveform: | ||
return WaveformWidgetType::AllShaderHSVWaveform; | ||
case WWT::QtHSVWaveform: | ||
return WaveformWidgetType::AllShaderHSVWaveform; |
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.
case WWT::GLSLRGBStackedWaveform: | |
return WaveformWidgetType::AllShaderHSVWaveform; | |
case WWT::QtHSVWaveform: | |
return WaveformWidgetType::AllShaderHSVWaveform; | |
case WWT::GLSLRGBStackedWaveform: | |
case WWT::QtHSVWaveform: | |
return WaveformWidgetType::AllShaderHSVWaveform; |
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.
And I assumed we always declare the default:
case, but I'm not sure whether that is a rule or just habit.
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.
Good catch, but your suggestion looks wrong. Do this instead:
case WWT::GLSLRGBStackedWaveform: | |
return WaveformWidgetType::AllShaderHSVWaveform; | |
case WWT::QtHSVWaveform: | |
return WaveformWidgetType::AllShaderHSVWaveform; | |
case WWT::GLSLRGBStackedWaveform: | |
return WaveformWidgetType::AllShaderRGBWaveform; | |
case WWT::QtHSVWaveform: | |
return WaveformWidgetType::AllShaderHSVWaveform; |
And I assumed we always declare the default: case, but I'm not sure whether that is a rule or just habit.
I'm not sure either. In this case it doesn't really make a difference. If there is no default:
then it will just execute the following code... IMO its better to have an unconditional return statement at the end of the function instead of having a return statement in all possible branches. But that's a style choice really...
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.
Good catch, but your suggestion looks wrong. Do this instead:
Yes, I didn't check the upgrade behaviour in detail, just the proposed code, so yeah: migrating RGB -> RGB makes sense, of course.
Yes, I was busy and afk, and this slipped off my ToDo list tbh, sorry for that. |
Co-authored-by: Swiftb0y <12380386+Swiftb0y@users.noreply.github.com>
9aa0f46
to
f569ff0
Compare
I rebased the last 3 commits (grouping per case, use of WWT) into 1 commit, not sure if I should have done that. |
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 rebased the last 3 commits (grouping per case, use of WWT) into 1 commit, not sure if I should have done that.
Thank you, that's perfect. LGTM
Now the box looks more overcrowded than ever. I think it needs some love. |
No description provided.