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

GPU cache invalidation fix and extra checks #2671

Merged
merged 3 commits into from Apr 18, 2018
Merged
Changes from 1 commit
Commits
File filter...
Filter file types
Jump to…
Jump to file
Failed to load files.

Always

Just for now

Prev

Don't invalidate GPU cache entries twice a frame

  • Loading branch information
kvark committed Apr 18, 2018
commit 9a986ae9aada0ff5bf99ba943e806d6e1bcb5934
@@ -558,7 +558,10 @@ impl GpuCache {
pub fn invalidate(&mut self, handle: &GpuCacheHandle) {
if let Some(ref location) = handle.location {
let block = &mut self.texture.blocks[location.block_index.0];
block.epoch.next();
// don't invalidate blocks that are already re-assigned
if block.epoch == location.epoch {
block.epoch.next();
}
}
}

ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.