[GPU] Cleanup Texture::MarkAsUsed conditionals
This commit is contained in:
parent
382710bab7
commit
243683d2e9
|
@ -526,8 +526,10 @@ void TextureCache::Texture::MakeUpToDateAndWatch(
|
||||||
}
|
}
|
||||||
|
|
||||||
void TextureCache::Texture::MarkAsUsed() {
|
void TextureCache::Texture::MarkAsUsed() {
|
||||||
|
assert_true(last_usage_submission_index_ <=
|
||||||
|
texture_cache_.current_submission_index_);
|
||||||
// This is called very frequently, don't relink unless needed for caching.
|
// This is called very frequently, don't relink unless needed for caching.
|
||||||
if (last_usage_submission_index_ ==
|
if (last_usage_submission_index_ >=
|
||||||
texture_cache_.current_submission_index_) {
|
texture_cache_.current_submission_index_) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -545,9 +547,7 @@ void TextureCache::Texture::MarkAsUsed() {
|
||||||
used_next_->used_previous_ = used_previous_;
|
used_next_->used_previous_ = used_previous_;
|
||||||
used_previous_ = texture_cache_.texture_used_last_;
|
used_previous_ = texture_cache_.texture_used_last_;
|
||||||
used_next_ = nullptr;
|
used_next_ = nullptr;
|
||||||
if (texture_cache_.texture_used_last_ != nullptr) {
|
texture_cache_.texture_used_last_->used_next_ = this;
|
||||||
texture_cache_.texture_used_last_->used_next_ = this;
|
|
||||||
}
|
|
||||||
texture_cache_.texture_used_last_ = this;
|
texture_cache_.texture_used_last_ = this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue