Skip to content
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

Improve image hazard tracking granularity #4722

Merged
merged 9 commits into from
Mar 2, 2025
Merged

Conversation

doitsujin
Copy link
Owner

@doitsujin doitsujin commented Mar 1, 2025

Optimizes a bunch of barriers away when the app is doing back-to-back image copies/updates to the same subresource of an image. Since this uses morton codes to linearize texture coordinates, there will be false positives when copying unaligned image blocks around, but it improves a few common use cases.

This is a relatively common occurence when games stream in textures, either if virtual texturing is used (e.g. The Evil Within, this is one of the few games that constantly hit this case even during gameplay), or if a texture atlas is being created (seen that in Trine 5).

Also catches a few cases of 3D image updates in various Cryengine games, and some image->image copies in AC:Origins.

This probably won't drastically change performance anywhere, but it's a fairly trivial optmization and may reduce some GPU-bound frametime spikes here and there.

@doitsujin doitsujin force-pushed the granular-image-barriers branch from 5377a66 to 58d5a59 Compare March 2, 2025 12:37
@doitsujin doitsujin merged commit 106032f into master Mar 2, 2025
8 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.

1 participant