internal/graphicsdriver/metal: bug fix: always use 3 drawables

Updates #2822
Closes #2880
This commit is contained in:
Hajime Hoshi 2024-01-02 22:50:28 +09:00
parent ec9613dd94
commit fd63820139

View File

@ -53,13 +53,8 @@ func (v *view) forceSetDisplaySyncEnabled(enabled bool) {
v.ml.SetDisplaySyncEnabled(enabled) v.ml.SetDisplaySyncEnabled(enabled)
v.vsyncDisabled = !enabled v.vsyncDisabled = !enabled
if v.vsyncDisabled { // Always use 3. There are some situations that the FPS becomes half, or the FPS becomes too low (#2880).
// Apparently 2 makes FPS half. Use 3. v.ml.SetMaximumDrawableCount(3)
v.ml.SetMaximumDrawableCount(3)
} else {
// Use 2 in a usual case not to cause rendering delays (#2822).
v.ml.SetMaximumDrawableCount(2)
}
} }
func (v *view) colorPixelFormat() mtl.PixelFormat { func (v *view) colorPixelFormat() mtl.PixelFormat {