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

DX12+XAML for UWP template #135

Closed
thecobblersfather opened this issue Apr 11, 2016 · 14 comments
Closed

DX12+XAML for UWP template #135

thecobblersfather opened this issue Apr 11, 2016 · 14 comments
Labels
enhancement samples Issues related to Samples

Comments

@thecobblersfather
Copy link

I brought this up the other day in a closed thread, so I am creating a new one. Feel free to tell me to close this one if needed.

Has there been any update on the DX12+XAML for UWP template? I am currently developing a C#/C++ Direct2D application and have run into an issue creating my SwapChainPanel.

@bobbrow
Copy link
Member

bobbrow commented Apr 12, 2016

Can you help me understand why you're choosing to use DX12 for a Direct2D application? Direct2D is using D3D11 under the hood, so if you're using only Direct2D, I recommend you stick with the D3D11+XAML for UWP template for now.

The DX12+XAML template is close to being ready for GitHub, but higher priority stuff keeps preempting my work on it. I suppose I could release it in its current state in a branch off of develop until I feel it's ready for prime time.

@thecobblersfather
Copy link
Author

thecobblersfather commented Apr 18, 2016

I chose DX12 simply because I assumed being 12 vs 11 was the most up to date version of DX. For DX12, is there a specific issue one should be wary of that is the preventing factor in not publishing the template? Something that I could know to look out for?

@walbourn
Copy link
Member

walbourn commented Apr 18, 2016

Direct3D 12 is intended for graphics experts looking to have maximal control over the CPU usage, memory, and GPU/CPU synchronization. As such, it is significantly more challenging to use than DirectX 11. Direct3D 11.3 on Windows 10 can use all the same hardware features as Direct3D 12 including D3D_FEATURE_LEVEL_12_0 and D3D_FEATURE_LEVEL_12_1. Also keep in mind that there are no drivers that support DX12 at this time for Feature Level 10.1, 10.0, or 9.x hardware so addressing those devices requires DX11. Just because "12 is greater than 11" does not mean DX12 is the right choice for your project.

@jxl98c
Copy link

jxl98c commented May 27, 2016

Whilst I appreciate you may have answered the original post there are plenty of other people in the community who would like to see this sooner rather than later. A lot of us have been stung in the past by having to migrate through numerous major revisions of Direct3D.

I for one would like to keep my code base on the latest revision so that when I want to use some whizz-bang feature in the future I do not have to jump from D3D11 to D3D13 and have a migration horrorshow on my hands because we all followed the advice and stuck with what was 'just good enough'.

I think it is perfectly reasonable to expect someone with only a Direct2D requirement to want to have their codebase on the latest version - if only for maintenance sake.

@weltkante
Copy link

weltkante commented May 27, 2016

@jxl98c you seem to not understand what D3D12 is, and its relation to D3D11.

There is no point migrating to D3D12 if you are "just using Direct2D" because Direct2D is based on D3D11; so why would you port to D3D12 if you have to put a D3D11 interop device on top of it anyways to use D2D? You gained nothing.

D3D11 and D3D12 are living alongside and have different target audiences, D3D12 is not a successor to D3D11 (maybe D3D13 will be). It probably was a mistake to name it D3D12 and they should have made a new name.

@jxl98c
Copy link

jxl98c commented May 27, 2016

@weltkante - I understand perfectly what D3D12 is and its relation to D3D11 and probably should have clarified in my post.

I am not using Direct2D, My reference to it was actually only in relation to the comments in the original post. I am currently working on procedural terrain generation and a Spherical ROAM algorithm which is computationally heavy and written entirely using Direct3D (not 2D) and I would like this to be based on the current version of Direct3D+XAML in a UWP app for a number of reasons.

I may consider offloading some of the work on to the GPU at some point and D3D12 may make that easier (or perhaps I wont). Either way, it doesn't really matter does it? The answer should either be "we have no intention to provide this" or "we are working on it" or "here it is", instead of trying to get into the heads of developers who are trying to be creative, and second guess their motives.

I also work with a lot of clever Mathematics boffins who also happen to be C# developers (I work for a leading finance company) and given that most of my optimisation work is centred around complex mathematical simplification and I'd like to share some of my problems - a XAML app would let me port it to C# too (SharpDX perhaps) and give others an opportunity to share my workload.

Whilst I'm sure there are other options, and alternative implementations, I should point out that Microsoft are dying (have just died?) in the mobile market and everyone is whining about the lack of decent applications / games. When people in the community ask for a D3D12+XAML for UWP sample I guess I'd expect them to jump at the chance to offer it.

Ultimately, I guess it's just something I expect to be provided for the platform.

Definitely Direct3D...

40357_1475679644460_6091090_n
40357_1475679724462_1210291_n
40357_1475679764463_3731838_n

@walbourn
Copy link
Member

A Direct3D 12 + XAML with C++ code-behind is probably doable today, but C# requires some Direct3D 12 assemblies. I believe SharpDX has Direct3D 12 support.

@bobbrow
Copy link
Member

bobbrow commented May 27, 2016

I don't think we've been dodging the answer to this question. I opened Issue #20 for this long ago and also mentioned in this thread that I have a working version of it but haven't made it available yet.

I apologize if this isn't meeting anyone's timelines for mobile right now, but please be aware that there aren't any Windows Phones on the market today that support D3D12.

If enough people want this I can bump up the priority on it, but the real motivating factor here is that we have received very little feedback about the lack of the D3D12+XAML template and have been focusing on other things as a result of that.

@jxl98c
Copy link

jxl98c commented May 27, 2016

Thanks for the speedy response @walbourn. SharpDX does indeed have Direct3D12 support but they are awaiting a Direct3D12+XAML UWP sample in C++ before they port it to SharpDX. They currently only have samples for what is on here on. I've tried a number of different attempts to get this working myself but keep failling when it comes to wiring up a SwapChain to a SwapChainPanel (or something like that - I've not got the code to hand).

@jxl98c
Copy link

jxl98c commented May 27, 2016

@bobbrow - yes, sorry, you did mention you had been working on it - I got myself worked up and forgot you'd mentioned that :-)

There are a few people asking for it on various forums - perhaps not on here. There seems to be a renewed interest in it now that the XBone has the new developer mode - it's certainly why I have renewed interest.

I'm aware the phones don't support it yet (maybe they never will) but I do have a 950XL and I know that Qualcomm and MS did do a collaboration to ensure that the GPU is DX12 compatible, even if it's not currently feature ready in the OS.

@bobbrow
Copy link
Member

bobbrow commented May 27, 2016

That's fair feedback. Let me recompile what I have, write some notes, and get it up on a branch off of develop.

@jxl98c
Copy link

jxl98c commented May 27, 2016

That would be really useful @bobbrow and I appreciate the effort. The universal app is pretty magic and I'm surprised it doesn't get more interest from the likes of Android / iOS developers when they could target XB, Windows Phone and Windows in one go. If people can get good DX12 support on it from their favourite language and XAML too then it would be pretty sweet.

@bobbrow
Copy link
Member

bobbrow commented May 27, 2016

I just published a new branch with the template in it. I haven't gone back to see if all of the recent changes I've made to the DX12-only template have been applied to this version since I've been sitting on this code for months, but this should serve as a starting point for anyone who is interested in XAML.

https://github.com/Microsoft/DirectX-Graphics-Samples/tree/feature_xaml_template/Templates/DirectX12XamlApp

@bobbrow
Copy link
Member

bobbrow commented May 27, 2016

If there are any more XAML-related questions, please feel free to open a new issue. I believe the original issue has now been addressed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement samples Issues related to Samples
Projects
None yet
Development

No branches or pull requests

5 participants