summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLiam <byteslice@airmail.cc>2023-07-02 05:37:50 +0200
committerLiam <byteslice@airmail.cc>2023-07-02 05:37:50 +0200
commit34c448bad405632484ac0129057319c1a37a0e84 (patch)
tree5d5660b3efecb3c5c54aff61b7bfa7ebb95d1281
parentMerge pull request #10984 from comex/cob (diff)
downloadyuzu-34c448bad405632484ac0129057319c1a37a0e84.tar
yuzu-34c448bad405632484ac0129057319c1a37a0e84.tar.gz
yuzu-34c448bad405632484ac0129057319c1a37a0e84.tar.bz2
yuzu-34c448bad405632484ac0129057319c1a37a0e84.tar.lz
yuzu-34c448bad405632484ac0129057319c1a37a0e84.tar.xz
yuzu-34c448bad405632484ac0129057319c1a37a0e84.tar.zst
yuzu-34c448bad405632484ac0129057319c1a37a0e84.zip
Diffstat (limited to '')
-rw-r--r--src/video_core/texture_cache/texture_cache.h12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/video_core/texture_cache/texture_cache.h b/src/video_core/texture_cache/texture_cache.h
index 8190f3ba1..79f158db4 100644
--- a/src/video_core/texture_cache/texture_cache.h
+++ b/src/video_core/texture_cache/texture_cache.h
@@ -865,11 +865,15 @@ void TextureCache<P>::PopAsyncFlushes() {
template <class P>
ImageId TextureCache<P>::DmaImageId(const Tegra::DMA::ImageOperand& operand, bool is_upload) {
const ImageInfo dst_info(operand);
- const ImageId image_id = FindDMAImage(dst_info, operand.address);
- if (!image_id) {
+ const ImageId dst_id = FindDMAImage(dst_info, operand.address);
+ if (!dst_id) {
+ return NULL_IMAGE_ID;
+ }
+ auto& image = slot_images[dst_id];
+ if (False(image.flags & ImageFlagBits::GpuModified)) {
+ // No need to waste time on an image that's synced with guest
return NULL_IMAGE_ID;
}
- auto& image = slot_images[image_id];
if (image.info.type == ImageType::e3D) {
// Don't accelerate 3D images.
return NULL_IMAGE_ID;
@@ -883,7 +887,7 @@ ImageId TextureCache<P>::DmaImageId(const Tegra::DMA::ImageOperand& operand, boo
if (!base) {
return NULL_IMAGE_ID;
}
- return image_id;
+ return dst_id;
}
template <class P>