What's New in DirectX 12? Understanding DirectML, DirectX Raytracing and DirectStorage

erek

Supreme [H]ardness
Joined
Dec 19, 2005
Messages
7,953
"Although everything we've covered here is really for developers to utilize and take advantage of, we're the ones who ultimately benefit, even though it will take some time before all such features are commonplace in games.

While the focus is still about creating ever more realistic graphics, especially as far as ray tracing is concerned, Microsoft have kept a keen eye on performance. This is because it's becoming increasingly more difficult for hardware vendors to create new products that are significantly more powerful that their predecessors, for a price tag that appeals to the majority of consumers.

Not everyone can afford nor wants to spend a $1,000 on a graphics card, just to run games at their highest settings and still get good frame rates. And publishers typically want their titles to reach as many consumers as possible, rather than just being for a select few.

All of which means that DirectX 12 Ultimate, and all its nifty enhancements, are going to be used to make better looking games, that all of us can enjoy."


https://www.techspot.com/article/2137-next-gen-directx-12/
 

Nafensoriel

Limp Gawd
Joined
Nov 23, 2015
Messages
382
I really don't care what DirectX 12 does until they actually release something ground up and built for modularity. The monolithic DX12 API has an absurd overhead for most applications compared to DX11.
It's nice they are innovating but beating a mule doesn't make it move faster and that's all these improvements seem to be doing.
 

socK

Supreme [H]ardness
Joined
Jan 25, 2004
Messages
4,230
I really don't care what DirectX 12 does until they actually release something ground up and built for modularity. The monolithic DX12 API has an absurd overhead for most applications compared to DX11.
It's nice they are innovating but beating a mule doesn't make it move faster and that's all these improvements seem to be doing.

What do you mean?
 

Lakados

Supreme [H]ardness
Joined
Feb 3, 2014
Messages
5,779
I really don't care what DirectX 12 does until they actually release something ground up and built for modularity. The monolithic DX12 API has an absurd overhead for most applications compared to DX11.
It's nice they are innovating but beating a mule doesn't make it move faster and that's all these improvements seem to be doing.
I’m not sure what you mean by built for modularity? It’s now the first version that is multi-platform as it is the same version used between Xbox and PC. Sure the dev kit is huge but it’s not like every program includes every part of the kit it all comes down to what parts are actually included in the project.
 

Nafensoriel

Limp Gawd
Joined
Nov 23, 2015
Messages
382
Actually, DX12 is better threaded and has lower overhead than DX11.

"Giving lower-end CPUs the freedom to utilize their resources more effectively can absolutely pay dividends for consumers on lower-end hardware."
For highly specialized uses yes this is true. For actual typical uses by actual developers(come on you know 90% of software is bubblegum and prayers) its not going to be more efficient. In most cases, DX12 has 10 to 20 times the overhead of a comparable DX11 title.
That's been the problem with DX12 from day one. It requires you use most of it to do anything "better". There is no "fast path" option. A game like Rimworld or Factorio will not benefit from the majority of DX12 and will in fact be punished by using it due to this overhead.
A TripA title with every bell and whistle and a great dev team will make it "comparable" to DX11(as shown by these graphs).

If the API was broken down slightly more you would see more lower end usages gain performance(and thus adoption) in DX12. Any increased overhead in higher end applications would be a drop in the bucket for general use. DX12 was simply built for AAA titles and feature bloat rather than efficiency. This is weird because the elements of DX12 that actually make it efficient also make it less efficient if the game in question does not utilize more CPU than GPU.
Take a small scene with 5 identical objects minus colour. In DX11 that's 5 different objects to the GPU and the draw calls hammer the CPU. You see this mostly in games like Planet Coaster where you can destroy your FPS by hitting that draw call limit placing 40k of the exact same rock everywhere. In DX12 you can tell the GPU "this is a rock" and then tell it "its red , white, or brown". The GPU then does far less tasks to draw many rocks and thus lowers CPU usage. What you functionally get is a more complex pipe of decisions(overhead) to do bulk tasks faster. If you don't need bulk tasks or your CPU is not limited then DX12 is utterly wasted in most cases which is why adoption has been so slow(that and lack of tools). In the PC game world you are almost universally limited by your CPU.

There will be a dozen people jump up to say "no PC games are GPU limited!" but this just isn't true. The nature of PC limits the CPU. This was the primary reasons consoles started out superior to PCs. They are GPU limited.
I like DX12. I think its very much needed. I just wish they'd accept that efficiency has to consider all options and not simply say "just use dx11 then".
 
  • Like
Reactions: erek
like this

Domingo

Fully [H]
Joined
Jul 30, 2004
Messages
20,971
Another thing that's new in DirectX 12 is stuttering in a pile of games. Stuttering that doesn't occur in the DX11 versions, too.
 
  • Like
Reactions: erek
like this

Silentbob343

[H]ard|Gawd
Joined
Aug 2, 2004
Messages
1,927
  • Like
Reactions: erek
like this

LukeTbk

2[H]4U
Joined
Sep 10, 2020
Messages
2,346
So...is direct storage available in windows 10 or not?

Seem to be available in a limited ways according to last summer news, without much details:
https://www.notebookcheck.net/Windo...-but-with-limited-functionality.551605.0.html

Microsoft is bringing the DirectStorage API to PCs as well. Now, it looked like this would be a Windows 11 exclusive feature to force users to jump on the new OS, but Microsoft recently clarified that DirectStorage is also coming to Windows 10. However, there is still an incentive to migrate to Windows 11, as the Win 10 DirectStorage implementation will not be as fast.

The Windows 10 compatibility is ensured through the DirectX 12 Agility SDK working in tandem with the DirectStorage SDK. Windows 10 version 1909 and up will receive DirectStorage support, but the overall speed will be somewhat affected by the legacy OS storage stack. The full DirectStorage potential will only be unlocked on Windows 11 via an upgraded OS storage stack.

https://devblogs.microsoft.com/directx/directstorage-developer-preview-now-available/

DirectStorage features can be broken down into:

  • The new DirectStorage API programming model that provides a DX12-style batched submission/completion calling pattern, relieving apps from the need to individually manage thousands of IO requests/completion notifications per second
  • GPU decompression providing super-fast asset decompression for load time and streaming scenarios (coming in a later preview)
  • Storage stack optimizations: On Windows 11, this consists of an upgraded OS storage stack that unlocks the full potential of DirectStorage, and on Windows 10, games will still benefit from the more efficient use of the legacy OS storage stack
This means that any game built on DirectStorage will benefit from the new programming model and GPU decompression technology on Windows 10, version 1909 and up. Additionally, because Windows 11 was built with DirectStorage in mind, games running on Windows 11 benefit further from new storage stack optimizations.
 
  • Like
Reactions: erek
like this

Lakados

Supreme [H]ardness
Joined
Feb 3, 2014
Messages
5,779
Go to the link

So...is direct storage available in windows 10 or not?

I don't plan on moving to 11 anytime soon.
DirectStorage is compatible with Windows 10 devices, but Windows 11 has the latest storage optimizations built in and is our recommended path for gaming. While you may see benefits on any kind of storage device, installing games to an NVMe SSD will maximize your IO performance and help you more fully experience the benefits of DirectStorage. Stay tuned to learn about games that will be shipping with DirectStorage in the future!
 

Silentbob343

[H]ard|Gawd
Joined
Aug 2, 2004
Messages
1,927
DirectStorage is compatible with Windows 10 devices, but Windows 11 has the latest storage optimizations built in and is our recommended path for gaming. While you may see benefits on any kind of storage device, installing games to an NVMe SSD will maximize your IO performance and help you more fully experience the benefits of DirectStorage. Stay tuned to learn about games that will be shipping with DirectStorage in the future!
My first quote was from that snippet. When you click on that link it takes you the page where I pulled the second quote.

I'm guessing the link has not been updated to reflect the information that Luke provided.
 
  • Like
Reactions: erek
like this

LukeTbk

2[H]4U
Joined
Sep 10, 2020
Messages
2,346
I will assume Microsoft example on GitHub are particularly made to look impressive but, on their example I go from a loading time for an around 600 megabytes of VRAM 3d

scene of .56 seconds / .57s without using the compressed assets
To load time that look in average to this
Main thread loading Time: 0.07 seconds
Load time to first frame: 0.15s

On the cheapest of ssds, will try on a regular HDD, seem that the asset are too small for the drive to matter.
 
Last edited:
  • Like
Reactions: erek
like this

polonyc2

Fully [H]
Joined
Oct 25, 2004
Messages
22,086
So...is direct storage available in windows 10 or not?

I don't plan on moving to 11 anytime soon.

Yes...they mentioned it in yesterday's blog post- "DirectStorage is compatible with Windows 10 devices, but Windows 11 has the latest storage optimizations built in and is our recommended path for gaming. While you may see benefits on any kind of storage device, installing games to an NVMe SSD will maximize your IO performance and help you more fully experience the benefits of DirectStorage"

https://devblogs.microsoft.com/directx/directstorage-api-available-on-pc/
 
  • Like
Reactions: erek
like this

LukeTbk

2[H]4U
Joined
Sep 10, 2020
Messages
2,346
DirectStorage in Forspoken is shown off around halfway through this 3 minute video.
Almost halfing loading time from sata SSD to pci express one (they could have played with the model choosen to make it look better than it is, going low performance Sata model) is quite nice.
 

Silentbob343

[H]ard|Gawd
Joined
Aug 2, 2004
Messages
1,927
Supposedly storage under Win11 is improved. Not sure how much, as I've done 0 research into it. Windows 11 is a hard sell for me.
 

socK

Supreme [H]ardness
Joined
Jan 25, 2004
Messages
4,230
NTFS is not a fast file system, Linux is just going to be faster here every time

Opening a file in general on Windows is a much more expensive (and complicated) affair, even besides the filesystem. It makes sense that this would be a simple and fast affair in Unix, given the "everything is a file" philosophy.

Lots of small IO absolutely blows on Windows and is pretty much just death by a thousand papercuts. There's really no improving it, regardless of the hardware you throw at it. Maybe DirectStorage can dodge this penalty since it's a their chance to finally introduce changes without needing to worry about backwards compatibility.

My craptop with a $20 SSD is a couple orders of magnitude faster than my much beefier desktop in certain scenarios. If you've ever touched web dev, you've probably seen a node modules folder. It's not unusual to have tens thousands of very small files.

Deleting/moving this thing is an absolute slog on my Windows machine - like literally a 10+ minutes versus 3 seconds kind of difference. It's comical.

With containers and Virtualization being where they are now, I really wish Microsoft would trim some baggage but it'll clearly never happen.
 

LukeTbk

2[H]4U
Joined
Sep 10, 2020
Messages
2,346
Lots of small IO absolutely blows on Windows and is pretty much just death by a thousand papercuts. There's really no improving it, regardless of the hardware you throw at it. Maybe DirectStorage can dodge this penalty since it's a their chance to finally introduce changes without needing to worry about backwards compatibility.
I imagine you can have a game having a small amount of large file instead of lots of small IO during load (that something they often do now games I think), and I think is a must to take advantage of directstorage (you uncompressed the few large file by the video card with it).

When a look in a data folder like control, it is 42.3 GB in only 10 files of a data_packfiles format.

I doubt the Stellaris example would be the common one.
 

Lakados

Supreme [H]ardness
Joined
Feb 3, 2014
Messages
5,779
Opening a file in general on Windows is a much more expensive (and complicated) affair, even besides the filesystem. It makes sense that this would be a simple and fast affair in Unix, given the "everything is a file" philosophy.

Lots of small IO absolutely blows on Windows and is pretty much just death by a thousand papercuts. There's really no improving it, regardless of the hardware you throw at it. Maybe DirectStorage can dodge this penalty since it's a their chance to finally introduce changes without needing to worry about backwards compatibility.

My craptop with a $20 SSD is a couple orders of magnitude faster than my much beefier desktop in certain scenarios. If you've ever touched web dev, you've probably seen a node modules folder. It's not unusual to have tens thousands of very small files.

Deleting/moving this thing is an absolute slog on my Windows machine - like literally a 10+ minutes versus 3 seconds kind of difference. It's comical.

With containers and Virtualization being where they are now, I really wish Microsoft would trim some baggage but it'll clearly never happen.
Yeah NTFS was designed for a time when you couldn't trust the shitty spindle in your machine and has many more redundancies than are necessary, but for compatibility, they have to keep it around.

Microsoft needs a new file system or to support one of the existing ones out there, but that is years out.
 

polonyc2

Fully [H]
Joined
Oct 25, 2004
Messages
22,086
At GDC 2022, Microsoft Software Engineer Cooper Partin talked about optimizing IO performance with DirectStorage on Windows...he said this is no direct port of the DirectStorage API available for Xbox Series S|X; this version has been tailored to the unique needs of the PC system...Partin says the API can deliver 20-40% CPU savings as it is, provided you're running it on Windows 11 with an NVMe SSD...game developers could then use those CPU cycles to do something else

DirectStorage also supports Windows 10 (19H1+), but on the older OS, it is a fallback implementation that uses an optimized file IO layer built on top of the Win32 API...while it will leverage patterns like async IO and completion ports to maximize throughput on Windows 10, the performance won't be quite the same as on Windows 11...

 

Lakados

Supreme [H]ardness
Joined
Feb 3, 2014
Messages
5,779
At GDC 2022, Microsoft Software Engineer Cooper Partin talked about optimizing IO performance with DirectStorage on Windows...he said this is no direct port of the DirectStorage API available for Xbox Series S|X; this version has been tailored to the unique needs of the PC system...Partin says the API can deliver 20-40% CPU savings as it is, provided you're running it on Windows 11 with an NVMe SSD...game developers could then use those CPU cycles to do something else

DirectStorage also supports Windows 10 (19H1+), but on the older OS, it is a fallback implementation that uses an optimized file IO layer built on top of the Win32 API...while it will leverage patterns like async IO and completion ports to maximize throughput on Windows 10, the performance won't be quite the same as on Windows 11...


I want to see this in action on the 5800x and on the 5800x3D, IF I am understanding the API correctly it should have a decreased load on the CPUs cache as well as rendering much of that extra that AMD is putting in there unused for many gaming tasks, then again that just leaves more headroom for them to put more stuff in there that uses those extra cycles filling it back up again.

God, I wish I had more time to play games.
 

Silentbob343

[H]ard|Gawd
Joined
Aug 2, 2004
Messages
1,927
At GDC 2022, Microsoft Software Engineer Cooper Partin talked about optimizing IO performance with DirectStorage on Windows...he said this is no direct port of the DirectStorage API available for Xbox Series S|X; this version has been tailored to the unique needs of the PC system...Partin says the API can deliver 20-40% CPU savings as it is, provided you're running it on Windows 11 with an NVMe SSD...game developers could then use those CPU cycles to do something else

DirectStorage also supports Windows 10 (19H1+), but on the older OS, it is a fallback implementation that uses an optimized file IO layer built on top of the Win32 API...while it will leverage patterns like async IO and completion ports to maximize throughput on Windows 10, the performance won't be quite the same as on Windows 11...


Could this really not have been fully implemented in Windows 10 or is this one of the carrots to get people to move to 11?
 

Lakados

Supreme [H]ardness
Joined
Feb 3, 2014
Messages
5,779
Could this really not have been fully implemented in Windows 10 or is this one of the carrots to get people to move to 11?
It’s implemented in all supported versions of 10? So could they roll it out to all versions yeah but they don’t even offer supported updates to those ones. I’m sure you could install the necessary libraries on your own and have some degree of success with it but probably just better to update to a supported windows 10 build.

And if the system is old enough that updating to a supported build of 10 isn’t an option then chances are that Direct Storage would do very little to change performance or load times in any meaningful way.

But there’s lots of little changes under the hood of 11, I know there was a few weeks where 11 had shit MVMe performance with specific drive types and it’s been solved but I haven’t seen any benchmarks comparing them.
 
Last edited:

LukeTbk

2[H]4U
Joined
Sep 10, 2020
Messages
2,346
Could this really not have been fully implemented in Windows 10 or is this one of the carrots to get people to move to 11?
Windows 10 and before had an IO Stack available for game:

traditional-io-path.jpg


To windows 11 bypass model available if you code wanting to use it:
bypass-io-path.jpg


I imagine the question stay the same, could that system added to Windows 10 (and hard drive drivers for Win10) with a major update ? I would imagine the nuance between Windows 11 and a major Windows 10 update must be a business one more than technical.
 

Silentbob343

[H]ard|Gawd
Joined
Aug 2, 2004
Messages
1,927
Windows 10 and before had an IO Stack available for game:

View attachment 458379

To windows 11 bypass model available if you code wanting to use it:
View attachment 458380

I imagine the question stay the same, could that system added to Windows 10 (and hard drive drivers for Win10) with a major update ? I would imagine the nuance between Windows 11 and a major Windows 10 update must be a business one more than technical.
Thank you for this.
 

Armenius

Fully [H]
Joined
Jan 28, 2014
Messages
32,389
Yeah NTFS was designed for a time when you couldn't trust the shitty spindle in your machine and has many more redundancies than are necessary, but for compatibility, they have to keep it around.

Microsoft needs a new file system or to support one of the existing ones out there, but that is years out.
Wasn't Microsoft developing a new file system for Longhorn? I don't recall the details about it.
 

Lakados

Supreme [H]ardness
Joined
Feb 3, 2014
Messages
5,779
Last edited:

Axman

[H]F Junkie
Joined
Jul 13, 2005
Messages
12,895
Partin says the API can deliver 20-40% CPU savings as it is, provided you're running it on Windows 11 with an NVMe SSD.

I have to believe that it will also include caching and fetching systems down the line similar to how the PS5 uses storage to augment graphics, on top of the reduced CPU usage. Direct Storage is one of those really neat developments that most people probably won't care about that actually fundamentally shifts gaming forward.

Like how Vista introduced ReadyBoost and DirectX 10. For all the Vista hate it really did improve everything for gamers.
 

LukeTbk

2[H]4U
Joined
Sep 10, 2020
Messages
2,346
DirectStorage in Forspoken is shown off around halfway through this 3 minute video.
That was a bit of a mislead apparently, the game has yet to use GPU decompression, it was going from sata ssd to 4.0 nvme ssd that did almost cut half of the loading time, the limited capability use of direct storage was good for an other 10-20%:



NVMe
SATA SSD
Scene 1 Win32 API2.6 seconds5.0 seconds
Scene 1 DirectStorage2.2 seconds4.6 seconds
Scene 2 Win32 API2.4 seconds4.1 seconds
Scene 2 DirectStorage1.9 seconds3.4 seconds
Scene 3 Win32 API2.1 seconds4.5 seconds
Scene 3 DirectStorage1.9 seconds3.7 seconds


You can see the part of the Atha game developer conference on DirectStorage here:


For benchmarks :)1555 time stamps), speed at :1653

Once CPU decompression for the CPU data get faster, maybe gain from faster NVME/direct storage would get better and better, that a way where I imagine it should not be too hard to use all the core of your CPU, Direct storage make things about 70% faster loading IO speed wise with decomprassion factored in, but at the NVME 4.0 speed that was not much of the bottleneck.

From my undestanding of time stamp MlTohmB4Gh4?t=2026, the GPU decompression is not even yet implemented on this game, which could explain the limited boost from using directstorage, there graph of direct storage optimal usage has Final (future) version in the title and the will verb tense is being used.

Maybe the jump from regular SATA SDD will maybe be even bigger on the first game to fully use it.

I wonder if GPU decompression could get so fast on Lovelace type and bandwith so fast with the GPU / CPU /RAM with PCI express 5.0 and above 6000 mhz RAM that maybe they will explore decompressing CPU game data on the GPU and give it back, if not one day have a special decompression hardware that speak to the nvme drive a la PS5.
 
Last edited:
Top