Skip to content

Commit

Permalink
[host] d12: check for failure to obtain d3d12 functions
Browse files Browse the repository at this point in the history
  • Loading branch information
gnif committed Mar 11, 2024
1 parent ce9ed5d commit dd6c795
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions host/platform/Windows/capture/D12/d12.c
Original file line number Diff line number Diff line change
Expand Up @@ -206,6 +206,16 @@ static bool d12_create(
(typeof(DX12.D3D12SerializeVersionedRootSignature))
GetProcAddress(this->d3d12, "D3D12SerializeVersionedRootSignature");

if (!DX12.D3D12CreateDevice ||
!DX12.D3D12GetDebugInterface ||
!DX12.D3D12SerializeVersionedRootSignature)
{
DEBUG_ERROR("Failed to get required exports from d3d12.dll");
CloseHandle(this->d3d12);
free(this);
return false;
}

this->getPointerBufferFn = getPointerBufferFn;
this->postPointerBufferFn = postPointerBufferFn;

Expand Down

0 comments on commit dd6c795

Please sign in to comment.