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

GpuInterop sample doesn't work with SkiaSharp v3.118 and not Vulkan backend #18238

Open
VladimirDrobyshev opened this issue Feb 18, 2025 · 2 comments

Comments

@VladimirDrobyshev
Copy link
Contributor

Describe the bug

The GpuInterop sample from avalonia sources doesn't work after adding reference to the SkiaSharp v3.118 to the project and disabling RenderingMode.Vulkan:

Image

To Reproduce

Add following string to the ItemGroup with references in the GpuInterop.csproj file:
<PackageReference Include="SkiaSharp" Version="3.118.0-preview.2.3" />
And comment following strings in the Program class:

        public static AppBuilder BuildAvaloniaApp() =>
            AppBuilder.Configure<App>()
                .UsePlatformDetect();
        // .With(new Win32PlatformOptions
        // {
        //     RenderingMode = new []
        //     {
        //         Win32RenderingMode.Vulkan
        //     }
        // })
        // .With(new X11PlatformOptions(){RenderingMode =new[] { X11RenderingMode.Vulkan } })
        // .With(new VulkanOptions()
        // {
        //     VulkanInstanceCreationOptions = new VulkanInstanceCreationOptions()
        //     {
        //         UseDebug = true
        //     }
        // })
        // .LogToTrace(LogEventLevel.Debug, "Vulkan");

Expected behavior

Sample works correct

Avalonia version

11.2.4

OS

Windows

Additional context

No response

@maxkatz6
Copy link
Member

You can also include SkiaSharp.NativeAssets.Win32 reference explicitly, just in case Avalonia used 2.88 one.

Are there any relevant logs in the output? Exceptions (making sure Rider is configured to break on all exceptions)?

@VladimirDrobyshev
Copy link
Contributor Author

You can also include SkiaSharp.NativeAssets.Win32 reference explicitly, just in case Avalonia used 2.88 one.

Are there any relevant logs in the output? Exceptions (making sure Rider is configured to break on all exceptions)?

Directly includding NativeAssets doesn't help.
Also there is no exceptions and console/debug output is empty.

Image

I can introduce that Teapot is rendered on gpu, but in case of Win32RenderingMode.AngleEgl mode image is not correctly passes to the avalonia backend.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants