Skip to content

Record wall-clock time for parallel texture refreshes - #2

Merged
KyleS98 merged 1 commit into
KyleS98:perf/wide-texture-refreshfrom
gmankab:contrib/wide-texture-timing
Nov 26, 2026
Merged

KyleS98 merged 1 commit into
KyleS98:perf/wide-texture-refreshfrom
gmankab:contrib/wide-texture-timing

Conversation

@gmankab

@gmankab gmankab commented Nov 25, 2026

Copy link
Copy Markdown

The parallel texture refresh path introduced in fxceless#768 adds each worker's time to the shared frame counter and later subtracts the difference from wall time. A frame report can reset the counter between the read and subtraction, leaving a wrapped value in the next sample.

Count bytes as each worker finishes. Add the batch's wall-clock duration once after all its workers finish.

Tested-on: Fedora Linux 45, Wine 11.0 (MSVC cross-build of this branch and four focused batch tests)
Assisted-by: gpt-6.2 sol xhigh

The parallel path adds each worker's duration to the shared texture
counter and later subtracts the difference from elapsed time. The
present thread can drain that counter between the read and the
subtraction, wrapping the unsigned counter and corrupting the frame
timings. Other batches can also contribute to that difference.

Count the bytes read by each worker and add the wall-clock duration
once when the batch finishes. This keeps timing additive across
present intervals without changing refresh ordering or the sequential
path.

Based-on: fxceless#768
Tested-on: Fedora Linux 45, Wine 11.0 (Windows cross-build and four focused batch tests)
Assisted-by: gpt-6.2 sol xhigh
@KyleS98
KyleS98 merged commit 599f962 into KyleS98:perf/wide-texture-refresh Nov 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants