[GPU] TextureCache lockless pre-check
lockless accessors for base_outdated/mips_outdated and skip lock acquisition when textures appear up to date
This commit is contained in:
@@ -276,6 +276,11 @@ class TextureCache {
|
||||
bool mips_outdated(const global_unique_lock_type& global_lock) const {
|
||||
return mips_outdated_;
|
||||
}
|
||||
// Lockless accessors for pre-check optimization.
|
||||
// Safe to read without lock - worst case is false positive (outdated when
|
||||
// not).
|
||||
bool base_outdated_lockless() const { return base_outdated_; }
|
||||
bool mips_outdated_lockless() const { return mips_outdated_; }
|
||||
void MakeUpToDateAndWatch(const global_unique_lock_type& global_lock);
|
||||
|
||||
void WatchCallback(const global_unique_lock_type& global_lock, bool is_mip);
|
||||
|
||||
Reference in New Issue
Block a user