From 243683d2e9d119d83fa9ccba8f9d810055e6c530 Mon Sep 17 00:00:00 2001 From: Triang3l Date: Tue, 28 Jun 2022 22:04:26 +0300 Subject: [PATCH] [GPU] Cleanup Texture::MarkAsUsed conditionals --- src/xenia/gpu/texture_cache.cc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/xenia/gpu/texture_cache.cc b/src/xenia/gpu/texture_cache.cc index b09f6ad46..030ae2be7 100644 --- a/src/xenia/gpu/texture_cache.cc +++ b/src/xenia/gpu/texture_cache.cc @@ -526,8 +526,10 @@ void TextureCache::Texture::MakeUpToDateAndWatch( } 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. - if (last_usage_submission_index_ == + if (last_usage_submission_index_ >= texture_cache_.current_submission_index_) { return; } @@ -545,9 +547,7 @@ void TextureCache::Texture::MarkAsUsed() { used_next_->used_previous_ = used_previous_; used_previous_ = texture_cache_.texture_used_last_; 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; }