internal/graphicsdriver/directx: handle error at Signal

This commit is contained in:
Hajime Hoshi 2022-06-18 02:53:12 +09:00
parent 0c38d6faeb
commit e78d888b24

View File

@ -781,7 +781,9 @@ func (g *Graphics) waitForCommandQueue() error {
defer f.Release()
const expected uint64 = 1
g.commandQueue.Signal(f, expected)
if err := g.commandQueue.Signal(f, expected); err != nil {
return err
}
if f.GetCompletedValue() < expected {
if err := f.SetEventOnCompletion(expected, g.fenceWaitEvent); err != nil {
return err