mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-12-25 03:08:54 +01:00
internal/graphicsdriver/directx: bug fix: do not reset command allocators at Begin
Closes #2249
This commit is contained in:
parent
e9e48919df
commit
9d303e8dc5
@ -694,14 +694,10 @@ func (g *Graphics) resizeSwapChainDesktop(width, height int) error {
|
|||||||
// TODO: Reset 0 on Xbox
|
// TODO: Reset 0 on Xbox
|
||||||
g.frameIndex = int(g.swapChain.GetCurrentBackBufferIndex())
|
g.frameIndex = int(g.swapChain.GetCurrentBackBufferIndex())
|
||||||
|
|
||||||
if err := g.drawCommandAllocators[g.frameIndex].Reset(); err != nil {
|
// Do not reset the command allocators here (#2249).
|
||||||
return err
|
// The command allocators are reset at flushCommnadList.
|
||||||
}
|
|
||||||
if err := g.drawCommandList.Reset(g.drawCommandAllocators[g.frameIndex], nil); err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
|
|
||||||
if err := g.copyCommandAllocators[g.frameIndex].Reset(); err != nil {
|
if err := g.drawCommandList.Reset(g.drawCommandAllocators[g.frameIndex], nil); err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
if err := g.copyCommandList.Reset(g.copyCommandAllocators[g.frameIndex], nil); err != nil {
|
if err := g.copyCommandList.Reset(g.copyCommandAllocators[g.frameIndex], nil); err != nil {
|
||||||
@ -751,14 +747,10 @@ func (g *Graphics) Begin() error {
|
|||||||
}
|
}
|
||||||
g.frameStarted = true
|
g.frameStarted = true
|
||||||
|
|
||||||
if err := g.drawCommandAllocators[g.frameIndex].Reset(); err != nil {
|
// Do not reset the command allocators here (#2249).
|
||||||
return err
|
// The command allocators are reset at flushCommnadList.
|
||||||
}
|
|
||||||
if err := g.drawCommandList.Reset(g.drawCommandAllocators[g.frameIndex], nil); err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
|
|
||||||
if err := g.copyCommandAllocators[g.frameIndex].Reset(); err != nil {
|
if err := g.drawCommandList.Reset(g.drawCommandAllocators[g.frameIndex], nil); err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
if err := g.copyCommandList.Reset(g.copyCommandAllocators[g.frameIndex], nil); err != nil {
|
if err := g.copyCommandList.Reset(g.copyCommandAllocators[g.frameIndex], nil); err != nil {
|
||||||
|
Loading…
Reference in New Issue
Block a user