Skip to content

Commit 55f39f5

Browse files
sooknarinetex3d
authored andcommitted
Add CHECK_HR around CreatePipelineState (#3539)
ShaderOpTest::CreatePipelineState needs to check the return code from ID3D12Device2::CreatePipelineState so failures immediately stop here. Otherwise we might get a failure in a subsequent call like when CommandListRefs::CreateForDevice() calls ID3D12Device::CreateCommandQueue() - this one will fail with return code 0x887a0005 - The GPU device instance has been suspended. Use GetDeviceRemovedReason to determine the appropriate action.
1 parent 921b86c commit 55f39f5

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

tools/clang/unittests/HLSL/ShaderOpTest.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -478,7 +478,7 @@ void ShaderOpTest::CreatePipelineState() {
478478
ID3D12Device2 *pDevice2;
479479
CHECK_HR(m_pDevice->QueryInterface(&pDevice2));
480480

481-
pDevice2->CreatePipelineState(&PDesc, IID_PPV_ARGS(&m_pPSO));
481+
CHECK_HR(pDevice2->CreatePipelineState(&PDesc, IID_PPV_ARGS(&m_pPSO)));
482482
}
483483
#endif
484484
else {

0 commit comments

Comments
 (0)