Fix antialiasing modes being determined from the wrong graphics adapter #10669
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
This results in the list of available antialiasing modes being updated; before, it would only show the modes available for the adapter that was selected when the graphics window was opened (or the backend was last changed).
The list of available modes is updated by
GraphicsWindow::OnBackendChanged's call toVideoBackendBase::PopulateBackendInfoFromUI, and thenEnhancementsWidget::LoadSettingsupdates the UI. Both of these are connected to theGraphicsWindow::BackendChangedsignal.I have a dedicated NVIDIA GeForce GTX 1650 Ti GPU and also an integrated Intel GPU; the NVIDIA one supports up to 8x AA while the Intel one supports 16x (but becomes horrendously slow in that case). The D3D "Microsoft Basic Render Driver" also claims to support 16x AA (but I don't think it actually does anything there). If you have an NVIDIA GPU, the easiest way to reproduce the issue is to set the adapter to the NVIDIA GPU and the backend to D3D 11, then change the backend to D3D 12, then look at the list of AA modes (which should show 8x as the max), then change the adapter to the basic render driver, then look at the list of AA modes again (which should still show 8x as the max), and then switch the backend to D3D 11 and then back to D3D 12 and then look at the list of AA modes (which should now show 16x as the max for the basic render driver).