diff --git a/src/dawn_native/d3d12/ComputePipelineD3D12.cpp b/src/dawn_native/d3d12/ComputePipelineD3D12.cpp index 88aa240ead..4e457d596d 100644 --- a/src/dawn_native/d3d12/ComputePipelineD3D12.cpp +++ b/src/dawn_native/d3d12/ComputePipelineD3D12.cpp @@ -15,6 +15,7 @@ #include "dawn_native/d3d12/ComputePipelineD3D12.h" #include "common/Assert.h" +#include "dawn_native/d3d12/D3D12Error.h" #include "dawn_native/d3d12/DeviceD3D12.h" #include "dawn_native/d3d12/PipelineLayoutD3D12.h" #include "dawn_native/d3d12/PlatformFunctions.h" @@ -51,8 +52,10 @@ namespace dawn_native { namespace d3d12 { SingleShaderStage::Compute, ToBackend(GetLayout()), compileFlags)); d3dDesc.CS = compiledShader.GetD3D12ShaderBytecode(); - device->GetD3D12Device()->CreateComputePipelineState(&d3dDesc, - IID_PPV_ARGS(&mPipelineState)); + auto* d3d12Device = device->GetD3D12Device(); + DAWN_TRY(CheckHRESULT( + d3d12Device->CreateComputePipelineState(&d3dDesc, IID_PPV_ARGS(&mPipelineState)), + "D3D12 creating pipeline state")); return {}; }