DirectXShaderCompiler icon indicating copy to clipboard operation
DirectXShaderCompiler copied to clipboard

D3D12 Error: Hash check failed for DXILibrary

Open SakibSaikia opened this issue 7 years ago • 5 comments

I am getting the following error from the D3D debug layer when trying to create a PSO. The shader compilation itself succeeds, and I can see that the library is signed.

D3D12 ERROR: ID3D12Device::CreateStateObject: Hash check failed for DXILibrary.pShaderBytecode: 0x0000020A8D0CFA10 [ STATE_CREATION ERROR #1194: CREATE_STATE_OBJECT_ERROR]

I am using lib_6_3 and latest pre-built binary release of DXC/DXIL. What could cause errors like this and where should I start debugging? Any help will be greatly appreciated!

SakibSaikia avatar Nov 24 '19 08:11 SakibSaikia

Can you try the DxCompiler.dll from the latest 1910 release branch in the zip file here? https://ci.appveyor.com/project/antiagainst/directxshadercompiler/builds/29059673/artifacts

Please let us know if the issue occurs with this version of the compiler, or if you have any other problems using it.

tex3d avatar Nov 25 '19 22:11 tex3d

Hi Tex,

Thanks for the response. I got the latest and I still get the error although the reporting has changed.

D3D12 ERROR: ID3D12Device::CreateStateObject: Hash check failed for DXILibrary.pShaderBytecode: 0x0000017D91982150. A typical cause of this is unsigned bytecode. To enable signing by the compiler, ensure DXIL.dll is next to DxCompiler.dll. [ STATE_CREATION ERROR #1194: CREATE_STATE_OBJECT_ERROR]

SakibSaikia avatar Nov 26 '19 02:11 SakibSaikia

I've attached the bytecode binary and the full list of PSO errors here. The exports looked like they were correct, so my plan was to work from the top.

rtpso-error.zip

SakibSaikia avatar Nov 26 '19 02:11 SakibSaikia

Hi Tex, I figured out the issue. The object holding the shader blob was going out of scope by the time the PSO was created. 😞

SakibSaikia avatar Dec 02 '19 08:12 SakibSaikia

Hi SakibSaikia. I understand this is an old thread, But I am running into this issue and my shader blob is fine. Did you find any solutions to the error folder which you uploaded previously.

VigneshMohan1698 avatar Aug 13 '22 07:08 VigneshMohan1698