Microsoft's DirectX Shader Compiler Now Open Source

Zarathustra[H]

Extremely [H]
Joined
Oct 29, 2000
Messages
38,744
Looks like Microsoft today made their compiler for DX12 shaders open source. It makes me wonder why it would be in their interest to do such a thing. They claim it is to foster greater adoption resulting in the "faster creation of more complex shaders in apps and games," but I would think that more than anything else, the winners from this move are projects such as Wine, SteamOS and developers porting games for Linux. Gift horses, and mouths, and all those things.

It's probably not going to usher in a new era of Linux gaming, but it surely can't hurt, right? What do you guys think?

Yes, the source is public. Because the source is available, developers can check to see how the compiler works at the smallest level of detail. You can download it, modify it, and make it a part of any system you are building. You can port it to other platforms. You can also contribute your ideas and code to the project directly, or collaborate with other partners (including hardware vendors) on new contributions.
 
Hard to extinguish such a huge, diverse project that doesn't rely on profit to exist.
 
Let's be honest, they just did it to stay competitive with Vulkan.

Vulkan is going nowhere fast. You already see Devs creating high-level abstraction layers for it because, shockingly, it's too hard to work with a low-level API in a way that makes it usable across multiple HW platforms.
 
The first thing that hit my mind was they are trying to get xbox live working in linux by having the public refine the process…

Tin foil hat man!.......................
 
Vulkan is going nowhere fast. You already see Devs creating high-level abstraction layers for it because, shockingly, it's too hard to work with a low-level API in a way that makes it usable across multiple HW platforms.

Tell that to ID.
 
Vulkan is going nowhere fast. You already see Devs creating high-level abstraction layers for it because, shockingly, it's too hard to work with a low-level API in a way that makes it usable across multiple HW platforms.
And wasn't that abstraction the main reason (if not the entire reason) for creating DirectX? That's how I remember it.
 
I find it likely that with dx12 being open source that game dev's (and AMD, nvidia, intel) will be able to see why their dx12 titles are running worse than dx 11 and either fix their code or fix microsoft's code.
 
But doesn't using open source always lead ( usually ) to less headache, consistent fixes, optimizations and performance improvements? So no surprise here.
 
Vulkan looks as competitive as OpenGL was to DirectX unfortunately.

I wouldn't go that far. There was a time when OpenGL dropped the ball in favour of Direct X, but that's since long passed and OpenGL has actually seen some vast improvements in the last few years especially.

Vulkan's only been out ~12 months, it's a bit early to start digging the hole. Not only that but as a Linux user I frequent the forums where Vulkan is likely to be discussed and I see fairly positive support surrounding the open API. Give it a chance, even as Windows users, this is something that can only benefit everybody.
 
Tell that to ID.

ID puts out, what, two games every decade or so? And they're really the only dev that puts a major focus on OGL/Vulkan. Everyone else moved on ages ago.

I find it likely that with dx12 being open source that game dev's (and AMD, nvidia, intel) will be able to see why their dx12 titles are running worse than dx 11 and either fix their code or fix microsoft's code.

I can tell you EXACTLY what the problem is: Developers haven't been exposed to low-level APIs in a very long time. They ran into the types of problems that I warned about when this low level API phase started: Scheduling problems, memory management problems, performance optimization problems. Pretty much everything they've been protected from due to the use of high-level abstractions within the API.

Now these same devs have to do all that optimization themselves, and shockingly, find they're worse at it then NVIDIA/AMD/MSFT are. But due to time/cost constraints set by the studios, there's no time for optimization. So you get game releases that are even more buggy then usual.

What's going to happen long term is the other advantages of DX12 [mainly tighter control of HW utilization] will be used heavily, but the low level APIs are going to be abandoned in short order.
 
I'm not sure why this is surprising to anyone. Ever since Nadella took over the CEO role at Microsoft he's been pushing the idea of Microsoft being more open and sharing with it's technologies. And I don't think they're doing it because they fear anything, they're doing it because they see the writing on the wall and it's much easier to work with the wider community when you're more open about sharing the technology you have. Microsoft has slowly been evolving into something new since the old guard left (or was forced out) and it's been cool to see.
 
Doesn't experience already show that Microsoft doesn't open source anything that actually gives anybody anything of any value? Just saying....
 
Doesn't experience already show that Microsoft doesn't open source anything that actually gives anybody anything of any value? Just saying....


Well, they are a corporation, and thus held by law under fiduciary responsibility to make decisions based entirely on the financial well being of their shareholders.

They have to weigh the positives and negatives of their decisions of what to open source based on how it impacts their shareholders. Making some things open source can drive greater adoption, and advance the tech, and that may be in their best interest. Making other things open source could hurt their business model.

As someone mentioned above, the new Microsoft seems to have changed its thinking a little bit when it comes to open source, but it still remains to be seen if this is just another implementation of "Embrace, Extend, Extinguish".
 
Vulkan is going nowhere fast. You already see Devs creating high-level abstraction layers for it because, shockingly, it's too hard to work with a low-level API in a way that makes it usable across multiple HW platforms.

Things get easier over time. Vulkan's new, just give it time. When I first played around with DirectX, it took hundreds of lines of code just to initialize. Want to load a bitmap? Write your own function. Want to multiply a matrix? Write your own function. Those are basic things for a 3D engine.
 
Doesn't experience already show that Microsoft doesn't open source anything that actually gives anybody anything of any value? Just saying....

There is some truth to that, but they open sourced .net and asp.net AND made it full cross platform. It brings a fair bit of value to me. They've been open sourcing and being more open about a few things lately. It's late, .net has been shedding developers slowly for years (as have many microsoft products), but I'm a pretty big fan of .net still and use it for almost everything.

I know many people wish they would have open sourced vb6 after it was discontinued and open sourced xna after it was discontinued. I don't think dx12 is going to be discontinued, but we've seen a bunch of dx12 titles and they generally have run worse than dx11. Maybe open sourcing it will hlep.
 
Many dev studios end up building their own libraries and applications for testing and debugging, by making this opensource it allows those devs to incorporate a useful and powerful tool into their existing systems. This will go a long way to simplifying their testing processes and should hopefully result in better less buggy games using DX12. I think this is simply a case of Microsoft seeing a bunch of new DX12 developers making mistakes which are resulting in poorly performing games which in turn only hurts the DX12 brand image. So releasing a simple tool for them and releasing it as open source so they can implement it how ever they want only goes to help everybody in the end.
 
I'd wish the Wine developers will pick this up, but at the rate they're going it'll be another 10 years before DX12 is in Wine. Though to be honest I don't care for DX12 on Wine, cause I doubt there's going to be any benefit for Linux users. Vulkan though has a lot of benefits for Linux, as Doom 3 running in Linux has shown.

 
I think this is simply a case of Microsoft seeing a bunch of new DX12 developers making mistakes which are resulting in poorly performing games which in turn only hurts the DX12 brand image. So releasing a simple tool for them and releasing it as open source so they can implement it how ever they want only goes to help everybody in the end.

More like a case of Microsoft not seeing *enough* DX12 developers. Which is understandable since it's locked to one version of one operating system (10) with a minority marketshare, while Vulkan works on everything - Win7, 8.1, 10, Linux and perhaps most significantly was chosen by Google as the de facto graphics API for Android from 7.0 forward. That's huge.

Add all that up and it's clear this move by MS wasn't for any altruistic reasons or because the CEO wants to hold hands and sing kumbaya. There was a time they could abuse their dominant market position and artificially lock an API to one version of Windows with a "tough shit" Ballmer tongue wag, but that time has passed.

They are keenly aware that there's a lot of Vulkan development in the pipeline right now. They talk to game developers, they know which way developer sentiment is slowly swinging, and it has understandably scared them.
 
Last edited:
Also do not forget this is directx version 12. They will abandon it again for the next version, 13. Vulcan will keep going.
 
Also do not forget this is directx version 12. They will abandon it again for the next version, 13. Vulcan will keep going.

Yep. It's time to get off the DirectX<->new Windows version artificial lockin merry go round.
 
Pictures this at Microsoft....[Shudder]. :)
developers_1.jpg
 
I'm not sure why this is surprising to anyone. Ever since Nadella took over the CEO role at Microsoft he's been pushing the idea of Microsoft being more open and sharing with it's technologies. And I don't think they're doing it because they fear anything, they're doing it because they see the writing on the wall and it's much easier to work with the wider community when you're more open about sharing the technology you have. Microsoft has slowly been evolving into something new since the old guard left (or was forced out) and it's been cool to see.

His vision is cloud, cloud and cloud.

so what happen to shader model 6?

It will come in a future Windows 10 update.
 
Vulkan is going nowhere fast. You already see Devs creating high-level abstraction layers for it because, shockingly, it's too hard to work with a low-level API in a way that makes it usable across multiple HW platforms.

I know it makes you wonder why anyone ever decided to develop graphics APIs to begin with.... oh ya so artists didn't have to be coders. lol

Ya as much as I want Vulkan to win the day... I know for the most part what is needed is tools that do the work and pretty much treat it like OpenGL++. Of course they could have just done most of everything we want as gamers with OpenGL to begin with.
 
More like a case of Microsoft not seeing *enough* DX12 developers. Which is understandable since it's locked to one version of one operating system (10) with a minority marketshare, while Vulkan works on everything - Win7, 8.1, 10, Linux and perhaps most significantly was chosen by Google as the de facto graphics API for Android from 7.0 forward. That's huge.

Add all that up and it's clear this move by MS wasn't for any altruistic reasons or because the CEO wants to hold hands and sing kumbaya. There was a time they could abuse their dominant market position and artificially lock an API to one version of Windows with a "tough shit" Ballmer tongue wag, but that time has passed.

They are keenly aware that there's a lot of Vulkan development in the pipeline right now. They talk to game developers, they know which way developer sentiment is slowly swinging, and it has understandably scared them.
Win 10 for gaming is far from minority. I keep seeing you say this across many threads.

STEAM HARDWARE SURVEY DEC 2016

all WIN10 50% with 64bit .60% up
all win7 35% with .20% up

So looking at just gaming it is far from minority, and truthfully looks to be quite impressive for just 1.5 years. Now I am sure you are counting total market which brings in companies and datacenters and such, and obviously Win10 has years to go as these tend to migrate at far slower paces, hell even XP still has a hold.
 
Win 10 for gaming is far from minority. I keep seeing you say this across many threads.

STEAM HARDWARE SURVEY DEC 2016

all WIN10 50% with 64bit .60% up
all win7 35% with .20% up

So looking at just gaming it is far from minority, and truthfully looks to be quite impressive for just 1.5 years. Now I am sure you are counting total market which brings in companies and datacenters and such, and obviously Win10 has years to go as these tend to migrate at far slower paces, hell even XP still has a hold.
Hang it up. DPI is all about bashing MS.
 
Back
Top