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

Support the latest Direct3D API #3996

Open
JensNordenbro opened this issue Jan 13, 2021 · 14 comments
Open

Support the latest Direct3D API #3996

JensNordenbro opened this issue Jan 13, 2021 · 14 comments

Comments

@JensNordenbro
Copy link

As I understand it WPF does not use the latest versions of Direct3D.
This disallows GPU backed HW-acceleration for certain scenarios.

Implement support for latest Direct3D.

@lindexi
Copy link
Contributor

lindexi commented Jan 14, 2021

@JensNordenbro See #85

@JensNordenbro
Copy link
Author

@lindexi, that would be Nice but it does not seem to be in Microsofts interest right now.
I hope this change is not to big and it would create value!

@ryalanms ryalanms added this to the Future milestone Jan 14, 2021
@JensNordenbro
Copy link
Author

JensNordenbro commented Jan 24, 2021

I could also imagine wpf being layered on top of low level WinUI apis as a part of project Reunion. Wpf in net7, net8 does not have to be 100 procent compatible between versions...it is more important that the graphics pipeline is being cared for.

Maybe microsoft/Win2D#707 can have additional Project Reunion synergies.

@xiejiang2014
Copy link

see this https://github.com/Mikolaytis/WpfSkiaAngleSharpDxOpenTK

Use SkiaSharp, OpenTK ,complete hardware acceleration, high frame rate, no "airspace" problem.
But there are still some small problems,
App crash on PC Sleep and other Device Lost events.

More details: https://github.com/mono/SkiaSharp/issues/745

@JensNordenbro
Copy link
Author

JensNordenbro commented Feb 21, 2021

Hi @xiejiang2014!
I tried the Demo in the repo but in only showed a white window and then crashed a couple of seconds later.

Also that repo is using OpenGL and not in line with my goal of having WPF targeting the lastest DirectX/Direct3D API so that all components can be accelerated by the native Windows approach of UI acceleration.

  • As I understand it this would only allow me to add "alien" content to WPF that is accelerated through OpenGL ?!

@JensNordenbro
Copy link
Author

JensNordenbro commented Nov 15, 2021

Maybe https://devblogs.microsoft.com/directx/open-sourcing-direct3d-9-on-12-and-the-release-of-the-dxbc-signer-nuget-package/#comments can be used as an intermediary.

@lindexi
Copy link
Contributor

lindexi commented Nov 16, 2021

See https://github.com/microsoft/D3D9On12

@gaetandezeiraud
Copy link

gaetandezeiraud commented Nov 18, 2021

I do not have the skills on WPF to do the integration of D3D9On12. But seems a good solution. Need a try to see if it breaks things.

Edit: I trying to implement it. I do not guarantee anything.
First, I assume that all DX9 related code is inside WpfGfx (https://github.com/dotnet/wpf/tree/89d172db0b7a192de720c6cfba5e28a1e7d46123/src/Microsoft.DotNet.Wpf/src/WpfGfx)

@JensNordenbro
Copy link
Author

JensNordenbro commented Nov 30, 2021

Sounds good ; Let me know if you acheive some success and maybe I can try on my ARM64 device.

@gaetandezeiraud
Copy link

I got a little carried away. And I haven't had time to look into it yet.

@chrisk414
Copy link

Epic just released Unreal5 and their latest tech, Ninite, only runs under DX12. I tried to host UE5(DX12) on wpf and it failed. Yeah other UE4 app runs just fine with WPF.

So, my question is, is WPF ever going to get DX update? If not, has anyone succeeded hosting DX12 app? Unable to host UE5 is a deal-breaker for me and I would appreciate if you can help.

Many thanks.

@gaetandezeiraud
Copy link

WPF is dead. Try Avalonia UI.

@glyad
Copy link

glyad commented Aug 24, 2022

Avalonia

Dear @Brouilles, thousands of apps developed with WPF aren't dead and require to add new features. When I'll be able to run WPF based apps on Avalonia without to change a single line of the code, I'm promising you, I'll start to use Avalonia.

@greatawesome
Copy link

Avalonia

Dear @Brouilles, thousands of apps developed with WPF aren't dead and require to add new features. When I'll be able to run WPF based apps on Avalonia without to change a single line of the code, I'm promising you, I'll start to use Avalonia.

That day might be here: https://avaloniaui.net/XPF

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

8 participants