Fix Voodoo dirty_line index mismatch in non-SLI single buffer mode#6684
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 fordirty_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:
dirty_line[real_y >> 1](each Voodoo handles alternate lines)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.cunconditionally useddirty_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) readsdirty_line[draw_line]wheredraw_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 checkeddirty_line[100]which was never set, causing that line to never be refreshed on screen.Checklist
References