Skip to content

Fix Voodoo dirty_line index mismatch in non-SLI single buffer mode#6684

Merged
OBattler merged 1 commit into
86Box:masterfrom
AITUS95:master
Jan 8, 2026
Merged

Fix Voodoo dirty_line index mismatch in non-SLI single buffer mode#6684
OBattler merged 1 commit into
86Box:masterfrom
AITUS95:master

Conversation

@AITUS95

@AITUS95 AITUS95 commented Jan 8, 2026

Copy link
Copy Markdown
Contributor

Summary

Fix dirty_line index mismatch in Voodoo render thread causing display corruption in single buffer mode.
When rendering to the front buffer in non-SLI mode, the render thread was marking dirty_line[real_y >> 1] (line divided by 2), but the display thread was looking for dirty_line[line] (undivided line). This caused rendered lines to never be properly displayed, resulting in stale content (previous frame) being shown on parts of the screen.
The fix uses the correct index based on SLI mode:

  • SLI enabled: dirty_line[real_y >> 1] (each Voodoo handles alternate lines)
  • SLI disabled: dirty_line[real_y] (standard single-card mode)

This was most visible in 3DMark99 with Voodoo 1/2 in single buffer mode, where the lower portion of the screen would show the previous frame's content instead of being updated.

Root Cause

The render thread in vid_voodoo_render.c unconditionally used dirty_line[real_y >> 1] to mark lines as dirty, which is only correct for SLI mode where each Voodoo card handles alternate scanlines. In non-SLI mode, the display thread (vid_voodoo_display.c) reads dirty_line[draw_line] where draw_line = voodoo->line (not divided by 2).
This index mismatch meant that when rendering line 100, the render thread marked dirty_line[50] as dirty, but the display thread looking at line 100 checked dirty_line[100] which was never set, causing that line to never be refreshed on screen.

Checklist

References

@OBattler OBattler merged commit e97f0c1 into 86Box:master Jan 8, 2026
45 checks passed
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