-
-
Couldn't load subscription status.
- Fork 354
nv2a: Resolve overlapped dirty draws during 2d blit ops #2211
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
nv2a: Resolve overlapped dirty draws during 2d blit ops #2211
Conversation
29700f4 to
a394185
Compare
hw/xbox/nv2a/pgraph/gl/blit.c
Outdated
|
|
||
| // 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); |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
ee00b9e to
fa94a22
Compare
fa94a22 to
3226bfb
Compare
3226bfb to
8e57422
Compare
8e57422 to
20395e3
Compare

Fixes #950
Fixes #2199
Test results