diff options
| author | 2023-05-07 23:34:52 +0200 | |
|---|---|---|
| committer | 2023-05-07 23:46:12 +0200 | |
| commit | 8014dd82594dbb40e13749203e67b21e8447733c (patch) | |
| tree | b874061d30aa6a03fd3c92116df92ed6d3b91a19 /src/video_core | |
| parent | Buffer Cache: disable reactive flushing in it. (diff) | |
| download | yuzu-8014dd82594dbb40e13749203e67b21e8447733c.tar.gz yuzu-8014dd82594dbb40e13749203e67b21e8447733c.tar.xz yuzu-8014dd82594dbb40e13749203e67b21e8447733c.zip | |
Texture cache: Only force flush the dma downloads
Diffstat (limited to 'src/video_core')
| -rw-r--r-- | src/video_core/engines/maxwell_dma.cpp | 2 | ||||
| -rw-r--r-- | src/video_core/renderer_opengl/gl_rasterizer.cpp | 2 | ||||
| -rw-r--r-- | src/video_core/renderer_vulkan/vk_rasterizer.cpp | 2 | ||||
| -rw-r--r-- | src/video_core/texture_cache/texture_cache.h | 4 | ||||
| -rw-r--r-- | src/video_core/texture_cache/texture_cache_base.h | 2 |
5 files changed, 6 insertions, 6 deletions
diff --git a/src/video_core/engines/maxwell_dma.cpp b/src/video_core/engines/maxwell_dma.cpp index f7400aac8..ebe5536de 100644 --- a/src/video_core/engines/maxwell_dma.cpp +++ b/src/video_core/engines/maxwell_dma.cpp | |||
| @@ -288,7 +288,7 @@ void MaxwellDMA::CopyPitchToBlockLinear() { | |||
| 288 | write_buffer.resize_destructive(dst_size); | 288 | write_buffer.resize_destructive(dst_size); |
| 289 | 289 | ||
| 290 | memory_manager.ReadBlock(regs.offset_in, read_buffer.data(), src_size); | 290 | memory_manager.ReadBlock(regs.offset_in, read_buffer.data(), src_size); |
| 291 | memory_manager.ReadBlock(regs.offset_out, write_buffer.data(), dst_size); | 291 | memory_manager.ReadBlockUnsafe(regs.offset_out, write_buffer.data(), dst_size); |
| 292 | 292 | ||
| 293 | // If the input is linear and the output is tiled, swizzle the input and copy it over. | 293 | // If the input is linear and the output is tiled, swizzle the input and copy it over. |
| 294 | SwizzleSubrect(write_buffer, read_buffer, bytes_per_pixel, width, height, depth, x_offset, | 294 | SwizzleSubrect(write_buffer, read_buffer, bytes_per_pixel, width, height, depth, x_offset, |
diff --git a/src/video_core/renderer_opengl/gl_rasterizer.cpp b/src/video_core/renderer_opengl/gl_rasterizer.cpp index 3f07fe8bb..f5baa0f3c 100644 --- a/src/video_core/renderer_opengl/gl_rasterizer.cpp +++ b/src/video_core/renderer_opengl/gl_rasterizer.cpp | |||
| @@ -1304,7 +1304,7 @@ bool AccelerateDMA::DmaBufferImageCopy(const Tegra::DMA::ImageCopy& copy_info, | |||
| 1304 | const Tegra::DMA::BufferOperand& buffer_operand, | 1304 | const Tegra::DMA::BufferOperand& buffer_operand, |
| 1305 | const Tegra::DMA::ImageOperand& image_operand) { | 1305 | const Tegra::DMA::ImageOperand& image_operand) { |
| 1306 | std::scoped_lock lock{buffer_cache.mutex, texture_cache.mutex}; | 1306 | std::scoped_lock lock{buffer_cache.mutex, texture_cache.mutex}; |
| 1307 | const auto image_id = texture_cache.DmaImageId(image_operand); | 1307 | const auto image_id = texture_cache.DmaImageId(image_operand, IS_IMAGE_UPLOAD); |
| 1308 | if (image_id == VideoCommon::NULL_IMAGE_ID) { | 1308 | if (image_id == VideoCommon::NULL_IMAGE_ID) { |
| 1309 | return false; | 1309 | return false; |
| 1310 | } | 1310 | } |
diff --git a/src/video_core/renderer_vulkan/vk_rasterizer.cpp b/src/video_core/renderer_vulkan/vk_rasterizer.cpp index 0bcc20544..628e1376f 100644 --- a/src/video_core/renderer_vulkan/vk_rasterizer.cpp +++ b/src/video_core/renderer_vulkan/vk_rasterizer.cpp | |||
| @@ -793,7 +793,7 @@ bool AccelerateDMA::DmaBufferImageCopy(const Tegra::DMA::ImageCopy& copy_info, | |||
| 793 | const Tegra::DMA::BufferOperand& buffer_operand, | 793 | const Tegra::DMA::BufferOperand& buffer_operand, |
| 794 | const Tegra::DMA::ImageOperand& image_operand) { | 794 | const Tegra::DMA::ImageOperand& image_operand) { |
| 795 | std::scoped_lock lock{buffer_cache.mutex, texture_cache.mutex}; | 795 | std::scoped_lock lock{buffer_cache.mutex, texture_cache.mutex}; |
| 796 | const auto image_id = texture_cache.DmaImageId(image_operand); | 796 | const auto image_id = texture_cache.DmaImageId(image_operand, IS_IMAGE_UPLOAD); |
| 797 | if (image_id == VideoCommon::NULL_IMAGE_ID) { | 797 | if (image_id == VideoCommon::NULL_IMAGE_ID) { |
| 798 | return false; | 798 | return false; |
| 799 | } | 799 | } |
diff --git a/src/video_core/texture_cache/texture_cache.h b/src/video_core/texture_cache/texture_cache.h index d49f3a7a0..e1198dcf8 100644 --- a/src/video_core/texture_cache/texture_cache.h +++ b/src/video_core/texture_cache/texture_cache.h | |||
| @@ -811,7 +811,7 @@ void TextureCache<P>::PopAsyncFlushes() { | |||
| 811 | } | 811 | } |
| 812 | 812 | ||
| 813 | template <class P> | 813 | template <class P> |
| 814 | ImageId TextureCache<P>::DmaImageId(const Tegra::DMA::ImageOperand& operand) { | 814 | ImageId TextureCache<P>::DmaImageId(const Tegra::DMA::ImageOperand& operand, bool is_upload) { |
| 815 | const ImageInfo dst_info(operand); | 815 | const ImageInfo dst_info(operand); |
| 816 | const ImageId dst_id = FindDMAImage(dst_info, operand.address); | 816 | const ImageId dst_id = FindDMAImage(dst_info, operand.address); |
| 817 | if (!dst_id) { | 817 | if (!dst_id) { |
| @@ -822,7 +822,7 @@ ImageId TextureCache<P>::DmaImageId(const Tegra::DMA::ImageOperand& operand) { | |||
| 822 | // No need to waste time on an image that's synced with guest | 822 | // No need to waste time on an image that's synced with guest |
| 823 | return NULL_IMAGE_ID; | 823 | return NULL_IMAGE_ID; |
| 824 | } | 824 | } |
| 825 | if (!image.info.dma_downloaded) { | 825 | if (!is_upload && !image.info.dma_downloaded) { |
| 826 | // Force a full sync. | 826 | // Force a full sync. |
| 827 | image.info.dma_downloaded = true; | 827 | image.info.dma_downloaded = true; |
| 828 | return NULL_IMAGE_ID; | 828 | return NULL_IMAGE_ID; |
diff --git a/src/video_core/texture_cache/texture_cache_base.h b/src/video_core/texture_cache/texture_cache_base.h index 01f5ac588..0720494e5 100644 --- a/src/video_core/texture_cache/texture_cache_base.h +++ b/src/video_core/texture_cache/texture_cache_base.h | |||
| @@ -207,7 +207,7 @@ public: | |||
| 207 | /// Pop asynchronous downloads | 207 | /// Pop asynchronous downloads |
| 208 | void PopAsyncFlushes(); | 208 | void PopAsyncFlushes(); |
| 209 | 209 | ||
| 210 | [[nodiscard]] ImageId DmaImageId(const Tegra::DMA::ImageOperand& operand); | 210 | [[nodiscard]] ImageId DmaImageId(const Tegra::DMA::ImageOperand& operand, bool is_upload); |
| 211 | 211 | ||
| 212 | [[nodiscard]] std::pair<Image*, BufferImageCopy> DmaBufferImageCopy( | 212 | [[nodiscard]] std::pair<Image*, BufferImageCopy> DmaBufferImageCopy( |
| 213 | const Tegra::DMA::ImageCopy& copy_info, const Tegra::DMA::BufferOperand& buffer_operand, | 213 | const Tegra::DMA::ImageCopy& copy_info, const Tegra::DMA::BufferOperand& buffer_operand, |