internal/graphicsdriver/directx: fix a wrong constant usage

This commit is contained in:
Hajime Hoshi 2022-07-15 02:48:59 +09:00
parent 8d74039617
commit e3d025bf4f

View File

@ -769,8 +769,9 @@ func (g *Graphics) End(present bool) error {
g.commandQueue.ExecuteCommandLists([]*_ID3D12GraphicsCommandList{g.drawCommandList})
// Release vertices and indices buffers when too many ones were created.
// The threshold is an arbitrary number.
// This is needed espciallly for testings, where present is always false.
if len(g.vertices[g.frameIndex]) >= numDescriptorsPerFrame {
if len(g.vertices[g.frameIndex]) >= 16 {
if err := g.waitForCommandQueue(); err != nil {
return err
}