Direct3D 12 UWP Sample

The sample upgrades the DirectX App (Windows Universal) template in Visual Studio 2015 to Direct3D 12.  The sample gives developers a starting point for developing Universal Apps on top of Direct3D 12.

C++ (72.4 KB)
5 Star
4,080 times
Add to favorites
E-mail Twitter Digg Facebook
Sign in to ask a question

  • Getting error message: The Windows SDK version ( was not found.
    2 Posts | Last post October 16, 2015
    • Complete error message:
      The Windows SDK version ( was not found. Install the required version of Windows SDK or change the SDK version in the project property pages or by right-clicking the solution and selecting 'Retarget solution'
      I right-clicked on the solution and selected 'Retarget solution' but it only showed the Target Platform Version of 10.0.10240.0.  There was no way to change it to the DirectX 12 SDK.  Ideas?  thanks!
    • Never mind!  Somehow when I reloaded the directX samples (D3D12HelloWorld) into Visual Studio Community 2015 and then reloaded the DirectXApp, the DirectXApp build no longer gave this error message.
  • Problem with fence values
    4 Posts | Last post July 30, 2015
    • I think there is an issue in this code, causing possible performance loss. You designed MoveToNextFrame method to wait only for crossing fence for previous rendering of the same frame (buffer). Yet, in CreateWindowSizeDependentResources() you set all  m_fenceValues[] to the last signaled value, e.g. m_fenceValues[] = {2, 2, 2}. If this is an initial condition for MoveToNextFrame, then it kills potential efficiency and forces the app to wait until current frame rendering will cross the fence, instead of starting rendering to the next frame buffer. Shouldn't setting of m_fenceValues[] in CreateWindowSizeDependentResources() be followed by m_fenceValues[0]++; then?
    • Let me answer my question: this is not an issue, because WaitForGPU() is always called before MoveToNextFrame() and properly sets m_fenceValues[].
    • Hi And_K,
      Where are you seeing WaitForGPU always being called before MoveToNextFrame? It is called in CreateWindowSizeDependentResources as we need to "flush" all GPU work before the swap chain can be resized. It is not called again after that.
      At that point, all of the frame resources are freed up and available to be used, so the fence check in MoveToNextFrame can not result in a WaitForSingleObjectEx call until the app has submitted at least FrameCount frames to the GPU. This is similar to when the app first starts and all of the m_fenceValues are initialized to 0.
      Thanks for your interest in the sample.
    • Hi DXGT!
      I wronlgly stated it, I meant "always" as at each run of a program or after each "device lost" event - always before the first MoveToNextFrame().
      Thanks for a great job with this sample!