Jump to content
  • Advertisement
Sign in to follow this  
lucky6969b

DX11 fxc.exe: compilation aborted unexpectedly

Recommended Posts

Posted (edited)

Hello,

I wanted to compile a DX11 shader (model cs_5_0) with fxc that comes with the DirectX SDK June (2010), I need to use that SDK for the time being due to distribution problem

But the compilation terminates unexpectedly.

My CPU is i7 6500U with HD 5200, it supports shader model 5.1 and DirectX 12, I am not sure if that supports compute shader 5.0

I tried to compile the compute shader using the shader model 5.0 (fx_5_0), it compiles and didn't work as expected.

So I thought I still I need to compile that shader using compute shader model 5.0

Does my CPU support cs_5_0?

Thanks

Jack

Edited by lucky6969b

Share this post


Link to post
Share on other sites
Advertisement

Shader model 5.1 and DirectX 12 must support compute shaders. But if you are getting a compile error, then that's not related, because the fxc compiler doesn't care what your GPU is (it is run on the CPU). Are you getting any error or it just crashes? You mentioned that you are trying to compile with fx_5_0, but the proper flag for compute shader would be cs_5_0 instead. 

Here are the docs for fxc compiler syntax: https://docs.microsoft.com/en-us/windows/desktop/direct3dtools/dx-graphics-tools-fxc-syntax

Share this post


Link to post
Share on other sites
10 hours ago, lucky6969b said:

I need to use that SDK for the time being due to distribution problem

If necessary, you can offline-compile your shaders. Meaning, you'd only need one machine that has an updated SDK to get a newer version of fxc.exe so that you can compile your shaders into a header file or cso file. And if you're only having this problem for compute shaders, you could even keep the rest of your shaders going through whatever system you have (build-time or run-time, though hopefully not run-time) and just offline compile the ones that are problematic for you.

I'm pretty sure that the root of your problem is your old version of fxc. You could also use d3dcompiler_47.dll which is included in the OS since Windows 8 to compile your shaders using the D3DCompile function. You could either do it at runtime, or using a helper utility which invokes it instead of using fxc.

Share this post


Link to post
Share on other sites

My few cents; did you try another shader compiler to see if that gives any errors? Could be any random one, supporting SM5.1 (note that some other compilers might use FXC 'under the hood').

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!