GPU Interop on Windows, Android, MacOS, iOS #20970
PhilippeMonteil
started this conversation in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
GPU Interop on Windows, Android, MacOS, iOS
I am trying to find a way to inject GPU renderings in a Skia rendered Avalonia interface
on Windows, Android, MacOS and iOS.
I have explored two approaches, one based on a Composition and the other on Custom Draw Operations.
They seem to be promising on Windows, Android, MacOS but to be both deadlocks on iOS as briefly described below.
Composition
Based on the Avalonia/GpuInterop project DrawingSurfaceDemoBase.cs module,
I have tried to obtain the necessary ICompositionGpuInterop interop like this :
I obtain the following debug on the various platforms :
That is : a null on iOS which seems to make the approach impossible on that platform.
Custom Draw Operations
I obtain the following debug on the various platforms :
The Windows, Android and MacOS platforms seem to give access to some IGlContext interface.
The iOS platform seem to give access to an instance of the MetalDevice private class,
exposing the Avalonia.iOS.Metal.MetalDevice public interface :
IMetalDevice exposes a pair of .Device / .CommandQueue members which might give access to the underlying
Metal Device and CommandQueue.
Those members are private and I couldn't find a way to access them ...
Beta Was this translation helpful? Give feedback.
All reactions