Usage of ID3D12PipelineLibrary triggers device remove when using library loaded from disk

In my pet project after first run, I’m generating PSO cache via ID3D12PipelineLibrary. On second run, when all PSOs already in cache, calling ID3D12PipelineLibrary::LoadComputePipeline or ID3D12PipelineLibrary1::LoadPipeline or ID3D12PipelineLibrary::Serialize triggers device remove. Device remove reason is DXGI_ERROR_DRIVER_INTERNAL_ERROR. Here’s callstack of debug layer error message.


You can see that VersionedCreatePipelineState calls ProcessDriverErrors which calls RemoveDevice which seem to suggest that driver PSO compilation failure is the reason for device remove.
My driver version is GameReady 497.29, I also tried Studio 511.09 but it still don’t work.
You can reproduce that issue by launching this branch of my pet project GitHub - Devaniti/BoolkaEngine at PipelineLibraryEnabled specifically on branch PipelineLibraryEnabled. It just starts, if library cache exist on disk it load it, initialize all resources, writes cache to disk, and exits. On 2nd run you’ll get the crash.

It’s still crashing on Game Ready 511.65 for me

And it’s still crashing on Game Ready 511.79

It turned out to be my bug. CreatePipelineLibrary requires that passed memory have to be remain valid for the lifetime of returned object.