Skip to content

Releases: ShmidtS/OptiScaler

Test-build - Buffer Index Fix

23 Feb 05:17
2e65f0b

Choose a tag to compare

Test Build - Buffer Index Mismatch Fix

Fixed

  • Critical: Synchronized GetIndexWillBeDispatched() with GetDispatchIndex() to prevent buffer index mismatch
  • Camera data now correctly writes to the same buffer that dispatch reads from

Problem

When _lastDispatchedFrame == 0 and no Depth resource was available:

  • GetIndexWillBeDispatched() returned _frameCount % BUFFER_COUNT
  • GetDispatchIndex() returned (_lastDispatchedFrame + 1) % BUFFER_COUNT

This caused camera data to be written to wrong buffer, leading to freezes in some games (especially Arknights Endfield).

Solution

Both functions now use identical logic:

  • With Depth resource: use _frameCount
  • Without Depth resource: use _lastDispatchedFrame + 1