Sample Directx + xaml windows apps in VS 2013 RRS feed

  • Question

  • I execute Sample Directx + xaml windows apps in VS 2013 (Cube apps)

    But, I cannot found create directx device method in this sample source code.

    Does automatically create directx device? then, how can I change CreateDevice.FPUPreserve flag when creating the device.

    And I have one more question. 

    I find out that when executing that sample project(directx + xaml), two directx device is create. why two directx device is create?

    Thursday, November 6, 2014 2:06 AM

All replies

  • Hi Yonghyeok Lee,

    I'm not sure which sample you are referring to, but as I know D3D11CreateDevice is the one that can create directx device. For more information you can get from: DirectX and XAML interop

    But I don't know which sample you are asking therefore I cannot explain to you why two DX devices are created.


    MSDN Community Support

    Please remember to "Mark as Answer" the responses that resolved your issue. It is a common way to recognize those who have helped you, and makes it easier for other visitors to find the resolution later.

    Friday, November 7, 2014 1:22 AM
  • Direct3D 11 does not modify the FPU settings like Direct3D 9 did. The CreateDevice.FPUPreserve flag therefore does not apply to Windows Store or Windows phone DirectX+XAML apps.

    Friday, November 7, 2014 5:33 AM
  • Thank you for your answer!

    If so,  which one do Windows Store or Windows phone DirectX+XAML apps use between double precision or single precision?

    Friday, November 7, 2014 6:27 AM
  • For Windows x86 applications the default x87 FPU control word is 'double-precision, round-to-nearest'. There's no MSVC support for the extended 80-bit precision mode.

    The FPU control word is a feature of the legacy x87 architecture. It is used by default for x86 applications, but for Windows Store apps you can use /arch:SSE2 (all Windows 8.x x86 and x64 machines must support SSE2) and it will behave like x64. x64 does not use x87 at all and instead uses SSE2 always for floating-point math. With SSE2, you don't have a control word controlling the precision. Instead if you use float, you are using 32-bit precision and if you are using double, you are using 64-precision. The FPU control word has no impact on this behavior with SSE2. With ARM devices, there is also no x87 FPU. Windows RT uses ARM VFP3 and ARM-NEON. This is why _MCW_PC is not supported with _control_fp_ for ARM or x64.

    Friday, November 7, 2014 4:24 PM
  • Thank you for all your assistance!

    You means Windows Store apps can use /arch:SSE2, so FPU Control word no impact on this type.

    Then when I use /arch:IA32 options instead of  SSE2, Can I execute Windows Store or Windows phone DirectX+XAML apps using by single precision? or have an effect FPU control word?

    Thank you for reading.

    Tuesday, November 11, 2014 5:20 AM