Skip to content

Conversation

@abaire
Copy link
Contributor

@abaire abaire commented May 30, 2025

Fixes #950
Fixes #2199

Test results

@abaire abaire marked this pull request as ready for review May 30, 2025 06:58
@Triticum0
Copy link
Collaborator

well done, looks fixed to me.
xemu-2025-05-30-09-37-05

@abaire abaire force-pushed the fix_950_clear_overlapped_dirty_draw_during_2d_blit branch from 29700f4 to a394185 Compare June 3, 2025 19:34

// TODO: clear dirty_draw flag on surfaces without download if they are fully overlapped.
hwaddr write_end = dest_addr + dest_offset + image_blit->height * context_surfaces->dest_pitch - 1;
pgraph_gl_download_surfaces_in_range_if_dirty(d, dest_addr + dest_offset, write_end);
Copy link
Member

@mborgerson mborgerson Jun 3, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • This should obsolete the above surface download that matches only on exact blit dest/surface address matches
  • We should also download dirty surfaces overlapping the blit source region (like the above primitive check)
  • re:TODO, we can only discard dirty surface data fully contained within blit dest region if we know the surface falls outside the blit source region, but it should be downloaded already by above point
  • We should also mark any surfaces overlapping blit dest region for upload since their data are certainly changed

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • Removed the download above
  • Expanded the source region test to use the same range behavior
  • Yes, I think the source & dest overlap case would already sort itself out before this point. The clear would just be an optimization for completely contained dest surfaces where the blit bounds fully contain the surface. It didn't feel like enough of an optimization to justify the complexity without a known perf problem.
  • Expanded the upload pending mark to work on ranges as well.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I also took the opportunity to simplify some of the address handling, I think we were only hanging on to the raw addresses for an old obsolete debug print so I removed it.

@abaire abaire force-pushed the fix_950_clear_overlapped_dirty_draw_during_2d_blit branch 2 times, most recently from ee00b9e to fa94a22 Compare June 28, 2025 13:55
@abaire abaire force-pushed the fix_950_clear_overlapped_dirty_draw_during_2d_blit branch from fa94a22 to 3226bfb Compare July 2, 2025 17:08
@abaire abaire force-pushed the fix_950_clear_overlapped_dirty_draw_during_2d_blit branch from 3226bfb to 8e57422 Compare August 28, 2025 20:50
@abaire abaire force-pushed the fix_950_clear_overlapped_dirty_draw_during_2d_blit branch from 8e57422 to 20395e3 Compare October 9, 2025 20:37
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.

Fireblade Imaging thermal freezes the screen Splinter Cell: Pandora Tomorrow fire effects cause artefacts

3 participants