Fix crash when D3D11 backend fails to create shader due to driver failure

This commit is contained in:
Wojtek Figat
2023-09-19 23:45:30 +02:00
parent a56ce92867
commit 7e81fdbd75
20 changed files with 108 additions and 101 deletions

View File

@@ -31,7 +31,7 @@ ID3D12CommandAllocator* CommandAllocatorPoolDX12::RequestAllocator(uint64 comple
if (firstPair.First <= completedFenceValue)
{
allocator = firstPair.Second;
VALIDATE_DIRECTX_RESULT(allocator->Reset());
VALIDATE_DIRECTX_CALL(allocator->Reset());
_ready.RemoveAtKeepOrder(0);
}
}
@@ -39,7 +39,7 @@ ID3D12CommandAllocator* CommandAllocatorPoolDX12::RequestAllocator(uint64 comple
// If no allocators were ready to be reused, create a new one
if (allocator == nullptr)
{
VALIDATE_DIRECTX_RESULT(_device->GetDevice()->CreateCommandAllocator(_type, IID_PPV_ARGS(&allocator)));
VALIDATE_DIRECTX_CALL(_device->GetDevice()->CreateCommandAllocator(_type, IID_PPV_ARGS(&allocator)));
#if GPU_ENABLE_RESOURCE_NAMING
Char name[32];
swprintf(name, 32, L"CommandAllocator %u", _pool.Count());