mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2025-01-12 12:08:58 +01:00
internal/graphicsdriver/directx: bug fix: check the error at CreateGraphicsPipelineState at initialization
CreateGraphicsPipelineState someitmes causes an error DXGI_ERROR_DEVICE_HUNG, but we failed to know why. Instead of fixing this, check the error earlier and use the fallback grpahics library OpenGL in this case. Updates #2198
This commit is contained in:
parent
3eeb401d22
commit
c183555cc8
@ -294,6 +294,11 @@ func (g *Graphics) initializeDesktop(useWARP bool, useDebugLayer bool) (ferr err
|
|||||||
}
|
}
|
||||||
i.Dispose()
|
i.Dispose()
|
||||||
|
|
||||||
|
// Check whether an unexpected error happens or not: DXGI_ERROR_DEVICE_HUNG (#2198).
|
||||||
|
if _, err := g.pipelineStates.builtinGraphicsPipelineState(g.device, builtinPipelineStatesKey{}); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user