diff options
| author | 2019-07-10 15:38:31 -0400 | |
|---|---|---|
| committer | 2019-07-17 17:29:49 -0400 | |
| commit | f2e7b29c14e0207e0476299d69dac7ed4c213c74 (patch) | |
| tree | 670339fbdcb8b1cfa8e14a5c4e19cc03199a595f /src/video_core/texture_cache | |
| parent | Merge pull request #2740 from lioncash/bra (diff) | |
| download | yuzu-f2e7b29c14e0207e0476299d69dac7ed4c213c74.tar.gz yuzu-f2e7b29c14e0207e0476299d69dac7ed4c213c74.tar.xz yuzu-f2e7b29c14e0207e0476299d69dac7ed4c213c74.zip | |
Maxwell3D: Rework the dirty system to be more consistant and scaleable
Diffstat (limited to 'src/video_core/texture_cache')
| -rw-r--r-- | src/video_core/texture_cache/texture_cache.h | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/src/video_core/texture_cache/texture_cache.h b/src/video_core/texture_cache/texture_cache.h index 7f9623c62..8225022a9 100644 --- a/src/video_core/texture_cache/texture_cache.h +++ b/src/video_core/texture_cache/texture_cache.h | |||
| @@ -116,10 +116,10 @@ public: | |||
| 116 | std::lock_guard lock{mutex}; | 116 | std::lock_guard lock{mutex}; |
| 117 | auto& maxwell3d = system.GPU().Maxwell3D(); | 117 | auto& maxwell3d = system.GPU().Maxwell3D(); |
| 118 | 118 | ||
| 119 | if (!maxwell3d.dirty_flags.zeta_buffer) { | 119 | if (!maxwell3d.dirty.depth_buffer) { |
| 120 | return depth_buffer.view; | 120 | return depth_buffer.view; |
| 121 | } | 121 | } |
| 122 | maxwell3d.dirty_flags.zeta_buffer = false; | 122 | maxwell3d.dirty.depth_buffer = false; |
| 123 | 123 | ||
| 124 | const auto& regs{maxwell3d.regs}; | 124 | const auto& regs{maxwell3d.regs}; |
| 125 | const auto gpu_addr{regs.zeta.Address()}; | 125 | const auto gpu_addr{regs.zeta.Address()}; |
| @@ -145,10 +145,10 @@ public: | |||
| 145 | std::lock_guard lock{mutex}; | 145 | std::lock_guard lock{mutex}; |
| 146 | ASSERT(index < Tegra::Engines::Maxwell3D::Regs::NumRenderTargets); | 146 | ASSERT(index < Tegra::Engines::Maxwell3D::Regs::NumRenderTargets); |
| 147 | auto& maxwell3d = system.GPU().Maxwell3D(); | 147 | auto& maxwell3d = system.GPU().Maxwell3D(); |
| 148 | if (!maxwell3d.dirty_flags.color_buffer[index]) { | 148 | if (!maxwell3d.dirty.render_target[index]) { |
| 149 | return render_targets[index].view; | 149 | return render_targets[index].view; |
| 150 | } | 150 | } |
| 151 | maxwell3d.dirty_flags.color_buffer.reset(index); | 151 | maxwell3d.dirty.render_target[index] = false; |
| 152 | 152 | ||
| 153 | const auto& regs{maxwell3d.regs}; | 153 | const auto& regs{maxwell3d.regs}; |
| 154 | if (index >= regs.rt_control.count || regs.rt[index].Address() == 0 || | 154 | if (index >= regs.rt_control.count || regs.rt[index].Address() == 0 || |
| @@ -272,12 +272,19 @@ protected: | |||
| 272 | 272 | ||
| 273 | void ManageRenderTargetUnregister(TSurface& surface) { | 273 | void ManageRenderTargetUnregister(TSurface& surface) { |
| 274 | auto& maxwell3d = system.GPU().Maxwell3D(); | 274 | auto& maxwell3d = system.GPU().Maxwell3D(); |
| 275 | <<<<<<< HEAD | ||
| 275 | const u32 index = surface->GetRenderTarget(); | 276 | const u32 index = surface->GetRenderTarget(); |
| 276 | if (index == DEPTH_RT) { | 277 | if (index == DEPTH_RT) { |
| 277 | maxwell3d.dirty_flags.zeta_buffer = true; | 278 | maxwell3d.dirty_flags.zeta_buffer = true; |
| 279 | ======= | ||
| 280 | u32 index = surface->GetRenderTarget(); | ||
| 281 | if (index == 8) { | ||
| 282 | maxwell3d.dirty.depth_buffer = true; | ||
| 283 | >>>>>>> Maxwell3D: Rework the dirty system to be more consistant and scaleable | ||
| 278 | } else { | 284 | } else { |
| 279 | maxwell3d.dirty_flags.color_buffer.set(index, true); | 285 | maxwell3d.dirty.render_target[index] = true; |
| 280 | } | 286 | } |
| 287 | maxwell3d.dirty.render_settings = true; | ||
| 281 | } | 288 | } |
| 282 | 289 | ||
| 283 | void Register(TSurface surface) { | 290 | void Register(TSurface surface) { |