summaryrefslogtreecommitdiff
path: root/src/video_core/command_classes
diff options
context:
space:
mode:
authorGravatar ReinUsesLisp2020-12-30 02:25:23 -0300
committerGravatar ReinUsesLisp2020-12-30 03:38:50 -0300
commit9764c13d6d2977903f407761b27d847c0056e1c4 (patch)
treef6f5d6d6379b0404147969e7d1f548ed3d49ca01 /src/video_core/command_classes
parentvideo_core: Add a delayed destruction ring abstraction (diff)
downloadyuzu-9764c13d6d2977903f407761b27d847c0056e1c4.tar.gz
yuzu-9764c13d6d2977903f407761b27d847c0056e1c4.tar.xz
yuzu-9764c13d6d2977903f407761b27d847c0056e1c4.zip
video_core: Rewrite the texture cache
The current texture cache has several points that hurt maintainability and performance. It's easy to break unrelated parts of the cache when doing minor changes. The cache can easily forget valuable information about the cached textures by CPU writes or simply by its normal usage.The current texture cache has several points that hurt maintainability and performance. It's easy to break unrelated parts of the cache when doing minor changes. The cache can easily forget valuable information about the cached textures by CPU writes or simply by its normal usage. This commit aims to address those issues.
Diffstat (limited to 'src/video_core/command_classes')
-rw-r--r--src/video_core/command_classes/vic.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/video_core/command_classes/vic.cpp b/src/video_core/command_classes/vic.cpp
index 66e21ce9c..aa8c9f9de 100644
--- a/src/video_core/command_classes/vic.cpp
+++ b/src/video_core/command_classes/vic.cpp
@@ -9,7 +9,7 @@
9#include "video_core/engines/maxwell_3d.h" 9#include "video_core/engines/maxwell_3d.h"
10#include "video_core/gpu.h" 10#include "video_core/gpu.h"
11#include "video_core/memory_manager.h" 11#include "video_core/memory_manager.h"
12#include "video_core/texture_cache/surface_params.h" 12#include "video_core/textures/decoders.h"
13 13
14extern "C" { 14extern "C" {
15#include <libswscale/swscale.h> 15#include <libswscale/swscale.h>
@@ -105,9 +105,9 @@ void Vic::Execute() {
105 const auto size = Tegra::Texture::CalculateSize(true, 4, frame->width, frame->height, 1, 105 const auto size = Tegra::Texture::CalculateSize(true, 4, frame->width, frame->height, 1,
106 block_height, 0); 106 block_height, 0);
107 std::vector<u8> swizzled_data(size); 107 std::vector<u8> swizzled_data(size);
108 Tegra::Texture::CopySwizzledData(frame->width, frame->height, 1, 4, 4, 108 Tegra::Texture::SwizzleSubrect(frame->width, frame->height, frame->width * 4,
109 swizzled_data.data(), converted_frame_buffer.get(), 109 frame->width, 4, swizzled_data.data(),
110 false, block_height, 0, 1); 110 converted_frame_buffer.get(), block_height, 0, 0);
111 111
112 gpu.MemoryManager().WriteBlock(output_surface_luma_address, swizzled_data.data(), size); 112 gpu.MemoryManager().WriteBlock(output_surface_luma_address, swizzled_data.data(), size);
113 gpu.Maxwell3D().OnMemoryWrite(); 113 gpu.Maxwell3D().OnMemoryWrite();