Friday, September 20th 2024

Microsoft DirectX 12 Shifts to SPIR-V as Default Interchange Format

Microsoft's Direct3D and HLSL teams have unveiled plans to integrate SPIR-V support into DirectX 12 with the upcoming release of Shader Model 7. This significant transition marks a new era in GPU programmability, as it aims to unify the intermediate representation for graphical-shader stages and compute kernels. SPIR-V, an open standard intermediate representation for graphics and compute shaders, will replace the proprietary DirectX Intermediate Language (DXIL) as the shader interchange format for DirectX 12. The adoption of SPIR-V is expected to ease development processes across multiple GPU runtime environments. By embracing this open standard, Microsoft aims to enhance HLSL's position as the premier language for compiling graphics and compute shaders across various devices and APIs. This transition is part of a multi-year development process, during which Microsoft will work closely with The Khronos Group and the LLVM Project. The company has joined Khronos' SPIR and Vulkan working groups to ensure smooth collaboration and rapid feature adoption.

While the transition will take several years, Microsoft is providing early notice to allow developers and partners to plan accordingly. The company will offer translation tools between SPIR-V and DXIL to facilitate a gradual transition for both application and driver developers. For those not familiar with graphics development, graphics APIs ship with virtual instruction set architectures (ISA) that abstracts standard hardware features at a higher level. As GPUs don't follow the same ISA as CPUs (x86, Arm, RISC-V), this virtual ISA is needed to define some generics in the GPU architecture and allow various APIs like DirectX and Vulkan to run. Instead of focusing support on several formats like DXIL, Microsoft is embracing the open SPIR-V standard, which will become de facto for API developers in the future, allowing focus on more features instead of constantly replicating each other's functions. While DXIL is used mainly for gaming environments, SPIR-V has adoption in high-performance computing as well, with OpenCL and SYCL. Gaming presence is also there with Vulkan API, and we expect to see SPIR-V join DirectX 12 games.
Source: Microsoft
Add your own comment

35 Comments on Microsoft DirectX 12 Shifts to SPIR-V as Default Interchange Format

#1
Ferrum Master
Leaving aside the nonsense, it seems Microsoft has already signed a deal for next gen console APU maker too, guess who benefits from that most and reduces development cycle? And it is only about Xbox, Microsoft does not give a flying spaghetti about windows, it is Azure and Xbox as priority.
Posted on Reply
#2
AusWolf
So this is where the idea of Nvidia and AMD unifying their gaming and compute architectures came from!

I just wonder when we will see this in games, and how well Blackwell and RDNA 4 will support this.
Posted on Reply
#3
x4it3n
Ferrum MasterLeaving aside the nonsense, it seems Microsoft has already signed a deal for next gen console APU maker too, guess who benefits from that most and reduces development cycle? And it is only about Xbox, Microsoft does not give a flying spaghetti about windows, it is Azure and Xbox as priority.
Xbox is dying and GamePass doesn't bring any money either. Microsoft are more and more open source, just like their support of Linux grows every day too. Windows has a lot more competition now than it ever had! Even macOS gets decent gaming performance with their Apple Silicon chips, so Microsoft has to adapt and allow more technologies to work with Windows.
Posted on Reply
#4
AusWolf
x4it3nXbox is dying and GamePass doesn't bring any money either. Microsoft are more and more open source, just like their support of Linux grows every day too. Windows has a lot more competition now than it ever had! Even macOS gets decent gaming performance with their Apple Silicon chips, so Microsoft has to adapt and allow more technologies to work with Windows.
The Windows hegemony wouldn't be threatened at all if Microsoft didn't think it was their God-given mission to make it shit.
Posted on Reply
#5
CosmicWanderer
x4it3nXbox is dying and GamePass doesn't bring any money either.
Clueless take. Game Pass is a financial hit for Microsoft. It was even up significantly in the last few earnings reports.

Xbox hardware is what's been declining.

Game Pass is what's keeping Xbox alive.
Posted on Reply
#6
Chaitanya
Dx 12 has been around for ages with little to show for, I thought M$ would have dumped this for something newer.
Posted on Reply
#7
Legacy-ZA
AusWolfSo this is where the idea of Nvidia and AMD unifying their gaming and compute architectures came from!

I just wonder when we will see this in games, and how well Blackwell and RDNA 4 will support this.
This already gives me pause in upgrading to an RTX5000 series card.
Posted on Reply
#8
ncrs
AusWolfSo this is where the idea of Nvidia and AMD unifying their gaming and compute architectures came from!

I just wonder when we will see this in games, and how well Blackwell and RDNA 4 will support this.
Since this is a complex topic I'll provide some context.

When a game developer builds graphical effects they use a language like HLSL (D3D), GLSL (OpenGL) or PSSL (PlayStation) to write shaders in. Those programs then get compiled to an intermediate representation (IL). This IL is then used by the GPU driver to generate low level code that will run on the target GPU architecture. As AleksandarK noted it's done in order to ease development for all parties since GPU internal architectures can vary wildly.

DirectX has been using an internal to them IL called DXIL, I'll steal a diagram from their documentation:
HLSL Other shading langs DSL DXBC IL
+ + + +
| | | |
v v v v
Clang Clang Other Tools dxbc2dxil
+ + + +
| | | |
v v v |
+------+--------------------+---------+ |
| High level IR | |
+-------------------------------------+ |
| |
| |
v |
Optimizer <-----+ Linker |
+ ^ + |
| | | |
| | | |
+------------v------+-------------v-----v-------+
| Low level IR (DXIL) |
+------------+----------------------+-----------+
| |
v v
Driver Compiler Validator

SPIR-V has been in use in part of the Linux graphical subsystem called Mesa that implements graphical APIs like OpenGL, Vulkan and even Direct3D. Just like other ILs it can be used for graphical shaders and compute kernels.
On Windows all 3 major vendors already support SPIR-V since it's a part of the Vulkan API. Other Vulkan-capable drivers most likely do as well, but I have no experience with e.g. Qualcomm's.

What this change from Microsoft means is eased compatibility between DirectX and Vulkan since Direct3D shaders will be able to be compiled to a form that Vulkan can ingest natively. In the long run also simplifies driver development since vendors won't have to split their support to DXIL and SPIR-V.
Posted on Reply
#9
NC37
Legacy-ZAThis already gives me pause in upgrading to an RTX5000 series card.
Indeed, DX12 has stagnated for so long and it's been awhile since we had a new shader model. Any current or next gen GPU is effectively reduced in value until this is addressed.
Posted on Reply
#10
windwhirl
AusWolfSo this is where the idea of Nvidia and AMD unifying their gaming and compute architectures came from!

I just wonder when we will see this in games, and how well Blackwell and RDNA 4 will support this.
Unsure if it has to do with this, tho

CUDA has been CUDA for years or decades now, nothing new there and no changes expected.

From what AMD said, I'd not expect unified architecture before RDNA6/UDNA6 but that's just my guess. Though, AMD did have an unified architecture a while back with Graphics Core Next (Radeon HD 7000 - Vega)

Again, all that is unrelated to SPIR-V
Posted on Reply
#11
TheinsanegamerN
CosmicWandererClueless take. Game Pass is a financial hit for Microsoft. It was even up significantly in the last few earnings reports.

Xbox hardware is what's been declining.

Game Pass is what's keeping Xbox alive.
Gamepass hasnt made a red cent. Between the cost of the infastructure and the cost of making the games, it's still not broken even.

And its revenue was up, but its subscriber count has been stagnant. Gives games away for cheap isnt a sustainable business model, and MS knows it.
Legacy-ZAThis already gives me pause in upgrading to an RTX5000 series card.
It shouldnt. Like everything else in the space, by the time this arch change makes a noticeable effect, the games that need it will be too demanding for the hardware anyway.
Posted on Reply
#12
prazola
Dogs nuttery, dogs nuttery everywhere.
Posted on Reply
#13
ScaLibBDP
ncrsSPIR-V has been in use in part of the Linux graphical subsystem called Mesa that implements graphical APIs like OpenGL, Vulkan and even Direct3D. Just like other ILs it can be used for graphical shaders and compute kernels.
On Windows all 3 major vendors already support SPIR-V since it's a part of the Vulkan API. Other Vulkan-capable drivers most likely do as well, but I have no experience with e.g. Qualcomm's.
>>...Other Vulkan-capable drivers most likely do as well, but I have no experience with e.g. Qualcomm's...

I just verified and in case of Qualcomm I see that SPIR-V could be supported since 2018.

Actually, it depends on a support of OpenCL features, also called as extensions, implemented in versions 2 and 3 of OpenCL. Since I have a significant experience with porting OpenCL functionality from Linux / Windows OSs to Android OS I could say that cl_khr_spir extension needs to be implemented. This is a piece of codes from cl_ext.h header file of Adreno OpenCL SDK version 1.2.1 ( 2018 year! ) for Mobile Devices with Android OS:
...
/*
* Extension: cl_khr_spir
*
* This extension adds support to create an OpenCL program object from a
* Standard Portable Intermediate Representation (SPIR) instance
*/

#define CL_DEVICE_SPIR_VERSIONS 0x40E0
#define CL_PROGRAM_BINARY_TYPE_INTERMEDIATE 0x40E1
...
Posted on Reply
#14
Event Horizon
Shader compilation is a solved problem (as long as game devs do their part). For us end users the IR does not matter as long as that's taken care of.
Posted on Reply
#15
ncrs
ScaLibBDP>>...Other Vulkan-capable drivers most likely do as well, but I have no experience with e.g. Qualcomm's...

I just verified and in case of Qualcomm I see that SPIR-V could be supported since 2018.

Actually, it depends on a support of OpenCL features, also called as extensions, implemented in versions 2 and 3 of OpenCL. Since I have a significant experience with porting OpenCL functionality from Linux / Windows OSs to Android OS I could say that cl_khr_spir extension needs to be implemented. This is a piece of codes from cl_ext.h header file of Adreno OpenCL SDK version 1.2.1 ( 2018 year! ) for Mobile Devices with Android OS:
...
/*
* Extension: cl_khr_spir
*
* This extension adds support to create an OpenCL program object from a
* Standard Portable Intermediate Representation (SPIR) instance
*/

#define CL_DEVICE_SPIR_VERSIONS 0x40E0
#define CL_PROGRAM_BINARY_TYPE_INTERMEDIATE 0x40E1
...
SPIR 1.0 and 2.0 are based on LLVM IR, and are not the same thing as SPIR-V. SPIR was also designed primarily for compute, chiefly OpenCL, so I'm not surprised that Adreno OCL SDK supports it.
It's unable to handle graphical primitives, a deficiency that SPIR-V rectifies while retaining the compute lineage of SPIR.
In fact support for SPIR-V is mandatory in OpenCL 2.1, but... due to certain vendor's reluctance to implement full 2.x capabilities the new OpenCL 3.0 version drops that requirement (among with many other features of 2.x).
Posted on Reply
#16
kapone32
TheinsanegamerNGamepass hasnt made a red cent. Between the cost of the infastructure and the cost of making the games, it's still not broken even.

And its revenue was up, but its subscriber count has been stagnant. Gives games away for cheap isnt a sustainable business model, and MS knows it.


It shouldnt. Like everything else in the space, by the time this arch change makes a noticeable effect, the games that need it will be too demanding for the hardware anyway.
The issue is exemplified by the success of Space Marine 2 and Black Myth
Posted on Reply
#17
chrcoluk
ChaitanyaDx 12 has been around for ages with little to show for, I thought M$ would have dumped this for something newer.
DX9 era was much better for me, proper AA, more optimisation handled driver side, its main weakness though was it caused much more CPU bottlenecking.

Was funny when everyone discovered the quick way to kill 90% of stutters in FF7 remake was to disable DX12.
TheinsanegamerNGamepass hasnt made a red cent. Between the cost of the infastructure and the cost of making the games, it's still not broken even.

And its revenue was up, but its subscriber count has been stagnant. Gives games away for cheap isnt a sustainable business model, and MS knows it.


It shouldnt. Like everything else in the space, by the time this arch change makes a noticeable effect, the games that need it will be too demanding for the hardware anyway.
I think gamepass has potential, but the reason I didnt renew was the games rotate, I think everything added either needs an assured 3 years minimum, or should be perpetual. It is also a bit flaky playing content offline.
Posted on Reply
#18
AusWolf
kapone32The issue is exemplified by the success of Space Marine 2 and Black Myth
I don't need a subscription plan to temporarily try out every shit game ever released. I need good games that are worth buying and owning for a lifetime.
Posted on Reply
#19
Neo_Morpheus
chrcolukneeds an assured 3 years minimum, or should be perpetual.
I wonder if such actions would benefit or harm the game developers/publishers.
Dont get me wrong, i am the staunchest supporter of pro consumer practices, so simply curious.
AusWolfI don't need a subscription plan to temporarily try out every shit game ever released. I need good games that are worth buying and owning for a lifetime.
Sadly, we no longer “own” games, we have licenses to use/play those games.
Posted on Reply
#20
AusWolf
Neo_MorpheusSadly, we no longer “own” games, we have licenses to use/play those games.
You still own them on GOG. Sadly, I have most of mine on Steam.
Posted on Reply
#21
phints
ChaitanyaDx 12 has been around for ages with little to show for, I thought M$ would have dumped this for something newer.
They really should, Dx12 has been mostly useless after like 5 years. Just dump Dx12 for Vulkan it works easily as well or better, is a close to metal API, and is open source.
Posted on Reply
#22
chrcoluk
Neo_MorpheusI wonder if such actions would benefit or harm the game developers/publishers.
Dont get me wrong, i am the staunchest supporter of pro consumer practices, so simply curious.

Sadly, we no longer “own” games, we have licenses to use/play those games.
I expect they constantly are analysing revenues, take up etc. and change their policies based on that.

One thing that might happen e.g. is someone plays a game on game pass, decides they like it or might be mid way through playing it, it then rotates out, then publisher gets a sale. That wouldnt happen if everything was perpetual.

So yeah my comment is a touch of selfishness, but its what I would want to sign back up to game pass.

What they could is let you pick favourite genres, so if e.g. pick platformers, retro and jrpgs, then you get those perpetual, but you also wouldnt get shooters, sports, driving as an example, so it avoids them having to supply a ever growing library to everyone.
phintsThey really should, Dx12 has been mostly useless after like 5 years. Just dump Dx12 for Vulkan it works easily as well or better, is a close to metal API, and is open source.
For some reason dev's keep choosing DX12 over Vulkan. Although I dont think I am a fan of a close to metal API, as it means if the dev does a bad job its hard to fix with mod's custom drivers etc.
Posted on Reply
#23
Broken Processor
CosmicWandererClueless take. Game Pass is a financial hit for Microsoft. It was even up significantly in the last few earnings reports.

Xbox hardware is what's been declining.

Game Pass is what's keeping Xbox alive.
Exactly, I see these clueless takes all over YouTube, most are guess work with some anecdotal evidence thrown in. Microsoft aren't know for keeping loss making product's around.
Posted on Reply
#24
Neo_Morpheus
chrcolukI expect they constantly are analysing revenues, take up etc. and change their policies based on that.

One thing that might happen e.g. is someone plays a game on game pass, decides they like it or might be mid way through playing it, it then rotates out, then publisher gets a sale. That wouldnt happen if everything was perpetual.

So yeah my comment is a touch of selfishness, but its what I would want to sign back up to game pass.

What they could is let you pick favourite genres, so if e.g. pick platformers, retro and jrpgs, then you get those perpetual, but you also wouldnt get shooters, sports, driving as an example, so it avoids them having to supply a ever growing library to everyone.


For some reason dev's keep choosing DX12 over Vulkan. Although I dont think I am a fan of a close to metal API, as it means if the dev does a bad job its hard to fix with mod's custom drivers etc.
I have to say, thanks to Gamepass (when i had it) I played Subnautica and The Ascent.

Then moved to Steam and bought them right away because I ended liking them that much.

In my particular case, i dont game that much, so gamepass didnt work for me, but it might work for others.

About games being there perpetually, that would be nice if you game a lot and replay games a lot, i think.
Posted on Reply
#25
chrcoluk
Neo_MorpheusAbout games being there perpetually, that would be nice if you game a lot and replay games a lot, i think.
Thats me lol. I still need to go back into LR on PC as well, even with those 4k hours I havent got lightning up to max 50k stats.

Posted on Reply
Add your own comment
Dec 11th, 2024 20:29 EST change timezone

New Forum Posts

Popular Reviews

Controversial News Posts