Fix surfaces only compatible with first enabled backend #5535
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.
Suggestion cannot be applied right now. Please check back later.
Connections
Description
Both instances and surfaces are supposed to be created for all backends. This has some major drawbacks (see e.g. #2384 - creation of one halsurface may preclude creation of another halsurface), but this is how things were assumed to be working. Only that they didn't and we only created a single
AnySurface
with only the first successfully create hal surface!This PR sets things right again and removing
AnySurface
in the process since there's not much use to it anymore.We now create hal surface for each available hal instance. Error handling had to change a bit for this (not super happy with it, but will do).
Some small renames & doc additions as well.
Testing
Checklist
cargo fmt
.cargo clippy
. If applicable, add:--target wasm32-unknown-unknown
--target wasm32-unknown-emscripten
cargo xtask test
to run tests.CHANGELOG.md
. See simple instructions inside file.