Replace Throttle Busy Wait With Dequeue Signal And Byte Limit

This commit is contained in:
copecone committed 2026-10-13 19:05:39 +09:00
1 parent e802b6a08a
commit aefa1409c1
3 files changed
+59 -6

No files matched your search

+10
View File
@@ -73,6 +73,16 @@ namespace ADOFAIRenderer.Util
}
}
/// <summary>
/// Bytes of the readback buffer of one frame: Width x Height x 3 / 2 when the GPU conversion to NV12 / YUV420P
/// is used, Width x Height x 4 (RGBA) otherwise. The same size as ReadbackRequestState.Setup uses.
/// </summary>
public long GetFrameBufferBytes(int width, int height)
{
var pixels = (long)width * height;
return _useGPUConversion ? pixels * 3 / 2 : pixels * 4;
}
public void RequestFrameCapture(Texture texture, long currentFrame)
{
if (!RenderManager.IsCapturingActive) return;