mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-12-24 18:58: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
|
||||
g.frameIndex = int(g.swapChain.GetCurrentBackBufferIndex())
|
||||
|
||||
if err := g.drawCommandAllocators[g.frameIndex].Reset(); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := g.drawCommandList.Reset(g.drawCommandAllocators[g.frameIndex], nil); err != nil {
|
||||
return err
|
||||
}
|
||||
// Do not reset the command allocators here (#2249).
|
||||
// The command allocators are reset at flushCommnadList.
|
||||
|
||||
if err := g.copyCommandAllocators[g.frameIndex].Reset(); err != nil {
|
||||
if err := g.drawCommandList.Reset(g.drawCommandAllocators[g.frameIndex], nil); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := g.copyCommandList.Reset(g.copyCommandAllocators[g.frameIndex], nil); err != nil {
|
||||
@ -751,14 +747,10 @@ func (g *Graphics) Begin() error {
|
||||
}
|
||||
g.frameStarted = true
|
||||
|
||||
if err := g.drawCommandAllocators[g.frameIndex].Reset(); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := g.drawCommandList.Reset(g.drawCommandAllocators[g.frameIndex], nil); err != nil {
|
||||
return err
|
||||
}
|
||||
// Do not reset the command allocators here (#2249).
|
||||
// The command allocators are reset at flushCommnadList.
|
||||
|
||||
if err := g.copyCommandAllocators[g.frameIndex].Reset(); err != nil {
|
||||
if err := g.drawCommandList.Reset(g.drawCommandAllocators[g.frameIndex], nil); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := g.copyCommandList.Reset(g.copyCommandAllocators[g.frameIndex], nil); err != nil {
|
||||
|
Loading…
Reference in New Issue
Block a user