Skip to content
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

GPU interop features now don't require to skip the first frame and available earlier in general #14651

Merged
merged 1 commit into from
Feb 20, 2024

Conversation

kekekeks
Copy link
Member

  1. Added Compositor.TryGetDefaultCompositor() API. For platform where we have a default compositor, it can be usable to obtain GPU UUID/LUID during early initialization rather than waiting for the first window to be shown
  2. Reworked the way the render context features are exposed, now they are cached on GPU context creation and are available to the UI thread without the need for a render loop tick

@avaloniaui-bot
Copy link

You can test this PR using the following package version. 11.1.999-cibuild0045067-beta. (feed url: https://nuget-feed-all.avaloniaui.net/v3/index.json) [PRBUILDID]

/// created by the current platform backend.
///
/// This won't work for every single platform backend and backend settings, e. g. with web we'll need to have
/// separate Compositor instances per output HTML canvas since they don't share OpenGL state.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we have a plan about providing compositor instance for specific render targets before avalonia toplevel created? Like html pages.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We probably can, yes. Might also be worth doing for things like DrmOutput for the purposes of showing a splash screen early.

@maxkatz6 maxkatz6 merged commit 7fb2663 into master Feb 20, 2024
7 checks passed
@maxkatz6 maxkatz6 deleted the feature/default-compositor-instance branch February 20, 2024 05:48
@kekekeks kekekeks added the backport-candidate-11.0.x Consider this PR for backporting to 11.0 branch label Feb 23, 2024
maxkatz6 pushed a commit that referenced this pull request Feb 24, 2024
…ailable earlier in general (#14651)

# Conflicts:
#	src/iOS/Avalonia.iOS/Platform.cs
@maxkatz6 maxkatz6 added backported-11.0.x and removed backport-candidate-11.0.x Consider this PR for backporting to 11.0 branch labels Feb 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants