浏览代码

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.
Jeff Sooknarine 4 年之前
父节点
当前提交
62abe160d1
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      tools/clang/unittests/HLSL/ShaderOpTest.cpp

+ 1 - 1
tools/clang/unittests/HLSL/ShaderOpTest.cpp

@@ -478,7 +478,7 @@ void ShaderOpTest::CreatePipelineState() {
     ID3D12Device2 *pDevice2;
     CHECK_HR(m_pDevice->QueryInterface(&pDevice2));
 
-    pDevice2->CreatePipelineState(&PDesc, IID_PPV_ARGS(&m_pPSO));
+    CHECK_HR(pDevice2->CreatePipelineState(&PDesc, IID_PPV_ARGS(&m_pPSO)));
   }
 #endif
   else {