Quantcast
Channel: Games for Windows and the DirectX SDK
Viewing all 72 articles
Browse latest View live

VS 2017 (15.5 update)

$
0
0

The Visual Studio 2017 (15.5 update) is now available for download, and you should see the 'new update available' notification in the coming weeks--you can also get the update now by downloading the 'free trial' version of the installer which will let you update your system. This is second major update to the 19.x C++ compiler with a focus on C++17 conformance and bug fixes.

The latest VS 2017 Redistribution packages are available (x86, x64), as well as the Remote Debugging Tools (x86, x64). For more on the Visual Studio 2017 (15.5) update, see the release notes.

Compiler and CRT

VS 2017 (15.5) includes a new version of the C/C++ complier (19.12.25830). See this blog post for details on the latest C++17 Standard conformance as well as MSDN.

The /permissive- switch can be specified with a new VC++ project element <ConformanceMode> instead of having to use <AdditionalOptions> starting with the 15.5 update. Newly created VC++ project templates after the 15.5 update will include this element by default except for those that have C++/CX (/ZW) enabled.

Note: Per this blog post, the _MSC_VER value is now 1912 instead of 1910 or 1911

Side-by-side compiler versions: The 15.5 update also supports selecting the older 15.4 compiler (which was basically the same as the 15.3 compiler with a fix hotfixes) with new side-by-side support. In the installer go to the Individual Components tab and check VC++ 2017 version 15.4 v14.11 toolset. This is intended for use in diagnosing potential compiler regressions should you encounter them as it's enabled via manually updating a specific .props file on your system.

std::function: If you make use of this aspect of the STL as I do in DirectX Tool Kit et al, you should read this blog post about some debugging improvements in 15.5.

The C/C++ Runtime (14.12.25810) is included in this update. Remember that VS 2015 and VS 2017 share the same runtime redistributable binaries and that VS 2015 Update 3 is binary compatible with VS 2017--code or static library built with one can be linked to the other--, so this is the latest version for both.

Related: Windows 10 Fall Creators Update SDK (15.4), VS 2017 (15.3 update)Windows 10 Creators Update SDK (15.1/15.2), Visual Studio 2017 (15.0)


DirectX and UWP on Xbox One

$
0
0

With the release of the Fall Creators Update (October 2017) for Xbox One, UWP apps can now opt into expanded resources as was announced in this Windows Blog post. Details about UWP on Xbox One can be found on MSDN, but in this blog post I’ll be talking about a few technical issues and specifics I encountered while updating the UWP samples on the Xbox-ATG-Samples GitHub and working with the UWP versions of my Direct3D Game template.

Game mode

By default all UWP apps run on the Xbox One (which must support either the “Universal” or “Xbox” device family and be built for the x64 architecture) run in a shared system mode with a subset of system resources with the remainder of the system resources reserved for games. With the latest version of the OS, a UWP app can declare itself a ‘Game’ which will give it access to additional memory, CPU, and GPU resources.

When an application is published, this is handled by Windows Store metadata that indicates it is a ‘Game’ rather than an ‘App’. During development, you manually set the package’s type to ‘Game’ via the DevHome interface.

First, build & deploy the application package to the Xbox One. Then using the Xbox One game controller, highlight the package in DevHome’s Games & apps list:

Then press the View button to bring up the context menu:

Go down to the bottom to View details and press the A button:

This brings up the App details page and the App type field should be selected. Use the combo box to set it to “Game” by pressing A, down on the D-pad, and then pressing A again. Then press B to return to the main page.

When you start the application, it will be running in Game mode.

Note that the “expandedResources” restricted capability in the Appx manifest still exists, but it’s use is deprecated. While I make use of it in some of the ATG samples to simplify deployment, any UWP submitted to the Windows Store will fail submission if it makes use of this restricted capability.

Note: You can also use the Xbox Device Portal (Windows Device Portal on Xbox) to configure your Xbox One to default to “Game” rather than “App” for newly deployed development apps as of the November 2017 update. If you change this setting, keep in mind that if you also want to develop a non-game application, you should explicitly set it to ‘App’ using the instructions above.

DirectX 11

For UWP on Xbox One, the DirectX 11 device is supported using Direct3D Feature Level 10.0. This is still true in Game mode, although you have significantly more GPU resources available to you than when you run as an ‘App’.

The default DirectX 11 device creation for a UWP app typically includes the 9.3 and later Direct3D feature levels:

D3D_FEATURE_LEVEL lvl[] =
{
    D3D_FEATURE_LEVEL_11_1,
    D3D_FEATURE_LEVEL_11_0,
    D3D_FEATURE_LEVEL_10_1,
    D3D_FEATURE_LEVEL_10_0,
    D3D_FEATURE_LEVEL_9_3
};

In practice Direct3D Hardware Feature Level 10.0 provides a significant set of capabilities suitable for many games:

Supported for DirectX 11 (UWP on Xbox One) Not supported
Shader Model 4.0 Shader Model 5

DirectCompute

Geometry Shader and Stream Out Tessellation/Hull Shaders
BC1/BC2/BC3/BC4/BC5 BC6H/BC7
1D, 2D, 3D Textures

1D and 2D Texture Arrays

Cubemaps

Cubemap arrays
Instancing, Alpha-to-coverage, Event queries MSAA texture per-sample shaders
8092 maximum texture size

Note that in development mode, if you try to create a DirectX 11 device and do not provide the option of using D3D_FEATURE_LEVEL_10_0, then you will end up with a WARP software device rather than the much faster hardware device. Remember also that WARP it not supported for retail Xbox One machines.

See Anatomy of Direct3D 11 Create Device for more details on DirectX 11 device creation.

DirectX 12

For UWP on Xbox One, DirectX12 is supported as Direct3D Hardware Feature Level 12.0 while in Game mode.

Note that in development mode, if you try to create a DirectX 12 device while not in Game mode, you will end up with a WARP software device rather than the much faster hardware device. Remember also that WARP it not supported for retail Xbox One machines.

See Anatomy of Direct3D 12 Create Device for more details on DirectX 12 device creation.

Game controller usage

If you are using the Direct3D app model for your game rather than XAML or Direct3D+XAML, an important thing to note is that you need to handle the BackRequested navigation event. This event is generated whenever the B button is pressed on the Xbox One game controller, and if not handled it will result in the application being suspended as control is returned to DevHome (or the previous app). Typically Direct3D games would use Windows.Gaming.Input (or the XINPUT emulator library xinput_uap.lib) to react directly to the use of the B button as appropriate to the game control scheme rather than rely on the notion of a ‘page stack’.

See also GamePad in the DirectX Tool Kit (DX11 / DX12).

C++/CX

If using C++/CX (a.k.a. /ZW) then you can implement this as follows:

virtual void SetWindow(CoreWindow^ window)
{
    ...
    auto navigation =
        Windows::UI::Core::SystemNavigationManager::GetForCurrentView();
    navigation->BackRequested +=
    ref new EventHandler<BackRequestedEventArgs^>(this,
        &ViewProvider::OnBackRequested);
}

void OnBackRequested(Platform::Object^,
    Windows::UI::Core::BackRequestedEventArgs^ args)
{
    // UWP on Xbox One triggers a back request whenever the B
    // button is pressed which can result in the app being
    // suspended if unhandled
    args->Handled = true;
}

C++/WinRT

If using the C++/WinRT projections, then you can implement this as:

void SetWindow(CoreWindow const & window)
{
    …
    auto navigation = SystemNavigationManager::GetForCurrentView();
    // UWP on Xbox One triggers a back request whenever the B
    // button is pressed which can result in the app being
    // suspended if unhandled
    navigation.BackRequested([](const winrt::Windows::Foundation::IInspectable&,
        const BackRequestedEventArgs& args)
    {
        args.Handled(true);
    });
}

4K

For UWP on Xbox One apps, the system always indicates a window size of 1920 x 1080 (i.e. 1080p). If the TV is running as 4K on an Xbox One S or Xbox One X, the swapchain content is automatically scaled up by the display hardware.

It is also possible to create a native 4k swapchain, but it’s recommended you only do this while running on an Xbox One X. You can check which device the UWP is running on via a new Windows 10 Fall Creators Update SDK (16299) API:

#include "Gamingdeviceinformation.h"
…
GAMING_DEVICE_MODEL_INFORMATION info = {};
GetGamingDeviceModelInformation(&info);
if (info.vendorId == GAMING_DEVICE_VENDOR_ID_MICROSOFT)
{
    switch (info.deviceId)
    {
    case GAMING_DEVICE_DEVICE_ID_XBOX_ONE:
    case GAMING_DEVICE_DEVICE_ID_XBOX_ONE_S:
        // Keep swapchain at 1920 x 1080
        break;

    case GAMING_DEVICE_DEVICE_ID_XBOX_ONE_X:
    case GAMING_DEVICE_DEVICE_ID_XBOX_ONE_X_DEVKIT:
    default: // Forward compatibility
        m_outputWidth = 3840;
        m_outputHeight = 2160;
        break;
    }
}

Note that if your UWP app has a Target Platform Minimum Version before 10.0.0.16299, then you need to guard the use of GetGamingDeviceModelInformation as follows:

#include <libloaderapi2.h>
extern "C" IMAGE_DOS_HEADER __ImageBase;
…
// Requires the linker settings to include
// /DELAYLOAD:api-ms-win-gaming-deviceinformation-l1-1-0.dll

if (QueryOptionalDelayLoadedAPI(
    reinterpret_cast(&__ImageBase),
    "api-ms-win-gaming-deviceinformation-l1-1-0.dll",
    "GetGamingDeviceModelInformation",
    0))
{
    GAMING_DEVICE_MODEL_INFORMATION info = {};
    GetGamingDeviceModelInformation(&info);
    if (info.vendorId == GAMING_DEVICE_VENDOR_ID_MICROSOFT)
    {
        switch (info.deviceId)
        {
        case GAMING_DEVICE_DEVICE_ID_XBOX_ONE:
        case GAMING_DEVICE_DEVICE_ID_XBOX_ONE_S:
            // Keep swapchain at 1920 x 1080
            break;

        case GAMING_DEVICE_DEVICE_ID_XBOX_ONE_X:
        case GAMING_DEVICE_DEVICE_ID_XBOX_ONE_X_DEVKIT:
        default: // Forward compatibility
            m_outputWidth = 3840;
            m_outputHeight = 2160;
            break;
        }
    }
}

You set the delay load via the Visual C++ project settings:

If you use a native 4k swapchain on Xbox One X and the TV is in a 1080p mode, then image is downscaled automatically by the display hardware which does have the effect of ‘super-sampling’ for better image quality. In other words, if you decide to render at native 4k, you should do so regardless of the TV setting.

HDR

UWP on Xbox One apps have limited access to the High-Dynamic Range (HDR) capabilities of the Xbox One S and the Xbox One X. For games looking to implement HDR, contact the ID@Xbox program.

Tools

The Visual Studio Graphics Diagnostics (a.k.a. VSPIX) supports UWP on Xbox One.

Note that neither the Xbox PIX nor the “new” PIX tool currently support UWP on Xbox One.

Related: Windows 10 Fall Creators Update SDK

DirectXMesh Update

$
0
0

The February 2018 release of DirectXMesh is available on GitHub. I wanted to call attention to this release in particular because I discovered an important and long-standing bug in the library that is now fixed.

First, the good news: I have implemented a vertex welding algorithm similar to the legacy function D3DXWeldVertices, and I've added support for Tom Forsyth's Linear-speed Vertex Cache Optimisation algorithm as an alternative to the Hugh Hoppe Transparent Vertex Cache Optimization algorithm that was originally ported from the deprecated D3DX9 library. The meshconvert tool was updated with a new -oplru switch to use the Forsyth algorithm, and the DirectX SDK Samples Content Exporter now supports an -optimization switch to control the algorithm selection as well (see the wiki for details).

To support vertex welding (which results in a number of 'unused' vertices), I also added a new helper function CompactVB. In the course of that work I realized that FinalizeVB, FinalizeVB, and FinalizeVBAndPointReps were all applying the vertex remap backwards. The original D3DX9 codebase used both kinds of vertex maps: oldLoc = vertexRemap[newLoc] and newLoc = vertexRemap[oldLoc]. The D3DX9 library and DirectXMesh are intended to expose only the first version maps to the client code (which is the most useful for copying around related attributes), but internally there are a number of places you need to use the inverse. It turns out I was returning the correct vertex remaps from OptimizeVertices, but then applied them incorrectly with my remap functions--but they were consistent so it still rendered correctly. Unfortunately this means it was always making the vertex buffer less efficient. Ooops. My bad. I've improved my test suite and the documentation here as well as fixing the remap functions.

Wavefront OBJ: In the December 2017 release I fixed the WaveFrontReader.h helper to support 'relative' indices which were missing from the original sample implementation I used to create the header, and in February 2018 I made a few more robustness improvements. The February 2018 versions of meshconvert and the uvatlas tool now use this improved version.

NuGet: The DirectXMesh library is now available on NuGet as well. I provide a Win32 desktop package suitable for use with VS 2015 Update 3 or VS 2017, as well as a UWP version.

Related: DirectXMeshDirectXTex and DirectXMesh now support Direct3D 12

VS 2017 (15.6 update)

$
0
0

The Visual Studio 2017 (15.6 update) is now available for download, and you should see the 'new update available' notification in the coming weeks--you can also get the update now by downloading the 'free trial' version of the installer which will let you update your system.

The latest VS 2017 Redistribution packages are available (x86, x64), as well as the Remote Debugging Tools (x86, x64). For more on the Visual Studio 2017 (15.6) update, see the release notes.

Compiler and CRT

VS 2017 (15.6) includes a new version of the C/C++ complier (19.13.26128). See this blog post for details on the latest C++17 Standard conformance as well as MSDN. Notably this includes some compile-time improvements, as well as better linker performance when doing /DEBUG:fastlink and map-file generation.

Note: Per this blog post, the _MSC_VER value is now 1913 instead of 1910, 1911, or 1912.

The C/C++ Runtime (14.13.26020) is included in this update. Remember that VS 2015 and VS 2017 share the same runtime redistributable binaries and that VS 2015 Update 3 is binary compatible with VS 2017--code or static library built with one can be linked to the other--, so this is the latest version for both.

Related: VS 2017 (15.5 update), Windows 10 Fall Creators Update SDK (15.4), VS 2017 (15.3 update)Windows 10 Creators Update SDK (15.1/15.2), Visual Studio 2017 (15.0)

GitHub, NuGet, and VSTS

$
0
0

There are April 2018 releases on GitHub for DirectX Tool Kit (DX11 / DX12), DirectXTex, DirectXMesh, and UVAtlas. These were more minor releases focused on code quality, fixing a few bugs, and cleaning up some new /analyze issues based on the C++ Core Checker rules that will be appearing in Visual Studio 2017 (15.7 update) which is currently in preview.

I’m mentioning these because there are some changes happening with NuGet where I’ve also been publishing new releases of many of these libraries that has some important implications I wanted to announce.

The Good

NuGet packages are getting support for digital signing, which means better security when consuming signed packages in your applications. Packages published by Microsoft now also have more official organizational ownership rather than being published by individual Microsoft developers private Microsoft Accounts.

See this NuGet blog post for more details.

To support digital signing, I’m setting up Visual Studio Team Services (VSTS) build support for my libraries so they can be more officially built than just sitting on my machine. Much of Microsoft’s internal processes have migrated to using VSO for building including my group’s samples work, so this is generally all goodness and it’s been a good learning experience making use of the cloud-based build services.

The Bad

One consequence of moving to the VSO build solution, however, is that I need to drop support for Visual Studio 2013, Windows Store 8.1, and Windows Phone 8.1. The VSO hosted build services support VS 2015 and VS 2017, so I will continue to support VS 2015 Update 3 & VS 2017 for Win32 desktop applications for Windows 7 SP1 or later, Universal Windows Platform (UWP) apps, and Xbox One XDK development.

As such, the April releases above will be the last to support Visual Studio 2013, Windows Store 8.1, or Windows Phone 8.1. The existing NuGet packages for these platforms are still available (directxtk_desktop_2013, directxtk_windowsstore_8_1, directxtk_windowsphone_8_1, and fx11_desktop_2013), but will no longer receive any updates--much like I had already done for the Windows Phone 8.0 package (directxtk_windowsphone_8) when I dropped VS 2012 support some time ago.

Mine are not the only open source packages from Microsoft so affected, so expect most of them to be dropping these platforms as well.

As an aside, this change is good news for me. This greatly reduces the number of configurations I maintain and let’s me focus on the more complete C++14 language and Standard library conformance in VS 2015 or later with a lot of messy conditional compilation. I realize it’s a potential hardship on some users of these libraries, but you can continue to use the April 2018 or earlier releases.

Note that Xbox One XDK development never supported VS 2013.

The Ugly

Another consequence of the move to the VSO build solution is that I can’t make use of the legacy DirectX SDK in those solutions that are published as NuGet packages. For the most part I don’t need the legacy DirectX SDK for anything since that’s one of the main motivations for doing these libraries in the first place. There is, however, one specific scenario that still require the legacy DirectX SDK: XAudio 2.7 support for Windows 7.

Up through the April 2018 release, the NuGet directxtk_desktop_2015 package includes DirectXTKAudioDX.lib which uses XAudio 2.7 to support Windows 7, but I will now have to make it include the DirectXTKAudioWin8.lib instead for the May 2018 and later versions of the NuGet package. That means if you using a project that is set up to use DirectX Tool Kit for Audio with Windows 7 (_WIN32_WINNT set to 0x0600 or 0x0601), you’ll now get a build failure including "Audio.h" or trying to link. The newer Win32 desktop NuGet packages will work fine if you are building for Windows 8 or later (_WIN32_WINNT set to 0x0602, 0x0603, or 0x0A00).

Use of the DirectXTKAudioDX.lib already required some gymnastics with the legacy DirectX SDK and imposed specific deployment requirements using legacy DirectSetup. If you need DirectX Tool Kit for Audio support on Windows 7, I recommend you move to using project-to-project references instead of the NuGet package.

The Win32 desktop NuGet package will still be built for Windows 7 SP1 support for the graphics, input, and math functionality so this only affects you if you are using DirectX Tool Kit for Audio. There are also no issues when using the UWP packages since XAudio 2.8 or later is always available on those platforms.

Windows 10 April 2018 Update SDK

$
0
0

The Windows 10 April 2018 Update (a.k.a. Version 1803) is now available along with the Windows 10 SDK (10.0.17134). The new SDK can be installed via VS 2017 (15.7 update) [currently in Preview] or as a standalone installer. This release includes some updates to DirectX 12, DirectWrite, and DXGI. See What’s New in Windows 10 for developers, build 17134.

VS 2015 Users: The Windows 10 SDK (15063, 16299, 17134) is officially only supported for VS 2017.

C++/WinRT: The new C++/WinRT headers for this Windows SDK are included. You no longer need to make use of the GitHub project (which is now archived) or the NuGet package when using C++/WinRT projections for the latest Windows 10 SDK. See this blog post.

Related: Windows 10 SDK RTM, Windows 10 SDK (November 2015), Windows 10 Anniversary Update SDK, Windows 10 Creators Update SDK, Windows 10 Fall Creators Update SDK

VS 2017 (15.7 update)

$
0
0

The Visual Studio 2017 (15.7 update) is now available for download, and you should see the 'new update available' notification in the coming weeks--you can also get the update now by downloading the 'free trial' version of the installer which will let you update your system.

The latest VS 2017 Redistribution packages are available (x86, x64), as well as the Remote Debugging Tools (x86, x64). For more on the Visual Studio 2017 (15.7) update, see the release notes.

Compiler and CRT

VS 2017 (15.7) includes a new version of the C/C++ complier (19.14.26428). See this post and MSDN for details on the changes to C++ conformance.

Note: Per this blog post, the _MSC_VER value is now 1914 instead of 1910, 1911, 1912, or 1913.

The C/C++ Runtime (14.14.26405) is included in this update. Remember that VS 2015 and VS 2017 share the same runtime redistributable binaries and that VS 2015 Update 3 is binary compatible with VS 2017--code or static library built with one can be linked to the other--, so this is the latest version for both.

Windows 10 SDK: When installing a fresh copy of VS 2017 (15.7) the default Windows 10 SDK is now the April 2018 Update (17134). Also note that the Windows 10 SDK (17134) is once again one VS install component (Microsoft.VisualStudio.Component.Windows10SDK.17134) instead of multiple components (Microsoft.VisualStudio.Component.Windows10SDK.*.Desktop, Microsoft.VisualStudio.Component.Windows10SDK.*.UWP, Microsoft.VisualStudio.Component.Windows10SDK.*.UWP.Native) as it was for 15063 / 16299.

C++/WinRT: With the Windows 10 SDK (17134), you no longer need to use the GitHub project or NuGet package to obtain the C++/WinRT projection headers as they are now a part of the Windows 10 SDK.

Static Analysis: The 15.7 update version of /analyze now includes part of the C++ Core Guidelines checkers in the default native ruleset. For more details, see this blog post. The current state of the new /analyze is quite a bit noiser than it was before, so I expect some further refinement in future releases. If you have <CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet> in your project files, you'll want to change it since that now pulls in all the C++ Core Guidelines Checker rules which is highly likely to be an overwhelming mass of new warnings.

__cpluplus: The preprocessor symbol __cplusplus is often used in guards like #ifdef __cplusplus to handle both C and C++ scenarios, but it also has a value that is supposed to indicate which C++ Standard the compiler conforms to. For various reasons, the Visual C++ compiler has been returning "199711" for ages. The 15.7 update includes a new compatibility switch /Zc:__cplusplus which will cause the Visual C++ compiler to report the proper value of "201402" (or "201703" if using /std:c++17). It is off by default because it has the potential to break a lot of code. Developers are strongly encouraged to turn on this switch and clean up their codebases for a future where this is on by default. See this blog post for more information.

Spectre mitigations: This update includes some changes to the Spectre mitigation compiler support. See this blog post for details.

GitHub: I've updated directx-vs-templates for VS 2017 (15.7) support.

I'm working on updates to DirectX Tool Kit (DX11 / DX 12), DirectXTex, DirectXMesh, and UVAtlas for the 15.7 update and expect to have new releases out in a few days. If you need the fixes sooner, take a look at the master branch for each project.

Related: VS 2017 (15.6 update), VS 2017 (15.5 update), Windows 10 Fall Creators Update SDK (15.4), VS 2017 (15.3 update)Windows 10 Creators Update SDK (15.1/15.2), Visual Studio 2017 (15.0)

VS 2017 (15.8 update)

$
0
0

The Visual Studio 2017 (15.8 update) is now available for download, and you should see the 'new update available' notification in the coming weeks--you can also get the update now by downloading the 'free trial' version of the installer which will let you update your system.

The latest VS 2017 Redistribution packages are available (x86, x64), as well as the Remote Debugging Tools (x86, x64). For more on the Visual Studio 2017 (15.8) update, see the release notes.

Compiler and CRT

VS 2017 (15.8) includes a new version of the C/C++ complier (19.15.26726). This includes some improvements to the SSA Optimizer, as well as some additional performance improvements for the linker. This also fixes some codegen bugs including this one.

A new C++ debugging feature in VS 2017 (15.8) known as "Just My Code" stepping (JMC). For more details, see this blog post.

There's a newly rewritten C++11/C99-compatible preprocessor in progress you can try out with /experimental:preprocessor. For more details see this blog post.

Note: Per this blog post, the _MSC_VER value is now 1915 instead of 1910, 1911, 1912, 1913, or 1914.

The C/C++ Runtime (14.15.26706) is included in this update. Remember that VS 2015 and VS 2017 share the same runtime redistributable binaries and that VS 2015 Update 3 is binary compatible with VS 2017--code or static library built with one can be linked to the other--, so this is the latest version for both.

C++/WinRT: The current C++/WinRT headers in the Windows 10 SDK (17134) are not fully compatible with the latest implementation of /permissive- in VS 2017 (15.8). This will be fixed in the next Windows 10 SDK. For now you can work around the issue leaving Conformance Mode enabled by adding /Zc:twoPhase- to the Additional Options project setting. You can also can try a Windows Insider SDK Preview.

Xbox One: By default /JMC is enabled with VS 2017 (15.8) in Debug configurations which can lead to a link error when using the Xbox One XDK (unresolved symbol __CheckForDebuggerJustMyCode). You can easily resolve this by going to your project settings under C/C++ -> General and setting "Support Just My Code Debugging" to "No", and then rebuild. This will be fixed in a future Xbox One XDK QFE at which time you can re-enable this feature if desired.

JMC: If you are shipping static libraries built from C++ code using VS 2017 (15.8), you probably want to turn off JMC anyhow to avoid forcing your customers to use 15.8, which otherwise would be compatible with 15.5, 15.6, and/or 15.7 as well. BTW, if you want the same static library to also work with VS 2015, then you are probably better off producing it with VS 2015 Update 3.

Static analysis: As I mentioned with the VS 2017 (15.7 update), the /analyze switch now includes some C++ Core Guidelines checker rules per this blog post. With VS 2017 (15.8 update), a fair amount of the 'noise' introduced with this change has been addressed.

GitHub: I've updated DirectX Tool Kit (DX11 / DX12), DirectXTex, DirectXMesh, and UVAtlas with changes for VS 2017 (15.8), mostly for /analyze cleanup. There's also a new release of directx-vs-templates with a few minor tweaks.

Related: VS 2017 (15.7 update), VS 2017 (15.6 update), VS 2017 (15.5 update), Windows 10 Fall Creators Update SDK (15.4), VS 2017 (15.3 update)Windows 10 Creators Update SDK (15.1/15.2), Visual Studio 2017 (15.0)


Windows 10 October 2018 Update

$
0
0

The Windows 10 October 2018 Update (a.k.a. Version 1809) is now available along with the Windows 10 SDK (10.0.17763). The new SDK can be installed via VS 2017 (15.8.6 update) as an optional update or as a standalone installer. This release includes some updates to DirectX 12, DirectWrite, DXGI, and DirectXMath. See What’s New in Windows 10 for developers, build 17763.

DirectX Raytracing: This release of the OS and SDK includes DirectX Raytracing. For more details, see this blog post.

VS 2015 Users: The Windows 10 SDK (15063, 16299, 17134, 17763) is officially only supported for VS 2017.

C++/WinRT: The C++/WinRT headers included in this release of the Windows 10 SDK have a number of updates and improvements, with a few breaking changes. For details, see the docs.

Related: Windows 10 SDK RTM, Windows 10 SDK (November 2015), Windows 10 Anniversary Update SDK, Windows 10 Creators Update SDK, Windows 10 Fall Creators Update SDK, Windows 10 April 2018 Update SDK

DirectXMath 3.13

$
0
0

DirectXMath version 3.13 is now available on NuGet and GitHub. It is included in the Windows October 2018 Update SDK (17763), which jumps from version 3.11 which shipped in both the Windows 10 Fall Creators Update SDK (16299) and the Windows 10 April 2018 Update SDK (17134). Basically, I missed getting DirectXMath 3.12 into the April 2018 update cycle. For historic purposes you can find 3.12 on GitHub and NuGet as well, and this was the last version to support the Visual C++ 2013 compiler.

DirectXMath 3.12

The changes for this version were fairly minor, and are all included in the DirectXMath 3.13 release as well.

  • ARM64 use of fused multiply-accumulate intriniscs
  • Conformance fix for XMConvertFloatToHalf
  • Minor code cleanup

DirectXMath 3.13

This version includes some conformance fixes, and supports VS 2015 and VS 2017. I was able to build the code cleanly with both the Intel C++ 18.0 compiler and the clang 6 toolset, but only for conformance as I didn't verify the code-generation correctness. This version also includes some new types to improve interop with the new DirectX Raytracing API.

  • XMFLOAT3X4, XMFLOAT3X4A, and associated Load/Store functions
  • Move/copy constructors and assignment operators for C++ types
  • Minor fix for XMVectorClamp behavior with NaN
  • Fixed compilation warnings with VS 2017 (15.7 update), Intel C++ 18.0 compiler, and clang 6
  • Retired VS 2013 support
  • Minor code cleanup

NuGet: Note the version number schemed for NuGet packages changed from "3.1.3" to the publishing date and build number "2018.7.23.2". This was part of updating the build process to support NuGet signing, and indeed the DirectXMath 3.13 NuGet package is digitally signed.

Related: Known Issues: DirectXMath 3.03, DirectXMath 3.06, DirectXMath 3.07, DirectXMath 3.08, DirectXMath 3.09, DirectXMath 3.10, DirectXMath 3.11

VS 2017 (15.9 update)

$
0
0

Visual Studio 2017 (15.9 update) is now available for download, and you should see the 'new update available' notification in the coming weeks--you can also get the update now by downloading the 'free trial' version of the installer which will let you update your system. This release includes support build ARM64 UWP apps and C++17 <charconv> for float.

Note that 15.9 is the last minor update for VS 2017, although it will continue to get servicing updates. The VS 2017 Preview channel has been updated to match VS 2017 (15.9).

The latest VS 2017 Redistribution packages are available (x86, x64), as well as the Remote Debugging Tools (x86, x64). For more on the Visual Studio 2017 (15.9) update, see the release notes.

Compiler and CRT

VS 2017 (15.9) includes a new version of the C/C++ complier (19.16.27023.1). This includes a number of bug fixes as well as language conformance improvements. See this blog post for more details, as well as Microsoft Docs.

Note: Per this blog post, the _MSC_VER value is now 1916 instead of 1910, 1911, 1912, 1913, 1914, or 1915.

Servicing: 15.9.2 updates the C++ compiler to 19.16.27024.1

The C/C++ Runtime (14.16.27012) is included in this update. Remember that VS 2015 and VS 2017 share the same runtime redistributable binaries and that VS 2015 Update 3 is binary compatible with VS 2017--code or static library built with one can be linked to the other--, so this is the latest version for both.

GitHub: The Direct3D Game UWP templates on directx-vs-templates now including the ARM64 platform configurations when using VS 2017.

Windows 10 SDK: This release includes the Windows 10 SDK (October 2018) which was also available an optional component for VS 2017 (15.8.6 or later).

Xbox One XDK: There is a known issue for this update that is fixed in 15.9.1. See this announcement for details (requires access)

Related: VS 2017 (15.8 update), VS 2017 (15.7 update), VS 2017 (15.6 update), VS 2017 (15.5 update), Windows 10 Fall Creators Update SDK (15.4), VS 2017 (15.3 update), Windows 10 Creators Update SDK (15.1/15.2), Visual Studio 2017 (15.0)

DirectXMath: ARM64

$
0
0

The Visual Studio 2017 (15.9 update) now supports the ARM64 architecture for the Universal Windows Platform (UWP) apps.

The ARM64 platform supports ARM-NEON using the same intrinsics as the ARM (32-bit) platform. The Windows on ARM (32-bit) platform assumes support for ARMv7, ARM-NEON, and VFPv3. The Windows on ARM (64-bit) platform assumes support for ARMv8, ARM-NEON, and VFPv4.

ARMv8

The ARMv8 instruction set implies support for several useful intrinsics for DirectXMath data types:

  • vector divide: vdivq_f32
  • vector rounding: vrndq_f32, vrndnq_f32, vrndmq_f32, vrndpq_f32
  • half-precision conversion: vcvt_f32_f16, vcvt_f16_f32
  • fused-multiply and accumulate: vfmaq_f32, vfmsq_f32

In ARM (32-bit), vector division had to be implemented using multiply-by-reciprocal with 2 or 3 iterations of Newton-Raphson refinement which is less precise. For the ARM64 platform, I was able to replace all uses of divide in non-Est functions with a ‘true divide’ in XMVectorDivide, XMVectorReciprocal, and in the implementation for a number of other functions.

For ARM (32-bit) I used a number of tricks to perform the rounding operations. With the ARM64 platform, I can use the new intrinsics to implement XMVectorRound, XMVectorTruncate, XMVectorFloor, and XMVectorCeiling.

The half-precision conversion intrinsics are used when building for the ARM64 platform to implement XMConvertHalfToFloat, XMConvertFloatToHalf, XMConvertHalfToFloatStream, and XMConvertFloatToHalfStream.

History

  • DirectXMath 3.07 was the first version to include basic ARM64 support using the same ARM-NEON implementation as used for ARM (32-bit).
  • DirectXMath 3.10 uses ARMv8 intrinsics when building the _M_ARM64 architecture for optimizations of specific functions including the new XMVectorSum horizontal add function.
  • DirectXMath 3.12 uses ARM64 fused-multiply and accumulate to implement XMVectorMultiplyAdd and XMVectorNegativeMultiplySubtract on the ARM64 platform.

See also: SSE. SSE2. and ARM-NEON; SSE3 and SSSE3; SSE4.1 and SSE4.2; AVX; F16C and FMA; AVX2

Viewing all 72 articles
Browse latest View live