diff options
| -rw-r--r-- | src/video_core/texture_cache/texture_cache.h | 12 |
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() { | |||
| 865 | template <class P> | 865 | template <class P> |
| 866 | ImageId TextureCache<P>::DmaImageId(const Tegra::DMA::ImageOperand& operand, bool is_upload) { | 866 | ImageId TextureCache<P>::DmaImageId(const Tegra::DMA::ImageOperand& operand, bool is_upload) { |
| 867 | const ImageInfo dst_info(operand); | 867 | const ImageInfo dst_info(operand); |
| 868 | const ImageId image_id = FindDMAImage(dst_info, operand.address); | 868 | const ImageId dst_id = FindDMAImage(dst_info, operand.address); |
| 869 | if (!image_id) { | 869 | if (!dst_id) { |
| 870 | return NULL_IMAGE_ID; | ||
| 871 | } | ||
| 872 | auto& image = slot_images[dst_id]; | ||
| 873 | if (False(image.flags & ImageFlagBits::GpuModified)) { | ||
| 874 | // No need to waste time on an image that's synced with guest | ||
| 870 | return NULL_IMAGE_ID; | 875 | return NULL_IMAGE_ID; |
| 871 | } | 876 | } |
| 872 | auto& image = slot_images[image_id]; | ||
| 873 | if (image.info.type == ImageType::e3D) { | 877 | if (image.info.type == ImageType::e3D) { |
| 874 | // Don't accelerate 3D images. | 878 | // Don't accelerate 3D images. |
| 875 | return NULL_IMAGE_ID; | 879 | return NULL_IMAGE_ID; |
| @@ -883,7 +887,7 @@ ImageId TextureCache<P>::DmaImageId(const Tegra::DMA::ImageOperand& operand, boo | |||
| 883 | if (!base) { | 887 | if (!base) { |
| 884 | return NULL_IMAGE_ID; | 888 | return NULL_IMAGE_ID; |
| 885 | } | 889 | } |
| 886 | return image_id; | 890 | return dst_id; |
| 887 | } | 891 | } |
| 888 | 892 | ||
| 889 | template <class P> | 893 | template <class P> |