Hi,
when I call
ID3D11Device3::CreateComputeShader
it fails with an error from debug layer stating:
"D3D11 ERROR: ID3D11Device::CreateComputeShader: Shader must be cs_4_0, cs_4_1 or cs_5_0. Shader version provided: UNRECOGNIZED [ STATE_CREATION ERROR #2097323: CREATECOMPUTESHADER_INVALIDSHADERTYPE]"
This happens when I pass shader bytecode compiled for Shader Model 5.1. It works just fine for Shader Model 5.0.
My setup:
Windows 10,
Windows SDK version 10.0.14393.0,
Microsoft Visual Studio 2015 Update 3,
NVIDIA GeForce GTX 1080,
GeForce Game Ready Driver 375.95, release date: 11/18/2016.
My project is configured to use the newest SDK. I compiled the shader using fxc.exe from within Visual Studio. But it failed also when I compiled shaders in runtime.
I create my device using D3D_FEATURE_LEVEL_11_1 as feature level and D3D11_SDK_VERSION, which equals to 7. I also succeeded at using other DirectX 11.3 feature (loading vectors from UAVs).
I am clueless as to what causes this error and why DirectX API doesn't recognize cs_5_1 as a correct shader model. I tried to reinstall the Windows SDK, but it didn't help. I also tried to cast my ComPtr< ID3D11Device > pointer to ComPtr< ID3D11Device3 > using ComPtr::As method, but it didn't help either.
Any help or suggestions would be really appreciated.